summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJacob Keeler <jacob.keeler@livioradio.com>2018-07-12 13:32:52 -0700
committerGitHub <noreply@github.com>2018-07-12 13:32:52 -0700
commit7911d4a89a46651168ff69b5eb1c859464d40685 (patch)
treea6108b6502b53f2f942e00d32138d31b40ec31a1
parentc3179ce99d1bb664fe84078243e46a0de358b88b (diff)
parent0e70eea7754b5724ef910319cca7ec624c7c756e (diff)
downloadsdl_core-feature/remove_auto_ptr.tar.gz
Merge branch 'develop' into feature/remove_auto_ptrfeature/remove_auto_ptr
-rw-r--r--.travis.yml55
-rw-r--r--CMakeLists.txt26
-rw-r--r--README.md1
-rw-r--r--src/3rd_party/CMakeLists.txt12
-rw-r--r--src/appMain/CMakeLists.txt9
-rw-r--r--src/appMain/life_cycle.cc59
-rw-r--r--src/appMain/life_cycle.h18
-rw-r--r--src/appMain/sdl_preloaded_pt.json15
-rw-r--r--src/appMain/smartDeviceLink.ini99
-rw-r--r--src/components/CMakeLists.txt12
-rw-r--r--src/components/application_manager/CMakeLists.txt303
-rw-r--r--src/components/application_manager/include/application_manager/app_extension.h23
-rw-r--r--src/components/application_manager/include/application_manager/application.h68
-rw-r--r--src/components/application_manager/include/application_manager/application_data_impl.h20
-rw-r--r--src/components/application_manager/include/application_manager/application_impl.h66
-rw-r--r--src/components/application_manager/include/application_manager/application_manager_impl.h290
-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/message.h6
-rw-r--r--src/components/application_manager/include/application_manager/message_helper.h105
-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.h4
-rw-r--r--src/components/application_manager/include/application_manager/request_info.h2
-rw-r--r--src/components/application_manager/include/application_manager/resumption/resume_ctrl.h9
-rw-r--r--src/components/application_manager/include/application_manager/resumption/resume_ctrl_impl.h22
-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.h19
-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.h238
-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.h161
-rw-r--r--src/components/application_manager/rpc_plugins/rc_rpc_plugin/include/rc_rpc_plugin/resource_allocation_manager_impl.h232
-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.cc159
-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.cc366
-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.cc273
-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.cc131
-rw-r--r--src/components/application_manager/rpc_plugins/rc_rpc_plugin/src/resource_allocation_manager_impl.cc522
-rw-r--r--src/components/application_manager/rpc_plugins/rc_rpc_plugin/test/CMakeLists.txt76
-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.cc321
-rw-r--r--src/components/application_manager/rpc_plugins/rc_rpc_plugin/test/commands/get_interior_vehicle_data_request_test.cc240
-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.cc241
-rw-r--r--src/components/application_manager/rpc_plugins/rc_rpc_plugin/test/commands/set_interior_vehicle_data_request_test.cc227
-rw-r--r--src/components/application_manager/rpc_plugins/rc_rpc_plugin/test/include/rc_rpc_plugin/mock/mock_resource_allocation_manager.h75
-rw-r--r--src/components/application_manager/rpc_plugins/rc_rpc_plugin/test/resource_allocation_manager_impl_test.cc506
-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/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.cc192
-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.cc193
-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.cc104
-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.cc1375
-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.cc610
-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.cc847
-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.cc124
-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.cc541
-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.cc1859
-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.cc205
-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.cc1251
-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.h82
-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.h166
-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.h120
-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.cc147
-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.cc375
-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.cc287
-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.cc256
-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.cc31
-rw-r--r--src/components/application_manager/src/application_impl.cc111
-rw-r--r--src/components/application_manager/src/application_manager_impl.cc1363
-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.cc35
-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.cc117
-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.cc86
-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.cc223
-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.cc317
-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.cc1358
-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.cc288
-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.cc165
-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.cc560
-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.cc690
-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.cc2
-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/message.cc4
-rw-r--r--src/components/application_manager/src/message_helper/message_helper.cc523
-rw-r--r--src/components/application_manager/src/mobile_command_factory.cc731
-rw-r--r--src/components/application_manager/src/mobile_message_handler.cc1
-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_event_observer.cc9
-rw-r--r--src/components/application_manager/src/policies/policy_handler.cc40
-rw-r--r--src/components/application_manager/src/request_controller.cc2
-rw-r--r--src/components/application_manager/src/resumption/resume_ctrl_impl.cc220
-rw-r--r--src/components/application_manager/src/resumption/resumption_data.cc13
-rw-r--r--src/components/application_manager/src/rpc_handler_impl.cc365
-rw-r--r--src/components/application_manager/src/rpc_service_impl.cc630
-rw-r--r--src/components/application_manager/src/smart_object_keys.cc20
-rw-r--r--src/components/application_manager/src/state_controller_impl.cc3
-rw-r--r--src/components/application_manager/src/system_time/system_time_handler_impl.cc173
-rw-r--r--src/components/application_manager/test/CMakeLists.txt7
-rw-r--r--src/components/application_manager/test/application_helper_test.cc21
-rw-r--r--src/components/application_manager/test/application_impl_test.cc29
-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.cc442
-rw-r--r--src/components/application_manager/test/command_holder_test.cc21
-rw-r--r--src/components/application_manager/test/commands/CMakeLists.txt29
-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.cc1982
-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.cc348
-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.cc206
-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.cc293
-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.cc410
-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.cc529
-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.cc174
-rw-r--r--src/components/application_manager/test/commands/mobile/set_display_layout_test.cc256
-rw-r--r--src/components/application_manager/test/commands/mobile/set_global_properties_test.cc1229
-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.cc239
-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_test.cc5
-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.h33
-rw-r--r--src/components/application_manager/test/include/application_manager/mock_application.h23
-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.h25
-rw-r--r--src/components/application_manager/test/include/application_manager/mock_resume_ctrl.h2
-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.cc48
-rw-r--r--src/components/application_manager/test/policy_handler_test.cc23
-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.cc494
-rw-r--r--src/components/application_manager/test/resumption/resumption_data_db_test.cc24
-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.cc20
-rw-r--r--src/components/application_manager/test/sdl_preloaded_pt.json8
-rw-r--r--src/components/application_manager/test/sdl_pt_update.json8
-rw-r--r--src/components/application_manager/test/state_controller/state_controller_test.cc22
-rw-r--r--src/components/config_profile/include/config_profile/profile.h114
-rw-r--r--src/components/config_profile/src/profile.cc294
-rw-r--r--src/components/config_profile/test/profile_test.cc26
-rw-r--r--src/components/connection_handler/include/connection_handler/connection.h57
-rw-r--r--src/components/connection_handler/include/connection_handler/connection_handler_impl.h112
-rw-r--r--src/components/connection_handler/src/connection.cc136
-rw-r--r--src/components/connection_handler/src/connection_handler_impl.cc497
-rw-r--r--src/components/connection_handler/test/connection_handler_impl_test.cc249
-rw-r--r--src/components/connection_handler/test/connection_test.cc178
-rw-r--r--src/components/connection_handler/test/heart_beat_monitor_test.cc68
-rw-r--r--src/components/dbus/CMakeLists.txt82
-rw-r--r--src/components/dbus/codegen/code_formatter.py58
-rw-r--r--src/components/dbus/codegen/ford_xml_parser.py231
-rw-r--r--src/components/dbus/codegen/introspection_xml.cc327
-rwxr-xr-xsrc/components/dbus/codegen/make_hmi_requests.py343
-rwxr-xr-xsrc/components/dbus/codegen/make_introspection_c.py126
-rwxr-xr-xsrc/components/dbus/codegen/make_message_descriptions.py273
-rwxr-xr-xsrc/components/dbus/codegen/make_notifications_qml.py387
-rwxr-xr-xsrc/components/dbus/codegen/make_qml_dbus_cpp.py736
-rwxr-xr-xsrc/components/dbus/codegen/make_qml_dbus_qml.py217
-rw-r--r--src/components/dbus/codegen/make_qml_requests_cpp.py253
-rwxr-xr-xsrc/components/dbus/codegen/make_request_to_sdl.py335
-rw-r--r--src/components/dbus/include/dbus/dbus_adapter.h375
-rw-r--r--src/components/dbus/include/dbus/dbus_message.h179
-rw-r--r--src/components/dbus/include/dbus/dbus_message_controller.h97
-rw-r--r--src/components/dbus/include/dbus/dbus_message_inl.h214
-rw-r--r--src/components/dbus/include/dbus/message_descriptions.h73
-rw-r--r--src/components/dbus/include/dbus/schema.h98
-rw-r--r--src/components/dbus/src/dbus_adapter.cc937
-rw-r--r--src/components/dbus/src/dbus_message.cc217
-rw-r--r--src/components/dbus/src/dbus_message_controller.cc90
-rw-r--r--src/components/dbus/src/introspection_xml.cc327
-rw-r--r--src/components/dbus/src/message_descriptions.cc10424
-rw-r--r--src/components/dbus/src/schema.cc145
-rw-r--r--src/components/dbus/test/CMakeLists.txt53
-rw-r--r--src/components/dbus/test/dbus_adapter_test.cc59
-rw-r--r--src/components/dbus/test/dbus_message_controller_test.cc116
-rw-r--r--src/components/dbus/test/include/dbus/mock_dbus_message_controller.h75
-rw-r--r--src/components/dbus/test/include/dbus/mock_subscriber.h62
-rw-r--r--src/components/dbus/test/mock_subscriber.cc71
-rw-r--r--src/components/dbus/test/schema_test.cc118
-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.h250
-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/CMakeLists.txt10
-rw-r--r--src/components/hmi_message_handler/include/hmi_message_handler/dbus_message_adapter.h98
-rw-r--r--src/components/hmi_message_handler/src/dbus_message_adapter.cc223
-rw-r--r--src/components/hmi_message_handler/src/websocket_session.cc2
-rw-r--r--src/components/include/application_manager/application_manager.h75
-rw-r--r--src/components/include/application_manager/application_manager_settings.h9
-rw-r--r--src/components/include/application_manager/policies/policy_handler_interface.h3
-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/connection_handler/connection_handler.h83
-rw-r--r--src/components/include/connection_handler/connection_handler_observer.h17
-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.h5
-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.h6
-rw-r--r--src/components/include/protocol/bson_object_keys.h6
-rw-r--r--src/components/include/protocol/common.h16
-rw-r--r--src/components/include/protocol_handler/protocol_handler.h16
-rw-r--r--src/components/include/protocol_handler/protocol_handler_settings.h22
-rw-r--r--src/components/include/protocol_handler/session_observer.h51
-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.h51
-rw-r--r--src/components/include/test/application_manager/mock_application_manager_settings.h7
-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/policies/mock_policy_handler_interface.h2
-rw-r--r--src/components/include/test/connection_handler/mock_connection_handler.h29
-rw-r--r--src/components/include/test/connection_handler/mock_connection_handler_observer.h5
-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.h4
-rw-r--r--src/components/include/test/policy/policy_regular/policy/mock_cache_manager.h1
-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.h3
-rw-r--r--src/components/include/test/protocol_handler/mock_protocol_handler.h6
-rw-r--r--src/components/include/test/protocol_handler/mock_protocol_handler_settings.h11
-rw-r--r--src/components/include/test/protocol_handler/mock_session_observer.h11
-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/transport_manager/mock_transport_manager_listener.h2
-rw-r--r--src/components/include/test/transport_manager/mock_transport_manager_settings.h2
-rw-r--r--src/components/include/test/transport_manager/transport_adapter/mock_transport_adapter.h2
-rw-r--r--src/components/include/test/utils/mock_system_time_handler.h69
-rw-r--r--src/components/include/transport_manager/transport_adapter/transport_adapter.h26
-rw-r--r--src/components/include/transport_manager/transport_adapter/transport_adapter_event.h8
-rw-r--r--src/components/include/transport_manager/transport_manager_listener.h14
-rw-r--r--src/components/include/transport_manager/transport_manager_listener_empty.h13
-rw-r--r--src/components/include/transport_manager/transport_manager_settings.h6
-rw-r--r--src/components/include/utils/data_accessor.h17
-rw-r--r--src/components/include/utils/lock.hbin5079 -> 5418 bytes
-rw-r--r--src/components/interfaces/CMakeLists.txt27
-rw-r--r--src/components/interfaces/HMI_API.xml153
-rw-r--r--src/components/interfaces/MOBILE_API.xml121
-rw-r--r--src/components/interfaces/QT_HMI_API.xml5517
-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/.gitignore2
-rw-r--r--src/components/policy/policy_external/CMakeLists.txt5
-rw-r--r--src/components/policy/policy_external/include/policy/policy_manager_impl.h9
-rw-r--r--src/components/policy/policy_external/include/policy/policy_table/enums.h3
-rw-r--r--src/components/policy/policy_external/include/policy/policy_table/types.h6
-rw-r--r--src/components/policy/policy_external/include/policy/policy_table_interface_ext.xml2
-rw-r--r--src/components/policy/policy_external/include/policy/sql_pt_representation.h2
-rw-r--r--src/components/policy/policy_external/src/policy_manager_impl.cc22
-rw-r--r--src/components/policy/policy_external/src/policy_table/enums.cc23
-rw-r--r--src/components/policy/policy_external/src/policy_table/types.cc17
-rw-r--r--src/components/policy/policy_external/src/policy_table/validation.cc6
-rw-r--r--src/components/policy/policy_external/src/sql_pt_representation.cc8
-rw-r--r--src/components/policy/policy_external/test/CMakeLists.txt6
-rw-r--r--src/components/policy/policy_external/test/json/PTU.json8
-rw-r--r--src/components/policy/policy_external/test/json/PTU2.json8
-rw-r--r--src/components/policy/policy_external/test/json/PTU3.json8
-rw-r--r--src/components/policy/policy_external/test/json/PTU_with_empty_requestType_array.json8
-rw-r--r--src/components/policy/policy_external/test/json/PTU_with_invalid_requestType_between_correct.json8
-rw-r--r--src/components/policy/policy_external/test/json/PTU_with_one_invalid_requestType.json8
-rw-r--r--src/components/policy/policy_external/test/json/PTU_without_requestType_field.json8
-rw-r--r--src/components/policy/policy_external/test/json/preloadedPT_with_invalid_default_reqestType_between_valid.json8
-rw-r--r--src/components/policy/policy_external/test/json/preloadedPT_with_invalid_default_requestType.json8
-rw-r--r--src/components/policy/policy_external/test/json/preloadedPT_with_several_invalid_default_requestTypes.json8
-rw-r--r--src/components/policy/policy_external/test/json/ptu2_requestType.json8
-rw-r--r--src/components/policy/policy_external/test/json/ptu_requestType.json8
-rw-r--r--src/components/policy/policy_external/test/json/sdl_preloaded_pt.json8
-rw-r--r--src/components/policy/policy_external/test/json/sdl_preloaded_pt1.json8
-rw-r--r--src/components/policy/policy_external/test/json/sdl_preloaded_pt_send_location.json8
-rw-r--r--src/components/policy/policy_external/test/json/sdl_pt_first_update.json8
-rw-r--r--src/components/policy/policy_external/test/json/sdl_pt_second_update.json8
-rw-r--r--src/components/policy/policy_external/test/json/sdl_pt_update.json8
-rw-r--r--src/components/policy/policy_external/test/json/sdl_update_pt_2_groups_have_params.json8
-rw-r--r--src/components/policy/policy_external/test/json/sdl_update_pt_2_groups_no_params_in1.json8
-rw-r--r--src/components/policy/policy_external/test/json/sdl_update_pt_2_groups_no_params_in1_omitted_in2.json8
-rw-r--r--src/components/policy/policy_external/test/json/sdl_update_pt_send_location.json8
-rw-r--r--src/components/policy/policy_external/test/json/sdl_update_pt_send_location_all_params.json8
-rw-r--r--src/components/policy/policy_external/test/json/sdl_update_pt_send_location_no_params.json8
-rw-r--r--src/components/policy/policy_external/test/json/sdl_update_pt_send_location_some_params.json8
-rw-r--r--src/components/policy/policy_external/test/json/valid_sdl_pt_update.json8
-rw-r--r--src/components/policy/policy_regular/CMakeLists.txt5
-rw-r--r--src/components/policy/policy_regular/include/policy/policy_manager_impl.h16
-rw-r--r--src/components/policy/policy_regular/include/policy/policy_table/enums.h2
-rw-r--r--src/components/policy/policy_regular/include/policy/policy_table/types.h6
-rw-r--r--src/components/policy/policy_regular/include/policy/sql_pt_representation.h2
-rw-r--r--src/components/policy/policy_regular/policy_table_interface_ext.xml2
-rw-r--r--src/components/policy/policy_regular/src/policy_manager_impl.cc60
-rw-r--r--src/components/policy/policy_regular/src/policy_table/enums.cc16
-rw-r--r--src/components/policy/policy_regular/src/policy_table/types.cc16
-rw-r--r--src/components/policy/policy_regular/src/policy_table/validation.cc6
-rw-r--r--src/components/policy/policy_regular/src/sql_pt_representation.cc9
-rw-r--r--src/components/policy/policy_regular/test/CMakeLists.txt5
-rw-r--r--src/components/policy/policy_regular/test/PTU.json8
-rw-r--r--src/components/policy/policy_regular/test/PTU2.json8
-rw-r--r--src/components/policy/policy_regular/test/PTU3.json8
-rw-r--r--src/components/policy/policy_regular/test/PTU4.json8
-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.json8
-rw-r--r--src/components/policy/policy_regular/test/ptu_requestType.json8
-rw-r--r--src/components/policy/policy_regular/test/sdl_preloaded_pt.json8
-rw-r--r--src/components/policy/policy_regular/test/sdl_pt_first_update.json8
-rw-r--r--src/components/policy/policy_regular/test/sdl_pt_second_update.json8
-rw-r--r--src/components/policy/policy_regular/test/sdl_pt_update.json8
-rw-r--r--src/components/policy/policy_regular/test/valid_sdl_pt_update.json8
-rw-r--r--src/components/protocol/src/bson_object_keys.cc6
-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.h121
-rw-r--r--src/components/protocol_handler/include/protocol_handler/protocol_packet.h11
-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.cc805
-rw-r--r--src/components/protocol_handler/src/protocol_packet.cc36
-rw-r--r--src/components/protocol_handler/test/incoming_data_handler_test.cc8
-rw-r--r--src/components/protocol_handler/test/protocol_handler_tm_test.cc1230
-rw-r--r--src/components/protocol_handler/test/protocol_header_validator_test.cc8
-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.h355
-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/rpc_base/include/rpc_base/rpc_base.h24
-rw-r--r--src/components/rpc_base/include/rpc_base/rpc_base_dbus_inl.h501
-rw-r--r--src/components/rpc_base/test/CMakeLists.txt13
-rw-r--r--src/components/rpc_base/test/rpc_base_dbus_test.cc682
-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/telemetry_monitor/CMakeLists.txt2
-rw-r--r--src/components/test_main.cc4
-rw-r--r--src/components/transport_manager/CMakeLists.txt21
-rw-r--r--src/components/transport_manager/include/transport_manager/tcp/network_interface_listener.h73
-rw-r--r--src/components/transport_manager/include/transport_manager/tcp/network_interface_listener_impl.h95
-rw-r--r--src/components/transport_manager/include/transport_manager/tcp/platform_specific/linux/platform_specific_network_interface_listener_impl.h228
-rw-r--r--src/components/transport_manager/include/transport_manager/tcp/platform_specific/qnx/platform_specific_network_interface_listener_impl.h102
-rw-r--r--src/components/transport_manager/include/transport_manager/tcp/tcp_client_listener.h53
-rw-r--r--src/components/transport_manager/include/transport_manager/tcp/tcp_transport_adapter.h30
-rw-r--r--src/components/transport_manager/include/transport_manager/transport_adapter/transport_adapter_controller.h12
-rw-r--r--src/components/transport_manager/include/transport_manager/transport_adapter/transport_adapter_impl.h20
-rw-r--r--src/components/transport_manager/include/transport_manager/transport_adapter/transport_adapter_listener.h14
-rw-r--r--src/components/transport_manager/include/transport_manager/transport_adapter/transport_adapter_listener_impl.h14
-rw-r--r--src/components/transport_manager/src/tcp/network_interface_listener_impl.cc74
-rw-r--r--src/components/transport_manager/src/tcp/platform_specific/linux/platform_specific_network_interface_listener.cc704
-rw-r--r--src/components/transport_manager/src/tcp/platform_specific/qnx/platform_specific_network_interface_listener.cc69
-rw-r--r--src/components/transport_manager/src/tcp/tcp_client_listener.cc553
-rw-r--r--src/components/transport_manager/src/tcp/tcp_transport_adapter.cc36
-rw-r--r--src/components/transport_manager/src/transport_adapter/transport_adapter_impl.cc27
-rw-r--r--src/components/transport_manager/src/transport_adapter/transport_adapter_listener_impl.cc24
-rw-r--r--src/components/transport_manager/src/transport_manager_impl.cc12
-rw-r--r--src/components/transport_manager/test/CMakeLists.txt7
-rw-r--r--src/components/transport_manager/test/include/transport_manager/tcp/mock_tcp_client_listener.h66
-rw-r--r--src/components/transport_manager/test/include/transport_manager/transport_adapter/mock_transport_adapter_listener.h2
-rw-r--r--src/components/transport_manager/test/network_interface_listener_test.cc89
-rw-r--r--src/components/transport_manager/test/platform_specific/linux/linux_network_interface_listener_test.cc599
-rw-r--r--src/components/transport_manager/test/tcp_client_listener_test.cc504
-rw-r--r--src/components/transport_manager/test/tcp_transport_adapter_test.cc39
-rw-r--r--src/components/transport_manager/test/transport_adapter_listener_test.cc9
-rw-r--r--src/components/transport_manager/test/transport_adapter_test.cc29
-rw-r--r--src/components/transport_manager/test/transport_manager_default_test.cc12
-rw-r--r--src/components/transport_manager/test/transport_manager_impl_test.cc23
-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
-rw-r--r--tools/cmake/modules/FindDBus.cmake59
-rw-r--r--tools/cmake/modules/FindQt5DBus.cmake10
-rwxr-xr-xtools/infrastructure/check_style.sh15
-rw-r--r--tools/intergen/GenerateInterfaceLibrary.cmake10
-rw-r--r--tools/intergen/cppgen/CMakeLists.txt2
-rw-r--r--tools/intergen/cppgen/include/cppgen/generator_preferences.h5
-rw-r--r--tools/intergen/cppgen/include/cppgen/message_factory_function.h3
-rw-r--r--tools/intergen/cppgen/include/cppgen/struct_type_dbus_serializer.h88
-rw-r--r--tools/intergen/cppgen/src/cppgen/cpp_interface_code_generator.cc3
-rw-r--r--tools/intergen/cppgen/src/cppgen/declaration_generator.cc38
-rw-r--r--tools/intergen/cppgen/src/cppgen/definition_generator.cc29
-rw-r--r--tools/intergen/cppgen/src/cppgen/generator_preferences.cc9
-rw-r--r--tools/intergen/cppgen/src/cppgen/message_factory_function.cc6
-rw-r--r--tools/intergen/cppgen/src/cppgen/module_manager.cc6
-rw-r--r--tools/intergen/cppgen/src/cppgen/struct_type_dbus_serializer.cc177
-rw-r--r--tools/intergen/test/CMakeLists.txt23
-rw-r--r--tools/intergen/test/generated_interface_dbus_tests.cc127
-rw-r--r--tools/intergen/test/test_hmi_interface.xml1095
-rw-r--r--tools/intergen/tool/intergen.cc7
2148 files changed, 119725 insertions, 133336 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..51029d8c7b 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)
@@ -113,9 +112,6 @@ if (HMI_ADAPTER_OPTION)
if (${HMI_ADAPTER_OPTION} STREQUAL "MESSAGEBROKER")
message(STATUS "Jenkins integration: selected HMI adapter MESSAGEBROKER")
set (HMIADAPTER "messagebroker")
- elseif (${HMI_ADAPTER_OPTION} STREQUAL "DBUS")
- message(STATUS "Jenkins integration: selected HMI adapter DBUS")
- set (HMIADAPTER "dbus")
endif()
endif()
@@ -156,11 +152,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 +165,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)
@@ -393,15 +378,6 @@ if (HMI STREQUAL "web" AND NOT DEFINED HMIADAPTER)
set(HMIADAPTER "messagebroker")
endif()
-if (HMIADAPTER STREQUAL "dbus")
- set(HMI_DBUS_API ON)
- add_definitions(-DDBUS_HMIADAPTER)
- add_definitions(-DHMI_DBUS_API)
-
- find_package(DBus REQUIRED)
- set(DBUS_LIBS_DIRECTORY ${DBUS_LIBRARY_DIRS} PARENT_SCOPE)
- message(${DBUS_INCLUDE_DIRS})
-endif()
if (HMIADAPTER STREQUAL "messagebroker")
set(HMI_JSON_API ON)
add_definitions(-DMESSAGEBROKER_HMIADAPTER)
@@ -503,4 +479,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 e41006cca5..80a6fbc88d 100644
--- a/README.md
+++ b/README.md
@@ -65,7 +65,6 @@ The dependencies for SDL Core vary based on the configuration. You can change SD
| Flag | Description | Dependencies |
|------|-------------|--------------|
|Web HMI|Use HTML5 HMI|chromium-browser|
-|DBus|Use DBus HMI Adapter|dbus-1-dev|
|EXTENDED_MEDIA_MODE|Support Video and Audio Streaming|Opengl es2, gstreamer1.0*|
|Bluetooth|Enable bluetooth transport adapter|libbluetooth3, libbluetooth-dev, bluez-tools|
|USB|Enable USB transport adapter|libusb-dev|
diff --git a/src/3rd_party/CMakeLists.txt b/src/3rd_party/CMakeLists.txt
index b97c05f7f9..ae9267e5bb 100644
--- a/src/3rd_party/CMakeLists.txt
+++ b/src/3rd_party/CMakeLists.txt
@@ -44,17 +44,14 @@ if(FORCE_3RD_PARTY)
message(FATAL_ERROR "Please don't turn on both FORCE_3RD_PARTY and NO_REBUILD_3RD_PARTY at the same time.")
else()
set(FORCE_3RD_PARTY_LOGGER ON)
- set(FORCE_3RD_PARTY_DBUS ON)
endif()
endif()
-if(ENABLE_LOG OR HMI_DBUS_API)
+if(ENABLE_LOG)
# --- libexpat
add_subdirectory(expat-2.1.0)
set(EXPAT_LIBS_DIRECTORY ${3RD_PARTY_INSTALL_PREFIX_ARCH}/lib PARENT_SCOPE)
-endif()
-if(ENABLE_LOG)
if(NO_REBUILD_3RD_PARTY_LOGGER)
message(STATUS "Not rebuilding logger.")
else()
@@ -205,6 +202,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 +229,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..a05f4f97a1 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
@@ -63,7 +62,6 @@ include_directories(
${POLICY_GLOBAL_INCLUDE_PATH}/
${COMPONENTS_DIR}/rpc_base/include
${COMPONENTS_DIR}/resumption/include
- ${COMPONENTS_DIR}/dbus/include
${CMAKE_BINARY_DIR}/src/components
${JSONCPP_INCLUDE_DIRECTORY}
${LOG4CXX_INCLUDE_DIRECTORY}
@@ -109,13 +107,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/life_cycle.cc b/src/appMain/life_cycle.cc
index fc8441f28c..b9623d080a 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
@@ -69,10 +70,6 @@ LifeCycle::LifeCycle(const profile::Profile& profile)
#ifdef TELEMETRY_MONITOR
, telemetry_monitor_(NULL)
#endif // TELEMETRY_MONITOR
-#ifdef DBUS_HMIADAPTER
- , dbus_adapter_(NULL)
- , dbus_adapter_thread_(NULL)
-#endif // DBUS_HMIADAPTER
#ifdef MESSAGEBROKER_HMIADAPTER
, mb_adapter_(NULL)
, mb_adapter_thread_(NULL)
@@ -108,7 +105,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 +116,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 +132,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 +144,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 +162,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);
@@ -185,30 +185,6 @@ bool LifeCycle::InitMessageSystem() {
}
#endif // MESSAGEBROKER_HMIADAPTER
-#ifdef DBUS_HMIADAPTER
-/**
- * Initialize DBus component
- * @return true if success otherwise false.
- */
-bool LifeCycle::InitMessageSystem() {
- dbus_adapter_ = new hmi_message_handler::DBusMessageAdapter(hmi_handler_);
-
- hmi_handler_->AddHMIMessageAdapter(dbus_adapter_);
- if (!dbus_adapter_->Init()) {
- LOG4CXX_FATAL(logger_, "Cannot init DBus service!");
- return false;
- }
-
- dbus_adapter_->SubscribeTo();
-
- LOG4CXX_INFO(logger_, "Start DBusMessageAdapter thread!");
- dbus_adapter_thread_ = new std::thread(
- &hmi_message_handler::DBusMessageAdapter::Run, dbus_adapter_);
-
- return true;
-}
-#endif // DBUS_HMIADAPTER
-
namespace {
void sig_handler(int sig) {
switch (sig) {
@@ -250,7 +226,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();
@@ -311,21 +287,6 @@ void LifeCycle::StopComponents() {
LOG4CXX_INFO(logger_, "Destroying HMI Message Handler and MB adapter.");
-#ifdef DBUS_HMIADAPTER
- if (dbus_adapter_) {
- DCHECK_OR_RETURN_VOID(hmi_handler_);
- hmi_handler_->RemoveHMIMessageAdapter(dbus_adapter_);
- dbus_adapter_->Shutdown();
- if (dbus_adapter_thread_ != NULL) {
- dbus_adapter_thread_->join();
- }
- delete dbus_adapter_;
- dbus_adapter_ = NULL;
- delete dbus_adapter_thread_;
- dbus_adapter_thread_ = NULL;
- }
-#endif // DBUS_HMIADAPTER
-
#ifdef MESSAGEBROKER_HMIADAPTER
if (mb_adapter_) {
DCHECK_OR_RETURN_VOID(hmi_handler_);
diff --git a/src/appMain/life_cycle.h b/src/appMain/life_cycle.h
index db18892cd3..0ac2f4047b 100644
--- a/src/appMain/life_cycle.h
+++ b/src/appMain/life_cycle.h
@@ -33,22 +33,16 @@
#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"
-#ifdef DBUS_HMIADAPTER
-#include "hmi_message_handler/dbus_message_adapter.h"
-#endif // DBUS_HMIADAPTER
#if (defined(MESSAGEBROKER_HMIADAPTER) || defined(PASA_HMI))
#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 +59,10 @@ class SecurityManagerImpl;
} // namespace security_manager
#endif // ENABLE_SECURITY
+namespace utils {
+class SystemTimeHandler;
+} // namespace utils
+
namespace main_namespace {
class LifeCycle {
public:
@@ -98,10 +96,6 @@ class LifeCycle {
#ifdef TELEMETRY_MONITOR
telemetry_monitor::TelemetryMonitor* telemetry_monitor_;
#endif // TELEMETRY_MONITOR
-#ifdef DBUS_HMIADAPTER
- hmi_message_handler::DBusMessageAdapter* dbus_adapter_;
- std::thread* dbus_adapter_thread_;
-#endif // DBUS_HMIADAPTER
#ifdef MESSAGEBROKER_HMIADAPTER
hmi_message_handler::MessageBrokerAdapter* mb_adapter_;
diff --git a/src/appMain/sdl_preloaded_pt.json b/src/appMain/sdl_preloaded_pt.json
index e58021bb08..dc3bf10f8c 100644
--- a/src/appMain/sdl_preloaded_pt.json
+++ b/src/appMain/sdl_preloaded_pt.json
@@ -345,6 +345,7 @@
"LIMITED"],
"parameters": ["accPedalPosition",
"beltStatus",
+ "electronicParkBrakeStatus",
"driverBraking",
"myKey",
"prndl",
@@ -357,6 +358,7 @@
"LIMITED"],
"parameters": ["accPedalPosition",
"beltStatus",
+ "electronicParkBrakeStatus",
"driverBraking",
"myKey",
"prndl",
@@ -369,6 +371,7 @@
"LIMITED"],
"parameters": ["accPedalPosition",
"beltStatus",
+ "electronicParkBrakeStatus",
"driverBraking",
"myKey",
"prndl",
@@ -381,6 +384,7 @@
"LIMITED"],
"parameters": ["accPedalPosition",
"beltStatus",
+ "electronicParkBrakeStatus",
"driverBraking",
"myKey",
"prndl",
@@ -401,6 +405,7 @@
"engineOilLife",
"engineTorque",
"externalTemperature",
+ "turnSignal",
"fuelLevel",
"fuelLevel_State",
"headLampStatus",
@@ -420,6 +425,7 @@
"engineOilLife",
"engineTorque",
"externalTemperature",
+ "turnSignal",
"fuelLevel",
"fuelLevel_State",
"headLampStatus",
@@ -439,6 +445,7 @@
"engineOilLife",
"engineTorque",
"externalTemperature",
+ "turnSignal",
"fuelLevel",
"fuelLevel_State",
"headLampStatus",
@@ -457,6 +464,7 @@
"engineOilLife",
"engineTorque",
"externalTemperature",
+ "turnSignal",
"fuelLevel",
"fuelLevel_State",
"headLampStatus",
@@ -547,6 +555,12 @@
"FULL",
"LIMITED",
"NONE"]
+ },
+ "OnRCStatus": {
+ "hmi_levels": ["BACKGROUND",
+ "FULL",
+ "LIMITED",
+ "NONE"]
}
}
},
@@ -2374,4 +2388,3 @@
}
}
}
-
diff --git a/src/appMain/smartDeviceLink.ini b/src/appMain/smartDeviceLink.ini
index d201a0736e..444affc06c 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
@@ -187,6 +190,9 @@ OpenAttemptTimeoutMs = 500
[TransportManager]
; Listening port form incoming TCP mobile connection
TCPAdapterPort = 12345
+; Name of the network interface that Core will listen on for incoming TCP connection, e.g. eth0.
+; If the name is omitted, Core will listen on all network interfaces by binding to INADDR_ANY.
+TCPAdapterNetworkInterface =
[ProtocolHandler]
; SDL supported protocol version
@@ -231,16 +237,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
@@ -261,6 +267,57 @@ AttemptsToOpenResumptionDB = 5
; Timeout between attempts during opening DB in milliseconds
OpenAttemptTimeoutMsResumptionDB = 500
+[TransportRequiredForResumption]
+; This section specifies transport types that are required to trigger resumption for each
+; AppHMIType. App has to be connected through at least one of the transports listed (either as
+; the primary transport or secondary transport) to trigger resumption. If the app is not
+; connected with any of the transports listed, its HMIlevel will be kept in NONE and the state
+; stays in NOT_AUDIBLE.
+; In case an app has multiple AppHMIType, requirements of all of the AppHMITypes are applied.
+;
+; Possible AppHMITypes: Default, Communication, Media, Messaging, Navigation, Information,
+; Social, BackgroundProcess, Testing, System, Projection, RemoteControl,
+; EmptyApp
+; Possible transport types: TCP_WIFI, IAP_CARPLAY, IAP_USB_HOST_MODE, IAP_USB_DEVICE_MODE,
+; IAP_USB, AOA_USB, IAP_BLUETOOTH, SPP_BLUETOOTH
+;
+; The default behavior is to always enable resumption. If an AppHMIType is not listed in this
+; section, resumption is enabled for an app with the AppHMIType.
+; On the other hand, if you want to disable resumption and always keep an app in NONE and
+; NOT_AUDIBLE state after registration, specify an empty value for the AppHMIType.
+;
+; NAVIGATION apps, PROJECTION apps and apps that declare themselves as media apps have a
+; special exception. When these apps do not have any of the transports listed here, they will
+; be still resumed into particular HMIlevel defined in LowBandwidthTransportResumptionLevel
+; section.
+
+;DefaultTransportRequiredForResumption =
+;CommunicationTransportRequiredForResumption =
+;MediaTransportRequiredForResumption =
+;MessagingTransportRequiredForResumption =
+;NavigationTransportRequiredForResumption =
+;InformationTransportRequiredForResumption =
+;SocialTransportRequiredForResumption =
+;BackgroundProcessTransportRequiredForResumption =
+;TestingTransportRequiredForResumption =
+;SystemTransportRequiredForResumption =
+;ProjectionTransportRequiredForResumption =
+;RemoteControlTransportRequiredForResumption =
+; "EmptyAppTransportRequiredForResumption" applies to apps that don't specify any AppHMIType
+;EmptyAppTransportRequiredForResumption =
+
+[LowBandwidthTransportResumptionLevel]
+; The HMI Level that an app will resume to if no high bandwidth connection is active.
+; High bandwidth connections for each app type are defined under TransportRequiredForResumption
+; section.
+; Possible values: NONE, BACKGROUND, LIMITED and FULL
+; this is for NAVIGATION apps
+;NavigationLowBandwidthResumptionLevel =
+; this is for PROJECTION apps
+;ProjectionLowBandwidthResumptionLevel =
+; this is for apps who declare themselves as media apps. (Don't be confused with AppHMIType=MEDIA.)
+;MediaLowBandwidthResumptionLevel =
+
[AppLaunch]
; time in milliseconds started from device connection - after expiring SDL remotely launches all known not-yet-registered apps from this device
AppLaunchWaitTime = 5000
@@ -274,5 +331,27 @@ 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
+
+[MultipleTransports]
+; Whether multiple-transports feature is enabled
+;MultipleTransportsEnabled = true
+
+; Comma-separated list of transports that can be used as Secondary Transport for each Primary Transport.
+; Possible values are: WiFi, USB and Bluetooth.
+; Core will not suggest Secondary Transport if the value is empty.
+;SecondaryTransportForBluetooth = WiFi
+;SecondaryTransportForUSB =
+;SecondaryTransportForWiFi =
+
+[ServicesMap]
+; A matrix to specify which service is allowed on which transports. The transports are listed
+; in preferred order. If a transport is not listed, then the service is not allowed
+; to run on the transport.
+; Only video and audio services are configurable.
+; If the entry of a service is completely omitted, the service will be allowed on all transports.
+; Possible values are: IAP_BLUETOOTH, IAP_USB, IAP_USB_HOST_MODE, IAP_USB_DEVICE_MODE, IAP_CARPLAY, SPP_BLUETOOTH, AOA_USB and TCP_WIFI.
+; Note: this configuration is applied even if multiple-transports feature is not enabled.
+;AudioServiceTransports = TCP_WIFI, IAP_CARPLAY, IAP_USB_HOST_MODE, IAP_USB_DEVICE_MODE, IAP_USB, AOA_USB
+;VideoServiceTransports = TCP_WIFI, IAP_CARPLAY, IAP_USB_HOST_MODE, IAP_USB_DEVICE_MODE, IAP_USB, AOA_USB
diff --git a/src/components/CMakeLists.txt b/src/components/CMakeLists.txt
index e1071e826f..f262f201c2 100644
--- a/src/components/CMakeLists.txt
+++ b/src/components/CMakeLists.txt
@@ -86,18 +86,8 @@ 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)
endif()
-
-# --- DBus
-if(HMI_DBUS_API)
- add_subdirectory(./dbus)
-endif()
diff --git a/src/components/application_manager/CMakeLists.txt b/src/components/application_manager/CMakeLists.txt
index e9f2f8ec7b..67a7136a62 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,283 +115,10 @@ 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
-)
-
-if (${HMI_JSON_API})
- set (HMI_COMMANDS_SOURCES ${HMI_COMMANDS_SOURCES} ${HMI_COMMANDS_SOURCES_JSON})
-endif (${HMI_JSON_API})
-
-set (HMI_COMMANDS_SOURCES ${HMI_COMMANDS_SOURCES} ${HMI_COMMANDS_SOURCES_DBUS})
+collect_sources(POLICIES_SOURCES "${POLICIES_PATHS}")
set(EXCLUDE_PATHS
- ${COMMANDS_SOURCE_DIR}
${EVENT_ENGINE_SOURCE_DIR}
${MESSAGE_HELPER_SOURCE_DIR}
${POLICIES_SOURCE_DIR}
@@ -400,11 +130,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 +145,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 +160,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/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 cd3b31ce75..df5819c1eb 100644
--- a/src/components/application_manager/include/application_manager/application.h
+++ b/src/components/application_manager/include/application_manager/application.h
@@ -160,11 +160,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;
@@ -185,7 +180,6 @@ 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;
@@ -457,6 +451,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;
@@ -543,6 +551,12 @@ class Application : public virtual InitialApplicationData,
const = 0;
virtual const std::string& app_icon_path() const = 0;
virtual connection_handler::DeviceHandle device() const = 0;
+ /**
+ * @brief Returns handle of the device on which secondary transport of this
+ * app is running
+ * @return handle of the device on which secondary transport is running
+ */
+ virtual connection_handler::DeviceHandle secondary_device() const = 0;
/**
* @brief sets true if application has sent TTS GlobalProperties
@@ -580,6 +594,13 @@ class Application : public virtual InitialApplicationData,
virtual void set_app_allowed(const bool allowed) = 0;
DEPRECATED virtual void set_device(
connection_handler::DeviceHandle device) = 0;
+ /**
+ * @brief Sets the handle of the device on which secondary transport of this
+ * app is running
+ * @param handle of the device on which secondary transport is running
+ */
+ virtual void set_secondary_device(
+ connection_handler::DeviceHandle secondary_device) = 0;
virtual uint32_t get_grammar_id() const = 0;
virtual void set_grammar_id(uint32_t value) = 0;
@@ -590,6 +611,24 @@ class Application : public virtual InitialApplicationData,
virtual void set_is_resuming(bool is_resuming) = 0;
virtual bool is_resuming() const = 0;
+ /**
+ * @brief Remembers the HMI level which the app would resume into if high-
+ * bandwidth transport were available.
+ * @param level The HMI level which the app would resume into. Specify
+ * INVALID_ENUM to clear the state.
+ */
+ virtual void set_deferred_resumption_hmi_level(
+ mobile_api::HMILevel::eType level) = 0;
+ /**
+ * @brief Returns the HMI level which the app would resume into if high-
+ * bandwidth transport were available.
+ *
+ * A value of INVALID_ENUM indicates that the app does not have deferred
+ * HMI level.
+ * @return HMI level which the app would resume into
+ */
+ virtual mobile_api::HMILevel::eType deferred_resumption_hmi_level() const = 0;
+
virtual bool AddFile(const AppFile& file) = 0;
virtual const AppFilesMap& getAppFiles() const = 0;
@@ -611,10 +650,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
*/
@@ -847,7 +882,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
@@ -890,16 +924,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 dc9be4e1d8..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
@@ -275,13 +275,14 @@ class DynamicApplicationDataImpl : public virtual Application {
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_;
@@ -295,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 e033570435..809e8b5764 100644
--- a/src/components/application_manager/include/application_manager/application_impl.h
+++ b/src/components/application_manager/include/application_manager/application_impl.h
@@ -41,7 +41,7 @@
#include <forward_list>
#include <stdint.h>
-#include "utils/date_time.h"
+#include "application_manager/application.h"
#include "application_manager/application_data_impl.h"
#include "application_manager/usage_statistics.h"
#include "application_manager/hmi_state.h"
@@ -53,6 +53,7 @@
#include "utils/custom_string.h"
#include "utils/timer.h"
#include "utils/macro.h"
+#include "utils/date_time.h"
namespace usage_statistics {
@@ -121,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;
@@ -171,6 +176,7 @@ class ApplicationImpl : public virtual Application,
const;
const std::string& app_icon_path() const;
connection_handler::DeviceHandle device() const;
+ connection_handler::DeviceHandle secondary_device() const;
const std::string& mac_address() const OVERRIDE;
const std::string& bundle_id() const OVERRIDE;
void set_bundle_id(const std::string& bundle_id) OVERRIDE;
@@ -187,6 +193,7 @@ class ApplicationImpl : public virtual Application,
bool set_app_icon_path(const std::string& path);
void set_app_allowed(const bool allowed);
void set_device(connection_handler::DeviceHandle device);
+ void set_secondary_device(connection_handler::DeviceHandle secondary_device);
virtual uint32_t get_grammar_id() const;
virtual void set_grammar_id(uint32_t value);
bool is_audio() const OVERRIDE;
@@ -198,6 +205,24 @@ class ApplicationImpl : public virtual Application,
virtual void set_is_resuming(bool is_resuming);
virtual bool is_resuming() const;
+ /**
+ * @brief Remembers the HMI level which the app would resume into if high-
+ * bandwidth transport were available.
+ * @param level The HMI level which the app would resume into. Specify
+ * INVALID_ENUM to clear the state.
+ */
+ void set_deferred_resumption_hmi_level(
+ mobile_api::HMILevel::eType level) OVERRIDE;
+ /**
+ * @brief Returns the HMI level which the app would resume into if high-
+ * bandwidth transport were available.
+ *
+ * A value of INVALID_ENUM indicates that the app does not have deferred
+ * HMI level.
+ * @return HMI level which the app would resume into
+ */
+ mobile_api::HMILevel::eType deferred_resumption_hmi_level() const OVERRIDE;
+
bool AddFile(const AppFile& file);
bool UpdateFile(const AppFile& file);
bool DeleteFile(const std::string& file_name);
@@ -209,10 +234,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;
/**
@@ -358,7 +379,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
@@ -377,20 +397,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;
@@ -425,7 +431,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
@@ -440,11 +447,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_;
@@ -456,6 +459,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_;
@@ -466,6 +470,7 @@ class ApplicationImpl : public virtual Application,
bool audio_streaming_suspended_;
sync_primitives::Lock video_streaming_suspended_lock_;
sync_primitives::Lock audio_streaming_suspended_lock_;
+ sync_primitives::Lock streaming_stop_lock_;
bool is_app_allowed_;
bool has_been_activated_;
@@ -479,14 +484,15 @@ class ApplicationImpl : public virtual Application,
std::string app_icon_path_;
std::string mac_address_;
connection_handler::DeviceHandle device_id_;
+ connection_handler::DeviceHandle secondary_device_id_;
std::string bundle_id_;
AppFilesMap app_files_;
std::set<mobile_apis::ButtonName::eType> subscribed_buttons_;
- VehicleInfoSubscriptions subscribed_vehicle_info_;
UsageStatistics usage_report_;
protocol_handler::MajorProtocolVersion protocol_version_;
bool is_voice_communication_application_;
sync_primitives::atomic_bool is_resuming_;
+ mobile_api::HMILevel::eType deferred_resumption_hmi_level_;
bool is_hash_changed_during_suspend_;
uint32_t video_stream_retry_number_;
@@ -496,9 +502,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
@@ -519,8 +523,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_;
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 d77f2316a7..211376ab1c 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;
@@ -689,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);
/*
@@ -720,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
@@ -744,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(
@@ -795,6 +671,10 @@ class ApplicationManagerImpl
const int32_t& session_key,
const protocol_handler::ServiceType& type,
const connection_handler::CloseSessionReason& close_reason) OVERRIDE;
+ void OnSecondaryTransportStartedCallback(
+ const connection_handler::DeviceHandle device_handle,
+ const int32_t session_key) OVERRIDE;
+ void OnSecondaryTransportEndedCallback(const int32_t session_key) OVERRIDE;
/**
* @brief Check if application with specified app_id has NAVIGATION HMI type
@@ -815,6 +695,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;
@@ -936,6 +822,18 @@ class ApplicationManagerImpl
ApplicationConstSharedPtr application) const;
/**
+ * @brief Checks if required transport for resumption is available
+ *
+ * The required transport can be configured through smartDeviceLink.ini file.
+ *
+ * @param application an instance of the app to check
+ * @return true if the app is connected through one of the required
+ * transports, false otherwise
+ */
+ bool CheckResumptionRequiredTransportAvailable(
+ ApplicationConstSharedPtr application) const;
+
+ /**
* Getter for resume_controller
* @return Resume Controller
*/
@@ -1046,15 +944,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
*/
@@ -1217,6 +1129,12 @@ class ApplicationManagerImpl
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.
@@ -1238,6 +1156,14 @@ class ApplicationManagerImpl
mobile_apis::AppHMIType::eType StringToAppHMIType(std::string str);
/**
+ * @brief Returns a string representation of AppHMIType
+ * @param type an enum value of AppHMIType
+ * @return string representation of the enum value
+ */
+ const std::string AppHMITypeToString(
+ mobile_apis::AppHMIType::eType type) const;
+
+ /**
* @brief Method compares arrays of app HMI type
* @param from_policy contains app HMI type from policy
* @param from_application contains app HMI type from application
@@ -1249,40 +1175,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,
@@ -1454,12 +1349,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.
@@ -1531,6 +1420,15 @@ class ApplicationManagerImpl
const std::string& mac_address);
/**
+ * @brief Converts device handle to transport type string used in
+ * smartDeviceLink.ini file, e.g. "TCP_WIFI"
+ * @param device_handle A device handle
+ * @return string representation of the transport of the device
+ */
+ const std::string GetTransportTypeProfileString(
+ connection_handler::DeviceHandle device_handle) const;
+
+ /**
* @brief Converts BSON object containing video parameters to
* smart object's map object
* @param output the smart object to add video parameters
@@ -1558,8 +1456,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_;
/**
@@ -1595,9 +1494,7 @@ class ApplicationManagerImpl
std::unique_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
@@ -1616,7 +1513,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_;
@@ -1624,19 +1520,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::unique_ptr<HMICapabilities> hmi_capabilities_;
// The reason of HU shutdown
mobile_api::AppInterfaceUnregisteredReason::eType unregister_reason_;
@@ -1659,7 +1542,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::unique_ptr<app_launch::AppLaunchData> app_launch_dto_;
std::unique_ptr<app_launch::AppLaunchCtrl> app_launch_ctrl_;
@@ -1673,6 +1556,12 @@ class ApplicationManagerImpl
mutable sync_primitives::Lock reregister_wait_list_lock_;
+ // This is a cache to remember DeviceHandle of secondary transports. Only used
+ // during RegisterApplication().
+ typedef std::map<int32_t, connection_handler::DeviceHandle> DeviceMap;
+
+ DeviceMap secondary_transport_devices_cache_;
+
#ifdef TELEMETRY_MONITOR
AMTelemetryObserver* metric_observer_;
#endif // TELEMETRY_MONITOR
@@ -1689,6 +1578,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:
/**
@@ -1705,6 +1597,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/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..9559c2007e 100644
--- a/src/components/application_manager/include/application_manager/message_helper.h
+++ b/src/components/application_manager/include/application_manager/message_helper.h
@@ -72,7 +72,23 @@ typedef std::map<std::string, mobile_apis::VehicleDataType::eType> VehicleData;
class MessageHelper {
public:
/**
- * @brief Creates request for different interfaces(JSON, DBUS)
+ * @brief CreateNotification creates basic mobile notification smart object
+ * @param function_id Notification function ID
+ * @param app_id application to send notification
+ * @return basic mobile notification smart object
+ */
+ static smart_objects::SmartObjectSPtr CreateNotification(
+ mobile_apis::FunctionID::eType function_id, uint32_t app_id);
+ /**
+ * @brief CreateHMINotification creates basic hmi notification smart object
+ * @param function_id Notification function ID
+ * @return basic hmi notification smart object
+ */
+ static smart_objects::SmartObjectSPtr CreateHMINotification(
+ hmi_apis::FunctionID::eType function_id);
+
+ /**
+ * @brief Creates request for different interfaces(JSON)
* @param correlation_id unique ID
* @param params Vector of arguments that we need in GetVehicleData request
* (e.g. gps, odometer, fuel_level)
@@ -107,6 +123,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 +242,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
*/
@@ -291,6 +302,24 @@ class MessageHelper {
ApplicationManager& app_mngr);
/*
+ * @brief Create Common.DeviceInfo struct from device handle
+ * @param device_handle device handle of the app
+ * @param session_observer instance of SessionObserver to retrieve device
+ * information
+ * @param policy_handler instance of PolicyHandlerInterface to get the value
+ * of 'isSDLAllowed'
+ * @param app_mngr instance of ApplicationManager
+ * @param output smart object to store created Common.DeviceInfo struct
+ * @return true on success, false otherwise
+ */
+ static bool CreateDeviceInfo(
+ connection_handler::DeviceHandle device_handle,
+ const protocol_handler::SessionObserver& session_observer,
+ const policy::PolicyHandlerInterface& policy_handler,
+ ApplicationManager& app_mngr,
+ smart_objects::SmartObject* output);
+
+ /*
* @brief Create Common.HMIApplication struct application instance
* @param app : applicaton instace
* @param output smart object to store Common.HMIApplication struct
@@ -549,6 +578,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 +823,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 +844,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 +855,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 73a05b370e..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;
@@ -627,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
@@ -637,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/resumption/resume_ctrl.h b/src/components/application_manager/include/application_manager/resumption/resume_ctrl.h
index 0ec58f2419..6d26b6a617 100644
--- a/src/components/application_manager/include/application_manager/resumption/resume_ctrl.h
+++ b/src/components/application_manager/include/application_manager/resumption/resume_ctrl.h
@@ -158,6 +158,13 @@ class ResumeCtrl {
app_mngr::ApplicationSharedPtr application) = 0;
/**
+ * @brief Retry resumption of an app if it has been disabled or limited
+ * due to absence of high-bandwidth transport.
+ * @param app_id ID of the app to resume
+ */
+ virtual void RetryResumption(const uint32_t app_id) = 0;
+
+ /**
* @brief Check if there are all files need for resumption
* @param application that is need to be restored
* @return true if it all files exist, otherwise return false
@@ -264,6 +271,8 @@ class ResumeCtrl {
#ifdef BUILD_TESTS
virtual void set_resumption_storage(
utils::SharedPtr<ResumptionData> mock_storage) = 0;
+
+ virtual bool get_resumption_active() const = 0;
#endif // BUILD_TESTS
};
diff --git a/src/components/application_manager/include/application_manager/resumption/resume_ctrl_impl.h b/src/components/application_manager/include/application_manager/resumption/resume_ctrl_impl.h
index d7ff621c95..9e084af66b 100644
--- a/src/components/application_manager/include/application_manager/resumption/resume_ctrl_impl.h
+++ b/src/components/application_manager/include/application_manager/resumption/resume_ctrl_impl.h
@@ -178,6 +178,13 @@ class ResumeCtrlImpl : public ResumeCtrl,
app_mngr::ApplicationSharedPtr application) OVERRIDE;
/**
+ * @brief Retry resumption of an app if it has been disabled or limited
+ * due to absence of high-bandwidth transport.
+ * @param app_id ID of the app to resume
+ */
+ void RetryResumption(const uint32_t app_id) OVERRIDE;
+
+ /**
* @brief Check if there are all files need for resumption
* @param application that is need to be restored
* @return true if it all files exist, otherwise return false
@@ -298,6 +305,8 @@ class ResumeCtrlImpl : public ResumeCtrl,
#ifdef BUILD_TESTS
void set_resumption_storage(
utils::SharedPtr<ResumptionData> mock_storage) OVERRIDE;
+
+ bool get_resumption_active() const OVERRIDE;
#endif // BUILD_TESTS
private:
/**
@@ -500,6 +509,19 @@ class ResumeCtrlImpl : public ResumeCtrl,
const application_manager::ApplicationSharedPtr application) const;
/**
+ * @brief Retrieve the HMI level of the app when high-bandwidth transport
+ *isn't available
+ *
+ * The value is configured through smartDeviceLink.ini file
+ *
+ * @param application an instance of the app
+ * @return HMI level that the app is allowed when high-bandwidth transport
+ *isn't available
+ */
+ mobile_apis::HMILevel::eType GetHmiLevelOnLowBandwidthTransport(
+ app_mngr::ApplicationConstSharedPtr application) const;
+
+ /**
*@brief Mapping applications to time_stamps
* wait for timer to resume HMI Level
*
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 ce5b68ee3c..991937f11f 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
@@ -218,6 +218,7 @@ extern const char* did_location;
extern const char* app_list;
extern const char* device_list;
extern const char* device_info;
+extern const char* secondary_device_info;
extern const char* name;
extern const char* id;
extern const char* isSDLAllowed;
@@ -254,11 +255,13 @@ 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;
extern const char* odometer;
extern const char* belt_status;
+extern const char* electronic_park_brake_status;
extern const char* body_information;
extern const char* device_status;
extern const char* driver_braking;
@@ -422,7 +425,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;
@@ -495,7 +510,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/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..181c536b8a
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/rc_rpc_plugin/include/rc_rpc_plugin/rc_module_constants.h
@@ -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.
+ */
+
+#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
+
+// OnRCStatusNotification
+const char kAllocatedModules[] = "allocatedModules";
+const char kFreeModules[] = "freeModules";
+// OnRCStatusNotification
+
+// 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..98da8bc27d
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/rc_rpc_plugin/include/rc_rpc_plugin/resource_allocation_manager.h
@@ -0,0 +1,161 @@
+/*
+ Copyright (c) 2018, Ford Motor Company
+ All rights reserved.
+
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions are met:
+
+ Redistributions of source code must retain the above copyright notice, this
+ list of conditions and the following disclaimer.
+
+ Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions and the following
+ disclaimer in the documentation and/or other materials provided with the
+ distribution.
+
+ Neither the name of the Ford Motor Company nor the names of its contributors
+ may be used to endorse or promote products derived from this software
+ without specific prior written permission.
+
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+ LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR 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;
+
+ /**
+ * @brief Create and send OnRCStatusNotification to mobile and HMI
+ * @param application
+ */
+ virtual void SendOnRCStatusNotification() = 0;
+
+ virtual bool is_rc_enabled() const = 0;
+
+ virtual void set_rc_enabled(const bool value) = 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..4c72e9ea2c
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/rc_rpc_plugin/include/rc_rpc_plugin/resource_allocation_manager_impl.h
@@ -0,0 +1,232 @@
+/*
+ Copyright (c) 2018, Ford Motor Company
+ All rights reserved.
+
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions are met:
+
+ Redistributions of source code must retain the above copyright notice, this
+ list of conditions and the following disclaimer.
+
+ Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions and the following
+ disclaimer in the documentation and/or other materials provided with the
+ distribution.
+
+ Neither the name of the Ford Motor Company nor the names of its contributors
+ may be used to endorse or promote products derived from this software
+ without specific prior written permission.
+
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+ LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR 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;
+
+ void SendOnRCStatusNotification() FINAL;
+
+ bool is_rc_enabled() const FINAL;
+
+ void set_rc_enabled(const bool value) FINAL;
+
+ private:
+ typedef std::vector<application_manager::ApplicationSharedPtr> Apps;
+
+ /**
+ * @brief Create OnRCStatusNotification creates OnRCStatus notification smart
+ * object for mobile application
+ * @param app_id application to send OnRCStatusNotification
+ * @return smart object with mobile OnRCStatusNotification
+ */
+ smart_objects::SmartObjectSPtr CreateOnRCStatusNotificationToMobile(
+ const application_manager::ApplicationSharedPtr app);
+
+ smart_objects::SmartObjectSPtr CreateOnRCStatusNotificationToHmi(
+ const application_manager::ApplicationSharedPtr app);
+
+ /**
+ * @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_;
+ bool is_rc_enabled_;
+};
+} // 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..dda59ea296
--- /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,159 @@
+/*
+ Copyright (c) 2018, Ford Motor Company
+ All rights reserved.
+
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions are met:
+
+ Redistributions of source code must retain the above copyright notice, this
+ list of conditions and the following disclaimer.
+
+ Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions and the following
+ disclaimer in the documentation and/or other materials provided with the
+ distribution.
+
+ Neither the name of the Ford Motor Company nor the names of its contributors
+ may be used to endorse or promote products derived from this software
+ without specific prior written permission.
+
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+ LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 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");
+ resource_allocation_manager_.set_rc_enabled(true);
+ 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_.set_rc_enabled(false);
+ 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..e76572c773
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/rc_rpc_plugin/src/commands/mobile/set_interior_vehicle_data_request.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 "rc_rpc_plugin/commands/mobile/set_interior_vehicle_data_request.h"
+#include "rc_rpc_plugin/rc_module_constants.h"
+#include "rc_rpc_plugin/rc_rpc_plugin.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..524e4db7fa
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/rc_rpc_plugin/src/commands/rc_command_request.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 "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 (!resource_allocation_manager_.is_rc_enabled()) {
+ LOG4CXX_WARN(logger_, "Remote control is disabled by user");
+ SetResourceState(ModuleType(), ResourceState::FREE);
+ SendResponse(false,
+ mobile_apis::Result::USER_DISALLOWED,
+ "Remote control is disabled by user");
+ 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..a001e4734f
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/rc_rpc_plugin/src/rc_rpc_plugin.cc
@@ -0,0 +1,131 @@
+/*
+ Copyright (c) 2018, Ford Motor Company
+ All rights reserved.
+
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions are met:
+
+ Redistributions of source code must retain the above copyright notice, this
+ list of conditions and the following disclaimer.
+
+ Redistributions in binary form must reproduce the above copyright notice,
+ 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));
+ if (resource_allocation_manager_->is_rc_enabled()) {
+ resource_allocation_manager_->SendOnRCStatusNotification();
+ }
+ 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();
+} // namespace rc_rpc_plugin
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..1d2dbf8997
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/rc_rpc_plugin/src/resource_allocation_manager_impl.cc
@@ -0,0 +1,522 @@
+/*
+ Copyright (c) 2018, Ford Motor Company
+ All rights reserved.
+
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions are met:
+
+ Redistributions of source code must retain the above copyright notice, this
+ list of conditions and the following disclaimer.
+
+ Redistributions in binary form must reproduce the above copyright notice,
+ 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)
+ , is_rc_enabled_(true) {}
+
+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);
+ }
+ SendOnRCStatusNotification();
+ }
+ }
+}
+
+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();
+ }
+ }
+}
+
+template <typename EnumType>
+EnumType StringToEnum(const std::string& str) {
+ using smart_objects::EnumConversionHelper;
+ EnumType val;
+ EnumConversionHelper<EnumType>::StringToEnum(str, &val);
+ return val;
+}
+
+void ConstructOnRCStatusNotificationParams(
+ smart_objects::SmartObject& msg_params,
+ const std::map<std::string, uint32_t>& allocated_resources,
+ const std::vector<std::string>& supported_resources,
+ const uint32_t app_id) {
+ namespace strings = application_manager::strings;
+ namespace message_params = rc_rpc_plugin::message_params;
+ using smart_objects::SmartObject;
+ using smart_objects::SmartType_Map;
+ using smart_objects::SmartType_Array;
+ LOG4CXX_AUTO_TRACE(logger_);
+
+ auto modules_inserter = [](SmartObject& result_modules) {
+ return [&result_modules](const std::string& module_name) {
+ smart_objects::SmartObject module_data =
+ SmartObject(smart_objects::SmartType_Map);
+ auto module_type =
+ StringToEnum<mobile_apis::ModuleType::eType>(module_name);
+ module_data[message_params::kModuleType] = module_type;
+ result_modules.asArray()->push_back(module_data);
+ };
+ };
+ SmartObject allocated_modules = SmartObject(SmartType_Array);
+ for (const auto& module : allocated_resources) {
+ if (module.second == app_id) {
+ modules_inserter(allocated_modules)(module.first);
+ }
+ }
+ SmartObject free_modules = SmartObject(SmartType_Array);
+ for (auto& module : supported_resources) {
+ if (allocated_resources.find(module) == allocated_resources.end()) {
+ modules_inserter(free_modules)(module);
+ }
+ }
+ msg_params[message_params::kAllocatedModules] = allocated_modules;
+ msg_params[message_params::kFreeModules] = free_modules;
+}
+
+smart_objects::SmartObjectSPtr
+ResourceAllocationManagerImpl::CreateOnRCStatusNotificationToMobile(
+ const application_manager::ApplicationSharedPtr app) {
+ LOG4CXX_AUTO_TRACE(logger_);
+ using application_manager::MessageHelper;
+ auto msg_to_mobile = MessageHelper::CreateNotification(
+ mobile_apis::FunctionID::OnRCStatusID, app->app_id());
+ auto& msg_params = (*msg_to_mobile)[application_manager::strings::msg_params];
+ ConstructOnRCStatusNotificationParams(
+ msg_params, allocated_resources_, all_supported_modules(), app->app_id());
+ return msg_to_mobile;
+}
+
+smart_objects::SmartObjectSPtr
+ResourceAllocationManagerImpl::CreateOnRCStatusNotificationToHmi(
+ const application_manager::ApplicationSharedPtr app) {
+ LOG4CXX_AUTO_TRACE(logger_);
+ using application_manager::MessageHelper;
+ auto msg_to_hmi =
+ MessageHelper::CreateHMINotification(hmi_apis::FunctionID::RC_OnRCStatus);
+ auto& msg_params = (*msg_to_hmi)[application_manager::strings::msg_params];
+ ConstructOnRCStatusNotificationParams(
+ msg_params, allocated_resources_, all_supported_modules(), app->app_id());
+ msg_params[application_manager::strings::app_id] = app->hmi_app_id();
+ return msg_to_hmi;
+}
+
+void ResourceAllocationManagerImpl::SetResourceAquired(
+ const std::string& module_type, const uint32_t app_id) {
+ LOG4CXX_AUTO_TRACE(logger_);
+ allocated_resources_[module_type] = app_id;
+ SendOnRCStatusNotification();
+}
+
+void ResourceAllocationManagerImpl::SendOnRCStatusNotification() {
+ LOG4CXX_AUTO_TRACE(logger_);
+ auto rc_apps = RCRPCPlugin::GetRCApplications(app_mngr_);
+ for (const auto& rc_app : rc_apps) {
+ auto msg_to_mobile = CreateOnRCStatusNotificationToMobile(rc_app);
+ rpc_service_.SendMessageToMobile(msg_to_mobile);
+ auto msg_to_hmi = CreateOnRCStatusNotificationToHmi(rc_app);
+ rpc_service_.SendMessageToHMI(msg_to_hmi);
+ }
+}
+
+bool ResourceAllocationManagerImpl::is_rc_enabled() const {
+ return is_rc_enabled_;
+}
+
+void ResourceAllocationManagerImpl::set_rc_enabled(const bool value) {
+ is_rc_enabled_ = value;
+}
+
+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::all_supported_modules() {
+ std::vector<std::string> result;
+ result.push_back(enums_value::kClimate);
+ result.push_back(enums_value::kRadio);
+ return result;
+}
+
+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());
+ }
+ if (!acquired_modules.empty()) {
+ SendOnRCStatusNotification();
+ }
+ 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..a1f0f5a6ff
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/rc_rpc_plugin/test/CMakeLists.txt
@@ -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 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
+ connectionHandler
+ 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..7ab4819002
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/rc_rpc_plugin/test/commands/button_press_request_test.cc
@@ -0,0 +1,321 @@
+/*
+ * Copyright (c) 2018, Ford Motor Company
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * Redistributions of source code must retain the above copyright notice, this
+ * list of conditions and the following disclaimer.
+ *
+ * Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following
+ * disclaimer in the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * Neither the name of the Ford Motor Company nor the names of its contributors
+ * may be used to endorse or promote products derived from this software
+ * without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+ * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 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));
+ ON_CALL(mock_allocation_manager_, is_rc_enabled())
+ .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..685bc1fd42
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/rc_rpc_plugin/test/commands/get_interior_vehicle_data_request_test.cc
@@ -0,0 +1,240 @@
+/*
+ * Copyright (c) 2018, Ford Motor Company
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * Redistributions of source code must retain the above copyright notice, this
+ * list of conditions and the following disclaimer.
+ *
+ * Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following
+ * disclaimer in the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * Neither the name of the Ford Motor Company nor the names of its contributors
+ * may be used to endorse or promote products derived from this software
+ * without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+ * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 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));
+ ON_CALL(mock_allocation_manager_, is_rc_enabled())
+ .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..c5a8e54c6d
--- /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,241 @@
+/*
+ * Copyright (c) 2018, Ford Motor Company
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * Redistributions of source code must retain the above copyright notice, this
+ * list of conditions and the following disclaimer.
+ *
+ * Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following
+ * disclaimer in the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * Neither the name of the Ford Motor Company nor the names of its contributors
+ * may be used to endorse or promote products derived from this software
+ * without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+ * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR 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));
+ ON_CALL(mock_allocation_manager_, is_rc_enabled())
+ .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..1d5e63e2df
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/rc_rpc_plugin/test/commands/set_interior_vehicle_data_request_test.cc
@@ -0,0 +1,227 @@
+/*
+ * Copyright (c) 2018, Ford Motor Company
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * Redistributions of source code must retain the above copyright notice, this
+ * list of conditions and the following disclaimer.
+ *
+ * Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following
+ * disclaimer in the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * Neither the name of the Ford Motor Company nor the names of its contributors
+ * may be used to endorse or promote products derived from this software
+ * without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+ * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR 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));
+ ON_CALL(mock_allocation_manager_, is_rc_enabled())
+ .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..df0daad0b9
--- /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,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_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());
+ MOCK_METHOD0(SendOnRCStatusNotification, void());
+ MOCK_CONST_METHOD0(is_rc_enabled, bool());
+ MOCK_METHOD1(set_rc_enabled, void(const bool value));
+};
+
+} // 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..1c38c2788d
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/rc_rpc_plugin/test/resource_allocation_manager_impl_test.cc
@@ -0,0 +1,506 @@
+/*
+ * Copyright (c) 2018, Ford Motor Company
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * Redistributions of source code must retain the above copyright notice, this
+ * list of conditions and the following disclaimer.
+ *
+ * Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following
+ * disclaimer in the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * Neither the name of the Ford Motor Company nor the names of its contributors
+ * may be used to endorse or promote products derived from this software
+ * without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+ * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 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));
+
+ OnRCStatusNotificationExpectations();
+ }
+
+ 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);
+
+ void OnRCStatusNotificationExpectations();
+
+ 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));
+}
+
+void RAManagerTest::OnRCStatusNotificationExpectations() {
+ ON_CALL(mock_app_mngr_, application(kAppId1))
+ .WillByDefault(Return(mock_app_1_));
+ ON_CALL(*mock_app_1_, QueryInterface(rc_rpc_plugin::RCRPCPlugin::kRCPluginID))
+ .WillByDefault(Return(app_ext_ptr_));
+ apps_.insert(mock_app_1_);
+ ON_CALL(mock_app_mngr_, applications()).WillByDefault(Return(apps_da_));
+}
+
+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
+ 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_));
+
+ 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_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/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..a9698d36ab
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/navi_audio_start_stream_request.cc
@@ -0,0 +1,192 @@
+/*
+ * Copyright (c) 2018, Ford Motor Company
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * Redistributions of source code must retain the above copyright notice, this
+ * list of conditions and the following disclaimer.
+ *
+ * Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following
+ * disclaimer in the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * Neither the name of the Ford Motor Company nor the names of its contributors
+ * may be used to endorse or promote products derived from this software
+ * without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+ * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING 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() {
+ // see comment in NaviStartStreamRequest
+ unsubscribe_from_event(hmi_apis::FunctionID::Navigation_StartAudioStream);
+}
+
+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..f3d971acba
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/navi_start_stream_request.cc
@@ -0,0 +1,193 @@
+/*
+ * Copyright (c) 2018, Ford Motor Company
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * Redistributions of source code must retain the above copyright notice, this
+ * list of conditions and the following disclaimer.
+ *
+ * Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following
+ * disclaimer in the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * Neither the name of the Ford Motor Company nor the names of its contributors
+ * may be used to endorse or promote products derived from this software
+ * without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+ * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING 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() {
+ // unsubscribe_from_all_events() in EventObserver's destructor isn't enough;
+ // we must unsubscribe before this NaviStartStreamRequest instance is removed
+ unsubscribe_from_event(hmi_apis::FunctionID::Navigation_StartStream);
+}
+
+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..a495423bce
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/on_hmi_status_notification.cc
@@ -0,0 +1,104 @@
+/*
+
+ Copyright (c) 2018, Ford Motor Company
+ All rights reserved.
+
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions are met:
+
+ Redistributions of source code must retain the above copyright notice, this
+ list of conditions and the following disclaimer.
+
+ Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions and the following
+ disclaimer in the documentation and/or other materials provided with the
+ distribution.
+
+ Neither the name of the Ford Motor Company nor the names of its contributors
+ may be used to endorse or promote products derived from this software
+ without specific prior written permission.
+
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+ LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ ARISING 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_BACKGROUND == hmi_level) ||
+ (mobile_apis::HMILevel::HMI_NONE == hmi_level)) {
+ if (!(app->tts_properties_in_none())) {
+ app->set_tts_properties_in_none(true);
+ LOG4CXX_INFO(logger_,
+ "OnHMIStatusNotification::Send TTS GlobalProperties"
+ " with empty array to HMI");
+ MessageHelper::SendTTSGlobalProperties(app, false, application_manager_);
+ }
+ } else 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..20302be585
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/register_app_interface_request.cc
@@ -0,0 +1,1375 @@
+/*
+
+ Copyright (c) 2018, Ford Motor Company
+ All rights reserved.
+
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions are met:
+
+ Redistributions of source code must retain the above copyright notice, this
+ list of conditions and the following disclaimer.
+
+ Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions and the following
+ disclaimer in the documentation and/or other materials provided with the
+ distribution.
+
+ Neither the name of the Ford Motor Company nor the names of its contributors
+ may be used to endorse or promote products derived from this software
+ without specific prior written permission.
+
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+ LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ ARISING 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);
+ }
+
+ const protocol_handler::SessionObserver& session_observer =
+ application_manager_.connection_handler().get_session_observer();
+
+ application[strings::device_info] = SmartObject(SmartType_Map);
+ smart_objects::SmartObject& device_info = application[strings::device_info];
+ MessageHelper::CreateDeviceInfo(application_impl.device(),
+ session_observer,
+ GetPolicyHandler(),
+ application_manager_,
+ &device_info);
+
+ if (application_impl.secondary_device() != 0) {
+ application[strings::secondary_device_info] = SmartObject(SmartType_Map);
+ smart_objects::SmartObject& secondary_device_info =
+ application[strings::secondary_device_info];
+ MessageHelper::CreateDeviceInfo(application_impl.secondary_device(),
+ session_observer,
+ GetPolicyHandler(),
+ application_manager_,
+ &secondary_device_info);
+ }
+
+ 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..90ec06025e
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/set_global_properties_request.cc
@@ -0,0 +1,610 @@
+/*
+ Copyright (c) 2018, Ford Motor Company
+ All rights reserved.
+
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions are met:
+
+ Redistributions of source code must retain the above copyright notice, this
+ list of conditions and the following disclaimer.
+
+ Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions and the following
+ disclaimer in the documentation and/or other materials provided with the
+ distribution.
+
+ Neither the name of the Ford Motor Company nor the names of its contributors
+ may be used to endorse or promote products derived from this software
+ without specific prior written permission.
+
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+ LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 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);
+ } 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);
+
+ if (ValidateVRHelpTitle(app->vr_help_title())) {
+ LOG4CXX_DEBUG(logger_, "App already contains VRHelp data");
+ } else {
+ if (!PrepareUIRequestDefaultVRHelpData(app, params)) {
+ LOG4CXX_ERROR(logger_, "default VRHElp data could not be generated");
+ SendResponse(false, mobile_apis::Result::INVALID_DATA);
+ return;
+ }
+ }
+ 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);
+ }
+}
+
+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();
+
+ 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_);
+ 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_);
+ 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);
+
+ // TODO{ALeshin} APPLINK-15858. connection_key removed during SendResponse
+ ApplicationSharedPtr application =
+ application_manager_.application(connection_key());
+
+ 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..c510315ad8
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/hmi_command_factory.cc
@@ -0,0 +1,847 @@
+/*
+ Copyright (c) 2018, Ford Motor Company
+ All rights reserved.
+
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions are met:
+
+ Redistributions of source code must retain the above copyright notice, this
+ list of conditions and the following disclaimer.
+
+ Redistributions in binary form must reproduce the above copyright notice,
+ 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
+
+#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>();
+ }
+ 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>();
+ }
+ 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..8cb5e97891
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/hmi/activate_app_request_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 "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..b8b84f13c9
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/hmi/dummy_hmi_commands_test.cc
@@ -0,0 +1,541 @@
+/*
+ * Copyright (c) 2018, Ford Motor Company
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * Redistributions of source code must retain the above copyright notice, this
+ * list of conditions and the following disclaimer.
+ *
+ * Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following
+ * disclaimer in the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * Neither the name of the Ford Motor Company nor the names of its contributors
+ * may be used to endorse or promote products derived from this software
+ * without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+ * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * 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/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::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..245bb72860
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/hmi/hmi_notifications_test.cc
@@ -0,0 +1,1859 @@
+/*
+ * Copyright (c) 2018, Ford Motor Company
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * Redistributions of source code must retain the above copyright notice, this
+ * list of conditions and the following disclaimer.
+ *
+ * Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following
+ * disclaimer in the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * Neither the name of the Ford Motor Company nor the names of its contributors
+ * may be used to endorse or promote products derived from this software
+ * without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+ * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 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_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 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..034fff73d7
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/mobile/on_hmi_status_notification_test.cc
@@ -0,0 +1,205 @@
+/*
+ * Copyright (c) 2018, Ford Motor Company
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * Redistributions of source code must retain the above copyright notice, this
+ * list of conditions and the following disclaimer.
+ *
+ * Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following
+ * disclaimer in the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * Neither the name of the Ford Motor Company nor the names of its contributors
+ * may be used to endorse or promote products derived from this software
+ * without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+ * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 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_BackgroundAndFalseProperties_SUCCESS) {
+ MessageSharedPtr msg = CreateMsgParams(mobile_apis::HMILevel::HMI_BACKGROUND);
+ SetSendNotificationExpectations(msg);
+
+ 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_none()).WillOnce(Return(false));
+ EXPECT_CALL(*mock_app, set_tts_properties_in_none(true));
+ EXPECT_CALL(mock_message_helper_, SendTTSGlobalProperties(_, false, _));
+
+ command->Run();
+
+ VerifySendNotificationData(msg);
+}
+
+TEST_F(OnHMIStatusNotificationTest, Run_BackgroundAndTrueProperties_SUCCESS) {
+ MessageSharedPtr msg = CreateMsgParams(mobile_apis::HMILevel::HMI_BACKGROUND);
+
+ 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_none()).WillOnce(Return(true));
+
+ 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..5d31f48970
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/mobile/set_global_properties_test.cc
@@ -0,0 +1,1251 @@
+/*
+ * Copyright (c) 2018, Ford Motor Company
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * Redistributions of source code must retain the above copyright notice, this
+ * list of conditions and the following disclaimer.
+ *
+ * Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following
+ * disclaimer in the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * Neither the name of the Ford Motor Company nor the names of its contributors
+ * may be used to endorse or promote products derived from this software
+ * without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+ * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 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_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()) {}
+
+ 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));
+
+ 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));
+ SmartObject vr_help_title("title");
+ EXPECT_CALL(*mock_app_, vr_help_title()).WillOnce(Return(&vr_help_title));
+ 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));
+
+ 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_;
+};
+
+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_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_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));
+
+ 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));
+
+ 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));
+ SmartObject vr_help_title("Menu_Title");
+ EXPECT_CALL(*mock_app_, vr_help_title()).WillOnce(Return(&vr_help_title));
+ 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_VRCouldNotGenerate_INVALID_DATA) {
+ 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));
+ SmartObject* vr_help_title = NULL;
+ CommandsMap commands_map;
+ SmartObject empty_msg(smart_objects::SmartType_Map);
+ commands_map.insert(std::pair<uint32_t, SmartObject*>(1u, &empty_msg));
+ DataAccessor<CommandsMap> accessor(commands_map, lock_ptr_);
+ EXPECT_CALL(*mock_app_, commands_map()).WillOnce(Return(accessor));
+ EXPECT_CALL(*mock_app_, vr_help_title()).WillOnce(Return(vr_help_title));
+ EXPECT_CALL(*mock_app_, set_menu_title(_)).Times(0);
+
+ SharedPtr<SetGlobalPropertiesRequest> command(
+ CreateCommand<SetGlobalPropertiesRequest>(msg));
+ EXPECT_CALL(
+ mock_rpc_service_,
+ ManageMobileCommand(MobileResultCodeIs(mobile_apis::Result::INVALID_DATA),
+ am::commands::Command::SOURCE_SDL));
+
+ 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));
+ SmartObject vr_help_title(smart_objects::SmartType_Null);
+ EXPECT_CALL(*mock_app_, vr_help_title())
+ .WillOnce(Return(&vr_help_title))
+ .WillOnce(Return(&vr_help_title));
+
+ CommandsMap commands_map;
+ DataAccessor<CommandsMap> accessor(commands_map, lock_ptr_);
+ EXPECT_CALL(*mock_app_, commands_map()).WillOnce(Return(accessor));
+ const CustomString name("name");
+ EXPECT_CALL(*mock_app_, name()).WillOnce(ReturnRef(name));
+ EXPECT_CALL(*mock_app_, set_vr_help_title(SmartObject(name)));
+ 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));
+ SmartObject vr_help_title(smart_objects::SmartType_Null);
+ EXPECT_CALL(*mock_app_, vr_help_title())
+ .Times(2)
+ .WillRepeatedly(Return(&vr_help_title));
+
+ CommandsMap commands_map;
+ SmartObject command_text(smart_objects::SmartType_Map);
+ commands_map[0] = &command_text;
+ (*commands_map[0])[am::strings::vr_commands] = SmartObject("one");
+ DataAccessor<CommandsMap> accessor(commands_map, lock_ptr_);
+ EXPECT_CALL(*mock_app_, commands_map()).WillOnce(Return(accessor));
+ EXPECT_CALL(*mock_app_, set_vr_help(_));
+ const CustomString name("name");
+ EXPECT_CALL(*mock_app_, name()).WillOnce(ReturnRef(name));
+ EXPECT_CALL(*mock_app_, set_vr_help_title(SmartObject(name)));
+ SmartObject vr_help_array(smart_objects::SmartType_Array);
+ 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(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_NoVRNoDataFromSynonyms_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));
+ SmartObject vr_help_title(smart_objects::SmartType_Null);
+ EXPECT_CALL(*mock_app_, vr_help_title())
+ .Times(2)
+ .WillRepeatedly(Return(&vr_help_title));
+
+ CommandsMap commands_map;
+ DataAccessor<CommandsMap> accessor(commands_map, lock_ptr_);
+ EXPECT_CALL(*mock_app_, commands_map()).WillOnce(Return(accessor));
+ 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;
+ SmartObject vr_synonyms(smart_objects::SmartType_Array);
+ vr_synonyms[0] = vr_help_array;
+ const CustomString name("name");
+ EXPECT_CALL(*mock_app_, name()).WillOnce(ReturnRef(name));
+ EXPECT_CALL(*mock_app_, set_vr_help_title(SmartObject(name)));
+ 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));
+ SmartObject vr_help_title("title");
+ EXPECT_CALL(*mock_app_, vr_help_title()).WillOnce(Return(&vr_help_title));
+ 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));
+
+ 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));
+ SmartObject vr_help_title("title");
+ EXPECT_CALL(*mock_app_, vr_help_title()).WillOnce(Return(&vr_help_title));
+ 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));
+ 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));
+ SmartObject vr_help_title("title");
+ EXPECT_CALL(*mock_app_, vr_help_title()).WillOnce(Return(&vr_help_title));
+ 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));
+ 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);
+
+ 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(kConnectionKey)).Times(0);
+ 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));
+
+ 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..04a131da8f
--- /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,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_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);
+
+ 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..6e084e0869
--- /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,166 @@
+/*
+
+ 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;
+
+ 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..e04d1fb97a
--- /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,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_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;
+
+ 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..87a9ace377
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/vehicle_info_plugin/src/commands/mobile/get_vehicle_data_request.cc
@@ -0,0 +1,147 @@
+/*
+
+ Copyright (c) 2018, Ford Motor Company
+ All rights reserved.
+
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions are met:
+
+ Redistributions of source code must retain the above copyright notice, this
+ list of conditions and the following disclaimer.
+
+ Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions and the following
+ disclaimer in the documentation and/or other materials provided with the
+ distribution.
+
+ Neither the name of the Ford Motor Company nor the names of its contributors
+ may be used to endorse or promote products derived from this software
+ without specific prior written permission.
+
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+ LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 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;
+
+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;
+ }
+ }
+}
+
+} // 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..41fd35b8b5
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/vehicle_info_plugin/src/commands/mobile/subscribe_vehicle_data_request.cc
@@ -0,0 +1,375 @@
+/*
+ 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() {}
+
+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;
+ }
+
+ StartAwaitForInterface(HmiInterfaces::HMI_INTERFACE_VehicleInfo);
+ SendHMIRequest(hmi_apis::FunctionID::VehicleInfo_SubscribeVehicleData,
+ &msg_params,
+ true);
+}
+
+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;
+ }
+
+ 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]));
+}
+
+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..d0152ea0c3
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/vehicle_info_plugin/src/commands/mobile/unsubscribe_vehicle_data_request.cc
@@ -0,0 +1,287 @@
+/*
+
+ Copyright (c) 2018, Ford Motor Company
+ All rights reserved.
+
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions are met:
+
+ Redistributions of source code must retain the above copyright notice, this
+ list of conditions and the following disclaimer.
+
+ Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions and the following
+ disclaimer in the documentation and/or other materials provided with the
+ distribution.
+
+ Neither the name of the Ford Motor Company nor the names of its contributors
+ may be used to endorse or promote products derived from this software
+ without specific prior written permission.
+
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+ LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 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() {}
+
+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;
+ }
+
+ StartAwaitForInterface(HmiInterfaces::HMI_INTERFACE_VehicleInfo);
+ SendHMIRequest(hmi_apis::FunctionID::VehicleInfo_UnsubscribeVehicleData,
+ &msg_params,
+ true);
+}
+
+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;
+ }
+
+ 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());
+ }
+}
+
+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..4ad8a84189
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/vehicle_info_plugin/test/commands/mobile/get_vehicle_data_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 <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;
+};
+
+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);
+}
+
+} // 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 226c83dbf6..f271b7ff6a 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) {}
@@ -177,11 +178,13 @@ DynamicApplicationDataImpl::DynamicApplicationDataImpl()
, 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) {}
@@ -471,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);
@@ -479,7 +482,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;
@@ -489,7 +492,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;
@@ -501,7 +504,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);
@@ -509,7 +512,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) {
@@ -520,7 +523,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;
@@ -531,7 +534,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;
@@ -544,7 +547,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);
@@ -552,7 +555,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) {
@@ -563,7 +566,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;
@@ -576,14 +579,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 8fb88ad5ff..2a2e13fc0d 100644
--- a/src/components/application_manager/src/application_impl.cc
+++ b/src/components/application_manager/src/application_impl.cc
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2016, Ford Motor Company
+ * Copyright (c) 2018, Ford Motor Company
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -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)
@@ -123,11 +124,13 @@ ApplicationImpl::ApplicationImpl(
, list_files_in_none_count_(0)
, mac_address_(mac_address)
, device_id_(device_id)
+ , secondary_device_id_(0)
, usage_report_(mobile_app_id, statistics_manager)
, protocol_version_(
protocol_handler::MajorProtocolVersion::PROTOCOL_VERSION_3)
, is_voice_communication_application_(false)
, is_resuming_(false)
+ , deferred_resumption_hmi_level_(mobile_api::HMILevel::eType::INVALID_ENUM)
, is_hash_changed_during_suspend_(false)
, video_stream_retry_number_(0)
, audio_stream_retry_number_(0)
@@ -139,6 +142,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};
@@ -168,7 +173,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);
@@ -220,6 +224,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_;
}
@@ -379,6 +391,10 @@ connection_handler::DeviceHandle ApplicationImpl::device() const {
return device_id_;
}
+connection_handler::DeviceHandle ApplicationImpl::secondary_device() const {
+ return secondary_device_id_;
+}
+
const std::string& ApplicationImpl::mac_address() const {
return mac_address_;
}
@@ -492,6 +508,9 @@ void ApplicationImpl::StopStreamingForce(
using namespace protocol_handler;
LOG4CXX_AUTO_TRACE(logger_);
+ // see the comment in StopStreaming()
+ sync_primitives::AutoLock lock(streaming_stop_lock_);
+
SuspendStreaming(service_type);
if (service_type == ServiceType::kMobileNav) {
@@ -506,6 +525,12 @@ void ApplicationImpl::StopStreaming(
using namespace protocol_handler;
LOG4CXX_AUTO_TRACE(logger_);
+ // since WakeUpStreaming() is called from another thread, it is possible that
+ // the stream will be restarted after we call SuspendStreaming() and before
+ // we call StopXxxStreaming(). To avoid such timing issue, make sure that
+ // we run SuspendStreaming() and StopXxxStreaming() atomically.
+ sync_primitives::AutoLock lock(streaming_stop_lock_);
+
SuspendStreaming(service_type);
if (service_type == ServiceType::kMobileNav && video_streaming_approved()) {
@@ -556,6 +581,10 @@ void ApplicationImpl::WakeUpStreaming(
using namespace protocol_handler;
LOG4CXX_AUTO_TRACE(logger_);
+ // See the comment in StopStreaming(). Also, please make sure that we acquire
+ // streaming_stop_lock_ then xxx_streaming_suspended_lock_ in this order!
+ sync_primitives::AutoLock lock(streaming_stop_lock_);
+
if (ServiceType::kMobileNav == service_type) {
sync_primitives::AutoLock lock(video_streaming_suspended_lock_);
if (video_streaming_suspended_) {
@@ -639,6 +668,11 @@ void ApplicationImpl::set_device(connection_handler::DeviceHandle device) {
device_id_ = device;
}
+void ApplicationImpl::set_secondary_device(
+ connection_handler::DeviceHandle secondary_device) {
+ secondary_device_id_ = secondary_device;
+}
+
uint32_t ApplicationImpl::get_grammar_id() const {
return grammar_id_;
}
@@ -684,6 +718,16 @@ bool ApplicationImpl::is_resuming() const {
return is_resuming_;
}
+void ApplicationImpl::set_deferred_resumption_hmi_level(
+ mobile_api::HMILevel::eType level) {
+ deferred_resumption_hmi_level_ = level;
+}
+
+mobile_api::HMILevel::eType ApplicationImpl::deferred_resumption_hmi_level()
+ const {
+ return deferred_resumption_hmi_level_;
+}
+
bool ApplicationImpl::AddFile(const AppFile& file) {
if (app_files_.count(file.file_name) == 0) {
LOG4CXX_INFO(logger_,
@@ -731,13 +775,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);
@@ -745,31 +789,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_;
}
@@ -876,12 +899,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 {
@@ -1059,8 +1078,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();
@@ -1096,10 +1113,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) {
@@ -1120,21 +1133,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 5edd485343..06711412bd 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 {
@@ -97,7 +93,13 @@ DeviceTypes devicesType = {
hmi_apis::Common_TransportType::BLUETOOTH),
std::make_pair(std::string("BLUETOOTH_IOS"),
hmi_apis::Common_TransportType::BLUETOOTH),
- std::make_pair(std::string("WIFI"), hmi_apis::Common_TransportType::WIFI)};
+ std::make_pair(std::string("WIFI"), hmi_apis::Common_TransportType::WIFI),
+ std::make_pair(std::string("USB_IOS_HOST_MODE"),
+ hmi_apis::Common_TransportType::USB_IOS),
+ std::make_pair(std::string("USB_IOS_DEVICE_MODE"),
+ hmi_apis::Common_TransportType::USB_IOS),
+ std::make_pair(std::string("CARPLAY_WIRELESS_IOS"),
+ hmi_apis::Common_TransportType::WIFI)};
}
/**
@@ -141,7 +143,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 +160,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 +168,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 +194,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() {
@@ -227,10 +228,13 @@ ApplicationManagerImpl::~ApplicationManagerImpl() {
navi_app_to_stop_.clear();
navi_app_to_end_stream_.clear();
+
+ secondary_transport_devices_cache_.clear();
}
DataAccessor<ApplicationSet> ApplicationManagerImpl::applications() const {
- DataAccessor<ApplicationSet> accessor(applications_, applications_list_lock_);
+ DataAccessor<ApplicationSet> accessor(applications_,
+ applications_list_lock_ptr_);
return accessor;
}
@@ -352,8 +356,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 +367,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 +495,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 +527,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 +546,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();
}
@@ -602,13 +607,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 =
@@ -641,11 +646,23 @@ 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();
+
+ // It is possible that secondary transport of this app has been already
+ // established. Make sure that the information is reflected to application
+ // instance.
+ // Also, make sure that this is done *after* we updated applications_ list to
+ // avoid timing issues.
+ DeviceMap::iterator itr =
+ secondary_transport_devices_cache_.find(connection_key);
+ if (secondary_transport_devices_cache_.end() != itr) {
+ connection_handler::DeviceHandle secondary_device_handle = itr->second;
+ application->set_secondary_device(secondary_device_handle);
+ }
return application;
}
@@ -736,45 +753,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();
}
@@ -888,23 +903,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_);
@@ -942,43 +940,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();
@@ -997,12 +958,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) {
@@ -1023,7 +984,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) {
@@ -1032,10 +993,6 @@ void application_manager::ApplicationManagerImpl::MarkAppsGreyOut(
}
}
}
-void ApplicationManagerImpl::OnErrorSending(
- hmi_message_handler::MessageSharedPointer message) {
- return;
-}
void ApplicationManagerImpl::OnDeviceListUpdated(
const connection_handler::DeviceMap& device_list) {
@@ -1077,7 +1034,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() {
@@ -1106,7 +1063,7 @@ void ApplicationManagerImpl::SendUpdateAppList() {
PrepareApplicationListSO(applications_, applications, *this);
PrepareApplicationListSO(apps_to_register_, applications, *this);
- ManageHMICommand(request);
+ rpc_service_->ManageHMICommand(request);
}
void ApplicationManagerImpl::RemoveDevice(
@@ -1164,7 +1121,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(
@@ -1193,7 +1150,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_,
@@ -1244,6 +1201,79 @@ mobile_apis::HMILevel::eType ApplicationManagerImpl::GetDefaultHmiLevel(
return default_hmi;
}
+bool ApplicationManagerImpl::CheckResumptionRequiredTransportAvailable(
+ ApplicationConstSharedPtr application) const {
+ using namespace mobile_apis;
+ LOG4CXX_AUTO_TRACE(logger_);
+
+ const std::map<std::string, std::vector<std::string> >& transport_map =
+ get_settings().transport_required_for_resumption_map();
+
+ // retrieve transport type string used in .ini file
+ const std::string transport_type =
+ GetTransportTypeProfileString(application->device());
+ const std::string secondary_transport_type =
+ GetTransportTypeProfileString(application->secondary_device());
+
+ const smart_objects::SmartObject* app_types_array = application->app_types();
+ if (app_types_array == NULL || app_types_array->length() == 0) {
+ // This app does not have any AppHMIType. In this case, check "EMPTY_APP"
+ // entry
+ std::map<std::string, std::vector<std::string> >::const_iterator it =
+ transport_map.find(std::string("EMPTY_APP"));
+ if (it == transport_map.end()) {
+ // if "EMPTY_APP" is not specified, resumption is always enabled
+ return true;
+ }
+ const std::vector<std::string>& required_transport_list = it->second;
+
+ for (std::vector<std::string>::const_iterator itr =
+ required_transport_list.begin();
+ itr != required_transport_list.end();
+ ++itr) {
+ if (transport_type == *itr || secondary_transport_type == *itr) {
+ return true;
+ }
+ }
+ return false;
+ } else {
+ // check all AppHMITypes that the app has
+ for (size_t i = 0; i < app_types_array->length(); i++) {
+ const std::string app_type_string =
+ AppHMITypeToString(static_cast<mobile_apis::AppHMIType::eType>(
+ app_types_array->getElement(i).asUInt()));
+ bool transport_is_found = false;
+
+ std::map<std::string, std::vector<std::string> >::const_iterator it =
+ transport_map.find(app_type_string);
+ if (it == transport_map.end()) {
+ // this AppHMIType is not listed in .ini file, so resumption is always
+ // enabled
+ continue;
+ }
+
+ const std::vector<std::string>& required_transport_list = it->second;
+ for (std::vector<std::string>::const_iterator itr =
+ required_transport_list.begin();
+ itr != required_transport_list.end();
+ ++itr) {
+ if (transport_type == *itr || secondary_transport_type == *itr) {
+ transport_is_found = true;
+ break;
+ }
+ }
+
+ // if neither primary or secondary transport type is included in the list,
+ // then resumption will be disabled
+ if (!transport_is_found) {
+ return false;
+ }
+ }
+
+ return true;
+ }
+}
+
uint32_t ApplicationManagerImpl::GenerateGrammarID() {
return rand();
}
@@ -1632,10 +1662,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: {
@@ -1668,6 +1698,79 @@ void ApplicationManagerImpl::OnServiceEndedCallback(
}
}
+void ApplicationManagerImpl::OnSecondaryTransportStartedCallback(
+ const connection_handler::DeviceHandle device_handle,
+ const int32_t session_key) {
+ LOG4CXX_AUTO_TRACE(logger_);
+
+ if (device_handle == 0) {
+ LOG4CXX_WARN(logger_,
+ "Invalid device handle passed for secondary transport of app "
+ << session_key);
+ return;
+ }
+
+ secondary_transport_devices_cache_[session_key] = device_handle;
+
+ {
+ sync_primitives::AutoLock auto_lock(applications_list_lock_ptr_);
+ ApplicationSharedPtr app = application(session_key);
+ if (!app) {
+ // It is possible that secondary transport is established prior to
+ // RegisterAppInterface request being processed. In this case, we will
+ // update the app's information during RegisterApplication().
+ LOG4CXX_DEBUG(logger_,
+ "Application with id: " << session_key << " is not found");
+ return;
+ }
+ app->set_secondary_device(device_handle);
+ }
+
+ // notify the event to HMI through BC.UpdateAppList request
+ SendUpdateAppList();
+
+ // if resumption has not been enabled, run it now
+ resume_controller().RetryResumption(session_key);
+}
+
+void ApplicationManagerImpl::OnSecondaryTransportEndedCallback(
+ const int32_t session_key) {
+ LOG4CXX_AUTO_TRACE(logger_);
+
+ DeviceMap::iterator it = secondary_transport_devices_cache_.find(session_key);
+ if (it == secondary_transport_devices_cache_.end()) {
+ LOG4CXX_WARN(
+ logger_,
+ "Unknown session_key specified while removing secondary transport: "
+ << session_key);
+ } else {
+ secondary_transport_devices_cache_.erase(it);
+ }
+
+ {
+ sync_primitives::AutoLock auto_lock(applications_list_lock_ptr_);
+ ApplicationSharedPtr app = application(session_key);
+ if (!app) {
+ LOG4CXX_DEBUG(logger_,
+ "Application with id: " << session_key << " is not found");
+ return;
+ }
+
+ connection_handler::DeviceHandle device_handle = app->secondary_device();
+ if (device_handle == 0) {
+ LOG4CXX_WARN(logger_,
+ "Secondary transport of app " << session_key
+ << " is not found");
+ return;
+ }
+
+ app->set_secondary_device(0);
+ }
+
+ // notify the event to HMI through BC.UpdateAppList request
+ SendUpdateAppList();
+}
+
bool ApplicationManagerImpl::CheckAppIsNavi(const uint32_t app_id) const {
LOG4CXX_AUTO_TRACE(logger_);
ApplicationSharedPtr app = application(app_id);
@@ -1700,6 +1803,11 @@ bool ApplicationManagerImpl::OnHandshakeDone(
return false;
}
+bool ApplicationManagerImpl::OnHandshakeFailed() {
+ LOG4CXX_AUTO_TRACE(logger_);
+ return false;
+}
+
void ApplicationManagerImpl::OnCertificateUpdateRequired() {
LOG4CXX_AUTO_TRACE(logger_);
GetPolicyHandler().OnPTExchangeNeeded();
@@ -1727,6 +1835,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(
@@ -1747,447 +1856,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)) {
@@ -2243,18 +1940,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;
}
@@ -2279,155 +1964,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_);
@@ -2527,162 +2063,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;
@@ -2864,7 +2244,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);
@@ -2908,7 +2288,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
@@ -3069,15 +2449,11 @@ void ApplicationManagerImpl::SendOnSDLClose() {
logger_,
"Attached schema to message, result if valid: " << msg->isValid());
-#ifdef HMI_DBUS_API
- message_to_send->set_smart_object(*msg);
-#else
if (!ConvertSOtoMessage(*msg, *message_to_send)) {
LOG4CXX_WARN(logger_,
"Cannot send message to HMI: failed to create string");
return;
}
-#endif // HMI_DBUS_API
if (!hmi_handler_) {
LOG4CXX_WARN(logger_, "No HMI Handler set");
@@ -3108,10 +2484,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,
@@ -3130,7 +2506,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);
@@ -3143,7 +2519,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(
@@ -3214,7 +2590,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()) {
@@ -3259,12 +2635,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);
@@ -3277,144 +2653,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()) {
@@ -3462,6 +2706,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;
@@ -3557,10 +2810,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;
}
@@ -3660,21 +2913,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);
}
@@ -3752,7 +3004,8 @@ void ApplicationManagerImpl::SendHMIStatusNotification(
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() {
@@ -3795,10 +3048,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);
}
}
@@ -3980,9 +3233,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);
}
@@ -4088,6 +3341,39 @@ mobile_apis::AppHMIType::eType ApplicationManagerImpl::StringToAppHMIType(
}
}
+const std::string ApplicationManagerImpl::AppHMITypeToString(
+ mobile_apis::AppHMIType::eType type) const {
+ LOG4CXX_AUTO_TRACE(logger_);
+ switch (type) {
+ case mobile_apis::AppHMIType::DEFAULT:
+ return "DEFAULT";
+ case mobile_apis::AppHMIType::COMMUNICATION:
+ return "COMMUNICATION";
+ case mobile_apis::AppHMIType::MEDIA:
+ return "MEDIA";
+ case mobile_apis::AppHMIType::MESSAGING:
+ return "MESSAGING";
+ case mobile_apis::AppHMIType::NAVIGATION:
+ return "NAVIGATION";
+ case mobile_apis::AppHMIType::INFORMATION:
+ return "INFORMATION";
+ case mobile_apis::AppHMIType::SOCIAL:
+ return "SOCIAL";
+ case mobile_apis::AppHMIType::BACKGROUND_PROCESS:
+ return "BACKGROUND_PROCESS";
+ case mobile_apis::AppHMIType::TESTING:
+ return "TESTING";
+ case mobile_apis::AppHMIType::SYSTEM:
+ return "SYSTEM";
+ case mobile_apis::AppHMIType::PROJECTION:
+ return "PROJECTION";
+ case mobile_apis::AppHMIType::REMOTE_CONTROL:
+ return "REMOTE_CONTROL";
+ default:
+ return "INVALID_ENUM";
+ }
+}
+
bool ApplicationManagerImpl::CompareAppHMIType(
const smart_objects::SmartObject& from_policy,
const smart_objects::SmartObject& from_application) {
@@ -4214,13 +3500,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(
@@ -4385,6 +3673,16 @@ const std::set<int32_t> ApplicationManagerImpl::GetAppsSubscribedForWayPoints()
return subscribed_way_points_apps_list_;
}
+// retrieve transport type string used in .ini file, e.g. "TCP_WIFI"
+const std::string ApplicationManagerImpl::GetTransportTypeProfileString(
+ connection_handler::DeviceHandle device_handle) const {
+ LOG4CXX_AUTO_TRACE(logger_);
+
+ return connection_handler()
+ .get_session_observer()
+ .TransportTypeProfileStringFromDeviceHandle(device_handle);
+}
+
static hmi_apis::Common_VideoStreamingProtocol::eType ConvertVideoProtocol(
const char* str) {
if (strcmp(str, "RAW") == 0) {
@@ -4488,10 +3786,10 @@ bool ApplicationManagerImpl::IsSOStructValid(
#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(
@@ -4499,7 +3797,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)
@@ -4564,21 +3861,9 @@ void ApplicationManagerImpl::ChangeAppsHMILevel(
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_, "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/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 527d640c5c..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,6 +37,7 @@
#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"
@@ -194,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)
@@ -242,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) {}
@@ -305,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,
@@ -433,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);
}
@@ -462,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");
}
}
@@ -571,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;
@@ -627,7 +640,7 @@ bool CommandRequestImpl::CheckAllowedParameters() {
correlation_id(),
app->app_id());
- application_manager_.SendMessageToMobile(response);
+ rpc_service_.SendMessageToMobile(response);
return false;
}
@@ -651,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 df9dc01eab..0000000000
--- a/src/components/application_manager/src/commands/hmi/on_exit_application_notification.cc
+++ /dev/null
@@ -1,117 +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,
- VideoStreamingState::NOT_STREAMABLE,
- 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 5225002652..0000000000
--- a/src/components/application_manager/src/commands/mobile/on_hmi_status_notification.cc
+++ /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.
- */
-
-#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_BACKGROUND == hmi_level) ||
- (mobile_apis::HMILevel::HMI_NONE == hmi_level)) {
- if (!(app->tts_properties_in_none())) {
- app->set_tts_properties_in_none(true);
- LOG4CXX_INFO(logger_,
- "OnHMIStatusNotification::Send TTS GlobalProperties"
- " with empty array to HMI");
- MessageHelper::SendTTSGlobalProperties(app, false, application_manager_);
- }
- } else 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 f06012893e..0000000000
--- a/src/components/application_manager/src/commands/mobile/on_system_request_notification.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 <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 "policy/policy_table/enums.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;
- }
-
- 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();
-
- 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 =
- 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 269c9c814e..0000000000
--- a/src/components/application_manager/src/commands/mobile/put_file_request.cc
+++ /dev/null
@@ -1,317 +0,0 @@
-/*
-
- Copyright (c) 2013, Ford Motor Company
- All rights reserved.
-
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions are met:
-
- Redistributions of source code must retain the above copyright notice, this
- list of conditions and the following disclaimer.
-
- Redistributions in binary form must reproduce the above copyright notice,
- this list of conditions and the following
- disclaimer in the documentation and/or other materials provided with the
- distribution.
-
- Neither the name of the Ford Motor Company nor the names of its contributors
- may be used to endorse or promote products derived from this software
- without specific prior written permission.
-
- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 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"
-#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 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_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_;
- 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 3a8a2de4ab..0000000000
--- a/src/components/application_manager/src/commands/mobile/register_app_interface_request.cc
+++ /dev/null
@@ -1,1358 +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"
-#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;
-#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);
- }
- }
- }
-
- 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);
- 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];
-
- 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 =
- 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);
-
- 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);
-#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());
- }
-
- 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(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 a100bbb5fb..0000000000
--- a/src/components/application_manager/src/commands/mobile/set_app_icon_request.cc
+++ /dev/null
@@ -1,288 +0,0 @@
-/*
-
- Copyright (c) 2013, Ford Motor Company
- All rights reserved.
-
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions are met:
-
- Redistributions of source code must retain the above copyright notice, this
- list of conditions and the following disclaimer.
-
- Redistributions in binary form must reproduce the above copyright notice,
- this list of conditions and the following
- disclaimer in the documentation and/or other materials provided with the
- distribution.
-
- Neither the name of the Ford Motor Company nor the names of its contributors
- may be used to endorse or promote products derived from this software
- without specific prior written permission.
-
- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- 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_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 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;
- }
-
- 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/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 ed60ca4928..0000000000
--- a/src/components/application_manager/src/commands/mobile/set_display_layout_request.cc
+++ /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.
- */
-
-#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_);
- 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 =
- 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 e811f5d154..0000000000
--- a/src/components/application_manager/src/commands/mobile/set_global_properties_request.cc
+++ /dev/null
@@ -1,560 +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);
- } 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);
-
- if (ValidateVRHelpTitle(app->vr_help_title())) {
- LOG4CXX_DEBUG(logger_, "App already contains VRHelp data");
- } else {
- if (!PrepareUIRequestDefaultVRHelpData(app, params)) {
- LOG4CXX_ERROR(logger_, "default VRHElp data could not be generated");
- SendResponse(false, mobile_apis::Result::INVALID_DATA);
- return;
- }
- }
- 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);
- }
-}
-
-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();
-
- 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_);
- 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_);
- 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);
-
- // TODO{ALeshin} APPLINK-15858. connection_key removed during SendResponse
- ApplicationSharedPtr application =
- application_manager_.application(connection_key());
-
- 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 f0331d0ced..0000000000
--- a/src/components/application_manager/src/commands/mobile/system_request.cc
+++ /dev/null
@@ -1,690 +0,0 @@
-/*
-
-Copyright (c) 2013, Ford Motor Company
- All rights reserved.
-
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions are met:
-
- Redistributions of source code must retain the above copyright notice, this
- list of conditions and the following disclaimer.
-
- Redistributions in binary form must reproduce the above copyright notice,
- this list of conditions and the following
- disclaimer in the documentation and/or other materials provided with the
- distribution.
-
- Neither the name of the Ford Motor Company nor the names of its contributors
- may be used to endorse or promote products derived from this software
- without specific prior written permission.
-
- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- 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 "policy/policy_table/enums.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();
-
- 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();
- }
-
- 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 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];
- 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/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 f64b80a088..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));
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/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 d3af65effa..47bcffd3f5 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"
@@ -179,6 +180,8 @@ std::pair<std::string,
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),
@@ -188,6 +191,9 @@ std::pair<std::string,
mobile_apis::VehicleDataType::VEHICLEDATA_ODOMETER),
std::make_pair(strings::belt_status,
mobile_apis::VehicleDataType::VEHICLEDATA_BELTSTATUS),
+ std::make_pair(
+ strings::electronic_park_brake_status,
+ mobile_apis::VehicleDataType::VEHICLEDATA_ELECTRONICPARKBRAKESTATUS),
std::make_pair(strings::body_information,
mobile_apis::VehicleDataType::VEHICLEDATA_BODYINFO),
std::make_pair(strings::device_status,
@@ -226,58 +232,44 @@ const VehicleData MessageHelper::vehicle_data_(
kVehicleDataInitializer,
kVehicleDataInitializer + ARRAYSIZE(kVehicleDataInitializer));
-#ifdef HMI_DBUS_API
-namespace {
-struct VehicleInfo_Requests {
- hmi_apis::FunctionID::eType func_id;
- const char* str;
-};
-static VehicleInfo_Requests ivi_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},
-};
+smart_objects::SmartObjectSPtr MessageHelper::CreateNotification(
+ mobile_apis::FunctionID::eType function_id, uint32_t app_id) {
+ using smart_objects::SmartObject;
+ LOG4CXX_AUTO_TRACE(logger_);
+ smart_objects::SmartObjectSPtr object(
+ new SmartObject(smart_objects::SmartType_Map));
+ (*object)[strings::params][strings::message_type] =
+ static_cast<int>(kNotification);
+ (*object)[strings::params][strings::function_id] = function_id;
+ (*object)[strings::params][strings::connection_key] = app_id;
+ (*object)[strings::params][strings::protocol_version] =
+ commands::CommandImpl::protocol_version_;
+ (*object)[strings::params][strings::protocol_type] =
+ commands::CommandImpl::mobile_protocol_type_;
+ (*object)[strings::msg_params] =
+ smart_objects::SmartObject(smart_objects::SmartType_Map);
+ return object;
+}
+
+NsSmartDeviceLink::NsSmartObjects::SmartObjectSPtr
+MessageHelper::CreateHMINotification(hmi_apis::FunctionID::eType function_id) {
+ using smart_objects::SmartObject;
+ using smart_objects::SmartObjectSPtr;
+ using smart_objects::SmartType_Map;
+ LOG4CXX_AUTO_TRACE(logger_);
+ SmartObjectSPtr notification_ptr =
+ utils::MakeShared<SmartObject>(SmartType_Map);
+ SmartObject& notification = *notification_ptr;
+ notification[strings::params][strings::message_type] =
+ static_cast<int32_t>(kNotification);
+ notification[strings::params][strings::protocol_version] =
+ commands::CommandImpl::protocol_version_;
+ notification[strings::params][strings::protocol_type] =
+ commands::CommandImpl::hmi_protocol_type_;
+ notification[strings::params][strings::function_id] = function_id;
+
+ return notification_ptr;
}
-#endif // #ifdef HMI_DBUS_API
const uint32_t MessageHelper::GetPriorityCode(const std::string& priority) {
CommonAppPriorityMap::const_iterator it = app_priority_values.find(priority);
@@ -365,7 +357,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,
@@ -378,7 +384,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;
}
@@ -430,7 +437,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)) {
@@ -447,7 +454,7 @@ void MessageHelper::SendDeleteCommandRequest(smart_objects::SmartObject* cmd,
object[strings::msg_params] = msg_params;
- app_mngr.ManageHMICommand(message);
+ app_mngr.GetRPCService().ManageHMICommand(message);
}
}
@@ -473,7 +480,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();
@@ -502,7 +509,7 @@ void MessageHelper::SendDeleteSubmenuRequest(smart_objects::SmartObject* cmd,
object[strings::msg_params] = msg_params;
- app_mngr.ManageHMICommand(message);
+ app_mngr.GetRPCService().ManageHMICommand(message);
}
}
}
@@ -535,7 +542,7 @@ void MessageHelper::SendDeleteChoiceSetRequest(smart_objects::SmartObject* cmd,
object[strings::msg_params] = msg_params;
- app_mngr.ManageHMICommand(message);
+ app_mngr.GetRPCService().ManageHMICommand(message);
}
}
@@ -572,7 +579,7 @@ void MessageHelper::SendResetPropertiesRequest(ApplicationSharedPtr application,
object[strings::msg_params] = msg_params;
- app_mngr.ManageHMICommand(message);
+ app_mngr.GetRPCService().ManageHMICommand(message);
}
{
@@ -592,7 +599,7 @@ void MessageHelper::SendResetPropertiesRequest(ApplicationSharedPtr application,
object[strings::msg_params] = msg_params;
- app_mngr.ManageHMICommand(message);
+ app_mngr.GetRPCService().ManageHMICommand(message);
}
}
@@ -618,41 +625,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() {
@@ -721,7 +694,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) {
@@ -751,8 +723,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(
@@ -806,9 +778,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) {
@@ -848,101 +819,11 @@ std::string MessageHelper::StringifiedFunctionID(
return std::string();
}
-#ifdef HMI_DBUS_API
-namespace {
-const std::map<std::string, uint16_t> create_get_vehicle_data_args() {
- std::map<std::string, uint16_t> rc;
- rc.insert(std::make_pair(strings::gps,
- hmi_apis::FunctionID::VehicleInfo_GetGpsData));
- rc.insert(std::make_pair(strings::speed,
- hmi_apis::FunctionID::VehicleInfo_GetSpeed));
- rc.insert(
- std::make_pair(strings::rpm, hmi_apis::FunctionID::VehicleInfo_GetRpm));
- rc.insert(std::make_pair(strings::fuel_level,
- hmi_apis::FunctionID::VehicleInfo_GetFuelLevel));
- rc.insert(
- std::make_pair(strings::fuel_level_state,
- hmi_apis::FunctionID::VehicleInfo_GetFuelLevelState));
- rc.insert(std::make_pair(
- strings::instant_fuel_consumption,
- hmi_apis::FunctionID::VehicleInfo_GetInstantFuelConsumption));
- rc.insert(
- std::make_pair(strings::external_temp,
- hmi_apis::FunctionID::VehicleInfo_GetExternalTemperature));
- rc.insert(
- std::make_pair(strings::vin, hmi_apis::FunctionID::VehicleInfo_GetVin));
- rc.insert(std::make_pair(strings::prndl,
- hmi_apis::FunctionID::VehicleInfo_GetPrndl));
- rc.insert(std::make_pair(strings::tire_pressure,
- hmi_apis::FunctionID::VehicleInfo_GetTirePressure));
- rc.insert(std::make_pair(strings::odometer,
- hmi_apis::FunctionID::VehicleInfo_GetOdometer));
- rc.insert(std::make_pair(strings::belt_status,
- hmi_apis::FunctionID::VehicleInfo_GetBeltStatus));
- rc.insert(
- std::make_pair(strings::body_information,
- hmi_apis::FunctionID::VehicleInfo_GetBodyInformation));
- rc.insert(std::make_pair(strings::device_status,
- hmi_apis::FunctionID::VehicleInfo_GetDeviceStatus));
- rc.insert(std::make_pair(strings::driver_braking,
- hmi_apis::FunctionID::VehicleInfo_GetDriverBraking));
- rc.insert(std::make_pair(strings::wiper_status,
- hmi_apis::FunctionID::VehicleInfo_GetWiperStatus));
- rc.insert(
- std::make_pair(strings::head_lamp_status,
- hmi_apis::FunctionID::VehicleInfo_GetHeadLampStatus));
- rc.insert(std::make_pair(strings::engine_torque,
- hmi_apis::FunctionID::VehicleInfo_GetEngineTorque));
- rc.insert(
- std::make_pair(strings::acc_pedal_pos,
- hmi_apis::FunctionID::VehicleInfo_GetAccPedalPosition));
- rc.insert(
- std::make_pair(strings::steering_wheel_angle,
- hmi_apis::FunctionID::VehicleInfo_GetSteeringWheelAngle));
- rc.insert(std::make_pair(strings::e_call_info,
- hmi_apis::FunctionID::VehicleInfo_GetECallInfo));
- rc.insert(std::make_pair(strings::airbag_status,
- hmi_apis::FunctionID::VehicleInfo_GetAirbagStatus));
- rc.insert(
- std::make_pair(strings::emergency_event,
- hmi_apis::FunctionID::VehicleInfo_GetEmergencyEvent));
- rc.insert(
- std::make_pair(strings::cluster_mode_status,
- hmi_apis::FunctionID::VehicleInfo_GetClusterModeStatus));
- rc.insert(std::make_pair(strings::my_key,
- hmi_apis::FunctionID::VehicleInfo_GetMyKey));
- return rc;
-}
-static std::map<std::string, uint16_t> vehicle_data_args =
- create_get_vehicle_data_args();
-}
-#endif
-
void MessageHelper::CreateGetVehicleDataRequest(
const uint32_t correlation_id,
const std::vector<std::string>& params,
ApplicationManager& app_mngr) {
LOG4CXX_AUTO_TRACE(logger_);
-#ifdef HMI_DBUS_API
- for (std::vector<std::string>::const_iterator it = params.begin();
- it != params.end();
- it++) {
- smart_objects::SmartObjectSPtr request =
- utils::MakeShared<smart_objects::SmartObject>();
-
- (*request)[strings::params][strings::message_type] =
- static_cast<int>(kRequest);
- (*request)[strings::params][strings::correlation_id] = correlation_id;
- (*request)[strings::params][strings::protocol_version] =
- commands::CommandImpl::protocol_version_;
- (*request)[strings::params][strings::protocol_type] =
- commands::CommandImpl::hmi_protocol_type_;
- (*request)[strings::params][strings::function_id] =
- static_cast<int>(vehicle_data_args[*it]);
- app_mngr.ManageHMICommand(request);
- }
-#else
-
smart_objects::SmartObjectSPtr request =
utils::MakeShared<smart_objects::SmartObject>();
@@ -962,8 +843,7 @@ void MessageHelper::CreateGetVehicleDataRequest(
it++) {
(*request)[strings::msg_params][*it] = true;
}
- app_mngr.ManageHMICommand(request);
-#endif
+ app_mngr.GetRPCService().ManageHMICommand(request);
}
smart_objects::SmartObjectSPtr MessageHelper::CreateBlockedByPoliciesResponse(
@@ -1064,84 +944,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,
@@ -1174,7 +976,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");
}
}
@@ -1226,7 +1028,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);
}
}
@@ -1252,7 +1054,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));
}
}
@@ -1371,7 +1173,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);
}
}
@@ -1439,7 +1241,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));
}
}
@@ -1459,7 +1261,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));
}
}
@@ -1473,7 +1275,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));
}
}
@@ -1615,7 +1417,7 @@ void MessageHelper::SendUIChangeRegistrationRequestToHMI(
app_mngr);
if (ui_command) {
- app_mngr.ManageHMICommand(ui_command);
+ app_mngr.GetRPCService().ManageHMICommand(ui_command);
}
}
}
@@ -1627,7 +1429,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(
@@ -1662,6 +1464,40 @@ smart_objects::SmartObjectSPtr MessageHelper::CreateAddVRCommandToHMI(
return vr_command;
}
+bool MessageHelper::CreateDeviceInfo(
+ connection_handler::DeviceHandle device_handle,
+ const protocol_handler::SessionObserver& session_observer,
+ const policy::PolicyHandlerInterface& policy_handler,
+ ApplicationManager& app_mngr,
+ smart_objects::SmartObject* output) {
+ DCHECK_OR_RETURN(output, false);
+
+ std::string device_name;
+ std::string mac_address;
+ std::string transport_type;
+ if (-1 ==
+ session_observer.GetDataOnDeviceID(
+ device_handle, &device_name, NULL, &mac_address, &transport_type)) {
+ LOG4CXX_ERROR(logger_,
+ "Failed to extract information for device " << device_handle);
+ }
+
+ smart_objects::SmartObject& device_info_map = *output;
+ device_info_map = smart_objects::SmartObject(smart_objects::SmartType_Map);
+
+ device_info_map[strings::name] = device_name;
+ device_info_map[strings::id] = mac_address;
+ device_info_map[strings::transport_type] =
+ app_mngr.GetDeviceTransportType(transport_type);
+
+ const policy::DeviceConsent device_consent =
+ policy_handler.GetUserConsentForDevice(mac_address);
+ device_info_map[strings::isSDLAllowed] =
+ policy::DeviceConsent::kDeviceAllowed == device_consent;
+
+ return true;
+}
+
bool MessageHelper::CreateHMIApplicationStruct(
ApplicationConstSharedPtr app,
const protocol_handler::SessionObserver& session_observer,
@@ -1683,15 +1519,6 @@ bool MessageHelper::CreateHMIApplicationStruct(
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;
- if (-1 ==
- session_observer.GetDataOnDeviceID(
- app->device(), &device_name, NULL, &mac_address, &transport_type)) {
- LOG4CXX_ERROR(logger_,
- "Failed to extract information for device " << app->device());
- }
message = smart_objects::SmartObject(smart_objects::SmartType_Map);
message[strings::app_name] = app->name();
@@ -1730,15 +1557,22 @@ bool MessageHelper::CreateHMIApplicationStruct(
message[strings::device_info] =
smart_objects::SmartObject(smart_objects::SmartType_Map);
- message[strings::device_info][strings::name] = device_name;
- message[strings::device_info][strings::id] = mac_address;
- const policy::DeviceConsent device_consent =
- policy_handler.GetUserConsentForDevice(mac_address);
- message[strings::device_info][strings::isSDLAllowed] =
- policy::DeviceConsent::kDeviceAllowed == device_consent;
+ smart_objects::SmartObject& device_info = message[strings::device_info];
+ CreateDeviceInfo(
+ app->device(), session_observer, policy_handler, app_mngr, &device_info);
+
+ if (app->secondary_device() != 0) {
+ message[strings::secondary_device_info] =
+ smart_objects::SmartObject(smart_objects::SmartType_Map);
+ smart_objects::SmartObject& secondary_device_info =
+ message[strings::secondary_device_info];
+ CreateDeviceInfo(app->secondary_device(),
+ session_observer,
+ policy_handler,
+ app_mngr,
+ &secondary_device_info);
+ }
- message[strings::device_info][strings::transport_type] =
- app_mngr.GetDeviceTransportType(transport_type);
return true;
}
@@ -1754,7 +1588,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));
}
}
@@ -1784,6 +1618,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;
@@ -1810,7 +1650,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(
@@ -1879,7 +1719,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(
@@ -1930,7 +1770,7 @@ void MessageHelper::SendSDLActivateAppResponse(
hmi_apis::Common_Result::REJECTED;
}
- app_mngr.ManageHMICommand(message);
+ app_mngr.GetRPCService().ManageHMICommand(message);
}
void MessageHelper::SendOnSDLConsentNeeded(
@@ -1948,7 +1788,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,
@@ -1968,7 +1808,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,
@@ -1989,7 +1829,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;
}
@@ -2034,7 +1874,7 @@ void MessageHelper::SendGetUserFriendlyMessageResponse(
#endif // EXTERNAL_PROPRIETARY_MODE
}
- app_mngr.ManageHMICommand(message);
+ app_mngr.GetRPCService().ManageHMICommand(message);
}
#ifdef EXTERNAL_PROPRIETARY_MODE
@@ -2078,7 +1918,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(
@@ -2107,7 +1947,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
@@ -2149,7 +1989,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,
@@ -2188,7 +2028,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,
@@ -2205,7 +2045,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,
@@ -2245,7 +2085,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,
@@ -2263,7 +2103,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(
@@ -2295,7 +2135,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) {
@@ -2307,7 +2147,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) {
@@ -2319,7 +2159,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(
@@ -2368,9 +2208,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,
@@ -2536,9 +2376,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(
@@ -2621,7 +2461,7 @@ void MessageHelper::SendOnAppPermissionsChangedNotification(
request_subtypes_array;
}
- app_mngr.ManageHMICommand(
+ app_mngr.GetRPCService().ManageHMICommand(
utils::MakeShared<smart_objects::SmartObject>(message));
}
@@ -2643,7 +2483,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,
@@ -2662,7 +2502,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,
@@ -2681,7 +2521,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) {
@@ -2694,7 +2534,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(
@@ -2756,11 +2596,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;
@@ -2786,12 +2638,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/mobile_message_handler.cc b/src/components/application_manager/src/mobile_message_handler.cc
index 03cb0c6e6b..1ee368a212 100644
--- a/src/components/application_manager/src/mobile_message_handler.cc
+++ b/src/components/application_manager/src/mobile_message_handler.cc
@@ -143,6 +143,7 @@ MobileMessageHandler::HandleIncomingMessageProtocolV1(
message->service_type()));
if (!message) {
NOTREACHED();
+ delete outgoing_message;
return NULL;
}
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_event_observer.cc b/src/components/application_manager/src/policies/policy_event_observer.cc
index 828f2d923a..f397814005 100644
--- a/src/components/application_manager/src/policies/policy_event_observer.cc
+++ b/src/components/application_manager/src/policies/policy_event_observer.cc
@@ -63,14 +63,6 @@ void PolicyEventObserver::on_event(const event_engine::Event& event) {
const smart_objects::SmartObject& message = event.smart_object();
switch (event.id()) {
-#ifdef HMI_DBUS_API
- case hmi_apis::FunctionID::VehicleInfo_GetOdometer: {
- ProcessOdometerEvent(message);
- break;
- }
- default: { break; }
- unsubscribe_from_event(hmi_apis::FunctionID::VehicleInfo_GetOdometer);
-#else
case hmi_apis::FunctionID::VehicleInfo_GetVehicleData: {
ProcessOdometerEvent(message);
unsubscribe_from_event(hmi_apis::FunctionID::VehicleInfo_GetVehicleData);
@@ -82,7 +74,6 @@ void PolicyEventObserver::on_event(const event_engine::Event& event) {
break;
}
default: { break; }
-#endif
}
}
diff --git a/src/components/application_manager/src/policies/policy_handler.cc b/src/components/application_manager/src/policies/policy_handler.cc
index 123606a11e..88c01c7af7 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"
@@ -56,9 +57,6 @@
#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 {
@@ -1018,11 +1016,11 @@ 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());
@@ -1085,12 +1083,7 @@ bool PolicyHandler::ReceiveMessageFromSDK(const std::string& file,
SetDaysAfterEpoch();
event_observer_->subscribe_on_event(
-#ifdef HMI_DBUS_API
- hmi_apis::FunctionID::VehicleInfo_GetOdometer, correlation_id
-#else
- hmi_apis::FunctionID::VehicleInfo_GetVehicleData, correlation_id
-#endif
- );
+ hmi_apis::FunctionID::VehicleInfo_GetVehicleData, correlation_id);
std::vector<std::string> vehicle_data_args;
vehicle_data_args.push_back(strings::odometer);
MessageHelper::CreateGetVehicleDataRequest(
@@ -1198,10 +1191,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(),
@@ -1250,12 +1239,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(
@@ -1524,6 +1516,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_,
@@ -2033,8 +2032,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);
@@ -2168,5 +2165,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 e3fd423970..2cdab710f1 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"
@@ -53,6 +54,12 @@
namespace resumption {
using namespace application_manager;
+static mobile_api::HMILevel::eType PickHigherHmiLevel(
+ mobile_api::HMILevel::eType val1, mobile_api::HMILevel::eType val2);
+static mobile_api::HMILevel::eType PickLowerHmiLevel(
+ mobile_api::HMILevel::eType val1, mobile_api::HMILevel::eType val2);
+static mobile_api::HMILevel::eType ConvertHmiLevelString(const std::string str);
+
CREATE_LOGGERPTR_GLOBAL(logger_, "Resumption")
ResumeCtrlImpl::ResumeCtrlImpl(ApplicationManager& application_manager)
@@ -75,6 +82,11 @@ void ResumeCtrlImpl::set_resumption_storage(
utils::SharedPtr<ResumptionData> mock_storage) {
resumption_storage_ = mock_storage;
}
+
+bool ResumeCtrlImpl::get_resumption_active() const {
+ sync_primitives::AutoLock auto_lock(queue_lock_);
+ return is_resumption_active_;
+}
#endif // BUILD_TESTS
bool ResumeCtrlImpl::Init(resumption::LastState& last_state) {
@@ -157,10 +169,38 @@ bool ResumeCtrlImpl::RestoreAppHMIState(ApplicationSharedPtr application) {
if (result) {
DCHECK_OR_RETURN(application, false);
if (saved_app.keyExists(strings::hmi_level)) {
- const HMILevel::eType saved_hmi_level =
- static_cast<mobile_apis::HMILevel::eType>(
- saved_app[strings::hmi_level].asInt());
- LOG4CXX_DEBUG(logger_, "Saved HMI Level is : " << saved_hmi_level);
+ HMILevel::eType saved_hmi_level;
+ if (HMILevel::eType::INVALID_ENUM !=
+ application->deferred_resumption_hmi_level()) {
+ saved_hmi_level = application->deferred_resumption_hmi_level();
+ LOG4CXX_INFO(logger_,
+ "Retry resuming into HMI level : " << saved_hmi_level);
+ application->set_deferred_resumption_hmi_level(
+ HMILevel::eType::INVALID_ENUM);
+ } else {
+ saved_hmi_level = static_cast<mobile_apis::HMILevel::eType>(
+ saved_app[strings::hmi_level].asInt());
+ LOG4CXX_DEBUG(logger_, "Saved HMI Level is : " << saved_hmi_level);
+ }
+
+ // Check one of the high-bandwidth transports (configured through
+ // smartDeviceLink.ini file) is available. If not, then the HMI level to
+ // resume into will be modified.
+ if (!application_manager_.CheckResumptionRequiredTransportAvailable(
+ application)) {
+ mobile_apis::HMILevel::eType low_bandwidth_level =
+ GetHmiLevelOnLowBandwidthTransport(application);
+
+ application->set_deferred_resumption_hmi_level(saved_hmi_level);
+
+ saved_hmi_level =
+ PickLowerHmiLevel(saved_hmi_level, low_bandwidth_level);
+ LOG4CXX_DEBUG(
+ logger_,
+ "High-bandwidth transport not available, app will resume into : "
+ << saved_hmi_level);
+ }
+
return SetAppHMIState(application, saved_hmi_level, true);
} else {
result = false;
@@ -175,9 +215,23 @@ bool ResumeCtrlImpl::RestoreAppHMIState(ApplicationSharedPtr application) {
bool ResumeCtrlImpl::SetupDefaultHMILevel(ApplicationSharedPtr application) {
LOG4CXX_AUTO_TRACE(logger_);
DCHECK_OR_RETURN(application, false);
- mobile_apis::HMILevel::eType default_hmi =
+ mobile_apis::HMILevel::eType hmi_level =
application_manager_.GetDefaultHmiLevel(application);
- return SetAppHMIState(application, default_hmi, false);
+
+ // Check one of the high-bandwidth transports (configured through
+ // smartDeviceLink.ini file) is available. If not, then the HMI level to
+ // resume into will be modified.
+ if (!application_manager_.CheckResumptionRequiredTransportAvailable(
+ application)) {
+ mobile_apis::HMILevel::eType low_bandwidth_level =
+ GetHmiLevelOnLowBandwidthTransport(application);
+ hmi_level = PickLowerHmiLevel(hmi_level, low_bandwidth_level);
+ LOG4CXX_DEBUG(
+ logger_,
+ "High-bandwidth transport not available, default HMI level is set to : "
+ << hmi_level);
+ }
+ return SetAppHMIState(application, hmi_level, false);
}
void ResumeCtrlImpl::ApplicationResumptiOnTimer() {
@@ -352,6 +406,28 @@ bool ResumeCtrlImpl::StartResumptionOnlyHMILevel(
return result;
}
+void ResumeCtrlImpl::RetryResumption(const uint32_t app_id) {
+ LOG4CXX_AUTO_TRACE(logger_);
+
+ ApplicationSharedPtr app = application_manager_.application(app_id);
+ if (!app) {
+ LOG4CXX_WARN(logger_, "Invalid app_id = " << app_id);
+ return;
+ }
+
+ {
+ sync_primitives::AutoLock auto_lock(queue_lock_);
+ // check and update resumption deferred flag in queue_lock_
+ if (mobile_api::HMILevel::eType::INVALID_ENUM ==
+ app->deferred_resumption_hmi_level()) {
+ LOG4CXX_DEBUG(logger_, "No need to retry resumption for app: " << app_id);
+ return;
+ }
+ }
+
+ AddToResumptionTimerQueue(app_id);
+}
+
void ResumeCtrlImpl::StartAppHmiStateResumption(
ApplicationSharedPtr application) {
using namespace date_time;
@@ -374,6 +450,11 @@ void ResumeCtrlImpl::StartAppHmiStateResumption(
LOG4CXX_INFO(logger_,
"Resume application " << application->policy_app_id());
RestoreAppHMIState(application);
+ if (mobile_apis::HMILevel::eType::INVALID_ENUM !=
+ application->deferred_resumption_hmi_level()) {
+ // the application has not been fully resumed
+ return;
+ }
RemoveApplicationFromSaved(application);
} else {
LOG4CXX_INFO(logger_,
@@ -623,17 +704,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);
}
}
}
@@ -685,8 +757,14 @@ bool ResumeCtrlImpl::CheckAppRestrictions(
LOG4CXX_AUTO_TRACE(logger_);
DCHECK_OR_RETURN(saved_app.keyExists(strings::hmi_level), false);
- const HMILevel::eType hmi_level =
- static_cast<HMILevel::eType>(saved_app[strings::hmi_level].asInt());
+ HMILevel::eType hmi_level;
+ if (mobile_api::HMILevel::eType::INVALID_ENUM !=
+ application->deferred_resumption_hmi_level()) {
+ hmi_level = application->deferred_resumption_hmi_level();
+ } else {
+ hmi_level =
+ static_cast<HMILevel::eType>(saved_app[strings::hmi_level].asInt());
+ }
const bool result = Compare<HMILevel::eType, EQ, ONE>(
hmi_level, HMILevel::HMI_FULL, HMILevel::HMI_LIMITED)
? true
@@ -743,7 +821,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;
}
@@ -762,14 +840,19 @@ void ResumeCtrlImpl::ProcessHMIRequests(
void ResumeCtrlImpl::AddToResumptionTimerQueue(const uint32_t app_id) {
LOG4CXX_AUTO_TRACE(logger_);
+ bool run_resumption = false;
queue_lock_.Acquire();
waiting_for_timer_.push_back(app_id);
+
+ if (!is_resumption_active_) {
+ is_resumption_active_ = true;
+ run_resumption = true;
+ }
queue_lock_.Release();
LOG4CXX_DEBUG(logger_,
"Application ID " << app_id << " have been added"
" to resumption queue.");
- if (!is_resumption_active_) {
- is_resumption_active_ = true;
+ if (run_resumption) {
restore_hmi_level_timer_.Start(
application_manager_.get_settings().app_resuming_timeout(),
timer::kSingleShot);
@@ -834,4 +917,97 @@ bool ResumeCtrlImpl::IsAppDataResumptionExpired(
return max_ign_off_count <= application[strings::ign_off_count].asInt();
}
+mobile_apis::HMILevel::eType ResumeCtrlImpl::GetHmiLevelOnLowBandwidthTransport(
+ ApplicationConstSharedPtr application) const {
+ using namespace mobile_apis;
+ LOG4CXX_AUTO_TRACE(logger_);
+
+ const ApplicationManagerSettings& settings =
+ application_manager_.get_settings();
+ const std::string& level_for_navi_app =
+ settings.navigation_lowbandwidth_resumption_level();
+ const std::string& level_for_projection_app =
+ settings.projection_lowbandwidth_resumption_level();
+ const std::string& level_for_media_app =
+ settings.media_lowbandwidth_resumption_level();
+
+ HMILevel::eType result_level = HMILevel::HMI_NONE;
+ HMILevel::eType level;
+
+ // NAVIGATION, PROJECTION and media apps have special exceptions. Their HMI
+ // level can be configured through .ini file. when the app has multiple
+ // AppHMIType, then the highest level will be applied.
+ if (application->is_navi()) {
+ level = ConvertHmiLevelString(level_for_navi_app);
+ LOG4CXX_DEBUG(logger_,
+ "NAVIGATION apps may have level "
+ << level
+ << " while high-bandwidth transport is not available.");
+ result_level = PickHigherHmiLevel(level, result_level);
+ }
+ if (application->mobile_projection_enabled()) {
+ level = ConvertHmiLevelString(level_for_projection_app);
+ LOG4CXX_DEBUG(logger_,
+ "PROJECTION apps may have level "
+ << level
+ << " while high-bandwidth transport is not available.");
+ result_level = PickHigherHmiLevel(level, result_level);
+ }
+ if (application->is_media_application()) {
+ level = ConvertHmiLevelString(level_for_media_app);
+ LOG4CXX_DEBUG(logger_,
+ "media apps may have level "
+ << level
+ << " while high-bandwidth transport is not available.");
+ result_level = PickHigherHmiLevel(level, result_level);
+ }
+
+ return result_level;
+}
+
+static mobile_api::HMILevel::eType PickHigherHmiLevel(
+ mobile_api::HMILevel::eType val1, mobile_api::HMILevel::eType val2) {
+ using namespace mobile_apis;
+
+ if (val1 == HMILevel::INVALID_ENUM) {
+ return val2;
+ } else if (val2 == HMILevel::INVALID_ENUM) {
+ return val1;
+ }
+
+ // smaller enum value has higher level
+ return val1 < val2 ? val1 : val2;
+}
+
+static mobile_api::HMILevel::eType PickLowerHmiLevel(
+ mobile_api::HMILevel::eType val1, mobile_api::HMILevel::eType val2) {
+ using namespace mobile_apis;
+
+ if (val1 == HMILevel::INVALID_ENUM) {
+ return val2;
+ } else if (val2 == HMILevel::INVALID_ENUM) {
+ return val1;
+ }
+
+ // bigger enum value has lower level
+ return val1 > val2 ? val1 : val2;
+}
+
+static mobile_api::HMILevel::eType ConvertHmiLevelString(
+ const std::string str) {
+ using namespace mobile_apis;
+
+ if ("BACKGROUND" == str) {
+ return HMILevel::HMI_BACKGROUND;
+ } else if ("FULL" == str) {
+ return HMILevel::HMI_FULL;
+ } else if ("LIMITED" == str) {
+ return HMILevel::HMI_LIMITED;
+ } else if ("NONE" == str) {
+ return HMILevel::HMI_NONE;
+ } else {
+ return HMILevel::HMI_NONE;
+ }
+}
+
} // namespce resumption
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..42894a36a8
--- /dev/null
+++ b/src/components/application_manager/src/rpc_handler_impl.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 "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;
+ }
+
+ 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;
+ }
+ }
+
+ 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..11a98fc970
--- /dev/null
+++ b/src/components/application_manager/src/rpc_service_impl.cc
@@ -0,0 +1,630 @@
+/*
+ * Copyright (c) 2018, Ford Motor Company
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * Redistributions of source code must retain the above copyright notice, this
+ * list of conditions and the following disclaimer.
+ *
+ * Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following
+ * disclaimer in the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * Neither the name of the Ford Motor Company nor the names of its contributors
+ * may be used to endorse or promote products derived from this software
+ * without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+ * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR 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());
+
+ if (!ConvertSOtoMessage(*message, *message_to_send)) {
+ LOG4CXX_WARN(logger_,
+ "Cannot send message to HMI: failed to create string");
+ return;
+ }
+
+ 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 a55696524c..96d2a925fd 100644
--- a/src/components/application_manager/src/smart_object_keys.cc
+++ b/src/components/application_manager/src/smart_object_keys.cc
@@ -182,6 +182,7 @@ const char* did_location = "didLocation";
const char* app_list = "appList";
const char* device_list = "deviceList";
const char* device_info = "deviceInfo";
+const char* secondary_device_info = "secondaryDeviceInfo";
const char* name = "name";
const char* id = "id";
const char* isSDLAllowed = "isSDLAllowed";
@@ -218,11 +219,13 @@ 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";
const char* odometer = "odometer";
const char* belt_status = "beltStatus";
+const char* electronic_park_brake_status = "electronicParkBrakeStatus";
const char* body_information = "bodyInformation";
const char* device_status = "deviceStatus";
const char* driver_braking = "driverBraking";
@@ -367,7 +370,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";
@@ -380,7 +383,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";
@@ -453,7 +466,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 {
@@ -468,7 +481,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 9615656675..1a1e5543df 100644
--- a/src/components/application_manager/src/state_controller_impl.cc
+++ b/src/components/application_manager/src/state_controller_impl.cc
@@ -33,6 +33,7 @@
#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"
@@ -801,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;
}
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 90059e4d98..579ffe8c1b 100644
--- a/src/components/application_manager/test/CMakeLists.txt
+++ b/src/components/application_manager/test/CMakeLists.txt
@@ -70,13 +70,8 @@ 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
)
-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
@@ -134,7 +129,7 @@ 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("request_controller_test" "${RequestController_SOURCES}" "${LIBRARIES}")
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 be2986e719..3fe646d710 100644
--- a/src/components/application_manager/test/application_impl_test.cc
+++ b/src/components/application_manager/test/application_impl_test.cc
@@ -64,6 +64,7 @@ using namespace mobile_apis;
namespace custom_str = utils::custom_string;
using ::testing::_;
+using ::testing::Mock;
using ::testing::Return;
using ::testing::ReturnRef;
using ::testing::AtLeast;
@@ -106,6 +107,11 @@ class ApplicationImplTest : public ::testing::Test {
HmiStatePtr initial_state = CreateTestHmiState();
app_impl->SetInitialState(initial_state);
}
+
+ virtual void TearDown() OVERRIDE {
+ Mock::VerifyAndClearExpectations(MockMessageHelper::message_helper_mock());
+ }
+
HmiStatePtr CreateTestHmiState();
HmiStatePtr TestAddHmiState(HMILevel::eType hmi_lvl,
@@ -827,6 +833,29 @@ TEST_F(ApplicationImplTest, PushPopMobileMessage) {
EXPECT_TRUE(messages.empty());
}
+TEST_F(ApplicationImplTest, SetSecondaryDeviceTest) {
+ connection_handler::DeviceHandle initial_device =
+ app_impl->secondary_device();
+ EXPECT_EQ(0u, initial_device);
+
+ connection_handler::DeviceHandle device = 123;
+ app_impl->set_secondary_device(device);
+
+ EXPECT_EQ(device, app_impl->secondary_device());
+}
+
+TEST_F(ApplicationImplTest, SetDeferredResumptionHMILevelTest) {
+ using namespace mobile_api::HMILevel;
+ HMILevel::eType initial_deferred_level =
+ app_impl->deferred_resumption_hmi_level();
+ EXPECT_EQ(HMILevel::eType::INVALID_ENUM, initial_deferred_level);
+
+ HMILevel::eType deferred_level = HMILevel::eType::HMI_FULL;
+ app_impl->set_deferred_resumption_hmi_level(deferred_level);
+
+ EXPECT_EQ(deferred_level, app_impl->deferred_resumption_hmi_level());
+}
+
} // namespace application_manager_test
} // namespace components
} // namespace test
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 54faac0d25..d2bba895c8 100644
--- a/src/components/application_manager/test/application_manager_impl_test.cc
+++ b/src/components/application_manager/test/application_manager_impl_test.cc
@@ -43,6 +43,8 @@
#include "application_manager/mock_application.h"
#include "application_manager/mock_application_manager_settings.h"
#include "application_manager/mock_resumption_data.h"
+#include "application_manager/mock_rpc_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"
@@ -52,6 +54,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"
@@ -68,6 +71,7 @@ namespace policy_test = test::components::policy_handler_test;
namespace con_test = connection_handler_test;
using testing::_;
+using ::testing::An;
using ::testing::Matcher;
using ::testing::ByRef;
using ::testing::DoAll;
@@ -97,17 +101,20 @@ const std::string kAppName = "appName";
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_);
+ Mock::VerifyAndClearExpectations(mock_message_helper_);
}
~ApplicationManagerImplTest() {
- Mock::VerifyAndClearExpectations(&mock_message_helper_);
+ Mock::VerifyAndClearExpectations(mock_message_helper_);
}
protected:
@@ -117,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_);
@@ -145,7 +152,7 @@ class ApplicationManagerImplTest : public ::testing::Test {
app_manager_impl_.reset(new am::ApplicationManagerImpl(
mock_application_manager_settings_, mock_policy_settings_));
mock_app_ptr_ = utils::SharedPtr<MockApplication>(new MockApplication());
-
+ app_manager_impl_->set_protocol_handler(&mock_protocol_handler_);
ASSERT_TRUE(app_manager_impl_.get());
ASSERT_TRUE(mock_app_ptr_.get());
}
@@ -180,24 +187,34 @@ class ApplicationManagerImplTest : public ::testing::Test {
Return(0)));
}
+ bool CheckResumptionRequiredTransportAvailableTest(
+ smart_objects::SmartObject* app_types_array,
+ connection_handler::DeviceHandle primary_device_handle,
+ std::string primary_transport_device_string,
+ connection_handler::DeviceHandle secondary_device_handle,
+ std::string secondary_transport_device_string);
+
+ 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::unique_ptr<am::ApplicationManagerImpl> app_manager_impl_;
application_manager::MockMessageHelper* mock_message_helper_;
- uint32_t app_id_;
+
utils::SharedPtr<MockApplication> mock_app_ptr_;
+ 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";
@@ -680,6 +697,86 @@ TEST_F(ApplicationManagerImplTest,
}
TEST_F(ApplicationManagerImplTest,
+ OnSecondaryTransportStartedCallback_BeforeAppRegistration) {
+ const connection_handler::DeviceHandle device_handle = 1;
+ const int32_t session_key = 123;
+
+ // make sure that BC.UpdateAppList is not invoked
+ EXPECT_CALL(*mock_message_helper_,
+ CreateModuleInfoSO(
+ hmi_apis::FunctionID::BasicCommunication_UpdateAppList, _))
+ .Times(0);
+
+ app_manager_impl_->OnSecondaryTransportStartedCallback(device_handle,
+ session_key);
+}
+
+TEST_F(ApplicationManagerImplTest,
+ OnSecondaryTransportStartedCallback_AfterAppRegistration) {
+ using namespace NsSmartDeviceLink::NsSmartObjects;
+
+ AddMockApplication();
+ EXPECT_CALL(*mock_app_ptr_, app_id()).WillRepeatedly(Return(app_id_));
+
+ const connection_handler::DeviceHandle device_handle = 1;
+ const int32_t session_key = app_id_;
+
+ EXPECT_CALL(*mock_app_ptr_, set_secondary_device(device_handle)).Times(1);
+ // called by ResumeCtrlImpl::RetryResumption()
+ EXPECT_CALL(*mock_app_ptr_, deferred_resumption_hmi_level())
+ .WillOnce(Return(mobile_api::HMILevel::eType::INVALID_ENUM));
+
+ smart_objects::SmartObject dummy_object(SmartType_Map);
+ SmartObjectSPtr sptr = MakeShared<SmartObject>(dummy_object);
+
+ EXPECT_CALL(*mock_message_helper_,
+ CreateModuleInfoSO(
+ hmi_apis::FunctionID::BasicCommunication_UpdateAppList, _))
+ .WillOnce(Return(sptr));
+
+ app_manager_impl_->OnSecondaryTransportStartedCallback(device_handle,
+ session_key);
+}
+
+TEST_F(ApplicationManagerImplTest,
+ OnSecondaryTransportEndedCallback_AfterAppRegistration) {
+ using namespace NsSmartDeviceLink::NsSmartObjects;
+
+ const connection_handler::DeviceHandle device_handle = 1;
+ const int32_t session_key = app_id_;
+
+ AddMockApplication();
+ EXPECT_CALL(*mock_app_ptr_, app_id()).WillRepeatedly(Return(app_id_));
+ EXPECT_CALL(*mock_app_ptr_, secondary_device())
+ .WillRepeatedly(Return(device_handle));
+
+ EXPECT_CALL(*mock_app_ptr_, set_secondary_device(0)).Times(1);
+
+ smart_objects::SmartObject dummy_object(SmartType_Map);
+ SmartObjectSPtr sptr = MakeShared<SmartObject>(dummy_object);
+
+ EXPECT_CALL(*mock_message_helper_,
+ CreateModuleInfoSO(
+ hmi_apis::FunctionID::BasicCommunication_UpdateAppList, _))
+ .WillOnce(Return(sptr));
+
+ app_manager_impl_->OnSecondaryTransportEndedCallback(session_key);
+}
+
+TEST_F(ApplicationManagerImplTest,
+ OnSecondaryTransportEndedCallback_BeforeAppRegistration) {
+ const int32_t session_key = app_id_;
+
+ // make sure that BC.UpdateAppList is not invoked
+ EXPECT_CALL(*mock_message_helper_,
+ CreateModuleInfoSO(
+ hmi_apis::FunctionID::BasicCommunication_UpdateAppList, _))
+ .Times(0);
+
+ app_manager_impl_->OnSecondaryTransportEndedCallback(session_key);
+}
+
+TEST_F(ApplicationManagerImplTest,
OnDeviceSwitchingStart_ExpectPutAppsInWaitList) {
utils::SharedPtr<MockApplication> switching_app_ptr =
utils::MakeShared<MockApplication>();
@@ -742,6 +839,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);
@@ -788,7 +891,6 @@ TEST_F(ApplicationManagerImplTest,
EXPECT_CALL(*mock_message_helper_, CreateDeviceListSO(_, _, _))
.WillOnce(Return(smart_objects::SmartObjectSPtr()));
-
app_manager_impl_->OnDeviceSwitchingStart(switching_device,
non_switching_device);
@@ -876,6 +978,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;
@@ -946,6 +1052,324 @@ TEST_F(ApplicationManagerImplTest, UnregisterAnotherAppDuringAudioPassThru) {
}
}
+static std::map<std::string, std::vector<std::string> > CreateTransportMap() {
+ /*
+ * DefaultTransportRequiredForResumption = TCP_WIFI, IAP_USB, SPP_BLUETOOTH
+ * MediaTransportRequiredForResumption = TCP_WIFI, AOA_USB
+ * NavigationTransportRequiredForResumption = AOA_USB, SPP_BLUETOOTH
+ * TestingTransportRequiredForResumption =
+ * EmptyAppTransportRequiredForResumption = TCP_WIFI
+ */
+ std::string TCP_WIFI("TCP_WIFI");
+ std::string IAP_USB("IAP_USB");
+ std::string SPP_BLUETOOTH("SPP_BLUETOOTH");
+ std::string AOA_USB("AOA_USB");
+
+ std::vector<std::string> default_transports;
+ default_transports.push_back(TCP_WIFI);
+ default_transports.push_back(IAP_USB);
+ default_transports.push_back(SPP_BLUETOOTH);
+ std::vector<std::string> media_transports;
+ media_transports.push_back(TCP_WIFI);
+ media_transports.push_back(AOA_USB);
+ std::vector<std::string> navi_transports;
+ navi_transports.push_back(AOA_USB);
+ navi_transports.push_back(SPP_BLUETOOTH);
+ std::vector<std::string> testing_transports;
+ std::vector<std::string> empty_transports;
+ empty_transports.push_back(TCP_WIFI);
+
+ std::map<std::string, std::vector<std::string> > transport_map;
+ transport_map[std::string("DEFAULT")] = default_transports;
+ transport_map[std::string("MEDIA")] = media_transports;
+ transport_map[std::string("NAVIGATION")] = navi_transports;
+ transport_map[std::string("TESTING")] = testing_transports;
+ transport_map[std::string("EMPTY_APP")] = empty_transports;
+
+ return transport_map;
+}
+
+bool ApplicationManagerImplTest::CheckResumptionRequiredTransportAvailableTest(
+ smart_objects::SmartObject* app_types_array,
+ connection_handler::DeviceHandle primary_device_handle,
+ std::string primary_transport_device_string,
+ connection_handler::DeviceHandle secondary_device_handle,
+ std::string secondary_transport_device_string) {
+ EXPECT_CALL(*mock_app_ptr_, app_types())
+ .WillRepeatedly(Return(app_types_array));
+
+ std::map<std::string, std::vector<std::string> > transport_map =
+ CreateTransportMap();
+
+ EXPECT_CALL(mock_application_manager_settings_,
+ transport_required_for_resumption_map())
+ .WillRepeatedly(ReturnRef(transport_map));
+
+ EXPECT_CALL(*mock_app_ptr_, device())
+ .WillRepeatedly(Return(primary_device_handle));
+ EXPECT_CALL(*mock_app_ptr_, secondary_device())
+ .WillRepeatedly(Return(secondary_device_handle));
+
+ EXPECT_CALL(mock_session_observer_,
+ TransportTypeProfileStringFromDeviceHandle(primary_device_handle))
+ .WillOnce(Return(primary_transport_device_string));
+
+ if (secondary_device_handle != 0) {
+ EXPECT_CALL(
+ mock_session_observer_,
+ TransportTypeProfileStringFromDeviceHandle(secondary_device_handle))
+ .WillOnce(Return(secondary_transport_device_string));
+ } else {
+ EXPECT_CALL(mock_session_observer_,
+ TransportTypeProfileStringFromDeviceHandle(
+ secondary_device_handle)).WillOnce(Return(std::string("")));
+ }
+
+ return app_manager_impl_->CheckResumptionRequiredTransportAvailable(
+ mock_app_ptr_);
+}
+
+TEST_F(ApplicationManagerImplTest,
+ CheckResumptionRequiredTransportAvailableTest_PrimaryOnly_Success) {
+ using namespace NsSmartDeviceLink::NsSmartObjects;
+
+ smart_objects::SmartObject app_types_array(SmartType_Array);
+ app_types_array[0] = mobile_apis::AppHMIType::eType::DEFAULT;
+
+ const connection_handler::DeviceHandle primary_device_handle = 1;
+ const connection_handler::DeviceHandle secondary_device_handle = 0;
+
+ // refer to transport_adapter_impl.cc
+ std::string primary_transport_device_string("SPP_BLUETOOTH");
+ std::string secondary_transport_device_string("");
+
+ // - The app is DEFAULT.
+ // - A DEFAULT app is allowed for resumption if either primary or secondary
+ // transport is TCP_WIFI, IAP_USB or SPP_BLUETOOTH.
+ // - We have SPP_BLUETOOTH for primary transport.
+ // -> Conclusion: the app has required transport.
+ bool result = CheckResumptionRequiredTransportAvailableTest(
+ &app_types_array,
+ primary_device_handle,
+ primary_transport_device_string,
+ secondary_device_handle,
+ secondary_transport_device_string);
+ EXPECT_TRUE(result);
+}
+
+TEST_F(ApplicationManagerImplTest,
+ CheckResumptionRequiredTransportAvailableTest_PrimaryOnly_NotListed) {
+ using namespace NsSmartDeviceLink::NsSmartObjects;
+
+ smart_objects::SmartObject app_types_array(SmartType_Array);
+ app_types_array[0] = mobile_apis::AppHMIType::eType::SOCIAL;
+
+ const connection_handler::DeviceHandle primary_device_handle = 1;
+ const connection_handler::DeviceHandle secondary_device_handle = 0;
+
+ std::string primary_transport_device_string("SPP_BLUETOOTH");
+ std::string secondary_transport_device_string("");
+
+ // - The app is SOCIAL.
+ // - We do not have an entry in .ini file for SOCIAL apps.
+ // -> In this case, resumption is always enabled for backward compatibility.
+ bool result = CheckResumptionRequiredTransportAvailableTest(
+ &app_types_array,
+ primary_device_handle,
+ primary_transport_device_string,
+ secondary_device_handle,
+ secondary_transport_device_string);
+ EXPECT_TRUE(result);
+}
+
+TEST_F(ApplicationManagerImplTest,
+ CheckResumptionRequiredTransportAvailableTest_PrimaryOnly_Disabled) {
+ using namespace NsSmartDeviceLink::NsSmartObjects;
+
+ smart_objects::SmartObject app_types_array(SmartType_Array);
+ app_types_array[0] = mobile_apis::AppHMIType::eType::TESTING;
+
+ const connection_handler::DeviceHandle primary_device_handle = 1;
+ const connection_handler::DeviceHandle secondary_device_handle = 0;
+
+ std::string primary_transport_device_string("SPP_BLUETOOTH");
+ std::string secondary_transport_device_string("");
+
+ // - The app is TESTING.
+ // - We do not have any transports allowed for TESTING apps.
+ // -> In this case, resumption is always disabled.
+ bool result = CheckResumptionRequiredTransportAvailableTest(
+ &app_types_array,
+ primary_device_handle,
+ primary_transport_device_string,
+ secondary_device_handle,
+ secondary_transport_device_string);
+ EXPECT_FALSE(result);
+}
+
+TEST_F(ApplicationManagerImplTest,
+ CheckResumptionRequiredTransportAvailableTest_PrimaryOnly_NoAppTypes) {
+ using namespace NsSmartDeviceLink::NsSmartObjects;
+
+ smart_objects::SmartObject app_types_array(SmartType_Array);
+ // we don't specify any app type
+
+ const connection_handler::DeviceHandle primary_device_handle = 1;
+ const connection_handler::DeviceHandle secondary_device_handle = 0;
+
+ std::string primary_transport_device_string("SPP_BLUETOOTH");
+ std::string secondary_transport_device_string("");
+
+ // - The app doesn't specify AppHMIType.
+ // - .ini file specifies TCP_WIFI for EMPTY_APP entry.
+ // -> The app does not have required transport.
+ bool result = CheckResumptionRequiredTransportAvailableTest(
+ &app_types_array,
+ primary_device_handle,
+ primary_transport_device_string,
+ secondary_device_handle,
+ secondary_transport_device_string);
+ EXPECT_FALSE(result);
+}
+
+TEST_F(ApplicationManagerImplTest,
+ CheckResumptionRequiredTransportAvailableTest_PrimaryOnly_NoAppTypes2) {
+ using namespace NsSmartDeviceLink::NsSmartObjects;
+
+ const connection_handler::DeviceHandle primary_device_handle = 1;
+ const connection_handler::DeviceHandle secondary_device_handle = 0;
+
+ std::string primary_transport_device_string("SPP_BLUETOOTH");
+ std::string secondary_transport_device_string("");
+
+ // - The app doesn't specify AppHMIType.
+ // - .ini file specifies TCP_WIFI for EMPTY_APP entry.
+ // -> The app does not have required transport.
+ bool result = CheckResumptionRequiredTransportAvailableTest(
+ NULL,
+ primary_device_handle,
+ primary_transport_device_string,
+ secondary_device_handle,
+ secondary_transport_device_string);
+ EXPECT_FALSE(result);
+}
+
+TEST_F(ApplicationManagerImplTest,
+ CheckResumptionRequiredTransportAvailableTest_TwoTransports_Success) {
+ using namespace NsSmartDeviceLink::NsSmartObjects;
+
+ smart_objects::SmartObject app_types_array(SmartType_Array);
+ app_types_array[0] = mobile_apis::AppHMIType::eType::MEDIA;
+
+ const connection_handler::DeviceHandle primary_device_handle = 1;
+ const connection_handler::DeviceHandle secondary_device_handle = 2;
+
+ // refer to transport_adapter_impl.cc
+ std::string primary_transport_device_string("SPP_BLUETOOTH");
+ std::string secondary_transport_device_string("TCP_WIFI");
+
+ // - The app is MEDIA.
+ // - A MEDIA app is allowed for resumption if either primary or secondary
+ // transport is TCP_WIFI or AOA_USB.
+ // - We have TCP_WIFI for secondary transport.
+ // -> Conclusion: the app has required transport.
+ bool result = CheckResumptionRequiredTransportAvailableTest(
+ &app_types_array,
+ primary_device_handle,
+ primary_transport_device_string,
+ secondary_device_handle,
+ secondary_transport_device_string);
+ EXPECT_TRUE(result);
+}
+
+TEST_F(ApplicationManagerImplTest,
+ CheckResumptionRequiredTransportAvailableTest_TwoTransports_Failure) {
+ using namespace NsSmartDeviceLink::NsSmartObjects;
+
+ smart_objects::SmartObject app_types_array(SmartType_Array);
+ app_types_array[0] = mobile_apis::AppHMIType::eType::NAVIGATION;
+
+ const connection_handler::DeviceHandle primary_device_handle = 1;
+ const connection_handler::DeviceHandle secondary_device_handle = 2;
+
+ // refer to transport_adapter_impl.cc
+ std::string primary_transport_device_string("IAP_USB");
+ std::string secondary_transport_device_string("TCP_WIFI");
+
+ // - The app is NAVIGATION.
+ // - A NAVIGATION app is allowed for resumption if either primary or secondary
+ // transport is AOA_USB or SPP_BLUETOOTH.
+ // - We have IAP_USB for primary and TCP_WIFI for secondary transport.
+ // -> Conclusion: the app does not have required transport.
+ bool result = CheckResumptionRequiredTransportAvailableTest(
+ &app_types_array,
+ primary_device_handle,
+ primary_transport_device_string,
+ secondary_device_handle,
+ secondary_transport_device_string);
+ EXPECT_FALSE(result);
+}
+
+TEST_F(ApplicationManagerImplTest,
+ CheckResumptionRequiredTransportAvailableTest_MultipleAppTypes_Failure) {
+ using namespace NsSmartDeviceLink::NsSmartObjects;
+
+ smart_objects::SmartObject app_types_array(SmartType_Array);
+ app_types_array[0] = mobile_apis::AppHMIType::eType::MEDIA;
+ app_types_array[1] = mobile_apis::AppHMIType::eType::NAVIGATION;
+
+ const connection_handler::DeviceHandle primary_device_handle = 1;
+ const connection_handler::DeviceHandle secondary_device_handle = 2;
+
+ std::string primary_transport_device_string("IAP_USB");
+ std::string secondary_transport_device_string("TCP_WIFI");
+
+ // - The app is MEDIA and NAVIGATION.
+ // - A MEDIA app is allowed for resumption if either primary or secondary
+ // transport is TCP_WIFI or AOA_USB.
+ // - A NAVIGATION app is allowed for resumption if either primary or secondary
+ // transport is AOA_USB or SPP_BLUETOOTH.
+ // - We have IAP_USB for primary and TCP_WIFI is secondary
+ // -> Conclusion: the app does NOT have required transport.
+ bool result = CheckResumptionRequiredTransportAvailableTest(
+ &app_types_array,
+ primary_device_handle,
+ primary_transport_device_string,
+ secondary_device_handle,
+ secondary_transport_device_string);
+ EXPECT_FALSE(result);
+}
+
+TEST_F(ApplicationManagerImplTest,
+ CheckResumptionRequiredTransportAvailableTest_MultipleAppTypes_Empty) {
+ using namespace NsSmartDeviceLink::NsSmartObjects;
+
+ smart_objects::SmartObject app_types_array(SmartType_Array);
+ app_types_array[0] = mobile_apis::AppHMIType::eType::NAVIGATION;
+ app_types_array[1] = mobile_apis::AppHMIType::eType::SYSTEM;
+
+ const connection_handler::DeviceHandle primary_device_handle = 1;
+ const connection_handler::DeviceHandle secondary_device_handle = 2;
+
+ std::string primary_transport_device_string("IAP_USB");
+ std::string secondary_transport_device_string("TCP_WIFI");
+
+ // - The app is NAVIGATION and SYSTEM.
+ // - A NAVIGATION app is allowed for resumption if either primary or secondary
+ // transport is AOA_USB or SPP_BLUETOOTH.
+ // - .ini file does not have an entry for SYSTEM apps. So any transport is
+ // allowed.
+ // - We have SPP_BLUETOOTH for primary and TCP_WIFI is secondary
+ // -> Conclusion: the app does NOT have required transport.
+ bool result = CheckResumptionRequiredTransportAvailableTest(
+ &app_types_array,
+ primary_device_handle,
+ primary_transport_device_string,
+ secondary_device_handle,
+ secondary_transport_device_string);
+ EXPECT_FALSE(result);
+}
+
TEST_F(ApplicationManagerImplTest,
RegisterApplication_PathToTheIconExists_IconWasSet) {
file_system::CreateDirectory(kDirectoryName);
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 be236fdb49..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,25 +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 4b805f4006..0000000000
--- a/src/components/application_manager/test/commands/hmi/hmi_notifications/hmi_notifications_test.cc
+++ /dev/null
@@ -1,1982 +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,
- 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);
-
-#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,
- 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(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 7dd7a74f4c..0000000000
--- a/src/components/application_manager/test/commands/hmi/ui_get_capabilities_response_test.cc
+++ /dev/null
@@ -1,348 +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";
- (*command_msg)[strings::msg_params][hmi_response::display_capabilities]
- [hmi_response::display_name] = "GENERIC_DISPLAY";
-
- 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 9cb5610621..0000000000
--- a/src/components/application_manager/test/commands/mobile/on_hmi_status_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 "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_BackgroundAndFalseProperties_SUCCESS) {
- MessageSharedPtr msg = CreateMsgParams(mobile_apis::HMILevel::HMI_BACKGROUND);
- SetSendNotificationExpectations(msg);
-
- 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_none()).WillOnce(Return(false));
- EXPECT_CALL(*mock_app, set_tts_properties_in_none(true));
- EXPECT_CALL(mock_message_helper_, SendTTSGlobalProperties(_, false, _));
-
- command->Run();
-
- VerifySendNotificationData(msg);
-}
-
-TEST_F(OnHMIStatusNotificationTest, Run_BackgroundAndTrueProperties_SUCCESS) {
- MessageSharedPtr msg = CreateMsgParams(mobile_apis::HMILevel::HMI_BACKGROUND);
-
- 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_none()).WillOnce(Return(true));
-
- 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 60af9381e8..0000000000
--- a/src/components/application_manager/test/commands/mobile/on_system_request_notification_test.cc
+++ /dev/null
@@ -1,293 +0,0 @@
-/*
- * Copyright (c) 2016, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include <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::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(app_mngr_, GetPolicyHandler())
- .WillByDefault(ReturnRef(mock_policy_handler_));
- ON_CALL(*mock_app_, policy_app_id()).WillByDefault(Return(kPolicyAppId));
- }
-
- protected:
- MockAppPtr mock_app_;
- MockPolicyHandlerInterface mock_policy_handler_;
-};
-
-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);
-
- 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 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);
-
- 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 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);
-
- 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 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);
-
- 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();
-}
-
-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(app_mngr_, 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(app_mngr_, 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/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 575daa7217..0000000000
--- a/src/components/application_manager/test/commands/mobile/put_file_test.cc
+++ /dev/null
@@ -1,410 +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 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(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();
-}
-
-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/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 3225b4ef4c..0000000000
--- a/src/components/application_manager/test/commands/mobile/register_app_interface_request_test.cc
+++ /dev/null
@@ -1,529 +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_, 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(
- 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::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_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 a5d50502f4..0000000000
--- a/src/components/application_manager/test/commands/mobile/set_app_icon_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 <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 "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 am::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(
- 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 3e1785a3bd..0000000000
--- a/src/components/application_manager/test/commands/mobile/set_display_layout_test.cc
+++ /dev/null
@@ -1,256 +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;
-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(
- 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, 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(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 641e5636a9..0000000000
--- a/src/components/application_manager/test/commands/mobile/set_global_properties_test.cc
+++ /dev/null
@@ -1,1229 +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_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()) {}
-
- 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));
-
- 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));
- SmartObject vr_help_title("title");
- EXPECT_CALL(*mock_app_, vr_help_title()).WillOnce(Return(&vr_help_title));
- 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));
-
- 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_;
-};
-
-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));
-
- (*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(
- 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));
-
- 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));
-
- 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));
- SmartObject vr_help_title("Menu_Title");
- EXPECT_CALL(*mock_app_, vr_help_title()).WillOnce(Return(&vr_help_title));
- 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_VRCouldNotGenerate_INVALID_DATA) {
- 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));
- SmartObject* vr_help_title = NULL;
- CommandsMap commands_map;
- SmartObject empty_msg(smart_objects::SmartType_Map);
- commands_map.insert(std::pair<uint32_t, SmartObject*>(1u, &empty_msg));
- DataAccessor<CommandsMap> accessor(commands_map, lock_);
- EXPECT_CALL(*mock_app_, commands_map()).WillOnce(Return(accessor));
- EXPECT_CALL(*mock_app_, vr_help_title()).WillOnce(Return(vr_help_title));
- EXPECT_CALL(*mock_app_, set_menu_title(_)).Times(0);
-
- SharedPtr<SetGlobalPropertiesRequest> command(
- CreateCommand<SetGlobalPropertiesRequest>(msg));
-
- EXPECT_CALL(
- app_mngr_,
- ManageMobileCommand(MobileResultCodeIs(mobile_apis::Result::INVALID_DATA),
- am::commands::Command::ORIGIN_SDL));
-
- 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));
- SmartObject vr_help_title(smart_objects::SmartType_Null);
- EXPECT_CALL(*mock_app_, vr_help_title())
- .WillOnce(Return(&vr_help_title))
- .WillOnce(Return(&vr_help_title));
-
- CommandsMap commands_map;
- DataAccessor<CommandsMap> accessor(commands_map, lock_);
- EXPECT_CALL(*mock_app_, commands_map()).WillOnce(Return(accessor));
- const CustomString name("name");
- EXPECT_CALL(*mock_app_, name()).WillOnce(ReturnRef(name));
- EXPECT_CALL(*mock_app_, set_vr_help_title(SmartObject(name)));
- 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));
- SmartObject vr_help_title(smart_objects::SmartType_Null);
- EXPECT_CALL(*mock_app_, vr_help_title())
- .Times(2)
- .WillRepeatedly(Return(&vr_help_title));
-
- CommandsMap commands_map;
- SmartObject command_text(smart_objects::SmartType_Map);
- commands_map[0] = &command_text;
- (*commands_map[0])[am::strings::vr_commands] = SmartObject("one");
- DataAccessor<CommandsMap> accessor(commands_map, lock_);
- EXPECT_CALL(*mock_app_, commands_map()).WillOnce(Return(accessor));
- EXPECT_CALL(*mock_app_, set_vr_help(_));
- const CustomString name("name");
- EXPECT_CALL(*mock_app_, name()).WillOnce(ReturnRef(name));
- EXPECT_CALL(*mock_app_, set_vr_help_title(SmartObject(name)));
- SmartObject vr_help_array(smart_objects::SmartType_Array);
- 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(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_NoVRNoDataFromSynonyms_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));
- SmartObject vr_help_title(smart_objects::SmartType_Null);
- EXPECT_CALL(*mock_app_, vr_help_title())
- .Times(2)
- .WillRepeatedly(Return(&vr_help_title));
-
- CommandsMap commands_map;
- DataAccessor<CommandsMap> accessor(commands_map, lock_);
- EXPECT_CALL(*mock_app_, commands_map()).WillOnce(Return(accessor));
- 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;
- SmartObject vr_synonyms(smart_objects::SmartType_Array);
- vr_synonyms[0] = vr_help_array;
- const CustomString name("name");
- EXPECT_CALL(*mock_app_, name()).WillOnce(ReturnRef(name));
- EXPECT_CALL(*mock_app_, set_vr_help_title(SmartObject(name)));
- 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));
- SmartObject vr_help_title("title");
- EXPECT_CALL(*mock_app_, vr_help_title()).WillOnce(Return(&vr_help_title));
- 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));
-
- 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));
- SmartObject vr_help_title("title");
- EXPECT_CALL(*mock_app_, vr_help_title()).WillOnce(Return(&vr_help_title));
- 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));
- 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));
- SmartObject vr_help_title("title");
- EXPECT_CALL(*mock_app_, vr_help_title()).WillOnce(Return(&vr_help_title));
- 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));
- 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);
-
- 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(kConnectionKey)).Times(0);
- 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));
-
- 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 219ac54a8e..0000000000
--- a/src/components/application_manager/test/commands/mobile/system_request_test.cc
+++ /dev/null
@@ -1,239 +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 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(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(*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(
- 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();
-}
-
-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(app_mngr_, 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(app_mngr_, 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(app_mngr_, 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/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_test.cc b/src/components/application_manager/test/hmi_capabilities_test.cc
index d4f2b954cc..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_[] = {
@@ -581,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..ddd0db2cbe 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,26 +139,35 @@ 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_;
protected:
virtual void InitCommand(const uint32_t& timeout) {
+ timeout_ = timeout;
ON_CALL(app_mngr_, get_settings())
.WillByDefault(ReturnRef(app_mngr_settings_));
ON_CALL(app_mngr_settings_, default_timeout())
- .WillByDefault(ReturnRef(timeout));
+ .WillByDefault(ReturnRef(timeout_));
}
CommandsTest()
- : mock_message_helper_(*am::MockMessageHelper::message_helper_mock()) {
+ : mock_message_helper_(*am::MockMessageHelper::message_helper_mock())
+ , timeout_(0) {
ON_CALL(app_mngr_, hmi_interfaces())
.WillByDefault(ReturnRef(mock_hmi_interfaces_));
ON_CALL(mock_hmi_interfaces_, GetInterfaceFromFunction(_))
@@ -209,6 +225,9 @@ class CommandsTest : public ::testing::Test {
MobileResult::DATA_NOT_AVAILABLE);
link_hmi_to_mob_result(HMIResult::READ_ONLY, MobileResult::READ_ONLY);
}
+
+ private:
+ uint32_t timeout_;
};
MATCHER_P(MobileResultCodeIs, result_code, "") {
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 5bc4ef6a42..626931dcf9 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
@@ -110,6 +110,7 @@ class MockApplication : public ::application_manager::Application {
const mobile_apis::VideoStreamingState::eType());
MOCK_CONST_METHOD0(app_icon_path, const std::string&());
MOCK_CONST_METHOD0(device, connection_handler::DeviceHandle());
+ MOCK_CONST_METHOD0(secondary_device, connection_handler::DeviceHandle());
MOCK_CONST_METHOD0(CurrentHmiState, const application_manager::HmiStatePtr());
MOCK_CONST_METHOD0(RegularHmiState, const application_manager::HmiStatePtr());
MOCK_CONST_METHOD0(PostponedHmiState,
@@ -128,6 +129,8 @@ class MockApplication : public ::application_manager::Application {
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_METHOD1(set_secondary_device,
+ void(connection_handler::DeviceHandle secondary_device));
MOCK_CONST_METHOD0(get_grammar_id, uint32_t());
MOCK_METHOD1(set_grammar_id, void(uint32_t value));
MOCK_METHOD1(
@@ -137,6 +140,10 @@ class MockApplication : public ::application_manager::Application {
::protocol_handler::MajorProtocolVersion());
MOCK_METHOD1(set_is_resuming, void(bool));
MOCK_CONST_METHOD0(is_resuming, bool());
+ MOCK_METHOD1(set_deferred_resumption_hmi_level,
+ void(application_manager::mobile_api::HMILevel::eType level));
+ MOCK_CONST_METHOD0(deferred_resumption_hmi_level,
+ application_manager::mobile_api::HMILevel::eType());
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));
@@ -150,9 +157,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,
@@ -206,9 +210,6 @@ 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*());
@@ -308,7 +309,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&));
@@ -331,11 +331,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..8641a3781e 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
@@ -46,6 +46,12 @@ namespace application_manager {
class MockMessageHelper {
public:
+ MOCK_METHOD2(CreateNotification,
+ smart_objects::SmartObjectSPtr(mobile_apis::FunctionID::eType,
+ uint32_t));
+ MOCK_METHOD1(CreateHMINotification,
+ smart_objects::SmartObjectSPtr(hmi_apis::FunctionID::eType));
+
MOCK_METHOD1(GetHashUpdateNotification,
smart_objects::SmartObjectSPtr(const uint32_t app_id));
MOCK_METHOD2(SendHashUpdateNotification,
@@ -119,6 +125,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 +183,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,
@@ -225,6 +236,12 @@ class MockMessageHelper {
MOCK_METHOD2(SendUIChangeRegistrationRequestToHMI,
void(ApplicationConstSharedPtr app,
ApplicationManager& app_mngr));
+ MOCK_METHOD5(CreateDeviceInfo,
+ bool(connection_handler::DeviceHandle device_handle,
+ const protocol_handler::SessionObserver& session_observer,
+ const policy::PolicyHandlerInterface& policy_handler,
+ ApplicationManager& app_mngr,
+ smart_objects::SmartObject* output));
MOCK_METHOD5(CreateHMIApplicationStruct,
bool(ApplicationConstSharedPtr app,
const protocol_handler::SessionObserver& session_observer,
@@ -288,10 +305,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/mock_resume_ctrl.h b/src/components/application_manager/test/include/application_manager/mock_resume_ctrl.h
index fb264b7d82..907d0c26f2 100644
--- a/src/components/application_manager/test/include/application_manager/mock_resume_ctrl.h
+++ b/src/components/application_manager/test/include/application_manager/mock_resume_ctrl.h
@@ -57,6 +57,7 @@ class MockResumeCtrl : public resumption::ResumeCtrl {
const std::string& hash));
MOCK_METHOD1(StartResumptionOnlyHMILevel,
bool(app_mngr::ApplicationSharedPtr application));
+ MOCK_METHOD1(RetryResumption, void(const uint32_t app_id));
MOCK_METHOD1(CheckPersistenceFilesForResumption,
bool(app_mngr::ApplicationSharedPtr application));
MOCK_METHOD2(CheckApplicationHash,
@@ -96,6 +97,7 @@ class MockResumeCtrl : public resumption::ResumeCtrl {
#ifdef BUILD_TESTS
MOCK_METHOD1(set_resumption_storage,
void(utils::SharedPtr<resumption::ResumptionData> mock_storage));
+ MOCK_CONST_METHOD0(get_resumption_active, bool());
#endif // BUILD_TESTS
};
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..9e2eb75a55 100644
--- a/src/components/application_manager/test/mock_message_helper.cc
+++ b/src/components/application_manager/test/mock_message_helper.cc
@@ -39,6 +39,18 @@
namespace application_manager {
+smart_objects::SmartObjectSPtr MessageHelper::CreateNotification(
+ mobile_apis::FunctionID::eType function_id, uint32_t app_id) {
+ return MockMessageHelper::message_helper_mock()->CreateNotification(
+ function_id, app_id);
+}
+
+smart_objects::SmartObjectSPtr MessageHelper::CreateHMINotification(
+ hmi_apis::FunctionID::eType function_id) {
+ return MockMessageHelper::message_helper_mock()->CreateHMINotification(
+ function_id);
+}
+
void MessageHelper::SendHashUpdateNotification(uint32_t const app_id,
ApplicationManager& app_mngr) {
MockMessageHelper::message_helper_mock()->SendHashUpdateNotification(
@@ -230,7 +242,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 +251,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 +264,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 +324,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(
@@ -418,6 +435,16 @@ void MessageHelper::SendUIChangeRegistrationRequestToHMI(
->SendUIChangeRegistrationRequestToHMI(app, app_mngr);
}
+bool MessageHelper::CreateDeviceInfo(
+ connection_handler::DeviceHandle device_handle,
+ const protocol_handler::SessionObserver& session_observer,
+ const policy::PolicyHandlerInterface& policy_handler,
+ ApplicationManager& app_mngr,
+ smart_objects::SmartObject* output) {
+ return MockMessageHelper::message_helper_mock()->CreateDeviceInfo(
+ device_handle, session_observer, policy_handler, app_mngr, output);
+}
+
bool MessageHelper::CreateHMIApplicationStruct(
ApplicationConstSharedPtr app,
const protocol_handler::SessionObserver& session_observer,
@@ -538,11 +565,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 3b6d0a16be..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
@@ -1006,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_));
@@ -1058,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_));
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 85801d7e73..4a99c75c5b 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_resumption_data.h"
#include "interfaces/MOBILE_API.h"
#include "application_manager/application_manager_impl.h"
@@ -55,14 +56,16 @@ 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 ::testing::ReturnPointee;
+using ::testing::SaveArg;
using namespace application_manager_test;
using namespace resumption;
@@ -80,51 +83,81 @@ 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>())
+ , kDefaultDeferredTestLevel_(eType::INVALID_ENUM)
+ , kNaviLowbandwidthLevel_("LIMITED")
+ , kProjectionLowbandwidthLevel_("NONE")
+ , kMediaLowbandwidthLevel_("NONE") {}
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_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_));
+ EXPECT_CALL(mock_app_mngr_, CheckResumptionRequiredTransportAvailable(_))
+ .Times(AtLeast(0))
+ .WillRepeatedly(Return(true));
ON_CALL(mock_application_manager_settings_, use_db_for_resumption())
.WillByDefault(Return(false));
ON_CALL(mock_application_manager_settings_, app_resuming_timeout())
.WillByDefault(ReturnRef(kAppResumingTimeout_));
+ // use EXPECTED_CALL().Times(AtLeast(0)) instead of ON_CALL to remove
+ // warning messages
+ EXPECT_CALL(mock_application_manager_settings_,
+ navigation_lowbandwidth_resumption_level())
+ .Times(AtLeast(0))
+ .WillRepeatedly(ReturnRef(kNaviLowbandwidthLevel_));
+ EXPECT_CALL(mock_application_manager_settings_,
+ projection_lowbandwidth_resumption_level())
+ .Times(AtLeast(0))
+ .WillRepeatedly(ReturnRef(kProjectionLowbandwidthLevel_));
+ EXPECT_CALL(mock_application_manager_settings_,
+ media_lowbandwidth_resumption_level())
+ .Times(AtLeast(0))
+ .WillRepeatedly(ReturnRef(kMediaLowbandwidthLevel_));
+
+ EXPECT_CALL(*mock_app_, deferred_resumption_hmi_level())
+ .Times(AtLeast(0))
+ .WillRepeatedly(Return(kDefaultDeferredTestLevel_));
}
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<NiceMock<MockApplication> > mock_app_;
application_manager::ApplicationConstSharedPtr const_app_;
const uint32_t kTestAppId_;
const std::string kTestPolicyAppId_;
@@ -136,7 +169,12 @@ class ResumeCtrlTest : public ::testing::Test {
const std::string kHash_;
const uint32_t kAppResumingTimeout_;
const uint32_t kTestTimeStamp_;
+ std::shared_ptr<sync_primitives::Lock> app_set_lock_ptr_;
sync_primitives::Lock app_set_lock_;
+ const mobile_apis::HMILevel::eType kDefaultDeferredTestLevel_;
+ const std::string kNaviLowbandwidthLevel_;
+ const std::string kProjectionLowbandwidthLevel_;
+ const std::string kMediaLowbandwidthLevel_;
};
/**
@@ -151,15 +189,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);
}
@@ -175,16 +213,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);
}
@@ -223,15 +261,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,
@@ -239,7 +277,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);
}
@@ -261,27 +299,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);
}
@@ -302,17 +340,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;
@@ -320,7 +358,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);
}
@@ -354,17 +392,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;
@@ -372,7 +410,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);
}
@@ -386,22 +424,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);
}
@@ -410,7 +448,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;
}
@@ -425,26 +463,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);
}
@@ -470,27 +515,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);
}
@@ -505,33 +549,59 @@ 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);
}
+TEST_F(ResumeCtrlTest, RetryResumption) {
+ const uint32_t app_id = 1;
+
+ EXPECT_CALL(mock_app_mngr_, application(app_id)).WillOnce(Return(mock_app_));
+ EXPECT_CALL(*mock_app_, deferred_resumption_hmi_level())
+ .WillOnce(Return(eType::HMI_FULL));
+
+ res_ctrl_->RetryResumption(app_id);
+
+ bool is_resumption_active = res_ctrl_->get_resumption_active();
+ EXPECT_TRUE(is_resumption_active);
+}
+
+TEST_F(ResumeCtrlTest, RetryResumption_NotDeferred) {
+ const uint32_t app_id = 1;
+
+ EXPECT_CALL(mock_app_mngr_, application(app_id)).WillOnce(Return(mock_app_));
+ EXPECT_CALL(*mock_app_, deferred_resumption_hmi_level())
+ .WillOnce(Return(eType::INVALID_ENUM));
+
+ res_ctrl_->RetryResumption(app_id);
+
+ bool is_resumption_active = res_ctrl_->get_resumption_active();
+ EXPECT_FALSE(is_resumption_active);
+}
+
TEST_F(ResumeCtrlTest, StartAppHmiStateResumption_AppInFull) {
mobile_apis::HMILevel::eType restored_test_type = eType::HMI_FULL;
uint32_t ign_off_count = 0;
@@ -539,7 +609,7 @@ 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;
- EXPECT_CALL(state_controller_, SetRegularState(_, restored_test_type))
+ EXPECT_CALL(mock_state_controller_, SetRegularState(_, restored_test_type))
.Times(AtLeast(1));
GetInfoFromApp();
ON_CALL(*mock_storage_,
@@ -550,9 +620,9 @@ 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));
- res_ctrl_->StartAppHmiStateResumption(app_mock_);
+ res_ctrl_->StartAppHmiStateResumption(mock_app_);
}
TEST_F(ResumeCtrlTest, StartAppHmiStateResumption_AppInBackground) {
@@ -563,13 +633,133 @@ 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(mock_app_);
+}
+
+TEST_F(ResumeCtrlTest, StartAppHmiStateResumption_AppHasDeferredResumption) {
+ mobile_apis::HMILevel::eType restored_test_type = eType::HMI_NONE;
+ mobile_apis::HMILevel::eType deferred_level = eType::HMI_FULL;
+ uint32_t ign_off_count = 0;
+ smart_objects::SmartObject saved_app;
+ saved_app[application_manager::strings::ign_off_count] = ign_off_count;
+ saved_app[application_manager::strings::hmi_level] = restored_test_type;
+
+ // resume into deferred level instead of restored level
+ EXPECT_CALL(mock_state_controller_, SetRegularState(_, deferred_level))
+ .Times(AtLeast(1));
+ GetInfoFromApp();
+ ON_CALL(*mock_storage_,
+ GetSavedApplication(kTestPolicyAppId_, kMacAddress_, _))
+ .WillByDefault(DoAll(SetArgReferee<2>(saved_app), Return(true)));
+
+ mobile_apis::HMILevel::eType app_deferred_level = deferred_level;
+ EXPECT_CALL(*mock_app_, deferred_resumption_hmi_level())
+ .WillRepeatedly(ReturnPointee(&app_deferred_level));
+ EXPECT_CALL(*mock_app_,
+ set_deferred_resumption_hmi_level(eType::INVALID_ENUM))
+ .WillOnce(SaveArg<0>(&app_deferred_level));
+
+ EXPECT_CALL(*mock_storage_,
+ RemoveApplicationFromSaved(kTestPolicyAppId_, kMacAddress_))
+ .WillOnce(Return(true));
+
+ ON_CALL(mock_app_mngr_, GetUserConsentForDevice("12345"))
+ .WillByDefault(Return(policy::kDeviceAllowed));
+ res_ctrl_->StartAppHmiStateResumption(mock_app_);
+}
+
+TEST_F(ResumeCtrlTest,
+ StartAppHmiStateResumption_HighBandwidthTransportNotAvailable) {
+ mobile_apis::HMILevel::eType restored_test_type = eType::HMI_FULL;
+ uint32_t ign_off_count = 0;
+ smart_objects::SmartObject saved_app;
+ saved_app[application_manager::strings::ign_off_count] = ign_off_count;
+ saved_app[application_manager::strings::hmi_level] = restored_test_type;
+
+ EXPECT_CALL(mock_state_controller_, SetRegularState(_, eType::HMI_LIMITED))
+ .Times(AtLeast(1));
GetInfoFromApp();
ON_CALL(*mock_storage_,
GetSavedApplication(kTestPolicyAppId_, kMacAddress_, _))
.WillByDefault(DoAll(SetArgReferee<2>(saved_app), Return(true)));
- res_ctrl_->StartAppHmiStateResumption(app_mock_);
+ EXPECT_CALL(mock_app_mngr_, CheckResumptionRequiredTransportAvailable(_))
+ .WillOnce(Return(false));
+
+ EXPECT_CALL(*mock_app_, is_navi()).WillRepeatedly(Return(true));
+ EXPECT_CALL(*mock_app_, mobile_projection_enabled())
+ .WillRepeatedly(Return(false));
+ EXPECT_CALL(*mock_app_, is_media_application()).WillRepeatedly(Return(false));
+
+ // if resumption is deferred ...
+ EXPECT_CALL(*mock_app_, deferred_resumption_hmi_level())
+ .WillRepeatedly(Return(restored_test_type));
+
+ // ... then RemoveApplicationFromSaved() will not be called
+ EXPECT_CALL(*mock_storage_,
+ RemoveApplicationFromSaved(kTestPolicyAppId_, kMacAddress_))
+ .Times(0);
+
+ ON_CALL(mock_app_mngr_, GetUserConsentForDevice("12345"))
+ .WillByDefault(Return(policy::kDeviceAllowed));
+ res_ctrl_->StartAppHmiStateResumption(mock_app_);
+}
+
+TEST_F(
+ ResumeCtrlTest,
+ StartAppHmiStateResumption_HighBandwidthTransportNotAvailable_NaviAndMedia) {
+ mobile_apis::HMILevel::eType restored_test_type = eType::HMI_LIMITED;
+ uint32_t ign_off_count = 0;
+ smart_objects::SmartObject saved_app;
+ saved_app[application_manager::strings::ign_off_count] = ign_off_count;
+ saved_app[application_manager::strings::hmi_level] = restored_test_type;
+
+ // in this test, it is expected that the app will resume into LIMITED, which
+ // is the higher level among NONE and LIMITED
+ EXPECT_CALL(mock_state_controller_, SetRegularState(_, eType::HMI_LIMITED))
+ .Times(AtLeast(1));
+ GetInfoFromApp();
+ ON_CALL(*mock_storage_,
+ GetSavedApplication(kTestPolicyAppId_, kMacAddress_, _))
+ .WillByDefault(DoAll(SetArgReferee<2>(saved_app), Return(true)));
+
+ EXPECT_CALL(mock_app_mngr_, CheckResumptionRequiredTransportAvailable(_))
+ .WillOnce(Return(false));
+
+ EXPECT_CALL(*mock_app_, is_navi()).WillRepeatedly(Return(true));
+ EXPECT_CALL(*mock_app_, mobile_projection_enabled())
+ .WillRepeatedly(Return(false));
+ EXPECT_CALL(*mock_app_, is_media_application()).WillRepeatedly(Return(true));
+
+ std::string navi_lowbandwidth_level("NONE");
+ std::string projection_lowbandwidth_level("BACKGROUND");
+ std::string media_lowbandwidth_level("LIMITED");
+ EXPECT_CALL(mock_application_manager_settings_,
+ navigation_lowbandwidth_resumption_level())
+ .WillRepeatedly(ReturnRef(navi_lowbandwidth_level));
+ EXPECT_CALL(mock_application_manager_settings_,
+ projection_lowbandwidth_resumption_level())
+ .WillRepeatedly(ReturnRef(projection_lowbandwidth_level));
+ EXPECT_CALL(mock_application_manager_settings_,
+ media_lowbandwidth_resumption_level())
+ .WillRepeatedly(ReturnRef(media_lowbandwidth_level));
+
+ EXPECT_CALL(*mock_app_, deferred_resumption_hmi_level())
+ .WillRepeatedly(Return(restored_test_type));
+
+ EXPECT_CALL(*mock_storage_,
+ RemoveApplicationFromSaved(kTestPolicyAppId_, kMacAddress_))
+ .Times(0);
+
+ ON_CALL(mock_app_mngr_, GetUserConsentForDevice("12345"))
+ .WillByDefault(Return(policy::kDeviceAllowed));
+ res_ctrl_->StartAppHmiStateResumption(mock_app_);
}
/**
@@ -584,18 +774,18 @@ 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();
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(*mock_app_, set_is_resuming(true));
- const bool res = res_ctrl_->RestoreAppHMIState(app_mock_);
+ const bool res = res_ctrl_->RestoreAppHMIState(mock_app_);
EXPECT_TRUE(res);
}
@@ -604,22 +794,52 @@ 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,
+ SetupDefaultHMILevel_HighBandwidthTransportNotAvailable) {
+ smart_objects::SmartObject saved_app;
+
+ saved_app[application_manager::strings::hmi_level] = kDefaultTestLevel_;
+
+ ON_CALL(mock_app_mngr_, GetDefaultHmiLevel(const_app_))
+ .WillByDefault(Return(kDefaultTestLevel_));
+ GetInfoFromApp();
+ EXPECT_CALL(mock_app_mngr_, GetUserConsentForDevice("12345")).Times(0);
+
+ ON_CALL(mock_app_mngr_, GetDefaultHmiLevel(const_app_))
+ .WillByDefault(Return(kDefaultTestLevel_));
+
+ EXPECT_CALL(mock_app_mngr_, CheckResumptionRequiredTransportAvailable(_))
+ .WillRepeatedly(Return(false));
+
+ EXPECT_CALL(*mock_app_, is_navi()).WillRepeatedly(Return(false));
+ EXPECT_CALL(*mock_app_, mobile_projection_enabled())
+ .WillRepeatedly(Return(true));
+ EXPECT_CALL(*mock_app_, is_media_application()).WillRepeatedly(Return(false));
+
+ // SetRegularState() should be called with kProjectionLowbandwidthLevel_
+ EXPECT_CALL(mock_state_controller_, SetRegularState(_, eType::HMI_NONE))
+ .Times(AtLeast(1));
+
+ 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_));
mobile_apis::HMILevel::eType restored_test_type = eType::HMI_FULL;
const uint32_t ign_off_count = 0u;
@@ -628,7 +848,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));
@@ -641,37 +861,37 @@ 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));
- 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);
}
@@ -679,14 +899,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);
}
@@ -694,14 +914,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);
}
@@ -709,15 +929,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);
}
@@ -730,9 +950,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();
}
@@ -744,9 +964,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();
}
@@ -763,14 +983,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 =
@@ -840,7 +1060,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) {
@@ -861,7 +1081,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) {
@@ -878,7 +1098,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
@@ -894,9 +1114,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);
@@ -918,7 +1138,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_) {
@@ -929,7 +1149,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 3b2c0d7b13..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;
@@ -563,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();
}
@@ -570,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(
@@ -584,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;
@@ -595,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);
@@ -604,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;
@@ -615,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);
@@ -623,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_));
@@ -633,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();
@@ -654,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;
@@ -672,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(
@@ -683,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;
@@ -694,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_));
@@ -702,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;
@@ -711,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_,
@@ -720,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"));
@@ -729,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();
@@ -741,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();
@@ -766,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();
@@ -783,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();
@@ -796,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();
@@ -812,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;
@@ -825,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();
@@ -848,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 0f90fe978f..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_));
}
@@ -540,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/sdl_preloaded_pt.json b/src/components/application_manager/test/sdl_preloaded_pt.json
index ced0a9d603..59e3f947c3 100644
--- a/src/components/application_manager/test/sdl_preloaded_pt.json
+++ b/src/components/application_manager/test/sdl_preloaded_pt.json
@@ -297,6 +297,7 @@
"LIMITED"],
"parameters": ["accPedalPosition",
"beltStatus",
+ "electronicParkBrakeStatus",
"driverBraking",
"myKey",
"prndl",
@@ -309,6 +310,7 @@
"LIMITED"],
"parameters": ["accPedalPosition",
"beltStatus",
+ "electronicParkBrakeStatus",
"driverBraking",
"myKey",
"prndl",
@@ -321,6 +323,7 @@
"LIMITED"],
"parameters": ["accPedalPosition",
"beltStatus",
+ "electronicParkBrakeStatus",
"driverBraking",
"myKey",
"prndl",
@@ -333,6 +336,7 @@
"LIMITED"],
"parameters": ["accPedalPosition",
"beltStatus",
+ "electronicParkBrakeStatus",
"driverBraking",
"myKey",
"prndl",
@@ -353,6 +357,7 @@
"engineOilLife",
"engineTorque",
"externalTemperature",
+ "turnSignal",
"fuelLevel",
"fuelLevel_State",
"headLampStatus",
@@ -372,6 +377,7 @@
"engineOilLife",
"engineTorque",
"externalTemperature",
+ "turnSignal",
"fuelLevel",
"fuelLevel_State",
"headLampStatus",
@@ -391,6 +397,7 @@
"engineOilLife",
"engineTorque",
"externalTemperature",
+ "turnSignal",
"fuelLevel",
"fuelLevel_State",
"headLampStatus",
@@ -409,6 +416,7 @@
"engineOilLife",
"engineTorque",
"externalTemperature",
+ "turnSignal",
"fuelLevel",
"fuelLevel_State",
"headLampStatus",
diff --git a/src/components/application_manager/test/sdl_pt_update.json b/src/components/application_manager/test/sdl_pt_update.json
index f87ae40eac..23c75e8475 100644
--- a/src/components/application_manager/test/sdl_pt_update.json
+++ b/src/components/application_manager/test/sdl_pt_update.json
@@ -1433,6 +1433,7 @@
"parameters" : [
"accPedalPosition",
"beltStatus",
+ "electronicParkBrakeStatus",
"driverBraking",
"myKey",
"prndl",
@@ -1445,6 +1446,7 @@
"parameters" : [
"accPedalPosition",
"beltStatus",
+ "electronicParkBrakeStatus",
"driverBraking",
"myKey",
"prndl",
@@ -1457,6 +1459,7 @@
"parameters" : [
"accPedalPosition",
"beltStatus",
+ "electronicParkBrakeStatus",
"driverBraking",
"myKey",
"prndl",
@@ -1469,6 +1472,7 @@
"parameters" : [
"accPedalPosition",
"beltStatus",
+ "electronicParkBrakeStatus",
"driverBraking",
"myKey",
"prndl",
@@ -1590,6 +1594,7 @@
"engineOilLife",
"engineTorque",
"externalTemperature",
+ "turnSignal",
"fuelLevel",
"fuelLevel_State",
"headLampStatus",
@@ -1607,6 +1612,7 @@
"engineOilLife",
"engineTorque",
"externalTemperature",
+ "turnSignal",
"fuelLevel",
"fuelLevel_State",
"headLampStatus",
@@ -1624,6 +1630,7 @@
"engineOilLife",
"engineTorque",
"externalTemperature",
+ "turnSignal",
"fuelLevel",
"fuelLevel_State",
"headLampStatus",
@@ -1640,6 +1647,7 @@
"engineOilLife",
"engineTorque",
"externalTemperature",
+ "turnSignal",
"fuelLevel",
"fuelLevel_State",
"headLampStatus",
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 8a49a2527f..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,7 +77,7 @@ 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_;
@@ -139,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_);
@@ -150,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_;
@@ -159,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_;
@@ -987,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));
}
@@ -1077,8 +1081,8 @@ class StateControllerImplTest : public ::testing::Test {
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(app_mock, CurrentHmiState())
@@ -1136,8 +1140,8 @@ class StateControllerImplTest : public ::testing::Test {
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(app_mock, CurrentHmiState())
@@ -1935,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))
diff --git a/src/components/config_profile/include/config_profile/profile.h b/src/components/config_profile/include/config_profile/profile.h
index 61dddf55b0..4c2be53228 100644
--- a/src/components/config_profile/include/config_profile/profile.h
+++ b/src/components/config_profile/include/config_profile/profile.h
@@ -37,6 +37,7 @@
#include <string>
#include <vector>
#include <list>
+#include <map>
#include "utils/macro.h"
#include "protocol_handler/protocol_handler_settings.h"
#include "connection_handler/connection_handler_settings.h"
@@ -385,6 +386,12 @@ class Profile : public protocol_handler::ProtocolHandlerSettings,
*/
uint16_t transport_manager_tcp_adapter_port() const OVERRIDE;
+ /**
+ * @brief Returns the network interface name for TCP transport adapter
+ */
+ const std::string& transport_manager_tcp_adapter_network_interface()
+ const OVERRIDE;
+
// TransportManageMMESettings interface
const std::string& event_mq_name() const OVERRIDE;
@@ -466,17 +473,39 @@ class Profile : public protocol_handler::ProtocolHandlerSettings,
size_t update_before_hours() const;
#endif // ENABLE_SECURITY
- /**
- * @brief Reads a string value from the profile
- *
- * @param value Result value
- * @param default_value Value to use key wasn't found
- * @param pSection The section to read the value in
- * @param pKey The key whose value needs to be read out
- *
- * @return FALSE if could not read the value out of the profile
- * (then the value is equal \c default_value)
- */
+
+ /**
+ * @brief Returns true multiple transports is enabled
+ */
+ const bool multiple_transports_enabled() const OVERRIDE;
+
+ /**
+ * @brief Returns list of secondary transports available
+ * for the named primary transport
+ */
+ const std::vector<std::string>& secondary_transports_for_bluetooth()
+ const OVERRIDE;
+ const std::vector<std::string>& secondary_transports_for_usb() const OVERRIDE;
+ const std::vector<std::string>& secondary_transports_for_wifi()
+ const OVERRIDE;
+
+ /**
+ * @brief Returns list of allowed transports for the named service
+ */
+ const std::vector<std::string>& audio_service_transports() const OVERRIDE;
+ const std::vector<std::string>& video_service_transports() const OVERRIDE;
+
+ /**
+ * @brief Reads a string value from the profile
+ *
+ * @param value Result value
+ * @param default_value Value to use key wasn't found
+ * @param pSection The section to read the value in
+ * @param pKey The key whose value needs to be read out
+ *
+ * @return FALSE if could not read the value out of the profile
+ * (then the value is equal \c default_value)
+ */
bool ReadStringValue(std::string* value,
const char* default_value,
const char* const pSection,
@@ -520,13 +549,17 @@ class Profile : public protocol_handler::ProtocolHandlerSettings,
* @param pKey The key whose value needs to be read out
* @param out_result Pointer to bool value for result reading Section
* (could be NULL)
+ * @param allow_empty If true, then out_result will be true when the value
+ * contains an empty string.
+ * If false, then out_result will be false in such case.
*
* @return container of values or empty continer
* if could not read the value out of the profile
*/
std::vector<std::string> ReadStringContainer(const char* const pSection,
const char* const pKey,
- bool* out_result) const;
+ bool* out_result,
+ bool allow_empty = false) const;
/**
* @brief Reads an container of hex int values from the profile,
* which handle as "0x01, 0xA0, 0XFF"
@@ -618,6 +651,33 @@ class Profile : public protocol_handler::ProtocolHandlerSettings,
uint16_t open_attempt_timeout_ms_resumption_db() const;
/**
+ * @brief Returns "transport required for resumption" map
+ *
+ * Keys of the map are AppHMIType strings, i.e. "DEFAULT", "COMMUNICATION",
+ * "MEDIA", and so on. The map may contain a special key "EMPTY_APP" for apps
+ * that does not specify any AppHMIType.
+ */
+ const std::map<std::string, std::vector<std::string> >&
+ transport_required_for_resumption_map() const OVERRIDE;
+
+ /**
+ * @brief Returns HMI level for resumption of a NAVIGATION app
+ */
+ const std::string& navigation_lowbandwidth_resumption_level() const OVERRIDE;
+
+ /**
+ * @brief Returns HMI level for resumption of a PROJECTION app
+ */
+ const std::string& projection_lowbandwidth_resumption_level() const OVERRIDE;
+
+ /**
+ * @brief Returns HMI level for resumption of a media app
+ *
+ * Note: this is *not* for AppHMIType = MEDIA.
+ */
+ const std::string& media_lowbandwidth_resumption_level() const OVERRIDE;
+
+ /**
* @brief Returns wait time after device connection
* before app launch request
*/
@@ -714,13 +774,29 @@ class Profile : public protocol_handler::ProtocolHandlerSettings,
* @param pKey The key whose value needs to be read out
*
* @return FALSE if could not read the value out of the profile
- * (then the value is not changed)
+ * (then the value is not changed) or the value was empty
*/
bool ReadValue(std::string* value,
const char* const pSection,
const char* const pKey) const;
/**
+ * @brief Reads a string value from the profile
+ *
+ * This is same as ReadValue(), except that this method will accept an empty
+ * string.
+ *
+ * @param value The value to return
+ * @param pSection The section to read the value in
+ * @param pKey The key whose value needs to be read out
+ *
+ * @return TRUE if the value is read, FALSE if the value is not found
+ */
+ bool ReadValueEmpty(std::string* value,
+ const char* const pSection,
+ const char* const pKey) const;
+
+ /**
* @brief Reads a boolean value from the profile
*
* @param value The value to return
@@ -859,6 +935,7 @@ class Profile : public protocol_handler::ProtocolHandlerSettings,
std::vector<uint32_t> supported_diag_modes_;
std::string system_files_path_;
uint16_t transport_manager_tcp_adapter_port_;
+ std::string transport_manager_tcp_adapter_network_interface_;
std::string tts_delimiter_;
uint32_t audio_data_stopped_timeout_;
uint32_t video_data_stopped_timeout_;
@@ -919,6 +996,11 @@ class Profile : public protocol_handler::ProtocolHandlerSettings,
bool use_db_for_resumption_;
uint16_t attempts_to_open_resumption_db_;
uint16_t open_attempt_timeout_ms_resumption_db_;
+ std::map<std::string, std::vector<std::string> >
+ transport_required_for_resumption_map_;
+ std::string navigation_lowbandwidth_resumption_level_;
+ std::string projection_lowbandwidth_resumption_level_;
+ std::string media_lowbandwidth_resumption_level_;
uint16_t app_launch_wait_time_;
uint16_t app_launch_max_retry_attempt_;
uint16_t app_launch_retry_wait_time_;
@@ -928,6 +1010,12 @@ class Profile : public protocol_handler::ProtocolHandlerSettings,
bool enable_app_launch_ios_;
uint32_t app_tranport_change_timer_;
uint32_t app_tranport_change_timer_addition_;
+ bool multiple_transports_enabled_;
+ std::vector<std::string> secondary_transports_for_bluetooth_;
+ std::vector<std::string> secondary_transports_for_usb_;
+ std::vector<std::string> secondary_transports_for_wifi_;
+ std::vector<std::string> audio_service_transports_;
+ std::vector<std::string> video_service_transports_;
bool error_occured_;
std::string error_description_;
diff --git a/src/components/config_profile/src/profile.cc b/src/components/config_profile/src/profile.cc
index 4137476d63..3f3ec7eb63 100644
--- a/src/components/config_profile/src/profile.cc
+++ b/src/components/config_profile/src/profile.cc
@@ -33,6 +33,7 @@
#include "config_profile/profile.h"
#include <errno.h>
+#include <numeric>
#include <string.h>
#include <stdlib.h>
#include <sstream>
@@ -88,6 +89,12 @@ const char* kSDL4Section = "SDL4";
const char* kSDL5Section = "SDL5";
const char* kResumptionSection = "Resumption";
const char* kAppLaunchSection = "AppLaunch";
+const char* kMultipleTransportsSection = "MultipleTransports";
+const char* kServicesMapSection = "ServicesMap";
+const char* kTransportRequiredForResumptionSection =
+ "TransportRequiredForResumption";
+const char* kLowBandwidthTransportResumptionLevelSection =
+ "LowBandwidthTransportResumptionLevel";
const char* kSDLVersionKey = "SDLVersion";
const char* kHmiCapabilitiesKey = "HMICapabilities";
@@ -146,6 +153,7 @@ const char* kHeartBeatTimeoutKey = "HeartBeatTimeout";
const char* kMaxSupportedProtocolVersionKey = "MaxSupportedProtocolVersion";
const char* kUseLastStateKey = "UseLastState";
const char* kTCPAdapterPortKey = "TCPAdapterPort";
+const char* kTCPAdapterNetworkInterfaceKey = "TCPAdapterNetworkInterface";
const char* kServerPortKey = "ServerPort";
const char* kVideoStreamingPortKey = "VideoStreamingPort";
const char* kAudioStreamingPortKey = "AudioStreamingPort";
@@ -214,6 +222,60 @@ const char* kEnableAppLaunchIOSKey = "EnableAppLaunchIOS";
const char* kAppTransportChangeTimerKey = "AppTransportChangeTimer";
const char* kAppTransportChangeTimerAdditionKey =
"AppTransportChangeTimerAddition";
+const char* kMultipleTransportsEnabledKey = "MultipleTransportsEnabled";
+const char* kSecondaryTransportForBluetoothKey =
+ "SecondaryTransportForBluetooth";
+const char* kSecondaryTransportForUSBKey = "SecondaryTransportForUSB";
+const char* kSecondaryTransportForWiFiKey = "SecondaryTransportForWiFi";
+const char* kAudioServiceTransportsKey = "AudioServiceTransports";
+const char* kVideoServiceTransportsKey = "VideoServiceTransports";
+
+const char* kDefaultTransportRequiredForResumptionKey =
+ "DefaultTransportRequiredForResumption";
+const char* kAppHMITypeDefault = "DEFAULT";
+const char* kCommunicationTransportRequiredForResumptionKey =
+ "CommunicationTransportRequiredForResumption";
+const char* kAppHMITypeCommunication = "COMMUNICATION";
+const char* kMediaTransportRequiredForResumptionKey =
+ "MediaTransportRequiredForResumption";
+const char* kAppHMITypeMedia = "MEDIA";
+const char* kMessagingTransportRequiredForResumptionKey =
+ "MessagingTransportRequiredForResumption";
+const char* kAppHMITypeMessaging = "MESSAGING";
+const char* kNavigationTransportRequiredForResumptionKey =
+ "NavigationTransportRequiredForResumption";
+const char* kAppHMITypeNavigation = "NAVIGATION";
+const char* kInformationTransportRequiredForResumptionKey =
+ "InformationTransportRequiredForResumption";
+const char* kAppHMITypeInformation = "INFORMATION";
+const char* kSocialTransportRequiredForResumptionKey =
+ "SocialTransportRequiredForResumption";
+const char* kAppHMITypeSocial = "SOCIAL";
+const char* kBackgroundProcessTransportRequiredForResumptionKey =
+ "BackgroundProcessTransportRequiredForResumption";
+const char* kAppHMITypeBackgroundProcess = "BACKGROUND_PROCESS";
+const char* kTestingTransportRequiredForResumptionKey =
+ "TestingTransportRequiredForResumption";
+const char* kAppHMITypeTesting = "TESTING";
+const char* kSystemTransportRequiredForResumptionKey =
+ "SystemTransportRequiredForResumption";
+const char* kAppHMITypeSystem = "SYSTEM";
+const char* kProjectionTransportRequiredForResumptionKey =
+ "ProjectionTransportRequiredForResumption";
+const char* kAppHMITypeProjection = "PROJECTION";
+const char* kRemoteControlTransportRequiredForResumptionKey =
+ "RemoteControlTransportRequiredForResumption";
+const char* kAppHMITypeRemoteControl = "REMOTE_CONTROL";
+const char* kEmptyAppTransportRequiredForResumptionKey =
+ "EmptyAppTransportRequiredForResumption";
+const char* kAppHMITypeEmptyApp = "EMPTY_APP";
+const char* kNavigationLowBandwidthResumptionLevelKey =
+ "NavigationLowBandwidthResumptionLevel";
+const char* kProjectionLowBandwidthResumptionLevelKey =
+ "ProjectionLowBandwidthResumptionLevel";
+const char* kMediaLowBandwidthResumptionLevelKey =
+ "MediaLowBandwidthResumptionLevel";
+
#ifdef WEB_HMI
const char* kDefaultLinkToWebHMI = "HMI/index.html";
#endif // WEB_HMI
@@ -237,6 +299,7 @@ const char* kDefaultHubProtocolMask = "com.smartdevicelink.prot";
const char* kDefaultPoolProtocolMask = "com.smartdevicelink.prot";
const char* kDefaultIAPSystemConfig = "/fs/mp/etc/mm/ipod.cfg";
const char* kDefaultIAP2SystemConfig = "/fs/mp/etc/mm/iap2.cfg";
+const char* kDefaultTransportManagerTCPAdapterNetworkInterface = "";
#ifdef ENABLE_SECURITY
const char* kDefaultSecurityProtocol = "TLSv1.2";
@@ -311,6 +374,8 @@ const uint32_t kDefaultAppTransportChangeTimer = 500u;
const uint32_t kDefaultAppTransportChangeTimerAddition = 0u;
const std::string kAllowedSymbols =
"abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ01234567890_.-";
+const bool kDefaultMultipleTransportsEnabled = false;
+const char* kDefaultLowBandwidthResumptionLevel = "NONE";
} // namespace
namespace profile {
@@ -403,6 +468,11 @@ Profile::Profile()
, attempts_to_open_resumption_db_(kDefaultAttemptsToOpenResumptionDB)
, open_attempt_timeout_ms_resumption_db_(
kDefaultOpenAttemptTimeoutMsResumptionDB)
+ , navigation_lowbandwidth_resumption_level_(
+ kDefaultLowBandwidthResumptionLevel)
+ , projection_lowbandwidth_resumption_level_(
+ kDefaultLowBandwidthResumptionLevel)
+ , media_lowbandwidth_resumption_level_(kDefaultLowBandwidthResumptionLevel)
, app_launch_wait_time_(kDefaultAppLaunchWaitTime)
, app_launch_max_retry_attempt_(kDefaultAppLaunchMaxRetryAttempt)
, app_launch_retry_wait_time_(kDefaultAppLaunchRetryWaitTime)
@@ -413,6 +483,7 @@ Profile::Profile()
, app_tranport_change_timer_(kDefaultAppTransportChangeTimer)
, app_tranport_change_timer_addition_(
kDefaultAppTransportChangeTimerAddition)
+ , multiple_transports_enabled_(kDefaultMultipleTransportsEnabled)
, error_occured_(false)
, error_description_() {
// SDL version
@@ -682,6 +753,11 @@ uint16_t Profile::transport_manager_tcp_adapter_port() const {
return transport_manager_tcp_adapter_port_;
}
+const std::string& Profile::transport_manager_tcp_adapter_network_interface()
+ const {
+ return transport_manager_tcp_adapter_network_interface_;
+}
+
const std::string& Profile::tts_delimiter() const {
return tts_delimiter_;
}
@@ -899,6 +975,23 @@ uint16_t Profile::open_attempt_timeout_ms_resumption_db() const {
return open_attempt_timeout_ms_resumption_db_;
}
+const std::map<std::string, std::vector<std::string> >&
+Profile::transport_required_for_resumption_map() const {
+ return transport_required_for_resumption_map_;
+}
+
+const std::string& Profile::navigation_lowbandwidth_resumption_level() const {
+ return navigation_lowbandwidth_resumption_level_;
+}
+
+const std::string& Profile::projection_lowbandwidth_resumption_level() const {
+ return projection_lowbandwidth_resumption_level_;
+}
+
+const std::string& Profile::media_lowbandwidth_resumption_level() const {
+ return media_lowbandwidth_resumption_level_;
+}
+
const uint16_t Profile::app_launch_max_retry_attempt() const {
return app_launch_max_retry_attempt_;
}
@@ -935,6 +1028,31 @@ const uint16_t Profile::wait_time_between_apps() const {
return wait_time_between_apps_;
}
+const bool Profile::multiple_transports_enabled() const {
+ return multiple_transports_enabled_;
+}
+
+const std::vector<std::string>& Profile::secondary_transports_for_bluetooth()
+ const {
+ return secondary_transports_for_bluetooth_;
+}
+
+const std::vector<std::string>& Profile::secondary_transports_for_usb() const {
+ return secondary_transports_for_usb_;
+}
+
+const std::vector<std::string>& Profile::secondary_transports_for_wifi() const {
+ return secondary_transports_for_wifi_;
+}
+
+const std::vector<std::string>& Profile::audio_service_transports() const {
+ return audio_service_transports_;
+}
+
+const std::vector<std::string>& Profile::video_service_transports() const {
+ return video_service_transports_;
+}
+
const bool Profile::ErrorOccured() const {
return error_occured_;
}
@@ -1610,6 +1728,16 @@ void Profile::UpdateValues() {
kTCPAdapterPortKey,
kTransportManagerSection);
+ // Transport manager TCP network interface
+ ReadStringValue(&transport_manager_tcp_adapter_network_interface_,
+ kDefaultTransportManagerTCPAdapterNetworkInterface,
+ kTransportManagerSection,
+ kTCPAdapterNetworkInterfaceKey);
+
+ LOG_UPDATED_VALUE(transport_manager_tcp_adapter_network_interface_,
+ kTCPAdapterNetworkInterfaceKey,
+ kTransportManagerSection);
+
// Event MQ
ReadStringValue(
&event_mq_name_, kDefaultEventMQ, kTransportManagerSection, kEventMQKey);
@@ -1841,6 +1969,84 @@ void Profile::UpdateValues() {
kOpenAttemptTimeoutMsResumptionDBKey,
kResumptionSection);
+ { // read parameters from TransportRequiredForResumption section
+ struct KeyPair {
+ const char* ini_key_name;
+ const char* map_key_name;
+ } keys[] = {
+ {kDefaultTransportRequiredForResumptionKey, kAppHMITypeDefault},
+ {kCommunicationTransportRequiredForResumptionKey,
+ kAppHMITypeCommunication},
+ {kMediaTransportRequiredForResumptionKey, kAppHMITypeMedia},
+ {kMessagingTransportRequiredForResumptionKey, kAppHMITypeMessaging},
+ {kNavigationTransportRequiredForResumptionKey, kAppHMITypeNavigation},
+ {kInformationTransportRequiredForResumptionKey, kAppHMITypeInformation},
+ {kSocialTransportRequiredForResumptionKey, kAppHMITypeSocial},
+ {kBackgroundProcessTransportRequiredForResumptionKey,
+ kAppHMITypeBackgroundProcess},
+ {kTestingTransportRequiredForResumptionKey, kAppHMITypeTesting},
+ {kSystemTransportRequiredForResumptionKey, kAppHMITypeSystem},
+ {kProjectionTransportRequiredForResumptionKey, kAppHMITypeProjection},
+ {kRemoteControlTransportRequiredForResumptionKey,
+ kAppHMITypeRemoteControl},
+ {kEmptyAppTransportRequiredForResumptionKey, kAppHMITypeEmptyApp},
+ {NULL, NULL}};
+ struct KeyPair* entry = keys;
+
+ while (entry->ini_key_name != NULL) {
+ bool exist = false;
+ std::vector<std::string> transport_list =
+ ReadStringContainer(kTransportRequiredForResumptionSection,
+ entry->ini_key_name,
+ &exist,
+ true);
+ if (exist) {
+ transport_required_for_resumption_map_[entry->map_key_name] =
+ transport_list;
+
+ const std::string list_with_comma = std::accumulate(
+ transport_list.begin(),
+ transport_list.end(),
+ std::string(""),
+ [](std::string& first, std::string& second) {
+ return first.empty() ? second : first + ", " + second;
+ });
+ LOG_UPDATED_VALUE(list_with_comma,
+ entry->ini_key_name,
+ kTransportRequiredForResumptionSection);
+ }
+ entry++;
+ }
+ }
+
+ // Read parameters from LowBandwidthTransportResumptionLevel section
+ ReadStringValue(&navigation_lowbandwidth_resumption_level_,
+ kDefaultLowBandwidthResumptionLevel,
+ kLowBandwidthTransportResumptionLevelSection,
+ kNavigationLowBandwidthResumptionLevelKey);
+
+ LOG_UPDATED_VALUE(navigation_lowbandwidth_resumption_level_,
+ kNavigationLowBandwidthResumptionLevelKey,
+ kLowBandwidthTransportResumptionLevelSection);
+
+ ReadStringValue(&projection_lowbandwidth_resumption_level_,
+ kDefaultLowBandwidthResumptionLevel,
+ kLowBandwidthTransportResumptionLevelSection,
+ kProjectionLowBandwidthResumptionLevelKey);
+
+ LOG_UPDATED_VALUE(projection_lowbandwidth_resumption_level_,
+ kProjectionLowBandwidthResumptionLevelKey,
+ kLowBandwidthTransportResumptionLevelSection);
+
+ ReadStringValue(&media_lowbandwidth_resumption_level_,
+ kDefaultLowBandwidthResumptionLevel,
+ kLowBandwidthTransportResumptionLevelSection,
+ kMediaLowBandwidthResumptionLevelKey);
+
+ LOG_UPDATED_VALUE(media_lowbandwidth_resumption_level_,
+ kMediaLowBandwidthResumptionLevelKey,
+ kLowBandwidthTransportResumptionLevelSection);
+
// Read parameters from App Launch section
ReadUIntValue(&app_launch_wait_time_,
kDefaultAppLaunchWaitTime,
@@ -1917,6 +2123,59 @@ void Profile::UpdateValues() {
LOG_UPDATED_VALUE(app_tranport_change_timer_addition_,
kAppTransportChangeTimerAdditionKey,
kMainSection);
+
+ ReadBoolValue(&multiple_transports_enabled_,
+ kDefaultMultipleTransportsEnabled,
+ kMultipleTransportsSection,
+ kMultipleTransportsEnabledKey);
+
+ LOG_UPDATED_BOOL_VALUE(multiple_transports_enabled_,
+ kMultipleTransportsEnabledKey,
+ kMultipleTransportsSection);
+
+ { // Secondary Transports and ServicesMap
+ struct KeyPair {
+ std::vector<std::string>* ini_vector;
+ const char* ini_section_name;
+ const char* ini_key_name;
+ } keys[] = {{&secondary_transports_for_bluetooth_,
+ kMultipleTransportsSection,
+ kSecondaryTransportForBluetoothKey},
+ {&secondary_transports_for_usb_,
+ kMultipleTransportsSection,
+ kSecondaryTransportForUSBKey},
+ {&secondary_transports_for_wifi_,
+ kMultipleTransportsSection,
+ kSecondaryTransportForWiFiKey},
+ {&audio_service_transports_,
+ kServicesMapSection,
+ kAudioServiceTransportsKey},
+ {&video_service_transports_,
+ kServicesMapSection,
+ kVideoServiceTransportsKey},
+ {NULL, NULL, NULL}};
+ struct KeyPair* entry = keys;
+
+ while (entry->ini_vector != NULL) {
+ bool exist = false;
+ std::vector<std::string> profile_entry = ReadStringContainer(
+ entry->ini_section_name, entry->ini_key_name, &exist, true);
+ if (exist) {
+ *entry->ini_vector = profile_entry;
+
+ const std::string list_with_comma = std::accumulate(
+ profile_entry.begin(),
+ profile_entry.end(),
+ std::string(""),
+ [](std::string& first, std::string& second) {
+ return first.empty() ? second : first + ", " + second;
+ });
+ LOG_UPDATED_VALUE(
+ list_with_comma, entry->ini_key_name, entry->ini_section_name);
+ }
+ entry++;
+ }
+ }
}
bool Profile::ReadValue(bool* value,
@@ -1944,15 +2203,22 @@ bool Profile::ReadValue(std::string* value,
const char* const pSection,
const char* const pKey) const {
DCHECK(value);
+ return ReadValueEmpty(value, pSection, pKey) && "\0" != *value;
+}
+
+bool Profile::ReadValueEmpty(std::string* value,
+ const char* const pSection,
+ const char* const pKey) const {
+ DCHECK(value);
bool ret = false;
char buf[INI_LINE_LEN + 1];
*buf = '\0';
- if ((0 != ini_read_value(config_file_name_.c_str(), pSection, pKey, buf)) &&
- ('\0' != *buf)) {
+ if (0 != ini_read_value(config_file_name_.c_str(), pSection, pKey, buf)) {
*value = buf;
ret = true;
}
+
return ret;
}
@@ -2014,6 +2280,18 @@ namespace {
int32_t hex_to_int(const std::string& value) {
return static_cast<int32_t>(strtol(value.c_str(), NULL, 16));
}
+
+std::string trim_string(const std::string& str) {
+ const char* delims = " \t";
+
+ size_t start = str.find_first_not_of(delims);
+ if (std::string::npos == start) {
+ return std::string();
+ }
+ size_t end = str.find_last_not_of(delims);
+
+ return str.substr(start, end - start + 1);
+}
}
std::vector<int> Profile::ReadIntContainer(const char* const pSection,
@@ -2031,9 +2309,15 @@ std::vector<int> Profile::ReadIntContainer(const char* const pSection,
std::vector<std::string> Profile::ReadStringContainer(
const char* const pSection,
const char* const pKey,
- bool* out_result) const {
+ bool* out_result,
+ bool allow_empty) const {
std::string string;
- const bool result = ReadValue(&string, pSection, pKey);
+ bool result;
+ if (allow_empty) {
+ result = ReadValueEmpty(&string, pSection, pKey);
+ } else {
+ result = ReadValue(&string, pSection, pKey);
+ }
if (out_result)
*out_result = result;
std::vector<std::string> value_container;
@@ -2043,7 +2327,7 @@ std::vector<std::string> Profile::ReadStringContainer(
while (iss) {
if (!getline(iss, temp_str, ','))
break;
- value_container.push_back(temp_str);
+ value_container.push_back(trim_string(temp_str));
}
}
return value_container;
diff --git a/src/components/config_profile/test/profile_test.cc b/src/components/config_profile/test/profile_test.cc
index e7d62f4740..64bafdd6bf 100644
--- a/src/components/config_profile/test/profile_test.cc
+++ b/src/components/config_profile/test/profile_test.cc
@@ -690,10 +690,34 @@ TEST_F(ProfileTest, CheckStringContainer) {
std::vector<std::string>::iterator element_mode = diagmodes_list.begin();
element_mode++;
element_mode++;
- diag_mode = std::find(diagmodes_list.begin(), diagmodes_list.end(), " 0x03");
+ diag_mode = std::find(diagmodes_list.begin(), diagmodes_list.end(), "0x03");
EXPECT_EQ(diag_mode, element_mode);
}
+TEST_F(ProfileTest, CheckStringContainerEmpty) {
+ // Set new config file
+ profile_.set_config_file_name("smartDeviceLink_test.ini");
+ EXPECT_EQ("smartDeviceLink_test.ini", profile_.config_file_name());
+
+ bool isread = false;
+ std::vector<std::string> output_list =
+ profile_.ReadStringContainer("MAIN", "AppConfigFolder", &isread);
+ EXPECT_FALSE(isread);
+ EXPECT_TRUE(output_list.empty());
+
+ isread = false;
+ std::vector<std::string> output_list2 =
+ profile_.ReadStringContainer("MAIN", "AppConfigFolder", &isread, true);
+ EXPECT_TRUE(isread);
+ EXPECT_TRUE(output_list2.empty());
+
+ isread = false;
+ std::vector<std::string> output_list3 =
+ profile_.ReadStringContainer("MAIN", "DoesNotExistKey", &isread, true);
+ EXPECT_FALSE(isread);
+ EXPECT_TRUE(output_list2.empty());
+}
+
#ifdef ENABLE_SECURITY
TEST_F(ProfileTest, CheckIntContainerInSecurityData) {
// Set new config file
diff --git a/src/components/connection_handler/include/connection_handler/connection.h b/src/components/connection_handler/include/connection_handler/connection.h
index 9b72d60776..a2309c1521 100644
--- a/src/components/connection_handler/include/connection_handler/connection.h
+++ b/src/components/connection_handler/include/connection_handler/connection.h
@@ -72,13 +72,18 @@ typedef std::map<int32_t, Connection*> ConnectionList;
*/
struct Service {
protocol_handler::ServiceType service_type;
+ transport_manager::ConnectionUID connection_id;
bool is_protected_;
Service()
: service_type(protocol_handler::kInvalidServiceType)
+ , connection_id(0)
, is_protected_(false) {}
- explicit Service(protocol_handler::ServiceType service_type)
- : service_type(service_type), is_protected_(false) {}
+ explicit Service(protocol_handler::ServiceType service_type,
+ transport_manager::ConnectionUID connection_id)
+ : service_type(service_type)
+ , connection_id(connection_id)
+ , is_protected_(false) {}
bool operator==(const protocol_handler::ServiceType service_type) const {
return this->service_type == service_type;
@@ -154,9 +159,11 @@ class Connection {
/**
* @brief Adds session to connection
+ * @param connection_handle Connection Handle for the session
* @return new session id or 0 in case of issues
*/
- uint32_t AddNewSession();
+ uint32_t AddNewSession(
+ const transport_manager::ConnectionUID connection_handle);
/**
* @brief Removes session from connection
@@ -171,11 +178,13 @@ class Connection {
* @param session_id session ID
* @param service_type Type of service
* @param is_protected protection state
+ * @param connection_id Connection ID associated with the service
* @return TRUE on success, otherwise FALSE
*/
bool AddNewService(uint8_t session_id,
protocol_handler::ServiceType service_type,
- const bool is_protected);
+ const bool is_protected,
+ transport_manager::ConnectionUID connection_id);
/**
* @brief Removes service from session
* @param session_id session ID
@@ -184,6 +193,18 @@ class Connection {
*/
bool RemoveService(uint8_t session_id,
protocol_handler::ServiceType service_type);
+
+ /**
+ * @brief Removes secondary service from session
+ * @param secondary_connection_handle connection identifying services to be
+ * removed
+ * @param removed_services_list Returned: List of service types removed
+ * @return the session ID associated with the services removed
+ */
+ uint8_t RemoveSecondaryServices(
+ transport_manager::ConnectionUID secondary_connection_handle,
+ std::list<protocol_handler::ServiceType>& removed_services_list);
+
#ifdef ENABLE_SECURITY
/**
* @brief Sets crypto context of service
@@ -213,10 +234,11 @@ class Connection {
const protocol_handler::ServiceType& service_type);
#endif // ENABLE_SECURITY
- /**
- * @brief Returns map of sessions which have been opened in
- * current connection.
- */
+
+ /**
+ * @brief Returns map of sessions which have been opened in
+ * current connection.
+ */
const SessionMap session_map() const;
/**
@@ -283,6 +305,20 @@ class Connection {
*/
bool ProtocolVersion(uint8_t session_id, uint8_t& protocol_version);
+ /**
+ * @brief Returns the primary connection handle associated with this
+ * connection
+ * @return ConnectionHandle
+ */
+ ConnectionHandle primary_connection_handle() const;
+
+ /**
+ * @brief Sets the primary connection handle
+ * @param primary_connection_handle the primary connection handle to
+ * associate with this connection
+ */
+ void SetPrimaryConnectionHandle(ConnectionHandle primary_connection_handle);
+
private:
/**
* @brief Current connection handler.
@@ -307,6 +343,11 @@ class Connection {
mutable sync_primitives::Lock session_map_lock_;
/**
+ * @brief primary connection handle for secondary connections
+ */
+ ConnectionHandle primary_connection_handle_;
+
+ /**
* @brief monitor that closes connection if there is no traffic over it
*/
HeartBeatMonitor* heartbeat_monitor_;
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..121d5ed08c 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
@@ -54,11 +54,14 @@
#include "utils/stl_utils.h"
#include "utils/rwlock.h"
+const transport_manager::ConnectionUID kDisabledSecondary = 0xFFFFFFFF;
+
/**
* \namespace connection_handler
* \brief SmartDeviceLink connection_handler namespace.
*/
namespace connection_handler {
+
/**
* \class ConnectionHandlerImpl
* \brief SmartDeviceLink connection_handler main class
@@ -274,6 +277,24 @@ class ConnectionHandlerImpl
void OnMalformedMessageCallback(const uint32_t& connection_key) OVERRIDE;
/**
+ * @brief Converts connection handle to transport type string used in
+ * smartDeviceLink.ini file, e.g. "TCP_WIFI"
+ * @param connection_handle A connection identifier
+ * @return string representation of the transport of the device
+ */
+ const std::string TransportTypeProfileStringFromConnHandle(
+ transport_manager::ConnectionUID connection_handle) const;
+
+ /**
+ * @brief Converts device handle to transport type string used in
+ * smartDeviceLink.ini file, e.g. "TCP_WIFI"
+ * @param device_handle A device handle
+ * @return string representation of the transport of the device
+ */
+ const std::string TransportTypeProfileStringFromDeviceHandle(
+ DeviceHandle device_handle) const;
+
+ /**
* \brief Creates unique identifier of session (can be used as hash)
* from given connection identifier
* within which session exists and session number.
@@ -503,26 +524,49 @@ 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();
DevicesDiscoveryStarter& get_device_discovery_starter();
/**
+ * \brief Add a session. This is meant to be called from Connection class.
+ * \param primary_transport_id the primary connection ID to associate with the
+ * newly created session
+ * \return new session id, or 0 if failed
+ **/
+ uint32_t AddSession(
+ const transport_manager::ConnectionUID primary_transport_id) OVERRIDE;
+
+ /**
+ * \brief Remove a session. This is meant to be called from Connection class.
+ * \param session_id ID of the session to remove
+ * \return true if successful, false otherwise
+ **/
+ bool RemoveSession(uint8_t session_id) OVERRIDE;
+
+ DataAccessor<SessionConnectionMap> session_connection_map() OVERRIDE;
+
+ /**
+ * \brief Associate a secondary transport ID with a session
+ * \param session_id the session ID
+ * \param connection_id the new secondary connection ID to associate with the
+ * session
+ * \return the SessionTransports (newly) associated with the session
+ **/
+ SessionTransports SetSecondaryTransportID(
+ uint8_t session_id,
+ transport_manager::ConnectionUID secondary_transport_id) OVERRIDE;
+
+ /**
+ * \brief Retrieve the session transports associated with a session
+ * \param session_id the session ID
+ * \return the SessionTransports associated with the session
+ **/
+ const SessionTransports GetSessionTransports(
+ uint8_t session_id) const OVERRIDE;
+
+ /**
* \brief Invoked when observer's OnServiceStartedCallback is completed
* \param session_key the key of started session passed to
* OnServiceStartedCallback().
@@ -538,6 +582,28 @@ class ConnectionHandlerImpl
bool result,
std::vector<std::string>& rejected_params);
+ /**
+ * \brief Called when secondary transport with given session ID is established
+ * \param primary_connection_handle Set to identifier of primary connection
+ * \param secondary_connection_handle Identifier of secondary connection
+ * \param sessionid session ID taken from Register Secondary Transport frame
+ **/
+ bool OnSecondaryTransportStarted(
+ transport_manager::ConnectionUID& primary_connection_handle,
+ const transport_manager::ConnectionUID secondary_connection_handle,
+ const uint8_t session_id) OVERRIDE;
+
+ /**
+ * \brief Called when secondary transport shuts down
+ * \param primary_connection_handle Identifier of primary connection
+ * \param secondary_connection_handle Identifier of secondary connection
+ * transport
+ **/
+ void OnSecondaryTransportEnded(
+ const transport_manager::ConnectionUID primary_connection_handle,
+ const transport_manager::ConnectionUID secondary_connection_handle)
+ OVERRIDE;
+
private:
/**
* \brief Disconnect application.
@@ -549,6 +615,9 @@ class ConnectionHandlerImpl
void OnConnectionEnded(const transport_manager::ConnectionUID connection_id);
+ const uint8_t GetSessionIdFromSecondaryTransport(
+ transport_manager::ConnectionUID secondary_transport_id) const;
+
const ConnectionHandlerSettings& settings_;
/**
* \brief Pointer to observer
@@ -568,6 +637,13 @@ class ConnectionHandlerImpl
DeviceMap device_list_;
/**
+ * @brief session/connection map
+ */
+ SessionConnectionMap session_connection_map_;
+ mutable std::shared_ptr<sync_primitives::Lock>
+ session_connection_map_lock_ptr_;
+
+ /**
* \brief List of connections
*/
ConnectionList connection_list_;
@@ -587,6 +663,11 @@ class ConnectionHandlerImpl
std::map<uint32_t, protocol_handler::SessionContext>
start_service_context_map_;
+ /**
+ * @brief connection object as it's being closed
+ */
+ Connection* ending_connection_;
+
#ifdef BUILD_TESTS
// Methods for test usage
public:
@@ -595,6 +676,9 @@ class ConnectionHandlerImpl
void addDeviceConnection(
const transport_manager::DeviceInfo& device_info,
const transport_manager::ConnectionUID connection_id);
+ SessionConnectionMap& getSessionConnectionMap() {
+ return session_connection_map_;
+ }
#endif
private:
DISALLOW_COPY_AND_ASSIGN(ConnectionHandlerImpl);
diff --git a/src/components/connection_handler/src/connection.cc b/src/components/connection_handler/src/connection.cc
index 614120312a..b8399b2c9b 100644
--- a/src/components/connection_handler/src/connection.cc
+++ b/src/components/connection_handler/src/connection.cc
@@ -82,6 +82,7 @@ Connection::Connection(ConnectionHandle connection_handle,
, connection_handle_(connection_handle)
, connection_device_handle_(connection_device_handle)
, session_map_lock_(true)
+ , primary_connection_handle_(0)
, heartbeat_timeout_(heartbeat_timeout) {
LOG4CXX_AUTO_TRACE(logger_);
DCHECK(connection_handler_);
@@ -97,39 +98,62 @@ Connection::~Connection() {
heart_beat_monitor_thread_->join();
delete heartbeat_monitor_;
threads::DeleteThread(heart_beat_monitor_thread_);
- sync_primitives::AutoLock lock(session_map_lock_);
- session_map_.clear();
-}
-// Finds a key not presented in std::map<unsigned char, T>
-// Returns 0 if that key not found
-namespace {
-template <class T>
-uint32_t findGap(const std::map<unsigned char, T>& map) {
- for (uint32_t i = 1; i <= UCHAR_MAX; ++i) {
- if (map.find(i) == map.end()) {
- return i;
- }
+ // Before clearing out the session_map_, we must remove all sessions
+ // associated with this Connection from the SessionConnectionMap.
+
+ // NESTED LOCK: make sure to lock session_map_lock_ then ConnectionHandler's
+ // session_connection_map_lock_ptr_ (which will be taken in RemoveSession).
+ sync_primitives::AutoLock lock(session_map_lock_);
+ SessionMap::iterator session_it = session_map_.begin();
+ while (session_it != session_map_.end()) {
+ LOG4CXX_INFO(
+ logger_,
+ "Removed Session ID "
+ << static_cast<int>(session_it->first)
+ << " from Session/Connection Map in Connection Destructor");
+ connection_handler_->RemoveSession(session_it->first);
+ session_it++;
}
- return 0;
+
+ session_map_.clear();
}
-} // namespace
-uint32_t Connection::AddNewSession() {
+uint32_t Connection::AddNewSession(
+ const transport_manager::ConnectionUID connection_handle) {
LOG4CXX_AUTO_TRACE(logger_);
+
+ // NESTED LOCK: make sure to lock session_map_lock_ then ConnectionHandler's
+ // session_connection_map_lock_ptr_ (which will be taken in AddSession)
sync_primitives::AutoLock lock(session_map_lock_);
- const uint32_t session_id = findGap(session_map_);
+
+ // Even though we have our own SessionMap, we use the Connection Handler's
+ // SessionConnectionMap to generate a session ID. We want to make sure that
+ // session IDs are globally unique, and not only unique within a Connection.
+ const uint32_t session_id =
+ connection_handler_->AddSession(connection_handle);
if (session_id > 0) {
Session& new_session = session_map_[session_id];
new_session.protocol_version = ::protocol_handler::PROTOCOL_VERSION_2;
- new_session.service_list.push_back(Service(protocol_handler::kRpc));
- new_session.service_list.push_back(Service(protocol_handler::kBulk));
+ new_session.service_list.push_back(
+ Service(protocol_handler::kRpc, connection_handle));
+ new_session.service_list.push_back(
+ Service(protocol_handler::kBulk, connection_handle));
}
+
return session_id;
}
uint32_t Connection::RemoveSession(uint8_t session_id) {
+ LOG4CXX_AUTO_TRACE(logger_);
+
+ // Again, a NESTED lock, but it follows the rules.
sync_primitives::AutoLock lock(session_map_lock_);
+
+ if (!connection_handler_->RemoveSession(session_id)) {
+ return 0;
+ }
+
SessionMap::iterator it = session_map_.find(session_id);
if (session_map_.end() == it) {
LOG4CXX_WARN(logger_, "Session not found in this connection!");
@@ -137,12 +161,14 @@ uint32_t Connection::RemoveSession(uint8_t session_id) {
}
heartbeat_monitor_->RemoveSession(session_id);
session_map_.erase(session_id);
+
return session_id;
}
bool Connection::AddNewService(uint8_t session_id,
protocol_handler::ServiceType service_type,
- const bool request_protection) {
+ const bool request_protection,
+ transport_manager::ConnectionUID connection_id) {
// Ignore wrong services
if (protocol_handler::kControl == service_type ||
protocol_handler::kInvalidServiceType == service_type) {
@@ -152,7 +178,9 @@ bool Connection::AddNewService(uint8_t session_id,
LOG4CXX_DEBUG(logger_,
"Add service " << service_type << " for session "
- << static_cast<uint32_t>(session_id));
+ << static_cast<uint32_t>(session_id)
+ << " using connection ID "
+ << static_cast<uint32_t>(connection_id));
sync_primitives::AutoLock lock(session_map_lock_);
SessionMap::iterator session_it = session_map_.find(session_id);
@@ -201,7 +229,7 @@ bool Connection::AddNewService(uint8_t session_id,
#endif // ENABLE_SECURITY
}
// id service is not exists
- session.service_list.push_back(Service(service_type));
+ session.service_list.push_back(Service(service_type, connection_id));
return true;
}
@@ -246,6 +274,63 @@ bool Connection::RemoveService(uint8_t session_id,
return true;
}
+uint8_t Connection::RemoveSecondaryServices(
+ transport_manager::ConnectionUID secondary_connection_handle,
+ std::list<protocol_handler::ServiceType>& removed_services_list) {
+ LOG4CXX_AUTO_TRACE(logger_);
+
+ uint8_t found_session_id = 0;
+ sync_primitives::AutoLock lock(session_map_lock_);
+
+ LOG4CXX_INFO(logger_,
+ "RemoveSecondaryServices looking for services on Connection ID "
+ << static_cast<int>(secondary_connection_handle));
+
+ // Walk the SessionMap in the primary connection, and for each
+ // Session, we walk its ServiceList, looking for all the services
+ // that were running on the now-closed Secondary Connection.
+ for (SessionMap::iterator session_it = session_map_.begin();
+ session_map_.end() != session_it;
+ ++session_it) {
+ LOG4CXX_INFO(logger_,
+ "RemoveSecondaryServices found session ID "
+ << static_cast<int>(session_it->first));
+
+ // Now, for each session, walk the its ServiceList, looking for services
+ // that were using secondary)_connection_handle. If we find such a service,
+ // set session_found and break out of the outer loop.
+ ServiceList& service_list = session_it->second.service_list;
+ ServiceList::iterator service_it = service_list.begin();
+ for (; service_it != service_list.end();) {
+ LOG4CXX_INFO(logger_,
+ "RemoveSecondaryServices found service ID "
+ << static_cast<int>(service_it->service_type));
+ if (service_it->connection_id == secondary_connection_handle) {
+ found_session_id = session_it->first;
+
+ LOG4CXX_INFO(logger_,
+ "RemoveSecondaryServices removing Service "
+ << static_cast<int>(service_it->service_type)
+ << " in session "
+ << static_cast<int>(found_session_id));
+
+ removed_services_list.push_back(service_it->service_type);
+ service_it = service_list.erase(service_it);
+ } else {
+ service_it++;
+ }
+ }
+
+ // If we found a session that had services running on the secondary
+ // connection, we're done.
+ if (found_session_id != 0) {
+ break;
+ }
+ }
+
+ return found_session_id;
+}
+
#ifdef ENABLE_SECURITY
int Connection::SetSSLContext(uint8_t session_id,
security_manager::SSLContext* context) {
@@ -405,6 +490,15 @@ bool Connection::ProtocolVersion(uint8_t session_id,
return true;
}
+ConnectionHandle Connection::primary_connection_handle() const {
+ return primary_connection_handle_;
+}
+
+void Connection::SetPrimaryConnectionHandle(
+ ConnectionHandle primary_connection_handle) {
+ primary_connection_handle_ = primary_connection_handle;
+}
+
void Connection::StartHeartBeat(uint8_t session_id) {
heartbeat_monitor_->AddSession(session_id);
}
diff --git a/src/components/connection_handler/src/connection_handler_impl.cc b/src/components/connection_handler/src/connection_handler_impl.cc
index 9de541df3a..270b38d724 100644
--- a/src/components/connection_handler/src/connection_handler_impl.cc
+++ b/src/components/connection_handler/src/connection_handler_impl.cc
@@ -68,11 +68,14 @@ ConnectionHandlerImpl::ConnectionHandlerImpl(
, connection_handler_observer_(NULL)
, transport_manager_(tm)
, protocol_handler_(NULL)
+ , session_connection_map_lock_ptr_(
+ std::make_shared<sync_primitives::Lock>(true))
, connection_list_lock_()
, connection_handler_observer_lock_()
, connection_list_deleter_(&connection_list_)
, start_service_context_map_lock_()
- , start_service_context_map_() {}
+ , start_service_context_map_()
+ , ending_connection_(NULL) {}
ConnectionHandlerImpl::~ConnectionHandlerImpl() {
LOG4CXX_AUTO_TRACE(logger_);
@@ -316,6 +319,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();
@@ -361,7 +365,7 @@ uint32_t ConnectionHandlerImpl::OnSessionStartedCallback(
Connection* connection = it->second;
if ((0 == session_id) && (protocol_handler::kRpc == service_type)) {
- new_session_id = connection->AddNewSession();
+ new_session_id = connection->AddNewSession(connection_handle);
if (0 == new_session_id) {
LOG4CXX_ERROR(logger_, "Couldn't start new session!");
return 0;
@@ -370,7 +374,8 @@ uint32_t ConnectionHandlerImpl::OnSessionStartedCallback(
*hash_id = KeyFromPair(connection_handle, new_session_id);
}
} else { // Could be create new service or protected exists one
- if (!connection->AddNewService(session_id, service_type, is_protected)) {
+ if (!connection->AddNewService(
+ session_id, service_type, is_protected, connection_handle)) {
LOG4CXX_ERROR(logger_,
"Couldn't establish "
#ifdef ENABLE_SECURITY
@@ -413,7 +418,33 @@ void ConnectionHandlerImpl::OnSessionStartedCallback(
LOG4CXX_AUTO_TRACE(logger_);
std::vector<std::string> rejected_params;
- protocol_handler::SessionContext context(connection_handle,
+
+ // In case this is a Session running on a Secondary Transport, we need to
+ // find the Sessions's primary transport. In this case, "connection_handle"
+ // reflects the secondary transport, which we need for the various callbacks,
+ // so they can send appropriate Ack or NAK messages on the correct transport.
+ transport_manager::ConnectionUID primary_connection_handle =
+ connection_handle;
+ if (session_id != 0) {
+ SessionTransports st = GetSessionTransports(session_id);
+ if (st.primary_transport == 0) {
+ LOG4CXX_WARN(logger_,
+ "OnSessionStartedCallback could not find Session in the "
+ "Session/Connection Map!");
+ } else {
+ LOG4CXX_INFO(logger_,
+ "OnSessionStartedCallback found session "
+ << static_cast<int>(session_id)
+ << " with primary connection "
+ << static_cast<int>(st.primary_transport)
+ << " and secondary connection "
+ << static_cast<int>(st.secondary_transport));
+ primary_connection_handle = st.primary_transport;
+ }
+ }
+
+ protocol_handler::SessionContext context(primary_connection_handle,
+ connection_handle,
session_id,
0,
service_type,
@@ -427,7 +458,8 @@ void ConnectionHandlerImpl::OnSessionStartedCallback(
}
#endif // ENABLE_SECURITY
sync_primitives::AutoReadLock lock(connection_list_lock_);
- ConnectionList::iterator it = connection_list_.find(connection_handle);
+ ConnectionList::iterator it =
+ connection_list_.find(primary_connection_handle);
if (connection_list_.end() == it) {
LOG4CXX_ERROR(logger_, "Unknown connection!");
protocol_handler_->NotifySessionStarted(context, rejected_params);
@@ -439,15 +471,18 @@ void ConnectionHandlerImpl::OnSessionStartedCallback(
!connection->SessionServiceExists(session_id, service_type);
if ((0 == session_id) && (protocol_handler::kRpc == service_type)) {
- context.new_session_id_ = connection->AddNewSession();
+ context.new_session_id_ =
+ connection->AddNewSession(primary_connection_handle);
if (0 == context.new_session_id_) {
LOG4CXX_ERROR(logger_, "Couldn't start new session!");
protocol_handler_->NotifySessionStarted(context, rejected_params);
return;
}
- context.hash_id_ = KeyFromPair(connection_handle, context.new_session_id_);
+ context.hash_id_ =
+ KeyFromPair(primary_connection_handle, context.new_session_id_);
} else { // Could be create new service or protected exists one
- if (!connection->AddNewService(session_id, service_type, is_protected)) {
+ if (!connection->AddNewService(
+ session_id, service_type, is_protected, connection_handle)) {
LOG4CXX_ERROR(logger_,
"Couldn't establish "
#ifdef ENABLE_SECURITY
@@ -464,15 +499,7 @@ void ConnectionHandlerImpl::OnSessionStartedCallback(
sync_primitives::AutoReadLock read_lock(connection_handler_observer_lock_);
if (connection_handler_observer_) {
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);
- }
+ KeyFromPair(primary_connection_handle, context.new_session_id_);
{
sync_primitives::AutoLock auto_lock(start_service_context_map_lock_);
@@ -509,10 +536,12 @@ void ConnectionHandlerImpl::NotifyServiceStartedResult(
start_service_context_map_.erase(it);
}
+ // We need the context's primary connection so we can manage its services list
Connection* connection = NULL;
{
sync_primitives::AutoReadLock lock(connection_list_lock_);
- ConnectionList::iterator it = connection_list_.find(context.connection_id_);
+ ConnectionList::iterator it =
+ connection_list_.find(context.primary_connection_id_);
if (connection_list_.end() == it) {
LOG4CXX_ERROR(logger_, "connection not found");
return;
@@ -545,6 +574,28 @@ void ConnectionHandlerImpl::OnApplicationFloodCallBack(
uint8_t session_id = 0;
PairFromKey(connection_key, &connection_handle, &session_id);
+ // In case this is a Session running on a Secondary Transport,
+ // "connection_handle" will reflect the active (secondary) transport.
+ // To close the conneciton and its sessions properly, we need to find
+ // the Sessions's primary transport/connection.
+ if (session_id != 0) {
+ SessionTransports st = GetSessionTransports(session_id);
+ if (st.primary_transport == 0) {
+ LOG4CXX_WARN(logger_,
+ "OnApplicationFloodCallBack could not find Session in the "
+ "Session/Connection Map!");
+ } else {
+ LOG4CXX_INFO(logger_,
+ "OnApplicationFloodCallBack found session "
+ << static_cast<int>(session_id)
+ << " with primary connection "
+ << static_cast<int>(st.primary_transport)
+ << " and secondary connection "
+ << static_cast<int>(st.secondary_transport));
+ connection_handle = st.primary_transport;
+ }
+ }
+
LOG4CXX_INFO(logger_, "Disconnect flooding application");
if (session_id != 0) {
CloseSession(connection_handle, session_id, kFlood);
@@ -562,6 +613,28 @@ void ConnectionHandlerImpl::OnMalformedMessageCallback(
uint8_t session_id = 0;
PairFromKey(connection_key, &connection_handle, &session_id);
+ // In case this is a Session running on a Secondary Transport,
+ // "connection_handle" will reflect the active (secondary) transport.
+ // To close the conneciton and its sessions properly, we need to find
+ // the Sessions's primary transport/connection.
+ if (session_id != 0) {
+ SessionTransports st = GetSessionTransports(session_id);
+ if (st.primary_transport == 0) {
+ LOG4CXX_WARN(logger_,
+ "OnMalformedMessageCallback could not find Session in the "
+ "Session/Connection Map!");
+ } else {
+ LOG4CXX_INFO(logger_,
+ "OnMalformedMessageCallback found session "
+ << static_cast<int>(session_id)
+ << " with primary connection "
+ << static_cast<int>(st.primary_transport)
+ << " and secondary connection "
+ << static_cast<int>(st.secondary_transport));
+ connection_handle = st.primary_transport;
+ }
+ }
+
LOG4CXX_INFO(logger_, "Disconnect malformed messaging application");
CloseConnectionSessions(connection_handle, kMalformed);
CloseConnection(connection_handle);
@@ -584,8 +657,33 @@ uint32_t ConnectionHandlerImpl::OnSessionEndedCallback(
const protocol_handler::ServiceType& service_type) {
LOG4CXX_AUTO_TRACE(logger_);
+ // In case this is a Session running on a Secondary Transport, we need to
+ // find the Sessions's primary transport. In this case, "connection_handle"
+ // reflects the secondary transport, which we need for the various callbacks,
+ // so they can send appropriate Ack or NAK messages on the correct transport.
+ transport_manager::ConnectionUID primary_connection_handle =
+ connection_handle;
+ if (session_id != 0) {
+ SessionTransports st = GetSessionTransports(session_id);
+ if (st.primary_transport == 0) {
+ LOG4CXX_WARN(logger_,
+ "OnSessionEndedCallback could not find Session in the "
+ "Session/Connection Map!");
+ } else {
+ LOG4CXX_INFO(logger_,
+ "OnSessionEndedCallback found session "
+ << static_cast<int>(session_id)
+ << " with primary connection "
+ << static_cast<int>(st.primary_transport)
+ << " and secondary connection "
+ << static_cast<int>(st.secondary_transport));
+ primary_connection_handle = st.primary_transport;
+ }
+ }
+
connection_list_lock_.AcquireForReading();
- ConnectionList::iterator it = connection_list_.find(connection_handle);
+ ConnectionList::iterator it =
+ connection_list_.find(primary_connection_handle);
if (connection_list_.end() == it) {
LOG4CXX_WARN(logger_, "Unknown connection!");
connection_list_lock_.Release();
@@ -595,7 +693,8 @@ uint32_t ConnectionHandlerImpl::OnSessionEndedCallback(
connection_list_lock_.Release();
Connection* connection = connection_item.second;
- const uint32_t session_key = KeyFromPair(connection_handle, session_id);
+ const uint32_t session_key =
+ KeyFromPair(primary_connection_handle, session_id);
if (protocol_handler::kRpc == service_type) {
LOG4CXX_INFO(logger_,
@@ -638,6 +737,178 @@ uint32_t ConnectionHandlerImpl::OnSessionEndedCallback(
return session_key;
}
+bool ConnectionHandlerImpl::OnSecondaryTransportStarted(
+ transport_manager::ConnectionUID& primary_connection_handle,
+ const transport_manager::ConnectionUID secondary_connection_handle,
+ const uint8_t session_id) {
+ LOG4CXX_AUTO_TRACE(logger_);
+
+ if (session_id == 0) {
+ LOG4CXX_WARN(logger_, "Session id for secondary transport is invalid");
+ return false;
+ }
+
+ DeviceHandle device_handle;
+ Connection* connection;
+ {
+ sync_primitives::AutoReadLock lock(connection_list_lock_);
+ ConnectionList::iterator it =
+ connection_list_.find(secondary_connection_handle);
+ if (connection_list_.end() == it) {
+ LOG4CXX_WARN(logger_,
+ "Unknown connection " << secondary_connection_handle);
+ return false;
+ }
+
+ connection = it->second;
+ device_handle = connection->connection_device_handle();
+ }
+
+ // Add the secondary transport connection ID to the SessionConnectionMap
+ SessionTransports st =
+ SetSecondaryTransportID(session_id, secondary_connection_handle);
+ primary_connection_handle = st.primary_transport;
+ if (st.secondary_transport != secondary_connection_handle) {
+ LOG4CXX_WARN(logger_,
+ "Failed setting the session's secondary transport ID");
+ return false;
+ }
+
+ connection->SetPrimaryConnectionHandle(primary_connection_handle);
+
+ const uint32_t session_key =
+ KeyFromPair(primary_connection_handle, session_id);
+
+ sync_primitives::AutoReadLock read_lock(connection_handler_observer_lock_);
+ if (connection_handler_observer_) {
+ LOG4CXX_TRACE(logger_,
+ "Calling Connection Handler Observer's "
+ "OnSecondaryTransportStartedCallback");
+ connection_handler_observer_->OnSecondaryTransportStartedCallback(
+ device_handle, session_key);
+ }
+
+ return true;
+}
+
+void ConnectionHandlerImpl::OnSecondaryTransportEnded(
+ const transport_manager::ConnectionUID primary_connection_handle,
+ const transport_manager::ConnectionUID secondary_connection_handle) {
+ LOG4CXX_AUTO_TRACE(logger_);
+
+ LOG4CXX_INFO(logger_,
+ "Secondary Transport: "
+ << static_cast<int32_t>(secondary_connection_handle)
+ << " ended. Cleaning up services from primary connection ID "
+ << static_cast<int32_t>(primary_connection_handle));
+ connection_list_lock_.AcquireForReading();
+ ConnectionList::iterator itr =
+ connection_list_.find(primary_connection_handle);
+ if (connection_list_.end() == itr) {
+ LOG4CXX_ERROR(logger_, "Primary Connection not found!");
+ connection_list_lock_.Release();
+ return;
+ }
+ Connection* connection = itr->second;
+ connection_list_lock_.Release();
+
+ if (connection != NULL) {
+ std::list<protocol_handler::ServiceType> removed_services_list;
+ uint8_t session_id = connection->RemoveSecondaryServices(
+ secondary_connection_handle, removed_services_list);
+
+ if (session_id == 0) {
+ // The secondary services have already been removed from the primary
+ // connection, so we find the session associated with this secondary
+ // transport in the SessionConnectionMap
+ session_id =
+ GetSessionIdFromSecondaryTransport(secondary_connection_handle);
+ }
+
+ if (session_id != 0) {
+ {
+ sync_primitives::AutoReadLock read_lock(
+ connection_handler_observer_lock_);
+ if (connection_handler_observer_) {
+ const uint32_t session_key =
+ KeyFromPair(primary_connection_handle, session_id);
+
+ // Walk the returned list of services and call the ServiceEnded
+ // callback for each
+ std::list<protocol_handler::ServiceType>::const_iterator it =
+ removed_services_list.begin();
+ for (; removed_services_list.end() != it; ++it) {
+ connection_handler_observer_->OnServiceEndedCallback(
+ session_key, *it, CloseSessionReason::kCommon);
+ }
+
+ connection_handler_observer_->OnSecondaryTransportEndedCallback(
+ session_key);
+ }
+ }
+
+ // Clear the secondary connection from the Session/Connection map entry
+ // associated with this session
+ SetSecondaryTransportID(session_id, 0);
+ }
+ }
+}
+
+const std::string
+ConnectionHandlerImpl::TransportTypeProfileStringFromConnHandle(
+ transport_manager::ConnectionUID connection_handle) const {
+ LOG4CXX_AUTO_TRACE(logger_);
+
+ sync_primitives::AutoReadLock lock(connection_list_lock_);
+ ConnectionList::const_iterator it = connection_list_.find(connection_handle);
+ if (connection_list_.end() == it) {
+ LOG4CXX_WARN(logger_, "Unknown connection " << connection_handle);
+ return std::string();
+ } else {
+ DeviceHandle device_handle = it->second->connection_device_handle();
+ return TransportTypeProfileStringFromDeviceHandle(device_handle);
+ }
+}
+
+const std::string
+ConnectionHandlerImpl::TransportTypeProfileStringFromDeviceHandle(
+ DeviceHandle device_handle) const {
+ std::string connection_type;
+ DeviceMap::const_iterator it = device_list_.find(device_handle);
+ if (device_list_.end() == it) {
+ LOG4CXX_ERROR(logger_, "Device not found!");
+ } else {
+ connection_type = it->second.connection_type();
+ }
+
+ // Caution: this should be in sync with devicesType map in
+ // transport_adapter_impl.cc
+ if (connection_type == "USB_AOA") {
+ return std::string("AOA_USB");
+ } else if (connection_type == "BLUETOOTH") {
+ return std::string("SPP_BLUETOOTH");
+ } else if (connection_type == "USB_IOS") {
+ return std::string("IAP_USB");
+ } else if (connection_type == "BLUETOOTH_IOS") {
+ return std::string("IAP_BLUETOOTH");
+ } else if (connection_type == "WIFI") {
+ return std::string("TCP_WIFI");
+ } else if (connection_type == "USB_IOS_HOST_MODE") {
+ return std::string("IAP_USB_HOST_MODE");
+ } else if (connection_type == "USB_IOS_DEVICE_MODE") {
+ return std::string("IAP_USB_DEVICE_MODE");
+ } else if (connection_type == "CARPLAY_WIRELESS_IOS") {
+ return std::string("IAP_CARPLAY");
+#ifdef BUILD_TESTS
+ } else if (connection_type == "BTMAC") {
+ return std::string("BTMAC");
+#endif
+ } else {
+ LOG4CXX_WARN(logger_, "Unknown transport type string: " << connection_type);
+ return std::string();
+ }
+}
+
uint32_t ConnectionHandlerImpl::KeyFromPair(
transport_manager::ConnectionUID connection_handle,
uint8_t session_id) const {
@@ -646,7 +917,7 @@ uint32_t ConnectionHandlerImpl::KeyFromPair(
"Key for ConnectionHandle:"
<< static_cast<uint32_t>(connection_handle)
<< " Session:" << static_cast<uint32_t>(session_id)
- << " is: " << static_cast<uint32_t>(key));
+ << " is: 0x" << std::hex << static_cast<uint32_t>(key));
if (protocol_handler::HASH_ID_WRONG == key) {
LOG4CXX_ERROR(logger_,
"Connection key is WRONG_HASH_ID "
@@ -716,18 +987,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_;
}
@@ -741,6 +1000,139 @@ DevicesDiscoveryStarter& ConnectionHandlerImpl::get_device_discovery_starter() {
return *this;
}
+// Finds a key not presented in std::map<unsigned char, T>
+// Returns 0 if that key not found
+namespace {
+template <class T>
+uint32_t findGap(const std::map<unsigned char, T>& map) {
+ for (uint32_t i = 1; i <= UCHAR_MAX; ++i) {
+ if (map.find(i) == map.end()) {
+ return i;
+ }
+ }
+ return 0;
+}
+} // namespace
+
+uint32_t ConnectionHandlerImpl::AddSession(
+ const transport_manager::ConnectionUID primary_transport_id) {
+ LOG4CXX_AUTO_TRACE(logger_);
+
+ sync_primitives::AutoLock auto_lock(session_connection_map_lock_ptr_);
+ const uint32_t session_id = findGap(session_connection_map_);
+ if (session_id > 0) {
+ LOG4CXX_INFO(logger_,
+ "New session ID " << session_id << " and Connection Id "
+ << static_cast<int>(primary_transport_id)
+ << " added to Session/Connection Map");
+ SessionTransports st;
+ st.primary_transport = primary_transport_id;
+ st.secondary_transport = 0;
+ session_connection_map_[session_id] = st;
+ } else {
+ LOG4CXX_WARN(logger_,
+ "Session/Connection Map could not create a new session ID!!!");
+ }
+
+ return session_id;
+}
+
+bool ConnectionHandlerImpl::RemoveSession(uint8_t session_id) {
+ LOG4CXX_AUTO_TRACE(logger_);
+
+ sync_primitives::AutoLock auto_lock(session_connection_map_lock_ptr_);
+ SessionConnectionMap::iterator itr = session_connection_map_.find(session_id);
+ if (session_connection_map_.end() == itr) {
+ LOG4CXX_WARN(logger_, "Session not found in Session/Connection Map!");
+ return false;
+ }
+
+ LOG4CXX_INFO(logger_,
+ "Removed Session ID " << static_cast<int>(session_id)
+ << " from Session/Connection Map");
+ session_connection_map_.erase(session_id);
+ return true;
+}
+
+DataAccessor<SessionConnectionMap>
+ConnectionHandlerImpl::session_connection_map() {
+ return DataAccessor<SessionConnectionMap>(session_connection_map_,
+ session_connection_map_lock_ptr_);
+}
+
+SessionTransports ConnectionHandlerImpl::SetSecondaryTransportID(
+ uint8_t session_id,
+ transport_manager::ConnectionUID secondary_transport_id) {
+ SessionTransports st;
+
+ sync_primitives::AutoLock auto_lock(session_connection_map_lock_ptr_);
+ SessionConnectionMap::iterator it = session_connection_map_.find(session_id);
+ if (session_connection_map_.end() == it) {
+ LOG4CXX_WARN(logger_,
+ "SetSecondaryTransportID: session ID "
+ << static_cast<int>(session_id)
+ << " not found in Session/Connection map");
+ st.primary_transport = 0;
+ st.secondary_transport = 0;
+ } else {
+ st = it->second;
+
+ // The only time we overwrite an existing entry in the map is if the new
+ // secondary transport ID is kDisabledSecondary, which effectively DISABLES
+ // the secondary transport feature for the session, or if the new secondary
+ // transport ID is 0, which means a secondary transport has shut down
+ if (st.secondary_transport != 0 &&
+ secondary_transport_id != kDisabledSecondary &&
+ secondary_transport_id != 0) {
+ LOG4CXX_WARN(logger_,
+ "SetSecondaryTransportID: session ID "
+ << static_cast<int>(session_id)
+ << " already has a secondary connection "
+ << static_cast<int>(st.secondary_transport)
+ << " in the Session/Connection map");
+ } else {
+ st.secondary_transport = secondary_transport_id;
+ session_connection_map_[session_id] = st;
+ }
+ }
+
+ return st;
+}
+
+const SessionTransports ConnectionHandlerImpl::GetSessionTransports(
+ uint8_t session_id) const {
+ SessionTransports st;
+ sync_primitives::AutoLock auto_lock(session_connection_map_lock_ptr_);
+ SessionConnectionMap::const_iterator it =
+ session_connection_map_.find(session_id);
+ if (session_connection_map_.end() == it) {
+ st.primary_transport = 0;
+ st.secondary_transport = 0;
+ } else {
+ st = it->second;
+ }
+
+ return st;
+}
+
+const uint8_t ConnectionHandlerImpl::GetSessionIdFromSecondaryTransport(
+ transport_manager::ConnectionUID secondary_transport_id) const {
+ sync_primitives::AutoLock auto_lock(session_connection_map_lock_ptr_);
+ SessionConnectionMap::const_iterator it = session_connection_map_.begin();
+ for (; session_connection_map_.end() != it; it++) {
+ SessionTransports st = it->second;
+ if (st.secondary_transport == secondary_transport_id) {
+ return it->first;
+ }
+ }
+
+ LOG4CXX_ERROR(logger_,
+ "Could not find secondary transport ID "
+ << static_cast<int>(secondary_transport_id)
+ << " in the Session/Connection map");
+ return 0;
+}
+
struct CompareMAC {
explicit CompareMAC(const std::string& mac) : mac_(mac) {}
bool operator()(const DeviceMap::value_type& device) {
@@ -1117,8 +1509,28 @@ void ConnectionHandlerImpl::SendEndService(uint32_t key, uint8_t service_type) {
uint32_t connection_handle = 0;
uint8_t session_id = 0;
PairFromKey(key, &connection_handle, &session_id);
- protocol_handler_->SendEndService(
- connection_handle, session_id, service_type);
+
+ // If the service is running on a secondary transport, we need to retrieve
+ // that transport from the SessionConnection Map
+ SessionTransports st = GetSessionTransports(session_id);
+ if (st.primary_transport == 0) {
+ LOG4CXX_WARN(logger_,
+ "SendEndService could not find Session in the "
+ "Session/Connection Map!");
+ } else {
+ LOG4CXX_INFO(logger_,
+ "SendEndService found session "
+ << static_cast<int>(session_id)
+ << " with primary connection "
+ << static_cast<int>(st.primary_transport)
+ << " and secondary connection "
+ << static_cast<int>(st.secondary_transport));
+
+ protocol_handler_->SendEndService(st.primary_transport,
+ st.secondary_transport,
+ session_id,
+ service_type);
+ }
}
}
@@ -1185,6 +1597,10 @@ void ConnectionHandlerImpl::OnConnectionEnded(
sync_primitives::AutoReadLock read_lock(connection_handler_observer_lock_);
if (connection_handler_observer_ && connection.get() != NULL) {
+ // We have to remember the Connection object we just removed from
+ // connection_list_, because we will need to retrieve the protocol
+ // version from it inside of OnServiceEndedCallback
+ ending_connection_ = connection.get();
const SessionMap session_map = connection->session_map();
for (SessionMap::const_iterator session_it = session_map.begin();
@@ -1201,6 +1617,13 @@ void ConnectionHandlerImpl::OnConnectionEnded(
session_key, service_it->service_type, CloseSessionReason::kCommon);
}
}
+ ending_connection_ = NULL;
+ }
+
+ ConnectionHandle primary_connection_handle =
+ connection->primary_connection_handle();
+ if (primary_connection_handle != 0) {
+ OnSecondaryTransportEnded(primary_connection_handle, connection_id);
}
}
@@ -1241,6 +1664,10 @@ bool ConnectionHandlerImpl::ProtocolVersionUsed(
ConnectionList::const_iterator it = connection_list_.find(connection_id);
if (connection_list_.end() != it) {
return it->second->ProtocolVersion(session_id, protocol_version);
+ } else if (ending_connection_ &&
+ static_cast<uint32_t>(ending_connection_->connection_handle()) ==
+ connection_id) {
+ return ending_connection_->ProtocolVersion(session_id, protocol_version);
}
LOG4CXX_WARN(logger_, "Connection not found !");
return false;
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..f66d6b350c 100644
--- a/src/components/connection_handler/test/connection_handler_impl_test.cc
+++ b/src/components/connection_handler/test/connection_handler_impl_test.cc
@@ -198,10 +198,12 @@ class ConnectionHandlerTest : public ::testing::Test {
}
// Check Service Wrapper
- void CheckServiceExists(const int connectionId,
- const int session_id,
- const ::protocol_handler::ServiceType serviceId,
- const bool exists) {
+ void CheckServiceExists(
+ const int connectionId,
+ const int session_id,
+ const ::protocol_handler::ServiceType serviceId,
+ const ::transport_manager::ConnectionUID serviceConnectionId,
+ const bool exists) {
// Check all trees to find Service and check own protected value
const ConnectionList& connection_list =
connection_handler_->getConnectionList();
@@ -221,6 +223,7 @@ class ConnectionHandlerTest : public ::testing::Test {
std::find(service_list.begin(), service_list.end(), serviceId);
if (exists) {
ASSERT_NE(serv_it, service_list.end());
+ ASSERT_EQ(serv_it->connection_id, serviceConnectionId);
} else {
ASSERT_EQ(serv_it, service_list.end());
}
@@ -306,6 +309,31 @@ class ConnectionHandlerTest : public ::testing::Test {
connection->ProtocolVersion(session_id, check_protocol_version));
EXPECT_EQ(check_protocol_version, protocol_version);
}
+ void AddSecondaryTestService(ServiceType service_type) {
+ EXPECT_NE(0u, out_context_.new_session_id_);
+ EXPECT_EQ(SessionHash(uid_, out_context_.new_session_id_),
+ out_context_.hash_id_);
+ CheckSessionExists(uid_, out_context_.new_session_id_);
+
+ // Set protocol version to 5
+ ChangeProtocol(uid_,
+ out_context_.new_session_id_,
+ protocol_handler::PROTOCOL_VERSION_5);
+
+ connection_handler_test::MockConnectionHandlerObserver
+ temp_connection_handler_observer;
+ connection_handler_->set_connection_handler_observer(
+ &temp_connection_handler_observer);
+ EXPECT_CALL(temp_connection_handler_observer,
+ OnServiceStartedCallback(_, _, service_type, _)).Times(1);
+
+ connection_handler_->OnSessionStartedCallback(2u,
+ out_context_.new_session_id_,
+ service_type,
+ PROTECTION_OFF,
+ static_cast<BsonObject*>(0));
+ connection_handler_->set_connection_handler_observer(NULL);
+ }
ConnectionHandlerImpl* connection_handler_;
testing::NiceMock<transport_manager_test::MockTransportManager>
@@ -518,7 +546,7 @@ MATCHER_P(SameDevice, device, "") {
TEST_F(ConnectionHandlerTest, SendEndServiceWithoutSetProtocolHandler) {
AddTestDeviceConnection();
AddTestSession();
- EXPECT_CALL(mock_protocol_handler_, SendEndService(_, _, kRpc)).Times(0);
+ EXPECT_CALL(mock_protocol_handler_, SendEndService(_, _, _, kRpc)).Times(0);
connection_handler_->SendEndService(connection_key_, kRpc);
}
@@ -526,7 +554,7 @@ TEST_F(ConnectionHandlerTest, SendEndService) {
AddTestDeviceConnection();
AddTestSession();
connection_handler_->set_protocol_handler(&mock_protocol_handler_);
- EXPECT_CALL(mock_protocol_handler_, SendEndService(_, _, kRpc));
+ EXPECT_CALL(mock_protocol_handler_, SendEndService(_, _, _, kRpc));
connection_handler_->SendEndService(connection_key_, kRpc);
}
@@ -1112,7 +1140,7 @@ TEST_F(ConnectionHandlerTest, StartService_withServices) {
PROTECTION_OFF,
static_cast<BsonObject*>(NULL));
EXPECT_NE(0u, audio_context.new_session_id_);
- CheckServiceExists(uid_, audio_context.new_session_id_, kAudio, true);
+ CheckServiceExists(uid_, audio_context.new_session_id_, kAudio, uid_, true);
EXPECT_EQ(protocol_handler::HASH_ID_NOT_SUPPORTED, audio_context.hash_id_);
// Start Audio service
@@ -1122,7 +1150,8 @@ TEST_F(ConnectionHandlerTest, StartService_withServices) {
PROTECTION_OFF,
static_cast<BsonObject*>(NULL));
EXPECT_NE(0u, video_context.new_session_id_);
- CheckServiceExists(uid_, video_context.new_session_id_, kMobileNav, true);
+ CheckServiceExists(
+ uid_, video_context.new_session_id_, kMobileNav, uid_, true);
EXPECT_EQ(protocol_handler::HASH_ID_NOT_SUPPORTED, video_context.hash_id_);
connection_handler_->set_protocol_handler(NULL);
@@ -1150,7 +1179,8 @@ TEST_F(ConnectionHandlerTest, StartService_withServices_withParams) {
PROTECTION_OFF,
dummy_param);
EXPECT_EQ(out_context_.new_session_id_, video_context.new_session_id_);
- CheckServiceExists(uid_, out_context_.new_session_id_, kMobileNav, true);
+ CheckServiceExists(
+ uid_, out_context_.new_session_id_, kMobileNav, uid_, true);
EXPECT_EQ(protocol_handler::HASH_ID_NOT_SUPPORTED, video_context.hash_id_);
connection_handler_->set_protocol_handler(NULL);
@@ -1174,7 +1204,7 @@ TEST_F(ConnectionHandlerTest, ServiceStop_UnExistService) {
connection_handler_->OnSessionEndedCallback(
uid_, out_context_.new_session_id_, &dummy_hash, kAudio);
EXPECT_EQ(0u, end_session_result);
- CheckServiceExists(uid_, out_context_.new_session_id_, kAudio, false);
+ CheckServiceExists(uid_, out_context_.new_session_id_, kAudio, uid_, false);
}
TEST_F(ConnectionHandlerTest, ServiceStop) {
@@ -1204,7 +1234,7 @@ TEST_F(ConnectionHandlerTest, ServiceStop) {
connection_handler_->OnSessionEndedCallback(
uid_, out_context_.new_session_id_, &some_hash_id, kAudio);
EXPECT_EQ(connection_key_, end_session_result);
- CheckServiceExists(uid_, out_context_.new_session_id_, kAudio, false);
+ CheckServiceExists(uid_, out_context_.new_session_id_, kAudio, uid_, false);
}
}
@@ -1273,9 +1303,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 +1339,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 +1379,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 +1469,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;
@@ -2013,6 +2033,193 @@ TEST_F(ConnectionHandlerTest, OnDeviceConnectionSwitching) {
connection_handler_->OnDeviceSwitchingStart(mac_address_, second_mac_address);
}
+TEST_F(ConnectionHandlerTest, StartStopSecondarySession) {
+ // Add virtual device and connection
+ AddTestDeviceConnection();
+ // Start new session with RPC service
+ AddTestSession();
+
+ connection_handler_test::MockConnectionHandlerObserver
+ mock_connection_handler_observer;
+ connection_handler_->set_connection_handler_observer(
+ &mock_connection_handler_observer);
+
+ // Start a session on a secondary transport
+ const transport_manager::DeviceInfo secondary_device_info(
+ device_handle_, mac_address_, device_name_, std::string("WIFI"));
+ const transport_manager::ConnectionUID secondary_uid = 2u;
+ // Add Device and connection
+ ON_CALL(mock_connection_handler_settings, heart_beat_timeout())
+ .WillByDefault(Return(1000u));
+ connection_handler_->addDeviceConnection(secondary_device_info,
+ secondary_uid);
+
+ EXPECT_CALL(mock_connection_handler_observer,
+ OnSecondaryTransportStartedCallback(device_handle_, _)).Times(1);
+
+ connection_handler_->OnSecondaryTransportStarted(
+ uid_, secondary_uid, out_context_.new_session_id_);
+
+ SessionTransports st =
+ connection_handler_->GetSessionTransports(out_context_.new_session_id_);
+ EXPECT_EQ(st.primary_transport, uid_);
+ EXPECT_EQ(st.secondary_transport, secondary_uid);
+
+ AddSecondaryTestService(kAudio);
+ AddSecondaryTestService(kMobileNav);
+
+ CheckServiceExists(
+ uid_, out_context_.new_session_id_, kAudio, secondary_uid, true);
+ CheckServiceExists(
+ uid_, out_context_.new_session_id_, kMobileNav, secondary_uid, true);
+
+ connection_handler_->set_connection_handler_observer(
+ &mock_connection_handler_observer);
+ EXPECT_CALL(mock_connection_handler_observer,
+ OnSecondaryTransportEndedCallback(_)).Times(1);
+ EXPECT_CALL(mock_connection_handler_observer,
+ OnServiceEndedCallback(_, kAudio, _)).Times(1);
+ EXPECT_CALL(mock_connection_handler_observer,
+ OnServiceEndedCallback(_, kMobileNav, _)).Times(1);
+
+ connection_handler_->OnSecondaryTransportEnded(uid_, secondary_uid);
+
+ st = connection_handler_->GetSessionTransports(out_context_.new_session_id_);
+ EXPECT_EQ(st.primary_transport, uid_);
+ EXPECT_EQ(st.secondary_transport, 0u);
+
+ CheckServiceExists(
+ uid_, out_context_.new_session_id_, kAudio, secondary_uid, false);
+ CheckServiceExists(
+ uid_, out_context_.new_session_id_, kMobileNav, secondary_uid, false);
+}
+
+TEST_F(ConnectionHandlerTest, StopSecondarySession_NoService) {
+ AddTestDeviceConnection();
+ AddTestSession();
+
+ connection_handler_test::MockConnectionHandlerObserver
+ mock_connection_handler_observer;
+ connection_handler_->set_connection_handler_observer(
+ &mock_connection_handler_observer);
+
+ const transport_manager::DeviceInfo secondary_device_info(
+ device_handle_, mac_address_, device_name_, std::string("WIFI"));
+ const transport_manager::ConnectionUID secondary_uid = 123u;
+ ON_CALL(mock_connection_handler_settings, heart_beat_timeout())
+ .WillByDefault(Return(1000u));
+ connection_handler_->addDeviceConnection(secondary_device_info,
+ secondary_uid);
+
+ EXPECT_CALL(mock_connection_handler_observer,
+ OnSecondaryTransportStartedCallback(device_handle_, _)).Times(1);
+ connection_handler_->OnSecondaryTransportStarted(
+ uid_, secondary_uid, out_context_.new_session_id_);
+
+ // check if OnSecondaryTransportEndedCallback is triggered with correct
+ // session ID even if we don't have any services
+ EXPECT_CALL(mock_connection_handler_observer,
+ OnSecondaryTransportEndedCallback(_));
+ EXPECT_CALL(mock_connection_handler_observer, OnServiceEndedCallback(_, _, _))
+ .Times(0);
+
+ connection_handler_->OnSecondaryTransportEnded(uid_, secondary_uid);
+
+ SessionTransports st =
+ connection_handler_->GetSessionTransports(out_context_.new_session_id_);
+ EXPECT_EQ(st.primary_transport, uid_);
+ EXPECT_EQ(st.secondary_transport, 0u);
+}
+
+TEST_F(ConnectionHandlerTest, ConnectionType_valid) {
+ AddTestDeviceConnection();
+ AddTestSession();
+
+ std::string ret =
+ connection_handler_->TransportTypeProfileStringFromConnHandle(uid_);
+ EXPECT_EQ(connection_type_, ret);
+}
+
+TEST_F(ConnectionHandlerTest, ConnectionType_invalid) {
+ AddTestDeviceConnection();
+
+ transport_manager::ConnectionUID invalid_uid = 12345;
+ ASSERT_TRUE(invalid_uid != uid_);
+ std::string ret =
+ connection_handler_->TransportTypeProfileStringFromConnHandle(
+ invalid_uid);
+ EXPECT_EQ(std::string(), ret);
+}
+
+TEST_F(ConnectionHandlerTest, SetSecondaryTransportID_UpdateSuccess) {
+ uint8_t session_id = 123;
+ transport_manager::ConnectionUID primary_uid = 100;
+ transport_manager::ConnectionUID secondary_uid = 0;
+
+ SessionConnectionMap& session_connection_map =
+ connection_handler_->getSessionConnectionMap();
+ // secondary transport's ID is 0
+ SessionTransports st = {primary_uid, secondary_uid};
+ session_connection_map[session_id] = st;
+
+ secondary_uid = 200;
+ st = connection_handler_->SetSecondaryTransportID(session_id, secondary_uid);
+ EXPECT_EQ(primary_uid, st.primary_transport);
+ EXPECT_EQ(secondary_uid, st.secondary_transport);
+}
+
+TEST_F(ConnectionHandlerTest, SetSecondaryTransportID_UpdateFailure) {
+ uint8_t session_id = 123;
+ transport_manager::ConnectionUID primary_uid = 100;
+ transport_manager::ConnectionUID secondary_uid = 300;
+
+ SessionConnectionMap& session_connection_map =
+ connection_handler_->getSessionConnectionMap();
+ // secondary transport's ID is already assigned
+ SessionTransports st = {primary_uid, secondary_uid};
+ session_connection_map[session_id] = st;
+
+ st = connection_handler_->SetSecondaryTransportID(session_id, 500);
+ EXPECT_EQ(primary_uid, st.primary_transport);
+ // secondary transport's ID is NOT updated
+ EXPECT_EQ(secondary_uid, st.secondary_transport);
+}
+
+TEST_F(ConnectionHandlerTest, SetSecondaryTransportID_OverwirteSecondaryUID) {
+ uint8_t session_id = 123;
+ transport_manager::ConnectionUID primary_uid = 200;
+ transport_manager::ConnectionUID secondary_uid = 500;
+
+ SessionConnectionMap& session_connection_map =
+ connection_handler_->getSessionConnectionMap();
+ SessionTransports st = {primary_uid, secondary_uid};
+ session_connection_map[session_id] = st;
+
+ secondary_uid = kDisabledSecondary;
+ st = connection_handler_->SetSecondaryTransportID(session_id, secondary_uid);
+ EXPECT_EQ(primary_uid, st.primary_transport);
+ // secondary transport's ID is updated
+ EXPECT_EQ(secondary_uid, st.secondary_transport);
+}
+
+TEST_F(ConnectionHandlerTest, SetSecondaryTransportID_Failure) {
+ uint8_t session_id = 123;
+ transport_manager::ConnectionUID primary_uid = 100;
+ transport_manager::ConnectionUID secondary_uid = 0;
+
+ SessionConnectionMap& session_connection_map =
+ connection_handler_->getSessionConnectionMap();
+ SessionTransports st = {primary_uid, secondary_uid};
+ session_connection_map[session_id] = st;
+
+ uint8_t invalid_session_id = 10;
+ secondary_uid = 300;
+ st = connection_handler_->SetSecondaryTransportID(invalid_session_id,
+ secondary_uid);
+ EXPECT_EQ(0u, st.primary_transport);
+ EXPECT_EQ(0u, st.secondary_transport);
+}
+
} // namespace connection_handler_test
} // namespace components
} // namespace test
diff --git a/src/components/connection_handler/test/connection_test.cc b/src/components/connection_handler/test/connection_test.cc
index de21dd1e97..98b83f5fc4 100644
--- a/src/components/connection_handler/test/connection_test.cc
+++ b/src/components/connection_handler/test/connection_test.cc
@@ -36,6 +36,7 @@
#include "protocol/common.h"
#include "connection_handler/connection.h"
+#include "connection_handler/mock_connection_handler.h"
#include "connection_handler/connection_handler_impl.h"
#include "protocol/service_type.h"
#include "connection_handler/mock_connection_handler_settings.h"
@@ -56,6 +57,8 @@ namespace connection_handler_test {
using namespace ::connection_handler;
using namespace ::protocol_handler;
+using ::testing::Return;
+
class ConnectionTest : public ::testing::Test {
protected:
void SetUp() OVERRIDE {
@@ -78,7 +81,7 @@ class ConnectionTest : public ::testing::Test {
session_id, protocol_handler::PROTOCOL_VERSION_3);
}
void StartDefaultSession() {
- session_id = connection_->AddNewSession();
+ session_id = connection_->AddNewSession(kDefaultConnectionHandle);
EXPECT_NE(session_id, 0u);
const SessionMap sessionMap = connection_->session_map();
EXPECT_FALSE(sessionMap.empty());
@@ -88,13 +91,14 @@ class ConnectionTest : public ::testing::Test {
std::find(serviceList.begin(), serviceList.end(), kRpc);
const bool found_result = (it != serviceList.end());
EXPECT_TRUE(found_result);
+ EXPECT_EQ(connection_->primary_connection_handle(), 0);
}
void AddNewService(const ServiceType service_type,
const bool protection,
const bool expect_add_new_service_call_result,
const bool expect_exist_service) {
- const bool result =
- connection_->AddNewService(session_id, service_type, protection);
+ const bool result = connection_->AddNewService(
+ session_id, service_type, protection, kDefaultConnectionHandle);
EXPECT_EQ(result, expect_add_new_service_call_result);
#ifdef ENABLE_SECURITY
@@ -110,12 +114,35 @@ class ConnectionTest : public ::testing::Test {
std::find(newServiceList.begin(), newServiceList.end(), service_type);
const bool found_result = it != newServiceList.end();
EXPECT_EQ(expect_exist_service, found_result);
-#ifdef ENABLE_SECURITY
if (found_result) {
const Service& service = *it;
+ transport_manager::ConnectionUID expected_connection_handle =
+ kDefaultConnectionHandle;
+ EXPECT_EQ(service.connection_id, expected_connection_handle);
+#ifdef ENABLE_SECURITY
EXPECT_EQ(service.is_protected_, protection);
- }
#endif // ENABLE_SECURITY
+ }
+ }
+ void AddNewSecondaryService(const ServiceType service_type) {
+ const bool result = connection_->AddNewService(
+ session_id, service_type, false, kSecondaryConnectionHandle);
+ EXPECT_EQ(result, true);
+
+ const SessionMap session_map = connection_->session_map();
+ EXPECT_FALSE(session_map.empty());
+ const ServiceList newServiceList = session_map.begin()->second.service_list;
+ EXPECT_FALSE(newServiceList.empty());
+ const ServiceList::const_iterator it =
+ std::find(newServiceList.begin(), newServiceList.end(), service_type);
+ const bool found_result = it != newServiceList.end();
+ EXPECT_TRUE(found_result);
+ if (found_result) {
+ const Service& service = *it;
+ transport_manager::ConnectionUID expected_secondary_connection_handle =
+ kSecondaryConnectionHandle;
+ EXPECT_EQ(service.connection_id, expected_secondary_connection_handle);
+ }
}
void RemoveService(const ServiceType service_type,
@@ -141,6 +168,8 @@ class ConnectionTest : public ::testing::Test {
transport_manager_mock;
ConnectionHandlerImpl* connection_handler_;
uint32_t session_id;
+ static const transport_manager::ConnectionUID kDefaultConnectionHandle = 1;
+ static const transport_manager::ConnectionUID kSecondaryConnectionHandle = 2;
};
TEST_F(ConnectionTest, Session_TryGetProtocolVersionWithoutSession) {
@@ -236,13 +265,17 @@ TEST_F(ConnectionTest, HeartBeat_Protocol5_ZeroHeartBeat_NotSupported) {
// Try to add service without session
TEST_F(ConnectionTest, Session_AddNewServiceWithoutSession) {
- EXPECT_EQ(connection_->AddNewService(session_id, kAudio, true),
+ EXPECT_EQ(connection_->AddNewService(
+ session_id, kAudio, true, kDefaultConnectionHandle),
EXPECT_RETURN_FALSE);
- EXPECT_EQ(connection_->AddNewService(session_id, kAudio, false),
+ EXPECT_EQ(connection_->AddNewService(
+ session_id, kAudio, false, kDefaultConnectionHandle),
EXPECT_RETURN_FALSE);
- EXPECT_EQ(connection_->AddNewService(session_id, kMobileNav, true),
+ EXPECT_EQ(connection_->AddNewService(
+ session_id, kMobileNav, true, kDefaultConnectionHandle),
EXPECT_RETURN_FALSE);
- EXPECT_EQ(connection_->AddNewService(session_id, kMobileNav, false),
+ EXPECT_EQ(connection_->AddNewService(
+ session_id, kMobileNav, false, kDefaultConnectionHandle),
EXPECT_RETURN_FALSE);
}
@@ -409,6 +442,133 @@ TEST_F(ConnectionTest, RemoveSession) {
EXPECT_EQ(0u, connection_->RemoveSession(session_id));
}
+TEST_F(ConnectionTest, AddNewSession_VerifyAddSessionCalled) {
+ MockConnectionHandler mock_connection_handler;
+
+ ConnectionHandle connection_handle = 123;
+ DeviceHandle device_handle = 0u;
+ uint32_t heart_beat = 10000u;
+ Connection* connection = new Connection(
+ connection_handle, device_handle, &mock_connection_handler, heart_beat);
+
+ transport_manager::ConnectionUID connection_handle_uid = 1;
+ uint32_t mock_session_id = 2;
+ EXPECT_CALL(mock_connection_handler, AddSession(connection_handle_uid))
+ .WillOnce(Return(mock_session_id));
+
+ uint32_t sid = connection->AddNewSession(connection_handle_uid);
+ EXPECT_EQ(mock_session_id, sid);
+
+ EXPECT_CALL(mock_connection_handler, RemoveSession(mock_session_id))
+ .WillOnce(Return(true)); // invoked by destructor of connection
+ delete connection;
+}
+
+TEST_F(ConnectionTest, RemoveSession_VerifyRemoveSessionCalled) {
+ MockConnectionHandler mock_connection_handler;
+
+ ConnectionHandle connection_handle = 123;
+ DeviceHandle device_handle = 0u;
+ uint32_t heart_beat = 10000u;
+ Connection* connection = new Connection(
+ connection_handle, device_handle, &mock_connection_handler, heart_beat);
+
+ transport_manager::ConnectionUID connection_handle_uid = 1;
+ uint32_t mock_session_id = 10;
+ EXPECT_CALL(mock_connection_handler, AddSession(connection_handle_uid))
+ .WillOnce(Return(mock_session_id));
+ EXPECT_CALL(mock_connection_handler,
+ RemoveSession(static_cast<uint8_t>(mock_session_id)))
+ .WillOnce(Return(true));
+
+ uint32_t sid = connection->AddNewSession(connection_handle_uid);
+
+ uint32_t ret = connection->RemoveSession(sid);
+ EXPECT_EQ(sid, ret);
+
+ delete connection;
+}
+
+TEST_F(ConnectionTest, SecondarySessionTest) {
+ StartSession();
+ AddNewService(
+ kRpc, PROTECTION_OFF, EXPECT_RETURN_FALSE, EXPECT_SERVICE_EXISTS);
+
+ const ConnectionHandle connectionHandle = 0;
+ const DeviceHandle device_handle = 0u;
+ const uint32_t heart_beat = 0u;
+ Connection* secondary_connection = new Connection(
+ connectionHandle, device_handle, connection_handler_, heart_beat);
+
+ secondary_connection->SetPrimaryConnectionHandle(kDefaultConnectionHandle);
+ connection_handler::ConnectionHandle expected_primary_connection_handle =
+ kDefaultConnectionHandle;
+ EXPECT_EQ(secondary_connection->primary_connection_handle(),
+ expected_primary_connection_handle);
+
+ AddNewSecondaryService(kAudio);
+ AddNewSecondaryService(kMobileNav);
+
+ delete secondary_connection;
+}
+
+TEST_F(ConnectionTest, RemoveSecondaryServices_SUCCESS) {
+ StartSession();
+
+ ServiceType services[2] = {kMobileNav, kAudio};
+ AddNewSecondaryService(services[0]);
+ AddNewSecondaryService(services[1]);
+ size_t services_count = sizeof(services) / sizeof(services[0]);
+
+ std::list<ServiceType> removed_services;
+ uint8_t ret_session_id = connection_->RemoveSecondaryServices(
+ kSecondaryConnectionHandle, removed_services);
+
+ // check return value
+ EXPECT_EQ(session_id, ret_session_id);
+ // check returned list
+ EXPECT_EQ(services_count, removed_services.size());
+ std::list<protocol_handler::ServiceType>::iterator it;
+ it = std::find(removed_services.begin(), removed_services.end(), services[0]);
+ EXPECT_TRUE(it != removed_services.end());
+ it = std::find(removed_services.begin(), removed_services.end(), services[1]);
+ EXPECT_TRUE(it != removed_services.end());
+}
+
+TEST_F(ConnectionTest, RemoveSecondaryServices_NoService) {
+ StartSession();
+ /* do not call AddNewSecondaryService() */
+
+ std::list<ServiceType> removed_services;
+ uint8_t ret_session_id = connection_->RemoveSecondaryServices(
+ kSecondaryConnectionHandle, removed_services);
+
+ // check return value
+ EXPECT_EQ(0, ret_session_id);
+ // check returned list
+ EXPECT_EQ(0u, removed_services.size());
+}
+
+TEST_F(ConnectionTest, RemoveSecondaryServices_InvalidConnectionHandle) {
+ StartSession();
+
+ ServiceType services[2] = {kMobileNav, kAudio};
+ AddNewSecondaryService(services[0]);
+ AddNewSecondaryService(services[1]);
+
+ transport_manager::ConnectionUID invalid_connection_handle = 123;
+ ASSERT_TRUE(kSecondaryConnectionHandle != invalid_connection_handle);
+
+ std::list<ServiceType> removed_services;
+ uint8_t ret_session_id = connection_->RemoveSecondaryServices(
+ invalid_connection_handle, removed_services);
+
+ // check return value
+ EXPECT_EQ(0, ret_session_id);
+ // check returned list
+ EXPECT_EQ(0u, removed_services.size());
+}
+
#ifdef ENABLE_SECURITY
TEST_F(ConnectionTest, SetSSLContextWithoutSession) {
diff --git a/src/components/connection_handler/test/heart_beat_monitor_test.cc b/src/components/connection_handler/test/heart_beat_monitor_test.cc
index 4c67c97191..e089a07ec4 100644
--- a/src/components/connection_handler/test/heart_beat_monitor_test.cc
+++ b/src/components/connection_handler/test/heart_beat_monitor_test.cc
@@ -51,6 +51,7 @@ namespace connection_handler_test {
using ::testing::DoAll;
using ::testing::_;
+using ::testing::Return;
class HeartBeatMonitorTest : public testing::Test {
public:
@@ -64,6 +65,8 @@ class HeartBeatMonitorTest : public testing::Test {
uint32_t kTimeout;
static const connection_handler::ConnectionHandle kConnectionHandle =
0xABCDEF;
+ static const transport_manager::ConnectionUID kDefaultConnectionHandle = 1;
+ static const uint32_t kDefaultSessionId = 1;
virtual void SetUp() {
conn = new connection_handler::Connection(
@@ -80,25 +83,40 @@ ACTION_P2(RemoveSession, conn, session_id) {
}
TEST_F(HeartBeatMonitorTest, TimerNotStarted) {
+ EXPECT_CALL(connection_handler_mock, AddSession(_))
+ .WillOnce(Return(kDefaultSessionId));
+ EXPECT_CALL(connection_handler_mock, RemoveSession(kDefaultSessionId))
+ .WillOnce(Return(true)); // called by destructor of Connection
+
// Whithout StartHeartBeat nothing to be call
EXPECT_CALL(connection_handler_mock, CloseSession(_, _)).Times(0);
EXPECT_CALL(connection_handler_mock, CloseConnection(_)).Times(0);
EXPECT_CALL(connection_handler_mock, SendHeartBeat(_, _)).Times(0);
- conn->AddNewSession();
+ conn->AddNewSession(kDefaultConnectionHandle);
}
TEST_F(HeartBeatMonitorTest, TimerNotElapsed) {
+ EXPECT_CALL(connection_handler_mock, AddSession(_))
+ .WillOnce(Return(kDefaultSessionId));
+ EXPECT_CALL(connection_handler_mock, RemoveSession(kDefaultSessionId))
+ .WillOnce(Return(true));
+
EXPECT_CALL(connection_handler_mock, SendHeartBeat(_, _)).Times(0);
EXPECT_CALL(connection_handler_mock, CloseSession(_, _)).Times(0);
EXPECT_CALL(connection_handler_mock, CloseConnection(_)).Times(0);
- const uint32_t session = conn->AddNewSession();
+ const uint32_t session = conn->AddNewSession(kDefaultConnectionHandle);
conn->StartHeartBeat(session);
}
TEST_F(HeartBeatMonitorTest, TimerElapsed) {
- const uint32_t session = conn->AddNewSession();
+ EXPECT_CALL(connection_handler_mock, AddSession(_))
+ .WillOnce(Return(kDefaultSessionId));
+ EXPECT_CALL(connection_handler_mock, RemoveSession(kDefaultSessionId))
+ .WillOnce(Return(true)); // invoked by RemoveSession action
+
+ const uint32_t session = conn->AddNewSession(kDefaultConnectionHandle);
TestAsyncWaiter waiter;
uint32_t times = 0;
@@ -121,11 +139,16 @@ TEST_F(HeartBeatMonitorTest, TimerElapsed) {
}
TEST_F(HeartBeatMonitorTest, KeptAlive) {
+ EXPECT_CALL(connection_handler_mock, AddSession(_))
+ .WillOnce(Return(kDefaultSessionId));
+ EXPECT_CALL(connection_handler_mock, RemoveSession(kDefaultSessionId))
+ .WillOnce(Return(true));
+
EXPECT_CALL(connection_handler_mock, CloseSession(_, _)).Times(0);
EXPECT_CALL(connection_handler_mock, CloseConnection(_)).Times(0);
EXPECT_CALL(connection_handler_mock, SendHeartBeat(_, _)).Times(0);
- const uint32_t session = conn->AddNewSession();
+ const uint32_t session = conn->AddNewSession(kDefaultConnectionHandle);
conn->StartHeartBeat(session);
usleep(kTimeout * MICROSECONDS_IN_MILLISECONDS - MICROSECONDS_IN_SECOND);
conn->KeepAlive(session);
@@ -137,7 +160,12 @@ TEST_F(HeartBeatMonitorTest, KeptAlive) {
}
TEST_F(HeartBeatMonitorTest, NotKeptAlive) {
- const uint32_t session = conn->AddNewSession();
+ EXPECT_CALL(connection_handler_mock, AddSession(_))
+ .WillOnce(Return(kDefaultSessionId));
+ EXPECT_CALL(connection_handler_mock, RemoveSession(kDefaultSessionId))
+ .WillOnce(Return(true));
+
+ const uint32_t session = conn->AddNewSession(kDefaultConnectionHandle);
TestAsyncWaiter waiter;
uint32_t times = 0;
@@ -167,8 +195,20 @@ TEST_F(HeartBeatMonitorTest, NotKeptAlive) {
}
TEST_F(HeartBeatMonitorTest, TwoSessionsElapsed) {
- const uint32_t kSession1 = conn->AddNewSession();
- const uint32_t kSession2 = conn->AddNewSession();
+ const uint32_t kMockSessionId1 = 1;
+ const uint32_t kMockSessionId2 = 2;
+ EXPECT_CALL(connection_handler_mock, AddSession(_))
+ .WillOnce(Return(kMockSessionId1))
+ .WillOnce(Return(kMockSessionId2));
+ EXPECT_CALL(connection_handler_mock, RemoveSession(kMockSessionId1))
+ .WillOnce(Return(true));
+ EXPECT_CALL(connection_handler_mock, RemoveSession(kMockSessionId2))
+ .WillOnce(Return(true));
+
+ const uint32_t kSession1 = conn->AddNewSession(kDefaultConnectionHandle);
+
+ const transport_manager::ConnectionUID kAnotherConnectionHandle = 2;
+ const uint32_t kSession2 = conn->AddNewSession(kAnotherConnectionHandle);
TestAsyncWaiter waiter;
uint32_t times = 0;
@@ -199,7 +239,12 @@ TEST_F(HeartBeatMonitorTest, TwoSessionsElapsed) {
}
TEST_F(HeartBeatMonitorTest, IncreaseHeartBeatTimeout) {
- const uint32_t kSession = conn->AddNewSession();
+ EXPECT_CALL(connection_handler_mock, AddSession(_))
+ .WillOnce(Return(kDefaultSessionId));
+ EXPECT_CALL(connection_handler_mock, RemoveSession(kDefaultSessionId))
+ .WillOnce(Return(true));
+
+ const uint32_t kSession = conn->AddNewSession(kDefaultConnectionHandle);
EXPECT_CALL(connection_handler_mock, CloseSession(_, _)).Times(0);
EXPECT_CALL(connection_handler_mock, CloseConnection(_)).Times(0);
@@ -211,7 +256,12 @@ TEST_F(HeartBeatMonitorTest, IncreaseHeartBeatTimeout) {
}
TEST_F(HeartBeatMonitorTest, DecreaseHeartBeatTimeout) {
- const uint32_t kSession = conn->AddNewSession();
+ EXPECT_CALL(connection_handler_mock, AddSession(_))
+ .WillOnce(Return(kDefaultSessionId));
+ EXPECT_CALL(connection_handler_mock, RemoveSession(kDefaultSessionId))
+ .WillOnce(Return(true));
+
+ const uint32_t kSession = conn->AddNewSession(kDefaultConnectionHandle);
TestAsyncWaiter waiter;
uint32_t times = 0;
diff --git a/src/components/dbus/CMakeLists.txt b/src/components/dbus/CMakeLists.txt
deleted file mode 100644
index 26ff9373bf..0000000000
--- a/src/components/dbus/CMakeLists.txt
+++ /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(${CMAKE_SOURCE_DIR}/tools/cmake/helpers/sources.cmake)
-
-include_directories (
- ${DBUS_INCLUDE_DIRS}
- ${CMAKE_CURRENT_SOURCE_DIR}/include/
- ${CMAKE_SOURCE_DIR}/
- ${COMPONENTS_DIR}
- ${COMPONENTS_DIR}/formatters/include/
- ${COMPONENTS_DIR}/smart_objects/include/
- ${COMPONENTS_DIR}/utils/include/
- ${CMAKE_BINARY_DIR}/src/components/
-)
-
-set(PATHS
- ${CMAKE_CURRENT_SOURCE_DIR}/include
- ${CMAKE_CURRENT_SOURCE_DIR}/src
- ${CMAKE_CURRENT_SOURCE_DIR}/src/introspection_xml.cc
- ${CMAKE_CURRENT_BINARY_DIR}/message_descriptions.cc
-)
-collect_sources(SOURCES "${PATHS}")
-
-set(LIBRARIES
- HMI_API
- Utils
- dbus-1
-)
-
-add_custom_command(
- OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/message_descriptions.cc
- COMMAND python ${CMAKE_CURRENT_SOURCE_DIR}/codegen/make_message_descriptions.py
- --infile ${CMAKE_CURRENT_SOURCE_DIR}/../interfaces/QT_HMI_API.xml
- --outdir ${CMAKE_CURRENT_BINARY_DIR}
- DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/../interfaces/QT_HMI_API.xml
- ${CMAKE_CURRENT_SOURCE_DIR}/codegen/make_message_descriptions.py
-)
-
-add_custom_command(
- OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/introspection_xml.cc
- COMMAND python ${CMAKE_CURRENT_SOURCE_DIR}/codegen/make_introspection_c.py
- --infile ${CMAKE_CURRENT_SOURCE_DIR}/../interfaces/QT_HMI_API.xml
- --outdir ${CMAKE_CURRENT_BINARY_DIR}
- DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/../interfaces/QT_HMI_API.xml
- ${CMAKE_CURRENT_SOURCE_DIR}/codegen/make_introspection_c.py
-)
-
-add_library("DBus" ${SOURCES})
-
-target_link_libraries("DBus" "${LIBRARIES}")
-
-if(BUILD_TESTS)
- add_subdirectory(test)
-endif()
diff --git a/src/components/dbus/codegen/code_formatter.py b/src/components/dbus/codegen/code_formatter.py
deleted file mode 100644
index c3eb1b7815..0000000000
--- a/src/components/dbus/codegen/code_formatter.py
+++ /dev/null
@@ -1,58 +0,0 @@
-#!/usr/bin/env python
-# -*- coding: utf-8 -*-
-#
-# @file code_formatter.py
-# @brief Utility that helps to manage indents in generated code
-#
-# This file is a part of HMI D-Bus layer.
-#
-# Copyright (c) 2013, Ford Motor Company
-# All rights reserved.
-#
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions are met:
-#
-# Redistributions of source code must retain the above copyright notice, this
-# list of conditions and the following disclaimer.
-#
-# Redistributions in binary form must reproduce the above copyright notice,
-# this list of conditions and the following
-# disclaimer in the documentation and/or other materials provided with the
-# distribution.
-#
-# Neither the name of the Ford Motor Company nor the names of its contributors
-# may be used to endorse or promote products derived from this software
-# without specific prior written permission.
-#
-# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
-# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 'A PARTICULAR PURPOSE
-# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
-# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
-# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
-# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
-# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
-# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-# POSSIBILITY OF SUCH DAMAGE.
-
-class CodeBlock:
- indent = 0
- def __init__(self, out):
- self.out = out
- if type(out) == file:
- self.indent = 0
- elif type(out) == CodeBlock:
- self.indent = out.indent
- def __enter__(self):
- self.indent += 1
- return self
- def __exit__(self, exc_type, exc_value, traceback):
- if self.indent >= 1:
- self.indent -= 1
- def write(self, s):
- for string in s.splitlines(True):
- self.out.write(' ' * self.indent + string)
-
-# vim: set ts=4 sw=4 et:
-
diff --git a/src/components/dbus/codegen/ford_xml_parser.py b/src/components/dbus/codegen/ford_xml_parser.py
deleted file mode 100644
index 4f9f222d24..0000000000
--- a/src/components/dbus/codegen/ford_xml_parser.py
+++ /dev/null
@@ -1,231 +0,0 @@
-#!/usr/bin/env python
-# -*- coding: utf-8 -*-
-#
-# @file ford_xml_parser.py
-# @brief Parser for HMI_API.xml
-#
-# This file is a part of HMI D-Bus layer.
-#
-# Copyright (c) 2013, Ford Motor Company
-# All rights reserved.
-#
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions are met:
-#
-# Redistributions of source code must retain the above copyright notice, this
-# list of conditions and the following disclaimer.
-#
-# Redistributions in binary form must reproduce the above copyright notice,
-# this list of conditions and the following
-# disclaimer in the documentation and/or other materials provided with the
-# distribution.
-#
-# Neither the name of the Ford Motor Company nor the names of its contributors
-# may be used to endorse or promote products derived from this software
-# without specific prior written permission.
-#
-# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
-# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 'A PARTICULAR PURPOSE
-# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
-# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
-# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
-# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
-# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
-# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-# POSSIBILITY OF SUCH DAMAGE.
-
-from xml.etree import ElementTree
-from collections import OrderedDict
-
-node_name = '/com/ford/hmi'
-
-class ParamDesc:
- pass
-
-class FordXmlParser:
- def __init__(self, in_el_tree, interface_path=None):
- self.interface_path = interface_path
- self.el_tree = in_el_tree
- self.find_enums()
- self.find_structs()
-
- def find_enums(self):
- self.enums = dict()
- for interface_el in self.el_tree.findall('interface'):
- interface_name = interface_el.get('name')
- for enum_el in interface_el.findall('enum'):
- enum_name = enum_el.get('name')
- self.enums[(interface_name,enum_name)] = enum_el
-
-
- def make_param_desc(self, param_el, iface=None):
- param_desc = ParamDesc()
- param_desc.name = param_el.get('name')
- param_desc.type = param_el.get('type')
- param_desc.enum = False
- param_desc.struct = False
- param_desc.fulltype = param_desc.type
- if param_el.get('mandatory') == 'false':
- param_desc.mandatory = False
- else:
- param_desc.mandatory = True
- if param_el.get('array') == 'true':
- param_desc.array = True
- else:
- param_desc.array = False
- param_desc.minValue = param_el.get('minvalue') if param_el.get('minvalue') else 0
- param_desc.maxValue = param_el.get('maxvalue')
- param_desc.minLength = param_el.get('minlength') if param_el.get('minlength') else 0
- param_desc.maxLength = param_el.get('maxlength')
- param_desc.minSize = param_el.get('minsize')
- param_desc.maxSize = param_el.get('maxsize')
-
- param_desc.restricted = param_desc.minValue != None or \
- param_desc.maxValue != None or \
- param_desc.minLength > 0 or \
- param_desc.maxLength > 0
- param_desc.restrictedArray = param_desc.array and (param_desc.minSize > 0 or param_desc.maxSize > 0)
- if iface is None:
- return param_desc
- if param_desc.type not in ['Integer', 'String', 'Boolean', 'Float']:
- param_type = param_desc.type.split('.')
- if len(param_type) > 1:
- param_type = (param_type[0], param_type[1])
- else:
- param_type = (iface, param_type[0])
- param_desc.fulltype = param_type
- if param_type in self.enums: param_desc.enum = True
- elif param_type in self.structs: param_desc.struct = True
- return param_desc
-
-
- def find_structs(self):
- self.structs = OrderedDict()
- for interface_el in self.el_tree.findall('interface'):
- interface_name = interface_el.get('name')
- for struct_el in interface_el.findall('struct'):
- struct_name = struct_el.get('name')
- self.structs[(interface_name, struct_name)] = []
-
- for interface_el in self.el_tree.findall('interface'):
- interface_name = interface_el.get('name')
- for struct_el in interface_el.findall('struct'):
- struct_name = struct_el.get('name')
- for param_el in struct_el.findall('param'):
- param_desc = self.make_param_desc(param_el, interface_name)
- self.structs[(interface_name, struct_name)].append(param_desc)
-
-
- def convert_struct_to_dbus(self, param_type):
- ret = '('
- struct = self.structs[param_type]
- for param in struct:
- ret = ret + self.convert_to_dbus_type(param)
- ret = ret + ')'
- return ret
-
-
- def convert_to_dbus_type(self, param):
- if param.type == 'Integer': restype = 'i'
- elif param.type == 'String': restype = 's'
- elif param.type == 'Boolean': restype = 'b'
- elif param.type == 'Float': restype = 'd' # D-Bus double
- elif param.enum: restype = 'i' # D-Bus 32-bit signed int
- elif param.struct: restype = self.convert_struct_to_dbus(param.fulltype)
- else: raise RuntimeError('Unknown type: ' + param.type)
- if param.array: restype = 'a' + restype
- if not param.mandatory: restype = '(b' + restype + ')'
- return restype
-
-
- def find_notifications(self, interface_el):
- notifications = list()
- for function_el in interface_el.findall('function[@messagetype="notification"]'):
- notifications.append(function_el)
- return notifications
-
-
- def find_notifications_by_provider(self, interface_el, provider):
- notifications = list()
- condition = 'function[@messagetype="notification"][@provider="%s"]' % provider
- for function_el in interface_el.findall(condition):
- notifications.append(function_el)
- return notifications
-
-
- def find_request_response_pairs(self, interface_el):
- result = list()
- request_els = interface_el.findall('function[@messagetype="request"]')
- response_els = interface_el.findall('function[@messagetype="response"]')
- for request_el in request_els:
- name = request_el.get('name')
- response_el = next(r for r in response_els if r.get('name') == name)
- result.append((request_el, response_el))
- return result
-
-
- def find_request_response_pairs_by_provider(self, interface_el, provider):
- result = list()
- condition = 'function[@messagetype="request"][@provider="%s"]' % provider
- request_els = interface_el.findall(condition)
- response_els = interface_el.findall('function[@messagetype="response"]')
- for request_el in request_els:
- name = request_el.get('name')
- response_el = next(r for r in response_els if r.get('name') == name)
- result.append((request_el, response_el))
- return result
-
-
- def convert_to_signal(self, notification_el, interface):
- result = ElementTree.Element('signal')
- result.set('name', notification_el.get('name'))
- for param_el in notification_el.findall('param'):
- self.create_arg_element(result, param_el, interface)
- return result
-
-
- def convert_to_method(self, (request_el, response_el), interface):
- result = ElementTree.Element('method')
- result.set('name', request_el.get('name'))
- for param_el in request_el.findall('param'):
- arg_el = self.create_arg_element(result, param_el, interface)
- arg_el.set('direction', 'in')
-
- arg_el = ElementTree.SubElement(result, 'arg')
- arg_el.set('name', 'retCode')
- arg_el.set('type', 'i')
- arg_el.set('direction', 'out')
-
- for param_el in response_el.findall('param'):
- arg_el = self.create_arg_element(result, param_el, interface)
- arg_el.set('direction', 'out')
- return result
-
-
- def create_arg_element(self, parent, param_el, interface):
- arg_el = ElementTree.SubElement(parent, 'arg')
- arg_el.set('name', param_el.get('name'))
- arg_el.set('type', self.convert_to_dbus_type(self.make_param_desc(param_el, interface)))
- return arg_el
-
-
- def create_introspection_iface_el(self, interface_el, provider):
- interface = interface_el.get('name')
- interface_name = self.interface_path + '.' + interface
-
- notifications = self.find_notifications_by_provider(interface_el, provider)
- signals = [self.convert_to_signal(n, interface) for n in notifications]
-
- request_responses = self.find_request_response_pairs_by_provider(interface_el, provider)
- methods = [self.convert_to_method(r, interface) for r in request_responses]
-
- if signals or methods:
- el = ElementTree.Element('interface', attrib={'name':interface_name})
- for m in methods: el.append(m)
- for s in signals: el.append(s)
- return el
-
-
-
diff --git a/src/components/dbus/codegen/introspection_xml.cc b/src/components/dbus/codegen/introspection_xml.cc
deleted file mode 100644
index 210c232a4d..0000000000
--- a/src/components/dbus/codegen/introspection_xml.cc
+++ /dev/null
@@ -1,327 +0,0 @@
-// Warning! This file is generated by 'make_introspection_c.py'. Edit at your
-// own risk.
-/**
- * @file instrospections_xml.cc
- * @brief D-Bus introspection XML as C-string
- *
- * This file is a part of HMI D-Bus layer.
- */
-// Copyright (c) 2013, Ford Motor Company
-// All rights reserved.
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are met:
-//
-// Redistributions of source code must retain the above copyright notice, this
-// list of conditions and the following disclaimer.
-//
-// Redistributions in binary form must reproduce the above copyright notice,
-// this list of conditions and the following
-// disclaimer in the documentation and/or other materials provided with the
-// distribution.
-//
-// Neither the name of the Ford Motor Company nor the names of its contributors
-// may be used to endorse or promote products derived from this software
-// without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
-// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 'A PARTICULAR PURPOSE
-// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
-// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
-// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
-// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
-// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
-// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-// POSSIBILITY OF SUCH DAMAGE.
-
-char introspection_xml[] = {
- 0x3c, 0x21, 0x44, 0x4f, 0x43, 0x54, 0x59, 0x50, 0x45, 0x20, 0x6e, 0x6f,
- 0x64, 0x65, 0x20, 0x50, 0x55, 0x42, 0x4c, 0x49, 0x43, 0x20, 0x22, 0x2d,
- 0x2f, 0x2f, 0x66, 0x72, 0x65, 0x65, 0x64, 0x65, 0x73, 0x6b, 0x74, 0x6f,
- 0x70, 0x2f, 0x2f, 0x44, 0x54, 0x44, 0x20, 0x44, 0x2d, 0x42, 0x55, 0x53,
- 0x20, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x20, 0x49, 0x6e, 0x74, 0x72,
- 0x6f, 0x73, 0x70, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x31, 0x2e,
- 0x30, 0x2f, 0x2f, 0x45, 0x4e, 0x22, 0x20, 0x22, 0x68, 0x74, 0x74, 0x70,
- 0x3a, 0x2f, 0x2f, 0x77, 0x77, 0x77, 0x2e, 0x66, 0x72, 0x65, 0x65, 0x64,
- 0x65, 0x73, 0x6b, 0x74, 0x6f, 0x70, 0x2e, 0x6f, 0x72, 0x67, 0x2f, 0x73,
- 0x74, 0x61, 0x6e, 0x64, 0x61, 0x72, 0x64, 0x73, 0x2f, 0x64, 0x62, 0x75,
- 0x73, 0x2f, 0x31, 0x2e, 0x30, 0x2f, 0x69, 0x6e, 0x74, 0x72, 0x6f, 0x73,
- 0x70, 0x65, 0x63, 0x74, 0x2e, 0x64, 0x74, 0x64, 0x22, 0x3e, 0x0a, 0x3c,
- 0x6e, 0x6f, 0x64, 0x65, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x22, 0x2f,
- 0x63, 0x6f, 0x6d, 0x2f, 0x66, 0x6f, 0x72, 0x64, 0x2f, 0x68, 0x6d, 0x69,
- 0x22, 0x3e, 0x3c, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x66, 0x61, 0x63, 0x65,
- 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x22, 0x63, 0x6f, 0x6d, 0x2e, 0x66,
- 0x6f, 0x72, 0x64, 0x2e, 0x68, 0x6d, 0x69, 0x2e, 0x73, 0x64, 0x6c, 0x2e,
- 0x42, 0x61, 0x73, 0x69, 0x63, 0x43, 0x6f, 0x6d, 0x6d, 0x75, 0x6e, 0x69,
- 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x3e, 0x3c, 0x73, 0x69, 0x67,
- 0x6e, 0x61, 0x6c, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x22, 0x4f, 0x6e,
- 0x52, 0x65, 0x73, 0x75, 0x6d, 0x65, 0x41, 0x75, 0x64, 0x69, 0x6f, 0x53,
- 0x6f, 0x75, 0x72, 0x63, 0x65, 0x22, 0x3e, 0x3c, 0x61, 0x72, 0x67, 0x20,
- 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x22, 0x61, 0x70, 0x70, 0x49, 0x44, 0x22,
- 0x20, 0x74, 0x79, 0x70, 0x65, 0x3d, 0x22, 0x69, 0x22, 0x20, 0x2f, 0x3e,
- 0x3c, 0x2f, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x3e, 0x3c, 0x73, 0x69,
- 0x67, 0x6e, 0x61, 0x6c, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x22, 0x4f,
- 0x6e, 0x53, 0x44, 0x4c, 0x50, 0x65, 0x72, 0x73, 0x69, 0x73, 0x74, 0x65,
- 0x6e, 0x63, 0x65, 0x43, 0x6f, 0x6d, 0x70, 0x6c, 0x65, 0x74, 0x65, 0x22,
- 0x20, 0x2f, 0x3e, 0x3c, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x20, 0x6e,
- 0x61, 0x6d, 0x65, 0x3d, 0x22, 0x4f, 0x6e, 0x46, 0x69, 0x6c, 0x65, 0x52,
- 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x64, 0x22, 0x3e, 0x3c, 0x61, 0x72, 0x67,
- 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x22, 0x66, 0x69, 0x6c, 0x65, 0x4e,
- 0x61, 0x6d, 0x65, 0x22, 0x20, 0x74, 0x79, 0x70, 0x65, 0x3d, 0x22, 0x73,
- 0x22, 0x20, 0x2f, 0x3e, 0x3c, 0x61, 0x72, 0x67, 0x20, 0x6e, 0x61, 0x6d,
- 0x65, 0x3d, 0x22, 0x66, 0x69, 0x6c, 0x65, 0x54, 0x79, 0x70, 0x65, 0x22,
- 0x20, 0x74, 0x79, 0x70, 0x65, 0x3d, 0x22, 0x69, 0x22, 0x20, 0x2f, 0x3e,
- 0x3c, 0x61, 0x72, 0x67, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x22, 0x61,
- 0x70, 0x70, 0x49, 0x44, 0x22, 0x20, 0x74, 0x79, 0x70, 0x65, 0x3d, 0x22,
- 0x69, 0x22, 0x20, 0x2f, 0x3e, 0x3c, 0x2f, 0x73, 0x69, 0x67, 0x6e, 0x61,
- 0x6c, 0x3e, 0x3c, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x20, 0x6e, 0x61,
- 0x6d, 0x65, 0x3d, 0x22, 0x4f, 0x6e, 0x41, 0x70, 0x70, 0x52, 0x65, 0x67,
- 0x69, 0x73, 0x74, 0x65, 0x72, 0x65, 0x64, 0x22, 0x3e, 0x3c, 0x61, 0x72,
- 0x67, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x22, 0x61, 0x70, 0x70, 0x6c,
- 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x20, 0x74, 0x79, 0x70,
- 0x65, 0x3d, 0x22, 0x28, 0x73, 0x28, 0x62, 0x73, 0x29, 0x28, 0x62, 0x73,
- 0x29, 0x28, 0x73, 0x73, 0x28, 0x62, 0x69, 0x29, 0x28, 0x62, 0x62, 0x29,
- 0x29, 0x73, 0x28, 0x62, 0x61, 0x28, 0x73, 0x69, 0x29, 0x29, 0x28, 0x62,
- 0x61, 0x73, 0x29, 0x69, 0x69, 0x62, 0x28, 0x62, 0x61, 0x69, 0x29, 0x28,
- 0x62, 0x62, 0x29, 0x28, 0x62, 0x61, 0x69, 0x29, 0x29, 0x22, 0x20, 0x2f,
- 0x3e, 0x3c, 0x61, 0x72, 0x67, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x22,
- 0x74, 0x74, 0x73, 0x4e, 0x61, 0x6d, 0x65, 0x22, 0x20, 0x74, 0x79, 0x70,
- 0x65, 0x3d, 0x22, 0x28, 0x62, 0x61, 0x28, 0x73, 0x69, 0x29, 0x29, 0x22,
- 0x20, 0x2f, 0x3e, 0x3c, 0x61, 0x72, 0x67, 0x20, 0x6e, 0x61, 0x6d, 0x65,
- 0x3d, 0x22, 0x76, 0x72, 0x53, 0x79, 0x6e, 0x6f, 0x6e, 0x79, 0x6d, 0x73,
- 0x22, 0x20, 0x74, 0x79, 0x70, 0x65, 0x3d, 0x22, 0x28, 0x62, 0x61, 0x73,
- 0x29, 0x22, 0x20, 0x2f, 0x3e, 0x3c, 0x61, 0x72, 0x67, 0x20, 0x6e, 0x61,
- 0x6d, 0x65, 0x3d, 0x22, 0x72, 0x65, 0x73, 0x75, 0x6d, 0x65, 0x56, 0x72,
- 0x47, 0x72, 0x61, 0x6d, 0x6d, 0x61, 0x72, 0x73, 0x22, 0x20, 0x74, 0x79,
- 0x70, 0x65, 0x3d, 0x22, 0x28, 0x62, 0x62, 0x29, 0x22, 0x20, 0x2f, 0x3e,
- 0x3c, 0x61, 0x72, 0x67, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x22, 0x70,
- 0x72, 0x69, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x22, 0x20, 0x74, 0x79, 0x70,
- 0x65, 0x3d, 0x22, 0x28, 0x62, 0x69, 0x29, 0x22, 0x20, 0x2f, 0x3e, 0x3c,
- 0x2f, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x3e, 0x3c, 0x73, 0x69, 0x67,
- 0x6e, 0x61, 0x6c, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x22, 0x4f, 0x6e,
- 0x41, 0x70, 0x70, 0x55, 0x6e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65,
- 0x72, 0x65, 0x64, 0x22, 0x3e, 0x3c, 0x61, 0x72, 0x67, 0x20, 0x6e, 0x61,
- 0x6d, 0x65, 0x3d, 0x22, 0x75, 0x6e, 0x65, 0x78, 0x70, 0x65, 0x63, 0x74,
- 0x65, 0x64, 0x44, 0x69, 0x73, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74,
- 0x22, 0x20, 0x74, 0x79, 0x70, 0x65, 0x3d, 0x22, 0x62, 0x22, 0x20, 0x2f,
- 0x3e, 0x3c, 0x61, 0x72, 0x67, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x22,
- 0x61, 0x70, 0x70, 0x49, 0x44, 0x22, 0x20, 0x74, 0x79, 0x70, 0x65, 0x3d,
- 0x22, 0x69, 0x22, 0x20, 0x2f, 0x3e, 0x3c, 0x2f, 0x73, 0x69, 0x67, 0x6e,
- 0x61, 0x6c, 0x3e, 0x3c, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x20, 0x6e,
- 0x61, 0x6d, 0x65, 0x3d, 0x22, 0x50, 0x6c, 0x61, 0x79, 0x54, 0x6f, 0x6e,
- 0x65, 0x22, 0x3e, 0x3c, 0x61, 0x72, 0x67, 0x20, 0x6e, 0x61, 0x6d, 0x65,
- 0x3d, 0x22, 0x61, 0x70, 0x70, 0x49, 0x44, 0x22, 0x20, 0x74, 0x79, 0x70,
- 0x65, 0x3d, 0x22, 0x69, 0x22, 0x20, 0x2f, 0x3e, 0x3c, 0x61, 0x72, 0x67,
- 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x22, 0x6d, 0x65, 0x74, 0x68, 0x6f,
- 0x64, 0x4e, 0x61, 0x6d, 0x65, 0x22, 0x20, 0x74, 0x79, 0x70, 0x65, 0x3d,
- 0x22, 0x69, 0x22, 0x20, 0x2f, 0x3e, 0x3c, 0x2f, 0x73, 0x69, 0x67, 0x6e,
- 0x61, 0x6c, 0x3e, 0x3c, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x20, 0x6e,
- 0x61, 0x6d, 0x65, 0x3d, 0x22, 0x4f, 0x6e, 0x53, 0x44, 0x4c, 0x43, 0x6c,
- 0x6f, 0x73, 0x65, 0x22, 0x20, 0x2f, 0x3e, 0x3c, 0x73, 0x69, 0x67, 0x6e,
- 0x61, 0x6c, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x22, 0x4f, 0x6e, 0x50,
- 0x75, 0x74, 0x46, 0x69, 0x6c, 0x65, 0x22, 0x3e, 0x3c, 0x61, 0x72, 0x67,
- 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x22, 0x6f, 0x66, 0x66, 0x73, 0x65,
- 0x74, 0x22, 0x20, 0x74, 0x79, 0x70, 0x65, 0x3d, 0x22, 0x28, 0x62, 0x69,
- 0x29, 0x22, 0x20, 0x2f, 0x3e, 0x3c, 0x61, 0x72, 0x67, 0x20, 0x6e, 0x61,
- 0x6d, 0x65, 0x3d, 0x22, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x22, 0x20,
- 0x74, 0x79, 0x70, 0x65, 0x3d, 0x22, 0x28, 0x62, 0x69, 0x29, 0x22, 0x20,
- 0x2f, 0x3e, 0x3c, 0x61, 0x72, 0x67, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x3d,
- 0x22, 0x66, 0x69, 0x6c, 0x65, 0x53, 0x69, 0x7a, 0x65, 0x22, 0x20, 0x74,
- 0x79, 0x70, 0x65, 0x3d, 0x22, 0x28, 0x62, 0x69, 0x29, 0x22, 0x20, 0x2f,
- 0x3e, 0x3c, 0x61, 0x72, 0x67, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x22,
- 0x46, 0x69, 0x6c, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x22, 0x20, 0x74, 0x79,
- 0x70, 0x65, 0x3d, 0x22, 0x73, 0x22, 0x20, 0x2f, 0x3e, 0x3c, 0x61, 0x72,
- 0x67, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x22, 0x73, 0x79, 0x6e, 0x63,
- 0x46, 0x69, 0x6c, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x22, 0x20, 0x74, 0x79,
- 0x70, 0x65, 0x3d, 0x22, 0x73, 0x22, 0x20, 0x2f, 0x3e, 0x3c, 0x61, 0x72,
- 0x67, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x22, 0x66, 0x69, 0x6c, 0x65,
- 0x54, 0x79, 0x70, 0x65, 0x22, 0x20, 0x74, 0x79, 0x70, 0x65, 0x3d, 0x22,
- 0x69, 0x22, 0x20, 0x2f, 0x3e, 0x3c, 0x61, 0x72, 0x67, 0x20, 0x6e, 0x61,
- 0x6d, 0x65, 0x3d, 0x22, 0x70, 0x65, 0x72, 0x73, 0x69, 0x73, 0x74, 0x65,
- 0x6e, 0x74, 0x46, 0x69, 0x6c, 0x65, 0x22, 0x20, 0x74, 0x79, 0x70, 0x65,
- 0x3d, 0x22, 0x28, 0x62, 0x62, 0x29, 0x22, 0x20, 0x2f, 0x3e, 0x3c, 0x2f,
- 0x73, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x3e, 0x3c, 0x2f, 0x69, 0x6e, 0x74,
- 0x65, 0x72, 0x66, 0x61, 0x63, 0x65, 0x3e, 0x3c, 0x69, 0x6e, 0x74, 0x65,
- 0x72, 0x66, 0x61, 0x63, 0x65, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x22,
- 0x63, 0x6f, 0x6d, 0x2e, 0x66, 0x6f, 0x72, 0x64, 0x2e, 0x68, 0x6d, 0x69,
- 0x2e, 0x73, 0x64, 0x6c, 0x2e, 0x55, 0x49, 0x22, 0x3e, 0x3c, 0x73, 0x69,
- 0x67, 0x6e, 0x61, 0x6c, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x22, 0x4f,
- 0x6e, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x53, 0x74, 0x61, 0x72, 0x74,
- 0x22, 0x3e, 0x3c, 0x61, 0x72, 0x67, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x3d,
- 0x22, 0x61, 0x70, 0x70, 0x49, 0x44, 0x22, 0x20, 0x74, 0x79, 0x70, 0x65,
- 0x3d, 0x22, 0x69, 0x22, 0x20, 0x2f, 0x3e, 0x3c, 0x2f, 0x73, 0x69, 0x67,
- 0x6e, 0x61, 0x6c, 0x3e, 0x3c, 0x2f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x66,
- 0x61, 0x63, 0x65, 0x3e, 0x3c, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x66, 0x61,
- 0x63, 0x65, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x22, 0x63, 0x6f, 0x6d,
- 0x2e, 0x66, 0x6f, 0x72, 0x64, 0x2e, 0x68, 0x6d, 0x69, 0x2e, 0x73, 0x64,
- 0x6c, 0x2e, 0x53, 0x44, 0x4c, 0x22, 0x3e, 0x3c, 0x6d, 0x65, 0x74, 0x68,
- 0x6f, 0x64, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x22, 0x41, 0x63, 0x74,
- 0x69, 0x76, 0x61, 0x74, 0x65, 0x41, 0x70, 0x70, 0x22, 0x3e, 0x3c, 0x61,
- 0x72, 0x67, 0x20, 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e,
- 0x3d, 0x22, 0x69, 0x6e, 0x22, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x22,
- 0x61, 0x70, 0x70, 0x49, 0x44, 0x22, 0x20, 0x74, 0x79, 0x70, 0x65, 0x3d,
- 0x22, 0x69, 0x22, 0x20, 0x2f, 0x3e, 0x3c, 0x61, 0x72, 0x67, 0x20, 0x64,
- 0x69, 0x72, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x3d, 0x22, 0x6f, 0x75,
- 0x74, 0x22, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x22, 0x72, 0x65, 0x74,
- 0x43, 0x6f, 0x64, 0x65, 0x22, 0x20, 0x74, 0x79, 0x70, 0x65, 0x3d, 0x22,
- 0x69, 0x22, 0x20, 0x2f, 0x3e, 0x3c, 0x61, 0x72, 0x67, 0x20, 0x64, 0x69,
- 0x72, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x3d, 0x22, 0x6f, 0x75, 0x74,
- 0x22, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x22, 0x69, 0x73, 0x53, 0x44,
- 0x4c, 0x41, 0x6c, 0x6c, 0x6f, 0x77, 0x65, 0x64, 0x22, 0x20, 0x74, 0x79,
- 0x70, 0x65, 0x3d, 0x22, 0x62, 0x22, 0x20, 0x2f, 0x3e, 0x3c, 0x61, 0x72,
- 0x67, 0x20, 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x3d,
- 0x22, 0x6f, 0x75, 0x74, 0x22, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x22,
- 0x64, 0x65, 0x76, 0x69, 0x63, 0x65, 0x22, 0x20, 0x74, 0x79, 0x70, 0x65,
- 0x3d, 0x22, 0x28, 0x62, 0x28, 0x73, 0x73, 0x28, 0x62, 0x69, 0x29, 0x28,
- 0x62, 0x62, 0x29, 0x29, 0x29, 0x22, 0x20, 0x2f, 0x3e, 0x3c, 0x61, 0x72,
- 0x67, 0x20, 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x3d,
- 0x22, 0x6f, 0x75, 0x74, 0x22, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x22,
- 0x69, 0x73, 0x50, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e,
- 0x73, 0x43, 0x6f, 0x6e, 0x73, 0x65, 0x6e, 0x74, 0x4e, 0x65, 0x65, 0x64,
- 0x65, 0x64, 0x22, 0x20, 0x74, 0x79, 0x70, 0x65, 0x3d, 0x22, 0x62, 0x22,
- 0x20, 0x2f, 0x3e, 0x3c, 0x61, 0x72, 0x67, 0x20, 0x64, 0x69, 0x72, 0x65,
- 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x3d, 0x22, 0x6f, 0x75, 0x74, 0x22, 0x20,
- 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x22, 0x69, 0x73, 0x41, 0x70, 0x70, 0x50,
- 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65,
- 0x76, 0x6f, 0x6b, 0x65, 0x64, 0x22, 0x20, 0x74, 0x79, 0x70, 0x65, 0x3d,
- 0x22, 0x62, 0x22, 0x20, 0x2f, 0x3e, 0x3c, 0x61, 0x72, 0x67, 0x20, 0x64,
- 0x69, 0x72, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x3d, 0x22, 0x6f, 0x75,
- 0x74, 0x22, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x22, 0x61, 0x70, 0x70,
- 0x52, 0x65, 0x76, 0x6f, 0x6b, 0x65, 0x64, 0x50, 0x65, 0x72, 0x6d, 0x69,
- 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0x20, 0x74, 0x79, 0x70, 0x65,
- 0x3d, 0x22, 0x28, 0x62, 0x61, 0x28, 0x73, 0x69, 0x28, 0x62, 0x62, 0x29,
- 0x29, 0x29, 0x22, 0x20, 0x2f, 0x3e, 0x3c, 0x61, 0x72, 0x67, 0x20, 0x64,
- 0x69, 0x72, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x3d, 0x22, 0x6f, 0x75,
- 0x74, 0x22, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x22, 0x69, 0x73, 0x41,
- 0x70, 0x70, 0x52, 0x65, 0x76, 0x6f, 0x6b, 0x65, 0x64, 0x22, 0x20, 0x74,
- 0x79, 0x70, 0x65, 0x3d, 0x22, 0x62, 0x22, 0x20, 0x2f, 0x3e, 0x3c, 0x61,
- 0x72, 0x67, 0x20, 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e,
- 0x3d, 0x22, 0x6f, 0x75, 0x74, 0x22, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x3d,
- 0x22, 0x70, 0x72, 0x69, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x22, 0x20, 0x74,
- 0x79, 0x70, 0x65, 0x3d, 0x22, 0x28, 0x62, 0x69, 0x29, 0x22, 0x20, 0x2f,
- 0x3e, 0x3c, 0x2f, 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x3e, 0x3c, 0x6d,
- 0x65, 0x74, 0x68, 0x6f, 0x64, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x22,
- 0x47, 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, 0x46, 0x72, 0x69, 0x65, 0x6e,
- 0x64, 0x6c, 0x79, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x22, 0x3e,
- 0x3c, 0x61, 0x72, 0x67, 0x20, 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 0x69,
- 0x6f, 0x6e, 0x3d, 0x22, 0x69, 0x6e, 0x22, 0x20, 0x6e, 0x61, 0x6d, 0x65,
- 0x3d, 0x22, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x43, 0x6f, 0x64,
- 0x65, 0x73, 0x22, 0x20, 0x74, 0x79, 0x70, 0x65, 0x3d, 0x22, 0x61, 0x73,
- 0x22, 0x20, 0x2f, 0x3e, 0x3c, 0x61, 0x72, 0x67, 0x20, 0x64, 0x69, 0x72,
- 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x3d, 0x22, 0x69, 0x6e, 0x22, 0x20,
- 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x22, 0x6c, 0x61, 0x6e, 0x67, 0x75, 0x61,
- 0x67, 0x65, 0x22, 0x20, 0x74, 0x79, 0x70, 0x65, 0x3d, 0x22, 0x28, 0x62,
- 0x69, 0x29, 0x22, 0x20, 0x2f, 0x3e, 0x3c, 0x61, 0x72, 0x67, 0x20, 0x64,
- 0x69, 0x72, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x3d, 0x22, 0x6f, 0x75,
- 0x74, 0x22, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x22, 0x72, 0x65, 0x74,
- 0x43, 0x6f, 0x64, 0x65, 0x22, 0x20, 0x74, 0x79, 0x70, 0x65, 0x3d, 0x22,
- 0x69, 0x22, 0x20, 0x2f, 0x3e, 0x3c, 0x61, 0x72, 0x67, 0x20, 0x64, 0x69,
- 0x72, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x3d, 0x22, 0x6f, 0x75, 0x74,
- 0x22, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x22, 0x6d, 0x65, 0x73, 0x73,
- 0x61, 0x67, 0x65, 0x73, 0x22, 0x20, 0x74, 0x79, 0x70, 0x65, 0x3d, 0x22,
- 0x28, 0x62, 0x61, 0x28, 0x73, 0x28, 0x62, 0x73, 0x29, 0x28, 0x62, 0x73,
- 0x29, 0x28, 0x62, 0x73, 0x29, 0x28, 0x62, 0x73, 0x29, 0x28, 0x62, 0x73,
- 0x29, 0x29, 0x29, 0x22, 0x20, 0x2f, 0x3e, 0x3c, 0x2f, 0x6d, 0x65, 0x74,
- 0x68, 0x6f, 0x64, 0x3e, 0x3c, 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x20,
- 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x22, 0x47, 0x65, 0x74, 0x4c, 0x69, 0x73,
- 0x74, 0x4f, 0x66, 0x50, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f,
- 0x6e, 0x73, 0x22, 0x3e, 0x3c, 0x61, 0x72, 0x67, 0x20, 0x64, 0x69, 0x72,
- 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x3d, 0x22, 0x69, 0x6e, 0x22, 0x20,
- 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x22, 0x61, 0x70, 0x70, 0x49, 0x44, 0x22,
- 0x20, 0x74, 0x79, 0x70, 0x65, 0x3d, 0x22, 0x28, 0x62, 0x69, 0x29, 0x22,
- 0x20, 0x2f, 0x3e, 0x3c, 0x61, 0x72, 0x67, 0x20, 0x64, 0x69, 0x72, 0x65,
- 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x3d, 0x22, 0x6f, 0x75, 0x74, 0x22, 0x20,
- 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x22, 0x72, 0x65, 0x74, 0x43, 0x6f, 0x64,
- 0x65, 0x22, 0x20, 0x74, 0x79, 0x70, 0x65, 0x3d, 0x22, 0x69, 0x22, 0x20,
- 0x2f, 0x3e, 0x3c, 0x61, 0x72, 0x67, 0x20, 0x64, 0x69, 0x72, 0x65, 0x63,
- 0x74, 0x69, 0x6f, 0x6e, 0x3d, 0x22, 0x6f, 0x75, 0x74, 0x22, 0x20, 0x6e,
- 0x61, 0x6d, 0x65, 0x3d, 0x22, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x65, 0x64,
- 0x46, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0x20, 0x74,
- 0x79, 0x70, 0x65, 0x3d, 0x22, 0x61, 0x28, 0x73, 0x69, 0x28, 0x62, 0x62,
- 0x29, 0x29, 0x22, 0x20, 0x2f, 0x3e, 0x3c, 0x2f, 0x6d, 0x65, 0x74, 0x68,
- 0x6f, 0x64, 0x3e, 0x3c, 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x20, 0x6e,
- 0x61, 0x6d, 0x65, 0x3d, 0x22, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x53,
- 0x44, 0x4c, 0x22, 0x3e, 0x3c, 0x61, 0x72, 0x67, 0x20, 0x64, 0x69, 0x72,
- 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x3d, 0x22, 0x6f, 0x75, 0x74, 0x22,
- 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x22, 0x72, 0x65, 0x74, 0x43, 0x6f,
- 0x64, 0x65, 0x22, 0x20, 0x74, 0x79, 0x70, 0x65, 0x3d, 0x22, 0x69, 0x22,
- 0x20, 0x2f, 0x3e, 0x3c, 0x61, 0x72, 0x67, 0x20, 0x64, 0x69, 0x72, 0x65,
- 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x3d, 0x22, 0x6f, 0x75, 0x74, 0x22, 0x20,
- 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x22, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74,
- 0x22, 0x20, 0x74, 0x79, 0x70, 0x65, 0x3d, 0x22, 0x69, 0x22, 0x20, 0x2f,
- 0x3e, 0x3c, 0x2f, 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x3e, 0x3c, 0x6d,
- 0x65, 0x74, 0x68, 0x6f, 0x64, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x22,
- 0x47, 0x65, 0x74, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x55, 0x70, 0x64,
- 0x61, 0x74, 0x65, 0x22, 0x3e, 0x3c, 0x61, 0x72, 0x67, 0x20, 0x64, 0x69,
- 0x72, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x3d, 0x22, 0x6f, 0x75, 0x74,
- 0x22, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x22, 0x72, 0x65, 0x74, 0x43,
- 0x6f, 0x64, 0x65, 0x22, 0x20, 0x74, 0x79, 0x70, 0x65, 0x3d, 0x22, 0x69,
- 0x22, 0x20, 0x2f, 0x3e, 0x3c, 0x61, 0x72, 0x67, 0x20, 0x64, 0x69, 0x72,
- 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x3d, 0x22, 0x6f, 0x75, 0x74, 0x22,
- 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x22, 0x73, 0x74, 0x61, 0x74, 0x75,
- 0x73, 0x22, 0x20, 0x74, 0x79, 0x70, 0x65, 0x3d, 0x22, 0x69, 0x22, 0x20,
- 0x2f, 0x3e, 0x3c, 0x2f, 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x3e, 0x3c,
- 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x3d,
- 0x22, 0x47, 0x65, 0x74, 0x55, 0x52, 0x4c, 0x53, 0x22, 0x3e, 0x3c, 0x61,
- 0x72, 0x67, 0x20, 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e,
- 0x3d, 0x22, 0x69, 0x6e, 0x22, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x22,
- 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x22, 0x20, 0x74, 0x79, 0x70,
- 0x65, 0x3d, 0x22, 0x69, 0x22, 0x20, 0x2f, 0x3e, 0x3c, 0x61, 0x72, 0x67,
- 0x20, 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x3d, 0x22,
- 0x6f, 0x75, 0x74, 0x22, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x22, 0x72,
- 0x65, 0x74, 0x43, 0x6f, 0x64, 0x65, 0x22, 0x20, 0x74, 0x79, 0x70, 0x65,
- 0x3d, 0x22, 0x69, 0x22, 0x20, 0x2f, 0x3e, 0x3c, 0x61, 0x72, 0x67, 0x20,
- 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x3d, 0x22, 0x6f,
- 0x75, 0x74, 0x22, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x22, 0x75, 0x72,
- 0x6c, 0x73, 0x22, 0x20, 0x74, 0x79, 0x70, 0x65, 0x3d, 0x22, 0x28, 0x62,
- 0x61, 0x28, 0x73, 0x28, 0x62, 0x73, 0x29, 0x29, 0x29, 0x22, 0x20, 0x2f,
- 0x3e, 0x3c, 0x2f, 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x3e, 0x3c, 0x73,
- 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x22,
- 0x4f, 0x6e, 0x41, 0x70, 0x70, 0x50, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73,
- 0x69, 0x6f, 0x6e, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x64, 0x22, 0x3e,
- 0x3c, 0x61, 0x72, 0x67, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x22, 0x61,
- 0x70, 0x70, 0x49, 0x44, 0x22, 0x20, 0x74, 0x79, 0x70, 0x65, 0x3d, 0x22,
- 0x69, 0x22, 0x20, 0x2f, 0x3e, 0x3c, 0x61, 0x72, 0x67, 0x20, 0x6e, 0x61,
- 0x6d, 0x65, 0x3d, 0x22, 0x69, 0x73, 0x41, 0x70, 0x70, 0x50, 0x65, 0x72,
- 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x76, 0x6f,
- 0x6b, 0x65, 0x64, 0x22, 0x20, 0x74, 0x79, 0x70, 0x65, 0x3d, 0x22, 0x28,
- 0x62, 0x62, 0x29, 0x22, 0x20, 0x2f, 0x3e, 0x3c, 0x61, 0x72, 0x67, 0x20,
- 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x22, 0x61, 0x70, 0x70, 0x52, 0x65, 0x76,
- 0x6f, 0x6b, 0x65, 0x64, 0x50, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69,
- 0x6f, 0x6e, 0x73, 0x22, 0x20, 0x74, 0x79, 0x70, 0x65, 0x3d, 0x22, 0x28,
- 0x62, 0x61, 0x28, 0x73, 0x69, 0x28, 0x62, 0x62, 0x29, 0x29, 0x29, 0x22,
- 0x20, 0x2f, 0x3e, 0x3c, 0x61, 0x72, 0x67, 0x20, 0x6e, 0x61, 0x6d, 0x65,
- 0x3d, 0x22, 0x61, 0x70, 0x70, 0x52, 0x65, 0x76, 0x6f, 0x6b, 0x65, 0x64,
- 0x22, 0x20, 0x74, 0x79, 0x70, 0x65, 0x3d, 0x22, 0x28, 0x62, 0x62, 0x29,
- 0x22, 0x20, 0x2f, 0x3e, 0x3c, 0x61, 0x72, 0x67, 0x20, 0x6e, 0x61, 0x6d,
- 0x65, 0x3d, 0x22, 0x61, 0x70, 0x70, 0x50, 0x65, 0x72, 0x6d, 0x69, 0x73,
- 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x43, 0x6f, 0x6e, 0x73, 0x65, 0x6e, 0x74,
- 0x4e, 0x65, 0x65, 0x64, 0x65, 0x64, 0x22, 0x20, 0x74, 0x79, 0x70, 0x65,
- 0x3d, 0x22, 0x28, 0x62, 0x62, 0x29, 0x22, 0x20, 0x2f, 0x3e, 0x3c, 0x61,
- 0x72, 0x67, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x22, 0x61, 0x70, 0x70,
- 0x55, 0x6e, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x65, 0x64,
- 0x22, 0x20, 0x74, 0x79, 0x70, 0x65, 0x3d, 0x22, 0x28, 0x62, 0x62, 0x29,
- 0x22, 0x20, 0x2f, 0x3e, 0x3c, 0x61, 0x72, 0x67, 0x20, 0x6e, 0x61, 0x6d,
- 0x65, 0x3d, 0x22, 0x70, 0x72, 0x69, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x22,
- 0x20, 0x74, 0x79, 0x70, 0x65, 0x3d, 0x22, 0x28, 0x62, 0x69, 0x29, 0x22,
- 0x20, 0x2f, 0x3e, 0x3c, 0x61, 0x72, 0x67, 0x20, 0x6e, 0x61, 0x6d, 0x65,
- 0x3d, 0x22, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x54, 0x79, 0x70,
- 0x65, 0x22, 0x20, 0x74, 0x79, 0x70, 0x65, 0x3d, 0x22, 0x28, 0x62, 0x61,
- 0x69, 0x29, 0x22, 0x20, 0x2f, 0x3e, 0x3c, 0x2f, 0x73, 0x69, 0x67, 0x6e,
- 0x61, 0x6c, 0x3e, 0x3c, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x20, 0x6e,
- 0x61, 0x6d, 0x65, 0x3d, 0x22, 0x4f, 0x6e, 0x53, 0x44, 0x4c, 0x43, 0x6f,
- 0x6e, 0x73, 0x65, 0x6e, 0x74, 0x4e, 0x65, 0x65, 0x64, 0x65, 0x64, 0x22,
- 0x3e, 0x3c, 0x61, 0x72, 0x67, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x22,
- 0x64, 0x65, 0x76, 0x69, 0x63, 0x65, 0x22, 0x20, 0x74, 0x79, 0x70, 0x65,
- 0x3d, 0x22, 0x28, 0x73, 0x73, 0x28, 0x62, 0x69, 0x29, 0x28, 0x62, 0x62,
- 0x29, 0x29, 0x22, 0x20, 0x2f, 0x3e, 0x3c, 0x2f, 0x73, 0x69, 0x67, 0x6e,
- 0x61, 0x6c, 0x3e, 0x3c, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x20, 0x6e,
- 0x61, 0x6d, 0x65, 0x3d, 0x22, 0x4f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x75,
- 0x73, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x22, 0x3e, 0x3c, 0x61, 0x72,
- 0x67, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x22, 0x73, 0x74, 0x61, 0x74,
- 0x75, 0x73, 0x22, 0x20, 0x74, 0x79, 0x70, 0x65, 0x3d, 0x22, 0x69, 0x22,
- 0x20, 0x2f, 0x3e, 0x3c, 0x2f, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x3e,
- 0x3c, 0x2f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x66, 0x61, 0x63, 0x65, 0x3e,
- 0x3c, 0x2f, 0x6e, 0x6f, 0x64, 0x65, 0x3e, 0x00}; \ No newline at end of file
diff --git a/src/components/dbus/codegen/make_hmi_requests.py b/src/components/dbus/codegen/make_hmi_requests.py
deleted file mode 100755
index 4716d40439..0000000000
--- a/src/components/dbus/codegen/make_hmi_requests.py
+++ /dev/null
@@ -1,343 +0,0 @@
-#!/usr/bin/env python
-# -*- coding: utf-8 -*-
-#
-# @file make_qml_dbus_cpp.py
-# @brief Generator of QML to QDbus C++ part
-#
-# This file is a part of HMI D-Bus layer.
-#
-# 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.
-
-from argparse import ArgumentParser
-import os.path
-from sys import argv
-from xml.etree import ElementTree
-from copy import copy
-from ford_xml_parser import FordXmlParser, ParamDesc
-from code_formatter import CodeBlock
-
-prefix_class_item = 'Declarative'
-invoke_type_connection = 'Direct'
-
-def defaultValue(param):
- if param.type == "Integer":
- return "0"
- elif param.type == "Float":
- return "0.0"
- elif param.type == "Boolean":
- return "false"
- elif param.enum:
- return "0"
-
-class Impl(FordXmlParser):
- def make_requests_classes_header(self, out):
- for interface_el in self.el_tree.findall('interface'):
- request_responses = self.find_request_response_pairs_by_provider(interface_el, "sdl")
- for (request, response) in request_responses:
- request_full_name = interface_el.get('name') + '_' +request.get('name')
- out.write('class ' + request_full_name + ': public HMIRequest {\n')
- with CodeBlock(out) as output:
- output.write('Q_OBJECT\n')
- out.write(' public:\n')
- with CodeBlock(out) as output:
- output.write(request_full_name + '(QJSValue hmi_callback, QDBusInterface *interface, QList<QVariant> args, QString name):\n')
- output.write(' HMIRequest(hmi_callback, interface, args, name) {}\n')
- out.write(' private:\n')
- with CodeBlock(out) as output:
- output.write('QJSValueList fillArgsList();\n};\n\n')
-
-
- def make_header_file(self, out):
- out.write("namespace requests {\n")
- out.write("class HMIRequest: public QObject {\n")
- with CodeBlock(out) as output:
- output.write('Q_OBJECT\n')
- out.write('public:\n')
- with CodeBlock(out) as output:
- output.write('HMIRequest(QJSValue hmi_callback, QDBusInterface *interface, QList<QVariant> args, QString name );\n')
- out.write('protected:\n')
- with CodeBlock(out) as output:
- output.write('virtual QJSValueList fillArgsList() = 0;\n')
- output.write('QDBusPendingCallWatcher *watcher_;\n')
- output.write('QJSValue hmi_callback_;\n\n')
- output.write('template<typename T>\n')
- output.write('QJSValue CreateQJSValue(T value) {\n')
- output.write(' return QJSValue(value);\n')
- output.write('}\n\n')
- output.write('template<typename T>\n')
- output.write('QJSValue CreateQJSValue(QList<T> value) {\n')
- with CodeBlock(output) as output:
- output.write('QJSValue array = hmi_callback_.engine()->newArray();\n')
- output.write('int i = 0;\n')
- output.write('foreach (T item, value) {\n')
- output.write(' QJSValue value = CreateQJSValue(item);\n')
- output.write(' array.setProperty(i, value);\n')
- output.write(' ++i;\n')
- output.write('}\n')
- output.write('return array;\n')
- output.write('}\n')
- out.write('private:\n')
- with CodeBlock(out) as output:
- output.write('QDBusInterface *interface_;\n')
- output.write('QList<QVariant> args_;\n')
- out.write('public slots:\n')
- with CodeBlock(out) as output:
- output.write('void invokeCallback();\n')
- out.write('};\n\n')
- output.write('template<>\n')
- output.write('QJSValue HMIRequest::CreateQJSValue(QStringList value);\n')
- for (interface_name, struct_name) in self.structs:
- out.write('template<>\n')
- out.write('QJSValue HMIRequest::CreateQJSValue(Common_' + struct_name + ' value);\n\n')
- impl.make_requests_classes_header(out)
- out.write("} // namespace requests\n")
-
-
- def qt_param_type(self, param):
- if not param.mandatory:
- param_copy = copy(param)
- param_copy.mandatory = True
- return "OptionalArgument< " + self.qt_param_type(param_copy) + " >"
- if param.array:
- param_copy = copy(param)
- param_copy.array = False
- if param.type == 'String':
- return "QStringList"
- return "QList< " + self.qt_param_type(param_copy) + " >"
- if param.type == 'Integer' or param.enum:
- return 'int'
- elif param.type == 'String':
- return 'QString'
- elif param.type == 'Boolean':
- return 'bool'
- elif param.type == 'Float':
- return 'double'
- elif param.struct:
- return "_".join(param.fulltype)
- return "xxx"
-
-
- def make_requests_methods_source(self, out):
- for interface_el in self.el_tree.findall('interface'):
- request_responses = self.find_request_response_pairs_by_provider(interface_el, "sdl")
- for (request, response) in request_responses:
- iface_name = interface_el.get('name')
- request_full_name = iface_name + '_' +request.get('name')
- out.write('QJSValueList ' + request_full_name + '::fillArgsList() {\n')
- out.write(' QDBusPendingReply< ')
- count = 0
- for param_el in response.findall('param'):
- param = self.make_param_desc(param_el, iface_name)
- out.write(self.qt_param_type(param))
- count += 1
- if count < len(response.findall('param')):
- out.write(',')
- out.write(' > reply = *watcher_;\n')
-
- with CodeBlock(out) as out:
- out.write('QJSValueList qjsValueList;\n\n')
- out.write('QJSValue param;\n\n')
- count = 0
- for param_el in response.findall('param'):
- if param_el.get('mandatory') == 'false':
- out.write('if (reply.argumentAt<' + str(count) + '>().presence) {\n')
- out.write(' param = CreateQJSValue(reply.argumentAt<' + str(count) + '>().val);\n')
- out.write('} else {\n')
- out.write(' param = QJSValue();\n')
- out.write('}\n')
- out.write('qjsValueList.append(param);\n')
- else:
- out.write('param = CreateQJSValue(reply.argumentAt<' + str(count) + '>());\n')
- out.write('qjsValueList.append(param);\n')
- count += 1
- out.write('return qjsValueList;\n')
- out.write('}\n\n')
-
-
- def make_source_file(self, out):
- out.write("namespace requests {\n")
- for interface_el in self.el_tree.findall('interface'):
- for struct_el in interface_el.findall('struct'):
- out.write('template<>\n')
- out.write('QJSValue HMIRequest::CreateQJSValue(Common_' + struct_el.get('name') + ' value){\n')
- with CodeBlock(out) as output:
- output.write('QJSValue object = hmi_callback_.engine()->newObject();\n')
- for param_el in struct_el.findall('param'):
- param_name = param_el.get('name')
- if param_el.get('mandatory') == 'true':
- with CodeBlock(out) as output:
- output.write('object.setProperty("' + param_name + '", CreateQJSValue(value.' + param_name + '));\n')
- elif param_el.get('mandatory') == 'false':
- with CodeBlock(out) as output:
- output.write('object.setProperty("' + param_name + '", value.' + param_name + '.presence ? CreateQJSValue(value.' + param_name + '.val) : QJSValue());\n')
- out.write('return object;\n')
- out.write('}\n\n')
-
-
- out.write('HMIRequest::HMIRequest(QJSValue hmi_callback, QDBusInterface *interface, QList<QVariant> args, QString name) :\n')
- out.write(' hmi_callback_(hmi_callback), interface_(interface), args_(args) {\n')
- with CodeBlock(out) as output:
- output.write('QDBusPendingCall pcall = interface->asyncCallWithArgumentList(name, args);\n')
- output.write('watcher_ = new QDBusPendingCallWatcher(pcall);\n')
- output.write('QObject::connect(watcher_, SIGNAL(finished(QDBusPendingCallWatcher*)), this, SLOT(invokeCallback()));\n}\n\n')
- out.write('void HMIRequest::invokeCallback() {\n')
- with CodeBlock(out) as output:
- output.write('if (!hmi_callback_.isUndefined()) {\n')
- with CodeBlock(output) as output:
- output.write('QJSValueList qjsValueList;\n')
- output.write('qjsValueList = this->fillArgsList();\n')
- output.write('hmi_callback_.call(qjsValueList);\n')
- output.write('}\n')
- output.write('watcher_->deleteLater();\n')
- output.write('this->deleteLater();\n}\n\n')
- impl.make_requests_methods_source(out)
- out.write("} // namespace requests\n")
-
-
-arg_parser = ArgumentParser(description="Generator of Qt to QDbus C++ part")
-arg_parser.add_argument('--infile', required=True, help="full name of input file, e.g. applink/src/components/interfaces/QT_HMI_API.xml")
-arg_parser.add_argument('--version', required=False, help="Qt version 4.8.5 (default) or 5.1.0")
-arg_parser.add_argument('--outdir', required=True, help="path to directory where output files request_to_sdl.h, request_to_sdl.cc will be saved")
-args = arg_parser.parse_args()
-
-if args.version == "4.8.5":
- prefix_class_item = 'Declarative'
- invoke_type_connection = 'Direct'
-elif args.version == "5.1.0":
- prefix_class_item = 'Quick'
- invoke_type_connection = 'BlockingQueued'
-
-header_name = 'hmi_requests.h'
-source_name = 'hmi_requests.cc'
-
-in_tree = ElementTree.parse(args.infile)
-in_tree_root = in_tree.getroot()
-
-impl = Impl(in_tree_root, 'com.ford.sdl.hmi')
-
-header_out = open(args.outdir + '/' + header_name, "w")
-source_out = open(args.outdir + '/' + source_name, "w")
-
-header_out.write("// Warning! This file is generated by '%s'. Edit at your own risk.\n" % argv[0])
-header_out.write("""/**
- * @file hmi_requests.h
- * @brief Generated class that process requests from qtHMI
- *
- * This file is a part of HMI D-Bus layer.
- */
-// 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.
-
-""")
-header_out.write("#ifndef SRC_COMPONENTS_QTHMI_QMLMODELQT5_HMIREQUESTS_\n");
-header_out.write("#define SRC_COMPONENTS_QTHMI_QMLMODELQT5_HMIREQUESTS_\n\n");
-header_out.write("#include <QObject>\n");
-header_out.write("#include <QJSValue>\n");
-header_out.write("#include <QDBusPendingCall>\n");
-header_out.write("#include <QDBusPendingCallWatcher>\n");
-header_out.write('#include <QDBusPendingReply>\n');
-header_out.write("#include <QDBusAbstractInterface>\n");
-header_out.write("#include <QDBusInterface>\n");
-header_out.write("#include <QJSEngine>\n");
-
-header_out.write('#include "qml_dbus.h"\n\n');
-
-impl.make_header_file(header_out)
-
-header_out.write("#endif // SRC_COMPONENTS_QTHMI_QMLMODELQT5_HMIREQUESTS_\n");
-
-source_out.write("// Warning! This file is generated by '%s'. Edit at your own risk.\n" % argv[0])
-source_out.write("""/**
- * @file hmi_requests.cc
- * @brief Generated class that process requests from qtHMI
- *
- * This file is a part of HMI D-Bus layer.
- */
-// 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.
-
-""")
-source_out.write('#include "hmi_requests.h"\n\n')
-impl.make_source_file(source_out)
diff --git a/src/components/dbus/codegen/make_introspection_c.py b/src/components/dbus/codegen/make_introspection_c.py
deleted file mode 100755
index 22a53f308d..0000000000
--- a/src/components/dbus/codegen/make_introspection_c.py
+++ /dev/null
@@ -1,126 +0,0 @@
-#!/usr/bin/env python
-# -*- coding: utf-8 -*-
-#
-# @file make_introspection_c.py
-# @brief Converts introspection.xml to C-string
-#
-# This file is a part of HMI D-Bus layer.
-#
-# Copyright (c) 2013, Ford Motor Company
-# All rights reserved.
-#
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions are met:
-#
-# Redistributions of source code must retain the above copyright notice, this
-# list of conditions and the following disclaimer.
-#
-# Redistributions in binary form must reproduce the above copyright notice,
-# this list of conditions and the following
-# disclaimer in the documentation and/or other materials provided with the
-# distribution.
-#
-# Neither the name of the Ford Motor Company nor the names of its contributors
-# may be used to endorse or promote products derived from this software
-# without specific prior written permission.
-#
-# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
-# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 'A PARTICULAR PURPOSE
-# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
-# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
-# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
-# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
-# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
-# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-# POSSIBILITY OF SUCH DAMAGE.
-
-from argparse import ArgumentParser
-from ford_xml_parser import FordXmlParser
-from ford_xml_parser import node_name
-from xml.etree import ElementTree
-from os import path
-from sys import argv
-
-class Impl(FordXmlParser):
- def convert_to_introspection(self, out_el_tree):
- for interface_el in self.el_tree.findall('interface'):
- el = self.create_introspection_iface_el(interface_el, 'sdl')
- if el is not None:
- out_el_tree.append(el)
-
-arg_parser = ArgumentParser(description='Converts introspection.xml to C-string')
-arg_parser.add_argument('--infile', required=True, help="Full name of input file, e.g. applink/src/components/interfaces/QT_HMI_API.xml")
-arg_parser.add_argument('--outdir', required=True, help="Path to directory where output file introspection_xml.cc will be saved")
-args = arg_parser.parse_args()
-
-if not path.isdir(args.outdir):
- makedirs(args.outdir)
-
-out_file = open(args.outdir + '/' + 'introspection_xml.cc', "w")
-
-in_tree = ElementTree.parse(args.infile)
-in_tree_root = in_tree.getroot()
-out_tree_root = ElementTree.Element('node', attrib={'name':node_name})
-
-impl = Impl(in_tree_root, 'com.ford.hmi.sdl')
-impl.convert_to_introspection(out_tree_root)
-
-introspection_string = '<!DOCTYPE node PUBLIC "-//freedesktop//DTD D-BUS Object Introspection 1.0//EN" "http://www.freedesktop.org/standards/dbus/1.0/introspect.dtd">'
-introspection_string += "\n"
-introspection_string += ElementTree.tostring(out_tree_root)
-
-out_file.write("// Warning! This file is generated by '%s'. Edit at your own risk.\n" % argv[0])
-out_file.write("""/**
- * @file instrospections_xml.cc
- * @brief D-Bus introspection XML as C-string
- *
- * This file is a part of HMI D-Bus layer.
- */
-// Copyright (c) 2013, Ford Motor Company
-// All rights reserved.
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are met:
-//
-// Redistributions of source code must retain the above copyright notice, this
-// list of conditions and the following disclaimer.
-//
-// Redistributions in binary form must reproduce the above copyright notice,
-// this list of conditions and the following
-// disclaimer in the documentation and/or other materials provided with the
-// distribution.
-//
-// Neither the name of the Ford Motor Company nor the names of its contributors
-// may be used to endorse or promote products derived from this software
-// without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
-// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 'A PARTICULAR PURPOSE
-// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
-// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
-// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
-// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
-// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
-// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-// POSSIBILITY OF SUCH DAMAGE.
-
-""")
-
-out_file.write("char introspection_xml[] = {")
-
-cnt = 0
-for char in introspection_string:
- if cnt % 12 == 0:
- out_file.write("\n ")
- else:
- out_file.write(" ")
- out_file.write("0x%02x," % ord(char))
- cnt = cnt + 1
-
-out_file.write(" 0x00\n")
-out_file.write("};")
-
diff --git a/src/components/dbus/codegen/make_message_descriptions.py b/src/components/dbus/codegen/make_message_descriptions.py
deleted file mode 100755
index 0079666392..0000000000
--- a/src/components/dbus/codegen/make_message_descriptions.py
+++ /dev/null
@@ -1,273 +0,0 @@
-#!/usr/bin/env python
-# -*- coding: utf-8 -*-
-#
-# @file make_message_descriptions.py
-# @brief Generates HMI API message descriptions for D-Bus
-#
-# This file is a part of HMI D-Bus layer.
-#
-# Copyright (c) 2013, Ford Motor Company
-# All rights reserved.
-#
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions are met:
-#
-# Redistributions of source code must retain the above copyright notice, this
-# list of conditions and the following disclaimer.
-#
-# Redistributions in binary form must reproduce the above copyright notice,
-# this list of conditions and the following
-# disclaimer in the documentation and/or other materials provided with the
-# distribution.
-#
-# Neither the name of the Ford Motor Company nor the names of its contributors
-# may be used to endorse or promote products derived from this software
-# without specific prior written permission.
-#
-# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
-# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 'A PARTICULAR PURPOSE
-# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
-# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
-# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
-# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
-# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
-# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-# POSSIBILITY OF SUCH DAMAGE.
-
-from argparse import ArgumentParser
-from xml.etree import ElementTree
-from copy import copy
-from ford_xml_parser import FordXmlParser
-from os import path
-from sys import argv
-
-namespace_name = 'ford_message_descriptions'
-namespace = namespace_name + '::'
-
-
-class Impl(FordXmlParser):
- def write_param_definition(self, param_var_name, param, out):
- if param.array:
- tmp_param = copy(param)
- tmp_param.array = False
- tmp_param.mandatory = True
- dbus_sig = self.convert_to_dbus_type(tmp_param)
- self.write_param_definition(param_var_name + '_array', tmp_param, out)
-
- if param.array: out.write('const ' + namespace + 'ArrayDescription ')
- elif param.struct: out.write('const ' + namespace + 'StructDescription ')
- else: out.write('const ' + namespace + 'ParameterDescription ')
-
- out.write(param_var_name + " = {\n")
-
- if param.struct or param.array:
- out.write(" {\n")
- shift = ' ' * 4
- else:
- shift = ' ' * 2
-
- out.write(shift + "\"" + param.name + "\",\n")
-
- if param.array:
- out.write(shift + namespace + "Array,\n")
- elif param.struct:
- out.write(shift + namespace + "Struct,\n")
- elif param.enum:
- out.write(shift + namespace + "Enum,\n")
- else:
- out.write(shift + namespace + param.type + ",\n")
-
- if param.mandatory:
- out.write(shift + "true\n")
- else:
- out.write(shift + "false\n")
-
- if param.struct or param.array:
- out.write(" },\n")
- if param.array:
- out.write(" (const " + namespace + "ParameterDescription*)&" + param_var_name + "_array,\n")
- out.write(" \"" + dbus_sig + "\"\n")
- elif param.struct:
- out.write(" Structs::" + param.fulltype[0] + "__" + param.fulltype[1] + "__parameters\n")
- out.write("};\n")
-
-
- def write_struct_params_declarations(self, out):
- out.write("struct Structs {\n");
- for (interface, name), params in self.structs.iteritems():
- params_var_name = interface + '__' + name + '__parameters'
- out.write(" static const " + namespace + "ParameterDescription* " + params_var_name + "[];\n")
- out.write("};\n\n")
-
-
- def write_enum_entries_declarations(self, out):
- out.write("struct Enums {\n");
- for interface, name in self.enums:
- entries_var_name = interface + '__' + name + '__entries'
- out.write(" static const " + namespace + "EnumDescription::Entry* " + entries_var_name + "[];\n")
- out.write("};\n\n")
-
-
- def write_parameters(self, params, out, name):
- n = 1
- for param in params:
- param_var_name = name + str(n)
- n = n + 1
- self.write_param_definition(param_var_name, param, out)
-
-
- def write_struct_params_definitions(self, out):
- for (interface, name), params in self.structs.iteritems():
- param_var_name = interface + '__' + name + '__parameter'
- self.write_parameters(params, out, param_var_name)
- params_var_name = 'Structs::' + interface + '__' + name + '__parameters'
- out.write("const " + namespace + "ParameterDescription* " + params_var_name + "[] = {\n")
- for n in range(1, len(params) + 1):
- name = param_var_name + str(n)
- out.write(" (const " + namespace + "ParameterDescription*)&" + name + ",\n")
- out.write( " NULL };\n\n")
-
-
- def write_enum_entries_definitions(self, out):
- for (interface, name), enum_el in self.enums.iteritems():
- n = 1
- for element_el in enum_el.findall('element'):
- entry_var_name = interface + '__' + name + '__entry' + str(n)
- value = element_el.get("value")
- if value is None:
- value = str(n)
- out.write(namespace + "EnumDescription::Entry " + entry_var_name + " = {\"" + element_el.get("name") + "\", " + value + "};\n")
- n = n + 1
-
- entries_var_name = "Enums::" + interface + '__' + name + '__entries'
- out.write("const " + namespace + "EnumDescription::Entry* " + entries_var_name + "[] = {\n")
- for n in range(1, len(enum_el.findall('element')) + 1):
- entry_var_name = interface + '__' + name + '__entry' + str(n)
- out.write(" &" + entry_var_name + ",\n")
- out.write(" NULL };\n\n")
-
-
- def write_message_definition(self, message_el, interface, out):
- name = message_el.get('name')
- messagetype = message_el.get('messagetype')
- params = list()
- for param_el in message_el.findall('param'):
- param_desc = self.make_param_desc(param_el, interface)
- params.append(param_desc)
- param_var_name = interface + '__' + name + '__' + messagetype + '__parameter'
- self.write_parameters(params, out, param_var_name)
-
- params_var_name = param_var_name + 's'
- out.write("const " + namespace + "ParameterDescription* " + params_var_name + "[] = {\n")
- for n in range(1, len(params) + 1):
- param_name = param_var_name + str(n)
- out.write(" (const " + namespace + "ParameterDescription*)&" + param_name + ",\n")
- out.write(" NULL };\n")
-
- message_desc_name = interface + '__' + name + '__' + messagetype
- out.write("const " + namespace + "MessageDescription " + message_desc_name + " = {\n")
- out.write(" \"" + interface + "\",\n")
- out.write(" \"" + name + "\",\n")
- out.write(" hmi_apis::messageType::" + messagetype + ",\n")
- out.write(" hmi_apis::FunctionID::" + interface + "_" + name + ",\n")
- out.write(" " + params_var_name + "\n")
- out.write("};\n\n")
-
-
- def write_message_definitions(self, out):
- for interface_el in self.el_tree.findall('interface'):
- interface = interface_el.get('name')
- message_els = interface_el.findall('function')
- for message_el in message_els:
- self.write_message_definition(message_el, interface, out)
-
-
- def make_message_descriptions(self, out):
- self.write_struct_params_declarations(out)
- #self.write_enum_entries_declarations(out)
- self.write_struct_params_definitions(out)
- #self.write_enum_entries_definitions(out)
- self.write_message_definitions(out)
-
-
- def make_message_array(self, out):
- out.write("const MessageDescription* message_descriptions[] = {\n")
- for interface_el in self.el_tree.findall('interface'):
- interface = interface_el.get('name')
- message_els = interface_el.findall('function')
- for message_el in message_els:
- name = message_el.get('name')
- messagetype = message_el.get('messagetype')
- message_desc_name = interface + '__' + name + '__' + messagetype
- out.write(" &" + message_desc_name + ",\n")
- out.write(" NULL\n")
- out.write("};\n")
-
-
-arg_parser = ArgumentParser(description="Generates HMI API message descriptions for D-Bus on SDL core side")
-arg_parser.add_argument('--infile', required=True, help="full name of input file, e.g. applink/src/components/interfaces/QT_HMI_API.xml")
-arg_parser.add_argument('--outdir', required=True, help="path to directory where output file message_descriptions.cc will be saved")
-args = arg_parser.parse_args()
-
-if not path.isdir(args.outdir):
- makedirs(args.outdir)
-
-outfile = 'message_descriptions.cc'
-
-in_tree = ElementTree.parse(args.infile)
-in_tree_root = in_tree.getroot()
-
-impl = Impl(in_tree_root)
-
-out = open(args.outdir + "/" + outfile, "w")
-
-out.write("// Warning! This file is generated by '%s'. Edit at your own risk.\n" % argv[0])
-out.write("""/**
- * @file message_descriptions.cc
- * @brief Generated HMI API message descriptions for D-Bus
- *
- * This file is a part of HMI D-Bus layer.
- */
-// Copyright (c) 2013, Ford Motor Company
-// All rights reserved.
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are met:
-//
-// Redistributions of source code must retain the above copyright notice, this
-// list of conditions and the following disclaimer.
-//
-// Redistributions in binary form must reproduce the above copyright notice,
-// this list of conditions and the following
-// disclaimer in the documentation and/or other materials provided with the
-// distribution.
-//
-// Neither the name of the Ford Motor Company nor the names of its contributors
-// may be used to endorse or promote products derived from this software
-// without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
-// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 'A PARTICULAR PURPOSE
-// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
-// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
-// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
-// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
-// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
-// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-// POSSIBILITY OF SUCH DAMAGE.
-
-""")
-
-out.write("#include \"dbus/message_descriptions.h\"\n\n");
-out.write("namespace {\n\n");
-impl.make_message_descriptions(out)
-out.write("}\n\n");
-
-out.write("namespace " + namespace_name + " {\n\n");
-impl.make_message_array(out)
-out.write("}\n\n");
-
diff --git a/src/components/dbus/codegen/make_notifications_qml.py b/src/components/dbus/codegen/make_notifications_qml.py
deleted file mode 100755
index 3c173e8b4f..0000000000
--- a/src/components/dbus/codegen/make_notifications_qml.py
+++ /dev/null
@@ -1,387 +0,0 @@
-#!/usr/bin/env python
-# -*- coding: utf-8 -*-
-#
-# @file make_qml_dbus_cpp.py
-# @brief Generator of QML to QDbus C++ part
-#
-# This file is a part of HMI D-Bus layer.
-#
-# 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.
-
-from argparse import ArgumentParser
-import os.path
-from sys import argv
-from xml.etree import ElementTree
-from copy import copy
-from ford_xml_parser import FordXmlParser, ParamDesc
-from code_formatter import CodeBlock
-
-class Notifications_qml(FordXmlParser):
- #Used for qt signal names, because qt signals cannot begin with a capital letter
- def first_letter_to_lower_case(self, s):
- if len(s) == 0:
- return s
- else:
- return s[0].lower() + s[1:]
-
- def make_header(self, out):
- out.write("class SdlProxy: public Item {\n")
- with CodeBlock(out) as out:
- out.write("Q_OBJECT\n")
- out.write("Q_DISABLE_COPY(SdlProxy)\n")
- out.write("public:\n")
- out.write("explicit SdlProxy(Item* parent = 0);\n")
- out.write("private:\n")
- out.write("QDBusInterface *sdlBasicCommunicationInterface;\n")
- out.write("signals:\n")
- for interface_el in self.el_tree.findall('interface'):
- iface_name = interface_el.get('name')
- notifications = self.find_notifications_by_provider(interface_el, "sdl")
- for notification_el in notifications:
- with CodeBlock(out) as out:
- out.write("void %s(" % self.first_letter_to_lower_case( notification_el.get("name")) )
- param_el_count = 1
- list_of_params = notification_el.findall("param")
- list_of_params_len = len(list_of_params)
- for param_el in list_of_params:
- param = self.make_param_desc(param_el, iface_name)
- out.write("QVariant %s" % param_el.get("name"))
- if param_el_count < list_of_params_len:
- out.write(", ")
- param_el_count += 1
- out.write(");\n")
- with CodeBlock(out) as out:
- out.write("private slots:\n")
- for interface_el in self.el_tree.findall('interface'):
- iface_name = interface_el.get('name')
- notifications = self.find_notifications_by_provider(interface_el, "sdl")
- for notification_el in notifications:
- with CodeBlock(out) as out:
- out.write("void slot_%s(" % notification_el.get("name"))
- param_el_count = 1
- list_of_params = notification_el.findall("param")
- list_of_params_len = len(list_of_params)
- for param_el in list_of_params:
- param = self.make_param_desc(param_el, iface_name)
- out.write("%s %s" % (self.qt_param_type(param), param_el.get("name")))
- if param_el_count < list_of_params_len:
- out.write(", ")
- param_el_count += 1
- out.write(");\n")
- out.write("};\n")
-
-
- def qt_param_type(self, param):
- if not param.mandatory:
- param_copy = copy(param)
- param_copy.mandatory = True
- return "OptionalArgument< " + self.qt_param_type(param_copy) + " >"
- if param.array:
- param_copy = copy(param)
- param_copy.array = False
- if param.type == 'String':
- return "QStringList"
- return "QList< " + self.qt_param_type(param_copy) + " >"
- if param.type == 'Integer' or param.enum:
- return 'int'
- elif param.type == 'String':
- return 'QString'
- elif param.type == 'Boolean':
- return 'bool'
- elif param.type == 'Float':
- return 'double'
- elif param.struct:
- return "_".join(param.fulltype)
- else:
- raise RuntimeError('Unknown type: ' + param.type)
-
-
- def qml_param_type(self, param):
- if not param.mandatory:
- return "QVariant"
- if param.array:
- return "QVariant"
- if param.type == 'Integer' or param.enum:
- return 'int'
- elif param.type == 'String':
- return 'QString'
- elif param.type == 'Boolean':
- return 'bool'
- elif param.type == 'Float':
- return 'double'
- elif param.struct:
- return "QVariant"
- else:
- raise RuntimeError('Unknown type: ' + param.type)
-
-
- def make_source(self, out):
- def qml_args(variable_name_needed):
- param_el_count = 1
- list_of_params = notification_el.findall("param")
- list_of_params_len = len(list_of_params)
- for param_el in list_of_params:
- param = self.make_param_desc(param_el, iface_name)
- if variable_name_needed:
- out.write("%s %s" % (self.qt_param_type(param), param_el.get("name")))
- else:
- out.write("%s" % self.qt_param_type(param))
- if param_el_count < list_of_params_len:
- out.write(", ")
- param_el_count += 1
- out.write("SdlProxy::SdlProxy(Item *parent): Item(parent) {\n")
- for interface_el in self.el_tree.findall('interface'):
- iface_name = interface_el.get('name')
- notifications = self.find_notifications_by_provider(interface_el, "sdl")
- for notification_el in notifications:
- notification_name = notification_el.get('name')
- with CodeBlock(out) as out:
- out.write("QDBusConnection::sessionBus().connect(\n")
- with CodeBlock(out) as out:
- out.write("\"com.ford.sdl.core\", \"/\", \"com.ford.sdl.core.%s\",\n" % iface_name)
- out.write("\"%s\", this, SLOT(slot_%s(" % (notification_name, notification_el.get("name")))
- qml_args(variable_name_needed = False)
- out.write(")));\n")
- out.write("}\n\n")
- for interface_el in self.el_tree.findall('interface'):
- iface_name = interface_el.get('name')
- notifications = self.find_notifications_by_provider(interface_el, "sdl")
- for notification_el in notifications:
- notific_full_name = interface_el.get("name") + "_" + notification_el.get("name")
- out.write("void SdlProxy::slot_%s(" % notification_el.get("name"))
- qml_args(variable_name_needed = True)
- out.write(") {\n")
- with CodeBlock(out) as out:
- out.write("LOG4CXX_TRACE(logger_, \"ENTER\");\n\n")
- for param_el in notification_el.findall("param"):
- param = self.make_param_desc(param_el, iface_name)
- tmp_param_name = param.name + "_qvariant"
- out.write("QVariant %s;\n" % tmp_param_name)
- out.write("%s = ValueToVariant(%s);\n" % (tmp_param_name, param.name))
- self.write_param_validation(param, param.name, "\nLOG4CXX_ERROR(logger_, \"%s in %s out of bounds\")" % (param.name, notific_full_name), out)
- out.write("\n")
- out.write("emit %s(" % self.first_letter_to_lower_case( notification_el.get("name")) )
- param_el_count = 1
- list_of_params = notification_el.findall("param")
- list_of_params_len = len(list_of_params)
- for param_el in list_of_params:
- param = self.make_param_desc(param_el, iface_name)
- out.write("%s" % param.name + "_qvariant")
- if param_el_count < list_of_params_len:
- out.write(", ")
- param_el_count += 1
- out.write(");\n")
- with CodeBlock(out) as out:
- out.write("LOG4CXX_TRACE(logger_, \"EXIT\");\n")
- out.write("}\n\n")
-
-
-
- def write_param_validation(self, param, param_name, fail_statement, out, level=0):
- if not param.mandatory and (param.restricted or param.restrictedArray or (param.struct and any(map(lambda x: x.restricted, self.structs[param.fulltype])))):
- out.write("if (%s.presence) {\n" % param_name)
- param_copy = copy(param)
- param_copy.mandatory = True
- with CodeBlock(out) as out:
- self.write_param_validation(param_copy, param_name + ".val", fail_statement, out, level+1)
- out.write("}\n")
- elif param.array:
- if param.minSize > 0:
- out.write("if ({0}.count() < {1}) {{".format(param_name, param.minSize))
- with CodeBlock(out) as out:
- out.write("{0};\n".format(fail_statement))
- out.write("}\n")
- if param.maxSize != None:
- out.write("if ({0}.count() > {1}) {{".format(param_name, param.maxSize))
- with CodeBlock(out) as out:
- out.write("{0};\n".format(fail_statement))
- out.write("}\n")
- if param.restricted:
- out.write('for ({0}::const_iterator it_{2} = {1}.begin(); it_{2} != {1}.end(); ++it_{2}) {{\n'.format(self.qt_param_type(param), param_name, level))
- with CodeBlock(out) as out:
- param_copy = copy(param)
- param_copy.array = False
- self.write_param_validation(param_copy, "(*it_{0})".format(level), fail_statement, out, level+1)
- out.write("}\n")
- elif param.struct:
- for p in self.structs[param.fulltype]:
- self.write_param_validation(p, "{0}.{1}".format(param_name, p.name), fail_statement, out, level+1)
- elif param.type == "Integer" or param.type == "Float":
- conditions = []
- if (param.minValue != None):
- conditions.append("(%s < %s)" % (param_name, param.minValue))
- if (param.maxValue != None):
- conditions.append("(%s > %s)" % (param_name, param.maxValue))
- if conditions:
- out.write('if (%s) {' % ' || '.join(conditions))
- with CodeBlock(out) as out:
- out.write('%s;\n' % fail_statement)
- out.write("}\n")
- elif param.type == "String":
- conditions = []
- if (param.minLength > 0):
- conditions.append("(%s.size() < %s)" % (param_name, param.minLength))
- if (param.maxLength > 0):
- conditions.append("(%s.size() > %s)" % (param_name, param.maxLength))
- if conditions:
- out.write('if (%s) {' % ' || '.join(conditions))
- with CodeBlock(out) as out:
- out.write('%s;\n' % (fail_statement))
- out.write("}\n")
-
-
-#QVarian name;
-#if (ttsName.presence) {
-
-
-
-arg_parser = ArgumentParser(description="Generator of classes which Qt to QDbus C++ part")
-arg_parser.add_argument('--infile', required=True, help="full name of input file, e.g. applink/src/components/interfaces/QT_HMI_API.xml")
-arg_parser.add_argument('--version', required=False, help="Qt version 4.8.5 (default) or 5.1.0")
-arg_parser.add_argument('--outdir', required=True, help="path to directory where output files request_to_sdl.h, request_to_sdl.cc will be saved")
-args = arg_parser.parse_args()
-
-
-if args.version == "4.8.5":
- prefix_class_item = 'Script'
- invoke_type_connection = 'Direct'
-elif args.version == "5.1.0":
- prefix_class_item = 'JS'
- invoke_type_connection = 'BlockingQueued'
-else:
- prefix_class_item = 'JS'
- invoke_type_connection = 'BlockingQueued'
-
-header_name = 'sdl_proxy.h'
-source_name = 'sdl_proxy.cc'
-
-in_tree = ElementTree.parse(args.infile)
-in_tree_root = in_tree.getroot()
-
-impl = Notifications_qml(in_tree_root, 'com.ford.sdl.hmi')
-
-header_out = open(args.outdir + '/' + header_name, "w")
-source_out = open(args.outdir + '/' + source_name, "w")
-
-header_out.write("// Warning! This file is generated by '%s'. Edit at your own risk.\n" % argv[0])
-header_out.write("""
-/*
- 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.
-*/
-""")
-header_out.write("#ifndef SRC_COMPONENTS_QT_HMI_QML_PLUGINS_DBUS_ADAPTER_SDL_PROXY_H_\n")
-header_out.write("#define SRC_COMPONENTS_QT_HMI_QML_PLUGINS_DBUS_ADAPTER_SDL_PROXY_H_\n\n")
-header_out.write("#include \"qml_dbus.h\"\n")
-header_out.write("#include \"qt_version.h\"\n\n")
-header_out.write("#include <QtCore/QVariant>\n")
-header_out.write("#include <QtDBus/QDBusInterface>\n")
-header_out.write("#if QT_4\n")
-header_out.write("#include <QtDeclarative/QDeclarativeItem>\n")
-header_out.write("typedef QDeclarativeItem Item;\n")
-header_out.write("#elif QT_5\n")
-header_out.write("#include <QtQuick/QQuickItem>\n")
-header_out.write("typedef QQuickItem Item;\n")
-header_out.write("#endif // QT_VERSION\n")
-
-impl.make_header(header_out)
-
-header_out.write("#endif // SRC_COMPONENTS_QT_HMI_QML_PLUGINS_DBUS_ADAPTER_REQUEST_TO_SDL_H_")
-
-
-source_out.write("// Warning! This file is generated by '%s'. Edit at your own risk.\n" % argv[0])
-source_out.write("""
-/*
- 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.
-*/
-
-""")
-
-source_out.write("#include \"sdl_proxy.h\"\n")
-source_out.write("#include \"utils/logger.h\"\n")
-source_out.write("CREATE_LOGGERPTR_GLOBAL(logger_, \"DBusPlugin\")\n\n")
-
-impl.make_source(source_out)
diff --git a/src/components/dbus/codegen/make_qml_dbus_cpp.py b/src/components/dbus/codegen/make_qml_dbus_cpp.py
deleted file mode 100755
index f40bc74df8..0000000000
--- a/src/components/dbus/codegen/make_qml_dbus_cpp.py
+++ /dev/null
@@ -1,736 +0,0 @@
-#!/usr/bin/env python
-# -*- coding: utf-8 -*-
-#
-# @file make_qml_dbus_cpp.py
-# @brief Generator of QML to QDbus C++ part
-#
-# This file is a part of HMI D-Bus layer.
-#
-# Copyright (c) 2013, Ford Motor Company
-# All rights reserved.
-#
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions are met:
-#
-# Redistributions of source code must retain the above copyright notice, this
-# list of conditions and the following disclaimer.
-#
-# Redistributions in binary form must reproduce the above copyright notice,
-# this list of conditions and the following
-# disclaimer in the documentation and/or other materials provided with the
-# distribution.
-#
-# Neither the name of the Ford Motor Company nor the names of its contributors
-# may be used to endorse or promote products derived from this software
-# without specific prior written permission.
-#
-# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
-# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 'A PARTICULAR PURPOSE
-# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
-# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
-# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
-# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
-# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
-# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-# POSSIBILITY OF SUCH DAMAGE.
-
-from argparse import ArgumentParser
-import os.path
-from sys import argv
-from xml.etree import ElementTree
-from copy import copy
-from ford_xml_parser import FordXmlParser, ParamDesc
-from code_formatter import CodeBlock
-
-prefix_class_item = 'Declarative'
-invoke_type_connection = 'Direct'
-
-def defaultValue(param):
- if param.type == "Integer":
- return "0"
- elif param.type == "Float":
- return "0.0"
- elif param.type == "Boolean":
- return "false"
- elif param.enum:
- return "0"
-
-class Impl(FordXmlParser):
- def make_dbus_type_declarations(self, out):
- for struct in self.structs.items():
- self.write_struct_declaration(struct, out)
-
- def make_dbus_metatype_declarations(self, out):
- for struct in self.structs.items():
- self.write_struct_metatype_declaration(struct, out)
-
-
- def write_struct_declaration(self, ((iface, name), params), out):
- struct_name = "{0}_{1}".format(iface, name)
- out.write("struct {0} {{\n".format(struct_name))
- with CodeBlock(out) as out:
- for param in params:
- out.write("{0} {1};\n".format(self.qt_param_type(param), param.name))
- out.write("{0}()\n".format(struct_name))
- initializersList = map(lambda x: "{0}({1})".format(x.name, defaultValue(x)), [p for p in params if p.type != "String" and not p.struct and not p.array])
- if initializersList:
- out.write(": " + ",\n ".join(initializersList))
-
- out.write("{ }\n")
-
- out.write("};\n")
- out.write('QDBusArgument& operator << (QDBusArgument&, const ' + struct_name + "&);\n")
- out.write('const QDBusArgument& operator >> (const QDBusArgument&, ' + struct_name + "&);\n")
- out.write('void PutArgToMap(QVariantMap& map, const char* name, const ' + struct_name + "& v);\n")
- out.write('QVariant ValueToVariant(const ' + struct_name + "& v);\n")
- out.write('QVariant ValueToVariant(const QList<' + struct_name + " >& v);\n")
- out.write('bool GetArgFromMap(const QVariantMap& map, const char* name, ' + struct_name + "& v);\n")
- out.write('bool VariantToValue(const QVariant& variant, ' + struct_name + "& v);\n")
- out.write('bool VariantToValue(const QVariant& variant, QList<' + struct_name + " >& v);\n")
-
-
- def write_struct_metatype_declaration(self, ((iface, name), params), out):
- struct_name = iface + '_' + name
- out.write('Q_DECLARE_METATYPE(' + struct_name + ")\n")
- out.write('Q_DECLARE_METATYPE(OptionalArgument<' + struct_name + ">)\n")
- out.write('Q_DECLARE_METATYPE(QList<' + struct_name + ">)\n")
- out.write('Q_DECLARE_METATYPE(OptionalArgument<QList<' + struct_name + "> >)\n\n")
-
-
- def make_dbus_type_definitions(self, out):
- for struct in self.structs.items():
- self.write_struct_definition(struct, out)
-
- def write_struct_definition(self, ((iface, name), params), out):
- struct_name = iface + '_' + name
-
- out.write('QDBusArgument& operator << (QDBusArgument& arg, const ' + struct_name + "& v) {\n")
- with CodeBlock(out) as out:
- out.write("arg.beginStructure();\n")
- for param in params:
- out.write("arg << v.{0};\n".format(param.name))
- out.write("arg.endStructure();\n")
- out.write("return arg;\n")
- out.write("}\n\n")
-
- out.write('const QDBusArgument& operator >> (const QDBusArgument& arg, ' + struct_name + "& v) {\n")
- with CodeBlock(out) as out:
- out.write("arg.beginStructure();\n")
- for param in params:
- out.write("arg >> v.{0};\n".format(param.name))
- out.write("arg.endStructure();\n")
- out.write("return arg;\n")
- out.write("}\n\n")
-
- out.write('QVariant ValueToVariant(const ' + struct_name + "& v) {\n")
- with CodeBlock(out) as out:
- out.write("QVariantMap map;\n")
- for param in params:
- out.write("""PutArgToMap(map, "{0}", v.{0});\n""".format(param.name))
- out.write("return QVariant::fromValue(map);\n")
- out.write("}\n\n")
-
- out.write('QVariant ValueToVariant(const QList<' + struct_name + ">& v) {\n")
- with CodeBlock(out) as out:
- out.write("QList<QVariant> ret;\n")
- out.write("for (QList<{0}>::const_iterator i = v.begin(); i != v.end(); ++i)\n".format(struct_name))
- with CodeBlock(out) as out:
- out.write("ret.append(ValueToVariant(*i));\n")
- out.write("return QVariant::fromValue(ret);\n")
- out.write("}\n\n")
-
- out.write('void PutArgToMap(QVariantMap& map, const char* name, const ' + struct_name + "& v) {\n")
- with CodeBlock(out) as out:
- out.write("map.insert(name, ValueToVariant(v));\n")
- out.write("}\n\n")
-
- out.write('bool VariantToValue(const QVariant& variant, ' + struct_name + "& v) {\n")
- with CodeBlock(out) as out:
- out.write("if (variant.type() != QVariant::Map) {\n")
- with CodeBlock(out) as out:
- out.write("""LOG4CXX_ERROR(logger_, "Input argument isn't a map");\n""")
- out.write("return false;\n")
- out.write("}\n")
- out.write("QVariantMap map = variant.toMap();\n")
- for param in params:
- out.write("if (!GetArgFromMap(map, \"" + param.name + "\", v." + param.name + ")) return false;\n")
- out.write("return true;\n")
- out.write("}\n\n")
-
- out.write('bool VariantToValue(const QVariant& variant, QList<' + struct_name + ">& v) {\n")
- with CodeBlock(out) as out:
- out.write("if (variant.type() != QVariant::List) {\n")
- with CodeBlock(out) as out:
- out.write("""LOG4CXX_ERROR(logger_, "Input argument isn't a list");\n""")
- out.write("return false;\n")
- out.write("}\n")
- out.write("QList<QVariant> list = variant.toList();\n")
- out.write("for (QList<QVariant>::const_iterator i = list.begin(); i != list.end(); ++i) {\n");
- with CodeBlock(out) as out:
- out.write(struct_name + " s;\n");
- out.write("if (!VariantToValue(*i, s)) return false;\n");
- out.write("v.append(s);\n");
- out.write("}\n")
- out.write("return true;\n")
- out.write("}\n\n")
-
- out.write('bool GetArgFromMap(const QVariantMap& map, const char* name, ' + struct_name + "& v) {\n")
- with CodeBlock(out) as out:
- out.write("QVariantMap::const_iterator it = map.find(name);\n")
- out.write("if (map.end() == it) {\n")
- with CodeBlock(out) as out:
- out.write("""LOG4CXX_WARN(logger_, "Argument '" << name << "' not found");\n""")
- out.write("return false;\n")
- out.write("}\n")
- out.write("if (it->type() != QVariant::Map) {\n")
- with CodeBlock(out) as out:
- out.write("""LOG4CXX_ERROR(logger_, "Argument '" << name << "' isn't a map");\n""")
- out.write("return false;\n")
- out.write("}\n")
- out.write("const QVariantMap& inmap = it->toMap();\n")
- for param in params:
- out.write("if (!GetArgFromMap(inmap, \"" + param.name + "\", v." + param.name + ")) return false;\n")
- out.write("return true;\n")
- out.write("}\n\n")
-
- def write_param_validation(self, param, param_name, fail_statement, out, level=0):
- if not param.mandatory and (param.restricted or param.restrictedArray or (param.struct and any(map(lambda x: x.restricted, self.structs[param.fulltype])))):
- out.write("if (%s.presence) {\n" % param_name)
- param_copy = copy(param)
- param_copy.mandatory = True
- with CodeBlock(out) as out:
- self.write_param_validation(param_copy, param_name + ".val", fail_statement, out, level+1)
- out.write("}\n")
- elif param.array:
- if param.minSize > 0:
- out.write("if ({0}.count() < {1}) {{ {2}; }}\n".format(param_name, param.minSize, fail_statement))
- if param.maxSize != None:
- out.write("if ({0}.count() > {1}) {{ {2}; }}\n".format(param_name, param.maxSize, fail_statement))
- if param.restricted:
- out.write('for ({0}::const_iterator it_{2} = {1}.begin(); it_{2} != {1}.end(); ++it_{2}) {{\n'.format(self.qt_param_type(param), param_name, level))
- with CodeBlock(out) as out:
- param_copy = copy(param)
- param_copy.array = False
- self.write_param_validation(param_copy, "(*it_{0})".format(level), fail_statement, out, level+1)
- out.write("}\n")
- elif param.struct:
- for p in self.structs[param.fulltype]:
- self.write_param_validation(p, "{0}.{1}".format(param_name, p.name), fail_statement, out, level+1)
- elif param.type == "Integer" or param.type == "Float":
- conditions = []
- if (param.minValue != None):
- conditions.append("(%s < %s)" % (param_name, param.minValue))
- if (param.maxValue != None):
- conditions.append("(%s > %s)" % (param_name, param.maxValue))
- if conditions:
- out.write('if (%s) { %s; }\n' % (' || '.join(conditions), fail_statement))
- elif param.type == "String":
- conditions = []
- if (param.minLength > 0):
- conditions.append("(%s.size() < %s)" % (param_name, param.minLength))
- if (param.maxLength > 0):
- conditions.append("(%s.size() > %s)" % (param_name, param.maxLength))
- if conditions:
- with CodeBlock(out) as out:
- out.write('if (%s) { %s;\n }\n' % (' || '.join(conditions), fail_statement))
-
- def qt_param_type(self, param):
- if not param.mandatory:
- param_copy = copy(param)
- param_copy.mandatory = True
- return "OptionalArgument< " + self.qt_param_type(param_copy) + " >"
- if param.array:
- param_copy = copy(param)
- param_copy.array = False
- if param.type == 'String':
- return "QStringList"
- return "QList< " + self.qt_param_type(param_copy) + " >"
- if param.type == 'Integer' or param.enum:
- return 'int'
- elif param.type == 'String':
- return 'QString'
- elif param.type == 'Boolean':
- return 'bool'
- elif param.type == 'Float':
- return 'double'
- elif param.struct:
- return "_".join(param.fulltype)
- return "xxx"
-
-
- def from_variant_func_name(self, param, interface):
- prefix = ''
- if not param.mandatory:
- param_copy = copy(param)
- param_copy.mandatory = True
- return 'opt_' + self.from_variant_func_name(param_copy, interface)
- if param.array:
- param_copy = copy(param)
- param_copy.array = False
- return 'arr_' + self.from_variant_func_name(param_copy, interface)
-
- if param.type in ['Integer', 'String', 'Boolean', 'Float']:
- param_type = param.type
- else:
- param_type = param.type.split('.')
- if len(param_type) > 1:
- param_type = (param_type[0], param_type[1])
- else:
- param_type = (interface, param_type[0])
- if param_type in self.structs:
- param_type = param_type[0] + '_' + param_type[1]
- elif param_type in self.enums:
- param_type = 'Integer'
- return param_type + '_from_variant'
-
-
- def make_method_signature(self, request, response, interface, add_classname):
- in_params = [self.make_param_desc(x, interface) for x in request.findall('param')]
- out_params = [self.make_param_desc(x, interface) for x in response.findall('param')]
-
- signature_len = len(''.join(map(lambda x: self.convert_to_dbus_type(x), in_params + out_params)))
- if signature_len > 255:
- raise RuntimeError("Too long signature of {0} method. Maximum valid length is 255, actual is {1}", request.get('name'), signature_len)
-
- return "int {0}{1} ({2}{3}const QDBusMessage& message, QString& userMessage_out{4}{5})".format(
- interface + "Adaptor::" if add_classname else "",
- request.get('name'),
- ", ".join(map(lambda x: "const {0}& {1}_in".format(self.qt_param_type(x), x.name), in_params)),
- ", " if in_params else "",
- ", " if out_params else "",
- ", ".join(map(lambda x: "{0}& {1}_out".format(self.qt_param_type(x), x.name), out_params)))
-
-
- def make_signal_signature(self, signal, interface, add_void):
- params = signal.findall('param')
- if add_void:
- retstr = 'void '
- else:
- retstr = ''
- retstr = retstr + signal.get('name') + '('
- params_num = len(params)
- for i in range(0, params_num):
- param_desc = self.make_param_desc(params[i], interface)
- param_type = self.qt_param_type(param_desc)
- retstr = retstr + param_type + ' ' + param_desc.name
- if i <> params_num - 1: retstr = retstr + ", "
- retstr = retstr + ')'
- return retstr
-
-
- def make_qml_signal_signature(self, signal, interface, name, short=False, add_classname=False):
- params = signal.findall('param')
- if short:
- retstr = ''
- else:
- retstr = 'void '
- if add_classname:
- retstr = retstr + interface + 'Adaptor::'
- retstr = retstr + name + '('
- params_num = len(params)
- for i in range(0, params_num):
- param_desc = self.make_param_desc(params[i], interface)
- if param_desc.struct or param_desc.array or not param_desc.mandatory: typ = 'QVariant'
- elif param_desc.type == 'Integer' or param_desc.enum: typ = 'int'
- elif param_desc.type == 'Boolean': typ = 'bool'
- elif param_desc.type == 'Float': typ = 'double'
- elif param_desc.type == 'String': typ = 'QString'
- else: typ = 'QVariant'
- retstr = retstr + typ
- if not short: retstr = retstr + ' ' + param_desc.name
- if i <> params_num - 1: retstr = retstr + ", "
- retstr = retstr + ')'
- return retstr
-
-
- def write_adaptor_declaration(self, interface_el, notifications, request_responses, out):
- global prefix_class_item
- def glue_strings(strings):
- ret = list()
- curstr = ''
- for str in strings:
- curstr = curstr + str
- if(str[-1] == '>'):
- ret.append(curstr)
- curstr = ''
- return ret
- ifacename = interface_el.get('name')
- out.write("class " + ifacename + "Adaptor : public QDBusAbstractAdaptor {\n");
- out.write(" Q_OBJECT\n");
- out.write(" Q_CLASSINFO(\"D-Bus Interface\", \"" + self.interface_path + '.' + ifacename + "\")\n");
- out.write(" Q_CLASSINFO(\"D-Bus Introspection\",\n");
- introspection_el = self.create_introspection_iface_el(interface_el, 'hmi')
- introspection = glue_strings(ElementTree.tostringlist(introspection_el))
- for str in introspection:
- str = str.replace('"', '\\"')
- out.write('"' + str + '"' + "\n")
- out.write(" )\n")
- out.write(" public:\n")
- out.write(" explicit " + ifacename + "Adaptor(QObject *parent = 0);\n")
- out.write(" void SetApi(Q%sItem*);\n" % prefix_class_item)
- out.write(" DBusController *dbusController;\n")
- out.write(" public slots:\n")
- for (request, response) in request_responses:
- signature = self.make_method_signature(request, response, ifacename, False)
- out.write(" " + signature + ";\n")
- out.write(" signals:\n")
- for n in notifications:
- signature = self.make_signal_signature(n, ifacename, True)
- out.write(" " + signature + ";\n")
- out.write(" private slots:\n")
- for n in notifications:
- signature = self.make_qml_signal_signature(n, ifacename, n.get('name') + '_qml', False)
- out.write(" " + signature + ";\n")
- out.write(" private:\n")
- out.write(" Q%sItem* api_;\n" % prefix_class_item)
- out.write("};\n\n");
-
- def write_adaptor_definition(self, interface_el, notifications, request_responses, out):
- global prefix_class_item
- iface_name = interface_el.get('name')
- classname = iface_name + 'Adaptor'
- out.write("{0}::{0}(QObject* parent) : QDBusAbstractAdaptor(parent) {{}}\n".format(classname))
-
- out.write("void {0}::SetApi(Q{1}Item* api) {{\n".format(classname, prefix_class_item))
- with CodeBlock(out) as out:
- out.write("api_ = api;\n")
- for n in notifications:
- signame = n.get('name')
- signame = signame[:1].lower() + signame[1:]
- slotname = n.get('name') + '_qml'
- sig_signature = self.make_qml_signal_signature(n, iface_name, signame, True)
- slot_signature = self.make_qml_signal_signature(n, iface_name, slotname, True)
- out.write("connect(api_, SIGNAL(" + sig_signature + "), this, SLOT(" + slot_signature + "));\n")
- out.write("LOG4CXX_TRACE(logger_, \"CONNECT SIGNALS: \" << __PRETTY_FUNCTION__ );\n")
- out.write("}\n\n")
-
- for (request,response) in request_responses:
- in_params = [ self.make_param_desc(x, iface_name) for x in request.findall('param') ]
- out_params = [ self.make_param_desc(x, iface_name) for x in response.findall('param') ]
-
- out.write("bool fill{0}{1}Reply(QDBusMessage& message, const QVariantMap& map) {{\n".format(classname, request.get('name')))
- with CodeBlock(out) as out:
- out.write("int retCode_out = 0;\n")
- out.write("GetArgFromMap(map, \"__retCode\", retCode_out);\n")
- out.write("QVariant retCode_arg = QVariant::fromValue(retCode_out);\n")
- out.write("message << retCode_arg;\n")
- out.write("QString userMessage_out;\n")
- out.write("GetArgFromMap(map, \"__message\", userMessage_out);\n")
- out.write("QVariant userMessage_arg = QVariant::fromValue(userMessage_out);\n")
- out.write("message << userMessage_arg;\n")
- for p in out_params:
- param_name = p.name
- param_type = self.qt_param_type(p)
- out.write("%s %s_out;\n" % (param_type, p.name))
- out.write("if (!GetArgFromMap(map, \"{0}\", {0}_out)) {{ return false; }}\n".format(p.name))
- self.write_param_validation(p, p.name + "_out", "return false", out)
- out.write("QVariant {0}_arg;\n".format(p.name))
- out.write("{0}_arg.setValue({0}_out);\n".format(p.name))
- out.write("message << {0}_arg;\n".format(p.name))
- out.write("LOG4CXX_DEBUG(logger_, \"Output arguments:\\n\" << QVariant(map));\n")
- out.write("LOG4CXX_TRACE(logger_, \"REPLY ASYNC: \" << __PRETTY_FUNCTION__ );\n")
- out.write("return true;\n")
- out.write("}\n\n")
-
- out.write("{0} {{\n".format(self.make_method_signature(request, response, iface_name, True)))
- with CodeBlock(out) as out:
- out.write("LOG4CXX_TRACE(logger_, \"ENTER: \" << __PRETTY_FUNCTION__ );\n")
- out.write("int ret = 0;\n")
- return_statement = "return ret;\n"
- out.write("QVariantMap in_arg;\n");
- out.write("QVariant out_arg_v;\n");
- for param in in_params:
- self.write_param_validation(param, param.name + "_in", "RaiseDbusError(this, InvalidData); return ret", out)
- out.write("PutArgToMap(in_arg, \"" + param.name + "\", " + param.name + "_in);\n")
- out.write("LOG4CXX_DEBUG(logger_, \"Input arguments:\\n\" << in_arg);\n")
- method_name = request.get('name')[:1].lower() + request.get('name')[1:]
-
- out.write("dbusController->message = &message;\n")
- out.write("dbusController->fill = &fill{0}{1}Reply;\n".format(classname, request.get("name")))
-
- out.write("""if (!QMetaObject::invokeMethod(api_, "{0}", Qt::{1}Connection, Q_RETURN_ARG(QVariant, out_arg_v), Q_ARG(QVariant, QVariant(in_arg)))) {{\n""".format(method_name, invoke_type_connection))
- with CodeBlock(out) as out:
- out.write("RaiseDbusError(this, InvalidData);\n")
- out.write("LOG4CXX_ERROR(logger_, \"Can't invoke method " + method_name +"\");\n ")
- out.write("return ret;\n")
- out.write("}\n")
-
- out.write("dbusController->message = NULL;\n")
- out.write("dbusController->fill = NULL;\n")
- out.write("if (message.isDelayedReply()) {\n")
- with CodeBlock(out) as out:
- out.write("return ret;\n")
- out.write("}\n")
-
- out.write("QVariantMap out_arg;\n")
- out.write("if (out_arg_v.type() == QVariant::Map) {\n")
- with CodeBlock(out) as out:
- out.write("out_arg = out_arg_v.toMap();\n")
- out.write("};\n")
-
- out.write("int err;\n")
- out.write("""if (GetArgFromMap(out_arg, "__errno", err)) { RaiseDbusError(this, err); return ret; }\n""")
-
- out.write("int async_uid;\n")
- out.write("if (GetArgFromMap(out_arg, \"__async_uid\", async_uid)) {\n")
- with CodeBlock(out) as out:
- out.write("message.setDelayedReply(true);\n")
- out.write("dbusController->addMessage(message, &fill%s%sReply, async_uid);\n" % (classname, request.get('name')))
- out.write("LOG4CXX_TRACE(logger_, \"EXIT ASYNC: \" << __PRETTY_FUNCTION__ );\n")
- out.write("return ret;\n");
- out.write("}\n\n")
-
- for param in out_params:
- out.write("if (!GetArgFromMap(out_arg, \"{0}\", {0}_out)) {{ RaiseDbusError(this, InvalidData); return ret; }}\n".format(param.name))
- self.write_param_validation(param, param.name + "_out", "RaiseDbusError(this, InvalidData); return ret", out)
-
- out.write("GetArgFromMap(out_arg, \"__retCode\", ret);\n")
- out.write("GetArgFromMap(out_arg, \"__message\", userMessage_out);\n")
- out.write("LOG4CXX_DEBUG(logger_, \"Output arguments:\\n\" << QVariant(out_arg));\n")
- out.write("LOG4CXX_TRACE(logger_, \"EXIT: \" << __PRETTY_FUNCTION__ );\n")
- out.write("return ret;\n")
- out.write("}\n\n")
-
- for n in notifications:
- slotname = n.get('name') + '_qml'
- slot_signature = self.make_qml_signal_signature(n, iface_name, slotname, False, True)
- out.write(slot_signature + " {\n")
- params = n.findall('param')
- out.write(" LOG4CXX_TRACE(logger_, \"EMIT SIGNAL: \" << __PRETTY_FUNCTION__ );\n")
- out.write(" LOG4CXX_DEBUG(logger_, \"Arguments:\\n{\"")
- for p in params[0:-1]:
- param = self.make_param_desc(p, iface_name)
- out.write(" << \" " + param.name + ":\" << " + param.name + " << \",\"")
- for p in params[-1:]: # last param without comma in end line
- p = params[-1]
- param = self.make_param_desc(p, iface_name)
- out.write(" << \" " + param.name + ":\" << " + param.name)
- out.write(" << \" }\");\n")
- for p in params:
- param = self.make_param_desc(p, iface_name)
- param_type = self.qt_param_type(param)
- param_name = 'p_' + param.name
- if param.mandatory:
- if param.array or (param.type not in ['Integer', 'String', 'Float', 'Boolean'] and not param.enum):
- out.write(' ' + param_type + ' ' + param_name + ";\n")
- out.write(' if (!VariantToValue(' + param.name + ', ' + param_name + ")) {\n")
- out.write(" LOG4CXX_ERROR(logger_, \"Can't convert variant to value\");\n")
- out.write(" return;}\n")
- else:
- out.write(' ' + param_type + ' ' + param_name + ";\n")
- out.write(' ' + param_name + '.presence = !' + param.name + ".isNull();\n")
- out.write(' if (' + param_name + ".presence) {\n")
- out.write(' if (!VariantToValue(' + param.name + ', ' + param_name + ".val)) {\n")
- out.write(" LOG4CXX_ERROR(logger_, \"Can't convert variant to value\");\n")
- out.write(" return;\n }\n")
- out.write(" }\n")
- out.write(' emit ' + n.get('name') + '(')
- for i in range(len(params)):
- param = self.make_param_desc(params[i], iface_name)
- basic_type = (param.type in ['Integer', 'String', 'Float', 'Boolean']) or param.enum
- if param.array or (not param.mandatory) or (not basic_type):
- param_name = 'p_' + param.name
- else:
- param_name = param.name
- out.write(param_name)
- if i != len(params) - 1: out.write(', ')
- out.write(");\n")
- out.write("}\n\n")
-
-
- def make_dbus_adaptor_declarations(self, out):
- for interface_el in self.el_tree.findall('interface'):
- notifications = self.find_notifications_by_provider(interface_el, "hmi")
- request_responses = self.find_request_response_pairs_by_provider(interface_el, "hmi")
- if len(notifications) > 0 or len(request_responses) > 0:
- self.write_adaptor_declaration(interface_el, notifications, request_responses, out)
-
-
- def make_dbus_adaptor_definitions(self, out):
- for interface_el in self.el_tree.findall('interface'):
- notifications = self.find_notifications_by_provider(interface_el, "hmi")
- request_responses = self.find_request_response_pairs_by_provider(interface_el, "hmi")
- if len(notifications) > 0 or len(request_responses) > 0:
- self.write_adaptor_definition(interface_el, notifications, request_responses, out)
-
-
- def make_dbus_register_metatypes_declaraion(self, out):
- out.write("void RegisterDbusMetatypes();\n")
-
-
- def make_dbus_register_metatypes_definition(self, out):
- out.write("void RegisterDbusMetatypes() {\n")
- for (iface, name) in self.structs:
- struct_name = iface + '_' + name
- out.write('qDBusRegisterMetaType<' + struct_name + ">();\n")
- out.write('qDBusRegisterMetaType<OptionalArgument<' + struct_name + "> >();\n")
- out.write('qDBusRegisterMetaType<QList<' + struct_name + "> >();\n")
- out.write('qDBusRegisterMetaType<OptionalArgument<QList<' + struct_name + "> > >();\n")
- out.write("}\n")
-
-
- def make_api_adaptors_class(self, out):
- global prefix_class_item
- out.write("struct ApiAdaptors {\n")
- interfaces = self.el_tree.findall('interface')
- def filt(iface):
- return self.find_notifications_by_provider(iface, "hmi") or self.find_request_response_pairs_by_provider(iface, "hmi")
- interfaces = filter(filt, interfaces)
- for interface_el in interfaces:
- name = interface_el.get('name') + 'Adaptor'
- out.write(" " + name + "* " + name + "_;\n")
- out.write(" ApiAdaptors() :\n")
- for i in range(len(interfaces)):
- name = interfaces[i].get('name') + 'Adaptor'
- out.write(" " + name + "_(NULL)")
- if i <> len(interfaces) - 1: out.write(',')
- out.write("\n")
- out.write(" {}\n")
- out.write(" void Init(QObject* p) {\n")
- for interface_el in interfaces:
- name = interface_el.get('name') + 'Adaptor'
- out.write(" " + name + "_ = new " + name + "(p);\n")
- out.write(" }\n")
- out.write(" void SetApi(QObject* p) {\n")
- for interface_el in interfaces:
- name = interface_el.get('name') + 'Adaptor'
- chname = interface_el.get('name')
- out.write(" " + name + ("_->SetApi(p->findChild<Q%sItem*>(\"" % prefix_class_item) + chname + "\"));\n")
- out.write(" }\n")
- out.write(" void SetDBusController(DBusController* dc) {\n")
- for interface_el in interfaces:
- name = interface_el.get('name') + 'Adaptor'
- chname = interface_el.get('name')
- out.write(" " + name + "_->dbusController = dc;\n")
- out.write(" }\n")
- out.write("};\n\n")
-
-
-
-arg_parser = ArgumentParser(description="Generator of Qt to QDbus C++ part")
-arg_parser.add_argument('--infile', required=True, help="full name of input file, e.g. applink/src/components/interfaces/QT_HMI_API.xml")
-arg_parser.add_argument('--version', required=False, help="Qt version 4.8.5 (default) or 5.1.0")
-arg_parser.add_argument('--outdir', required=True, help="path to directory where output files qml_dbus.cc, qml_dbus.h will be saved")
-args = arg_parser.parse_args()
-
-if args.version == "4.8.5":
- prefix_class_item = 'Declarative'
- invoke_type_connection = 'Direct'
-elif args.version == "5.1.0":
- prefix_class_item = 'Quick'
- invoke_type_connection = 'BlockingQueued'
-
-header_name = 'qml_dbus.h'
-source_name = 'qml_dbus.cc'
-
-in_tree = ElementTree.parse(args.infile)
-in_tree_root = in_tree.getroot()
-
-impl = Impl(in_tree_root, 'com.ford.sdl.hmi')
-
-header_out = open(args.outdir + '/' + header_name, "w")
-source_out = open(args.outdir + '/' + source_name, "w")
-
-header_out.write("// Warning! This file is generated by '%s'. Edit at your own risk.\n" % argv[0])
-header_out.write("""/**
- * @file qml_dbus.h
- * @brief Generated QDbus adaptors header file
- *
- * This file is a part of HMI D-Bus layer.
- */
-// Copyright (c) 2013, Ford Motor Company
-// All rights reserved.
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are met:
-//
-// Redistributions of source code must retain the above copyright notice, this
-// list of conditions and the following disclaimer.
-//
-// Redistributions in binary form must reproduce the above copyright notice,
-// this list of conditions and the following
-// disclaimer in the documentation and/or other materials provided with the
-// distribution.
-//
-// Neither the name of the Ford Motor Company nor the names of its contributors
-// may be used to endorse or promote products derived from this software
-// without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
-// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 'A PARTICULAR PURPOSE
-// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
-// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
-// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
-// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
-// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
-// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-// POSSIBILITY OF SUCH DAMAGE.
-
-""")
-header_out.write("#ifndef SRC_COMPONENTS_DBUS_QML_DBUS_H_\n");
-header_out.write("#define SRC_COMPONENTS_DBUS_QML_DBUS_H_\n\n");
-header_out.write("#include <QtDBus/QDBusArgument>\n");
-header_out.write("#include <QtDBus/QDBusMessage>\n");
-header_out.write("#include <QtDBus/QDBusConnection>\n");
-header_out.write("#include <QtDBus/QDBusAbstractAdaptor>\n");
-header_out.write("#include <QtDBus/QDBusMetaType>\n");
-header_out.write("#include <Qt%s/Q%sItem>\n" % (prefix_class_item, prefix_class_item));
-header_out.write("#include \"qml_dbus_common.h\"\n\n");
-header_out.write("#include \"dbus_controller.h\"\n\n");
-impl.make_dbus_type_declarations(header_out)
-impl.make_dbus_adaptor_declarations(header_out)
-impl.make_dbus_register_metatypes_declaraion(header_out)
-impl.make_api_adaptors_class(header_out)
-impl.make_dbus_metatype_declarations(header_out)
-header_out.write("#endif // #ifndef SRC_COMPONENTS_DBUS_QML_DBUS_H_\n");
-
-source_out.write("// Warning! This file is generated by '%s'. Edit at your own risk.\n" % argv[0])
-source_out.write("""/**
- * @file qml_dbus.cc
- * @brief Generated QDbus adaptors source file
- *
- * This file is a part of HMI D-Bus layer.
- */
-// Copyright (c) 2013, Ford Motor Company
-// All rights reserved.
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are met:
-//
-// Redistributions of source code must retain the above copyright notice, this
-// list of conditions and the following disclaimer.
-//
-// Redistributions in binary form must reproduce the above copyright notice,
-// this list of conditions and the following
-// disclaimer in the documentation and/or other materials provided with the
-// distribution.
-//
-// Neither the name of the Ford Motor Company nor the names of its contributors
-// may be used to endorse or promote products derived from this software
-// without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
-// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 'A PARTICULAR PURPOSE
-// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
-// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
-// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
-// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
-// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
-// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-// POSSIBILITY OF SUCH DAMAGE.
-
-""")
-source_out.write("#include \"" + header_name + "\"\n\n");
-source_out.write("#include \"utils/logger.h\"\n")
-source_out.write("#ifdef ENABLE_LOG\n")
-source_out.write("extern log4cxx::LoggerPtr logger_;\n")
-source_out.write("#endif // ENABLE_LOG\n\n")
-impl.make_dbus_type_definitions(source_out)
-impl.make_dbus_adaptor_definitions(source_out)
-impl.make_dbus_register_metatypes_definition(source_out)
diff --git a/src/components/dbus/codegen/make_qml_dbus_qml.py b/src/components/dbus/codegen/make_qml_dbus_qml.py
deleted file mode 100755
index 8d057dcda1..0000000000
--- a/src/components/dbus/codegen/make_qml_dbus_qml.py
+++ /dev/null
@@ -1,217 +0,0 @@
-#!/usr/bin/env python
-# -*- coding: utf-8 -*-
-#
-# @file make_qml_dbus_qml.py
-# @brief Generator of QML to QDbus QML part
-#
-# This file is a part of HMI D-Bus layer.
-#
-# Copyright (c) 2013, Ford Motor Company
-# All rights reserved.
-#
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions are met:
-#
-# Redistributions of source code must retain the above copyright notice, this
-# list of conditions and the following disclaimer.
-#
-# Redistributions in binary form must reproduce the above copyright notice,
-# this list of conditions and the following
-# disclaimer in the documentation and/or other materials provided with the
-# distribution.
-#
-# Neither the name of the Ford Motor Company nor the names of its contributors
-# may be used to endorse or promote products derived from this software
-# without specific prior written permission.
-#
-# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
-# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 'A PARTICULAR PURPOSE
-# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
-# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
-# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
-# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
-# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
-# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-# POSSIBILITY OF SUCH DAMAGE.
-
-from os import path
-from os import makedirs
-from sys import argv
-from argparse import ArgumentParser
-from xml.etree import ElementTree
-from copy import copy
-from ford_xml_parser import FordXmlParser
-
-namespace = 'dbus_qml'
-qt_quick_version = '1.1'
-type_variant_name = 'variant'
-
-class Impl(FordXmlParser):
- def write_function(self, ifacename, request, response, out):
- name = request.get('name')
- name = name[:1].lower() + name[1:]
- out.write(" function " + name + "(params) {\n")
- out.write(""" console.debug("{0}Proxy::{1}")\n""".format(ifacename, name))
- out.write(" try {\n")
- out.write(" if(\"{0}\" in sdl{1})\n".format(name, ifacename))
- out.write(" return sdl{0}.{1}(" .format(ifacename, name))
- params = request.findall('param')
- for i in range(len(params)):
- out.write('params.' + params[i].get('name'))
- if i <> len(params) - 1:
- out.write(', ')
- out.write(")\n")
- out.write(" else\n")
- out.write(""" return { "__errno": Common.Result.UNSUPPORTED_REQUEST }\n""")
- out.write(" } catch(err) {\n")
- out.write(""" return { "__errno": err }\n""")
- out.write(" }\n")
- out.write(" }\n\n")
-
-
- def write_signal_param(self, param, out):
- if param.array or param.struct or not param.mandatory: typ = type_variant_name
- elif param.type == 'Integer' or param.enum: typ = 'int'
- elif param.type == 'String': typ = 'string'
- elif param.type == 'Boolean': typ = 'bool'
- elif param.type == 'Float': typ = 'double'
- else: typ = type_variant_name
- out.write(typ + ' ' + param.name)
-
-
- def write_signal(self, ifacename, notification, out):
- name = notification.get('name')
- name = name[:1].lower() + name[1:]
- out.write(" signal " + name + "(")
- params = notification.findall('param')
- for i in range(len(params)):
- self.write_signal_param(self.make_param_desc(params[i], ifacename), out)
- if i <> len(params) - 1:
- out.write(', ')
- out.write(")\n")
- name = notification.get('name')
- out.write(""" on{1}: console.debug("emitted {0}:{1}")\n""".format(ifacename, name))
-
-
- def write_qml(self, iface, out):
- global qt_quick_version
- name = iface.get('name')
- out.write("import QtQuick %s\n" % qt_quick_version)
- out.write("""import "Common.js" as Common\n""")
- out.write("import \"..\"\n\n")
- out.write("Item {\n")
- out.write(" " + name + " {\n")
- out.write(" id: sdl" + name + "\n")
- out.write(" }\n")
-
- notifications = impl.find_notifications_by_provider(interface_el, "hmi")
- request_responses = impl.find_request_response_pairs_by_provider(interface_el, "hmi")
- for request, response in request_responses:
- self.write_function(name, request, response, out)
- for n in notifications:
- self.write_signal(name, n, out)
- out.write("}\n")
-
-
- def write_js_enum(self, enum, out):
- out.write("var " + enum.get('name') + " = {\n")
- lastval = -1
- elements = enum.findall('element')
- for i in range(len(elements)):
- element = elements[i]
- value = element.get('value')
- if value is None:
- value = lastval + 1
- else:
- value = int(value)
- lastval = value
- name = element.get('internal_name')
- if name is None:
- name = element.get('name')
- out.write(" " + name + ': ' + str(value))
- if len(elements) - 1 != i: out.write(',')
- out.write("\n")
- out.write("}\n\n")
-
-
-def write_header(out):
- out.write("// Warning! This file is generated by '%s'. Edit at your own risk.\n" % argv[0])
- out.write("""/**
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-""")
-
-arg_parser = ArgumentParser(description="Generator of Qt to QDbus QML part")
-arg_parser.add_argument('--infile', required=True, help="full name of input file, e.g. applink/src/components/interfaces/QT_HMI_API.xml")
-arg_parser.add_argument('--version', required=False, help="Qt version 4.8.5 (default) or 5.1.0")
-arg_parser.add_argument('--outdir', required=True, help="path to directory where output files with pattern name <intarface name>Proxy.qml will be saved, e.g. BasicCommunicationProxy.qml, ButtonsProxy.qml VRProxy.qml")
-args = arg_parser.parse_args()
-
-if args.version == "4.8.5":
- qt_quick_version = "1.1"
- type_variant_name = "variant"
-elif args.version == "5.1.0":
- qt_quick_version = "2.0"
- type_variant_name = "var"
-
-if not path.isdir(args.outdir):
- makedirs(args.outdir)
-
-in_tree = ElementTree.parse(args.infile)
-in_tree_root = in_tree.getroot()
-
-impl = Impl(in_tree_root)
-
-for interface_el in in_tree_root.findall('interface'):
- notifications = impl.find_notifications_by_provider(interface_el, "hmi")
- request_responses = impl.find_request_response_pairs_by_provider(interface_el, "hmi")
- if notifications or request_responses:
- filename = interface_el.get('name')+'Proxy.qml'
- outfile = open(args.outdir + '/' + filename, 'w')
- write_header(outfile)
- impl.write_qml(interface_el, outfile)
-
-enum_files = dict()
-for (iface, name), enum in impl.enums.items():
- if iface in enum_files:
- outfile = enum_files[iface]
- else:
- filename = iface+'.js'
- outfile = open(args.outdir + '/' + filename, 'w')
- write_header(outfile)
- outfile.write(".pragma library\n")
- enum_files[iface] = outfile
- impl.write_js_enum(enum, outfile)
-
-
diff --git a/src/components/dbus/codegen/make_qml_requests_cpp.py b/src/components/dbus/codegen/make_qml_requests_cpp.py
deleted file mode 100644
index 6674b8f5e2..0000000000
--- a/src/components/dbus/codegen/make_qml_requests_cpp.py
+++ /dev/null
@@ -1,253 +0,0 @@
-#!/usr/bin/env python
-# -*- coding: utf-8 -*-
-#
-# @file make_qml_dbus_cpp.py
-# @brief Generator of QML to QDbus C++ part
-#
-# This file is a part of HMI D-Bus layer.
-#
-# 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.
-
-from argparse import ArgumentParser
-import os.path
-from sys import argv
-from xml.etree import ElementTree
-from copy import copy
-from ford_xml_parser import FordXmlParser, ParamDesc
-from code_formatter import CodeBlock
-
-prefix_class_item = 'Declarative'
-invoke_type_connection = 'Direct'
-
-def defaultValue(param):
- if param.type == "Integer":
- return "0"
- elif param.type == "Float":
- return "0.0"
- elif param.type == "Boolean":
- return "false"
- elif param.enum:
- return "0"
-
-class Impl(FordXmlParser):
-
-
- def args_for_function_definition(self, params, out):
- if len(params) == 0:
- out.write('QJSValue hmi_callback')
- return
- for param in params:
- out.write('QVariant ' + param.get('name') + ', ')
- out.write('QJSValue hmi_callback')
-
-
- def make_requests_for_header(self, out):
- for interface_el in self.el_tree.findall('interface'):
- request_responses = self.find_request_response_pairs_by_provider(interface_el, "sdl")
- for (request, response) in request_responses:
- all_params = list()
- for param_el in request.findall('param'):
- all_params.append(param_el)
- with CodeBlock(out) as output:
- output.write("Q_INVOLABKE void " + interface_el.get('name') + "_" +request.get('name') + "(")
- impl.args_for_function_definition(all_params, out)
- output.write(");\n")
-
-
- def make_header_file(self, out):
- out.write("class RequestToSDL : public QObject\n")
- out.write("{\n")
- out.write(" public:\n")
- with CodeBlock(out) as output:
- output.write("explicit RequestToSDL(QObject *parent = 0);\n")
- output.write("~RequestToSDL();\n")
- impl.make_requests_for_header(out)
- out.write(" private:\n")
- with CodeBlock(out) as output:
- for interface_el in self.el_tree.findall('interface'):
- output.write('QDBusInterface *' + interface_el.get('name') + ';\n')
- out.write("};\n")
-
-
- def make_requests_for_source(self, out):
- for interface_el in self.el_tree.findall('interface'):
- request_responses = self.find_request_response_pairs_by_provider(interface_el, "sdl")
- for (request, response) in request_responses:
- out.write('void RequestToSDL::' + request.get('name') + '(QString name, ')
- for param_el in request.findall('param'):
- out.write('QVariant ' + param_el.get('name') + ', ')
- out.write('QJSValue hmi_callback) {\n')
- with CodeBlock(out) as output:
- output.write('QList<QVariant> args;\n')
- for param_el in request.findall('param'):
- output.write('args << ' + param_el.get('name') + ';\n')
- output.write('new ' + interface_el.get('name') + '_' + request.get('name') + '(' + interface_el.get('name') + ', name, args, hmi_callback);\n}\n')
-
-
-
- def make_source_file(self, out):
- out.write('#include "request_to_sdl.h"\n')
- out.write('\n')
- out.write('RequestToSDL::RequestToSDL(QObject *parent) {\n')
- with CodeBlock(out) as output:
- output.write('QDBusConnection bus = QDBusConnection::sessionBus();\n')
- for interface_el in self.el_tree.findall('interface'):
- iface_name = interface_el.get('name')
- output.write(iface_name + ' = new QDBusInterface("com.ford.sdl.core", "/", "com.ford.sdl.core.' + iface_name + '", bus, this);\n')
- out.write('}\n\n')
- out.write('RequestToSDL::~RequestToSDL() {\n')
- with CodeBlock(out) as output:
- for interface_el in self.el_tree.findall('interface'):
- iface_name = interface_el.get('name')
- output.write(iface_name + '->deleteLater();\n')
- output.write('this->deleteLater();\n')
- out.write('}\n\n')
- impl.make_requests_for_source(out)
-
-
-
-
-
-arg_parser = ArgumentParser(description="Generator of Qt to QDbus C++ part")
-arg_parser.add_argument('--infile', required=True, help="full name of input file, e.g. applink/src/components/interfaces/QT_HMI_API.xml")
-arg_parser.add_argument('--version', required=False, help="Qt version 4.8.5 (default) or 5.1.0")
-arg_parser.add_argument('--outdir', required=True, help="path to directory where output files request_to_sdl.h, request_to_sdl.cc will be saved")
-args = arg_parser.parse_args()
-
-if args.version == "4.8.5":
- prefix_class_item = 'Declarative'
- invoke_type_connection = 'Direct'
-elif args.version == "5.1.0":
- prefix_class_item = 'Quick'
- invoke_type_connection = 'BlockingQueued'
-
-header_name = 'request_to_sdl.h'
-source_name = 'request_to_sdl.cc'
-
-in_tree = ElementTree.parse(args.infile)
-in_tree_root = in_tree.getroot()
-
-impl = Impl(in_tree_root, 'com.ford.sdl.hmi')
-
-header_out = open(args.outdir + '/' + header_name, "w")
-source_out = open(args.outdir + '/' + source_name, "w")
-
-header_out.write("// Warning! This file is generated by '%s'. Edit at your own risk.\n" % argv[0])
-header_out.write("""/**
- * @file request_to_sdl.h
- * @brief Generated class that process requests from qtHMI
- *
- * This file is a part of HMI D-Bus layer.
- */
-// Copyright (c) 2013, Ford Motor Company
-// All rights reserved.
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are met:
-//
-// Redistributions of source code must retain the above copyright notice, this
-// list of conditions and the following disclaimer.
-//
-// Redistributions in binary form must reproduce the above copyright notice,
-// this list of conditions and the following
-// disclaimer in the documentation and/or other materials provided with the
-// distribution.
-//
-// Neither the name of the Ford Motor Company nor the names of its contributors
-// may be used to endorse or promote products derived from this software
-// without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
-// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 'A PARTICULAR PURPOSE
-// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
-// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
-// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
-// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
-// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
-// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-// POSSIBILITY OF SUCH DAMAGE.
-
-""")
-header_out.write("#ifndef SRC_COMPONENTS_QTHMI_QMLMODELQT5_REQUESTTOSDL_\n");
-header_out.write("#define SRC_COMPONENTS_QTHMI_QMLMODELQT5_REQUESTTOSDL_\n\n");
-header_out.write("#include <QDBusConnection>\n");
-header_out.write("#include <QJSValue>\n");
-header_out.write("#include <QObject>\n");
-header_out.write("#include <QDBusInterface>\n");
-header_out.write('#include "hmi_requests.h"\n');
-
-impl.make_header_file(header_out)
-
-header_out.write("#endif SRC_COMPONENTS_QTHMI_QMLMODELQT5_REQUESTTOSDL_\n");
-
-
-source_out.write("// Warning! This file is generated by '%s'. Edit at your own risk.\n" % argv[0])
-source_out.write("""/**
- * @file request_to_sdl.cc
- * @brief Generated class that process requests from qtHMI
- *
- * This file is a part of HMI D-Bus layer.
- */
-// 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.
-
-""")
-
-impl.make_source_file(source_out)
diff --git a/src/components/dbus/codegen/make_request_to_sdl.py b/src/components/dbus/codegen/make_request_to_sdl.py
deleted file mode 100755
index c8940f3eb7..0000000000
--- a/src/components/dbus/codegen/make_request_to_sdl.py
+++ /dev/null
@@ -1,335 +0,0 @@
-#!/usr/bin/env python
-# -*- coding: utf-8 -*-
-#
-# @file make_qml_dbus_cpp.py
-# @brief Generator of QML to QDbus C++ part
-#
-# This file is a part of HMI D-Bus layer.
-#
-# 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.
-
-from argparse import ArgumentParser
-import os.path
-from sys import argv
-from xml.etree import ElementTree
-from copy import copy
-from ford_xml_parser import FordXmlParser, ParamDesc
-from code_formatter import CodeBlock
-
-class Impl(FordXmlParser):
-
- def args_for_function_definition(self, params, iface_name, out):
- for param_el in params:
- param = self.make_param_desc(param_el, iface_name)
- out.write('QVariant %s,' % (param.name))
- out.write('Q%sValue hmi_callback' % prefix_class_item)
-
- def make_requests_for_header(self, out):
- for interface_el in self.el_tree.findall('interface'):
- request_responses = self.find_request_response_pairs_by_provider(interface_el, "sdl")
- for (request, response) in request_responses:
- all_params = list()
- for param_el in request.findall('param'):
- all_params.append(param_el)
- with CodeBlock(out) as output:
- output.write("Q_INVOKABLE bool %s_%s(" % (interface_el.get('name'), request.get('name')))
- impl.args_for_function_definition(all_params, interface_el.get('name'), out)
- output.write(");\n")
-
-
- def make_header_file(self, out):
- out.write("class QDBusInterface;\n")
- out.write("class RequestToSDL : public QObject\n")
- out.write("{\n")
- out.write(' Q_OBJECT\n')
- out.write(" public:\n")
- with CodeBlock(out) as output:
- output.write("explicit RequestToSDL(QObject *parent = 0);\n")
- output.write("~RequestToSDL();\n")
- impl.make_requests_for_header(out)
- out.write(" private:\n")
- with CodeBlock(out) as output:
- for interface_el in self.el_tree.findall('interface'):
- output.write('QDBusInterface *%s;\n' % interface_el.get('name'))
- out.write("};\n")
-
-
- def qt_param_type(self, param):
- if not param.mandatory:
- param_copy = copy(param)
- param_copy.mandatory = True
- return "OptionalArgument< " + self.qt_param_type(param_copy) + " >"
- if param.array:
- param_copy = copy(param)
- param_copy.array = False
- if param.type == 'String':
- return "QStringList"
- return "QList< " + self.qt_param_type(param_copy) + " >"
- if param.type == 'Integer' or param.enum:
- return 'int'
- elif param.type == 'String':
- return 'QString'
- elif param.type == 'Boolean':
- return 'bool'
- elif param.type == 'Float':
- return 'double'
- elif param.struct:
- return "_".join(param.fulltype)
- else:
- raise RuntimeError('Unknown type: ' + param.type)
-
-
- def make_requests_for_source(self, out):
- for interface_el in self.el_tree.findall('interface'):
- request_responses = self.find_request_response_pairs_by_provider(interface_el, "sdl")
- for (request, response) in request_responses:
- request_name = request.get('name')
- iface_name = interface_el.get('name')
- request_full_name = iface_name + '_' + request_name
- out.write('bool RequestToSDL::' + request_full_name + '(')
- for param_el in request.findall('param'):
- out.write('QVariant %s, ' % (param_el.get('name')))
- out.write('Q%sValue hmi_callback) {\n' % prefix_class_item)
- with CodeBlock(out) as output:
- output.write('LOG4CXX_TRACE(logger_, "ENTER");\n')
- output.write('QList<QVariant> args;\n')
- for param_el in request.findall('param'):
- param = self.make_param_desc(param_el, iface_name)
- output.write('%s %s;\n' % (impl.qt_param_type(param), param.name + "_tmp"))
- output.write('if (VariantToValue(%s, %s)) {\n' % (param.name, param.name + '_tmp'))
- with CodeBlock(output) as out:
- self.write_param_validation(param, param.name + "_tmp",
- "\nLOG4CXX_ERROR(logger_, \"%s in %s out of bounds\");\nreturn false" % (param.name, request_full_name),
- out)
- out.write('args << QVariant::fromValue(%s);\n' % (param.name + '_tmp'))
- output.write('} else {\n')
- with CodeBlock(output) as out:
- out.write('LOG4CXX_ERROR(logger_, "%s in %s is NOT valid");\n' % (param.name, request_full_name))
- out.write('return false;\n')
- out.write('}\n')
- output.write('new requests::' + request_full_name + '(hmi_callback, ' + interface_el.get('name') + ' , args, '
- + '"' + request_name + '");\n')
- output.write('LOG4CXX_TRACE(logger_, "EXIT");\n')
- output.write('return true;\n')
- out.write('}\n\n')
-
-
- def write_param_validation(self, param, param_name, fail_statement, out, level=0):
- if not param.mandatory and (param.restricted or param.restrictedArray or (param.struct and any(map(lambda x: x.restricted, self.structs[param.fulltype])))):
- out.write("if (%s.presence) {\n" % param_name)
- param_copy = copy(param)
- param_copy.mandatory = True
- with CodeBlock(out) as out:
- self.write_param_validation(param_copy, param_name + ".val", fail_statement, out, level+1)
- out.write("}\n")
- elif param.array:
- if param.minSize > 0:
- out.write("if ({0}.count() < {1}) {{".format(param_name, param.minSize))
- with CodeBlock(out) as out:
- out.write("{0};\n".format(fail_statement))
- out.write("}\n")
- if param.maxSize != None:
- out.write("if ({0}.count() > {1}) {{".format(param_name, param.maxSize))
- with CodeBlock(out) as out:
- out.write("{0};\n".format(fail_statement))
- out.write("}\n")
- if param.restricted:
- out.write('for ({0}::const_iterator it_{2} = {1}.begin(); it_{2} != {1}.end(); ++it_{2}) {{\n'.format(self.qt_param_type(param), param_name, level))
- with CodeBlock(out) as out:
- param_copy = copy(param)
- param_copy.array = False
- self.write_param_validation(param_copy, "(*it_{0})".format(level), fail_statement, out, level+1)
- out.write("}\n")
- elif param.struct:
- for p in self.structs[param.fulltype]:
- self.write_param_validation(p, "{0}.{1}".format(param_name, p.name), fail_statement, out, level+1)
- elif param.type == "Integer" or param.type == "Float":
- conditions = []
- if (param.minValue != None):
- conditions.append("(%s < %s)" % (param_name, param.minValue))
- if (param.maxValue != None):
- conditions.append("(%s > %s)" % (param_name, param.maxValue))
- if conditions:
- out.write('if (%s) {' % ' || '.join(conditions))
- with CodeBlock(out) as out:
- out.write('%s;\n' % fail_statement)
- out.write("}\n")
- elif param.type == "String":
- conditions = []
- if (param.minLength > 0):
- conditions.append("(%s.size() < %s)" % (param_name, param.minLength))
- if (param.maxLength > 0):
- conditions.append("(%s.size() > %s)" % (param_name, param.maxLength))
- if conditions:
- out.write('if (%s) {' % ' || '.join(conditions))
- with CodeBlock(out) as out:
- out.write('%s;\n' % (fail_statement))
- out.write("}\n")
-
- def make_source_file(self, out):
- out.write('RequestToSDL::RequestToSDL(QObject *parent) {\n')
- with CodeBlock(out) as output:
- output.write('QDBusConnection bus = QDBusConnection::sessionBus();\n')
- for interface_el in self.el_tree.findall('interface'):
- iface_name = interface_el.get('name')
- output.write(iface_name + ' = new QDBusInterface("com.ford.sdl.core", "/", "com.ford.sdl.core.' + iface_name + '", bus, this);\n')
- out.write('}\n\n')
- out.write('RequestToSDL::~RequestToSDL() {\n')
- with CodeBlock(out) as output:
- for interface_el in self.el_tree.findall('interface'):
- iface_name = interface_el.get('name')
- output.write(iface_name + '->deleteLater();\n')
- output.write('this->deleteLater();\n')
- out.write('}\n\n')
- impl.make_requests_for_source(out)
-
-arg_parser = ArgumentParser(description="Generator of Qt to QDbus C++ part")
-arg_parser.add_argument('--infile', required=True, help="full name of input file, e.g. applink/src/components/interfaces/QT_HMI_API.xml")
-arg_parser.add_argument('--version', required=False, help="Qt version 4.8.5 (default) or 5.1.0")
-arg_parser.add_argument('--outdir', required=True, help="path to directory where output files request_to_sdl.h, request_to_sdl.cc will be saved")
-args = arg_parser.parse_args()
-
-
-if args.version == "4.8.5":
- prefix_class_item = 'Script'
- invoke_type_connection = 'Direct'
-elif args.version == "5.1.0":
- prefix_class_item = 'JS'
- invoke_type_connection = 'BlockingQueued'
-else:
- prefix_class_item = 'JS'
- invoke_type_connection = 'BlockingQueued'
-
-header_name = 'request_to_sdl.h'
-source_name = 'request_to_sdl.cc'
-
-in_tree = ElementTree.parse(args.infile)
-in_tree_root = in_tree.getroot()
-
-impl = Impl(in_tree_root, 'com.ford.sdl.hmi')
-
-header_out = open(args.outdir + '/' + header_name, "w")
-source_out = open(args.outdir + '/' + source_name, "w")
-
-header_out.write("// Warning! This file is generated by '%s'. Edit at your own risk.\n" % argv[0])
-header_out.write("""
-/*
- 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.
-*/
-""")
-header_out.write("#ifndef SRC_COMPONENTS_QT_HMI_QML_PLUGINS_DBUS_ADAPTER_REQUEST_TO_SDL_H_\n")
-header_out.write("#define SRC_COMPONENTS_QT_HMI_QML_PLUGINS_DBUS_ADAPTER_REQUEST_TO_SDL_H_\n\n")
-
-header_out.write("#include <QtCore/QObject>\n")
-header_out.write("#include <QtCore/QVariant>\n")
-header_out.write("#include <QtCore/QStringList>\n\n")
-header_out.write('#include "qml_dbus.h"\n\n')
-if args.version == "4.8.5":
- header_out.write("#include <QtScript/QScriptValue>\n")
-elif args.version == "5.1.0":
- header_out.write("#include <QtQml/QJSValue>\n")
-
-impl.make_header_file(header_out)
-header_out.write("#endif // SRC_COMPONENTS_QT_HMI_QML_PLUGINS_DBUS_ADAPTER_REQUEST_TO_SDL_H_")
-
-
-source_out.write("// Warning! This file is generated by '%s'. Edit at your own risk.\n" % argv[0])
-source_out.write("""
-/*
- 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.
-*/
-
-""")
-
-source_out.write('#include "request_to_sdl.h"\n')
-source_out.write("#include <QtDBus/QDBusConnection>\n")
-source_out.write("#include <QtDBus/QDBusInterface>\n")
-source_out.write('#include "hmi_requests.h"\n')
-source_out.write('#include "utils/logger.h"\n\n')
-source_out.write('CREATE_LOGGERPTR_GLOBAL(logger_, "DBusPlugin")\n\n')
-
-impl.make_source_file(source_out)
diff --git a/src/components/dbus/include/dbus/dbus_adapter.h b/src/components/dbus/include/dbus/dbus_adapter.h
deleted file mode 100644
index 42a2ac1140..0000000000
--- a/src/components/dbus/include/dbus/dbus_adapter.h
+++ /dev/null
@@ -1,375 +0,0 @@
-/*
- * Copyright (c) 2013-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_DBUS_INCLUDE_DBUS_DBUS_ADAPTER_H_
-#define SRC_COMPONENTS_DBUS_INCLUDE_DBUS_DBUS_ADAPTER_H_
-
-#include <string>
-#include "smart_objects/smart_object.h"
-#include "dbus/schema.h"
-#include "dbus/message_descriptions.h"
-
-struct DBusConnection;
-struct DBusMessage;
-struct DBusMessageIter;
-
-namespace dbus {
-
-/**
- * \brief class for work with DBus
- */
-class DBusAdapter {
- public:
- /**
- * \brief constructs DBus adapter
- * \param sdlServiceName core service name
- * \param sdlObjectPath core object path
- * \param hmiServiceName hmi service name
- */
- DBusAdapter(const std::string& sdlServiceName,
- const std::string& sdlObjectPath,
- const std::string& hmiServiceName,
- const std::string& hmiObjectPath);
-
- /**
- * \brief destructs DBus adapter
- */
- virtual ~DBusAdapter();
-
- /**
- * \brief inits service
- * \return true if success
- */
- bool Init();
-
- /**
- * \brief return schema messages for DBus
- * \return schema
- */
- const DBusSchema& get_schema() const;
-
- protected:
- /**
- * \brief calls method on HMI
- * \param id id message
- * \param func_id id function in Ford protocol
- * \param name pair interface and name of method for call
- * \param obj params for call
- */
- void MethodCall(uint id,
- const MessageId func_id,
- const MessageName& name,
- const smart_objects::SmartObject& obj);
-
- /**
- * \brief sends signal
- * \param id id message
- * \param func_id id function in Ford protocol
- * \param name pair interface and name of signal for call
- * \param obj params for signal
- */
- void Signal(const MessageId func_id,
- const MessageName& name,
- const smart_objects::SmartObject& obj);
-
- /**
- * \brief returns result of call method to HMI
- * \param id id message
- * \param obj params for return
- */
- void MethodReturn(uint id,
- const MessageId func_id,
- const MessageName& name,
- const smart_objects::SmartObject& obj);
-
- /**
- * \brief sends error on message from HMI
- * \param id id message
- * \param msg message from HMI
- * \param name name of error
- * \param description description of error
- */
- void Error(uint id, const std::string& name, const std::string& description);
-
- /**
- * \brief adds a match rule
- * \param rule string rule in the DBus specification
- */
- void AddMatch(const std::string& rule);
-
- /**
- * \brief processes incoming message from DBus if queue isn't empty
- * and fill obj
- * \param obj object for send to core
- * \return true if message processed
- */
- bool Process(smart_objects::SmartObject& obj);
-
- /**
- * \brief saves link D-Bus serial to Ford message id
- * \param serial D-Bus message serial
- * \param ids pair correlation id and Ford message id
- */
- inline void SaveRequestToHMI(uint32_t serial,
- const std::pair<uint, MessageId>& ids);
-
- /**
- * \brief gets Ford message id by serial
- * \param serial D-Bus message serial
- * \return pair correlation id and Ford message id
- */
- inline std::pair<uint, MessageId> GetRequestToHMI(uint32_t serial);
-
- /**
- * \brief saves link D-Bus serial to Ford message id
- * \param serial D-Bus message serial
- * \param request D-Bus message from HMI
- */
- inline void SaveRequestFromHMI(uint32_t serial, DBusMessage* request);
-
- /**
- * \brief gets D-Bus message id by serial
- * \param serial DBus message serial
- * \return D-Bus message from HMI
- */
- inline DBusMessage* GetRequestFromHMI(uint32_t serial);
-
- std::string sdl_service_name_;
- std::string sdl_object_path_;
- std::string hmi_service_name_;
- std::string hmi_object_path_;
- DBusConnection* conn_;
-
- private:
- /**
- * \brief schema messages and arguments for DBus
- */
- const DBusSchema* schema_;
-
- /**
- * \brief mapping serial message DBus on message id Ford protocol
- */
- std::map<uint32_t, std::pair<uint, MessageId> > requests_to_hmi_;
-
- /**
- * \brief mapping message id Ford protocol on message DBus
- */
- std::map<uint32_t, DBusMessage*> requests_from_hmi_;
-
- /**
- * \brief processes incoming call of method and fill obj
- * \param msg message from DBus
- * \param obj object for send to core
- * \return true if success
- */
- bool ProcessMethodCall(DBusMessage* msg, smart_objects::SmartObject& obj);
-
- /**
- * \brief processes incoming return of method and fill obj
- * \param msg message from DBus
- * \param obj object for send to core
- * \return true if success
- */
- bool ProcessMethodReturn(DBusMessage* msg, smart_objects::SmartObject& obj);
-
- /**
- * \brief processes incoming error and fill obj
- * \param msg message from DBus
- * \param obj object for send to core
- * \return true if success
- */
- bool ProcessError(DBusMessage* msg, smart_objects::SmartObject& obj);
-
- /**
- * \brief processes incoming signal and fill obj
- * \param msg message from DBus
- * \param obj object for send to core
- * \return true if success
- */
- bool ProcessSignal(DBusMessage* msg, smart_objects::SmartObject& obj);
-
- /**
- * \brief sets arguments to message
- * \param msg DBus message
- * \param rules list of rules for arguments
- * \param args map of arguments
- * \return true if success
- */
- bool SetArguments(DBusMessage* msg,
- const ListArgs& rules,
- const smart_objects::SmartObject& args);
-
- /**
- * \brief Sets one argument to message
- * \param iter DBus message iterator
- * \param rules description for argument
- * \param param value of argument
- * \return true if success
- */
- bool SetOneArgument(
- DBusMessageIter* iter,
- const ford_message_descriptions::ParameterDescription* rules,
- const smart_objects::SmartObject& param);
-
- /**
- * \brief sets value for argument
- * \param iter DBus message iterator
- * \param rules description for argument
- * \param param value of argument
- * \return true if success
- */
- bool SetValue(DBusMessageIter* iter,
- const ford_message_descriptions::ParameterDescription* rules,
- const smart_objects::SmartObject& param);
-
- /**
- * \brief sets value for every element of argument
- * \param iter DBus message iterator
- * \param rules description for argument
- * \param param array values of argument
- * \return true if success
- */
- bool SetArrayValue(DBusMessageIter* iter,
- const ford_message_descriptions::ArrayDescription* rules,
- const smart_objects::SmartObject& param);
-
- /**
- * \brief sets struct value for argument
- * \param iter DBus message iter
- * \param rules description for argument
- * \param param structure
- * \return true if success
- */
- bool SetStructValue(DBusMessageIter* iter,
- const ford_message_descriptions::StructDescription* rules,
- const smart_objects::SmartObject& param);
-
- /**
- * \brief sets optional value for argument.
- * Optional param is struct bool, value
- * \param iter DBus message iterator
- * \param rules description for argument
- * \param param value of optional argument
- * \return true if success
- */
- bool SetOptionalValue(
- DBusMessageIter* iter,
- const ford_message_descriptions::ParameterDescription* rules,
- const smart_objects::SmartObject& param);
-
- /**
- * \brief gets arguments from message
- * \param iter DBus message iterator
- * \param code response code (output)
- * \param message response message (output)
- * \return true if success
- */
- bool GetHeader(DBusMessageIter* iter, int* code, std::string* message);
-
- /**
- * \brief gets arguments from message with header
- * \param iter DBus message iterator
- * \param rules list of rules for arguments
- * \param args map of arguments
- * \return true if success
- */
- bool GetArguments(DBusMessageIter* iter,
- const ListArgs& rules,
- smart_objects::SmartObject& args);
-
- /**
- * \brief gets one argument from message
- * \param iter DBus message iterator
- * \param rules description for argument
- * \param args map of arguments
- * \return true if success
- */
- bool GetOneArgument(
- DBusMessageIter* iter,
- const ford_message_descriptions::ParameterDescription* rules,
- smart_objects::SmartObject& args);
-
- /**
- * \brief gets value for argument
- * \param iter DBus message iterator
- * \param rules description for argument
- * \param param value of argument
- * \return true if success
- */
- bool GetValue(DBusMessageIter* iter,
- const ford_message_descriptions::ParameterDescription* rules,
- smart_objects::SmartObject& param);
-
- /**
- * \brief gets value for every element of argument
- * \param iter DBus message iterator
- * \param rules description for argument
- * \param param array values of argument
- * \return true if success
- */
- bool GetArrayValue(DBusMessageIter* iter,
- const ford_message_descriptions::ArrayDescription* rules,
- smart_objects::SmartObject& param);
-
- /**
- * \brief gets struct value for argument
- * \param iter DBus message iterator
- * \param rules description for argument
- * \param param structure
- * \return true if success
- */
- bool GetStructValue(DBusMessageIter* iter,
- const ford_message_descriptions::StructDescription* rules,
- smart_objects::SmartObject& param);
-
- /**
- * \brief gets optional value for argument.
- * Optional param is struct bool, value
- * \param iter DBus message iterator
- * \param rules description for argument
- * \param param value of optional argument
- * \return true if success
- */
- bool GetOptionalValue(
- DBusMessageIter* iter,
- const ford_message_descriptions::ParameterDescription* rules,
- smart_objects::SmartObject& param);
-
- /**
- * \brief processes request on introspect
- * \param msg DBus message
- */
- void Introspect(DBusMessage* msg);
-};
-
-} // namespace dbus
-
-#endif // SRC_COMPONENTS_DBUS_INCLUDE_DBUS_DBUS_ADAPTER_H_
diff --git a/src/components/dbus/include/dbus/dbus_message.h b/src/components/dbus/include/dbus/dbus_message.h
deleted file mode 100644
index 23e672d0fc..0000000000
--- a/src/components/dbus/include/dbus/dbus_message.h
+++ /dev/null
@@ -1,179 +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_DBUS_INCLUDE_DBUS_DBUS_MESSAGE_H_
-#define SRC_COMPONENTS_DBUS_INCLUDE_DBUS_DBUS_MESSAGE_H_
-
-#include <stdint.h>
-#include <string>
-
-#include <dbus/dbus.h>
-
-namespace dbus {
-
-enum ContainerType {
- kArray = DBUS_TYPE_ARRAY,
- kStruct = DBUS_TYPE_STRUCT,
- kDictEntry = DBUS_TYPE_DICT_ENTRY
-};
-
-class MessageRefKeeper {
- public:
- MessageRefKeeper();
- MessageRefKeeper(DBusMessage* message);
- ~MessageRefKeeper();
- MessageRefKeeper(const MessageRefKeeper& other);
- MessageRefKeeper& operator=(MessageRefKeeper other);
- DBusMessage* get() const;
- DBusMessage* Pass();
- void swap(MessageRefKeeper& other);
-
- private:
- DBusMessage* raw_message_;
-};
-
-class MessageRef {
- public:
- MessageRef(DBusMessage* message);
- ~MessageRef();
- std::string GetInterface() const;
- std::string GetMember() const;
-
- protected:
- MessageRefKeeper raw_message_ref_;
- friend class MessageReader;
- friend class MessageWriter;
-};
-
-class MessageReader {
- public:
- // Main constructor
- MessageReader(const MessageRef& message);
- bool has_failed() const;
- bool IsAtLastElement() const;
- bool HasNext() const;
-
- // Type checkers
- bool NextIsInvalid() const;
- bool NextIsBool() const;
- bool NextIsByte() const;
- bool NextIsInt16() const;
- bool NextIsUint16() const;
- bool NextIsInt32() const;
- bool NextIsUint32() const;
- bool NextIsInt64() const;
- bool NextIsUint64() const;
- bool NextIsDouble() const;
- bool NextIsString() const;
- bool NextIsArray() const;
- bool NextIsStruct() const;
- bool NextIsDictEntry() const;
-
- // Readers
- bool TakeBool();
- uint8_t TakeByte();
- int16_t TakeInt16();
- uint16_t TakeUint16();
- int32_t TakeInt32();
- uint32_t TakeUint32();
- int64_t TakeInt64();
- uint64_t TakeUint64();
- double TakeDouble();
- std::string TakeString();
-
- MessageReader TakeArrayReader();
- MessageReader TakeStructReader();
- MessageReader TakeDictEntryReader();
-
- private:
- typedef int DataType;
- // Container reader constructor
- MessageReader(MessageReader* reader, DataType container_data_type);
- void MoveToNext();
- void MarkFailed();
- DataType NextValueType() const;
- void ReadNextValue(DataType type, void* value);
-
- private:
- // Fields
- MessageReader* parent_reader_;
- bool failed_;
- DBusMessageIter iterator_;
-};
-
-class MessageWriter {
- public:
- // Methods
- // Main appending constructor
- MessageWriter(const MessageRef& message);
- // Container writer constructor
- MessageWriter(MessageWriter* parent,
- ContainerType type,
- const char* array_signature);
- ~MessageWriter();
- void PutBool(bool value);
- void PutByte(uint8_t value);
- void PutInt16(int16_t value);
- void PutUint16(uint16_t value);
- void PutInt32(int32_t value);
- void PutUint32(uint32_t value);
- void PutInt64(int64_t value);
- void PutUint64(uint64_t value);
- void PutDouble(double value);
- void PutString(const std::string& value);
-
- private:
- typedef int DataType;
- // Main constructor
- void WriteAndCheck(DataType value_type, const void* value);
- void CloseWriter();
-
- private:
- // Fields
- bool has_opened_subcontainer_;
- MessageWriter* parent_writer_;
- DBusMessageIter iterator_;
-
- // Disallow copy and assign
- MessageWriter(const MessageWriter& other);
- MessageWriter& operator=(const MessageWriter& other);
-};
-
-MessageRef MethodCall(const char* bus_name,
- const char* path,
- const char* interface,
- const char* method);
-MessageRef Signal(const char* path, const char* interface, const char* name);
-} // namespace dbus
-
-#include "dbus/dbus_message_inl.h"
-
-#endif // SRC_COMPONENTS_DBUS_INCLUDE_DBUS_DBUS_MESSAGE_H_
diff --git a/src/components/dbus/include/dbus/dbus_message_controller.h b/src/components/dbus/include/dbus/dbus_message_controller.h
deleted file mode 100644
index a4a3718ce3..0000000000
--- a/src/components/dbus/include/dbus/dbus_message_controller.h
+++ /dev/null
@@ -1,97 +0,0 @@
-/*
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef SRC_COMPONENTS_DBUS_INCLUDE_DBUS_DBUS_MESSAGE_CONTROLLER_H_
-#define SRC_COMPONENTS_DBUS_INCLUDE_DBUS_DBUS_MESSAGE_CONTROLLER_H_
-
-#include <string>
-#include <map>
-#include "dbus/dbus_adapter.h"
-#include "smart_objects/smart_object.h"
-
-namespace dbus {
-
-class DBusMessageController : public DBusAdapter {
- public:
- /**
- * @brief constructs DBus message controller
- * @param sdlServiceName name of service SDL
- * @param sdlObjectPath path of object SDL
- * @param hmiServiceName name of service HMI
- * @param hmiObjectPath path of object HMI
- */
- DBusMessageController(const std::string& sdlServiceName,
- const std::string& sdlObjectPath,
- const std::string& hmiServiceName,
- const std::string& hmiObjectPath);
-
- /**
- * @brief destructs DBus message controller
- */
- virtual ~DBusMessageController();
-
- /**
- * @brief subscribes to the DBus signal.
- * @param interface name of interface in HMI
- * @param signal name of signal
- */
- void SubscribeTo(const std::string& interface, const std::string& signal);
-
- /**
- * @brief Method for receiving thread.
- */
- void* MethodForReceiverThread(void*);
-
- /**
- * @brief Main thread loop.
- */
- bool Run();
-
- /**
- * @brief Signal shutdown for thread loop.
- */
- void Shutdown();
-
- protected:
- /**
- * @brief sends message to core
- * @param obj
- */
- virtual void SendMessageToCore(const smart_objects::SmartObject& obj) = 0;
-
- private:
- bool shutdown_;
-};
-
-} // namespace dbus
-
-#endif // SRC_COMPONENTS_DBUS_INCLUDE_DBUS_DBUS_MESSAGE_CONTROLLER_H_
diff --git a/src/components/dbus/include/dbus/dbus_message_inl.h b/src/components/dbus/include/dbus/dbus_message_inl.h
deleted file mode 100644
index ba9bfaa78d..0000000000
--- a/src/components/dbus/include/dbus/dbus_message_inl.h
+++ /dev/null
@@ -1,214 +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_DBUS_INCLUDE_DBUS_DBUS_MESSAGE_INL_H_
-#define SRC_COMPONENTS_DBUS_INCLUDE_DBUS_DBUS_MESSAGE_INL_H_
-
-#include "dbus/dbus_message.h"
-
-namespace dbus {
-// MessageReader
-inline bool MessageReader::has_failed() const {
- return failed_;
-}
-
-inline bool MessageReader::IsAtLastElement() const {
- DBusMessageIter* iter = const_cast<DBusMessageIter*>(&iterator_);
- return dbus_message_iter_has_next(iter) == 0;
-}
-
-inline bool MessageReader::HasNext() const {
- return !failed_ && NextValueType() != DBUS_TYPE_INVALID;
-}
-
-inline bool MessageReader::NextIsInvalid() const {
- return NextValueType() == DBUS_TYPE_INVALID;
-}
-
-inline bool MessageReader::NextIsBool() const {
- return NextValueType() == DBUS_TYPE_BOOLEAN;
-}
-
-inline bool MessageReader::NextIsByte() const {
- return NextValueType() == DBUS_TYPE_BYTE;
-}
-
-inline bool MessageReader::NextIsInt16() const {
- return NextValueType() == DBUS_TYPE_INT16;
-}
-
-inline bool MessageReader::NextIsUint16() const {
- return NextValueType() == DBUS_TYPE_UINT16;
-}
-
-inline bool MessageReader::NextIsInt32() const {
- return NextValueType() == DBUS_TYPE_INT32;
-}
-
-inline bool MessageReader::NextIsUint32() const {
- return NextValueType() == DBUS_TYPE_UINT32;
-}
-
-inline bool MessageReader::NextIsInt64() const {
- return NextValueType() == DBUS_TYPE_INT64;
-}
-
-inline bool MessageReader::NextIsUint64() const {
- return NextValueType() == DBUS_TYPE_UINT64;
-}
-
-inline bool MessageReader::NextIsDouble() const {
- return NextValueType() == DBUS_TYPE_DOUBLE;
-}
-
-inline bool MessageReader::NextIsString() const {
- return NextValueType() == DBUS_TYPE_STRING;
-}
-
-inline bool MessageReader::NextIsArray() const {
- return NextValueType() == DBUS_TYPE_ARRAY;
-}
-
-inline bool MessageReader::NextIsStruct() const {
- return NextValueType() == DBUS_TYPE_STRUCT;
-}
-
-inline bool MessageReader::TakeBool() {
- dbus_bool_t value = 0;
- ReadNextValue(DBUS_TYPE_BOOLEAN, &value);
- return value != 0;
-}
-
-inline uint8_t MessageReader::TakeByte() {
- uint8_t value = 0;
- ReadNextValue(DBUS_TYPE_BYTE, &value);
- return value;
-}
-
-inline int16_t MessageReader::TakeInt16() {
- int16_t value = 0;
- ReadNextValue(DBUS_TYPE_INT16, &value);
- return value;
-}
-
-inline uint16_t MessageReader::TakeUint16() {
- uint16_t value = 0;
- ReadNextValue(DBUS_TYPE_UINT16, &value);
- return value;
-}
-
-inline int32_t MessageReader::TakeInt32() {
- int32_t value = 0;
- ReadNextValue(DBUS_TYPE_INT32, &value);
- return value;
-}
-
-inline uint32_t MessageReader::TakeUint32() {
- uint32_t value = 0;
- ReadNextValue(DBUS_TYPE_UINT32, &value);
- return value;
-}
-
-inline int64_t MessageReader::TakeInt64() {
- int64_t value = 0;
- ReadNextValue(DBUS_TYPE_INT64, &value);
- return value;
-}
-
-inline uint64_t MessageReader::TakeUint64() {
- uint64_t value = 0;
- ReadNextValue(DBUS_TYPE_UINT64, &value);
- return value;
-}
-
-inline double MessageReader::TakeDouble() {
- double value = 0.;
- ReadNextValue(DBUS_TYPE_DOUBLE, &value);
- return value;
-}
-
-inline std::string MessageReader::TakeString() {
- const char* value = "";
- ReadNextValue(DBUS_TYPE_STRING, &value);
- return value;
-}
-
-inline MessageReader::DataType MessageReader::NextValueType() const {
- DBusMessageIter* iter = const_cast<DBusMessageIter*>(&iterator_);
- return failed_ ? DBUS_TYPE_INVALID : dbus_message_iter_get_arg_type(iter);
-}
-
-// Message writer methods
-inline void MessageWriter::PutBool(bool value) {
- dbus_bool_t dbus_value = value;
- WriteAndCheck(DBUS_TYPE_BOOLEAN, &dbus_value);
-}
-
-inline void MessageWriter::PutByte(uint8_t value) {
- WriteAndCheck(DBUS_TYPE_BYTE, &value);
-}
-
-inline void MessageWriter::PutInt16(int16_t value) {
- WriteAndCheck(DBUS_TYPE_INT16, &value);
-}
-
-inline void MessageWriter::PutUint16(uint16_t value) {
- WriteAndCheck(DBUS_TYPE_UINT16, &value);
-}
-
-inline void MessageWriter::PutInt32(int32_t value) {
- WriteAndCheck(DBUS_TYPE_INT32, &value);
-}
-
-inline void MessageWriter::PutUint32(uint32_t value) {
- WriteAndCheck(DBUS_TYPE_UINT32, &value);
-}
-
-inline void MessageWriter::PutInt64(int64_t value) {
- WriteAndCheck(DBUS_TYPE_INT64, &value);
-}
-
-inline void MessageWriter::PutUint64(uint64_t value) {
- WriteAndCheck(DBUS_TYPE_UINT64, &value);
-}
-
-inline void MessageWriter::PutDouble(double value) {
- WriteAndCheck(DBUS_TYPE_DOUBLE, &value);
-}
-
-inline void MessageWriter::PutString(const std::string& value) {
- const char* pointer = value.c_str();
- WriteAndCheck(DBUS_TYPE_STRING, &pointer);
-}
-
-} // namespace dbus
-
-#endif // SRC_COMPONENTS_DBUS_INCLUDE_DBUS_DBUS_MESSAGE_INL_H_
diff --git a/src/components/dbus/include/dbus/message_descriptions.h b/src/components/dbus/include/dbus/message_descriptions.h
deleted file mode 100644
index a9e7a5e141..0000000000
--- a/src/components/dbus/include/dbus/message_descriptions.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_DBUS_INCLUDE_DBUS_MESSAGE_DESCRIPTIONS_H_
-#define SRC_COMPONENTS_DBUS_INCLUDE_DBUS_MESSAGE_DESCRIPTIONS_H_
-
-#include <stdint.h>
-#include <stdlib.h>
-#include "interfaces/HMI_API.h"
-
-namespace ford_message_descriptions {
-
-enum ParameterType { Integer, Boolean, Float, String, Struct, Enum, Array };
-
-struct ParameterDescription {
- const char* name;
- const ParameterType type;
- const bool obligatory; // TODO (dchmerev@luxoft.com): rename to 'mandatory'
- // as in HMI API description
-};
-
-struct ArrayDescription {
- const ParameterDescription base;
- const ParameterDescription* element;
- const char* element_dbus_signature;
-};
-
-struct StructDescription {
- const ParameterDescription base;
- const ParameterDescription** parameters;
-};
-
-struct MessageDescription {
- const char* interface;
- const char* name;
- const hmi_apis::messageType::eType message_type;
- const hmi_apis::FunctionID::eType function_id;
- const ParameterDescription** parameters;
-};
-
-extern const MessageDescription* message_descriptions[];
-
-} // namespace ford_message_descriptions
-
-#endif // SRC_COMPONENTS_DBUS_INCLUDE_DBUS_MESSAGE_DESCRIPTIONS_H_
diff --git a/src/components/dbus/include/dbus/schema.h b/src/components/dbus/include/dbus/schema.h
deleted file mode 100644
index 3dfe49cc95..0000000000
--- a/src/components/dbus/include/dbus/schema.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_DBUS_INCLUDE_DBUS_SCHEMA_H_
-#define SRC_COMPONENTS_DBUS_INCLUDE_DBUS_SCHEMA_H_
-
-#include <string>
-#include <vector>
-#include <utility>
-
-#include "dbus/message_descriptions.h"
-#include "interfaces/HMI_API.h"
-
-namespace dbus {
-
-using ford_message_descriptions::ParameterDescription;
-using ford_message_descriptions::MessageDescription;
-
-struct Description;
-
-typedef hmi_apis::FunctionID::eType MessageId;
-typedef hmi_apis::messageType::eType MessageType;
-typedef std::pair<std::string, std::string> MessageName; // interface, message
-typedef std::vector<const ParameterDescription*> ListArgs;
-typedef std::vector<const Description*> Messages;
-
-/**
- * \brief Wrapper class for message description
- */
-class DBusSchema {
- public:
- explicit DBusSchema(const MessageDescription** array);
-
- /**
- * \brief gets message name by message id
- * \param id id message
- * \return name message
- */
- MessageName getMessageName(MessageId id) const;
-
- /**
- * \brief gets message id by message name
- * \param name name message
- * \return id message
- */
- MessageId getMessageId(const MessageName& name) const;
-
- /**
- * \brief gets list rules for arguments
- * \param id id message
- * \param type type message
- * \return list rules
- */
- ListArgs getListArgs(MessageId id, MessageType type) const;
-
- /**
- * \brief gets list rules for arguments
- * @param name name message
- * @param type type message
- * @return list rules
- */
- ListArgs getListArgs(const MessageName& name, MessageType type) const;
-
- private:
- Messages msgs_;
-};
-
-} // namespace dbus
-
-#endif // SRC_COMPONENTS_DBUS_INCLUDE_DBUS_SCHEMA_H_
diff --git a/src/components/dbus/src/dbus_adapter.cc b/src/components/dbus/src/dbus_adapter.cc
deleted file mode 100644
index 33d05a728b..0000000000
--- a/src/components/dbus/src/dbus_adapter.cc
+++ /dev/null
@@ -1,937 +0,0 @@
-/*
- * Copyright (c) 2013-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 "dbus/dbus_adapter.h"
-#include <dbus/dbus.h>
-#include <sstream>
-#include "formatters/CSmartFactory.h"
-#include "utils/logger.h"
-#include "smart_objects/smart_object.h"
-#include "introspection_xml.cc"
-#include "message_descriptions.cc"
-
-using ford_message_descriptions::ParameterDescription;
-namespace sos = NsSmartDeviceLink::NsJSONHandler::strings;
-
-extern char introspection_xml[];
-
-namespace dbus {
-
-CREATE_LOGGERPTR_GLOBAL(logger_, "HMIMessageHandler")
-
-std::vector<std::string>& split(const std::string& s,
- char delim,
- std::vector<std::string>& elems) {
- std::stringstream ss(s);
- std::string item;
- while (std::getline(ss, item, delim)) {
- elems.push_back(item);
- }
- return elems;
-}
-
-DBusAdapter::DBusAdapter(const std::string& sdlServiceName,
- const std::string& sdlObjectPath,
- const std::string& hmiServiceName,
- const std::string& hmiObjectPath)
- : sdl_service_name_(sdlServiceName)
- , sdl_object_path_(sdlObjectPath)
- , hmi_service_name_(hmiServiceName)
- , hmi_object_path_(hmiObjectPath)
- , conn_(NULL)
- , schema_(new DBusSchema(ford_message_descriptions::message_descriptions)) {
-}
-
-DBusAdapter::~DBusAdapter() {
- dbus_shutdown();
- delete schema_;
-}
-
-bool DBusAdapter::Init() {
- DBusError err;
- int ret;
- dbus_error_init(&err);
- if (!dbus_threads_init_default()) {
- LOG4CXX_ERROR(logger_, "DBus: Can't initializes threads");
- return false;
- }
- conn_ = dbus_bus_get(DBUS_BUS_SESSION, &err);
- if (dbus_error_is_set(&err)) {
- LOG4CXX_ERROR(logger_, "DBus: Connection Error " << err.message);
- dbus_error_free(&err);
- return false;
- }
- ret = dbus_bus_request_name(
- conn_, sdl_service_name_.c_str(), DBUS_NAME_FLAG_DO_NOT_QUEUE, &err);
- if (ret == -1 || dbus_error_is_set(&err)) {
- LOG4CXX_ERROR(logger_, "DBus: Can't request name " << err.name);
- dbus_error_free(&err);
- return false;
- }
- if (DBUS_REQUEST_NAME_REPLY_PRIMARY_OWNER != ret) {
- LOG4CXX_ERROR(logger_,
- "DBus: Service '" << sdl_service_name_
- << "' is already running");
- return false;
- }
-
- LOG4CXX_INFO(logger_, "DBus: Success init dbus adaptor");
- return true;
-}
-
-bool DBusAdapter::Process(smart_objects::SmartObject& obj) {
- if (conn_ == NULL) {
- LOG4CXX_ERROR(logger_, "DBus: DBusAdaptor isn't initialized");
- return false;
- }
- DBusMessage* msg = dbus_connection_pop_message(conn_);
- if (msg != NULL) {
- switch (dbus_message_get_type(msg)) {
- case DBUS_MESSAGE_TYPE_METHOD_CALL:
- return ProcessMethodCall(msg, obj);
- case DBUS_MESSAGE_TYPE_METHOD_RETURN:
- return ProcessMethodReturn(msg, obj);
- case DBUS_MESSAGE_TYPE_ERROR:
- return ProcessError(msg, obj);
- case DBUS_MESSAGE_TYPE_SIGNAL:
- return ProcessSignal(msg, obj);
- default:
- return false;
- }
- } else {
- dbus_connection_read_write(conn_, 50);
- }
- return false;
-}
-
-void DBusAdapter::MethodReturn(uint id,
- const MessageId func_id,
- const MessageName& name,
- const smart_objects::SmartObject& obj) {
- LOG4CXX_DEBUG(logger_, "Method return " << name.first << "." << name.second);
- if (conn_ == NULL) {
- LOG4CXX_ERROR(logger_, "DBus: DBusAdaptor isn't init");
- return;
- }
-
- if (func_id == hmi_apis::FunctionID::INVALID_ENUM) {
- LOG4CXX_ERROR(logger_, "DBus: Invalid name method");
- return;
- }
-
- DBusMessage* msg = GetRequestFromHMI(id);
- if (!msg) {
- LOG4CXX_WARN(logger_, "DBus: request from HMI is not found");
- return;
- }
-
- DBusMessage* reply;
- reply = dbus_message_new_method_return(msg);
- if (NULL == reply) {
- LOG4CXX_WARN(logger_, "DBus: Failed call method (Message Null)");
- return;
- }
-
- const ListArgs& args =
- schema_->getListArgs(func_id, hmi_apis::messageType::response);
- if (!SetArguments(reply, args, obj)) {
- LOG4CXX_ERROR(logger_, "DBus: Failed call method (Signature is wrong)");
- dbus_message_unref(reply);
- dbus_message_unref(msg);
- return;
- }
-
- dbus_uint32_t serial;
- if (!dbus_connection_send(conn_, reply, &serial)) {
- LOG4CXX_ERROR(logger_, "DBus: Failed call method (Can't send message)");
- dbus_message_unref(reply);
- dbus_message_unref(msg);
- return;
- }
- dbus_connection_flush(conn_);
- dbus_message_unref(reply);
- dbus_message_unref(msg);
- LOG4CXX_INFO(logger_, "DBus: Success return method");
-}
-
-void DBusAdapter::Error(uint id,
- const std::string& name,
- const std::string& description) {
- LOG4CXX_DEBUG(logger_, "Error " << name << ": " << description);
- if (conn_ == NULL) {
- LOG4CXX_ERROR(logger_, "DBus: DBusAdaptor isn't init");
- return;
- }
-
- DBusMessage* msg = GetRequestFromHMI(id);
- if (!msg) {
- LOG4CXX_WARN(logger_, "DBus: request from HMI is not found");
- return;
- }
-
- DBusMessage* error;
- error = dbus_message_new_error(msg, name.c_str(), description.c_str());
- if (NULL == error) {
- LOG4CXX_WARN(logger_, "DBus: Failed call method (Message Null)");
- return;
- }
-
- dbus_uint32_t serial;
- if (!dbus_connection_send(conn_, error, &serial)) {
- LOG4CXX_ERROR(logger_, "DBus: Failed call method (Can't send message)");
- dbus_message_unref(error);
- dbus_message_unref(msg);
- return;
- }
- dbus_connection_flush(conn_);
- dbus_message_unref(error);
- dbus_message_unref(msg);
- LOG4CXX_INFO(logger_, "DBus: Success error");
-}
-
-void DBusAdapter::MethodCall(uint id,
- const MessageId func_id,
- const MessageName& name,
- const smart_objects::SmartObject& obj) {
- LOG4CXX_DEBUG(logger_, "Method call " << name.first << "." << name.second);
- if (conn_ == NULL) {
- LOG4CXX_ERROR(logger_, "DBus: DBusAdaptor isn't init");
- return;
- }
-
- if (func_id == hmi_apis::FunctionID::INVALID_ENUM) {
- LOG4CXX_ERROR(logger_, "DBus: Invalid name method");
- return;
- }
-
- DBusMessage* msg;
- msg = dbus_message_new_method_call(
- hmi_service_name_.c_str(),
- hmi_object_path_.c_str(),
- (hmi_service_name_ + "." + name.first).c_str(),
- name.second.c_str());
- if (NULL == msg) {
- LOG4CXX_WARN(logger_, "DBus: Failed call method (Message Null)");
- return;
- }
-
- const ListArgs& args =
- schema_->getListArgs(func_id, hmi_apis::messageType::request);
- if (!SetArguments(msg, args, obj)) {
- LOG4CXX_ERROR(logger_, "DBus: Failed call method (Signature is wrong)");
- dbus_message_unref(msg);
- return;
- }
-
- dbus_uint32_t serial;
- if (!dbus_connection_send(conn_, msg, &serial)) {
- LOG4CXX_ERROR(logger_, "DBus: Failed call method (Can't send message)");
- dbus_message_unref(msg);
- return;
- }
- SaveRequestToHMI(serial, std::make_pair(id, func_id));
- dbus_message_unref(msg);
- LOG4CXX_INFO(logger_, "DBus: Success call method");
-}
-
-void DBusAdapter::Signal(const MessageId func_id,
- const MessageName& name,
- const smart_objects::SmartObject& obj) {
- LOG4CXX_DEBUG(logger_, "Signal " << name.first << "." << name.second);
- if (conn_ == NULL) {
- LOG4CXX_ERROR(logger_, "DBus: DBusAdaptor isn't init");
- return;
- }
-
- if (func_id == hmi_apis::FunctionID::INVALID_ENUM) {
- LOG4CXX_ERROR(logger_, "DBus: Invalid name method");
- return;
- }
-
- DBusMessage* msg;
- msg = dbus_message_new_signal(sdl_object_path_.c_str(),
- (sdl_service_name_ + "." + name.first).c_str(),
- name.second.c_str());
- if (NULL == msg) {
- LOG4CXX_WARN(logger_, "DBus: Failed emit signal (Message Null)");
- return;
- }
-
- const ListArgs& args =
- schema_->getListArgs(func_id, hmi_apis::messageType::notification);
- if (!SetArguments(msg, args, obj)) {
- LOG4CXX_ERROR(logger_, "DBus: Failed call method (Signature is wrong)");
- dbus_message_unref(msg);
- return;
- }
-
- if (!dbus_connection_send(conn_, msg, NULL)) { // serial isn't required
- LOG4CXX_WARN(logger_, "DBus: Failed emit signal (Out Of Memory)");
- dbus_message_unref(msg);
- return;
- }
- dbus_message_unref(msg);
- LOG4CXX_INFO(logger_, "DBus: Success emit signal");
-}
-
-void DBusAdapter::AddMatch(const std::string& rule) {
- LOG4CXX_INFO(logger_, "Subscription: " << rule);
- dbus_bus_add_match(conn_, rule.c_str(), NULL);
-}
-
-bool DBusAdapter::ProcessMethodCall(DBusMessage* msg,
- smart_objects::SmartObject& obj) {
- std::string method = dbus_message_get_member(msg);
- std::string interface = dbus_message_get_interface(msg);
- LOG4CXX_INFO(logger_, "DBus: name of method " << interface << " " << method);
-
- if (interface == "org.freedesktop.DBus.Introspectable" &&
- method == "Introspect") {
- LOG4CXX_INFO(logger_, "DBus: INTROSPECT");
- Introspect(msg);
- return false;
- }
-
- std::vector<std::string> elems;
- split(interface, '.', elems);
- MessageName name(elems.back(), method);
- MessageId m_id = schema_->getMessageId(name);
- if (m_id == hmi_apis::FunctionID::INVALID_ENUM) {
- LOG4CXX_ERROR(logger_, "DBus: Invalid name method call from hmi");
- return false;
- }
-
- uint32_t serial = dbus_message_get_serial(msg);
- if (!serial) {
- LOG4CXX_ERROR(logger_, "DBus: Serial of request from HMI isn't defined");
- return false;
- }
-
- obj[sos::S_PARAMS][sos::S_CORRELATION_ID] = serial;
- obj[sos::S_PARAMS][sos::S_FUNCTION_ID] = m_id;
- obj[sos::S_PARAMS][sos::S_MESSAGE_TYPE] = hmi_apis::messageType::request;
- obj[sos::S_MSG_PARAMS] =
- smart_objects::SmartObject(smart_objects::SmartType_Map);
-
- const ListArgs args =
- schema_->getListArgs(name, hmi_apis::messageType::request);
-
- DBusMessageIter iter;
- dbus_message_iter_init(msg, &iter);
- if (GetArguments(&iter, args, obj[sos::S_MSG_PARAMS])) {
- SaveRequestFromHMI(serial, msg);
- return true;
- }
- return false;
-}
-
-bool DBusAdapter::ProcessMethodReturn(DBusMessage* msg,
- smart_objects::SmartObject& obj) {
- LOG4CXX_AUTO_TRACE(logger_);
- dbus_uint32_t reply_serial = dbus_message_get_reply_serial(msg);
- std::pair<uint, MessageId> ids = GetRequestToHMI(reply_serial);
- if (ids.second == hmi_apis::FunctionID::INVALID_ENUM) {
- LOG4CXX_ERROR(logger_, "DBus: Invalid name method");
- return false;
- }
-
- obj[sos::S_MSG_PARAMS] =
- smart_objects::SmartObject(smart_objects::SmartType_Map);
-
- ListArgs args =
- schema_->getListArgs(ids.second, hmi_apis::messageType::response);
- DBusMessageIter iter;
- dbus_message_iter_init(msg, &iter);
- int code = 0;
- std::string message;
- smart_objects::SmartObject description(smart_objects::SmartType_Map);
- bool ret = GetHeader(&iter, &code, &message) &&
- GetArguments(&iter, args, description);
-
- if (ret) {
- obj[sos::S_PARAMS][sos::S_CORRELATION_ID] = ids.first;
- obj[sos::S_PARAMS][sos::S_FUNCTION_ID] = ids.second;
- obj[sos::S_PARAMS][sos::S_MESSAGE_TYPE] = hmi_apis::messageType::response;
- obj[sos::S_PARAMS][sos::kCode] = code;
- obj[sos::S_PARAMS][sos::kMessage] = message;
- if (code != hmi_apis::Common_Result::SUCCESS) {
- MessageName name = schema_->getMessageName(ids.second);
- description["method"] = name.first + "." + name.second;
- obj[sos::S_PARAMS]["data"] = description;
- } else {
- obj[sos::S_MSG_PARAMS] = description;
- }
- }
-
- dbus_message_unref(msg);
- return ret;
-}
-
-bool DBusAdapter::ProcessError(DBusMessage* msg,
- smart_objects::SmartObject& obj) {
- dbus_uint32_t reply_serial = dbus_message_get_reply_serial(msg);
- std::pair<uint, MessageId> ids = GetRequestToHMI(reply_serial);
- if (ids.second == hmi_apis::FunctionID::INVALID_ENUM) {
- LOG4CXX_ERROR(logger_, "DBus: Invalid name method");
- return false;
- }
-
- const char* error_name;
- bool ret = false;
- if ((error_name = dbus_message_get_error_name(msg)) != NULL) {
- smart_objects::SmartObject name(smart_objects::SmartType_String);
- name = error_name;
- ford_message_descriptions::ParameterDescription rule = {
- "description", ford_message_descriptions::String, true};
- ListArgs args;
- args.push_back(&rule);
- smart_objects::SmartObject description(smart_objects::SmartType_Map);
- description[rule.name] =
- smart_objects::SmartObject(smart_objects::SmartType_String);
-
- DBusMessageIter iter;
- dbus_message_iter_init(msg, &iter);
- ret = GetArguments(&iter, args, description);
- MessageName method = schema_->getMessageName(ids.second);
-
- obj[sos::S_PARAMS][sos::S_CORRELATION_ID] = ids.first;
- obj[sos::S_PARAMS][sos::S_FUNCTION_ID] = ids.second;
- obj[sos::S_PARAMS][sos::S_MESSAGE_TYPE] =
- hmi_apis::messageType::error_response;
- obj[sos::S_PARAMS][sos::kCode] = name.asInt();
- obj[sos::S_PARAMS][sos::kMessage] = description[rule.name].asString();
- obj[sos::S_MSG_PARAMS] =
- smart_objects::SmartObject(smart_objects::SmartType_Map);
- obj[sos::S_PARAMS]["data"]["method"] = method.first + "." + method.second;
-
- LOG4CXX_WARN(logger_,
- "DBus: Call of method " << method.first << "." << method.second
- << " returned error " << name.asInt()
- << ": "
- << description[rule.name].asString());
- } else {
- LOG4CXX_ERROR(logger_, "DBus: Type message isn't error");
- }
-
- dbus_message_unref(msg);
- return ret;
-}
-
-bool DBusAdapter::ProcessSignal(DBusMessage* msg,
- smart_objects::SmartObject& obj) {
- std::string method = dbus_message_get_member(msg);
- std::string interface = dbus_message_get_interface(msg);
- LOG4CXX_INFO(logger_, "DBus: name of signal " << method);
-
- std::vector<std::string> elems;
- split(interface, '.', elems);
- MessageName name(elems.back(), method);
- MessageId m_id = schema_->getMessageId(name);
- if (m_id == hmi_apis::FunctionID::INVALID_ENUM) {
- LOG4CXX_ERROR(logger_, "DBus: Invalid name signal");
- return false;
- }
-
- obj[sos::S_PARAMS][sos::S_FUNCTION_ID] = m_id;
- obj[sos::S_PARAMS][sos::S_MESSAGE_TYPE] = hmi_apis::messageType::notification;
- obj[sos::S_MSG_PARAMS] =
- smart_objects::SmartObject(smart_objects::SmartType_Map);
-
- const ListArgs args =
- schema_->getListArgs(name, hmi_apis::messageType::notification);
-
- DBusMessageIter iter;
- dbus_message_iter_init(msg, &iter);
- bool ret = GetArguments(&iter, args, obj[sos::S_MSG_PARAMS]);
- dbus_message_unref(msg);
- return ret;
-}
-
-bool DBusAdapter::SetArguments(DBusMessage* msg,
- const ListArgs& rules,
- const smart_objects::SmartObject& args) {
- DBusMessageIter iter;
- dbus_message_iter_init_append(msg, &iter);
- size_t size = rules.size();
- for (size_t i = 0; i < size; ++i) {
- const smart_objects::SmartObject& param = args.getElement(rules[i]->name);
- if (!SetOneArgument(&iter, rules[i], param)) {
- return false;
- }
- }
- return true;
-}
-
-bool DBusAdapter::SetOneArgument(DBusMessageIter* iter,
- const ParameterDescription* rules,
- const smart_objects::SmartObject& param) {
- if (rules->obligatory) {
- if (param.isValid()) {
- return SetValue(iter, rules, param);
- } else {
- LOG4CXX_WARN(logger_,
- "DBus: Argument '" << rules->name << "' is obligatory!");
- return false;
- }
- } else {
- return SetOptionalValue(iter, rules, param);
- }
-}
-
-bool DBusAdapter::SetValue(
- DBusMessageIter* iter,
- const ford_message_descriptions::ParameterDescription* rules,
- const smart_objects::SmartObject& param) {
- // LOG4CXX_DEBUG(logger_, "DBus: Set param " << rules->name << " = " <<
- // param.asString());
- int type = 0;
- void* value = 0;
- dbus_int32_t integerValue = 0;
- double floatValue = 0;
- dbus_bool_t booleanValue = false;
- std::string stringValue;
- const char* cStringValue;
- switch (rules->type) {
- case ford_message_descriptions::ParameterType::Array:
- return SetArrayValue(
- iter,
- reinterpret_cast<const ford_message_descriptions::ArrayDescription*>(
- rules),
- param);
- break;
- case ford_message_descriptions::ParameterType::Struct:
- return SetStructValue(
- iter,
- reinterpret_cast<const ford_message_descriptions::StructDescription*>(
- rules),
- param);
- break;
- case ford_message_descriptions::ParameterType::Enum:
- case ford_message_descriptions::ParameterType::Integer:
- type = DBUS_TYPE_INT32;
- integerValue = param.asInt();
- value = &integerValue;
- break;
- case ford_message_descriptions::ParameterType::Float:
- type = DBUS_TYPE_DOUBLE;
- floatValue = param.asDouble();
- value = &floatValue;
- break;
- case ford_message_descriptions::ParameterType::Boolean:
- type = DBUS_TYPE_BOOLEAN;
- booleanValue = param.asBool();
- value = &booleanValue;
- break;
- case ford_message_descriptions::ParameterType::String:
- type = DBUS_TYPE_STRING;
- stringValue = param.asString();
- cStringValue = stringValue.c_str();
- value = &cStringValue;
- break;
- default:
- LOG4CXX_ERROR(logger_, "DBus: Unknown type of argument");
- return false;
- }
- return dbus_message_iter_append_basic(iter, type, value);
-}
-
-bool DBusAdapter::SetOptionalValue(
- DBusMessageIter* iter,
- const ford_message_descriptions::ParameterDescription* rules,
- const smart_objects::SmartObject& param) {
- DBusMessageIter sub_iter;
- if (!dbus_message_iter_open_container(
- iter, DBUS_TYPE_STRUCT, NULL, &sub_iter)) {
- LOG4CXX_ERROR(
- logger_,
- "DBus: Can't open container type (STRUCT) for optional parameter");
- return false;
- }
-
- ford_message_descriptions::ParameterDescription flagRules = {
- "flag", ford_message_descriptions::Boolean, true};
- smart_objects::SmartObject flag(param.getType() !=
- smart_objects::SmartType_Invalid);
- if (!SetValue(&sub_iter, &flagRules, flag) ||
- !SetValue(&sub_iter, rules, param)) {
- return false;
- }
-
- if (!dbus_message_iter_close_container(iter, &sub_iter)) {
- LOG4CXX_ERROR(
- logger_,
- "DBus: Can't close container type (STRUCT) for optional parameter");
- return false;
- }
- return true;
-}
-
-bool DBusAdapter::SetArrayValue(
- DBusMessageIter* iter,
- const ford_message_descriptions::ArrayDescription* rules,
- const smart_objects::SmartObject& param) {
- smart_objects::SmartType type = param.getType();
- if (type != smart_objects::SmartType_Array &&
- type != smart_objects::SmartType_Invalid) {
- LOG4CXX_ERROR(logger_, "DBus: SmartObject is not a map");
- return false;
- }
- DBusMessageIter sub_iter;
- if (!dbus_message_iter_open_container(
- iter, DBUS_TYPE_ARRAY, rules->element_dbus_signature, &sub_iter)) {
- LOG4CXX_ERROR(logger_, "DBus: Can't open container type (ARRAY)");
- return false;
- }
- size_t size = param.length();
- for (size_t i = 0; i < size; ++i) {
- if (!SetValue(&sub_iter, rules->element, param[i])) {
- return false;
- }
- }
- if (!dbus_message_iter_close_container(iter, &sub_iter)) {
- LOG4CXX_ERROR(logger_, "DBus: Can't close container type (ARRAY)");
- return false;
- }
- return true;
-}
-
-bool DBusAdapter::SetStructValue(
- DBusMessageIter* iter,
- const ford_message_descriptions::StructDescription* rules,
- const smart_objects::SmartObject& structure) {
- smart_objects::SmartType type = structure.getType();
- if (type != smart_objects::SmartType_Map &&
- type != smart_objects::SmartType_Invalid) {
- LOG4CXX_ERROR(logger_, "DBus: SmartObject is not a map");
- return false;
- }
- DBusMessageIter sub_iter;
- if (!dbus_message_iter_open_container(
- iter, DBUS_TYPE_STRUCT, NULL, &sub_iter)) {
- LOG4CXX_ERROR(logger_, "DBus: Can't open container type (STRUCT)");
- return false;
- }
- const ParameterDescription** entry;
- entry = rules->parameters;
- while (*entry != NULL) {
- const smart_objects::SmartObject& param =
- structure.getElement((*entry)->name);
- if (!SetOneArgument(&sub_iter, *entry, param)) {
- return false;
- }
- entry++;
- }
- if (!dbus_message_iter_close_container(iter, &sub_iter)) {
- LOG4CXX_ERROR(logger_, "DBus: Can't close container type (STRUCT)");
- return false;
- }
- return true;
-}
-
-bool DBusAdapter::GetHeader(DBusMessageIter* iter,
- int* code,
- std::string* message) {
- // Get code of response
- dbus_int32_t intValue;
- int type = dbus_message_iter_get_arg_type(iter);
- if (type != DBUS_TYPE_INT32) {
- LOG4CXX_ERROR(logger_, "DBus: Unknown format of header");
- return false;
- }
- dbus_message_iter_get_basic(iter, &intValue);
- *code = intValue;
- LOG4CXX_DEBUG(logger_, "DBus: Code of response " << *code);
-
- dbus_message_iter_next(iter);
-
- // Get message of response
- type = dbus_message_iter_get_arg_type(iter);
- if (type != DBUS_TYPE_STRING) {
- LOG4CXX_ERROR(logger_, "DBus: Unknown format of header");
- return false;
- }
- const char* stringValue;
- dbus_message_iter_get_basic(iter, &stringValue);
- *message = stringValue;
- LOG4CXX_DEBUG(logger_, "DBus: message of response " << *message);
-
- dbus_message_iter_next(iter);
- return true;
-}
-
-bool DBusAdapter::GetArguments(DBusMessageIter* iter,
- const ListArgs& rules,
- smart_objects::SmartObject& args) {
- LOG4CXX_AUTO_TRACE(logger_);
-
- size_t size = rules.size();
- for (size_t i = 0; i < size; ++i) {
- if (!GetOneArgument(iter, rules[i], args)) {
- return false;
- }
- dbus_message_iter_next(iter);
- }
- return true;
-}
-
-const DBusSchema& DBusAdapter::get_schema() const {
- return *schema_;
-}
-
-bool DBusAdapter::GetOneArgument(
- DBusMessageIter* iter,
- const ford_message_descriptions::ParameterDescription* rules,
- smart_objects::SmartObject& args) {
- if (rules->obligatory) {
- return GetValue(iter, rules, args[rules->name]);
- } else {
- return GetOptionalValue(iter, rules, args);
- }
-}
-
-bool DBusAdapter::GetValue(
- DBusMessageIter* iter,
- const ford_message_descriptions::ParameterDescription* rules,
- smart_objects::SmartObject& param) {
- LOG4CXX_DEBUG(logger_, "DBus: Get param " << rules->name);
- int type = dbus_message_iter_get_arg_type(iter);
- switch (rules->type) {
- case ford_message_descriptions::ParameterType::Array:
- if (type == DBUS_TYPE_ARRAY) {
- return GetArrayValue(
- iter,
- // FIXME (dchmerev@luxoft.com): not portable, danger cast.
- reinterpret_cast<
- const ford_message_descriptions::ArrayDescription*>(rules),
- param);
- } else {
- LOG4CXX_ERROR(logger_, "DBus: Not expected type of argument");
- return false;
- }
- break;
- case ford_message_descriptions::ParameterType::Struct:
- if (type == DBUS_TYPE_STRUCT) {
- return GetStructValue(
- iter,
- reinterpret_cast<
- const ford_message_descriptions::StructDescription*>(rules),
- param);
- } else {
- LOG4CXX_ERROR(logger_, "DBus: Not expected type of argument");
- return false;
- }
- break;
- case ford_message_descriptions::ParameterType::Enum:
- case ford_message_descriptions::ParameterType::Integer:
- if (type == DBUS_TYPE_INT32) {
- dbus_int32_t integerValue;
- dbus_message_iter_get_basic(iter, &integerValue);
- smart_objects::SmartObject value(integerValue);
- param = value;
- LOG4CXX_DEBUG(logger_,
- "DBus: " << rules->name << " = " << integerValue);
- } else {
- LOG4CXX_ERROR(logger_, "DBus: Not expected type of argument");
- return false;
- }
- break;
- case ford_message_descriptions::ParameterType::Float:
- if (type == DBUS_TYPE_DOUBLE) {
- double floatValue;
- dbus_message_iter_get_basic(iter, &floatValue);
- smart_objects::SmartObject value(floatValue);
- param = value;
- LOG4CXX_DEBUG(logger_, "DBus: " << rules->name << " = " << floatValue);
- } else {
- LOG4CXX_ERROR(logger_, "DBus: Not expected type of argument");
- return false;
- }
- break;
- case ford_message_descriptions::ParameterType::Boolean:
- if (type == DBUS_TYPE_BOOLEAN) {
- dbus_bool_t booleanValue;
- dbus_message_iter_get_basic(iter, &booleanValue);
- smart_objects::SmartObject value(static_cast<bool>(booleanValue));
- param = value;
- LOG4CXX_DEBUG(logger_,
- "DBus: " << rules->name << " = " << std::boolalpha
- << booleanValue);
- } else {
- LOG4CXX_ERROR(logger_, "DBus: Not expected type of argument");
- return false;
- }
- break;
- case ford_message_descriptions::ParameterType::String:
- if (type == DBUS_TYPE_STRING) {
- const char* stringValue;
- dbus_message_iter_get_basic(iter, &stringValue);
- std::string strValue = stringValue;
- smart_objects::SmartObject value(strValue);
- param = value;
- LOG4CXX_DEBUG(logger_,
- "DBus: " << rules->name << " = \"" << strValue << "\"");
- } else {
- LOG4CXX_ERROR(logger_, "DBus: Not expected type of argument");
- return false;
- }
- break;
- default:
- LOG4CXX_ERROR(logger_, "DBus: Unknown type of argument");
- return false;
- }
- return true;
-}
-
-bool DBusAdapter::GetArrayValue(
- DBusMessageIter* iter,
- const ford_message_descriptions::ArrayDescription* rules,
- smart_objects::SmartObject& param) {
- smart_objects::SmartObject array(smart_objects::SmartType_Array);
-
- int i = 0;
- DBusMessageIter sub_iter;
- dbus_message_iter_recurse(iter, &sub_iter);
- while (dbus_message_iter_get_arg_type(&sub_iter) != DBUS_TYPE_INVALID) {
- if (!GetValue(&sub_iter, rules->element, array[i])) {
- return false;
- }
- dbus_message_iter_next(&sub_iter);
- i++;
- }
- param = array;
- return true;
-}
-
-bool DBusAdapter::GetStructValue(
- DBusMessageIter* iter,
- const ford_message_descriptions::StructDescription* rules,
- smart_objects::SmartObject& param) {
- DBusMessageIter sub_iter;
- dbus_message_iter_recurse(iter, &sub_iter);
- const ParameterDescription** entry;
- entry = rules->parameters;
- smart_objects::SmartObject structure(smart_objects::SmartType_Map);
- while (*entry != NULL) {
- if (!GetOneArgument(&sub_iter, *entry, structure)) {
- return false;
- }
- dbus_message_iter_next(&sub_iter);
- entry++;
- }
- param = structure;
- return true;
-}
-
-bool DBusAdapter::GetOptionalValue(
- DBusMessageIter* iter,
- const ford_message_descriptions::ParameterDescription* rules,
- smart_objects::SmartObject& param) {
- int type = dbus_message_iter_get_arg_type(iter);
- if (type != DBUS_TYPE_STRUCT) {
- LOG4CXX_WARN(
- logger_,
- "DBus: Not expected type of argument. It is not optional parameter.");
- return false;
- }
-
- DBusMessageIter sub_iter;
- dbus_message_iter_recurse(iter, &sub_iter);
- ford_message_descriptions::ParameterDescription flagRules = {
- "flag", ford_message_descriptions::Boolean, true};
- smart_objects::SmartObject flag;
- if (!GetValue(&sub_iter, &flagRules, flag)) {
- return false;
- }
- if (flag.asBool()) {
- dbus_message_iter_next(&sub_iter);
- return GetValue(&sub_iter, rules, param[rules->name]);
- } else {
- return true;
- }
-}
-
-std::pair<uint, MessageId> DBusAdapter::GetRequestToHMI(uint32_t serial) {
- std::map<uint32_t, std::pair<uint, MessageId> >::iterator it;
- it = requests_to_hmi_.find(serial);
- if (it != requests_to_hmi_.end()) {
- std::pair<uint, MessageId> ids = it->second;
- requests_to_hmi_.erase(it);
- return ids;
- }
- return std::make_pair(0, hmi_apis::FunctionID::INVALID_ENUM);
-}
-
-void DBusAdapter::SaveRequestToHMI(uint32_t serial,
- const std::pair<uint, MessageId>& ids) {
- requests_to_hmi_.insert(std::make_pair(serial, ids));
-}
-
-void DBusAdapter::Introspect(DBusMessage* msg) {
- DBusMessage* reply;
-
- dbus_uint32_t serial = dbus_message_get_serial(msg);
- reply = dbus_message_new_method_return(msg);
- if (!reply) {
- LOG4CXX_WARN(logger_, "DBus: Failed return method for introspection");
- return;
- }
-
- DBusMessageIter iter;
- dbus_message_iter_init_append(reply, &iter);
- char* value = introspection_xml;
- dbus_message_iter_append_basic(&iter, DBUS_TYPE_STRING, &value);
- dbus_connection_send(conn_, reply, &serial);
- dbus_connection_flush(conn_);
- dbus_message_unref(reply);
- dbus_message_unref(msg);
-}
-
-void DBusAdapter::SaveRequestFromHMI(uint32_t serial, DBusMessage* request) {
- LOG4CXX_DEBUG(logger_, "Save correlation id (serial id) : " << serial);
- LOG4CXX_DEBUG(logger_, "D-Bus message: " << request);
- requests_from_hmi_.insert(std::make_pair(serial, request));
-}
-
-DBusMessage* DBusAdapter::GetRequestFromHMI(uint32_t serial) {
- LOG4CXX_DEBUG(logger_, "Get correlation id (serial id) : " << serial);
- std::map<uint32_t, DBusMessage*>::iterator it;
- it = requests_from_hmi_.find(serial);
- if (it != requests_from_hmi_.end()) {
- DBusMessage* msg = it->second;
- requests_from_hmi_.erase(it);
- LOG4CXX_DEBUG(logger_, "D-Bus message: " << msg);
- return msg;
- }
- return 0;
-}
-
-} // namespace dbus
diff --git a/src/components/dbus/src/dbus_message.cc b/src/components/dbus/src/dbus_message.cc
deleted file mode 100644
index b8a55896ce..0000000000
--- a/src/components/dbus/src/dbus_message.cc
+++ /dev/null
@@ -1,217 +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 "dbus/dbus_message.h"
-
-#include <algorithm>
-#include <cassert>
-
-#include <dbus/dbus.h>
-
-namespace dbus {
-
-MessageRefKeeper::MessageRefKeeper() : raw_message_(NULL) {}
-
-MessageRefKeeper::MessageRefKeeper(DBusMessage* message)
- : raw_message_(message) {
- assert(raw_message_);
- dbus_message_ref(raw_message_);
-}
-
-MessageRefKeeper::~MessageRefKeeper() {
- if (raw_message_) {
- dbus_message_unref(raw_message_);
- }
-}
-
-MessageRefKeeper::MessageRefKeeper(const MessageRefKeeper& other)
- : raw_message_(other.raw_message_) {
- assert(raw_message_);
- dbus_message_ref(raw_message_);
-}
-
-MessageRefKeeper& MessageRefKeeper::operator=(MessageRefKeeper other) {
- other.swap(*this);
- return *this;
-}
-
-DBusMessage* MessageRefKeeper::get() const {
- return raw_message_;
-}
-
-DBusMessage* MessageRefKeeper::Pass() {
- DBusMessage* message = raw_message_;
- raw_message_ = NULL;
- return message;
-}
-
-void MessageRefKeeper::swap(MessageRefKeeper& other) {
- std::swap(raw_message_, other.raw_message_);
-}
-
-MessageRef::MessageRef(DBusMessage* message) : raw_message_ref_(message) {}
-
-MessageRef::~MessageRef() {}
-
-std::string MessageRef::GetInterface() const {
- return dbus_message_get_interface(raw_message_ref_.get());
-}
-
-std::string MessageRef::GetMember() const {
- return dbus_message_get_member(raw_message_ref_.get());
-}
-
-// Message writer
-MessageReader::MessageReader(const MessageRef& message)
- : parent_reader_(NULL), failed_(false) {
- dbus_bool_t success =
- dbus_message_iter_init(message.raw_message_ref_.get(), &iterator_);
- if (!success) {
- MarkFailed();
- }
-}
-
-MessageReader::MessageReader(MessageReader* reader,
- DataType container_data_type)
- : parent_reader_(reader), failed_(reader->has_failed()) {
- assert(parent_reader_);
- if (!failed_) {
- if (reader->NextValueType() != container_data_type) {
- MarkFailed();
- } else {
- dbus_message_iter_recurse(&reader->iterator_, &iterator_);
- reader->MoveToNext();
- }
- }
-}
-
-bool MessageReader::NextIsDictEntry() const {
- return NextValueType() == DBUS_TYPE_DICT_ENTRY;
-}
-
-MessageReader MessageReader::TakeArrayReader() {
- return MessageReader(this, DBUS_TYPE_ARRAY);
-}
-
-MessageReader MessageReader::TakeStructReader() {
- return MessageReader(this, DBUS_TYPE_STRUCT);
-}
-
-MessageReader MessageReader::TakeDictEntryReader() {
- return MessageReader(this, DBUS_TYPE_DICT_ENTRY);
-}
-
-void MessageReader::MoveToNext() {
- if (!HasNext()) {
- MarkFailed();
- }
- dbus_message_iter_next(&iterator_);
-}
-
-void MessageReader::MarkFailed() {
- if (!failed_) {
- failed_ = true;
- if (parent_reader_) {
- parent_reader_->MarkFailed();
- }
- }
-}
-
-void MessageReader::ReadNextValue(MessageReader::DataType type, void* value) {
- assert(value);
- if (NextValueType() != type) {
- MarkFailed();
- } else if (!failed_) {
- dbus_message_iter_get_basic(&iterator_, value);
- MoveToNext();
- }
-}
-
-// DbusMessageWriter
-MessageWriter::MessageWriter(const MessageRef& message)
- : has_opened_subcontainer_(false), parent_writer_(NULL) {
- dbus_message_iter_init_append(message.raw_message_ref_.get(), &iterator_);
-}
-
-MessageWriter::MessageWriter(MessageWriter* parent,
- ContainerType container_type,
- const char* array_signature)
- : has_opened_subcontainer_(false), parent_writer_(parent) {
- assert(parent_writer_);
- // Only array writers require array_signature
- assert((container_type == kArray && array_signature != NULL) ||
- (container_type != kArray && array_signature == NULL));
- assert(!parent_writer_->has_opened_subcontainer_);
- bool enough_memory = dbus_message_iter_open_container(
- &parent_writer_->iterator_, container_type, array_signature, &iterator_);
- assert(enough_memory);
- parent_writer_->has_opened_subcontainer_ = true;
-}
-
-MessageWriter::~MessageWriter() {
- assert(!has_opened_subcontainer_);
- if (parent_writer_ != NULL) {
- CloseWriter();
- }
-}
-
-void MessageWriter::WriteAndCheck(MessageWriter::DataType value_type,
- const void* value) {
- assert(!has_opened_subcontainer_);
- dbus_bool_t enough_memory =
- dbus_message_iter_append_basic(&iterator_, value_type, value);
- assert(enough_memory);
-}
-
-void MessageWriter::CloseWriter() {
- assert(parent_writer_);
- assert(parent_writer_->has_opened_subcontainer_);
- dbus_bool_t enough_memory =
- dbus_message_iter_close_container(&parent_writer_->iterator_, &iterator_);
- assert(enough_memory);
- parent_writer_->has_opened_subcontainer_ = false;
-}
-
-// Construction functions
-
-MessageRef MethodCall(const char* bus_name,
- const char* path,
- const char* interface,
- const char* method) {
- return MessageRef(
- dbus_message_new_method_call(bus_name, path, interface, method));
-}
-
-MessageRef Signal(const char* path, const char* interface, const char* name) {
- return MessageRef(dbus_message_new_signal(path, interface, name));
-}
-
-} // namespace dbus
diff --git a/src/components/dbus/src/dbus_message_controller.cc b/src/components/dbus/src/dbus_message_controller.cc
deleted file mode 100644
index 59f08d6695..0000000000
--- a/src/components/dbus/src/dbus_message_controller.cc
+++ /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.
- */
-
-#include "dbus/dbus_message_controller.h"
-#include "formatters/CSmartFactory.h"
-
-namespace sos = NsSmartDeviceLink::NsJSONHandler::strings;
-
-namespace dbus {
-
-DBusMessageController::DBusMessageController(const std::string& sdlServiceName,
- const std::string& sdlObjectPath,
- const std::string& hmiServiceName,
- const std::string& hmiObjectPath)
- : DBusAdapter(sdlServiceName, sdlObjectPath, hmiServiceName, hmiObjectPath)
- , shutdown_(false) {}
-
-void DBusMessageController::SubscribeTo(const std::string& interface,
- const std::string& signal) {
- std::string rule = "type='signal'";
- rule.append(", sender='")
- .append(hmi_service_name_)
- .append("'")
- .append(", path='")
- .append(hmi_object_path_)
- .append("'")
- .append(", interface='")
- .append(hmi_service_name_)
- .append(".")
- .append(interface)
- .append("'")
- .append(", member='")
- .append(signal)
- .append("'");
- DBusAdapter::AddMatch(rule);
-}
-
-DBusMessageController::~DBusMessageController() {}
-
-void* DBusMessageController::MethodForReceiverThread(void*) {
- Run();
- return NULL;
-}
-
-bool DBusMessageController::Run() {
- while (!shutdown_) {
- smart_objects::SmartObject obj(smart_objects::SmartType_Map);
- obj[sos::S_PARAMS][sos::S_PROTOCOL_VERSION] = 2;
- obj[sos::S_PARAMS][sos::S_PROTOCOL_TYPE] = 1;
- if (DBusAdapter::Process(obj)) {
- SendMessageToCore(obj);
- }
- }
- return true;
-}
-
-void DBusMessageController::Shutdown() {
- shutdown_ = true;
-}
-
-} // namespace dbus
diff --git a/src/components/dbus/src/introspection_xml.cc b/src/components/dbus/src/introspection_xml.cc
deleted file mode 100644
index 210c232a4d..0000000000
--- a/src/components/dbus/src/introspection_xml.cc
+++ /dev/null
@@ -1,327 +0,0 @@
-// Warning! This file is generated by 'make_introspection_c.py'. Edit at your
-// own risk.
-/**
- * @file instrospections_xml.cc
- * @brief D-Bus introspection XML as C-string
- *
- * This file is a part of HMI D-Bus layer.
- */
-// Copyright (c) 2013, Ford Motor Company
-// All rights reserved.
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are met:
-//
-// Redistributions of source code must retain the above copyright notice, this
-// list of conditions and the following disclaimer.
-//
-// Redistributions in binary form must reproduce the above copyright notice,
-// this list of conditions and the following
-// disclaimer in the documentation and/or other materials provided with the
-// distribution.
-//
-// Neither the name of the Ford Motor Company nor the names of its contributors
-// may be used to endorse or promote products derived from this software
-// without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
-// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 'A PARTICULAR PURPOSE
-// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
-// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
-// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
-// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
-// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
-// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-// POSSIBILITY OF SUCH DAMAGE.
-
-char introspection_xml[] = {
- 0x3c, 0x21, 0x44, 0x4f, 0x43, 0x54, 0x59, 0x50, 0x45, 0x20, 0x6e, 0x6f,
- 0x64, 0x65, 0x20, 0x50, 0x55, 0x42, 0x4c, 0x49, 0x43, 0x20, 0x22, 0x2d,
- 0x2f, 0x2f, 0x66, 0x72, 0x65, 0x65, 0x64, 0x65, 0x73, 0x6b, 0x74, 0x6f,
- 0x70, 0x2f, 0x2f, 0x44, 0x54, 0x44, 0x20, 0x44, 0x2d, 0x42, 0x55, 0x53,
- 0x20, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x20, 0x49, 0x6e, 0x74, 0x72,
- 0x6f, 0x73, 0x70, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x31, 0x2e,
- 0x30, 0x2f, 0x2f, 0x45, 0x4e, 0x22, 0x20, 0x22, 0x68, 0x74, 0x74, 0x70,
- 0x3a, 0x2f, 0x2f, 0x77, 0x77, 0x77, 0x2e, 0x66, 0x72, 0x65, 0x65, 0x64,
- 0x65, 0x73, 0x6b, 0x74, 0x6f, 0x70, 0x2e, 0x6f, 0x72, 0x67, 0x2f, 0x73,
- 0x74, 0x61, 0x6e, 0x64, 0x61, 0x72, 0x64, 0x73, 0x2f, 0x64, 0x62, 0x75,
- 0x73, 0x2f, 0x31, 0x2e, 0x30, 0x2f, 0x69, 0x6e, 0x74, 0x72, 0x6f, 0x73,
- 0x70, 0x65, 0x63, 0x74, 0x2e, 0x64, 0x74, 0x64, 0x22, 0x3e, 0x0a, 0x3c,
- 0x6e, 0x6f, 0x64, 0x65, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x22, 0x2f,
- 0x63, 0x6f, 0x6d, 0x2f, 0x66, 0x6f, 0x72, 0x64, 0x2f, 0x68, 0x6d, 0x69,
- 0x22, 0x3e, 0x3c, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x66, 0x61, 0x63, 0x65,
- 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x22, 0x63, 0x6f, 0x6d, 0x2e, 0x66,
- 0x6f, 0x72, 0x64, 0x2e, 0x68, 0x6d, 0x69, 0x2e, 0x73, 0x64, 0x6c, 0x2e,
- 0x42, 0x61, 0x73, 0x69, 0x63, 0x43, 0x6f, 0x6d, 0x6d, 0x75, 0x6e, 0x69,
- 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x3e, 0x3c, 0x73, 0x69, 0x67,
- 0x6e, 0x61, 0x6c, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x22, 0x4f, 0x6e,
- 0x52, 0x65, 0x73, 0x75, 0x6d, 0x65, 0x41, 0x75, 0x64, 0x69, 0x6f, 0x53,
- 0x6f, 0x75, 0x72, 0x63, 0x65, 0x22, 0x3e, 0x3c, 0x61, 0x72, 0x67, 0x20,
- 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x22, 0x61, 0x70, 0x70, 0x49, 0x44, 0x22,
- 0x20, 0x74, 0x79, 0x70, 0x65, 0x3d, 0x22, 0x69, 0x22, 0x20, 0x2f, 0x3e,
- 0x3c, 0x2f, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x3e, 0x3c, 0x73, 0x69,
- 0x67, 0x6e, 0x61, 0x6c, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x22, 0x4f,
- 0x6e, 0x53, 0x44, 0x4c, 0x50, 0x65, 0x72, 0x73, 0x69, 0x73, 0x74, 0x65,
- 0x6e, 0x63, 0x65, 0x43, 0x6f, 0x6d, 0x70, 0x6c, 0x65, 0x74, 0x65, 0x22,
- 0x20, 0x2f, 0x3e, 0x3c, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x20, 0x6e,
- 0x61, 0x6d, 0x65, 0x3d, 0x22, 0x4f, 0x6e, 0x46, 0x69, 0x6c, 0x65, 0x52,
- 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x64, 0x22, 0x3e, 0x3c, 0x61, 0x72, 0x67,
- 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x22, 0x66, 0x69, 0x6c, 0x65, 0x4e,
- 0x61, 0x6d, 0x65, 0x22, 0x20, 0x74, 0x79, 0x70, 0x65, 0x3d, 0x22, 0x73,
- 0x22, 0x20, 0x2f, 0x3e, 0x3c, 0x61, 0x72, 0x67, 0x20, 0x6e, 0x61, 0x6d,
- 0x65, 0x3d, 0x22, 0x66, 0x69, 0x6c, 0x65, 0x54, 0x79, 0x70, 0x65, 0x22,
- 0x20, 0x74, 0x79, 0x70, 0x65, 0x3d, 0x22, 0x69, 0x22, 0x20, 0x2f, 0x3e,
- 0x3c, 0x61, 0x72, 0x67, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x22, 0x61,
- 0x70, 0x70, 0x49, 0x44, 0x22, 0x20, 0x74, 0x79, 0x70, 0x65, 0x3d, 0x22,
- 0x69, 0x22, 0x20, 0x2f, 0x3e, 0x3c, 0x2f, 0x73, 0x69, 0x67, 0x6e, 0x61,
- 0x6c, 0x3e, 0x3c, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x20, 0x6e, 0x61,
- 0x6d, 0x65, 0x3d, 0x22, 0x4f, 0x6e, 0x41, 0x70, 0x70, 0x52, 0x65, 0x67,
- 0x69, 0x73, 0x74, 0x65, 0x72, 0x65, 0x64, 0x22, 0x3e, 0x3c, 0x61, 0x72,
- 0x67, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x22, 0x61, 0x70, 0x70, 0x6c,
- 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x20, 0x74, 0x79, 0x70,
- 0x65, 0x3d, 0x22, 0x28, 0x73, 0x28, 0x62, 0x73, 0x29, 0x28, 0x62, 0x73,
- 0x29, 0x28, 0x73, 0x73, 0x28, 0x62, 0x69, 0x29, 0x28, 0x62, 0x62, 0x29,
- 0x29, 0x73, 0x28, 0x62, 0x61, 0x28, 0x73, 0x69, 0x29, 0x29, 0x28, 0x62,
- 0x61, 0x73, 0x29, 0x69, 0x69, 0x62, 0x28, 0x62, 0x61, 0x69, 0x29, 0x28,
- 0x62, 0x62, 0x29, 0x28, 0x62, 0x61, 0x69, 0x29, 0x29, 0x22, 0x20, 0x2f,
- 0x3e, 0x3c, 0x61, 0x72, 0x67, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x22,
- 0x74, 0x74, 0x73, 0x4e, 0x61, 0x6d, 0x65, 0x22, 0x20, 0x74, 0x79, 0x70,
- 0x65, 0x3d, 0x22, 0x28, 0x62, 0x61, 0x28, 0x73, 0x69, 0x29, 0x29, 0x22,
- 0x20, 0x2f, 0x3e, 0x3c, 0x61, 0x72, 0x67, 0x20, 0x6e, 0x61, 0x6d, 0x65,
- 0x3d, 0x22, 0x76, 0x72, 0x53, 0x79, 0x6e, 0x6f, 0x6e, 0x79, 0x6d, 0x73,
- 0x22, 0x20, 0x74, 0x79, 0x70, 0x65, 0x3d, 0x22, 0x28, 0x62, 0x61, 0x73,
- 0x29, 0x22, 0x20, 0x2f, 0x3e, 0x3c, 0x61, 0x72, 0x67, 0x20, 0x6e, 0x61,
- 0x6d, 0x65, 0x3d, 0x22, 0x72, 0x65, 0x73, 0x75, 0x6d, 0x65, 0x56, 0x72,
- 0x47, 0x72, 0x61, 0x6d, 0x6d, 0x61, 0x72, 0x73, 0x22, 0x20, 0x74, 0x79,
- 0x70, 0x65, 0x3d, 0x22, 0x28, 0x62, 0x62, 0x29, 0x22, 0x20, 0x2f, 0x3e,
- 0x3c, 0x61, 0x72, 0x67, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x22, 0x70,
- 0x72, 0x69, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x22, 0x20, 0x74, 0x79, 0x70,
- 0x65, 0x3d, 0x22, 0x28, 0x62, 0x69, 0x29, 0x22, 0x20, 0x2f, 0x3e, 0x3c,
- 0x2f, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x3e, 0x3c, 0x73, 0x69, 0x67,
- 0x6e, 0x61, 0x6c, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x22, 0x4f, 0x6e,
- 0x41, 0x70, 0x70, 0x55, 0x6e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65,
- 0x72, 0x65, 0x64, 0x22, 0x3e, 0x3c, 0x61, 0x72, 0x67, 0x20, 0x6e, 0x61,
- 0x6d, 0x65, 0x3d, 0x22, 0x75, 0x6e, 0x65, 0x78, 0x70, 0x65, 0x63, 0x74,
- 0x65, 0x64, 0x44, 0x69, 0x73, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74,
- 0x22, 0x20, 0x74, 0x79, 0x70, 0x65, 0x3d, 0x22, 0x62, 0x22, 0x20, 0x2f,
- 0x3e, 0x3c, 0x61, 0x72, 0x67, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x22,
- 0x61, 0x70, 0x70, 0x49, 0x44, 0x22, 0x20, 0x74, 0x79, 0x70, 0x65, 0x3d,
- 0x22, 0x69, 0x22, 0x20, 0x2f, 0x3e, 0x3c, 0x2f, 0x73, 0x69, 0x67, 0x6e,
- 0x61, 0x6c, 0x3e, 0x3c, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x20, 0x6e,
- 0x61, 0x6d, 0x65, 0x3d, 0x22, 0x50, 0x6c, 0x61, 0x79, 0x54, 0x6f, 0x6e,
- 0x65, 0x22, 0x3e, 0x3c, 0x61, 0x72, 0x67, 0x20, 0x6e, 0x61, 0x6d, 0x65,
- 0x3d, 0x22, 0x61, 0x70, 0x70, 0x49, 0x44, 0x22, 0x20, 0x74, 0x79, 0x70,
- 0x65, 0x3d, 0x22, 0x69, 0x22, 0x20, 0x2f, 0x3e, 0x3c, 0x61, 0x72, 0x67,
- 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x22, 0x6d, 0x65, 0x74, 0x68, 0x6f,
- 0x64, 0x4e, 0x61, 0x6d, 0x65, 0x22, 0x20, 0x74, 0x79, 0x70, 0x65, 0x3d,
- 0x22, 0x69, 0x22, 0x20, 0x2f, 0x3e, 0x3c, 0x2f, 0x73, 0x69, 0x67, 0x6e,
- 0x61, 0x6c, 0x3e, 0x3c, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x20, 0x6e,
- 0x61, 0x6d, 0x65, 0x3d, 0x22, 0x4f, 0x6e, 0x53, 0x44, 0x4c, 0x43, 0x6c,
- 0x6f, 0x73, 0x65, 0x22, 0x20, 0x2f, 0x3e, 0x3c, 0x73, 0x69, 0x67, 0x6e,
- 0x61, 0x6c, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x22, 0x4f, 0x6e, 0x50,
- 0x75, 0x74, 0x46, 0x69, 0x6c, 0x65, 0x22, 0x3e, 0x3c, 0x61, 0x72, 0x67,
- 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x22, 0x6f, 0x66, 0x66, 0x73, 0x65,
- 0x74, 0x22, 0x20, 0x74, 0x79, 0x70, 0x65, 0x3d, 0x22, 0x28, 0x62, 0x69,
- 0x29, 0x22, 0x20, 0x2f, 0x3e, 0x3c, 0x61, 0x72, 0x67, 0x20, 0x6e, 0x61,
- 0x6d, 0x65, 0x3d, 0x22, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x22, 0x20,
- 0x74, 0x79, 0x70, 0x65, 0x3d, 0x22, 0x28, 0x62, 0x69, 0x29, 0x22, 0x20,
- 0x2f, 0x3e, 0x3c, 0x61, 0x72, 0x67, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x3d,
- 0x22, 0x66, 0x69, 0x6c, 0x65, 0x53, 0x69, 0x7a, 0x65, 0x22, 0x20, 0x74,
- 0x79, 0x70, 0x65, 0x3d, 0x22, 0x28, 0x62, 0x69, 0x29, 0x22, 0x20, 0x2f,
- 0x3e, 0x3c, 0x61, 0x72, 0x67, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x22,
- 0x46, 0x69, 0x6c, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x22, 0x20, 0x74, 0x79,
- 0x70, 0x65, 0x3d, 0x22, 0x73, 0x22, 0x20, 0x2f, 0x3e, 0x3c, 0x61, 0x72,
- 0x67, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x22, 0x73, 0x79, 0x6e, 0x63,
- 0x46, 0x69, 0x6c, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x22, 0x20, 0x74, 0x79,
- 0x70, 0x65, 0x3d, 0x22, 0x73, 0x22, 0x20, 0x2f, 0x3e, 0x3c, 0x61, 0x72,
- 0x67, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x22, 0x66, 0x69, 0x6c, 0x65,
- 0x54, 0x79, 0x70, 0x65, 0x22, 0x20, 0x74, 0x79, 0x70, 0x65, 0x3d, 0x22,
- 0x69, 0x22, 0x20, 0x2f, 0x3e, 0x3c, 0x61, 0x72, 0x67, 0x20, 0x6e, 0x61,
- 0x6d, 0x65, 0x3d, 0x22, 0x70, 0x65, 0x72, 0x73, 0x69, 0x73, 0x74, 0x65,
- 0x6e, 0x74, 0x46, 0x69, 0x6c, 0x65, 0x22, 0x20, 0x74, 0x79, 0x70, 0x65,
- 0x3d, 0x22, 0x28, 0x62, 0x62, 0x29, 0x22, 0x20, 0x2f, 0x3e, 0x3c, 0x2f,
- 0x73, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x3e, 0x3c, 0x2f, 0x69, 0x6e, 0x74,
- 0x65, 0x72, 0x66, 0x61, 0x63, 0x65, 0x3e, 0x3c, 0x69, 0x6e, 0x74, 0x65,
- 0x72, 0x66, 0x61, 0x63, 0x65, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x22,
- 0x63, 0x6f, 0x6d, 0x2e, 0x66, 0x6f, 0x72, 0x64, 0x2e, 0x68, 0x6d, 0x69,
- 0x2e, 0x73, 0x64, 0x6c, 0x2e, 0x55, 0x49, 0x22, 0x3e, 0x3c, 0x73, 0x69,
- 0x67, 0x6e, 0x61, 0x6c, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x22, 0x4f,
- 0x6e, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x53, 0x74, 0x61, 0x72, 0x74,
- 0x22, 0x3e, 0x3c, 0x61, 0x72, 0x67, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x3d,
- 0x22, 0x61, 0x70, 0x70, 0x49, 0x44, 0x22, 0x20, 0x74, 0x79, 0x70, 0x65,
- 0x3d, 0x22, 0x69, 0x22, 0x20, 0x2f, 0x3e, 0x3c, 0x2f, 0x73, 0x69, 0x67,
- 0x6e, 0x61, 0x6c, 0x3e, 0x3c, 0x2f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x66,
- 0x61, 0x63, 0x65, 0x3e, 0x3c, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x66, 0x61,
- 0x63, 0x65, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x22, 0x63, 0x6f, 0x6d,
- 0x2e, 0x66, 0x6f, 0x72, 0x64, 0x2e, 0x68, 0x6d, 0x69, 0x2e, 0x73, 0x64,
- 0x6c, 0x2e, 0x53, 0x44, 0x4c, 0x22, 0x3e, 0x3c, 0x6d, 0x65, 0x74, 0x68,
- 0x6f, 0x64, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x22, 0x41, 0x63, 0x74,
- 0x69, 0x76, 0x61, 0x74, 0x65, 0x41, 0x70, 0x70, 0x22, 0x3e, 0x3c, 0x61,
- 0x72, 0x67, 0x20, 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e,
- 0x3d, 0x22, 0x69, 0x6e, 0x22, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x22,
- 0x61, 0x70, 0x70, 0x49, 0x44, 0x22, 0x20, 0x74, 0x79, 0x70, 0x65, 0x3d,
- 0x22, 0x69, 0x22, 0x20, 0x2f, 0x3e, 0x3c, 0x61, 0x72, 0x67, 0x20, 0x64,
- 0x69, 0x72, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x3d, 0x22, 0x6f, 0x75,
- 0x74, 0x22, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x22, 0x72, 0x65, 0x74,
- 0x43, 0x6f, 0x64, 0x65, 0x22, 0x20, 0x74, 0x79, 0x70, 0x65, 0x3d, 0x22,
- 0x69, 0x22, 0x20, 0x2f, 0x3e, 0x3c, 0x61, 0x72, 0x67, 0x20, 0x64, 0x69,
- 0x72, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x3d, 0x22, 0x6f, 0x75, 0x74,
- 0x22, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x22, 0x69, 0x73, 0x53, 0x44,
- 0x4c, 0x41, 0x6c, 0x6c, 0x6f, 0x77, 0x65, 0x64, 0x22, 0x20, 0x74, 0x79,
- 0x70, 0x65, 0x3d, 0x22, 0x62, 0x22, 0x20, 0x2f, 0x3e, 0x3c, 0x61, 0x72,
- 0x67, 0x20, 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x3d,
- 0x22, 0x6f, 0x75, 0x74, 0x22, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x22,
- 0x64, 0x65, 0x76, 0x69, 0x63, 0x65, 0x22, 0x20, 0x74, 0x79, 0x70, 0x65,
- 0x3d, 0x22, 0x28, 0x62, 0x28, 0x73, 0x73, 0x28, 0x62, 0x69, 0x29, 0x28,
- 0x62, 0x62, 0x29, 0x29, 0x29, 0x22, 0x20, 0x2f, 0x3e, 0x3c, 0x61, 0x72,
- 0x67, 0x20, 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x3d,
- 0x22, 0x6f, 0x75, 0x74, 0x22, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x22,
- 0x69, 0x73, 0x50, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e,
- 0x73, 0x43, 0x6f, 0x6e, 0x73, 0x65, 0x6e, 0x74, 0x4e, 0x65, 0x65, 0x64,
- 0x65, 0x64, 0x22, 0x20, 0x74, 0x79, 0x70, 0x65, 0x3d, 0x22, 0x62, 0x22,
- 0x20, 0x2f, 0x3e, 0x3c, 0x61, 0x72, 0x67, 0x20, 0x64, 0x69, 0x72, 0x65,
- 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x3d, 0x22, 0x6f, 0x75, 0x74, 0x22, 0x20,
- 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x22, 0x69, 0x73, 0x41, 0x70, 0x70, 0x50,
- 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65,
- 0x76, 0x6f, 0x6b, 0x65, 0x64, 0x22, 0x20, 0x74, 0x79, 0x70, 0x65, 0x3d,
- 0x22, 0x62, 0x22, 0x20, 0x2f, 0x3e, 0x3c, 0x61, 0x72, 0x67, 0x20, 0x64,
- 0x69, 0x72, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x3d, 0x22, 0x6f, 0x75,
- 0x74, 0x22, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x22, 0x61, 0x70, 0x70,
- 0x52, 0x65, 0x76, 0x6f, 0x6b, 0x65, 0x64, 0x50, 0x65, 0x72, 0x6d, 0x69,
- 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0x20, 0x74, 0x79, 0x70, 0x65,
- 0x3d, 0x22, 0x28, 0x62, 0x61, 0x28, 0x73, 0x69, 0x28, 0x62, 0x62, 0x29,
- 0x29, 0x29, 0x22, 0x20, 0x2f, 0x3e, 0x3c, 0x61, 0x72, 0x67, 0x20, 0x64,
- 0x69, 0x72, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x3d, 0x22, 0x6f, 0x75,
- 0x74, 0x22, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x22, 0x69, 0x73, 0x41,
- 0x70, 0x70, 0x52, 0x65, 0x76, 0x6f, 0x6b, 0x65, 0x64, 0x22, 0x20, 0x74,
- 0x79, 0x70, 0x65, 0x3d, 0x22, 0x62, 0x22, 0x20, 0x2f, 0x3e, 0x3c, 0x61,
- 0x72, 0x67, 0x20, 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e,
- 0x3d, 0x22, 0x6f, 0x75, 0x74, 0x22, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x3d,
- 0x22, 0x70, 0x72, 0x69, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x22, 0x20, 0x74,
- 0x79, 0x70, 0x65, 0x3d, 0x22, 0x28, 0x62, 0x69, 0x29, 0x22, 0x20, 0x2f,
- 0x3e, 0x3c, 0x2f, 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x3e, 0x3c, 0x6d,
- 0x65, 0x74, 0x68, 0x6f, 0x64, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x22,
- 0x47, 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, 0x46, 0x72, 0x69, 0x65, 0x6e,
- 0x64, 0x6c, 0x79, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x22, 0x3e,
- 0x3c, 0x61, 0x72, 0x67, 0x20, 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 0x69,
- 0x6f, 0x6e, 0x3d, 0x22, 0x69, 0x6e, 0x22, 0x20, 0x6e, 0x61, 0x6d, 0x65,
- 0x3d, 0x22, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x43, 0x6f, 0x64,
- 0x65, 0x73, 0x22, 0x20, 0x74, 0x79, 0x70, 0x65, 0x3d, 0x22, 0x61, 0x73,
- 0x22, 0x20, 0x2f, 0x3e, 0x3c, 0x61, 0x72, 0x67, 0x20, 0x64, 0x69, 0x72,
- 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x3d, 0x22, 0x69, 0x6e, 0x22, 0x20,
- 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x22, 0x6c, 0x61, 0x6e, 0x67, 0x75, 0x61,
- 0x67, 0x65, 0x22, 0x20, 0x74, 0x79, 0x70, 0x65, 0x3d, 0x22, 0x28, 0x62,
- 0x69, 0x29, 0x22, 0x20, 0x2f, 0x3e, 0x3c, 0x61, 0x72, 0x67, 0x20, 0x64,
- 0x69, 0x72, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x3d, 0x22, 0x6f, 0x75,
- 0x74, 0x22, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x22, 0x72, 0x65, 0x74,
- 0x43, 0x6f, 0x64, 0x65, 0x22, 0x20, 0x74, 0x79, 0x70, 0x65, 0x3d, 0x22,
- 0x69, 0x22, 0x20, 0x2f, 0x3e, 0x3c, 0x61, 0x72, 0x67, 0x20, 0x64, 0x69,
- 0x72, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x3d, 0x22, 0x6f, 0x75, 0x74,
- 0x22, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x22, 0x6d, 0x65, 0x73, 0x73,
- 0x61, 0x67, 0x65, 0x73, 0x22, 0x20, 0x74, 0x79, 0x70, 0x65, 0x3d, 0x22,
- 0x28, 0x62, 0x61, 0x28, 0x73, 0x28, 0x62, 0x73, 0x29, 0x28, 0x62, 0x73,
- 0x29, 0x28, 0x62, 0x73, 0x29, 0x28, 0x62, 0x73, 0x29, 0x28, 0x62, 0x73,
- 0x29, 0x29, 0x29, 0x22, 0x20, 0x2f, 0x3e, 0x3c, 0x2f, 0x6d, 0x65, 0x74,
- 0x68, 0x6f, 0x64, 0x3e, 0x3c, 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x20,
- 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x22, 0x47, 0x65, 0x74, 0x4c, 0x69, 0x73,
- 0x74, 0x4f, 0x66, 0x50, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f,
- 0x6e, 0x73, 0x22, 0x3e, 0x3c, 0x61, 0x72, 0x67, 0x20, 0x64, 0x69, 0x72,
- 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x3d, 0x22, 0x69, 0x6e, 0x22, 0x20,
- 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x22, 0x61, 0x70, 0x70, 0x49, 0x44, 0x22,
- 0x20, 0x74, 0x79, 0x70, 0x65, 0x3d, 0x22, 0x28, 0x62, 0x69, 0x29, 0x22,
- 0x20, 0x2f, 0x3e, 0x3c, 0x61, 0x72, 0x67, 0x20, 0x64, 0x69, 0x72, 0x65,
- 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x3d, 0x22, 0x6f, 0x75, 0x74, 0x22, 0x20,
- 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x22, 0x72, 0x65, 0x74, 0x43, 0x6f, 0x64,
- 0x65, 0x22, 0x20, 0x74, 0x79, 0x70, 0x65, 0x3d, 0x22, 0x69, 0x22, 0x20,
- 0x2f, 0x3e, 0x3c, 0x61, 0x72, 0x67, 0x20, 0x64, 0x69, 0x72, 0x65, 0x63,
- 0x74, 0x69, 0x6f, 0x6e, 0x3d, 0x22, 0x6f, 0x75, 0x74, 0x22, 0x20, 0x6e,
- 0x61, 0x6d, 0x65, 0x3d, 0x22, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x65, 0x64,
- 0x46, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0x20, 0x74,
- 0x79, 0x70, 0x65, 0x3d, 0x22, 0x61, 0x28, 0x73, 0x69, 0x28, 0x62, 0x62,
- 0x29, 0x29, 0x22, 0x20, 0x2f, 0x3e, 0x3c, 0x2f, 0x6d, 0x65, 0x74, 0x68,
- 0x6f, 0x64, 0x3e, 0x3c, 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x20, 0x6e,
- 0x61, 0x6d, 0x65, 0x3d, 0x22, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x53,
- 0x44, 0x4c, 0x22, 0x3e, 0x3c, 0x61, 0x72, 0x67, 0x20, 0x64, 0x69, 0x72,
- 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x3d, 0x22, 0x6f, 0x75, 0x74, 0x22,
- 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x22, 0x72, 0x65, 0x74, 0x43, 0x6f,
- 0x64, 0x65, 0x22, 0x20, 0x74, 0x79, 0x70, 0x65, 0x3d, 0x22, 0x69, 0x22,
- 0x20, 0x2f, 0x3e, 0x3c, 0x61, 0x72, 0x67, 0x20, 0x64, 0x69, 0x72, 0x65,
- 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x3d, 0x22, 0x6f, 0x75, 0x74, 0x22, 0x20,
- 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x22, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74,
- 0x22, 0x20, 0x74, 0x79, 0x70, 0x65, 0x3d, 0x22, 0x69, 0x22, 0x20, 0x2f,
- 0x3e, 0x3c, 0x2f, 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x3e, 0x3c, 0x6d,
- 0x65, 0x74, 0x68, 0x6f, 0x64, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x22,
- 0x47, 0x65, 0x74, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x55, 0x70, 0x64,
- 0x61, 0x74, 0x65, 0x22, 0x3e, 0x3c, 0x61, 0x72, 0x67, 0x20, 0x64, 0x69,
- 0x72, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x3d, 0x22, 0x6f, 0x75, 0x74,
- 0x22, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x22, 0x72, 0x65, 0x74, 0x43,
- 0x6f, 0x64, 0x65, 0x22, 0x20, 0x74, 0x79, 0x70, 0x65, 0x3d, 0x22, 0x69,
- 0x22, 0x20, 0x2f, 0x3e, 0x3c, 0x61, 0x72, 0x67, 0x20, 0x64, 0x69, 0x72,
- 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x3d, 0x22, 0x6f, 0x75, 0x74, 0x22,
- 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x22, 0x73, 0x74, 0x61, 0x74, 0x75,
- 0x73, 0x22, 0x20, 0x74, 0x79, 0x70, 0x65, 0x3d, 0x22, 0x69, 0x22, 0x20,
- 0x2f, 0x3e, 0x3c, 0x2f, 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x3e, 0x3c,
- 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x3d,
- 0x22, 0x47, 0x65, 0x74, 0x55, 0x52, 0x4c, 0x53, 0x22, 0x3e, 0x3c, 0x61,
- 0x72, 0x67, 0x20, 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e,
- 0x3d, 0x22, 0x69, 0x6e, 0x22, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x22,
- 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x22, 0x20, 0x74, 0x79, 0x70,
- 0x65, 0x3d, 0x22, 0x69, 0x22, 0x20, 0x2f, 0x3e, 0x3c, 0x61, 0x72, 0x67,
- 0x20, 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x3d, 0x22,
- 0x6f, 0x75, 0x74, 0x22, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x22, 0x72,
- 0x65, 0x74, 0x43, 0x6f, 0x64, 0x65, 0x22, 0x20, 0x74, 0x79, 0x70, 0x65,
- 0x3d, 0x22, 0x69, 0x22, 0x20, 0x2f, 0x3e, 0x3c, 0x61, 0x72, 0x67, 0x20,
- 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x3d, 0x22, 0x6f,
- 0x75, 0x74, 0x22, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x22, 0x75, 0x72,
- 0x6c, 0x73, 0x22, 0x20, 0x74, 0x79, 0x70, 0x65, 0x3d, 0x22, 0x28, 0x62,
- 0x61, 0x28, 0x73, 0x28, 0x62, 0x73, 0x29, 0x29, 0x29, 0x22, 0x20, 0x2f,
- 0x3e, 0x3c, 0x2f, 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x3e, 0x3c, 0x73,
- 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x22,
- 0x4f, 0x6e, 0x41, 0x70, 0x70, 0x50, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73,
- 0x69, 0x6f, 0x6e, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x64, 0x22, 0x3e,
- 0x3c, 0x61, 0x72, 0x67, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x22, 0x61,
- 0x70, 0x70, 0x49, 0x44, 0x22, 0x20, 0x74, 0x79, 0x70, 0x65, 0x3d, 0x22,
- 0x69, 0x22, 0x20, 0x2f, 0x3e, 0x3c, 0x61, 0x72, 0x67, 0x20, 0x6e, 0x61,
- 0x6d, 0x65, 0x3d, 0x22, 0x69, 0x73, 0x41, 0x70, 0x70, 0x50, 0x65, 0x72,
- 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x76, 0x6f,
- 0x6b, 0x65, 0x64, 0x22, 0x20, 0x74, 0x79, 0x70, 0x65, 0x3d, 0x22, 0x28,
- 0x62, 0x62, 0x29, 0x22, 0x20, 0x2f, 0x3e, 0x3c, 0x61, 0x72, 0x67, 0x20,
- 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x22, 0x61, 0x70, 0x70, 0x52, 0x65, 0x76,
- 0x6f, 0x6b, 0x65, 0x64, 0x50, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69,
- 0x6f, 0x6e, 0x73, 0x22, 0x20, 0x74, 0x79, 0x70, 0x65, 0x3d, 0x22, 0x28,
- 0x62, 0x61, 0x28, 0x73, 0x69, 0x28, 0x62, 0x62, 0x29, 0x29, 0x29, 0x22,
- 0x20, 0x2f, 0x3e, 0x3c, 0x61, 0x72, 0x67, 0x20, 0x6e, 0x61, 0x6d, 0x65,
- 0x3d, 0x22, 0x61, 0x70, 0x70, 0x52, 0x65, 0x76, 0x6f, 0x6b, 0x65, 0x64,
- 0x22, 0x20, 0x74, 0x79, 0x70, 0x65, 0x3d, 0x22, 0x28, 0x62, 0x62, 0x29,
- 0x22, 0x20, 0x2f, 0x3e, 0x3c, 0x61, 0x72, 0x67, 0x20, 0x6e, 0x61, 0x6d,
- 0x65, 0x3d, 0x22, 0x61, 0x70, 0x70, 0x50, 0x65, 0x72, 0x6d, 0x69, 0x73,
- 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x43, 0x6f, 0x6e, 0x73, 0x65, 0x6e, 0x74,
- 0x4e, 0x65, 0x65, 0x64, 0x65, 0x64, 0x22, 0x20, 0x74, 0x79, 0x70, 0x65,
- 0x3d, 0x22, 0x28, 0x62, 0x62, 0x29, 0x22, 0x20, 0x2f, 0x3e, 0x3c, 0x61,
- 0x72, 0x67, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x22, 0x61, 0x70, 0x70,
- 0x55, 0x6e, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x65, 0x64,
- 0x22, 0x20, 0x74, 0x79, 0x70, 0x65, 0x3d, 0x22, 0x28, 0x62, 0x62, 0x29,
- 0x22, 0x20, 0x2f, 0x3e, 0x3c, 0x61, 0x72, 0x67, 0x20, 0x6e, 0x61, 0x6d,
- 0x65, 0x3d, 0x22, 0x70, 0x72, 0x69, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x22,
- 0x20, 0x74, 0x79, 0x70, 0x65, 0x3d, 0x22, 0x28, 0x62, 0x69, 0x29, 0x22,
- 0x20, 0x2f, 0x3e, 0x3c, 0x61, 0x72, 0x67, 0x20, 0x6e, 0x61, 0x6d, 0x65,
- 0x3d, 0x22, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x54, 0x79, 0x70,
- 0x65, 0x22, 0x20, 0x74, 0x79, 0x70, 0x65, 0x3d, 0x22, 0x28, 0x62, 0x61,
- 0x69, 0x29, 0x22, 0x20, 0x2f, 0x3e, 0x3c, 0x2f, 0x73, 0x69, 0x67, 0x6e,
- 0x61, 0x6c, 0x3e, 0x3c, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x20, 0x6e,
- 0x61, 0x6d, 0x65, 0x3d, 0x22, 0x4f, 0x6e, 0x53, 0x44, 0x4c, 0x43, 0x6f,
- 0x6e, 0x73, 0x65, 0x6e, 0x74, 0x4e, 0x65, 0x65, 0x64, 0x65, 0x64, 0x22,
- 0x3e, 0x3c, 0x61, 0x72, 0x67, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x22,
- 0x64, 0x65, 0x76, 0x69, 0x63, 0x65, 0x22, 0x20, 0x74, 0x79, 0x70, 0x65,
- 0x3d, 0x22, 0x28, 0x73, 0x73, 0x28, 0x62, 0x69, 0x29, 0x28, 0x62, 0x62,
- 0x29, 0x29, 0x22, 0x20, 0x2f, 0x3e, 0x3c, 0x2f, 0x73, 0x69, 0x67, 0x6e,
- 0x61, 0x6c, 0x3e, 0x3c, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x20, 0x6e,
- 0x61, 0x6d, 0x65, 0x3d, 0x22, 0x4f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x75,
- 0x73, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x22, 0x3e, 0x3c, 0x61, 0x72,
- 0x67, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x22, 0x73, 0x74, 0x61, 0x74,
- 0x75, 0x73, 0x22, 0x20, 0x74, 0x79, 0x70, 0x65, 0x3d, 0x22, 0x69, 0x22,
- 0x20, 0x2f, 0x3e, 0x3c, 0x2f, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x3e,
- 0x3c, 0x2f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x66, 0x61, 0x63, 0x65, 0x3e,
- 0x3c, 0x2f, 0x6e, 0x6f, 0x64, 0x65, 0x3e, 0x00}; \ No newline at end of file
diff --git a/src/components/dbus/src/message_descriptions.cc b/src/components/dbus/src/message_descriptions.cc
deleted file mode 100644
index 1a5e499a7f..0000000000
--- a/src/components/dbus/src/message_descriptions.cc
+++ /dev/null
@@ -1,10424 +0,0 @@
-// Warning! This file is generated by 'make_message_descriptions.py'. Edit at
-// your own risk.
-/**
- * @file message_descriptions.cc
- * @brief Generated HMI API message descriptions for D-Bus
- *
- * This file is a part of HMI D-Bus layer.
- */
-// Copyright (c) 2013, Ford Motor Company
-// All rights reserved.
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are met:
-//
-// Redistributions of source code must retain the above copyright notice, this
-// list of conditions and the following disclaimer.
-//
-// Redistributions in binary form must reproduce the above copyright notice,
-// this list of conditions and the following
-// disclaimer in the documentation and/or other materials provided with the
-// distribution.
-//
-// Neither the name of the Ford Motor Company nor the names of its contributors
-// may be used to endorse or promote products derived from this software
-// without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
-// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 'A PARTICULAR PURPOSE
-// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
-// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
-// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
-// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
-// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
-// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-// POSSIBILITY OF SUCH DAMAGE.
-
-#include "dbus/message_descriptions.h"
-
-namespace {
-
-struct Structs {
- static const ford_message_descriptions::ParameterDescription*
- Common__Coordinate__parameters[];
- static const ford_message_descriptions::ParameterDescription*
- Common__DeviceInfo__parameters[];
- static const ford_message_descriptions::ParameterDescription*
- Common__UserFriendlyMessage__parameters[];
- static const ford_message_descriptions::ParameterDescription*
- Common__PermissionItem__parameters[];
- static const ford_message_descriptions::ParameterDescription*
- Common__ServiceInfo__parameters[];
- static const ford_message_descriptions::ParameterDescription*
- Common__TextField__parameters[];
- static const ford_message_descriptions::ParameterDescription*
- Common__ButtonCapabilities__parameters[];
- static const ford_message_descriptions::ParameterDescription*
- Common__VehicleDataResult__parameters[];
- static const ford_message_descriptions::ParameterDescription*
- Common__TouchCoord__parameters[];
- static const ford_message_descriptions::ParameterDescription*
- Common__TouchEvent__parameters[];
- static const ford_message_descriptions::ParameterDescription*
- Common__PresetBankCapabilities__parameters[];
- static const ford_message_descriptions::ParameterDescription*
- Common__Image__parameters[];
- static const ford_message_descriptions::ParameterDescription*
- Common__SoftButton__parameters[];
- static const ford_message_descriptions::ParameterDescription*
- Common__TTSChunk__parameters[];
- static const ford_message_descriptions::ParameterDescription*
- Common__HMIApplication__parameters[];
- static const ford_message_descriptions::ParameterDescription*
- Common__MenuParams__parameters[];
- static const ford_message_descriptions::ParameterDescription*
- Common__Choice__parameters[];
- static const ford_message_descriptions::ParameterDescription*
- Common__VrHelpItem__parameters[];
- static const ford_message_descriptions::ParameterDescription*
- Common__TimeFormat__parameters[];
- static const ford_message_descriptions::ParameterDescription*
- Common__TouchEventCapabilities__parameters[];
- static const ford_message_descriptions::ParameterDescription*
- Common__ImageResolution__parameters[];
- static const ford_message_descriptions::ParameterDescription*
- Common__ScreenParams__parameters[];
- static const ford_message_descriptions::ParameterDescription*
- Common__ImageField__parameters[];
- static const ford_message_descriptions::ParameterDescription*
- Common__VideoStreamingFormat__parameters[];
- static const ford_message_descriptions::ParameterDescription*
- Common__VideoConfig__parameters[];
- static const ford_message_descriptions::ParameterDescription*
- Common__DisplayCapabilities__parameters[];
- static const ford_message_descriptions::ParameterDescription*
- Common__SoftButtonCapabilities__parameters[];
- static const ford_message_descriptions::ParameterDescription*
- Common__HMICapabilities__parameters[];
- static const ford_message_descriptions::ParameterDescription*
- Common__AudioPassThruCapabilities__parameters[];
- static const ford_message_descriptions::ParameterDescription*
- Common__TextFieldStruct__parameters[];
- static const ford_message_descriptions::ParameterDescription*
- Common__KeyboardProperties__parameters[];
- static const ford_message_descriptions::ParameterDescription*
- Common__Turn__parameters[];
- static const ford_message_descriptions::ParameterDescription*
- Common__VehicleType__parameters[];
- static const ford_message_descriptions::ParameterDescription*
- Common__GPSData__parameters[];
- static const ford_message_descriptions::ParameterDescription*
- Common__SingleTireStatus__parameters[];
- static const ford_message_descriptions::ParameterDescription*
- Common__DIDResult__parameters[];
- static const ford_message_descriptions::ParameterDescription*
- Common__HeadLampStatus__parameters[];
- static const ford_message_descriptions::ParameterDescription*
- Common__TireStatus__parameters[];
- static const ford_message_descriptions::ParameterDescription*
- Common__BeltStatus__parameters[];
- static const ford_message_descriptions::ParameterDescription*
- Common__BodyInformation__parameters[];
- static const ford_message_descriptions::ParameterDescription*
- Common__DeviceStatus__parameters[];
- static const ford_message_descriptions::ParameterDescription*
- Common__ECallInfo__parameters[];
- static const ford_message_descriptions::ParameterDescription*
- Common__AirbagStatus__parameters[];
- static const ford_message_descriptions::ParameterDescription*
- Common__EmergencyEvent__parameters[];
- static const ford_message_descriptions::ParameterDescription*
- Common__ClusterModeStatus__parameters[];
- static const ford_message_descriptions::ParameterDescription*
- Common__MyKey__parameters[];
- static const ford_message_descriptions::ParameterDescription*
- Common__RdsData__parameters[];
- static const ford_message_descriptions::ParameterDescription*
- Common__RadioControlData__parameters[];
- static const ford_message_descriptions::ParameterDescription*
- Common__RadioControlCapabilities__parameters[];
- static const ford_message_descriptions::ParameterDescription*
- Common__Temperature__parameters[];
- static const ford_message_descriptions::ParameterDescription*
- Common__ClimateControlData__parameters[];
- static const ford_message_descriptions::ParameterDescription*
- Common__ClimateControlCapabilities__parameters[];
- static const ford_message_descriptions::ParameterDescription*
- Common__ModuleData__parameters[];
- static const ford_message_descriptions::ParameterDescription*
- Common__DateTime__parameters[];
- static const ford_message_descriptions::ParameterDescription*
- Common__OASISAddress__parameters[];
- static const ford_message_descriptions::ParameterDescription*
- Common__LocationDetails__parameters[];
- static const ford_message_descriptions::ParameterDescription*
- Common__NavigationCapability__parameters[];
- static const ford_message_descriptions::ParameterDescription*
- Common__PhoneCapability__parameters[];
- static const ford_message_descriptions::ParameterDescription*
- Common__VideoStreamingCapability__parameters[];
- static const ford_message_descriptions::ParameterDescription*
- Common__SystemCapabilities__parameters[];
- static const ford_message_descriptions::ParameterDescription*
- Common__RemoteControlCapabilities__parameters[];
- static const ford_message_descriptions::ParameterDescription*
- Common__Rectangle__parameters[];
- static const ford_message_descriptions::ParameterDescription*
- Common__HapticRect__parameters[];
-};
-
-const ford_message_descriptions::ParameterDescription
- Common__Coordinate__parameter1 = {
- "latitudeDegrees", ford_message_descriptions::Float, true};
-const ford_message_descriptions::ParameterDescription
- Common__Coordinate__parameter2 = {
- "longitudeDegrees", ford_message_descriptions::Float, true};
-const ford_message_descriptions::ParameterDescription*
- Structs::Common__Coordinate__parameters[] = {
- (const ford_message_descriptions::
- ParameterDescription*)&Common__Coordinate__parameter1,
- (const ford_message_descriptions::
- ParameterDescription*)&Common__Coordinate__parameter2,
- NULL};
-
-const ford_message_descriptions::ParameterDescription
- Common__DeviceInfo__parameter1 = {
- "name", ford_message_descriptions::String, true};
-const ford_message_descriptions::ParameterDescription
- Common__DeviceInfo__parameter2 = {
- "id", ford_message_descriptions::String, true};
-const ford_message_descriptions::ParameterDescription
- Common__DeviceInfo__parameter3 = {
- "transportType", ford_message_descriptions::Enum, false};
-const ford_message_descriptions::ParameterDescription
- Common__DeviceInfo__parameter4 = {
- "isSDLAllowed", ford_message_descriptions::Boolean, false};
-const ford_message_descriptions::ParameterDescription*
- Structs::Common__DeviceInfo__parameters[] = {
- (const ford_message_descriptions::
- ParameterDescription*)&Common__DeviceInfo__parameter1,
- (const ford_message_descriptions::
- ParameterDescription*)&Common__DeviceInfo__parameter2,
- (const ford_message_descriptions::
- ParameterDescription*)&Common__DeviceInfo__parameter3,
- (const ford_message_descriptions::
- ParameterDescription*)&Common__DeviceInfo__parameter4,
- NULL};
-
-const ford_message_descriptions::ParameterDescription
- Common__UserFriendlyMessage__parameter1 = {
- "messageCode", ford_message_descriptions::String, true};
-const ford_message_descriptions::ParameterDescription
- Common__UserFriendlyMessage__parameter2 = {
- "ttsString", ford_message_descriptions::String, false};
-const ford_message_descriptions::ParameterDescription
- Common__UserFriendlyMessage__parameter3 = {
- "label", ford_message_descriptions::String, false};
-const ford_message_descriptions::ParameterDescription
- Common__UserFriendlyMessage__parameter4 = {
- "line1", ford_message_descriptions::String, false};
-const ford_message_descriptions::ParameterDescription
- Common__UserFriendlyMessage__parameter5 = {
- "line2", ford_message_descriptions::String, false};
-const ford_message_descriptions::ParameterDescription
- Common__UserFriendlyMessage__parameter6 = {
- "textBody", ford_message_descriptions::String, false};
-const ford_message_descriptions::ParameterDescription*
- Structs::Common__UserFriendlyMessage__parameters[] = {
- (const ford_message_descriptions::
- ParameterDescription*)&Common__UserFriendlyMessage__parameter1,
- (const ford_message_descriptions::
- ParameterDescription*)&Common__UserFriendlyMessage__parameter2,
- (const ford_message_descriptions::
- ParameterDescription*)&Common__UserFriendlyMessage__parameter3,
- (const ford_message_descriptions::
- ParameterDescription*)&Common__UserFriendlyMessage__parameter4,
- (const ford_message_descriptions::
- ParameterDescription*)&Common__UserFriendlyMessage__parameter5,
- (const ford_message_descriptions::
- ParameterDescription*)&Common__UserFriendlyMessage__parameter6,
- NULL};
-
-const ford_message_descriptions::ParameterDescription
- Common__PermissionItem__parameter1 = {
- "name", ford_message_descriptions::String, true};
-const ford_message_descriptions::ParameterDescription
- Common__PermissionItem__parameter2 = {
- "id", ford_message_descriptions::Integer, true};
-const ford_message_descriptions::ParameterDescription
- Common__PermissionItem__parameter3 = {
- "allowed", ford_message_descriptions::Boolean, false};
-const ford_message_descriptions::ParameterDescription*
- Structs::Common__PermissionItem__parameters[] = {
- (const ford_message_descriptions::
- ParameterDescription*)&Common__PermissionItem__parameter1,
- (const ford_message_descriptions::
- ParameterDescription*)&Common__PermissionItem__parameter2,
- (const ford_message_descriptions::
- ParameterDescription*)&Common__PermissionItem__parameter3,
- NULL};
-
-const ford_message_descriptions::ParameterDescription
- Common__ServiceInfo__parameter1 = {
- "url", ford_message_descriptions::String, true};
-const ford_message_descriptions::ParameterDescription
- Common__ServiceInfo__parameter2 = {
- "policyAppId", ford_message_descriptions::String, false};
-const ford_message_descriptions::ParameterDescription*
- Structs::Common__ServiceInfo__parameters[] = {
- (const ford_message_descriptions::
- ParameterDescription*)&Common__ServiceInfo__parameter1,
- (const ford_message_descriptions::
- ParameterDescription*)&Common__ServiceInfo__parameter2,
- NULL};
-
-const ford_message_descriptions::ParameterDescription
- Common__TextField__parameter1 = {
- "name", ford_message_descriptions::Enum, true};
-const ford_message_descriptions::ParameterDescription
- Common__TextField__parameter2 = {
- "characterSet", ford_message_descriptions::Enum, true};
-const ford_message_descriptions::ParameterDescription
- Common__TextField__parameter3 = {
- "width", ford_message_descriptions::Integer, true};
-const ford_message_descriptions::ParameterDescription
- Common__TextField__parameter4 = {
- "rows", ford_message_descriptions::Integer, true};
-const ford_message_descriptions::ParameterDescription*
- Structs::Common__TextField__parameters[] = {
- (const ford_message_descriptions::
- ParameterDescription*)&Common__TextField__parameter1,
- (const ford_message_descriptions::
- ParameterDescription*)&Common__TextField__parameter2,
- (const ford_message_descriptions::
- ParameterDescription*)&Common__TextField__parameter3,
- (const ford_message_descriptions::
- ParameterDescription*)&Common__TextField__parameter4,
- NULL};
-
-const ford_message_descriptions::ParameterDescription
- Common__ButtonCapabilities__parameter1 = {
- "name", ford_message_descriptions::Enum, true};
-const ford_message_descriptions::ParameterDescription
- Common__ButtonCapabilities__parameter2 = {
- "shortPressAvailable", ford_message_descriptions::Boolean, true};
-const ford_message_descriptions::ParameterDescription
- Common__ButtonCapabilities__parameter3 = {
- "longPressAvailable", ford_message_descriptions::Boolean, true};
-const ford_message_descriptions::ParameterDescription
- Common__ButtonCapabilities__parameter4 = {
- "upDownAvailable", ford_message_descriptions::Boolean, true};
-const ford_message_descriptions::ParameterDescription*
- Structs::Common__ButtonCapabilities__parameters[] = {
- (const ford_message_descriptions::
- ParameterDescription*)&Common__ButtonCapabilities__parameter1,
- (const ford_message_descriptions::
- ParameterDescription*)&Common__ButtonCapabilities__parameter2,
- (const ford_message_descriptions::
- ParameterDescription*)&Common__ButtonCapabilities__parameter3,
- (const ford_message_descriptions::
- ParameterDescription*)&Common__ButtonCapabilities__parameter4,
- NULL};
-
-const ford_message_descriptions::ParameterDescription
- Common__VehicleDataResult__parameter1 = {
- "dataType", ford_message_descriptions::Enum, true};
-const ford_message_descriptions::ParameterDescription
- Common__VehicleDataResult__parameter2 = {
- "resultCode", ford_message_descriptions::Enum, true};
-const ford_message_descriptions::ParameterDescription*
- Structs::Common__VehicleDataResult__parameters[] = {
- (const ford_message_descriptions::
- ParameterDescription*)&Common__VehicleDataResult__parameter1,
- (const ford_message_descriptions::
- ParameterDescription*)&Common__VehicleDataResult__parameter2,
- NULL};
-
-const ford_message_descriptions::ParameterDescription
- Common__TouchCoord__parameter1 = {
- "x", ford_message_descriptions::Integer, true};
-const ford_message_descriptions::ParameterDescription
- Common__TouchCoord__parameter2 = {
- "y", ford_message_descriptions::Integer, true};
-const ford_message_descriptions::ParameterDescription*
- Structs::Common__TouchCoord__parameters[] = {
- (const ford_message_descriptions::
- ParameterDescription*)&Common__TouchCoord__parameter1,
- (const ford_message_descriptions::
- ParameterDescription*)&Common__TouchCoord__parameter2,
- NULL};
-
-const ford_message_descriptions::ParameterDescription
- Common__TouchEvent__parameter1 = {
- "id", ford_message_descriptions::Integer, true};
-const ford_message_descriptions::ParameterDescription
- Common__TouchEvent__parameter2_array = {
- "ts", ford_message_descriptions::Integer, true};
-const ford_message_descriptions::ArrayDescription
- Common__TouchEvent__parameter2 = {
- {"ts", ford_message_descriptions::Array, true},
- (const ford_message_descriptions::
- ParameterDescription*)&Common__TouchEvent__parameter2_array,
- "i"};
-const ford_message_descriptions::StructDescription
- Common__TouchEvent__parameter3_array = {
- {"c", ford_message_descriptions::Struct, true},
- Structs::Common__TouchCoord__parameters};
-const ford_message_descriptions::ArrayDescription
- Common__TouchEvent__parameter3 = {
- {"c", ford_message_descriptions::Array, true},
- (const ford_message_descriptions::
- ParameterDescription*)&Common__TouchEvent__parameter3_array,
- "(ii)"};
-const ford_message_descriptions::ParameterDescription*
- Structs::Common__TouchEvent__parameters[] = {
- (const ford_message_descriptions::
- ParameterDescription*)&Common__TouchEvent__parameter1,
- (const ford_message_descriptions::
- ParameterDescription*)&Common__TouchEvent__parameter2,
- (const ford_message_descriptions::
- ParameterDescription*)&Common__TouchEvent__parameter3,
- NULL};
-
-const ford_message_descriptions::ParameterDescription
- Common__PresetBankCapabilities__parameter1 = {
- "onScreenPresetsAvailable", ford_message_descriptions::Boolean, true};
-const ford_message_descriptions::ParameterDescription*
- Structs::Common__PresetBankCapabilities__parameters[] = {
- (const ford_message_descriptions::
- ParameterDescription*)&Common__PresetBankCapabilities__parameter1,
- NULL};
-
-const ford_message_descriptions::ParameterDescription
- Common__Image__parameter1 = {
- "value", ford_message_descriptions::String, true};
-const ford_message_descriptions::ParameterDescription
- Common__Image__parameter2 = {
- "imageType", ford_message_descriptions::Enum, true};
-const ford_message_descriptions::ParameterDescription*
- Structs::Common__Image__parameters[] = {
- (const ford_message_descriptions::
- ParameterDescription*)&Common__Image__parameter1,
- (const ford_message_descriptions::
- ParameterDescription*)&Common__Image__parameter2,
- NULL};
-
-const ford_message_descriptions::ParameterDescription
- Common__SoftButton__parameter1 = {
- "type", ford_message_descriptions::Enum, true};
-const ford_message_descriptions::ParameterDescription
- Common__SoftButton__parameter2 = {
- "text", ford_message_descriptions::String, false};
-const ford_message_descriptions::StructDescription
- Common__SoftButton__parameter3 = {
- {"image", ford_message_descriptions::Struct, false},
- Structs::Common__Image__parameters};
-const ford_message_descriptions::ParameterDescription
- Common__SoftButton__parameter4 = {
- "isHighlighted", ford_message_descriptions::Boolean, false};
-const ford_message_descriptions::ParameterDescription
- Common__SoftButton__parameter5 = {
- "softButtonID", ford_message_descriptions::Integer, true};
-const ford_message_descriptions::ParameterDescription
- Common__SoftButton__parameter6 = {
- "systemAction", ford_message_descriptions::Enum, true};
-const ford_message_descriptions::ParameterDescription*
- Structs::Common__SoftButton__parameters[] = {
- (const ford_message_descriptions::
- ParameterDescription*)&Common__SoftButton__parameter1,
- (const ford_message_descriptions::
- ParameterDescription*)&Common__SoftButton__parameter2,
- (const ford_message_descriptions::
- ParameterDescription*)&Common__SoftButton__parameter3,
- (const ford_message_descriptions::
- ParameterDescription*)&Common__SoftButton__parameter4,
- (const ford_message_descriptions::
- ParameterDescription*)&Common__SoftButton__parameter5,
- (const ford_message_descriptions::
- ParameterDescription*)&Common__SoftButton__parameter6,
- NULL};
-
-const ford_message_descriptions::ParameterDescription
- Common__TTSChunk__parameter1 = {
- "text", ford_message_descriptions::String, true};
-const ford_message_descriptions::ParameterDescription
- Common__TTSChunk__parameter2 = {
- "type", ford_message_descriptions::Enum, true};
-const ford_message_descriptions::ParameterDescription*
- Structs::Common__TTSChunk__parameters[] = {
- (const ford_message_descriptions::
- ParameterDescription*)&Common__TTSChunk__parameter1,
- (const ford_message_descriptions::
- ParameterDescription*)&Common__TTSChunk__parameter2,
- NULL};
-
-const ford_message_descriptions::ParameterDescription
- Common__HMIApplication__parameter1 = {
- "appName", ford_message_descriptions::String, true};
-const ford_message_descriptions::ParameterDescription
- Common__HMIApplication__parameter2 = {
- "ngnMediaScreenAppName", ford_message_descriptions::String, false};
-const ford_message_descriptions::ParameterDescription
- Common__HMIApplication__parameter3 = {
- "icon", ford_message_descriptions::String, false};
-const ford_message_descriptions::StructDescription
- Common__HMIApplication__parameter4 = {
- {"deviceInfo", ford_message_descriptions::Struct, true},
- Structs::Common__DeviceInfo__parameters};
-const ford_message_descriptions::ParameterDescription
- Common__HMIApplication__parameter5 = {
- "policyAppID", ford_message_descriptions::String, true};
-const ford_message_descriptions::StructDescription
- Common__HMIApplication__parameter6_array = {
- {"ttsName", ford_message_descriptions::Struct, true},
- Structs::Common__TTSChunk__parameters};
-const ford_message_descriptions::ArrayDescription
- Common__HMIApplication__parameter6 = {
- {"ttsName", ford_message_descriptions::Array, false},
- (const ford_message_descriptions::
- ParameterDescription*)&Common__HMIApplication__parameter6_array,
- "(si)"};
-const ford_message_descriptions::ParameterDescription
- Common__HMIApplication__parameter7_array = {
- "vrSynonyms", ford_message_descriptions::String, true};
-const ford_message_descriptions::ArrayDescription
- Common__HMIApplication__parameter7 = {
- {"vrSynonyms", ford_message_descriptions::Array, false},
- (const ford_message_descriptions::
- ParameterDescription*)&Common__HMIApplication__parameter7_array,
- "s"};
-const ford_message_descriptions::ParameterDescription
- Common__HMIApplication__parameter8 = {
- "appID", ford_message_descriptions::Integer, true};
-const ford_message_descriptions::ParameterDescription
- Common__HMIApplication__parameter9 = {
- "hmiDisplayLanguageDesired", ford_message_descriptions::Enum, true};
-const ford_message_descriptions::ParameterDescription
- Common__HMIApplication__parameter10 = {
- "isMediaApplication", ford_message_descriptions::Boolean, true};
-const ford_message_descriptions::ParameterDescription
- Common__HMIApplication__parameter11_array = {
- "appType", ford_message_descriptions::Enum, true};
-const ford_message_descriptions::ArrayDescription
- Common__HMIApplication__parameter11 = {
- {"appType", ford_message_descriptions::Array, false},
- (const ford_message_descriptions::
- ParameterDescription*)&Common__HMIApplication__parameter11_array,
- "i"};
-const ford_message_descriptions::ParameterDescription
- Common__HMIApplication__parameter12 = {
- "greyOut", ford_message_descriptions::Boolean, false};
-const ford_message_descriptions::ParameterDescription
- Common__HMIApplication__parameter13_array = {
- "requestType", ford_message_descriptions::Enum, true};
-const ford_message_descriptions::ArrayDescription
- Common__HMIApplication__parameter13 = {
- {"requestType", ford_message_descriptions::Array, false},
- (const ford_message_descriptions::
- ParameterDescription*)&Common__HMIApplication__parameter13_array,
- "i"};
-const ford_message_descriptions::ParameterDescription*
- Structs::Common__HMIApplication__parameters[] = {
- (const ford_message_descriptions::
- ParameterDescription*)&Common__HMIApplication__parameter1,
- (const ford_message_descriptions::
- ParameterDescription*)&Common__HMIApplication__parameter2,
- (const ford_message_descriptions::
- ParameterDescription*)&Common__HMIApplication__parameter3,
- (const ford_message_descriptions::
- ParameterDescription*)&Common__HMIApplication__parameter4,
- (const ford_message_descriptions::
- ParameterDescription*)&Common__HMIApplication__parameter5,
- (const ford_message_descriptions::
- ParameterDescription*)&Common__HMIApplication__parameter6,
- (const ford_message_descriptions::
- ParameterDescription*)&Common__HMIApplication__parameter7,
- (const ford_message_descriptions::
- ParameterDescription*)&Common__HMIApplication__parameter8,
- (const ford_message_descriptions::
- ParameterDescription*)&Common__HMIApplication__parameter9,
- (const ford_message_descriptions::
- ParameterDescription*)&Common__HMIApplication__parameter10,
- (const ford_message_descriptions::
- ParameterDescription*)&Common__HMIApplication__parameter11,
- (const ford_message_descriptions::
- ParameterDescription*)&Common__HMIApplication__parameter12,
- (const ford_message_descriptions::
- ParameterDescription*)&Common__HMIApplication__parameter13,
- NULL};
-
-const ford_message_descriptions::ParameterDescription
- Common__MenuParams__parameter1 = {
- "parentID", ford_message_descriptions::Integer, false};
-const ford_message_descriptions::ParameterDescription
- Common__MenuParams__parameter2 = {
- "position", ford_message_descriptions::Integer, false};
-const ford_message_descriptions::ParameterDescription
- Common__MenuParams__parameter3 = {
- "menuName", ford_message_descriptions::String, true};
-const ford_message_descriptions::ParameterDescription*
- Structs::Common__MenuParams__parameters[] = {
- (const ford_message_descriptions::
- ParameterDescription*)&Common__MenuParams__parameter1,
- (const ford_message_descriptions::
- ParameterDescription*)&Common__MenuParams__parameter2,
- (const ford_message_descriptions::
- ParameterDescription*)&Common__MenuParams__parameter3,
- NULL};
-
-const ford_message_descriptions::ParameterDescription
- Common__Choice__parameter1 = {
- "choiceID", ford_message_descriptions::Integer, true};
-const ford_message_descriptions::ParameterDescription
- Common__Choice__parameter2 = {
- "menuName", ford_message_descriptions::String, false};
-const ford_message_descriptions::StructDescription Common__Choice__parameter3 =
- {{"image", ford_message_descriptions::Struct, false},
- Structs::Common__Image__parameters};
-const ford_message_descriptions::ParameterDescription
- Common__Choice__parameter4 = {
- "secondaryText", ford_message_descriptions::String, false};
-const ford_message_descriptions::ParameterDescription
- Common__Choice__parameter5 = {
- "tertiaryText", ford_message_descriptions::String, false};
-const ford_message_descriptions::StructDescription Common__Choice__parameter6 =
- {{"secondaryImage", ford_message_descriptions::Struct, false},
- Structs::Common__Image__parameters};
-const ford_message_descriptions::ParameterDescription*
- Structs::Common__Choice__parameters[] = {
- (const ford_message_descriptions::
- ParameterDescription*)&Common__Choice__parameter1,
- (const ford_message_descriptions::
- ParameterDescription*)&Common__Choice__parameter2,
- (const ford_message_descriptions::
- ParameterDescription*)&Common__Choice__parameter3,
- (const ford_message_descriptions::
- ParameterDescription*)&Common__Choice__parameter4,
- (const ford_message_descriptions::
- ParameterDescription*)&Common__Choice__parameter5,
- (const ford_message_descriptions::
- ParameterDescription*)&Common__Choice__parameter6,
- NULL};
-
-const ford_message_descriptions::ParameterDescription
- Common__VrHelpItem__parameter1 = {
- "text", ford_message_descriptions::String, true};
-const ford_message_descriptions::StructDescription
- Common__VrHelpItem__parameter2 = {
- {"image", ford_message_descriptions::Struct, false},
- Structs::Common__Image__parameters};
-const ford_message_descriptions::ParameterDescription
- Common__VrHelpItem__parameter3 = {
- "position", ford_message_descriptions::Integer, true};
-const ford_message_descriptions::ParameterDescription*
- Structs::Common__VrHelpItem__parameters[] = {
- (const ford_message_descriptions::
- ParameterDescription*)&Common__VrHelpItem__parameter1,
- (const ford_message_descriptions::
- ParameterDescription*)&Common__VrHelpItem__parameter2,
- (const ford_message_descriptions::
- ParameterDescription*)&Common__VrHelpItem__parameter3,
- NULL};
-
-const ford_message_descriptions::ParameterDescription
- Common__TimeFormat__parameter1 = {
- "hours", ford_message_descriptions::Integer, true};
-const ford_message_descriptions::ParameterDescription
- Common__TimeFormat__parameter2 = {
- "minutes", ford_message_descriptions::Integer, true};
-const ford_message_descriptions::ParameterDescription
- Common__TimeFormat__parameter3 = {
- "seconds", ford_message_descriptions::Integer, true};
-const ford_message_descriptions::ParameterDescription*
- Structs::Common__TimeFormat__parameters[] = {
- (const ford_message_descriptions::
- ParameterDescription*)&Common__TimeFormat__parameter1,
- (const ford_message_descriptions::
- ParameterDescription*)&Common__TimeFormat__parameter2,
- (const ford_message_descriptions::
- ParameterDescription*)&Common__TimeFormat__parameter3,
- NULL};
-
-const ford_message_descriptions::ParameterDescription
- Common__TouchEventCapabilities__parameter1 = {
- "pressAvailable", ford_message_descriptions::Boolean, true};
-const ford_message_descriptions::ParameterDescription
- Common__TouchEventCapabilities__parameter2 = {
- "multiTouchAvailable", ford_message_descriptions::Boolean, true};
-const ford_message_descriptions::ParameterDescription
- Common__TouchEventCapabilities__parameter3 = {
- "doublePressAvailable", ford_message_descriptions::Boolean, true};
-const ford_message_descriptions::ParameterDescription*
- Structs::Common__TouchEventCapabilities__parameters[] = {
- (const ford_message_descriptions::
- ParameterDescription*)&Common__TouchEventCapabilities__parameter1,
- (const ford_message_descriptions::
- ParameterDescription*)&Common__TouchEventCapabilities__parameter2,
- (const ford_message_descriptions::
- ParameterDescription*)&Common__TouchEventCapabilities__parameter3,
- NULL};
-
-const ford_message_descriptions::ParameterDescription
- Common__ImageResolution__parameter1 = {
- "resolutionWidth", ford_message_descriptions::Integer, true};
-const ford_message_descriptions::ParameterDescription
- Common__ImageResolution__parameter2 = {
- "resolutionHeight", ford_message_descriptions::Integer, true};
-const ford_message_descriptions::ParameterDescription*
- Structs::Common__ImageResolution__parameters[] = {
- (const ford_message_descriptions::
- ParameterDescription*)&Common__ImageResolution__parameter1,
- (const ford_message_descriptions::
- ParameterDescription*)&Common__ImageResolution__parameter2,
- NULL};
-
-const ford_message_descriptions::StructDescription
- Common__ScreenParams__parameter1 = {
- {"resolution", ford_message_descriptions::Struct, true},
- Structs::Common__ImageResolution__parameters};
-const ford_message_descriptions::StructDescription
- Common__ScreenParams__parameter2 = {
- {"touchEventAvailable", ford_message_descriptions::Struct, false},
- Structs::Common__TouchEventCapabilities__parameters};
-const ford_message_descriptions::ParameterDescription*
- Structs::Common__ScreenParams__parameters[] = {
- (const ford_message_descriptions::
- ParameterDescription*)&Common__ScreenParams__parameter1,
- (const ford_message_descriptions::
- ParameterDescription*)&Common__ScreenParams__parameter2,
- NULL};
-
-const ford_message_descriptions::ParameterDescription
- Common__ImageField__parameter1 = {
- "name", ford_message_descriptions::Enum, true};
-const ford_message_descriptions::ParameterDescription
- Common__ImageField__parameter2_array = {
- "imageTypeSupported", ford_message_descriptions::Enum, true};
-const ford_message_descriptions::ArrayDescription
- Common__ImageField__parameter2 = {
- {"imageTypeSupported", ford_message_descriptions::Array, false},
- (const ford_message_descriptions::
- ParameterDescription*)&Common__ImageField__parameter2_array,
- "i"};
-const ford_message_descriptions::StructDescription
- Common__ImageField__parameter3 = {
- {"imageResolution", ford_message_descriptions::Struct, false},
- Structs::Common__ImageResolution__parameters};
-const ford_message_descriptions::ParameterDescription*
- Structs::Common__ImageField__parameters[] = {
- (const ford_message_descriptions::
- ParameterDescription*)&Common__ImageField__parameter1,
- (const ford_message_descriptions::
- ParameterDescription*)&Common__ImageField__parameter2,
- (const ford_message_descriptions::
- ParameterDescription*)&Common__ImageField__parameter3,
- NULL};
-
-const ford_message_descriptions::ParameterDescription
- Common__VideoStreamingFormat__parameter1 = {
- "protocol", ford_message_descriptions::Enum, true};
-const ford_message_descriptions::ParameterDescription
- Common__VideoStreamingFormat__parameter2 = {
- "codec", ford_message_descriptions::Enum, true};
-const ford_message_descriptions::ParameterDescription*
- Structs::Common__VideoStreamingFormat__parameters[] = {
- (const ford_message_descriptions::
- ParameterDescription*)&Common__VideoStreamingFormat__parameter1,
- (const ford_message_descriptions::
- ParameterDescription*)&Common__VideoStreamingFormat__parameter2,
- NULL};
-
-const ford_message_descriptions::ParameterDescription
- Common__VideoConfig__parameter1 = {
- "protocol", ford_message_descriptions::Enum, false};
-const ford_message_descriptions::ParameterDescription
- Common__VideoConfig__parameter2 = {
- "codec", ford_message_descriptions::Enum, false};
-const ford_message_descriptions::ParameterDescription
- Common__VideoConfig__parameter3 = {
- "width", ford_message_descriptions::Integer, false};
-const ford_message_descriptions::ParameterDescription
- Common__VideoConfig__parameter4 = {
- "height", ford_message_descriptions::Integer, false};
-const ford_message_descriptions::ParameterDescription*
- Structs::Common__VideoConfig__parameters[] = {
- (const ford_message_descriptions::
- ParameterDescription*)&Common__VideoConfig__parameter1,
- (const ford_message_descriptions::
- ParameterDescription*)&Common__VideoConfig__parameter2,
- (const ford_message_descriptions::
- ParameterDescription*)&Common__VideoConfig__parameter3,
- (const ford_message_descriptions::
- ParameterDescription*)&Common__VideoConfig__parameter4,
- NULL};
-
-const ford_message_descriptions::ParameterDescription
- Common__DisplayCapabilities__parameter1 = {
- "displayType", ford_message_descriptions::Enum, true};
-const ford_message_descriptions::StructDescription
- Common__DisplayCapabilities__parameter2_array = {
- {"textFields", ford_message_descriptions::Struct, true},
- Structs::Common__TextField__parameters};
-const ford_message_descriptions::ArrayDescription
- Common__DisplayCapabilities__parameter2 = {
- {"textFields", ford_message_descriptions::Array, true},
- (const ford_message_descriptions::
- ParameterDescription*)&Common__DisplayCapabilities__parameter2_array,
- "(iiii)"};
-const ford_message_descriptions::StructDescription
- Common__DisplayCapabilities__parameter3_array = {
- {"imageFields", ford_message_descriptions::Struct, true},
- Structs::Common__ImageField__parameters};
-const ford_message_descriptions::ArrayDescription
- Common__DisplayCapabilities__parameter3 = {
- {"imageFields", ford_message_descriptions::Array, false},
- (const ford_message_descriptions::
- ParameterDescription*)&Common__DisplayCapabilities__parameter3_array,
- "(i(bai)(b(ii)))"};
-const ford_message_descriptions::ParameterDescription
- Common__DisplayCapabilities__parameter4_array = {
- "mediaClockFormats", ford_message_descriptions::Enum, true};
-const ford_message_descriptions::ArrayDescription
- Common__DisplayCapabilities__parameter4 = {
- {"mediaClockFormats", ford_message_descriptions::Array, true},
- (const ford_message_descriptions::
- ParameterDescription*)&Common__DisplayCapabilities__parameter4_array,
- "i"};
-const ford_message_descriptions::ParameterDescription
- Common__DisplayCapabilities__parameter5_array = {
- "imageCapabilities", ford_message_descriptions::Enum, true};
-const ford_message_descriptions::ArrayDescription
- Common__DisplayCapabilities__parameter5 = {
- {"imageCapabilities", ford_message_descriptions::Array, false},
- (const ford_message_descriptions::
- ParameterDescription*)&Common__DisplayCapabilities__parameter5_array,
- "i"};
-const ford_message_descriptions::ParameterDescription
- Common__DisplayCapabilities__parameter6 = {
- "graphicSupported", ford_message_descriptions::Boolean, true};
-const ford_message_descriptions::ParameterDescription
- Common__DisplayCapabilities__parameter7_array = {
- "templatesAvailable", ford_message_descriptions::String, true};
-const ford_message_descriptions::ArrayDescription
- Common__DisplayCapabilities__parameter7 = {
- {"templatesAvailable", ford_message_descriptions::Array, true},
- (const ford_message_descriptions::
- ParameterDescription*)&Common__DisplayCapabilities__parameter7_array,
- "s"};
-const ford_message_descriptions::StructDescription
- Common__DisplayCapabilities__parameter8 = {
- {"screenParams", ford_message_descriptions::Struct, false},
- Structs::Common__ScreenParams__parameters};
-const ford_message_descriptions::ParameterDescription
- Common__DisplayCapabilities__parameter9 = {
- "numCustomPresetsAvailable", ford_message_descriptions::Integer, false};
-const ford_message_descriptions::ParameterDescription*
- Structs::Common__DisplayCapabilities__parameters[] = {
- (const ford_message_descriptions::
- ParameterDescription*)&Common__DisplayCapabilities__parameter1,
- (const ford_message_descriptions::
- ParameterDescription*)&Common__DisplayCapabilities__parameter2,
- (const ford_message_descriptions::
- ParameterDescription*)&Common__DisplayCapabilities__parameter3,
- (const ford_message_descriptions::
- ParameterDescription*)&Common__DisplayCapabilities__parameter4,
- (const ford_message_descriptions::
- ParameterDescription*)&Common__DisplayCapabilities__parameter5,
- (const ford_message_descriptions::
- ParameterDescription*)&Common__DisplayCapabilities__parameter6,
- (const ford_message_descriptions::
- ParameterDescription*)&Common__DisplayCapabilities__parameter7,
- (const ford_message_descriptions::
- ParameterDescription*)&Common__DisplayCapabilities__parameter8,
- (const ford_message_descriptions::
- ParameterDescription*)&Common__DisplayCapabilities__parameter9,
- NULL};
-
-const ford_message_descriptions::ParameterDescription
- Common__SoftButtonCapabilities__parameter1 = {
- "shortPressAvailable", ford_message_descriptions::Boolean, true};
-const ford_message_descriptions::ParameterDescription
- Common__SoftButtonCapabilities__parameter2 = {
- "longPressAvailable", ford_message_descriptions::Boolean, true};
-const ford_message_descriptions::ParameterDescription
- Common__SoftButtonCapabilities__parameter3 = {
- "upDownAvailable", ford_message_descriptions::Boolean, true};
-const ford_message_descriptions::ParameterDescription
- Common__SoftButtonCapabilities__parameter4 = {
- "imageSupported", ford_message_descriptions::Boolean, true};
-const ford_message_descriptions::ParameterDescription*
- Structs::Common__SoftButtonCapabilities__parameters[] = {
- (const ford_message_descriptions::
- ParameterDescription*)&Common__SoftButtonCapabilities__parameter1,
- (const ford_message_descriptions::
- ParameterDescription*)&Common__SoftButtonCapabilities__parameter2,
- (const ford_message_descriptions::
- ParameterDescription*)&Common__SoftButtonCapabilities__parameter3,
- (const ford_message_descriptions::
- ParameterDescription*)&Common__SoftButtonCapabilities__parameter4,
- NULL};
-
-const ford_message_descriptions::ParameterDescription
- Common__HMICapabilities__parameter1 = {
- "navigation", ford_message_descriptions::Boolean, false};
-const ford_message_descriptions::ParameterDescription
- Common__HMICapabilities__parameter2 = {
- "phoneCall", ford_message_descriptions::Boolean, false};
-const ford_message_descriptions::ParameterDescription*
- Structs::Common__HMICapabilities__parameters[] = {
- (const ford_message_descriptions::
- ParameterDescription*)&Common__HMICapabilities__parameter1,
- (const ford_message_descriptions::
- ParameterDescription*)&Common__HMICapabilities__parameter2,
- NULL};
-
-const ford_message_descriptions::ParameterDescription
- Common__AudioPassThruCapabilities__parameter1 = {
- "samplingRate", ford_message_descriptions::Enum, true};
-const ford_message_descriptions::ParameterDescription
- Common__AudioPassThruCapabilities__parameter2 = {
- "bitsPerSample", ford_message_descriptions::Enum, true};
-const ford_message_descriptions::ParameterDescription
- Common__AudioPassThruCapabilities__parameter3 = {
- "audioType", ford_message_descriptions::Enum, true};
-const ford_message_descriptions::ParameterDescription*
- Structs::Common__AudioPassThruCapabilities__parameters[] = {
- (const ford_message_descriptions::
- ParameterDescription*)&Common__AudioPassThruCapabilities__parameter1,
- (const ford_message_descriptions::
- ParameterDescription*)&Common__AudioPassThruCapabilities__parameter2,
- (const ford_message_descriptions::
- ParameterDescription*)&Common__AudioPassThruCapabilities__parameter3,
- NULL};
-
-const ford_message_descriptions::ParameterDescription
- Common__TextFieldStruct__parameter1 = {
- "fieldName", ford_message_descriptions::Enum, true};
-const ford_message_descriptions::ParameterDescription
- Common__TextFieldStruct__parameter2 = {
- "fieldText", ford_message_descriptions::String, true};
-const ford_message_descriptions::ParameterDescription*
- Structs::Common__TextFieldStruct__parameters[] = {
- (const ford_message_descriptions::
- ParameterDescription*)&Common__TextFieldStruct__parameter1,
- (const ford_message_descriptions::
- ParameterDescription*)&Common__TextFieldStruct__parameter2,
- NULL};
-
-const ford_message_descriptions::ParameterDescription
- Common__KeyboardProperties__parameter1 = {
- "language", ford_message_descriptions::Enum, false};
-const ford_message_descriptions::ParameterDescription
- Common__KeyboardProperties__parameter2 = {
- "keyboardLayout", ford_message_descriptions::Enum, false};
-const ford_message_descriptions::ParameterDescription
- Common__KeyboardProperties__parameter3 = {
- "keypressMode", ford_message_descriptions::Enum, false};
-const ford_message_descriptions::ParameterDescription
- Common__KeyboardProperties__parameter4_array = {
- "limitedCharacterList", ford_message_descriptions::String, true};
-const ford_message_descriptions::ArrayDescription
- Common__KeyboardProperties__parameter4 = {
- {"limitedCharacterList", ford_message_descriptions::Array, false},
- (const ford_message_descriptions::
- ParameterDescription*)&Common__KeyboardProperties__parameter4_array,
- "s"};
-const ford_message_descriptions::ParameterDescription
- Common__KeyboardProperties__parameter5 = {
- "autoCompleteText", ford_message_descriptions::String, false};
-const ford_message_descriptions::ParameterDescription*
- Structs::Common__KeyboardProperties__parameters[] = {
- (const ford_message_descriptions::
- ParameterDescription*)&Common__KeyboardProperties__parameter1,
- (const ford_message_descriptions::
- ParameterDescription*)&Common__KeyboardProperties__parameter2,
- (const ford_message_descriptions::
- ParameterDescription*)&Common__KeyboardProperties__parameter3,
- (const ford_message_descriptions::
- ParameterDescription*)&Common__KeyboardProperties__parameter4,
- (const ford_message_descriptions::
- ParameterDescription*)&Common__KeyboardProperties__parameter5,
- NULL};
-
-const ford_message_descriptions::StructDescription Common__Turn__parameter1 = {
- {"navigationText", ford_message_descriptions::Struct, false},
- Structs::Common__TextFieldStruct__parameters};
-const ford_message_descriptions::StructDescription Common__Turn__parameter2 = {
- {"turnIcon", ford_message_descriptions::Struct, false},
- Structs::Common__Image__parameters};
-const ford_message_descriptions::ParameterDescription*
- Structs::Common__Turn__parameters[] = {
- (const ford_message_descriptions::
- ParameterDescription*)&Common__Turn__parameter1,
- (const ford_message_descriptions::
- ParameterDescription*)&Common__Turn__parameter2,
- NULL};
-
-const ford_message_descriptions::ParameterDescription
- Common__VehicleType__parameter1 = {
- "make", ford_message_descriptions::String, false};
-const ford_message_descriptions::ParameterDescription
- Common__VehicleType__parameter2 = {
- "model", ford_message_descriptions::String, false};
-const ford_message_descriptions::ParameterDescription
- Common__VehicleType__parameter3 = {
- "modelYear", ford_message_descriptions::String, false};
-const ford_message_descriptions::ParameterDescription
- Common__VehicleType__parameter4 = {
- "trim", ford_message_descriptions::String, false};
-const ford_message_descriptions::ParameterDescription*
- Structs::Common__VehicleType__parameters[] = {
- (const ford_message_descriptions::
- ParameterDescription*)&Common__VehicleType__parameter1,
- (const ford_message_descriptions::
- ParameterDescription*)&Common__VehicleType__parameter2,
- (const ford_message_descriptions::
- ParameterDescription*)&Common__VehicleType__parameter3,
- (const ford_message_descriptions::
- ParameterDescription*)&Common__VehicleType__parameter4,
- NULL};
-
-const ford_message_descriptions::ParameterDescription
- Common__GPSData__parameter1 = {
- "longitudeDegrees", ford_message_descriptions::Float, false};
-const ford_message_descriptions::ParameterDescription
- Common__GPSData__parameter2 = {
- "latitudeDegrees", ford_message_descriptions::Float, false};
-const ford_message_descriptions::ParameterDescription
- Common__GPSData__parameter3 = {
- "utcYear", ford_message_descriptions::Integer, false};
-const ford_message_descriptions::ParameterDescription
- Common__GPSData__parameter4 = {
- "utcMonth", ford_message_descriptions::Integer, false};
-const ford_message_descriptions::ParameterDescription
- Common__GPSData__parameter5 = {
- "utcDay", ford_message_descriptions::Integer, false};
-const ford_message_descriptions::ParameterDescription
- Common__GPSData__parameter6 = {
- "utcHours", ford_message_descriptions::Integer, false};
-const ford_message_descriptions::ParameterDescription
- Common__GPSData__parameter7 = {
- "utcMinutes", ford_message_descriptions::Integer, false};
-const ford_message_descriptions::ParameterDescription
- Common__GPSData__parameter8 = {
- "utcSeconds", ford_message_descriptions::Integer, false};
-const ford_message_descriptions::ParameterDescription
- Common__GPSData__parameter9 = {
- "compassDirection", ford_message_descriptions::Enum, false};
-const ford_message_descriptions::ParameterDescription
- Common__GPSData__parameter10 = {
- "pdop", ford_message_descriptions::Float, false};
-const ford_message_descriptions::ParameterDescription
- Common__GPSData__parameter11 = {
- "hdop", ford_message_descriptions::Float, false};
-const ford_message_descriptions::ParameterDescription
- Common__GPSData__parameter12 = {
- "vdop", ford_message_descriptions::Float, false};
-const ford_message_descriptions::ParameterDescription
- Common__GPSData__parameter13 = {
- "actual", ford_message_descriptions::Boolean, false};
-const ford_message_descriptions::ParameterDescription
- Common__GPSData__parameter14 = {
- "satellites", ford_message_descriptions::Integer, false};
-const ford_message_descriptions::ParameterDescription
- Common__GPSData__parameter15 = {
- "dimension", ford_message_descriptions::Enum, false};
-const ford_message_descriptions::ParameterDescription
- Common__GPSData__parameter16 = {
- "altitude", ford_message_descriptions::Float, false};
-const ford_message_descriptions::ParameterDescription
- Common__GPSData__parameter17 = {
- "heading", ford_message_descriptions::Float, false};
-const ford_message_descriptions::ParameterDescription
- Common__GPSData__parameter18 = {
- "speed", ford_message_descriptions::Float, false};
-const ford_message_descriptions::ParameterDescription*
- Structs::Common__GPSData__parameters[] = {
- (const ford_message_descriptions::
- ParameterDescription*)&Common__GPSData__parameter1,
- (const ford_message_descriptions::
- ParameterDescription*)&Common__GPSData__parameter2,
- (const ford_message_descriptions::
- ParameterDescription*)&Common__GPSData__parameter3,
- (const ford_message_descriptions::
- ParameterDescription*)&Common__GPSData__parameter4,
- (const ford_message_descriptions::
- ParameterDescription*)&Common__GPSData__parameter5,
- (const ford_message_descriptions::
- ParameterDescription*)&Common__GPSData__parameter6,
- (const ford_message_descriptions::
- ParameterDescription*)&Common__GPSData__parameter7,
- (const ford_message_descriptions::
- ParameterDescription*)&Common__GPSData__parameter8,
- (const ford_message_descriptions::
- ParameterDescription*)&Common__GPSData__parameter9,
- (const ford_message_descriptions::
- ParameterDescription*)&Common__GPSData__parameter10,
- (const ford_message_descriptions::
- ParameterDescription*)&Common__GPSData__parameter11,
- (const ford_message_descriptions::
- ParameterDescription*)&Common__GPSData__parameter12,
- (const ford_message_descriptions::
- ParameterDescription*)&Common__GPSData__parameter13,
- (const ford_message_descriptions::
- ParameterDescription*)&Common__GPSData__parameter14,
- (const ford_message_descriptions::
- ParameterDescription*)&Common__GPSData__parameter15,
- (const ford_message_descriptions::
- ParameterDescription*)&Common__GPSData__parameter16,
- (const ford_message_descriptions::
- ParameterDescription*)&Common__GPSData__parameter17,
- (const ford_message_descriptions::
- ParameterDescription*)&Common__GPSData__parameter18,
- NULL};
-
-const ford_message_descriptions::ParameterDescription
- Common__SingleTireStatus__parameter1 = {
- "status", ford_message_descriptions::Enum, true};
-const ford_message_descriptions::ParameterDescription*
- Structs::Common__SingleTireStatus__parameters[] = {
- (const ford_message_descriptions::
- ParameterDescription*)&Common__SingleTireStatus__parameter1,
- NULL};
-
-const ford_message_descriptions::ParameterDescription
- Common__DIDResult__parameter1 = {
- "resultCode", ford_message_descriptions::Enum, true};
-const ford_message_descriptions::ParameterDescription
- Common__DIDResult__parameter2 = {
- "didLocation", ford_message_descriptions::Integer, true};
-const ford_message_descriptions::ParameterDescription
- Common__DIDResult__parameter3 = {
- "data", ford_message_descriptions::String, false};
-const ford_message_descriptions::ParameterDescription*
- Structs::Common__DIDResult__parameters[] = {
- (const ford_message_descriptions::
- ParameterDescription*)&Common__DIDResult__parameter1,
- (const ford_message_descriptions::
- ParameterDescription*)&Common__DIDResult__parameter2,
- (const ford_message_descriptions::
- ParameterDescription*)&Common__DIDResult__parameter3,
- NULL};
-
-const ford_message_descriptions::ParameterDescription
- Common__HeadLampStatus__parameter1 = {
- "lowBeamsOn", ford_message_descriptions::Boolean, true};
-const ford_message_descriptions::ParameterDescription
- Common__HeadLampStatus__parameter2 = {
- "highBeamsOn", ford_message_descriptions::Boolean, true};
-const ford_message_descriptions::ParameterDescription
- Common__HeadLampStatus__parameter3 = {
- "ambientLightSensorStatus", ford_message_descriptions::Enum, true};
-const ford_message_descriptions::ParameterDescription*
- Structs::Common__HeadLampStatus__parameters[] = {
- (const ford_message_descriptions::
- ParameterDescription*)&Common__HeadLampStatus__parameter1,
- (const ford_message_descriptions::
- ParameterDescription*)&Common__HeadLampStatus__parameter2,
- (const ford_message_descriptions::
- ParameterDescription*)&Common__HeadLampStatus__parameter3,
- NULL};
-
-const ford_message_descriptions::ParameterDescription
- Common__TireStatus__parameter1 = {
- "pressureTelltale", ford_message_descriptions::Enum, false};
-const ford_message_descriptions::StructDescription
- Common__TireStatus__parameter2 = {
- {"leftFront", ford_message_descriptions::Struct, false},
- Structs::Common__SingleTireStatus__parameters};
-const ford_message_descriptions::StructDescription
- Common__TireStatus__parameter3 = {
- {"rightFront", ford_message_descriptions::Struct, false},
- Structs::Common__SingleTireStatus__parameters};
-const ford_message_descriptions::StructDescription
- Common__TireStatus__parameter4 = {
- {"leftRear", ford_message_descriptions::Struct, false},
- Structs::Common__SingleTireStatus__parameters};
-const ford_message_descriptions::StructDescription
- Common__TireStatus__parameter5 = {
- {"rightRear", ford_message_descriptions::Struct, false},
- Structs::Common__SingleTireStatus__parameters};
-const ford_message_descriptions::StructDescription
- Common__TireStatus__parameter6 = {
- {"innerLeftRear", ford_message_descriptions::Struct, false},
- Structs::Common__SingleTireStatus__parameters};
-const ford_message_descriptions::StructDescription
- Common__TireStatus__parameter7 = {
- {"innerRightRear", ford_message_descriptions::Struct, false},
- Structs::Common__SingleTireStatus__parameters};
-const ford_message_descriptions::ParameterDescription*
- Structs::Common__TireStatus__parameters[] = {
- (const ford_message_descriptions::
- ParameterDescription*)&Common__TireStatus__parameter1,
- (const ford_message_descriptions::
- ParameterDescription*)&Common__TireStatus__parameter2,
- (const ford_message_descriptions::
- ParameterDescription*)&Common__TireStatus__parameter3,
- (const ford_message_descriptions::
- ParameterDescription*)&Common__TireStatus__parameter4,
- (const ford_message_descriptions::
- ParameterDescription*)&Common__TireStatus__parameter5,
- (const ford_message_descriptions::
- ParameterDescription*)&Common__TireStatus__parameter6,
- (const ford_message_descriptions::
- ParameterDescription*)&Common__TireStatus__parameter7,
- NULL};
-
-const ford_message_descriptions::ParameterDescription
- Common__BeltStatus__parameter1 = {
- "driverBeltDeployed", ford_message_descriptions::Enum, false};
-const ford_message_descriptions::ParameterDescription
- Common__BeltStatus__parameter2 = {
- "passengerBeltDeployed", ford_message_descriptions::Enum, false};
-const ford_message_descriptions::ParameterDescription
- Common__BeltStatus__parameter3 = {
- "passengerBuckleBelted", ford_message_descriptions::Enum, false};
-const ford_message_descriptions::ParameterDescription
- Common__BeltStatus__parameter4 = {
- "driverBuckleBelted", ford_message_descriptions::Enum, false};
-const ford_message_descriptions::ParameterDescription
- Common__BeltStatus__parameter5 = {
- "leftRow2BuckleBelted", ford_message_descriptions::Enum, false};
-const ford_message_descriptions::ParameterDescription
- Common__BeltStatus__parameter6 = {
- "passengerChildDetected", ford_message_descriptions::Enum, false};
-const ford_message_descriptions::ParameterDescription
- Common__BeltStatus__parameter7 = {
- "rightRow2BuckleBelted", ford_message_descriptions::Enum, false};
-const ford_message_descriptions::ParameterDescription
- Common__BeltStatus__parameter8 = {
- "middleRow2BuckleBelted", ford_message_descriptions::Enum, false};
-const ford_message_descriptions::ParameterDescription
- Common__BeltStatus__parameter9 = {
- "middleRow3BuckleBelted", ford_message_descriptions::Enum, false};
-const ford_message_descriptions::ParameterDescription
- Common__BeltStatus__parameter10 = {
- "leftRow3BuckleBelted", ford_message_descriptions::Enum, false};
-const ford_message_descriptions::ParameterDescription
- Common__BeltStatus__parameter11 = {
- "rightRow3BuckleBelted", ford_message_descriptions::Enum, false};
-const ford_message_descriptions::ParameterDescription
- Common__BeltStatus__parameter12 = {
- "leftRearInflatableBelted", ford_message_descriptions::Enum, false};
-const ford_message_descriptions::ParameterDescription
- Common__BeltStatus__parameter13 = {
- "rightRearInflatableBelted", ford_message_descriptions::Enum, false};
-const ford_message_descriptions::ParameterDescription
- Common__BeltStatus__parameter14 = {
- "middleRow1BeltDeployed", ford_message_descriptions::Enum, false};
-const ford_message_descriptions::ParameterDescription
- Common__BeltStatus__parameter15 = {
- "middleRow1BuckleBelted", ford_message_descriptions::Enum, false};
-const ford_message_descriptions::ParameterDescription*
- Structs::Common__BeltStatus__parameters[] = {
- (const ford_message_descriptions::
- ParameterDescription*)&Common__BeltStatus__parameter1,
- (const ford_message_descriptions::
- ParameterDescription*)&Common__BeltStatus__parameter2,
- (const ford_message_descriptions::
- ParameterDescription*)&Common__BeltStatus__parameter3,
- (const ford_message_descriptions::
- ParameterDescription*)&Common__BeltStatus__parameter4,
- (const ford_message_descriptions::
- ParameterDescription*)&Common__BeltStatus__parameter5,
- (const ford_message_descriptions::
- ParameterDescription*)&Common__BeltStatus__parameter6,
- (const ford_message_descriptions::
- ParameterDescription*)&Common__BeltStatus__parameter7,
- (const ford_message_descriptions::
- ParameterDescription*)&Common__BeltStatus__parameter8,
- (const ford_message_descriptions::
- ParameterDescription*)&Common__BeltStatus__parameter9,
- (const ford_message_descriptions::
- ParameterDescription*)&Common__BeltStatus__parameter10,
- (const ford_message_descriptions::
- ParameterDescription*)&Common__BeltStatus__parameter11,
- (const ford_message_descriptions::
- ParameterDescription*)&Common__BeltStatus__parameter12,
- (const ford_message_descriptions::
- ParameterDescription*)&Common__BeltStatus__parameter13,
- (const ford_message_descriptions::
- ParameterDescription*)&Common__BeltStatus__parameter14,
- (const ford_message_descriptions::
- ParameterDescription*)&Common__BeltStatus__parameter15,
- NULL};
-
-const ford_message_descriptions::ParameterDescription
- Common__BodyInformation__parameter1 = {
- "parkBrakeActive", ford_message_descriptions::Boolean, true};
-const ford_message_descriptions::ParameterDescription
- Common__BodyInformation__parameter2 = {
- "ignitionStableStatus", ford_message_descriptions::Enum, true};
-const ford_message_descriptions::ParameterDescription
- Common__BodyInformation__parameter3 = {
- "ignitionStatus", ford_message_descriptions::Enum, true};
-const ford_message_descriptions::ParameterDescription
- Common__BodyInformation__parameter4 = {
- "driverDoorAjar", ford_message_descriptions::Boolean, false};
-const ford_message_descriptions::ParameterDescription
- Common__BodyInformation__parameter5 = {
- "passengerDoorAjar", ford_message_descriptions::Boolean, false};
-const ford_message_descriptions::ParameterDescription
- Common__BodyInformation__parameter6 = {
- "rearLeftDoorAjar", ford_message_descriptions::Boolean, false};
-const ford_message_descriptions::ParameterDescription
- Common__BodyInformation__parameter7 = {
- "rearRightDoorAjar", ford_message_descriptions::Boolean, false};
-const ford_message_descriptions::ParameterDescription*
- Structs::Common__BodyInformation__parameters[] = {
- (const ford_message_descriptions::
- ParameterDescription*)&Common__BodyInformation__parameter1,
- (const ford_message_descriptions::
- ParameterDescription*)&Common__BodyInformation__parameter2,
- (const ford_message_descriptions::
- ParameterDescription*)&Common__BodyInformation__parameter3,
- (const ford_message_descriptions::
- ParameterDescription*)&Common__BodyInformation__parameter4,
- (const ford_message_descriptions::
- ParameterDescription*)&Common__BodyInformation__parameter5,
- (const ford_message_descriptions::
- ParameterDescription*)&Common__BodyInformation__parameter6,
- (const ford_message_descriptions::
- ParameterDescription*)&Common__BodyInformation__parameter7,
- NULL};
-
-const ford_message_descriptions::ParameterDescription
- Common__DeviceStatus__parameter1 = {
- "voiceRecOn", ford_message_descriptions::Boolean, false};
-const ford_message_descriptions::ParameterDescription
- Common__DeviceStatus__parameter2 = {
- "btIconOn", ford_message_descriptions::Boolean, false};
-const ford_message_descriptions::ParameterDescription
- Common__DeviceStatus__parameter3 = {
- "callActive", ford_message_descriptions::Boolean, false};
-const ford_message_descriptions::ParameterDescription
- Common__DeviceStatus__parameter4 = {
- "phoneRoaming", ford_message_descriptions::Boolean, false};
-const ford_message_descriptions::ParameterDescription
- Common__DeviceStatus__parameter5 = {
- "textMsgAvailable", ford_message_descriptions::Boolean, false};
-const ford_message_descriptions::ParameterDescription
- Common__DeviceStatus__parameter6 = {
- "battLevelStatus", ford_message_descriptions::Enum, false};
-const ford_message_descriptions::ParameterDescription
- Common__DeviceStatus__parameter7 = {
- "stereoAudioOutputMuted", ford_message_descriptions::Boolean, false};
-const ford_message_descriptions::ParameterDescription
- Common__DeviceStatus__parameter8 = {
- "monoAudioOutputMuted", ford_message_descriptions::Boolean, false};
-const ford_message_descriptions::ParameterDescription
- Common__DeviceStatus__parameter9 = {
- "signalLevelStatus", ford_message_descriptions::Enum, false};
-const ford_message_descriptions::ParameterDescription
- Common__DeviceStatus__parameter10 = {
- "primaryAudioSource", ford_message_descriptions::Enum, false};
-const ford_message_descriptions::ParameterDescription
- Common__DeviceStatus__parameter11 = {
- "eCallEventActive", ford_message_descriptions::Boolean, false};
-const ford_message_descriptions::ParameterDescription*
- Structs::Common__DeviceStatus__parameters[] = {
- (const ford_message_descriptions::
- ParameterDescription*)&Common__DeviceStatus__parameter1,
- (const ford_message_descriptions::
- ParameterDescription*)&Common__DeviceStatus__parameter2,
- (const ford_message_descriptions::
- ParameterDescription*)&Common__DeviceStatus__parameter3,
- (const ford_message_descriptions::
- ParameterDescription*)&Common__DeviceStatus__parameter4,
- (const ford_message_descriptions::
- ParameterDescription*)&Common__DeviceStatus__parameter5,
- (const ford_message_descriptions::
- ParameterDescription*)&Common__DeviceStatus__parameter6,
- (const ford_message_descriptions::
- ParameterDescription*)&Common__DeviceStatus__parameter7,
- (const ford_message_descriptions::
- ParameterDescription*)&Common__DeviceStatus__parameter8,
- (const ford_message_descriptions::
- ParameterDescription*)&Common__DeviceStatus__parameter9,
- (const ford_message_descriptions::
- ParameterDescription*)&Common__DeviceStatus__parameter10,
- (const ford_message_descriptions::
- ParameterDescription*)&Common__DeviceStatus__parameter11,
- NULL};
-
-const ford_message_descriptions::ParameterDescription
- Common__ECallInfo__parameter1 = {
- "eCallNotificationStatus", ford_message_descriptions::Enum, true};
-const ford_message_descriptions::ParameterDescription
- Common__ECallInfo__parameter2 = {
- "auxECallNotificationStatus", ford_message_descriptions::Enum, true};
-const ford_message_descriptions::ParameterDescription
- Common__ECallInfo__parameter3 = {
- "eCallConfirmationStatus", ford_message_descriptions::Enum, true};
-const ford_message_descriptions::ParameterDescription*
- Structs::Common__ECallInfo__parameters[] = {
- (const ford_message_descriptions::
- ParameterDescription*)&Common__ECallInfo__parameter1,
- (const ford_message_descriptions::
- ParameterDescription*)&Common__ECallInfo__parameter2,
- (const ford_message_descriptions::
- ParameterDescription*)&Common__ECallInfo__parameter3,
- NULL};
-
-const ford_message_descriptions::ParameterDescription
- Common__AirbagStatus__parameter1 = {
- "driverAirbagDeployed", ford_message_descriptions::Enum, true};
-const ford_message_descriptions::ParameterDescription
- Common__AirbagStatus__parameter2 = {
- "driverSideAirbagDeployed", ford_message_descriptions::Enum, true};
-const ford_message_descriptions::ParameterDescription
- Common__AirbagStatus__parameter3 = {
- "driverCurtainAirbagDeployed", ford_message_descriptions::Enum, true};
-const ford_message_descriptions::ParameterDescription
- Common__AirbagStatus__parameter4 = {
- "passengerAirbagDeployed", ford_message_descriptions::Enum, true};
-const ford_message_descriptions::ParameterDescription
- Common__AirbagStatus__parameter5 = {"passengerCurtainAirbagDeployed",
- ford_message_descriptions::Enum,
- true};
-const ford_message_descriptions::ParameterDescription
- Common__AirbagStatus__parameter6 = {
- "driverKneeAirbagDeployed", ford_message_descriptions::Enum, true};
-const ford_message_descriptions::ParameterDescription
- Common__AirbagStatus__parameter7 = {
- "passengerSideAirbagDeployed", ford_message_descriptions::Enum, true};
-const ford_message_descriptions::ParameterDescription
- Common__AirbagStatus__parameter8 = {
- "passengerKneeAirbagDeployed", ford_message_descriptions::Enum, true};
-const ford_message_descriptions::ParameterDescription*
- Structs::Common__AirbagStatus__parameters[] = {
- (const ford_message_descriptions::
- ParameterDescription*)&Common__AirbagStatus__parameter1,
- (const ford_message_descriptions::
- ParameterDescription*)&Common__AirbagStatus__parameter2,
- (const ford_message_descriptions::
- ParameterDescription*)&Common__AirbagStatus__parameter3,
- (const ford_message_descriptions::
- ParameterDescription*)&Common__AirbagStatus__parameter4,
- (const ford_message_descriptions::
- ParameterDescription*)&Common__AirbagStatus__parameter5,
- (const ford_message_descriptions::
- ParameterDescription*)&Common__AirbagStatus__parameter6,
- (const ford_message_descriptions::
- ParameterDescription*)&Common__AirbagStatus__parameter7,
- (const ford_message_descriptions::
- ParameterDescription*)&Common__AirbagStatus__parameter8,
- NULL};
-
-const ford_message_descriptions::ParameterDescription
- Common__EmergencyEvent__parameter1 = {
- "emergencyEventType", ford_message_descriptions::Enum, true};
-const ford_message_descriptions::ParameterDescription
- Common__EmergencyEvent__parameter2 = {
- "fuelCutoffStatus", ford_message_descriptions::Enum, true};
-const ford_message_descriptions::ParameterDescription
- Common__EmergencyEvent__parameter3 = {
- "rolloverEvent", ford_message_descriptions::Enum, true};
-const ford_message_descriptions::ParameterDescription
- Common__EmergencyEvent__parameter4 = {
- "maximumChangeVelocity", ford_message_descriptions::Enum, true};
-const ford_message_descriptions::ParameterDescription
- Common__EmergencyEvent__parameter5 = {
- "multipleEvents", ford_message_descriptions::Enum, true};
-const ford_message_descriptions::ParameterDescription*
- Structs::Common__EmergencyEvent__parameters[] = {
- (const ford_message_descriptions::
- ParameterDescription*)&Common__EmergencyEvent__parameter1,
- (const ford_message_descriptions::
- ParameterDescription*)&Common__EmergencyEvent__parameter2,
- (const ford_message_descriptions::
- ParameterDescription*)&Common__EmergencyEvent__parameter3,
- (const ford_message_descriptions::
- ParameterDescription*)&Common__EmergencyEvent__parameter4,
- (const ford_message_descriptions::
- ParameterDescription*)&Common__EmergencyEvent__parameter5,
- NULL};
-
-const ford_message_descriptions::ParameterDescription
- Common__ClusterModeStatus__parameter1 = {
- "powerModeActive", ford_message_descriptions::Boolean, true};
-const ford_message_descriptions::ParameterDescription
- Common__ClusterModeStatus__parameter2 = {
- "powerModeQualificationStatus", ford_message_descriptions::Enum, true};
-const ford_message_descriptions::ParameterDescription
- Common__ClusterModeStatus__parameter3 = {
- "carModeStatus", ford_message_descriptions::Enum, true};
-const ford_message_descriptions::ParameterDescription
- Common__ClusterModeStatus__parameter4 = {
- "powerModeStatus", ford_message_descriptions::Enum, true};
-const ford_message_descriptions::ParameterDescription*
- Structs::Common__ClusterModeStatus__parameters[] = {
- (const ford_message_descriptions::
- ParameterDescription*)&Common__ClusterModeStatus__parameter1,
- (const ford_message_descriptions::
- ParameterDescription*)&Common__ClusterModeStatus__parameter2,
- (const ford_message_descriptions::
- ParameterDescription*)&Common__ClusterModeStatus__parameter3,
- (const ford_message_descriptions::
- ParameterDescription*)&Common__ClusterModeStatus__parameter4,
- NULL};
-
-const ford_message_descriptions::ParameterDescription
- Common__MyKey__parameter1 = {
- "e911Override", ford_message_descriptions::Enum, true};
-const ford_message_descriptions::ParameterDescription*
- Structs::Common__MyKey__parameters[] = {
- (const ford_message_descriptions::
- ParameterDescription*)&Common__MyKey__parameter1,
- NULL};
-
-const ford_message_descriptions::ParameterDescription
- Common__RdsData__parameter1 = {
- "PS", ford_message_descriptions::String, false};
-const ford_message_descriptions::ParameterDescription
- Common__RdsData__parameter2 = {
- "RT", ford_message_descriptions::String, false};
-const ford_message_descriptions::ParameterDescription
- Common__RdsData__parameter3 = {
- "CT", ford_message_descriptions::String, false};
-const ford_message_descriptions::ParameterDescription
- Common__RdsData__parameter4 = {
- "PI", ford_message_descriptions::String, false};
-const ford_message_descriptions::ParameterDescription
- Common__RdsData__parameter5 = {
- "PTY", ford_message_descriptions::Integer, false};
-const ford_message_descriptions::ParameterDescription
- Common__RdsData__parameter6 = {
- "TP", ford_message_descriptions::Boolean, false};
-const ford_message_descriptions::ParameterDescription
- Common__RdsData__parameter7 = {
- "TA", ford_message_descriptions::Boolean, false};
-const ford_message_descriptions::ParameterDescription
- Common__RdsData__parameter8 = {
- "REG", ford_message_descriptions::String, false};
-const ford_message_descriptions::ParameterDescription*
- Structs::Common__RdsData__parameters[] = {
- (const ford_message_descriptions::
- ParameterDescription*)&Common__RdsData__parameter1,
- (const ford_message_descriptions::
- ParameterDescription*)&Common__RdsData__parameter2,
- (const ford_message_descriptions::
- ParameterDescription*)&Common__RdsData__parameter3,
- (const ford_message_descriptions::
- ParameterDescription*)&Common__RdsData__parameter4,
- (const ford_message_descriptions::
- ParameterDescription*)&Common__RdsData__parameter5,
- (const ford_message_descriptions::
- ParameterDescription*)&Common__RdsData__parameter6,
- (const ford_message_descriptions::
- ParameterDescription*)&Common__RdsData__parameter7,
- (const ford_message_descriptions::
- ParameterDescription*)&Common__RdsData__parameter8,
- NULL};
-
-const ford_message_descriptions::ParameterDescription
- Common__RadioControlData__parameter1 = {
- "frequencyInteger", ford_message_descriptions::Integer, false};
-const ford_message_descriptions::ParameterDescription
- Common__RadioControlData__parameter2 = {
- "frequencyFraction", ford_message_descriptions::Integer, false};
-const ford_message_descriptions::ParameterDescription
- Common__RadioControlData__parameter3 = {
- "band", ford_message_descriptions::Enum, false};
-const ford_message_descriptions::StructDescription
- Common__RadioControlData__parameter4 = {
- {"rdsData", ford_message_descriptions::Struct, false},
- Structs::Common__RdsData__parameters};
-const ford_message_descriptions::ParameterDescription
- Common__RadioControlData__parameter5 = {
- "availableHDs", ford_message_descriptions::Integer, false};
-const ford_message_descriptions::ParameterDescription
- Common__RadioControlData__parameter6 = {
- "hdChannel", ford_message_descriptions::Integer, false};
-const ford_message_descriptions::ParameterDescription
- Common__RadioControlData__parameter7 = {
- "signalStrength", ford_message_descriptions::Integer, false};
-const ford_message_descriptions::ParameterDescription
- Common__RadioControlData__parameter8 = {
- "signalChangeThreshold", ford_message_descriptions::Integer, false};
-const ford_message_descriptions::ParameterDescription
- Common__RadioControlData__parameter9 = {
- "radioEnable", ford_message_descriptions::Boolean, false};
-const ford_message_descriptions::ParameterDescription
- Common__RadioControlData__parameter10 = {
- "state", ford_message_descriptions::Enum, false};
-const ford_message_descriptions::ParameterDescription*
- Structs::Common__RadioControlData__parameters[] = {
- (const ford_message_descriptions::
- ParameterDescription*)&Common__RadioControlData__parameter1,
- (const ford_message_descriptions::
- ParameterDescription*)&Common__RadioControlData__parameter2,
- (const ford_message_descriptions::
- ParameterDescription*)&Common__RadioControlData__parameter3,
- (const ford_message_descriptions::
- ParameterDescription*)&Common__RadioControlData__parameter4,
- (const ford_message_descriptions::
- ParameterDescription*)&Common__RadioControlData__parameter5,
- (const ford_message_descriptions::
- ParameterDescription*)&Common__RadioControlData__parameter6,
- (const ford_message_descriptions::
- ParameterDescription*)&Common__RadioControlData__parameter7,
- (const ford_message_descriptions::
- ParameterDescription*)&Common__RadioControlData__parameter8,
- (const ford_message_descriptions::
- ParameterDescription*)&Common__RadioControlData__parameter9,
- (const ford_message_descriptions::
- ParameterDescription*)&Common__RadioControlData__parameter10,
- NULL};
-
-const ford_message_descriptions::ParameterDescription
- Common__RadioControlCapabilities__parameter1 = {
- "moduleName", ford_message_descriptions::String, true};
-const ford_message_descriptions::ParameterDescription
- Common__RadioControlCapabilities__parameter2 = {
- "radioEnableAvailable", ford_message_descriptions::Boolean, false};
-const ford_message_descriptions::ParameterDescription
- Common__RadioControlCapabilities__parameter3 = {
- "radioBandAvailable", ford_message_descriptions::Boolean, false};
-const ford_message_descriptions::ParameterDescription
- Common__RadioControlCapabilities__parameter4 = {
- "radioFrequencyAvailable", ford_message_descriptions::Boolean, false};
-const ford_message_descriptions::ParameterDescription
- Common__RadioControlCapabilities__parameter5 = {
- "hdChannelAvailable", ford_message_descriptions::Boolean, false};
-const ford_message_descriptions::ParameterDescription
- Common__RadioControlCapabilities__parameter6 = {
- "rdsDataAvailable", ford_message_descriptions::Boolean, false};
-const ford_message_descriptions::ParameterDescription
- Common__RadioControlCapabilities__parameter7 = {
- "availableHDsAvailable", ford_message_descriptions::Boolean, false};
-const ford_message_descriptions::ParameterDescription
- Common__RadioControlCapabilities__parameter8 = {
- "stateAvailable", ford_message_descriptions::Boolean, false};
-const ford_message_descriptions::ParameterDescription
- Common__RadioControlCapabilities__parameter9 = {
- "signalStrengthAvailable", ford_message_descriptions::Boolean, false};
-const ford_message_descriptions::ParameterDescription
- Common__RadioControlCapabilities__parameter10 = {
- "signalChangeThresholdAvailable",
- ford_message_descriptions::Boolean,
- false};
-const ford_message_descriptions::ParameterDescription*
- Structs::Common__RadioControlCapabilities__parameters[] = {
- (const ford_message_descriptions::
- ParameterDescription*)&Common__RadioControlCapabilities__parameter1,
- (const ford_message_descriptions::
- ParameterDescription*)&Common__RadioControlCapabilities__parameter2,
- (const ford_message_descriptions::
- ParameterDescription*)&Common__RadioControlCapabilities__parameter3,
- (const ford_message_descriptions::
- ParameterDescription*)&Common__RadioControlCapabilities__parameter4,
- (const ford_message_descriptions::
- ParameterDescription*)&Common__RadioControlCapabilities__parameter5,
- (const ford_message_descriptions::
- ParameterDescription*)&Common__RadioControlCapabilities__parameter6,
- (const ford_message_descriptions::
- ParameterDescription*)&Common__RadioControlCapabilities__parameter7,
- (const ford_message_descriptions::
- ParameterDescription*)&Common__RadioControlCapabilities__parameter8,
- (const ford_message_descriptions::
- ParameterDescription*)&Common__RadioControlCapabilities__parameter9,
- (const ford_message_descriptions::
- ParameterDescription*)&Common__RadioControlCapabilities__parameter10,
- NULL};
-
-const ford_message_descriptions::ParameterDescription
- Common__Temperature__parameter1 = {
- "unit", ford_message_descriptions::Enum, true};
-const ford_message_descriptions::ParameterDescription
- Common__Temperature__parameter2 = {
- "value", ford_message_descriptions::Float, true};
-const ford_message_descriptions::ParameterDescription*
- Structs::Common__Temperature__parameters[] = {
- (const ford_message_descriptions::
- ParameterDescription*)&Common__Temperature__parameter1,
- (const ford_message_descriptions::
- ParameterDescription*)&Common__Temperature__parameter2,
- NULL};
-
-const ford_message_descriptions::ParameterDescription
- Common__ClimateControlData__parameter1 = {
- "fanSpeed", ford_message_descriptions::Integer, false};
-const ford_message_descriptions::StructDescription
- Common__ClimateControlData__parameter2 = {
- {"currentTemperature", ford_message_descriptions::Struct, false},
- Structs::Common__Temperature__parameters};
-const ford_message_descriptions::StructDescription
- Common__ClimateControlData__parameter3 = {
- {"desiredTemperature", ford_message_descriptions::Struct, false},
- Structs::Common__Temperature__parameters};
-const ford_message_descriptions::ParameterDescription
- Common__ClimateControlData__parameter4 = {
- "acEnable", ford_message_descriptions::Boolean, false};
-const ford_message_descriptions::ParameterDescription
- Common__ClimateControlData__parameter5 = {
- "circulateAirEnable", ford_message_descriptions::Boolean, false};
-const ford_message_descriptions::ParameterDescription
- Common__ClimateControlData__parameter6 = {
- "autoModeEnable", ford_message_descriptions::Boolean, false};
-const ford_message_descriptions::ParameterDescription
- Common__ClimateControlData__parameter7 = {
- "defrostZone", ford_message_descriptions::Enum, false};
-const ford_message_descriptions::ParameterDescription
- Common__ClimateControlData__parameter8 = {
- "dualModeEnable", ford_message_descriptions::Boolean, false};
-const ford_message_descriptions::ParameterDescription
- Common__ClimateControlData__parameter9 = {
- "acMaxEnable", ford_message_descriptions::Boolean, false};
-const ford_message_descriptions::ParameterDescription
- Common__ClimateControlData__parameter10 = {
- "ventilationMode", ford_message_descriptions::Enum, false};
-const ford_message_descriptions::ParameterDescription*
- Structs::Common__ClimateControlData__parameters[] = {
- (const ford_message_descriptions::
- ParameterDescription*)&Common__ClimateControlData__parameter1,
- (const ford_message_descriptions::
- ParameterDescription*)&Common__ClimateControlData__parameter2,
- (const ford_message_descriptions::
- ParameterDescription*)&Common__ClimateControlData__parameter3,
- (const ford_message_descriptions::
- ParameterDescription*)&Common__ClimateControlData__parameter4,
- (const ford_message_descriptions::
- ParameterDescription*)&Common__ClimateControlData__parameter5,
- (const ford_message_descriptions::
- ParameterDescription*)&Common__ClimateControlData__parameter6,
- (const ford_message_descriptions::
- ParameterDescription*)&Common__ClimateControlData__parameter7,
- (const ford_message_descriptions::
- ParameterDescription*)&Common__ClimateControlData__parameter8,
- (const ford_message_descriptions::
- ParameterDescription*)&Common__ClimateControlData__parameter9,
- (const ford_message_descriptions::
- ParameterDescription*)&Common__ClimateControlData__parameter10,
- NULL};
-
-const ford_message_descriptions::ParameterDescription
- Common__ClimateControlCapabilities__parameter1 = {
- "moduleName", ford_message_descriptions::String, true};
-const ford_message_descriptions::ParameterDescription
- Common__ClimateControlCapabilities__parameter2 = {
- "currentTemperatureAvailable",
- ford_message_descriptions::Boolean,
- false};
-const ford_message_descriptions::ParameterDescription
- Common__ClimateControlCapabilities__parameter3 = {
- "fanSpeedAvailable", ford_message_descriptions::Boolean, false};
-const ford_message_descriptions::ParameterDescription
- Common__ClimateControlCapabilities__parameter4 = {
- "desiredTemperatureAvailable",
- ford_message_descriptions::Boolean,
- false};
-const ford_message_descriptions::ParameterDescription
- Common__ClimateControlCapabilities__parameter5 = {
- "acEnableAvailable", ford_message_descriptions::Boolean, false};
-const ford_message_descriptions::ParameterDescription
- Common__ClimateControlCapabilities__parameter6 = {
- "acMaxEnableAvailable", ford_message_descriptions::Boolean, false};
-const ford_message_descriptions::ParameterDescription
- Common__ClimateControlCapabilities__parameter7 = {
- "circulateAirEnableAvailable",
- ford_message_descriptions::Boolean,
- false};
-const ford_message_descriptions::ParameterDescription
- Common__ClimateControlCapabilities__parameter8 = {
- "autoModeEnableAvailable", ford_message_descriptions::Boolean, false};
-const ford_message_descriptions::ParameterDescription
- Common__ClimateControlCapabilities__parameter9 = {
- "dualModeEnableAvailable", ford_message_descriptions::Boolean, false};
-const ford_message_descriptions::ParameterDescription
- Common__ClimateControlCapabilities__parameter10 = {
- "defrostZoneAvailable", ford_message_descriptions::Boolean, false};
-const ford_message_descriptions::ParameterDescription
- Common__ClimateControlCapabilities__parameter11_array = {
- "defrostZone", ford_message_descriptions::Enum, true};
-const ford_message_descriptions::ArrayDescription
- Common__ClimateControlCapabilities__parameter11 = {
- {"defrostZone", ford_message_descriptions::Array, false},
- (const ford_message_descriptions::
- ParameterDescription*)&Common__ClimateControlCapabilities__parameter11_array,
- "i"};
-const ford_message_descriptions::ParameterDescription
- Common__ClimateControlCapabilities__parameter12 = {
- "ventilationModeAvailable", ford_message_descriptions::Boolean, false};
-const ford_message_descriptions::ParameterDescription
- Common__ClimateControlCapabilities__parameter13_array = {
- "ventilationMode", ford_message_descriptions::Enum, true};
-const ford_message_descriptions::ArrayDescription
- Common__ClimateControlCapabilities__parameter13 = {
- {"ventilationMode", ford_message_descriptions::Array, false},
- (const ford_message_descriptions::
- ParameterDescription*)&Common__ClimateControlCapabilities__parameter13_array,
- "i"};
-const ford_message_descriptions::ParameterDescription*
- Structs::Common__ClimateControlCapabilities__parameters[] = {
- (const ford_message_descriptions::
- ParameterDescription*)&Common__ClimateControlCapabilities__parameter1,
- (const ford_message_descriptions::
- ParameterDescription*)&Common__ClimateControlCapabilities__parameter2,
- (const ford_message_descriptions::
- ParameterDescription*)&Common__ClimateControlCapabilities__parameter3,
- (const ford_message_descriptions::
- ParameterDescription*)&Common__ClimateControlCapabilities__parameter4,
- (const ford_message_descriptions::
- ParameterDescription*)&Common__ClimateControlCapabilities__parameter5,
- (const ford_message_descriptions::
- ParameterDescription*)&Common__ClimateControlCapabilities__parameter6,
- (const ford_message_descriptions::
- ParameterDescription*)&Common__ClimateControlCapabilities__parameter7,
- (const ford_message_descriptions::
- ParameterDescription*)&Common__ClimateControlCapabilities__parameter8,
- (const ford_message_descriptions::
- ParameterDescription*)&Common__ClimateControlCapabilities__parameter9,
- (const ford_message_descriptions::
- ParameterDescription*)&Common__ClimateControlCapabilities__parameter10,
- (const ford_message_descriptions::
- ParameterDescription*)&Common__ClimateControlCapabilities__parameter11,
- (const ford_message_descriptions::
- ParameterDescription*)&Common__ClimateControlCapabilities__parameter12,
- (const ford_message_descriptions::
- ParameterDescription*)&Common__ClimateControlCapabilities__parameter13,
- NULL};
-
-const ford_message_descriptions::ParameterDescription
- Common__ModuleData__parameter1 = {
- "moduleType", ford_message_descriptions::Enum, true};
-const ford_message_descriptions::StructDescription
- Common__ModuleData__parameter2 = {
- {"radioControlData", ford_message_descriptions::Struct, false},
- Structs::Common__RadioControlData__parameters};
-const ford_message_descriptions::StructDescription
- Common__ModuleData__parameter3 = {
- {"climateControlData", ford_message_descriptions::Struct, false},
- Structs::Common__ClimateControlData__parameters};
-const ford_message_descriptions::ParameterDescription*
- Structs::Common__ModuleData__parameters[] = {
- (const ford_message_descriptions::
- ParameterDescription*)&Common__ModuleData__parameter1,
- (const ford_message_descriptions::
- ParameterDescription*)&Common__ModuleData__parameter2,
- (const ford_message_descriptions::
- ParameterDescription*)&Common__ModuleData__parameter3,
- NULL};
-
-const ford_message_descriptions::ParameterDescription
- Common__DateTime__parameter1 = {
- "millisecond", ford_message_descriptions::Integer, false};
-const ford_message_descriptions::ParameterDescription
- Common__DateTime__parameter2 = {
- "second", ford_message_descriptions::Integer, false};
-const ford_message_descriptions::ParameterDescription
- Common__DateTime__parameter3 = {
- "minute", ford_message_descriptions::Integer, false};
-const ford_message_descriptions::ParameterDescription
- Common__DateTime__parameter4 = {
- "hour", ford_message_descriptions::Integer, false};
-const ford_message_descriptions::ParameterDescription
- Common__DateTime__parameter5 = {
- "day", ford_message_descriptions::Integer, false};
-const ford_message_descriptions::ParameterDescription
- Common__DateTime__parameter6 = {
- "month", ford_message_descriptions::Integer, false};
-const ford_message_descriptions::ParameterDescription
- Common__DateTime__parameter7 = {
- "year", ford_message_descriptions::Integer, false};
-const ford_message_descriptions::ParameterDescription
- Common__DateTime__parameter8 = {
- "tz_hour", ford_message_descriptions::Integer, false};
-const ford_message_descriptions::ParameterDescription
- Common__DateTime__parameter9 = {
- "tz_minute", ford_message_descriptions::Integer, false};
-/*const ford_message_descriptions::ParameterDescription*
- Structs::Common__DateTime__parameters[] = {
- (const
- ford_message_descriptions::ParameterDescription*)&Common__DateTime__parameter1,
- (const
- ford_message_descriptions::ParameterDescription*)&Common__DateTime__parameter2,
- (const
- ford_message_descriptions::ParameterDescription*)&Common__DateTime__parameter3,
- (const
- ford_message_descriptions::ParameterDescription*)&Common__DateTime__parameter4,
- (const
- ford_message_descriptions::ParameterDescription*)&Common__DateTime__parameter5,
- (const
- ford_message_descriptions::ParameterDescription*)&Common__DateTime__parameter6,
- (const
- ford_message_descriptions::ParameterDescription*)&Common__DateTime__parameter7,
- (const
- ford_message_descriptions::ParameterDescription*)&Common__DateTime__parameter8,
- (const
- ford_message_descriptions::ParameterDescription*)&Common__DateTime__parameter9,
- NULL };*/
-
-const ford_message_descriptions::ParameterDescription
- Common__OASISAddress__parameter1 = {
- "countryName", ford_message_descriptions::String, false};
-const ford_message_descriptions::ParameterDescription
- Common__OASISAddress__parameter2 = {
- "countryCode", ford_message_descriptions::String, false};
-const ford_message_descriptions::ParameterDescription
- Common__OASISAddress__parameter3 = {
- "postalCode", ford_message_descriptions::String, false};
-const ford_message_descriptions::ParameterDescription
- Common__OASISAddress__parameter4 = {
- "administrativeArea", ford_message_descriptions::String, false};
-const ford_message_descriptions::ParameterDescription
- Common__OASISAddress__parameter5 = {
- "subAdministrativeArea", ford_message_descriptions::String, false};
-const ford_message_descriptions::ParameterDescription
- Common__OASISAddress__parameter6 = {
- "locality", ford_message_descriptions::String, false};
-const ford_message_descriptions::ParameterDescription
- Common__OASISAddress__parameter7 = {
- "subLocality", ford_message_descriptions::String, false};
-const ford_message_descriptions::ParameterDescription
- Common__OASISAddress__parameter8 = {
- "thoroughfare", ford_message_descriptions::String, false};
-const ford_message_descriptions::ParameterDescription
- Common__OASISAddress__parameter9 = {
- "subThoroughfare", ford_message_descriptions::String, false};
-const ford_message_descriptions::ParameterDescription*
- Structs::Common__OASISAddress__parameters[] = {
- (const ford_message_descriptions::
- ParameterDescription*)&Common__OASISAddress__parameter1,
- (const ford_message_descriptions::
- ParameterDescription*)&Common__OASISAddress__parameter2,
- (const ford_message_descriptions::
- ParameterDescription*)&Common__OASISAddress__parameter3,
- (const ford_message_descriptions::
- ParameterDescription*)&Common__OASISAddress__parameter4,
- (const ford_message_descriptions::
- ParameterDescription*)&Common__OASISAddress__parameter5,
- (const ford_message_descriptions::
- ParameterDescription*)&Common__OASISAddress__parameter6,
- (const ford_message_descriptions::
- ParameterDescription*)&Common__OASISAddress__parameter7,
- (const ford_message_descriptions::
- ParameterDescription*)&Common__OASISAddress__parameter8,
- (const ford_message_descriptions::
- ParameterDescription*)&Common__OASISAddress__parameter9,
- NULL};
-
-const ford_message_descriptions::StructDescription
- Common__LocationDetails__parameter1 = {
- {"coordinate", ford_message_descriptions::Struct, false},
- Structs::Common__Coordinate__parameters};
-const ford_message_descriptions::ParameterDescription
- Common__LocationDetails__parameter2 = {
- "locationName", ford_message_descriptions::String, false};
-const ford_message_descriptions::ParameterDescription
- Common__LocationDetails__parameter3_array = {
- "addressLines", ford_message_descriptions::String, true};
-const ford_message_descriptions::ArrayDescription
- Common__LocationDetails__parameter3 = {
- {"addressLines", ford_message_descriptions::Array, false},
- (const ford_message_descriptions::
- ParameterDescription*)&Common__LocationDetails__parameter3_array,
- "s"};
-const ford_message_descriptions::ParameterDescription
- Common__LocationDetails__parameter4 = {
- "locationDescription", ford_message_descriptions::String, false};
-const ford_message_descriptions::ParameterDescription
- Common__LocationDetails__parameter5 = {
- "phoneNumber", ford_message_descriptions::String, false};
-const ford_message_descriptions::StructDescription
- Common__LocationDetails__parameter6 = {
- {"locationImage", ford_message_descriptions::Struct, false},
- Structs::Common__Image__parameters};
-const ford_message_descriptions::StructDescription
- Common__LocationDetails__parameter7 = {
- {"searchAddress", ford_message_descriptions::Struct, false},
- Structs::Common__OASISAddress__parameters};
-const ford_message_descriptions::ParameterDescription*
- Structs::Common__LocationDetails__parameters[] = {
- (const ford_message_descriptions::
- ParameterDescription*)&Common__LocationDetails__parameter1,
- (const ford_message_descriptions::
- ParameterDescription*)&Common__LocationDetails__parameter2,
- (const ford_message_descriptions::
- ParameterDescription*)&Common__LocationDetails__parameter3,
- (const ford_message_descriptions::
- ParameterDescription*)&Common__LocationDetails__parameter4,
- (const ford_message_descriptions::
- ParameterDescription*)&Common__LocationDetails__parameter5,
- (const ford_message_descriptions::
- ParameterDescription*)&Common__LocationDetails__parameter6,
- (const ford_message_descriptions::
- ParameterDescription*)&Common__LocationDetails__parameter7,
- NULL};
-
-const ford_message_descriptions::ParameterDescription
- Common__NavigationCapability__parameter1 = {
- "sendLocationEnabled", ford_message_descriptions::Boolean, false};
-const ford_message_descriptions::ParameterDescription
- Common__NavigationCapability__parameter2 = {
- "getWayPointsEnabled", ford_message_descriptions::Boolean, false};
-const ford_message_descriptions::ParameterDescription*
- Structs::Common__NavigationCapability__parameters[] = {
- (const ford_message_descriptions::
- ParameterDescription*)&Common__NavigationCapability__parameter1,
- (const ford_message_descriptions::
- ParameterDescription*)&Common__NavigationCapability__parameter2,
- NULL};
-
-const ford_message_descriptions::ParameterDescription
- Common__PhoneCapability__parameter1 = {
- "dialNumberEnabled", ford_message_descriptions::Boolean, false};
-const ford_message_descriptions::ParameterDescription*
- Structs::Common__PhoneCapability__parameters[] = {
- (const ford_message_descriptions::
- ParameterDescription*)&Common__PhoneCapability__parameter1,
- NULL};
-
-const ford_message_descriptions::StructDescription
- Common__VideoStreamingCapability__parameter1 = {
- {"preferredResolution", ford_message_descriptions::Struct, false},
- Structs::Common__ImageResolution__parameters};
-const ford_message_descriptions::ParameterDescription
- Common__VideoStreamingCapability__parameter2 = {
- "maxBitrate", ford_message_descriptions::Integer, false};
-const ford_message_descriptions::StructDescription
- Common__VideoStreamingCapability__parameter3_array = {
- {"supportedFormats", ford_message_descriptions::Struct, true},
- Structs::Common__VideoStreamingFormat__parameters};
-const ford_message_descriptions::ArrayDescription
- Common__VideoStreamingCapability__parameter3 = {
- {"supportedFormats", ford_message_descriptions::Array, false},
- (const ford_message_descriptions::
- ParameterDescription*)&Common__VideoStreamingCapability__parameter3_array,
- "(ii)"};
-const ford_message_descriptions::ParameterDescription
- Common__VideoStreamingCapability__parameter4 = {
- "hapticSpatialDataSupported",
- ford_message_descriptions::Boolean,
- false};
-const ford_message_descriptions::ParameterDescription*
- Structs::Common__VideoStreamingCapability__parameters[] = {
- (const ford_message_descriptions::
- ParameterDescription*)&Common__VideoStreamingCapability__parameter1,
- (const ford_message_descriptions::
- ParameterDescription*)&Common__VideoStreamingCapability__parameter2,
- (const ford_message_descriptions::
- ParameterDescription*)&Common__VideoStreamingCapability__parameter3,
- (const ford_message_descriptions::
- ParameterDescription*)&Common__VideoStreamingCapability__parameter4,
- NULL};
-
-const ford_message_descriptions::StructDescription
- Common__SystemCapabilities__parameter1 = {
- {"navigationCapability", ford_message_descriptions::Struct, false},
- Structs::Common__NavigationCapability__parameters};
-const ford_message_descriptions::StructDescription
- Common__SystemCapabilities__parameter2 = {
- {"phoneCapability", ford_message_descriptions::Struct, false},
- Structs::Common__PhoneCapability__parameters};
-const ford_message_descriptions::StructDescription
- Common__SystemCapabilities__parameter3 = {
- {"videoStreamingCapability", ford_message_descriptions::Struct, false},
- Structs::Common__VideoStreamingCapability__parameters};
-/*const ford_message_descriptions::ParameterDescription*
- Structs::Common__SystemCapabilities__parameters[] = {
- (const
- ford_message_descriptions::ParameterDescription*)&Common__SystemCapabilities__parameter1,
- (const
- ford_message_descriptions::ParameterDescription*)&Common__SystemCapabilities__parameter2,
- (const
- ford_message_descriptions::ParameterDescription*)&Common__SystemCapabilities__parameter3,
- NULL };*/
-
-const ford_message_descriptions::StructDescription
- Common__RemoteControlCapabilities__parameter1_array = {
- {"climateControlCapabilities", ford_message_descriptions::Struct, true},
- Structs::Common__ClimateControlCapabilities__parameters};
-const ford_message_descriptions::ArrayDescription
- Common__RemoteControlCapabilities__parameter1 = {
- {"climateControlCapabilities", ford_message_descriptions::Array, false},
- (const ford_message_descriptions::
- ParameterDescription*)&Common__RemoteControlCapabilities__parameter1_array,
- "(s(bb)(bb)(bb)(bb)(bb)(bb)(bb)(bb)(bb)(bai)(bb)(bai))"};
-const ford_message_descriptions::StructDescription
- Common__RemoteControlCapabilities__parameter2_array = {
- {"radioControlCapabilities", ford_message_descriptions::Struct, true},
- Structs::Common__RadioControlCapabilities__parameters};
-const ford_message_descriptions::ArrayDescription
- Common__RemoteControlCapabilities__parameter2 = {
- {"radioControlCapabilities", ford_message_descriptions::Array, false},
- (const ford_message_descriptions::
- ParameterDescription*)&Common__RemoteControlCapabilities__parameter2_array,
- "(s(bb)(bb)(bb)(bb)(bb)(bb)(bb)(bb)(bb))"};
-const ford_message_descriptions::StructDescription
- Common__RemoteControlCapabilities__parameter3_array = {
- {"buttonCapabilities", ford_message_descriptions::Struct, true},
- Structs::Common__ButtonCapabilities__parameters};
-const ford_message_descriptions::ArrayDescription
- Common__RemoteControlCapabilities__parameter3 = {
- {"buttonCapabilities", ford_message_descriptions::Array, false},
- (const ford_message_descriptions::
- ParameterDescription*)&Common__RemoteControlCapabilities__parameter3_array,
- "(ibbb)"};
-const ford_message_descriptions::ParameterDescription*
- Structs::Common__RemoteControlCapabilities__parameters[] = {
- (const ford_message_descriptions::
- ParameterDescription*)&Common__RemoteControlCapabilities__parameter1,
- (const ford_message_descriptions::
- ParameterDescription*)&Common__RemoteControlCapabilities__parameter2,
- (const ford_message_descriptions::
- ParameterDescription*)&Common__RemoteControlCapabilities__parameter3,
- NULL};
-
-const ford_message_descriptions::ParameterDescription
- Common__Rectangle__parameter1 = {
- "x", ford_message_descriptions::Float, true};
-const ford_message_descriptions::ParameterDescription
- Common__Rectangle__parameter2 = {
- "y", ford_message_descriptions::Float, true};
-const ford_message_descriptions::ParameterDescription
- Common__Rectangle__parameter3 = {
- "width", ford_message_descriptions::Float, true};
-const ford_message_descriptions::ParameterDescription
- Common__Rectangle__parameter4 = {
- "height", ford_message_descriptions::Float, true};
-const ford_message_descriptions::ParameterDescription*
- Structs::Common__Rectangle__parameters[] = {
- (const ford_message_descriptions::
- ParameterDescription*)&Common__Rectangle__parameter1,
- (const ford_message_descriptions::
- ParameterDescription*)&Common__Rectangle__parameter2,
- (const ford_message_descriptions::
- ParameterDescription*)&Common__Rectangle__parameter3,
- (const ford_message_descriptions::
- ParameterDescription*)&Common__Rectangle__parameter4,
- NULL};
-
-const ford_message_descriptions::ParameterDescription
- Common__HapticRect__parameter1 = {
- "id", ford_message_descriptions::Integer, true};
-const ford_message_descriptions::StructDescription
- Common__HapticRect__parameter2 = {
- {"rect", ford_message_descriptions::Struct, true},
- Structs::Common__Rectangle__parameters};
-const ford_message_descriptions::ParameterDescription*
- Structs::Common__HapticRect__parameters[] = {
- (const ford_message_descriptions::
- ParameterDescription*)&Common__HapticRect__parameter1,
- (const ford_message_descriptions::
- ParameterDescription*)&Common__HapticRect__parameter2,
- NULL};
-
-const ford_message_descriptions::ParameterDescription*
- Buttons__GetCapabilities__request__parameters[] = {NULL};
-const ford_message_descriptions::MessageDescription
- Buttons__GetCapabilities__request = {
- "Buttons",
- "GetCapabilities",
- hmi_apis::messageType::request,
- hmi_apis::FunctionID::Buttons_GetCapabilities,
- Buttons__GetCapabilities__request__parameters};
-
-const ford_message_descriptions::StructDescription
- Buttons__GetCapabilities__response__parameter1_array = {
- {"capabilities", ford_message_descriptions::Struct, true},
- Structs::Common__ButtonCapabilities__parameters};
-const ford_message_descriptions::ArrayDescription
- Buttons__GetCapabilities__response__parameter1 = {
- {"capabilities", ford_message_descriptions::Array, true},
- (const ford_message_descriptions::
- ParameterDescription*)&Buttons__GetCapabilities__response__parameter1_array,
- "(ibbb)"};
-const ford_message_descriptions::StructDescription
- Buttons__GetCapabilities__response__parameter2 = {
- {"presetBankCapabilities", ford_message_descriptions::Struct, false},
- Structs::Common__PresetBankCapabilities__parameters};
-const ford_message_descriptions::ParameterDescription*
- Buttons__GetCapabilities__response__parameters[] = {
- (const ford_message_descriptions::
- ParameterDescription*)&Buttons__GetCapabilities__response__parameter1,
- (const ford_message_descriptions::
- ParameterDescription*)&Buttons__GetCapabilities__response__parameter2,
- NULL};
-const ford_message_descriptions::MessageDescription
- Buttons__GetCapabilities__response = {
- "Buttons",
- "GetCapabilities",
- hmi_apis::messageType::response,
- hmi_apis::FunctionID::Buttons_GetCapabilities,
- Buttons__GetCapabilities__response__parameters};
-
-const ford_message_descriptions::ParameterDescription
- Buttons__OnButtonEvent__notification__parameter1 = {
- "name", ford_message_descriptions::Enum, true};
-const ford_message_descriptions::ParameterDescription
- Buttons__OnButtonEvent__notification__parameter2 = {
- "mode", ford_message_descriptions::Enum, true};
-const ford_message_descriptions::ParameterDescription
- Buttons__OnButtonEvent__notification__parameter3 = {
- "customButtonID", ford_message_descriptions::Integer, false};
-const ford_message_descriptions::ParameterDescription
- Buttons__OnButtonEvent__notification__parameter4 = {
- "appID", ford_message_descriptions::Integer, false};
-const ford_message_descriptions::ParameterDescription*
- Buttons__OnButtonEvent__notification__parameters[] = {
- (const ford_message_descriptions::
- ParameterDescription*)&Buttons__OnButtonEvent__notification__parameter1,
- (const ford_message_descriptions::
- ParameterDescription*)&Buttons__OnButtonEvent__notification__parameter2,
- (const ford_message_descriptions::
- ParameterDescription*)&Buttons__OnButtonEvent__notification__parameter3,
- (const ford_message_descriptions::
- ParameterDescription*)&Buttons__OnButtonEvent__notification__parameter4,
- NULL};
-const ford_message_descriptions::MessageDescription
- Buttons__OnButtonEvent__notification = {
- "Buttons",
- "OnButtonEvent",
- hmi_apis::messageType::notification,
- hmi_apis::FunctionID::Buttons_OnButtonEvent,
- Buttons__OnButtonEvent__notification__parameters};
-
-const ford_message_descriptions::ParameterDescription
- Buttons__OnButtonPress__notification__parameter1 = {
- "name", ford_message_descriptions::Enum, true};
-const ford_message_descriptions::ParameterDescription
- Buttons__OnButtonPress__notification__parameter2 = {
- "mode", ford_message_descriptions::Enum, true};
-const ford_message_descriptions::ParameterDescription
- Buttons__OnButtonPress__notification__parameter3 = {
- "customButtonID", ford_message_descriptions::Integer, false};
-const ford_message_descriptions::ParameterDescription
- Buttons__OnButtonPress__notification__parameter4 = {
- "appID", ford_message_descriptions::Integer, false};
-const ford_message_descriptions::ParameterDescription*
- Buttons__OnButtonPress__notification__parameters[] = {
- (const ford_message_descriptions::
- ParameterDescription*)&Buttons__OnButtonPress__notification__parameter1,
- (const ford_message_descriptions::
- ParameterDescription*)&Buttons__OnButtonPress__notification__parameter2,
- (const ford_message_descriptions::
- ParameterDescription*)&Buttons__OnButtonPress__notification__parameter3,
- (const ford_message_descriptions::
- ParameterDescription*)&Buttons__OnButtonPress__notification__parameter4,
- NULL};
-const ford_message_descriptions::MessageDescription
- Buttons__OnButtonPress__notification = {
- "Buttons",
- "OnButtonPress",
- hmi_apis::messageType::notification,
- hmi_apis::FunctionID::Buttons_OnButtonPress,
- Buttons__OnButtonPress__notification__parameters};
-
-const ford_message_descriptions::ParameterDescription
- Buttons__OnButtonSubscription__notification__parameter1 = {
- "name", ford_message_descriptions::Enum, true};
-const ford_message_descriptions::ParameterDescription
- Buttons__OnButtonSubscription__notification__parameter2 = {
- "isSubscribed", ford_message_descriptions::Boolean, true};
-const ford_message_descriptions::ParameterDescription
- Buttons__OnButtonSubscription__notification__parameter3 = {
- "appID", ford_message_descriptions::Integer, true};
-const ford_message_descriptions::ParameterDescription*
- Buttons__OnButtonSubscription__notification__parameters[] = {
- (const ford_message_descriptions::
- ParameterDescription*)&Buttons__OnButtonSubscription__notification__parameter1,
- (const ford_message_descriptions::
- ParameterDescription*)&Buttons__OnButtonSubscription__notification__parameter2,
- (const ford_message_descriptions::
- ParameterDescription*)&Buttons__OnButtonSubscription__notification__parameter3,
- NULL};
-const ford_message_descriptions::MessageDescription
- Buttons__OnButtonSubscription__notification = {
- "Buttons",
- "OnButtonSubscription",
- hmi_apis::messageType::notification,
- hmi_apis::FunctionID::Buttons_OnButtonSubscription,
- Buttons__OnButtonSubscription__notification__parameters};
-
-const ford_message_descriptions::ParameterDescription*
- BasicCommunication__OnReady__notification__parameters[] = {NULL};
-const ford_message_descriptions::MessageDescription
- BasicCommunication__OnReady__notification = {
- "BasicCommunication",
- "OnReady",
- hmi_apis::messageType::notification,
- hmi_apis::FunctionID::BasicCommunication_OnReady,
- BasicCommunication__OnReady__notification__parameters};
-
-const ford_message_descriptions::ParameterDescription*
- BasicCommunication__OnStartDeviceDiscovery__notification__parameters[] = {
- NULL};
-const ford_message_descriptions::MessageDescription
- BasicCommunication__OnStartDeviceDiscovery__notification = {
- "BasicCommunication",
- "OnStartDeviceDiscovery",
- hmi_apis::messageType::notification,
- hmi_apis::FunctionID::BasicCommunication_OnStartDeviceDiscovery,
- BasicCommunication__OnStartDeviceDiscovery__notification__parameters};
-
-const ford_message_descriptions::ParameterDescription*
- BasicCommunication__OnUpdateDeviceList__notification__parameters[] = {NULL};
-const ford_message_descriptions::MessageDescription
- BasicCommunication__OnUpdateDeviceList__notification = {
- "BasicCommunication",
- "OnUpdateDeviceList",
- hmi_apis::messageType::notification,
- hmi_apis::FunctionID::BasicCommunication_OnUpdateDeviceList,
- BasicCommunication__OnUpdateDeviceList__notification__parameters};
-
-const ford_message_descriptions::ParameterDescription
- BasicCommunication__OnPhoneCall__notification__parameter1 = {
- "isActive", ford_message_descriptions::Boolean, true};
-const ford_message_descriptions::ParameterDescription*
- BasicCommunication__OnPhoneCall__notification__parameters[] = {
- (const ford_message_descriptions::
- ParameterDescription*)&BasicCommunication__OnPhoneCall__notification__parameter1,
- NULL};
-const ford_message_descriptions::MessageDescription
- BasicCommunication__OnPhoneCall__notification = {
- "BasicCommunication",
- "OnPhoneCall",
- hmi_apis::messageType::notification,
- hmi_apis::FunctionID::BasicCommunication_OnPhoneCall,
- BasicCommunication__OnPhoneCall__notification__parameters};
-
-const ford_message_descriptions::ParameterDescription
- BasicCommunication__OnEmergencyEvent__notification__parameter1 = {
- "enabled", ford_message_descriptions::Boolean, true};
-const ford_message_descriptions::ParameterDescription*
- BasicCommunication__OnEmergencyEvent__notification__parameters[] = {
- (const ford_message_descriptions::
- ParameterDescription*)&BasicCommunication__OnEmergencyEvent__notification__parameter1,
- NULL};
-const ford_message_descriptions::MessageDescription
- BasicCommunication__OnEmergencyEvent__notification = {
- "BasicCommunication",
- "OnEmergencyEvent",
- hmi_apis::messageType::notification,
- hmi_apis::FunctionID::BasicCommunication_OnEmergencyEvent,
- BasicCommunication__OnEmergencyEvent__notification__parameters};
-
-const ford_message_descriptions::ParameterDescription
- BasicCommunication__OnResumeAudioSource__notification__parameter1 = {
- "appID", ford_message_descriptions::Integer, true};
-const ford_message_descriptions::ParameterDescription*
- BasicCommunication__OnResumeAudioSource__notification__parameters[] = {
- (const ford_message_descriptions::
- ParameterDescription*)&BasicCommunication__OnResumeAudioSource__notification__parameter1,
- NULL};
-const ford_message_descriptions::MessageDescription
- BasicCommunication__OnResumeAudioSource__notification = {
- "BasicCommunication",
- "OnResumeAudioSource",
- hmi_apis::messageType::notification,
- hmi_apis::FunctionID::BasicCommunication_OnResumeAudioSource,
- BasicCommunication__OnResumeAudioSource__notification__parameters};
-
-const ford_message_descriptions::ParameterDescription*
- BasicCommunication__OnSDLPersistenceComplete__notification__parameters[] = {
- NULL};
-const ford_message_descriptions::MessageDescription
- BasicCommunication__OnSDLPersistenceComplete__notification = {
- "BasicCommunication",
- "OnSDLPersistenceComplete",
- hmi_apis::messageType::notification,
- hmi_apis::FunctionID::BasicCommunication_OnSDLPersistenceComplete,
- BasicCommunication__OnSDLPersistenceComplete__notification__parameters};
-
-const ford_message_descriptions::StructDescription
- BasicCommunication__UpdateAppList__request__parameter1_array = {
- {"applications", ford_message_descriptions::Struct, true},
- Structs::Common__HMIApplication__parameters};
-const ford_message_descriptions::ArrayDescription
- BasicCommunication__UpdateAppList__request__parameter1 = {
- {"applications", ford_message_descriptions::Array, true},
- (const ford_message_descriptions::
- ParameterDescription*)&BasicCommunication__UpdateAppList__request__parameter1_array,
- "(s(bs)(bs)(ss(bi)(bb))s(ba(si))(bas)iib(bai)(bb)(bai))"};
-const ford_message_descriptions::ParameterDescription*
- BasicCommunication__UpdateAppList__request__parameters[] = {
- (const ford_message_descriptions::
- ParameterDescription*)&BasicCommunication__UpdateAppList__request__parameter1,
- NULL};
-const ford_message_descriptions::MessageDescription
- BasicCommunication__UpdateAppList__request = {
- "BasicCommunication",
- "UpdateAppList",
- hmi_apis::messageType::request,
- hmi_apis::FunctionID::BasicCommunication_UpdateAppList,
- BasicCommunication__UpdateAppList__request__parameters};
-
-const ford_message_descriptions::ParameterDescription*
- BasicCommunication__UpdateAppList__response__parameters[] = {NULL};
-const ford_message_descriptions::MessageDescription
- BasicCommunication__UpdateAppList__response = {
- "BasicCommunication",
- "UpdateAppList",
- hmi_apis::messageType::response,
- hmi_apis::FunctionID::BasicCommunication_UpdateAppList,
- BasicCommunication__UpdateAppList__response__parameters};
-
-const ford_message_descriptions::StructDescription
- BasicCommunication__UpdateDeviceList__request__parameter1_array = {
- {"deviceList", ford_message_descriptions::Struct, true},
- Structs::Common__DeviceInfo__parameters};
-const ford_message_descriptions::ArrayDescription
- BasicCommunication__UpdateDeviceList__request__parameter1 = {
- {"deviceList", ford_message_descriptions::Array, true},
- (const ford_message_descriptions::
- ParameterDescription*)&BasicCommunication__UpdateDeviceList__request__parameter1_array,
- "(ss(bi)(bb))"};
-const ford_message_descriptions::ParameterDescription*
- BasicCommunication__UpdateDeviceList__request__parameters[] = {
- (const ford_message_descriptions::
- ParameterDescription*)&BasicCommunication__UpdateDeviceList__request__parameter1,
- NULL};
-const ford_message_descriptions::MessageDescription
- BasicCommunication__UpdateDeviceList__request = {
- "BasicCommunication",
- "UpdateDeviceList",
- hmi_apis::messageType::request,
- hmi_apis::FunctionID::BasicCommunication_UpdateDeviceList,
- BasicCommunication__UpdateDeviceList__request__parameters};
-
-const ford_message_descriptions::ParameterDescription*
- BasicCommunication__UpdateDeviceList__response__parameters[] = {NULL};
-const ford_message_descriptions::MessageDescription
- BasicCommunication__UpdateDeviceList__response = {
- "BasicCommunication",
- "UpdateDeviceList",
- hmi_apis::messageType::response,
- hmi_apis::FunctionID::BasicCommunication_UpdateDeviceList,
- BasicCommunication__UpdateDeviceList__response__parameters};
-
-const ford_message_descriptions::ParameterDescription
- BasicCommunication__OnFileRemoved__notification__parameter1 = {
- "fileName", ford_message_descriptions::String, true};
-const ford_message_descriptions::ParameterDescription
- BasicCommunication__OnFileRemoved__notification__parameter2 = {
- "fileType", ford_message_descriptions::Enum, true};
-const ford_message_descriptions::ParameterDescription
- BasicCommunication__OnFileRemoved__notification__parameter3 = {
- "appID", ford_message_descriptions::Integer, true};
-const ford_message_descriptions::ParameterDescription*
- BasicCommunication__OnFileRemoved__notification__parameters[] = {
- (const ford_message_descriptions::
- ParameterDescription*)&BasicCommunication__OnFileRemoved__notification__parameter1,
- (const ford_message_descriptions::
- ParameterDescription*)&BasicCommunication__OnFileRemoved__notification__parameter2,
- (const ford_message_descriptions::
- ParameterDescription*)&BasicCommunication__OnFileRemoved__notification__parameter3,
- NULL};
-const ford_message_descriptions::MessageDescription
- BasicCommunication__OnFileRemoved__notification = {
- "BasicCommunication",
- "OnFileRemoved",
- hmi_apis::messageType::notification,
- hmi_apis::FunctionID::BasicCommunication_OnFileRemoved,
- BasicCommunication__OnFileRemoved__notification__parameters};
-
-const ford_message_descriptions::StructDescription
- BasicCommunication__AllowDeviceToConnect__request__parameter1 = {
- {"device", ford_message_descriptions::Struct, true},
- Structs::Common__DeviceInfo__parameters};
-const ford_message_descriptions::ParameterDescription*
- BasicCommunication__AllowDeviceToConnect__request__parameters[] = {
- (const ford_message_descriptions::
- ParameterDescription*)&BasicCommunication__AllowDeviceToConnect__request__parameter1,
- NULL};
-const ford_message_descriptions::MessageDescription
- BasicCommunication__AllowDeviceToConnect__request = {
- "BasicCommunication",
- "AllowDeviceToConnect",
- hmi_apis::messageType::request,
- hmi_apis::FunctionID::BasicCommunication_AllowDeviceToConnect,
- BasicCommunication__AllowDeviceToConnect__request__parameters};
-
-const ford_message_descriptions::ParameterDescription
- BasicCommunication__AllowDeviceToConnect__response__parameter1 = {
- "allow", ford_message_descriptions::Boolean, true};
-const ford_message_descriptions::ParameterDescription*
- BasicCommunication__AllowDeviceToConnect__response__parameters[] = {
- (const ford_message_descriptions::
- ParameterDescription*)&BasicCommunication__AllowDeviceToConnect__response__parameter1,
- NULL};
-const ford_message_descriptions::MessageDescription
- BasicCommunication__AllowDeviceToConnect__response = {
- "BasicCommunication",
- "AllowDeviceToConnect",
- hmi_apis::messageType::response,
- hmi_apis::FunctionID::BasicCommunication_AllowDeviceToConnect,
- BasicCommunication__AllowDeviceToConnect__response__parameters};
-
-const ford_message_descriptions::StructDescription
- BasicCommunication__OnDeviceChosen__notification__parameter1 = {
- {"deviceInfo", ford_message_descriptions::Struct, true},
- Structs::Common__DeviceInfo__parameters};
-const ford_message_descriptions::ParameterDescription*
- BasicCommunication__OnDeviceChosen__notification__parameters[] = {
- (const ford_message_descriptions::
- ParameterDescription*)&BasicCommunication__OnDeviceChosen__notification__parameter1,
- NULL};
-const ford_message_descriptions::MessageDescription
- BasicCommunication__OnDeviceChosen__notification = {
- "BasicCommunication",
- "OnDeviceChosen",
- hmi_apis::messageType::notification,
- hmi_apis::FunctionID::BasicCommunication_OnDeviceChosen,
- BasicCommunication__OnDeviceChosen__notification__parameters};
-
-const ford_message_descriptions::StructDescription
- BasicCommunication__OnFindApplications__notification__parameter1 = {
- {"deviceInfo", ford_message_descriptions::Struct, false},
- Structs::Common__DeviceInfo__parameters};
-const ford_message_descriptions::ParameterDescription*
- BasicCommunication__OnFindApplications__notification__parameters[] = {
- (const ford_message_descriptions::
- ParameterDescription*)&BasicCommunication__OnFindApplications__notification__parameter1,
- NULL};
-const ford_message_descriptions::MessageDescription
- BasicCommunication__OnFindApplications__notification = {
- "BasicCommunication",
- "OnFindApplications",
- hmi_apis::messageType::notification,
- hmi_apis::FunctionID::BasicCommunication_OnFindApplications,
- BasicCommunication__OnFindApplications__notification__parameters};
-
-const ford_message_descriptions::ParameterDescription
- BasicCommunication__ActivateApp__request__parameter1 = {
- "appID", ford_message_descriptions::Integer, true};
-const ford_message_descriptions::ParameterDescription
- BasicCommunication__ActivateApp__request__parameter2 = {
- "priority", ford_message_descriptions::Enum, false};
-const ford_message_descriptions::ParameterDescription
- BasicCommunication__ActivateApp__request__parameter3 = {
- "level", ford_message_descriptions::Enum, false};
-const ford_message_descriptions::ParameterDescription*
- BasicCommunication__ActivateApp__request__parameters[] = {
- (const ford_message_descriptions::
- ParameterDescription*)&BasicCommunication__ActivateApp__request__parameter1,
- (const ford_message_descriptions::
- ParameterDescription*)&BasicCommunication__ActivateApp__request__parameter2,
- (const ford_message_descriptions::
- ParameterDescription*)&BasicCommunication__ActivateApp__request__parameter3,
- NULL};
-const ford_message_descriptions::MessageDescription
- BasicCommunication__ActivateApp__request = {
- "BasicCommunication",
- "ActivateApp",
- hmi_apis::messageType::request,
- hmi_apis::FunctionID::BasicCommunication_ActivateApp,
- BasicCommunication__ActivateApp__request__parameters};
-
-const ford_message_descriptions::ParameterDescription*
- BasicCommunication__ActivateApp__response__parameters[] = {NULL};
-const ford_message_descriptions::MessageDescription
- BasicCommunication__ActivateApp__response = {
- "BasicCommunication",
- "ActivateApp",
- hmi_apis::messageType::response,
- hmi_apis::FunctionID::BasicCommunication_ActivateApp,
- BasicCommunication__ActivateApp__response__parameters};
-
-const ford_message_descriptions::ParameterDescription
- BasicCommunication__OnAppActivated__notification__parameter1 = {
- "appID", ford_message_descriptions::Integer, true};
-const ford_message_descriptions::ParameterDescription*
- BasicCommunication__OnAppActivated__notification__parameters[] = {
- (const ford_message_descriptions::
- ParameterDescription*)&BasicCommunication__OnAppActivated__notification__parameter1,
- NULL};
-const ford_message_descriptions::MessageDescription
- BasicCommunication__OnAppActivated__notification = {
- "BasicCommunication",
- "OnAppActivated",
- hmi_apis::messageType::notification,
- hmi_apis::FunctionID::BasicCommunication_OnAppActivated,
- BasicCommunication__OnAppActivated__notification__parameters};
-
-const ford_message_descriptions::ParameterDescription
- BasicCommunication__OnAppDeactivated__notification__parameter1 = {
- "appID", ford_message_descriptions::Integer, true};
-const ford_message_descriptions::ParameterDescription
- BasicCommunication__OnAppDeactivated__notification__parameter2 = {
- "reason", ford_message_descriptions::Enum, true};
-const ford_message_descriptions::ParameterDescription*
- BasicCommunication__OnAppDeactivated__notification__parameters[] = {
- (const ford_message_descriptions::
- ParameterDescription*)&BasicCommunication__OnAppDeactivated__notification__parameter1,
- (const ford_message_descriptions::
- ParameterDescription*)&BasicCommunication__OnAppDeactivated__notification__parameter2,
- NULL};
-const ford_message_descriptions::MessageDescription
- BasicCommunication__OnAppDeactivated__notification = {
- "BasicCommunication",
- "OnAppDeactivated",
- hmi_apis::messageType::notification,
- hmi_apis::FunctionID::BasicCommunication_OnAppDeactivated,
- BasicCommunication__OnAppDeactivated__notification__parameters};
-
-const ford_message_descriptions::StructDescription
- BasicCommunication__OnAppRegistered__notification__parameter1 = {
- {"application", ford_message_descriptions::Struct, true},
- Structs::Common__HMIApplication__parameters};
-const ford_message_descriptions::StructDescription
- BasicCommunication__OnAppRegistered__notification__parameter2_array = {
- {"ttsName", ford_message_descriptions::Struct, true},
- Structs::Common__TTSChunk__parameters};
-const ford_message_descriptions::ArrayDescription
- BasicCommunication__OnAppRegistered__notification__parameter2 = {
- {"ttsName", ford_message_descriptions::Array, false},
- (const ford_message_descriptions::
- ParameterDescription*)&BasicCommunication__OnAppRegistered__notification__parameter2_array,
- "(si)"};
-const ford_message_descriptions::ParameterDescription
- BasicCommunication__OnAppRegistered__notification__parameter3_array = {
- "vrSynonyms", ford_message_descriptions::String, true};
-const ford_message_descriptions::ArrayDescription
- BasicCommunication__OnAppRegistered__notification__parameter3 = {
- {"vrSynonyms", ford_message_descriptions::Array, false},
- (const ford_message_descriptions::
- ParameterDescription*)&BasicCommunication__OnAppRegistered__notification__parameter3_array,
- "s"};
-const ford_message_descriptions::ParameterDescription
- BasicCommunication__OnAppRegistered__notification__parameter4 = {
- "resumeVrGrammars", ford_message_descriptions::Boolean, false};
-const ford_message_descriptions::ParameterDescription
- BasicCommunication__OnAppRegistered__notification__parameter5 = {
- "priority", ford_message_descriptions::Enum, false};
-const ford_message_descriptions::ParameterDescription*
- BasicCommunication__OnAppRegistered__notification__parameters[] = {
- (const ford_message_descriptions::
- ParameterDescription*)&BasicCommunication__OnAppRegistered__notification__parameter1,
- (const ford_message_descriptions::
- ParameterDescription*)&BasicCommunication__OnAppRegistered__notification__parameter2,
- (const ford_message_descriptions::
- ParameterDescription*)&BasicCommunication__OnAppRegistered__notification__parameter3,
- (const ford_message_descriptions::
- ParameterDescription*)&BasicCommunication__OnAppRegistered__notification__parameter4,
- (const ford_message_descriptions::
- ParameterDescription*)&BasicCommunication__OnAppRegistered__notification__parameter5,
- NULL};
-const ford_message_descriptions::MessageDescription
- BasicCommunication__OnAppRegistered__notification = {
- "BasicCommunication",
- "OnAppRegistered",
- hmi_apis::messageType::notification,
- hmi_apis::FunctionID::BasicCommunication_OnAppRegistered,
- BasicCommunication__OnAppRegistered__notification__parameters};
-
-const ford_message_descriptions::ParameterDescription
- BasicCommunication__OnAppUnregistered__notification__parameter1 = {
- "unexpectedDisconnect", ford_message_descriptions::Boolean, true};
-const ford_message_descriptions::ParameterDescription
- BasicCommunication__OnAppUnregistered__notification__parameter2 = {
- "appID", ford_message_descriptions::Integer, true};
-const ford_message_descriptions::ParameterDescription*
- BasicCommunication__OnAppUnregistered__notification__parameters[] = {
- (const ford_message_descriptions::
- ParameterDescription*)&BasicCommunication__OnAppUnregistered__notification__parameter1,
- (const ford_message_descriptions::
- ParameterDescription*)&BasicCommunication__OnAppUnregistered__notification__parameter2,
- NULL};
-const ford_message_descriptions::MessageDescription
- BasicCommunication__OnAppUnregistered__notification = {
- "BasicCommunication",
- "OnAppUnregistered",
- hmi_apis::messageType::notification,
- hmi_apis::FunctionID::BasicCommunication_OnAppUnregistered,
- BasicCommunication__OnAppUnregistered__notification__parameters};
-
-const ford_message_descriptions::ParameterDescription
- BasicCommunication__OnExitApplication__notification__parameter1 = {
- "reason", ford_message_descriptions::Enum, true};
-const ford_message_descriptions::ParameterDescription
- BasicCommunication__OnExitApplication__notification__parameter2 = {
- "appID", ford_message_descriptions::Integer, true};
-const ford_message_descriptions::ParameterDescription*
- BasicCommunication__OnExitApplication__notification__parameters[] = {
- (const ford_message_descriptions::
- ParameterDescription*)&BasicCommunication__OnExitApplication__notification__parameter1,
- (const ford_message_descriptions::
- ParameterDescription*)&BasicCommunication__OnExitApplication__notification__parameter2,
- NULL};
-const ford_message_descriptions::MessageDescription
- BasicCommunication__OnExitApplication__notification = {
- "BasicCommunication",
- "OnExitApplication",
- hmi_apis::messageType::notification,
- hmi_apis::FunctionID::BasicCommunication_OnExitApplication,
- BasicCommunication__OnExitApplication__notification__parameters};
-
-const ford_message_descriptions::ParameterDescription
- BasicCommunication__OnExitAllApplications__notification__parameter1 = {
- "reason", ford_message_descriptions::Enum, true};
-const ford_message_descriptions::ParameterDescription*
- BasicCommunication__OnExitAllApplications__notification__parameters[] = {
- (const ford_message_descriptions::
- ParameterDescription*)&BasicCommunication__OnExitAllApplications__notification__parameter1,
- NULL};
-const ford_message_descriptions::MessageDescription
- BasicCommunication__OnExitAllApplications__notification = {
- "BasicCommunication",
- "OnExitAllApplications",
- hmi_apis::messageType::notification,
- hmi_apis::FunctionID::BasicCommunication_OnExitAllApplications,
- BasicCommunication__OnExitAllApplications__notification__parameters};
-
-const ford_message_descriptions::ParameterDescription*
- BasicCommunication__OnAwakeSDL__notification__parameters[] = {NULL};
-const ford_message_descriptions::MessageDescription
- BasicCommunication__OnAwakeSDL__notification = {
- "BasicCommunication",
- "OnAwakeSDL",
- hmi_apis::messageType::notification,
- hmi_apis::FunctionID::BasicCommunication_OnAwakeSDL,
- BasicCommunication__OnAwakeSDL__notification__parameters};
-
-const ford_message_descriptions::ParameterDescription*
- BasicCommunication__MixingAudioSupported__request__parameters[] = {NULL};
-const ford_message_descriptions::MessageDescription
- BasicCommunication__MixingAudioSupported__request = {
- "BasicCommunication",
- "MixingAudioSupported",
- hmi_apis::messageType::request,
- hmi_apis::FunctionID::BasicCommunication_MixingAudioSupported,
- BasicCommunication__MixingAudioSupported__request__parameters};
-
-const ford_message_descriptions::ParameterDescription
- BasicCommunication__MixingAudioSupported__response__parameter1 = {
- "attenuatedSupported", ford_message_descriptions::Boolean, true};
-const ford_message_descriptions::ParameterDescription*
- BasicCommunication__MixingAudioSupported__response__parameters[] = {
- (const ford_message_descriptions::
- ParameterDescription*)&BasicCommunication__MixingAudioSupported__response__parameter1,
- NULL};
-const ford_message_descriptions::MessageDescription
- BasicCommunication__MixingAudioSupported__response = {
- "BasicCommunication",
- "MixingAudioSupported",
- hmi_apis::messageType::response,
- hmi_apis::FunctionID::BasicCommunication_MixingAudioSupported,
- BasicCommunication__MixingAudioSupported__response__parameters};
-
-const ford_message_descriptions::ParameterDescription
- BasicCommunication__PlayTone__notification__parameter1 = {
- "appID", ford_message_descriptions::Integer, true};
-const ford_message_descriptions::ParameterDescription
- BasicCommunication__PlayTone__notification__parameter2 = {
- "methodName", ford_message_descriptions::Enum, true};
-const ford_message_descriptions::ParameterDescription*
- BasicCommunication__PlayTone__notification__parameters[] = {
- (const ford_message_descriptions::
- ParameterDescription*)&BasicCommunication__PlayTone__notification__parameter1,
- (const ford_message_descriptions::
- ParameterDescription*)&BasicCommunication__PlayTone__notification__parameter2,
- NULL};
-const ford_message_descriptions::MessageDescription
- BasicCommunication__PlayTone__notification = {
- "BasicCommunication",
- "PlayTone",
- hmi_apis::messageType::notification,
- hmi_apis::FunctionID::BasicCommunication_PlayTone,
- BasicCommunication__PlayTone__notification__parameters};
-
-const ford_message_descriptions::ParameterDescription
- BasicCommunication__DialNumber__request__parameter1 = {
- "number", ford_message_descriptions::String, true};
-const ford_message_descriptions::ParameterDescription
- BasicCommunication__DialNumber__request__parameter2 = {
- "appID", ford_message_descriptions::Integer, true};
-const ford_message_descriptions::ParameterDescription*
- BasicCommunication__DialNumber__request__parameters[] = {
- (const ford_message_descriptions::
- ParameterDescription*)&BasicCommunication__DialNumber__request__parameter1,
- (const ford_message_descriptions::
- ParameterDescription*)&BasicCommunication__DialNumber__request__parameter2,
- NULL};
-const ford_message_descriptions::MessageDescription
- BasicCommunication__DialNumber__request = {
- "BasicCommunication",
- "DialNumber",
- hmi_apis::messageType::request,
- hmi_apis::FunctionID::BasicCommunication_DialNumber,
- BasicCommunication__DialNumber__request__parameters};
-
-const ford_message_descriptions::ParameterDescription*
- BasicCommunication__DialNumber__response__parameters[] = {NULL};
-const ford_message_descriptions::MessageDescription
- BasicCommunication__DialNumber__response = {
- "BasicCommunication",
- "DialNumber",
- hmi_apis::messageType::response,
- hmi_apis::FunctionID::BasicCommunication_DialNumber,
- BasicCommunication__DialNumber__response__parameters};
-
-const ford_message_descriptions::ParameterDescription
- BasicCommunication__OnSystemRequest__notification__parameter1 = {
- "requestType", ford_message_descriptions::Enum, true};
-const ford_message_descriptions::ParameterDescription
- BasicCommunication__OnSystemRequest__notification__parameter2 = {
- "url", ford_message_descriptions::String, false};
-const ford_message_descriptions::ParameterDescription
- BasicCommunication__OnSystemRequest__notification__parameter3 = {
- "fileType", ford_message_descriptions::Enum, false};
-const ford_message_descriptions::ParameterDescription
- BasicCommunication__OnSystemRequest__notification__parameter4 = {
- "offset", ford_message_descriptions::Integer, false};
-const ford_message_descriptions::ParameterDescription
- BasicCommunication__OnSystemRequest__notification__parameter5 = {
- "length", ford_message_descriptions::Integer, false};
-const ford_message_descriptions::ParameterDescription
- BasicCommunication__OnSystemRequest__notification__parameter6 = {
- "timeout", ford_message_descriptions::Integer, false};
-const ford_message_descriptions::ParameterDescription
- BasicCommunication__OnSystemRequest__notification__parameter7 = {
- "fileName", ford_message_descriptions::String, true};
-const ford_message_descriptions::ParameterDescription
- BasicCommunication__OnSystemRequest__notification__parameter8 = {
- "appID", ford_message_descriptions::String, false};
-const ford_message_descriptions::ParameterDescription*
- BasicCommunication__OnSystemRequest__notification__parameters[] = {
- (const ford_message_descriptions::
- ParameterDescription*)&BasicCommunication__OnSystemRequest__notification__parameter1,
- (const ford_message_descriptions::
- ParameterDescription*)&BasicCommunication__OnSystemRequest__notification__parameter2,
- (const ford_message_descriptions::
- ParameterDescription*)&BasicCommunication__OnSystemRequest__notification__parameter3,
- (const ford_message_descriptions::
- ParameterDescription*)&BasicCommunication__OnSystemRequest__notification__parameter4,
- (const ford_message_descriptions::
- ParameterDescription*)&BasicCommunication__OnSystemRequest__notification__parameter5,
- (const ford_message_descriptions::
- ParameterDescription*)&BasicCommunication__OnSystemRequest__notification__parameter6,
- (const ford_message_descriptions::
- ParameterDescription*)&BasicCommunication__OnSystemRequest__notification__parameter7,
- (const ford_message_descriptions::
- ParameterDescription*)&BasicCommunication__OnSystemRequest__notification__parameter8,
- NULL};
-const ford_message_descriptions::MessageDescription
- BasicCommunication__OnSystemRequest__notification = {
- "BasicCommunication",
- "OnSystemRequest",
- hmi_apis::messageType::notification,
- hmi_apis::FunctionID::BasicCommunication_OnSystemRequest,
- BasicCommunication__OnSystemRequest__notification__parameters};
-
-const ford_message_descriptions::ParameterDescription
- BasicCommunication__SystemRequest__request__parameter1 = {
- "requestType", ford_message_descriptions::Enum, true};
-const ford_message_descriptions::ParameterDescription
- BasicCommunication__SystemRequest__request__parameter2 = {
- "fileName", ford_message_descriptions::String, true};
-const ford_message_descriptions::ParameterDescription
- BasicCommunication__SystemRequest__request__parameter3 = {
- "appID", ford_message_descriptions::String, false};
-const ford_message_descriptions::ParameterDescription*
- BasicCommunication__SystemRequest__request__parameters[] = {
- (const ford_message_descriptions::
- ParameterDescription*)&BasicCommunication__SystemRequest__request__parameter1,
- (const ford_message_descriptions::
- ParameterDescription*)&BasicCommunication__SystemRequest__request__parameter2,
- (const ford_message_descriptions::
- ParameterDescription*)&BasicCommunication__SystemRequest__request__parameter3,
- NULL};
-const ford_message_descriptions::MessageDescription
- BasicCommunication__SystemRequest__request = {
- "BasicCommunication",
- "SystemRequest",
- hmi_apis::messageType::request,
- hmi_apis::FunctionID::BasicCommunication_SystemRequest,
- BasicCommunication__SystemRequest__request__parameters};
-
-const ford_message_descriptions::ParameterDescription*
- BasicCommunication__SystemRequest__response__parameters[] = {NULL};
-const ford_message_descriptions::MessageDescription
- BasicCommunication__SystemRequest__response = {
- "BasicCommunication",
- "SystemRequest",
- hmi_apis::messageType::response,
- hmi_apis::FunctionID::BasicCommunication_SystemRequest,
- BasicCommunication__SystemRequest__response__parameters};
-
-const ford_message_descriptions::ParameterDescription
- BasicCommunication__PolicyUpdate__request__parameter1 = {
- "file", ford_message_descriptions::String, true};
-const ford_message_descriptions::ParameterDescription
- BasicCommunication__PolicyUpdate__request__parameter2 = {
- "timeout", ford_message_descriptions::Integer, true};
-const ford_message_descriptions::ParameterDescription
- BasicCommunication__PolicyUpdate__request__parameter3_array = {
- "retry", ford_message_descriptions::Integer, true};
-const ford_message_descriptions::ArrayDescription
- BasicCommunication__PolicyUpdate__request__parameter3 = {
- {"retry", ford_message_descriptions::Array, true},
- (const ford_message_descriptions::
- ParameterDescription*)&BasicCommunication__PolicyUpdate__request__parameter3_array,
- "i"};
-const ford_message_descriptions::ParameterDescription*
- BasicCommunication__PolicyUpdate__request__parameters[] = {
- (const ford_message_descriptions::
- ParameterDescription*)&BasicCommunication__PolicyUpdate__request__parameter1,
- (const ford_message_descriptions::
- ParameterDescription*)&BasicCommunication__PolicyUpdate__request__parameter2,
- (const ford_message_descriptions::
- ParameterDescription*)&BasicCommunication__PolicyUpdate__request__parameter3,
- NULL};
-const ford_message_descriptions::MessageDescription
- BasicCommunication__PolicyUpdate__request = {
- "BasicCommunication",
- "PolicyUpdate",
- hmi_apis::messageType::request,
- hmi_apis::FunctionID::BasicCommunication_PolicyUpdate,
- BasicCommunication__PolicyUpdate__request__parameters};
-
-const ford_message_descriptions::ParameterDescription*
- BasicCommunication__PolicyUpdate__response__parameters[] = {NULL};
-const ford_message_descriptions::MessageDescription
- BasicCommunication__PolicyUpdate__response = {
- "BasicCommunication",
- "PolicyUpdate",
- hmi_apis::messageType::response,
- hmi_apis::FunctionID::BasicCommunication_PolicyUpdate,
- BasicCommunication__PolicyUpdate__response__parameters};
-
-const ford_message_descriptions::ParameterDescription*
- BasicCommunication__OnSDLClose__notification__parameters[] = {NULL};
-const ford_message_descriptions::MessageDescription
- BasicCommunication__OnSDLClose__notification = {
- "BasicCommunication",
- "OnSDLClose",
- hmi_apis::messageType::notification,
- hmi_apis::FunctionID::BasicCommunication_OnSDLClose,
- BasicCommunication__OnSDLClose__notification__parameters};
-
-const ford_message_descriptions::ParameterDescription
- BasicCommunication__OnPutFile__notification__parameter1 = {
- "offset", ford_message_descriptions::Integer, false};
-const ford_message_descriptions::ParameterDescription
- BasicCommunication__OnPutFile__notification__parameter2 = {
- "length", ford_message_descriptions::Integer, false};
-const ford_message_descriptions::ParameterDescription
- BasicCommunication__OnPutFile__notification__parameter3 = {
- "fileSize", ford_message_descriptions::Integer, false};
-const ford_message_descriptions::ParameterDescription
- BasicCommunication__OnPutFile__notification__parameter4 = {
- "FileName", ford_message_descriptions::String, true};
-const ford_message_descriptions::ParameterDescription
- BasicCommunication__OnPutFile__notification__parameter5 = {
- "syncFileName", ford_message_descriptions::String, true};
-const ford_message_descriptions::ParameterDescription
- BasicCommunication__OnPutFile__notification__parameter6 = {
- "fileType", ford_message_descriptions::Enum, true};
-const ford_message_descriptions::ParameterDescription
- BasicCommunication__OnPutFile__notification__parameter7 = {
- "persistentFile", ford_message_descriptions::Boolean, false};
-const ford_message_descriptions::ParameterDescription*
- BasicCommunication__OnPutFile__notification__parameters[] = {
- (const ford_message_descriptions::
- ParameterDescription*)&BasicCommunication__OnPutFile__notification__parameter1,
- (const ford_message_descriptions::
- ParameterDescription*)&BasicCommunication__OnPutFile__notification__parameter2,
- (const ford_message_descriptions::
- ParameterDescription*)&BasicCommunication__OnPutFile__notification__parameter3,
- (const ford_message_descriptions::
- ParameterDescription*)&BasicCommunication__OnPutFile__notification__parameter4,
- (const ford_message_descriptions::
- ParameterDescription*)&BasicCommunication__OnPutFile__notification__parameter5,
- (const ford_message_descriptions::
- ParameterDescription*)&BasicCommunication__OnPutFile__notification__parameter6,
- (const ford_message_descriptions::
- ParameterDescription*)&BasicCommunication__OnPutFile__notification__parameter7,
- NULL};
-const ford_message_descriptions::MessageDescription
- BasicCommunication__OnPutFile__notification = {
- "BasicCommunication",
- "OnPutFile",
- hmi_apis::messageType::notification,
- hmi_apis::FunctionID::BasicCommunication_OnPutFile,
- BasicCommunication__OnPutFile__notification__parameters};
-
-const ford_message_descriptions::ParameterDescription*
- BasicCommunication__GetSystemInfo__request__parameters[] = {NULL};
-const ford_message_descriptions::MessageDescription
- BasicCommunication__GetSystemInfo__request = {
- "BasicCommunication",
- "GetSystemInfo",
- hmi_apis::messageType::request,
- hmi_apis::FunctionID::BasicCommunication_GetSystemInfo,
- BasicCommunication__GetSystemInfo__request__parameters};
-
-const ford_message_descriptions::ParameterDescription
- BasicCommunication__GetSystemInfo__response__parameter1 = {
- "ccpu_version", ford_message_descriptions::String, true};
-const ford_message_descriptions::ParameterDescription
- BasicCommunication__GetSystemInfo__response__parameter2 = {
- "language", ford_message_descriptions::Enum, true};
-const ford_message_descriptions::ParameterDescription
- BasicCommunication__GetSystemInfo__response__parameter3 = {
- "wersCountryCode", ford_message_descriptions::String, true};
-const ford_message_descriptions::ParameterDescription*
- BasicCommunication__GetSystemInfo__response__parameters[] = {
- (const ford_message_descriptions::
- ParameterDescription*)&BasicCommunication__GetSystemInfo__response__parameter1,
- (const ford_message_descriptions::
- ParameterDescription*)&BasicCommunication__GetSystemInfo__response__parameter2,
- (const ford_message_descriptions::
- ParameterDescription*)&BasicCommunication__GetSystemInfo__response__parameter3,
- NULL};
-const ford_message_descriptions::MessageDescription
- BasicCommunication__GetSystemInfo__response = {
- "BasicCommunication",
- "GetSystemInfo",
- hmi_apis::messageType::response,
- hmi_apis::FunctionID::BasicCommunication_GetSystemInfo,
- BasicCommunication__GetSystemInfo__response__parameters};
-
-const ford_message_descriptions::ParameterDescription
- BasicCommunication__OnSystemInfoChanged__notification__parameter1 = {
- "language", ford_message_descriptions::Enum, true};
-const ford_message_descriptions::ParameterDescription*
- BasicCommunication__OnSystemInfoChanged__notification__parameters[] = {
- (const ford_message_descriptions::
- ParameterDescription*)&BasicCommunication__OnSystemInfoChanged__notification__parameter1,
- NULL};
-const ford_message_descriptions::MessageDescription
- BasicCommunication__OnSystemInfoChanged__notification = {
- "BasicCommunication",
- "OnSystemInfoChanged",
- hmi_apis::messageType::notification,
- hmi_apis::FunctionID::BasicCommunication_OnSystemInfoChanged,
- BasicCommunication__OnSystemInfoChanged__notification__parameters};
-
-const ford_message_descriptions::ParameterDescription*
- BasicCommunication__OnIgnitionCycleOver__notification__parameters[] = {
- NULL};
-const ford_message_descriptions::MessageDescription
- BasicCommunication__OnIgnitionCycleOver__notification = {
- "BasicCommunication",
- "OnIgnitionCycleOver",
- hmi_apis::messageType::notification,
- hmi_apis::FunctionID::BasicCommunication_OnIgnitionCycleOver,
- BasicCommunication__OnIgnitionCycleOver__notification__parameters};
-
-const ford_message_descriptions::ParameterDescription
- BasicCommunication__DecryptCertificate__request__parameter1 = {
- "fileName", ford_message_descriptions::String, true};
-const ford_message_descriptions::ParameterDescription*
- BasicCommunication__DecryptCertificate__request__parameters[] = {
- (const ford_message_descriptions::
- ParameterDescription*)&BasicCommunication__DecryptCertificate__request__parameter1,
- NULL};
-const ford_message_descriptions::MessageDescription
- BasicCommunication__DecryptCertificate__request = {
- "BasicCommunication",
- "DecryptCertificate",
- hmi_apis::messageType::request,
- hmi_apis::FunctionID::BasicCommunication_DecryptCertificate,
- BasicCommunication__DecryptCertificate__request__parameters};
-
-const ford_message_descriptions::ParameterDescription*
- BasicCommunication__DecryptCertificate__response__parameters[] = {NULL};
-const ford_message_descriptions::MessageDescription
- BasicCommunication__DecryptCertificate__response = {
- "BasicCommunication",
- "DecryptCertificate",
- hmi_apis::messageType::response,
- hmi_apis::FunctionID::BasicCommunication_DecryptCertificate,
- BasicCommunication__DecryptCertificate__response__parameters};
-
-const ford_message_descriptions::ParameterDescription
- BasicCommunication__OnEventChanged__notification__parameter1 = {
- "eventName", ford_message_descriptions::Enum, true};
-const ford_message_descriptions::ParameterDescription
- BasicCommunication__OnEventChanged__notification__parameter2 = {
- "isActive", ford_message_descriptions::Boolean, true};
-const ford_message_descriptions::ParameterDescription*
- BasicCommunication__OnEventChanged__notification__parameters[] = {
- (const ford_message_descriptions::
- ParameterDescription*)&BasicCommunication__OnEventChanged__notification__parameter1,
- (const ford_message_descriptions::
- ParameterDescription*)&BasicCommunication__OnEventChanged__notification__parameter2,
- NULL};
-const ford_message_descriptions::MessageDescription
- BasicCommunication__OnEventChanged__notification = {
- "BasicCommunication",
- "OnEventChanged",
- hmi_apis::messageType::notification,
- hmi_apis::FunctionID::BasicCommunication_OnEventChanged,
- BasicCommunication__OnEventChanged__notification__parameters};
-
-const ford_message_descriptions::ParameterDescription*
- VR__IsReady__request__parameters[] = {NULL};
-const ford_message_descriptions::MessageDescription VR__IsReady__request = {
- "VR",
- "IsReady",
- hmi_apis::messageType::request,
- hmi_apis::FunctionID::VR_IsReady,
- VR__IsReady__request__parameters};
-
-const ford_message_descriptions::ParameterDescription
- VR__IsReady__response__parameter1 = {
- "available", ford_message_descriptions::Boolean, true};
-const ford_message_descriptions::ParameterDescription*
- VR__IsReady__response__parameters[] = {
- (const ford_message_descriptions::
- ParameterDescription*)&VR__IsReady__response__parameter1,
- NULL};
-const ford_message_descriptions::MessageDescription VR__IsReady__response = {
- "VR",
- "IsReady",
- hmi_apis::messageType::response,
- hmi_apis::FunctionID::VR_IsReady,
- VR__IsReady__response__parameters};
-
-const ford_message_descriptions::ParameterDescription*
- VR__Started__notification__parameters[] = {NULL};
-const ford_message_descriptions::MessageDescription VR__Started__notification =
- {"VR",
- "Started",
- hmi_apis::messageType::notification,
- hmi_apis::FunctionID::VR_Started,
- VR__Started__notification__parameters};
-
-const ford_message_descriptions::ParameterDescription*
- VR__Stopped__notification__parameters[] = {NULL};
-const ford_message_descriptions::MessageDescription VR__Stopped__notification =
- {"VR",
- "Stopped",
- hmi_apis::messageType::notification,
- hmi_apis::FunctionID::VR_Stopped,
- VR__Stopped__notification__parameters};
-
-const ford_message_descriptions::ParameterDescription
- VR__AddCommand__request__parameter1 = {
- "cmdID", ford_message_descriptions::Integer, true};
-const ford_message_descriptions::ParameterDescription
- VR__AddCommand__request__parameter2_array = {
- "vrCommands", ford_message_descriptions::String, true};
-const ford_message_descriptions::ArrayDescription
- VR__AddCommand__request__parameter2 = {
- {"vrCommands", ford_message_descriptions::Array, true},
- (const ford_message_descriptions::
- ParameterDescription*)&VR__AddCommand__request__parameter2_array,
- "s"};
-const ford_message_descriptions::ParameterDescription
- VR__AddCommand__request__parameter3 = {
- "type", ford_message_descriptions::Enum, true};
-const ford_message_descriptions::ParameterDescription
- VR__AddCommand__request__parameter4 = {
- "grammarID", ford_message_descriptions::Integer, true};
-const ford_message_descriptions::ParameterDescription
- VR__AddCommand__request__parameter5 = {
- "appID", ford_message_descriptions::Integer, false};
-const ford_message_descriptions::ParameterDescription*
- VR__AddCommand__request__parameters[] = {
- (const ford_message_descriptions::
- ParameterDescription*)&VR__AddCommand__request__parameter1,
- (const ford_message_descriptions::
- ParameterDescription*)&VR__AddCommand__request__parameter2,
- (const ford_message_descriptions::
- ParameterDescription*)&VR__AddCommand__request__parameter3,
- (const ford_message_descriptions::
- ParameterDescription*)&VR__AddCommand__request__parameter4,
- (const ford_message_descriptions::
- ParameterDescription*)&VR__AddCommand__request__parameter5,
- NULL};
-const ford_message_descriptions::MessageDescription VR__AddCommand__request = {
- "VR",
- "AddCommand",
- hmi_apis::messageType::request,
- hmi_apis::FunctionID::VR_AddCommand,
- VR__AddCommand__request__parameters};
-
-const ford_message_descriptions::ParameterDescription*
- VR__AddCommand__response__parameters[] = {NULL};
-const ford_message_descriptions::MessageDescription VR__AddCommand__response = {
- "VR",
- "AddCommand",
- hmi_apis::messageType::response,
- hmi_apis::FunctionID::VR_AddCommand,
- VR__AddCommand__response__parameters};
-
-const ford_message_descriptions::ParameterDescription
- VR__DeleteCommand__request__parameter1 = {
- "cmdID", ford_message_descriptions::Integer, true};
-const ford_message_descriptions::ParameterDescription
- VR__DeleteCommand__request__parameter2 = {
- "type", ford_message_descriptions::Enum, true};
-const ford_message_descriptions::ParameterDescription
- VR__DeleteCommand__request__parameter3 = {
- "grammarID", ford_message_descriptions::Integer, true};
-const ford_message_descriptions::ParameterDescription
- VR__DeleteCommand__request__parameter4 = {
- "appID", ford_message_descriptions::Integer, true};
-const ford_message_descriptions::ParameterDescription*
- VR__DeleteCommand__request__parameters[] = {
- (const ford_message_descriptions::
- ParameterDescription*)&VR__DeleteCommand__request__parameter1,
- (const ford_message_descriptions::
- ParameterDescription*)&VR__DeleteCommand__request__parameter2,
- (const ford_message_descriptions::
- ParameterDescription*)&VR__DeleteCommand__request__parameter3,
- (const ford_message_descriptions::
- ParameterDescription*)&VR__DeleteCommand__request__parameter4,
- NULL};
-const ford_message_descriptions::MessageDescription VR__DeleteCommand__request =
- {"VR",
- "DeleteCommand",
- hmi_apis::messageType::request,
- hmi_apis::FunctionID::VR_DeleteCommand,
- VR__DeleteCommand__request__parameters};
-
-const ford_message_descriptions::ParameterDescription*
- VR__DeleteCommand__response__parameters[] = {NULL};
-const ford_message_descriptions::MessageDescription
- VR__DeleteCommand__response = {"VR",
- "DeleteCommand",
- hmi_apis::messageType::response,
- hmi_apis::FunctionID::VR_DeleteCommand,
- VR__DeleteCommand__response__parameters};
-
-const ford_message_descriptions::StructDescription
- VR__PerformInteraction__request__parameter1_array = {
- {"helpPrompt", ford_message_descriptions::Struct, true},
- Structs::Common__TTSChunk__parameters};
-const ford_message_descriptions::ArrayDescription
- VR__PerformInteraction__request__parameter1 = {
- {"helpPrompt", ford_message_descriptions::Array, false},
- (const ford_message_descriptions::
- ParameterDescription*)&VR__PerformInteraction__request__parameter1_array,
- "(si)"};
-const ford_message_descriptions::StructDescription
- VR__PerformInteraction__request__parameter2_array = {
- {"initialPrompt", ford_message_descriptions::Struct, true},
- Structs::Common__TTSChunk__parameters};
-const ford_message_descriptions::ArrayDescription
- VR__PerformInteraction__request__parameter2 = {
- {"initialPrompt", ford_message_descriptions::Array, false},
- (const ford_message_descriptions::
- ParameterDescription*)&VR__PerformInteraction__request__parameter2_array,
- "(si)"};
-const ford_message_descriptions::StructDescription
- VR__PerformInteraction__request__parameter3_array = {
- {"timeoutPrompt", ford_message_descriptions::Struct, true},
- Structs::Common__TTSChunk__parameters};
-const ford_message_descriptions::ArrayDescription
- VR__PerformInteraction__request__parameter3 = {
- {"timeoutPrompt", ford_message_descriptions::Array, false},
- (const ford_message_descriptions::
- ParameterDescription*)&VR__PerformInteraction__request__parameter3_array,
- "(si)"};
-const ford_message_descriptions::ParameterDescription
- VR__PerformInteraction__request__parameter4 = {
- "timeout", ford_message_descriptions::Integer, true};
-const ford_message_descriptions::ParameterDescription
- VR__PerformInteraction__request__parameter5_array = {
- "grammarID", ford_message_descriptions::Integer, true};
-const ford_message_descriptions::ArrayDescription
- VR__PerformInteraction__request__parameter5 = {
- {"grammarID", ford_message_descriptions::Array, false},
- (const ford_message_descriptions::
- ParameterDescription*)&VR__PerformInteraction__request__parameter5_array,
- "i"};
-const ford_message_descriptions::ParameterDescription*
- VR__PerformInteraction__request__parameters[] = {
- (const ford_message_descriptions::
- ParameterDescription*)&VR__PerformInteraction__request__parameter1,
- (const ford_message_descriptions::
- ParameterDescription*)&VR__PerformInteraction__request__parameter2,
- (const ford_message_descriptions::
- ParameterDescription*)&VR__PerformInteraction__request__parameter3,
- (const ford_message_descriptions::
- ParameterDescription*)&VR__PerformInteraction__request__parameter4,
- (const ford_message_descriptions::
- ParameterDescription*)&VR__PerformInteraction__request__parameter5,
- NULL};
-const ford_message_descriptions::MessageDescription
- VR__PerformInteraction__request = {
- "VR",
- "PerformInteraction",
- hmi_apis::messageType::request,
- hmi_apis::FunctionID::VR_PerformInteraction,
- VR__PerformInteraction__request__parameters};
-
-const ford_message_descriptions::ParameterDescription
- VR__PerformInteraction__response__parameter1 = {
- "choiceID", ford_message_descriptions::Integer, false};
-const ford_message_descriptions::ParameterDescription*
- VR__PerformInteraction__response__parameters[] = {
- (const ford_message_descriptions::
- ParameterDescription*)&VR__PerformInteraction__response__parameter1,
- NULL};
-const ford_message_descriptions::MessageDescription
- VR__PerformInteraction__response = {
- "VR",
- "PerformInteraction",
- hmi_apis::messageType::response,
- hmi_apis::FunctionID::VR_PerformInteraction,
- VR__PerformInteraction__response__parameters};
-
-const ford_message_descriptions::ParameterDescription
- VR__OnCommand__notification__parameter1 = {
- "cmdID", ford_message_descriptions::Integer, true};
-const ford_message_descriptions::ParameterDescription
- VR__OnCommand__notification__parameter2 = {
- "appID", ford_message_descriptions::Integer, true};
-const ford_message_descriptions::ParameterDescription*
- VR__OnCommand__notification__parameters[] = {
- (const ford_message_descriptions::
- ParameterDescription*)&VR__OnCommand__notification__parameter1,
- (const ford_message_descriptions::
- ParameterDescription*)&VR__OnCommand__notification__parameter2,
- NULL};
-const ford_message_descriptions::MessageDescription
- VR__OnCommand__notification = {"VR",
- "OnCommand",
- hmi_apis::messageType::notification,
- hmi_apis::FunctionID::VR_OnCommand,
- VR__OnCommand__notification__parameters};
-
-const ford_message_descriptions::ParameterDescription
- VR__ChangeRegistration__request__parameter1_array = {
- "vrSynonyms", ford_message_descriptions::String, true};
-const ford_message_descriptions::ArrayDescription
- VR__ChangeRegistration__request__parameter1 = {
- {"vrSynonyms", ford_message_descriptions::Array, false},
- (const ford_message_descriptions::
- ParameterDescription*)&VR__ChangeRegistration__request__parameter1_array,
- "s"};
-const ford_message_descriptions::ParameterDescription
- VR__ChangeRegistration__request__parameter2 = {
- "language", ford_message_descriptions::Enum, true};
-const ford_message_descriptions::ParameterDescription
- VR__ChangeRegistration__request__parameter3 = {
- "appID", ford_message_descriptions::Integer, true};
-const ford_message_descriptions::ParameterDescription*
- VR__ChangeRegistration__request__parameters[] = {
- (const ford_message_descriptions::
- ParameterDescription*)&VR__ChangeRegistration__request__parameter1,
- (const ford_message_descriptions::
- ParameterDescription*)&VR__ChangeRegistration__request__parameter2,
- (const ford_message_descriptions::
- ParameterDescription*)&VR__ChangeRegistration__request__parameter3,
- NULL};
-const ford_message_descriptions::MessageDescription
- VR__ChangeRegistration__request = {
- "VR",
- "ChangeRegistration",
- hmi_apis::messageType::request,
- hmi_apis::FunctionID::VR_ChangeRegistration,
- VR__ChangeRegistration__request__parameters};
-
-const ford_message_descriptions::ParameterDescription*
- VR__ChangeRegistration__response__parameters[] = {NULL};
-const ford_message_descriptions::MessageDescription
- VR__ChangeRegistration__response = {
- "VR",
- "ChangeRegistration",
- hmi_apis::messageType::response,
- hmi_apis::FunctionID::VR_ChangeRegistration,
- VR__ChangeRegistration__response__parameters};
-
-const ford_message_descriptions::ParameterDescription
- VR__OnLanguageChange__notification__parameter1 = {
- "language", ford_message_descriptions::Enum, true};
-const ford_message_descriptions::ParameterDescription*
- VR__OnLanguageChange__notification__parameters[] = {
- (const ford_message_descriptions::
- ParameterDescription*)&VR__OnLanguageChange__notification__parameter1,
- NULL};
-const ford_message_descriptions::MessageDescription
- VR__OnLanguageChange__notification = {
- "VR",
- "OnLanguageChange",
- hmi_apis::messageType::notification,
- hmi_apis::FunctionID::VR_OnLanguageChange,
- VR__OnLanguageChange__notification__parameters};
-
-const ford_message_descriptions::ParameterDescription*
- VR__GetSupportedLanguages__request__parameters[] = {NULL};
-const ford_message_descriptions::MessageDescription
- VR__GetSupportedLanguages__request = {
- "VR",
- "GetSupportedLanguages",
- hmi_apis::messageType::request,
- hmi_apis::FunctionID::VR_GetSupportedLanguages,
- VR__GetSupportedLanguages__request__parameters};
-
-const ford_message_descriptions::ParameterDescription
- VR__GetSupportedLanguages__response__parameter1_array = {
- "languages", ford_message_descriptions::Enum, true};
-const ford_message_descriptions::ArrayDescription
- VR__GetSupportedLanguages__response__parameter1 = {
- {"languages", ford_message_descriptions::Array, true},
- (const ford_message_descriptions::
- ParameterDescription*)&VR__GetSupportedLanguages__response__parameter1_array,
- "i"};
-const ford_message_descriptions::ParameterDescription*
- VR__GetSupportedLanguages__response__parameters[] = {
- (const ford_message_descriptions::
- ParameterDescription*)&VR__GetSupportedLanguages__response__parameter1,
- NULL};
-const ford_message_descriptions::MessageDescription
- VR__GetSupportedLanguages__response = {
- "VR",
- "GetSupportedLanguages",
- hmi_apis::messageType::response,
- hmi_apis::FunctionID::VR_GetSupportedLanguages,
- VR__GetSupportedLanguages__response__parameters};
-
-const ford_message_descriptions::ParameterDescription*
- VR__GetLanguage__request__parameters[] = {NULL};
-const ford_message_descriptions::MessageDescription VR__GetLanguage__request = {
- "VR",
- "GetLanguage",
- hmi_apis::messageType::request,
- hmi_apis::FunctionID::VR_GetLanguage,
- VR__GetLanguage__request__parameters};
-
-const ford_message_descriptions::ParameterDescription
- VR__GetLanguage__response__parameter1 = {
- "language", ford_message_descriptions::Enum, true};
-const ford_message_descriptions::ParameterDescription*
- VR__GetLanguage__response__parameters[] = {
- (const ford_message_descriptions::
- ParameterDescription*)&VR__GetLanguage__response__parameter1,
- NULL};
-const ford_message_descriptions::MessageDescription VR__GetLanguage__response =
- {"VR",
- "GetLanguage",
- hmi_apis::messageType::response,
- hmi_apis::FunctionID::VR_GetLanguage,
- VR__GetLanguage__response__parameters};
-
-const ford_message_descriptions::ParameterDescription*
- VR__GetCapabilities__request__parameters[] = {NULL};
-const ford_message_descriptions::MessageDescription
- VR__GetCapabilities__request = {"VR",
- "GetCapabilities",
- hmi_apis::messageType::request,
- hmi_apis::FunctionID::VR_GetCapabilities,
- VR__GetCapabilities__request__parameters};
-
-const ford_message_descriptions::ParameterDescription
- VR__GetCapabilities__response__parameter1_array = {
- "vrCapabilities", ford_message_descriptions::Enum, true};
-const ford_message_descriptions::ArrayDescription
- VR__GetCapabilities__response__parameter1 = {
- {"vrCapabilities", ford_message_descriptions::Array, false},
- (const ford_message_descriptions::
- ParameterDescription*)&VR__GetCapabilities__response__parameter1_array,
- "i"};
-const ford_message_descriptions::ParameterDescription*
- VR__GetCapabilities__response__parameters[] = {
- (const ford_message_descriptions::
- ParameterDescription*)&VR__GetCapabilities__response__parameter1,
- NULL};
-const ford_message_descriptions::MessageDescription
- VR__GetCapabilities__response = {"VR",
- "GetCapabilities",
- hmi_apis::messageType::response,
- hmi_apis::FunctionID::VR_GetCapabilities,
- VR__GetCapabilities__response__parameters};
-
-const ford_message_descriptions::ParameterDescription*
- TTS__GetCapabilities__request__parameters[] = {NULL};
-const ford_message_descriptions::MessageDescription
- TTS__GetCapabilities__request = {"TTS",
- "GetCapabilities",
- hmi_apis::messageType::request,
- hmi_apis::FunctionID::TTS_GetCapabilities,
- TTS__GetCapabilities__request__parameters};
-
-const ford_message_descriptions::ParameterDescription
- TTS__GetCapabilities__response__parameter1_array = {
- "speechCapabilities", ford_message_descriptions::Enum, true};
-const ford_message_descriptions::ArrayDescription
- TTS__GetCapabilities__response__parameter1 = {
- {"speechCapabilities", ford_message_descriptions::Array, true},
- (const ford_message_descriptions::
- ParameterDescription*)&TTS__GetCapabilities__response__parameter1_array,
- "i"};
-const ford_message_descriptions::ParameterDescription
- TTS__GetCapabilities__response__parameter2_array = {
- "prerecordedSpeechCapabilities", ford_message_descriptions::Enum, true};
-const ford_message_descriptions::ArrayDescription
- TTS__GetCapabilities__response__parameter2 = {
- {"prerecordedSpeechCapabilities",
- ford_message_descriptions::Array,
- true},
- (const ford_message_descriptions::
- ParameterDescription*)&TTS__GetCapabilities__response__parameter2_array,
- "i"};
-const ford_message_descriptions::ParameterDescription*
- TTS__GetCapabilities__response__parameters[] = {
- (const ford_message_descriptions::
- ParameterDescription*)&TTS__GetCapabilities__response__parameter1,
- (const ford_message_descriptions::
- ParameterDescription*)&TTS__GetCapabilities__response__parameter2,
- NULL};
-const ford_message_descriptions::MessageDescription
- TTS__GetCapabilities__response = {
- "TTS",
- "GetCapabilities",
- hmi_apis::messageType::response,
- hmi_apis::FunctionID::TTS_GetCapabilities,
- TTS__GetCapabilities__response__parameters};
-
-const ford_message_descriptions::ParameterDescription*
- TTS__Started__notification__parameters[] = {NULL};
-const ford_message_descriptions::MessageDescription TTS__Started__notification =
- {"TTS",
- "Started",
- hmi_apis::messageType::notification,
- hmi_apis::FunctionID::TTS_Started,
- TTS__Started__notification__parameters};
-
-const ford_message_descriptions::ParameterDescription*
- TTS__Stopped__notification__parameters[] = {NULL};
-const ford_message_descriptions::MessageDescription TTS__Stopped__notification =
- {"TTS",
- "Stopped",
- hmi_apis::messageType::notification,
- hmi_apis::FunctionID::TTS_Stopped,
- TTS__Stopped__notification__parameters};
-
-const ford_message_descriptions::ParameterDescription*
- TTS__IsReady__request__parameters[] = {NULL};
-const ford_message_descriptions::MessageDescription TTS__IsReady__request = {
- "TTS",
- "IsReady",
- hmi_apis::messageType::request,
- hmi_apis::FunctionID::TTS_IsReady,
- TTS__IsReady__request__parameters};
-
-const ford_message_descriptions::ParameterDescription
- TTS__IsReady__response__parameter1 = {
- "available", ford_message_descriptions::Boolean, true};
-const ford_message_descriptions::ParameterDescription*
- TTS__IsReady__response__parameters[] = {
- (const ford_message_descriptions::
- ParameterDescription*)&TTS__IsReady__response__parameter1,
- NULL};
-const ford_message_descriptions::MessageDescription TTS__IsReady__response = {
- "TTS",
- "IsReady",
- hmi_apis::messageType::response,
- hmi_apis::FunctionID::TTS_IsReady,
- TTS__IsReady__response__parameters};
-
-const ford_message_descriptions::StructDescription
- TTS__Speak__request__parameter1_array = {
- {"ttsChunks", ford_message_descriptions::Struct, true},
- Structs::Common__TTSChunk__parameters};
-const ford_message_descriptions::ArrayDescription
- TTS__Speak__request__parameter1 = {
- {"ttsChunks", ford_message_descriptions::Array, true},
- (const ford_message_descriptions::
- ParameterDescription*)&TTS__Speak__request__parameter1_array,
- "(si)"};
-const ford_message_descriptions::ParameterDescription
- TTS__Speak__request__parameter2 = {
- "appID", ford_message_descriptions::Integer, true};
-const ford_message_descriptions::ParameterDescription
- TTS__Speak__request__parameter3 = {
- "speakType", ford_message_descriptions::Enum, false};
-const ford_message_descriptions::ParameterDescription*
- TTS__Speak__request__parameters[] = {
- (const ford_message_descriptions::
- ParameterDescription*)&TTS__Speak__request__parameter1,
- (const ford_message_descriptions::
- ParameterDescription*)&TTS__Speak__request__parameter2,
- (const ford_message_descriptions::
- ParameterDescription*)&TTS__Speak__request__parameter3,
- NULL};
-const ford_message_descriptions::MessageDescription TTS__Speak__request = {
- "TTS",
- "Speak",
- hmi_apis::messageType::request,
- hmi_apis::FunctionID::TTS_Speak,
- TTS__Speak__request__parameters};
-
-const ford_message_descriptions::ParameterDescription*
- TTS__Speak__response__parameters[] = {NULL};
-const ford_message_descriptions::MessageDescription TTS__Speak__response = {
- "TTS",
- "Speak",
- hmi_apis::messageType::response,
- hmi_apis::FunctionID::TTS_Speak,
- TTS__Speak__response__parameters};
-
-const ford_message_descriptions::ParameterDescription*
- TTS__StopSpeaking__request__parameters[] = {NULL};
-const ford_message_descriptions::MessageDescription TTS__StopSpeaking__request =
- {"TTS",
- "StopSpeaking",
- hmi_apis::messageType::request,
- hmi_apis::FunctionID::TTS_StopSpeaking,
- TTS__StopSpeaking__request__parameters};
-
-const ford_message_descriptions::ParameterDescription*
- TTS__StopSpeaking__response__parameters[] = {NULL};
-const ford_message_descriptions::MessageDescription
- TTS__StopSpeaking__response = {"TTS",
- "StopSpeaking",
- hmi_apis::messageType::response,
- hmi_apis::FunctionID::TTS_StopSpeaking,
- TTS__StopSpeaking__response__parameters};
-
-const ford_message_descriptions::StructDescription
- TTS__ChangeRegistration__request__parameter1_array = {
- {"ttsName", ford_message_descriptions::Struct, true},
- Structs::Common__TTSChunk__parameters};
-const ford_message_descriptions::ArrayDescription
- TTS__ChangeRegistration__request__parameter1 = {
- {"ttsName", ford_message_descriptions::Array, false},
- (const ford_message_descriptions::
- ParameterDescription*)&TTS__ChangeRegistration__request__parameter1_array,
- "(si)"};
-const ford_message_descriptions::ParameterDescription
- TTS__ChangeRegistration__request__parameter2 = {
- "language", ford_message_descriptions::Enum, true};
-const ford_message_descriptions::ParameterDescription
- TTS__ChangeRegistration__request__parameter3 = {
- "appID", ford_message_descriptions::Integer, true};
-const ford_message_descriptions::ParameterDescription*
- TTS__ChangeRegistration__request__parameters[] = {
- (const ford_message_descriptions::
- ParameterDescription*)&TTS__ChangeRegistration__request__parameter1,
- (const ford_message_descriptions::
- ParameterDescription*)&TTS__ChangeRegistration__request__parameter2,
- (const ford_message_descriptions::
- ParameterDescription*)&TTS__ChangeRegistration__request__parameter3,
- NULL};
-const ford_message_descriptions::MessageDescription
- TTS__ChangeRegistration__request = {
- "TTS",
- "ChangeRegistration",
- hmi_apis::messageType::request,
- hmi_apis::FunctionID::TTS_ChangeRegistration,
- TTS__ChangeRegistration__request__parameters};
-
-const ford_message_descriptions::ParameterDescription*
- TTS__ChangeRegistration__response__parameters[] = {NULL};
-const ford_message_descriptions::MessageDescription
- TTS__ChangeRegistration__response = {
- "TTS",
- "ChangeRegistration",
- hmi_apis::messageType::response,
- hmi_apis::FunctionID::TTS_ChangeRegistration,
- TTS__ChangeRegistration__response__parameters};
-
-const ford_message_descriptions::ParameterDescription
- TTS__OnLanguageChange__notification__parameter1 = {
- "language", ford_message_descriptions::Enum, true};
-const ford_message_descriptions::ParameterDescription*
- TTS__OnLanguageChange__notification__parameters[] = {
- (const ford_message_descriptions::
- ParameterDescription*)&TTS__OnLanguageChange__notification__parameter1,
- NULL};
-const ford_message_descriptions::MessageDescription
- TTS__OnLanguageChange__notification = {
- "TTS",
- "OnLanguageChange",
- hmi_apis::messageType::notification,
- hmi_apis::FunctionID::TTS_OnLanguageChange,
- TTS__OnLanguageChange__notification__parameters};
-
-const ford_message_descriptions::ParameterDescription*
- TTS__GetSupportedLanguages__request__parameters[] = {NULL};
-const ford_message_descriptions::MessageDescription
- TTS__GetSupportedLanguages__request = {
- "TTS",
- "GetSupportedLanguages",
- hmi_apis::messageType::request,
- hmi_apis::FunctionID::TTS_GetSupportedLanguages,
- TTS__GetSupportedLanguages__request__parameters};
-
-const ford_message_descriptions::ParameterDescription
- TTS__GetSupportedLanguages__response__parameter1_array = {
- "languages", ford_message_descriptions::Enum, true};
-const ford_message_descriptions::ArrayDescription
- TTS__GetSupportedLanguages__response__parameter1 = {
- {"languages", ford_message_descriptions::Array, true},
- (const ford_message_descriptions::
- ParameterDescription*)&TTS__GetSupportedLanguages__response__parameter1_array,
- "i"};
-const ford_message_descriptions::ParameterDescription*
- TTS__GetSupportedLanguages__response__parameters[] = {
- (const ford_message_descriptions::
- ParameterDescription*)&TTS__GetSupportedLanguages__response__parameter1,
- NULL};
-const ford_message_descriptions::MessageDescription
- TTS__GetSupportedLanguages__response = {
- "TTS",
- "GetSupportedLanguages",
- hmi_apis::messageType::response,
- hmi_apis::FunctionID::TTS_GetSupportedLanguages,
- TTS__GetSupportedLanguages__response__parameters};
-
-const ford_message_descriptions::ParameterDescription*
- TTS__GetLanguage__request__parameters[] = {NULL};
-const ford_message_descriptions::MessageDescription TTS__GetLanguage__request =
- {"TTS",
- "GetLanguage",
- hmi_apis::messageType::request,
- hmi_apis::FunctionID::TTS_GetLanguage,
- TTS__GetLanguage__request__parameters};
-
-const ford_message_descriptions::ParameterDescription
- TTS__GetLanguage__response__parameter1 = {
- "language", ford_message_descriptions::Enum, true};
-const ford_message_descriptions::ParameterDescription*
- TTS__GetLanguage__response__parameters[] = {
- (const ford_message_descriptions::
- ParameterDescription*)&TTS__GetLanguage__response__parameter1,
- NULL};
-const ford_message_descriptions::MessageDescription TTS__GetLanguage__response =
- {"TTS",
- "GetLanguage",
- hmi_apis::messageType::response,
- hmi_apis::FunctionID::TTS_GetLanguage,
- TTS__GetLanguage__response__parameters};
-
-const ford_message_descriptions::StructDescription
- TTS__SetGlobalProperties__request__parameter1_array = {
- {"helpPrompt", ford_message_descriptions::Struct, true},
- Structs::Common__TTSChunk__parameters};
-const ford_message_descriptions::ArrayDescription
- TTS__SetGlobalProperties__request__parameter1 = {
- {"helpPrompt", ford_message_descriptions::Array, false},
- (const ford_message_descriptions::
- ParameterDescription*)&TTS__SetGlobalProperties__request__parameter1_array,
- "(si)"};
-const ford_message_descriptions::StructDescription
- TTS__SetGlobalProperties__request__parameter2_array = {
- {"timeoutPrompt", ford_message_descriptions::Struct, true},
- Structs::Common__TTSChunk__parameters};
-const ford_message_descriptions::ArrayDescription
- TTS__SetGlobalProperties__request__parameter2 = {
- {"timeoutPrompt", ford_message_descriptions::Array, false},
- (const ford_message_descriptions::
- ParameterDescription*)&TTS__SetGlobalProperties__request__parameter2_array,
- "(si)"};
-const ford_message_descriptions::ParameterDescription
- TTS__SetGlobalProperties__request__parameter3 = {
- "appID", ford_message_descriptions::Integer, true};
-const ford_message_descriptions::ParameterDescription*
- TTS__SetGlobalProperties__request__parameters[] = {
- (const ford_message_descriptions::
- ParameterDescription*)&TTS__SetGlobalProperties__request__parameter1,
- (const ford_message_descriptions::
- ParameterDescription*)&TTS__SetGlobalProperties__request__parameter2,
- (const ford_message_descriptions::
- ParameterDescription*)&TTS__SetGlobalProperties__request__parameter3,
- NULL};
-const ford_message_descriptions::MessageDescription
- TTS__SetGlobalProperties__request = {
- "TTS",
- "SetGlobalProperties",
- hmi_apis::messageType::request,
- hmi_apis::FunctionID::TTS_SetGlobalProperties,
- TTS__SetGlobalProperties__request__parameters};
-
-const ford_message_descriptions::ParameterDescription*
- TTS__SetGlobalProperties__response__parameters[] = {NULL};
-const ford_message_descriptions::MessageDescription
- TTS__SetGlobalProperties__response = {
- "TTS",
- "SetGlobalProperties",
- hmi_apis::messageType::response,
- hmi_apis::FunctionID::TTS_SetGlobalProperties,
- TTS__SetGlobalProperties__response__parameters};
-
-const ford_message_descriptions::ParameterDescription
- TTS__OnResetTimeout__notification__parameter1 = {
- "appID", ford_message_descriptions::Integer, true};
-const ford_message_descriptions::ParameterDescription
- TTS__OnResetTimeout__notification__parameter2 = {
- "methodName", ford_message_descriptions::String, true};
-const ford_message_descriptions::ParameterDescription*
- TTS__OnResetTimeout__notification__parameters[] = {
- (const ford_message_descriptions::
- ParameterDescription*)&TTS__OnResetTimeout__notification__parameter1,
- (const ford_message_descriptions::
- ParameterDescription*)&TTS__OnResetTimeout__notification__parameter2,
- NULL};
-const ford_message_descriptions::MessageDescription
- TTS__OnResetTimeout__notification = {
- "TTS",
- "OnResetTimeout",
- hmi_apis::messageType::notification,
- hmi_apis::FunctionID::TTS_OnResetTimeout,
- TTS__OnResetTimeout__notification__parameters};
-
-const ford_message_descriptions::StructDescription
- UI__Alert__request__parameter1_array = {
- {"alertStrings", ford_message_descriptions::Struct, true},
- Structs::Common__TextFieldStruct__parameters};
-const ford_message_descriptions::ArrayDescription
- UI__Alert__request__parameter1 = {
- {"alertStrings", ford_message_descriptions::Array, true},
- (const ford_message_descriptions::
- ParameterDescription*)&UI__Alert__request__parameter1_array,
- "(is)"};
-const ford_message_descriptions::ParameterDescription
- UI__Alert__request__parameter2 = {
- "duration", ford_message_descriptions::Integer, true};
-const ford_message_descriptions::StructDescription
- UI__Alert__request__parameter3_array = {
- {"softButtons", ford_message_descriptions::Struct, true},
- Structs::Common__SoftButton__parameters};
-const ford_message_descriptions::ArrayDescription
- UI__Alert__request__parameter3 = {
- {"softButtons", ford_message_descriptions::Array, false},
- (const ford_message_descriptions::
- ParameterDescription*)&UI__Alert__request__parameter3_array,
- "(i(bs)(b(si))(bb)ii)"};
-const ford_message_descriptions::ParameterDescription
- UI__Alert__request__parameter4 = {
- "progressIndicator", ford_message_descriptions::Boolean, false};
-const ford_message_descriptions::ParameterDescription
- UI__Alert__request__parameter5 = {
- "alertType", ford_message_descriptions::Enum, true};
-const ford_message_descriptions::ParameterDescription
- UI__Alert__request__parameter6 = {
- "appID", ford_message_descriptions::Integer, true};
-const ford_message_descriptions::ParameterDescription*
- UI__Alert__request__parameters[] = {
- (const ford_message_descriptions::
- ParameterDescription*)&UI__Alert__request__parameter1,
- (const ford_message_descriptions::
- ParameterDescription*)&UI__Alert__request__parameter2,
- (const ford_message_descriptions::
- ParameterDescription*)&UI__Alert__request__parameter3,
- (const ford_message_descriptions::
- ParameterDescription*)&UI__Alert__request__parameter4,
- (const ford_message_descriptions::
- ParameterDescription*)&UI__Alert__request__parameter5,
- (const ford_message_descriptions::
- ParameterDescription*)&UI__Alert__request__parameter6,
- NULL};
-const ford_message_descriptions::MessageDescription UI__Alert__request = {
- "UI",
- "Alert",
- hmi_apis::messageType::request,
- hmi_apis::FunctionID::UI_Alert,
- UI__Alert__request__parameters};
-
-const ford_message_descriptions::ParameterDescription
- UI__Alert__response__parameter1 = {
- "tryAgainTime", ford_message_descriptions::Integer, false};
-const ford_message_descriptions::ParameterDescription*
- UI__Alert__response__parameters[] = {
- (const ford_message_descriptions::
- ParameterDescription*)&UI__Alert__response__parameter1,
- NULL};
-const ford_message_descriptions::MessageDescription UI__Alert__response = {
- "UI",
- "Alert",
- hmi_apis::messageType::response,
- hmi_apis::FunctionID::UI_Alert,
- UI__Alert__response__parameters};
-
-const ford_message_descriptions::StructDescription
- UI__Show__request__parameter1_array = {
- {"showStrings", ford_message_descriptions::Struct, true},
- Structs::Common__TextFieldStruct__parameters};
-const ford_message_descriptions::ArrayDescription
- UI__Show__request__parameter1 = {
- {"showStrings", ford_message_descriptions::Array, true},
- (const ford_message_descriptions::
- ParameterDescription*)&UI__Show__request__parameter1_array,
- "(is)"};
-const ford_message_descriptions::ParameterDescription
- UI__Show__request__parameter2 = {
- "alignment", ford_message_descriptions::Enum, false};
-const ford_message_descriptions::StructDescription
- UI__Show__request__parameter3 = {
- {"graphic", ford_message_descriptions::Struct, false},
- Structs::Common__Image__parameters};
-const ford_message_descriptions::StructDescription
- UI__Show__request__parameter4 = {
- {"secondaryGraphic", ford_message_descriptions::Struct, false},
- Structs::Common__Image__parameters};
-const ford_message_descriptions::StructDescription
- UI__Show__request__parameter5_array = {
- {"softButtons", ford_message_descriptions::Struct, true},
- Structs::Common__SoftButton__parameters};
-const ford_message_descriptions::ArrayDescription
- UI__Show__request__parameter5 = {
- {"softButtons", ford_message_descriptions::Array, false},
- (const ford_message_descriptions::
- ParameterDescription*)&UI__Show__request__parameter5_array,
- "(i(bs)(b(si))(bb)ii)"};
-const ford_message_descriptions::ParameterDescription
- UI__Show__request__parameter6_array = {
- "customPresets", ford_message_descriptions::String, true};
-const ford_message_descriptions::ArrayDescription
- UI__Show__request__parameter6 = {
- {"customPresets", ford_message_descriptions::Array, false},
- (const ford_message_descriptions::
- ParameterDescription*)&UI__Show__request__parameter6_array,
- "s"};
-const ford_message_descriptions::ParameterDescription
- UI__Show__request__parameter7 = {
- "appID", ford_message_descriptions::Integer, true};
-const ford_message_descriptions::ParameterDescription*
- UI__Show__request__parameters[] = {
- (const ford_message_descriptions::
- ParameterDescription*)&UI__Show__request__parameter1,
- (const ford_message_descriptions::
- ParameterDescription*)&UI__Show__request__parameter2,
- (const ford_message_descriptions::
- ParameterDescription*)&UI__Show__request__parameter3,
- (const ford_message_descriptions::
- ParameterDescription*)&UI__Show__request__parameter4,
- (const ford_message_descriptions::
- ParameterDescription*)&UI__Show__request__parameter5,
- (const ford_message_descriptions::
- ParameterDescription*)&UI__Show__request__parameter6,
- (const ford_message_descriptions::
- ParameterDescription*)&UI__Show__request__parameter7,
- NULL};
-const ford_message_descriptions::MessageDescription UI__Show__request = {
- "UI",
- "Show",
- hmi_apis::messageType::request,
- hmi_apis::FunctionID::UI_Show,
- UI__Show__request__parameters};
-
-const ford_message_descriptions::ParameterDescription*
- UI__Show__response__parameters[] = {NULL};
-const ford_message_descriptions::MessageDescription UI__Show__response = {
- "UI",
- "Show",
- hmi_apis::messageType::response,
- hmi_apis::FunctionID::UI_Show,
- UI__Show__response__parameters};
-
-const ford_message_descriptions::ParameterDescription
- UI__AddCommand__request__parameter1 = {
- "cmdID", ford_message_descriptions::Integer, true};
-const ford_message_descriptions::StructDescription
- UI__AddCommand__request__parameter2 = {
- {"menuParams", ford_message_descriptions::Struct, false},
- Structs::Common__MenuParams__parameters};
-const ford_message_descriptions::StructDescription
- UI__AddCommand__request__parameter3 = {
- {"cmdIcon", ford_message_descriptions::Struct, false},
- Structs::Common__Image__parameters};
-const ford_message_descriptions::ParameterDescription
- UI__AddCommand__request__parameter4 = {
- "appID", ford_message_descriptions::Integer, true};
-const ford_message_descriptions::ParameterDescription*
- UI__AddCommand__request__parameters[] = {
- (const ford_message_descriptions::
- ParameterDescription*)&UI__AddCommand__request__parameter1,
- (const ford_message_descriptions::
- ParameterDescription*)&UI__AddCommand__request__parameter2,
- (const ford_message_descriptions::
- ParameterDescription*)&UI__AddCommand__request__parameter3,
- (const ford_message_descriptions::
- ParameterDescription*)&UI__AddCommand__request__parameter4,
- NULL};
-const ford_message_descriptions::MessageDescription UI__AddCommand__request = {
- "UI",
- "AddCommand",
- hmi_apis::messageType::request,
- hmi_apis::FunctionID::UI_AddCommand,
- UI__AddCommand__request__parameters};
-
-const ford_message_descriptions::ParameterDescription*
- UI__AddCommand__response__parameters[] = {NULL};
-const ford_message_descriptions::MessageDescription UI__AddCommand__response = {
- "UI",
- "AddCommand",
- hmi_apis::messageType::response,
- hmi_apis::FunctionID::UI_AddCommand,
- UI__AddCommand__response__parameters};
-
-const ford_message_descriptions::ParameterDescription
- UI__DeleteCommand__request__parameter1 = {
- "cmdID", ford_message_descriptions::Integer, true};
-const ford_message_descriptions::ParameterDescription
- UI__DeleteCommand__request__parameter2 = {
- "appID", ford_message_descriptions::Integer, true};
-const ford_message_descriptions::ParameterDescription*
- UI__DeleteCommand__request__parameters[] = {
- (const ford_message_descriptions::
- ParameterDescription*)&UI__DeleteCommand__request__parameter1,
- (const ford_message_descriptions::
- ParameterDescription*)&UI__DeleteCommand__request__parameter2,
- NULL};
-const ford_message_descriptions::MessageDescription UI__DeleteCommand__request =
- {"UI",
- "DeleteCommand",
- hmi_apis::messageType::request,
- hmi_apis::FunctionID::UI_DeleteCommand,
- UI__DeleteCommand__request__parameters};
-
-const ford_message_descriptions::ParameterDescription*
- UI__DeleteCommand__response__parameters[] = {NULL};
-const ford_message_descriptions::MessageDescription
- UI__DeleteCommand__response = {"UI",
- "DeleteCommand",
- hmi_apis::messageType::response,
- hmi_apis::FunctionID::UI_DeleteCommand,
- UI__DeleteCommand__response__parameters};
-
-const ford_message_descriptions::ParameterDescription
- UI__AddSubMenu__request__parameter1 = {
- "menuID", ford_message_descriptions::Integer, true};
-const ford_message_descriptions::StructDescription
- UI__AddSubMenu__request__parameter2 = {
- {"menuParams", ford_message_descriptions::Struct, true},
- Structs::Common__MenuParams__parameters};
-const ford_message_descriptions::ParameterDescription
- UI__AddSubMenu__request__parameter3 = {
- "appID", ford_message_descriptions::Integer, true};
-const ford_message_descriptions::ParameterDescription*
- UI__AddSubMenu__request__parameters[] = {
- (const ford_message_descriptions::
- ParameterDescription*)&UI__AddSubMenu__request__parameter1,
- (const ford_message_descriptions::
- ParameterDescription*)&UI__AddSubMenu__request__parameter2,
- (const ford_message_descriptions::
- ParameterDescription*)&UI__AddSubMenu__request__parameter3,
- NULL};
-const ford_message_descriptions::MessageDescription UI__AddSubMenu__request = {
- "UI",
- "AddSubMenu",
- hmi_apis::messageType::request,
- hmi_apis::FunctionID::UI_AddSubMenu,
- UI__AddSubMenu__request__parameters};
-
-const ford_message_descriptions::ParameterDescription*
- UI__AddSubMenu__response__parameters[] = {NULL};
-const ford_message_descriptions::MessageDescription UI__AddSubMenu__response = {
- "UI",
- "AddSubMenu",
- hmi_apis::messageType::response,
- hmi_apis::FunctionID::UI_AddSubMenu,
- UI__AddSubMenu__response__parameters};
-
-const ford_message_descriptions::ParameterDescription
- UI__DeleteSubMenu__request__parameter1 = {
- "menuID", ford_message_descriptions::Integer, true};
-const ford_message_descriptions::ParameterDescription
- UI__DeleteSubMenu__request__parameter2 = {
- "appID", ford_message_descriptions::Integer, true};
-const ford_message_descriptions::ParameterDescription*
- UI__DeleteSubMenu__request__parameters[] = {
- (const ford_message_descriptions::
- ParameterDescription*)&UI__DeleteSubMenu__request__parameter1,
- (const ford_message_descriptions::
- ParameterDescription*)&UI__DeleteSubMenu__request__parameter2,
- NULL};
-const ford_message_descriptions::MessageDescription UI__DeleteSubMenu__request =
- {"UI",
- "DeleteSubMenu",
- hmi_apis::messageType::request,
- hmi_apis::FunctionID::UI_DeleteSubMenu,
- UI__DeleteSubMenu__request__parameters};
-
-const ford_message_descriptions::ParameterDescription*
- UI__DeleteSubMenu__response__parameters[] = {NULL};
-const ford_message_descriptions::MessageDescription
- UI__DeleteSubMenu__response = {"UI",
- "DeleteSubMenu",
- hmi_apis::messageType::response,
- hmi_apis::FunctionID::UI_DeleteSubMenu,
- UI__DeleteSubMenu__response__parameters};
-
-const ford_message_descriptions::StructDescription
- UI__PerformInteraction__request__parameter1 = {
- {"initialText", ford_message_descriptions::Struct, false},
- Structs::Common__TextFieldStruct__parameters};
-const ford_message_descriptions::StructDescription
- UI__PerformInteraction__request__parameter2_array = {
- {"choiceSet", ford_message_descriptions::Struct, true},
- Structs::Common__Choice__parameters};
-const ford_message_descriptions::ArrayDescription
- UI__PerformInteraction__request__parameter2 = {
- {"choiceSet", ford_message_descriptions::Array, false},
- (const ford_message_descriptions::
- ParameterDescription*)&UI__PerformInteraction__request__parameter2_array,
- "(i(bs)(b(si))(bs)(bs)(b(si)))"};
-const ford_message_descriptions::ParameterDescription
- UI__PerformInteraction__request__parameter3 = {
- "vrHelpTitle", ford_message_descriptions::String, false};
-const ford_message_descriptions::StructDescription
- UI__PerformInteraction__request__parameter4_array = {
- {"vrHelp", ford_message_descriptions::Struct, true},
- Structs::Common__VrHelpItem__parameters};
-const ford_message_descriptions::ArrayDescription
- UI__PerformInteraction__request__parameter4 = {
- {"vrHelp", ford_message_descriptions::Array, false},
- (const ford_message_descriptions::
- ParameterDescription*)&UI__PerformInteraction__request__parameter4_array,
- "(s(b(si))i)"};
-const ford_message_descriptions::ParameterDescription
- UI__PerformInteraction__request__parameter5 = {
- "timeout", ford_message_descriptions::Integer, true};
-const ford_message_descriptions::ParameterDescription
- UI__PerformInteraction__request__parameter6 = {
- "interactionLayout", ford_message_descriptions::Enum, false};
-const ford_message_descriptions::ParameterDescription
- UI__PerformInteraction__request__parameter7 = {
- "appID", ford_message_descriptions::Integer, true};
-const ford_message_descriptions::ParameterDescription*
- UI__PerformInteraction__request__parameters[] = {
- (const ford_message_descriptions::
- ParameterDescription*)&UI__PerformInteraction__request__parameter1,
- (const ford_message_descriptions::
- ParameterDescription*)&UI__PerformInteraction__request__parameter2,
- (const ford_message_descriptions::
- ParameterDescription*)&UI__PerformInteraction__request__parameter3,
- (const ford_message_descriptions::
- ParameterDescription*)&UI__PerformInteraction__request__parameter4,
- (const ford_message_descriptions::
- ParameterDescription*)&UI__PerformInteraction__request__parameter5,
- (const ford_message_descriptions::
- ParameterDescription*)&UI__PerformInteraction__request__parameter6,
- (const ford_message_descriptions::
- ParameterDescription*)&UI__PerformInteraction__request__parameter7,
- NULL};
-const ford_message_descriptions::MessageDescription
- UI__PerformInteraction__request = {
- "UI",
- "PerformInteraction",
- hmi_apis::messageType::request,
- hmi_apis::FunctionID::UI_PerformInteraction,
- UI__PerformInteraction__request__parameters};
-
-const ford_message_descriptions::ParameterDescription
- UI__PerformInteraction__response__parameter1 = {
- "choiceID", ford_message_descriptions::Integer, false};
-const ford_message_descriptions::ParameterDescription
- UI__PerformInteraction__response__parameter2 = {
- "manualTextEntry", ford_message_descriptions::String, false};
-const ford_message_descriptions::ParameterDescription*
- UI__PerformInteraction__response__parameters[] = {
- (const ford_message_descriptions::
- ParameterDescription*)&UI__PerformInteraction__response__parameter1,
- (const ford_message_descriptions::
- ParameterDescription*)&UI__PerformInteraction__response__parameter2,
- NULL};
-const ford_message_descriptions::MessageDescription
- UI__PerformInteraction__response = {
- "UI",
- "PerformInteraction",
- hmi_apis::messageType::response,
- hmi_apis::FunctionID::UI_PerformInteraction,
- UI__PerformInteraction__response__parameters};
-
-const ford_message_descriptions::StructDescription
- UI__SetMediaClockTimer__request__parameter1 = {
- {"startTime", ford_message_descriptions::Struct, false},
- Structs::Common__TimeFormat__parameters};
-const ford_message_descriptions::StructDescription
- UI__SetMediaClockTimer__request__parameter2 = {
- {"endTime", ford_message_descriptions::Struct, false},
- Structs::Common__TimeFormat__parameters};
-const ford_message_descriptions::ParameterDescription
- UI__SetMediaClockTimer__request__parameter3 = {
- "updateMode", ford_message_descriptions::Enum, true};
-const ford_message_descriptions::ParameterDescription
- UI__SetMediaClockTimer__request__parameter4 = {
- "appID", ford_message_descriptions::Integer, true};
-const ford_message_descriptions::ParameterDescription*
- UI__SetMediaClockTimer__request__parameters[] = {
- (const ford_message_descriptions::
- ParameterDescription*)&UI__SetMediaClockTimer__request__parameter1,
- (const ford_message_descriptions::
- ParameterDescription*)&UI__SetMediaClockTimer__request__parameter2,
- (const ford_message_descriptions::
- ParameterDescription*)&UI__SetMediaClockTimer__request__parameter3,
- (const ford_message_descriptions::
- ParameterDescription*)&UI__SetMediaClockTimer__request__parameter4,
- NULL};
-const ford_message_descriptions::MessageDescription
- UI__SetMediaClockTimer__request = {
- "UI",
- "SetMediaClockTimer",
- hmi_apis::messageType::request,
- hmi_apis::FunctionID::UI_SetMediaClockTimer,
- UI__SetMediaClockTimer__request__parameters};
-
-const ford_message_descriptions::ParameterDescription*
- UI__SetMediaClockTimer__response__parameters[] = {NULL};
-const ford_message_descriptions::MessageDescription
- UI__SetMediaClockTimer__response = {
- "UI",
- "SetMediaClockTimer",
- hmi_apis::messageType::response,
- hmi_apis::FunctionID::UI_SetMediaClockTimer,
- UI__SetMediaClockTimer__response__parameters};
-
-const ford_message_descriptions::ParameterDescription
- UI__SetGlobalProperties__request__parameter1 = {
- "vrHelpTitle", ford_message_descriptions::String, false};
-const ford_message_descriptions::StructDescription
- UI__SetGlobalProperties__request__parameter2_array = {
- {"vrHelp", ford_message_descriptions::Struct, true},
- Structs::Common__VrHelpItem__parameters};
-const ford_message_descriptions::ArrayDescription
- UI__SetGlobalProperties__request__parameter2 = {
- {"vrHelp", ford_message_descriptions::Array, false},
- (const ford_message_descriptions::
- ParameterDescription*)&UI__SetGlobalProperties__request__parameter2_array,
- "(s(b(si))i)"};
-const ford_message_descriptions::ParameterDescription
- UI__SetGlobalProperties__request__parameter3 = {
- "menuTitle", ford_message_descriptions::String, false};
-const ford_message_descriptions::StructDescription
- UI__SetGlobalProperties__request__parameter4 = {
- {"menuIcon", ford_message_descriptions::Struct, false},
- Structs::Common__Image__parameters};
-const ford_message_descriptions::StructDescription
- UI__SetGlobalProperties__request__parameter5 = {
- {"keyboardProperties", ford_message_descriptions::Struct, false},
- Structs::Common__KeyboardProperties__parameters};
-const ford_message_descriptions::ParameterDescription
- UI__SetGlobalProperties__request__parameter6 = {
- "appID", ford_message_descriptions::Integer, true};
-const ford_message_descriptions::ParameterDescription*
- UI__SetGlobalProperties__request__parameters[] = {
- (const ford_message_descriptions::
- ParameterDescription*)&UI__SetGlobalProperties__request__parameter1,
- (const ford_message_descriptions::
- ParameterDescription*)&UI__SetGlobalProperties__request__parameter2,
- (const ford_message_descriptions::
- ParameterDescription*)&UI__SetGlobalProperties__request__parameter3,
- (const ford_message_descriptions::
- ParameterDescription*)&UI__SetGlobalProperties__request__parameter4,
- (const ford_message_descriptions::
- ParameterDescription*)&UI__SetGlobalProperties__request__parameter5,
- (const ford_message_descriptions::
- ParameterDescription*)&UI__SetGlobalProperties__request__parameter6,
- NULL};
-const ford_message_descriptions::MessageDescription
- UI__SetGlobalProperties__request = {
- "UI",
- "SetGlobalProperties",
- hmi_apis::messageType::request,
- hmi_apis::FunctionID::UI_SetGlobalProperties,
- UI__SetGlobalProperties__request__parameters};
-
-const ford_message_descriptions::ParameterDescription*
- UI__SetGlobalProperties__response__parameters[] = {NULL};
-const ford_message_descriptions::MessageDescription
- UI__SetGlobalProperties__response = {
- "UI",
- "SetGlobalProperties",
- hmi_apis::messageType::response,
- hmi_apis::FunctionID::UI_SetGlobalProperties,
- UI__SetGlobalProperties__response__parameters};
-
-const ford_message_descriptions::ParameterDescription
- UI__OnCommand__notification__parameter1 = {
- "cmdID", ford_message_descriptions::Integer, true};
-const ford_message_descriptions::ParameterDescription
- UI__OnCommand__notification__parameter2 = {
- "appID", ford_message_descriptions::Integer, true};
-const ford_message_descriptions::ParameterDescription*
- UI__OnCommand__notification__parameters[] = {
- (const ford_message_descriptions::
- ParameterDescription*)&UI__OnCommand__notification__parameter1,
- (const ford_message_descriptions::
- ParameterDescription*)&UI__OnCommand__notification__parameter2,
- NULL};
-const ford_message_descriptions::MessageDescription
- UI__OnCommand__notification = {"UI",
- "OnCommand",
- hmi_apis::messageType::notification,
- hmi_apis::FunctionID::UI_OnCommand,
- UI__OnCommand__notification__parameters};
-
-const ford_message_descriptions::ParameterDescription
- UI__OnSystemContext__notification__parameter1 = {
- "systemContext", ford_message_descriptions::Enum, true};
-const ford_message_descriptions::ParameterDescription
- UI__OnSystemContext__notification__parameter2 = {
- "appID", ford_message_descriptions::Integer, false};
-const ford_message_descriptions::ParameterDescription*
- UI__OnSystemContext__notification__parameters[] = {
- (const ford_message_descriptions::
- ParameterDescription*)&UI__OnSystemContext__notification__parameter1,
- (const ford_message_descriptions::
- ParameterDescription*)&UI__OnSystemContext__notification__parameter2,
- NULL};
-const ford_message_descriptions::MessageDescription
- UI__OnSystemContext__notification = {
- "UI",
- "OnSystemContext",
- hmi_apis::messageType::notification,
- hmi_apis::FunctionID::UI_OnSystemContext,
- UI__OnSystemContext__notification__parameters};
-
-const ford_message_descriptions::ParameterDescription*
- UI__GetCapabilities__request__parameters[] = {NULL};
-const ford_message_descriptions::MessageDescription
- UI__GetCapabilities__request = {"UI",
- "GetCapabilities",
- hmi_apis::messageType::request,
- hmi_apis::FunctionID::UI_GetCapabilities,
- UI__GetCapabilities__request__parameters};
-
-const ford_message_descriptions::StructDescription
- UI__GetCapabilities__response__parameter1 = {
- {"displayCapabilities", ford_message_descriptions::Struct, true},
- Structs::Common__DisplayCapabilities__parameters};
-const ford_message_descriptions::StructDescription
- UI__GetCapabilities__response__parameter2 = {
- {"audioPassThruCapabilities", ford_message_descriptions::Struct, true},
- Structs::Common__AudioPassThruCapabilities__parameters};
-const ford_message_descriptions::ParameterDescription
- UI__GetCapabilities__response__parameter3 = {
- "hmiZoneCapabilities", ford_message_descriptions::Enum, true};
-const ford_message_descriptions::StructDescription
- UI__GetCapabilities__response__parameter4_array = {
- {"softButtonCapabilities", ford_message_descriptions::Struct, true},
- Structs::Common__SoftButtonCapabilities__parameters};
-const ford_message_descriptions::ArrayDescription
- UI__GetCapabilities__response__parameter4 = {
- {"softButtonCapabilities", ford_message_descriptions::Array, false},
- (const ford_message_descriptions::
- ParameterDescription*)&UI__GetCapabilities__response__parameter4_array,
- "(bbbb)"};
-const ford_message_descriptions::StructDescription
- UI__GetCapabilities__response__parameter5 = {
- {"hmiCapabilities", ford_message_descriptions::Struct, false},
- Structs::Common__HMICapabilities__parameters};
-const ford_message_descriptions::ParameterDescription*
- UI__GetCapabilities__response__parameters[] = {
- (const ford_message_descriptions::
- ParameterDescription*)&UI__GetCapabilities__response__parameter1,
- (const ford_message_descriptions::
- ParameterDescription*)&UI__GetCapabilities__response__parameter2,
- (const ford_message_descriptions::
- ParameterDescription*)&UI__GetCapabilities__response__parameter3,
- (const ford_message_descriptions::
- ParameterDescription*)&UI__GetCapabilities__response__parameter4,
- (const ford_message_descriptions::
- ParameterDescription*)&UI__GetCapabilities__response__parameter5,
- NULL};
-const ford_message_descriptions::MessageDescription
- UI__GetCapabilities__response = {"UI",
- "GetCapabilities",
- hmi_apis::messageType::response,
- hmi_apis::FunctionID::UI_GetCapabilities,
- UI__GetCapabilities__response__parameters};
-
-const ford_message_descriptions::ParameterDescription
- UI__ChangeRegistration__request__parameter1 = {
- "appName", ford_message_descriptions::String, false};
-const ford_message_descriptions::ParameterDescription
- UI__ChangeRegistration__request__parameter2 = {
- "ngnMediaScreenAppName", ford_message_descriptions::String, false};
-const ford_message_descriptions::ParameterDescription
- UI__ChangeRegistration__request__parameter3 = {
- "language", ford_message_descriptions::Enum, true};
-const ford_message_descriptions::ParameterDescription
- UI__ChangeRegistration__request__parameter4_array = {
- "appHMIType", ford_message_descriptions::Enum, true};
-const ford_message_descriptions::ArrayDescription
- UI__ChangeRegistration__request__parameter4 = {
- {"appHMIType", ford_message_descriptions::Array, false},
- (const ford_message_descriptions::
- ParameterDescription*)&UI__ChangeRegistration__request__parameter4_array,
- "i"};
-const ford_message_descriptions::ParameterDescription
- UI__ChangeRegistration__request__parameter5 = {
- "appID", ford_message_descriptions::Integer, true};
-const ford_message_descriptions::ParameterDescription*
- UI__ChangeRegistration__request__parameters[] = {
- (const ford_message_descriptions::
- ParameterDescription*)&UI__ChangeRegistration__request__parameter1,
- (const ford_message_descriptions::
- ParameterDescription*)&UI__ChangeRegistration__request__parameter2,
- (const ford_message_descriptions::
- ParameterDescription*)&UI__ChangeRegistration__request__parameter3,
- (const ford_message_descriptions::
- ParameterDescription*)&UI__ChangeRegistration__request__parameter4,
- (const ford_message_descriptions::
- ParameterDescription*)&UI__ChangeRegistration__request__parameter5,
- NULL};
-const ford_message_descriptions::MessageDescription
- UI__ChangeRegistration__request = {
- "UI",
- "ChangeRegistration",
- hmi_apis::messageType::request,
- hmi_apis::FunctionID::UI_ChangeRegistration,
- UI__ChangeRegistration__request__parameters};
-
-const ford_message_descriptions::ParameterDescription*
- UI__ChangeRegistration__response__parameters[] = {NULL};
-const ford_message_descriptions::MessageDescription
- UI__ChangeRegistration__response = {
- "UI",
- "ChangeRegistration",
- hmi_apis::messageType::response,
- hmi_apis::FunctionID::UI_ChangeRegistration,
- UI__ChangeRegistration__response__parameters};
-
-const ford_message_descriptions::ParameterDescription
- UI__OnLanguageChange__notification__parameter1 = {
- "language", ford_message_descriptions::Enum, true};
-const ford_message_descriptions::ParameterDescription*
- UI__OnLanguageChange__notification__parameters[] = {
- (const ford_message_descriptions::
- ParameterDescription*)&UI__OnLanguageChange__notification__parameter1,
- NULL};
-const ford_message_descriptions::MessageDescription
- UI__OnLanguageChange__notification = {
- "UI",
- "OnLanguageChange",
- hmi_apis::messageType::notification,
- hmi_apis::FunctionID::UI_OnLanguageChange,
- UI__OnLanguageChange__notification__parameters};
-
-const ford_message_descriptions::ParameterDescription*
- UI__GetSupportedLanguages__request__parameters[] = {NULL};
-const ford_message_descriptions::MessageDescription
- UI__GetSupportedLanguages__request = {
- "UI",
- "GetSupportedLanguages",
- hmi_apis::messageType::request,
- hmi_apis::FunctionID::UI_GetSupportedLanguages,
- UI__GetSupportedLanguages__request__parameters};
-
-const ford_message_descriptions::ParameterDescription
- UI__GetSupportedLanguages__response__parameter1_array = {
- "languages", ford_message_descriptions::Enum, true};
-const ford_message_descriptions::ArrayDescription
- UI__GetSupportedLanguages__response__parameter1 = {
- {"languages", ford_message_descriptions::Array, true},
- (const ford_message_descriptions::
- ParameterDescription*)&UI__GetSupportedLanguages__response__parameter1_array,
- "i"};
-const ford_message_descriptions::ParameterDescription*
- UI__GetSupportedLanguages__response__parameters[] = {
- (const ford_message_descriptions::
- ParameterDescription*)&UI__GetSupportedLanguages__response__parameter1,
- NULL};
-const ford_message_descriptions::MessageDescription
- UI__GetSupportedLanguages__response = {
- "UI",
- "GetSupportedLanguages",
- hmi_apis::messageType::response,
- hmi_apis::FunctionID::UI_GetSupportedLanguages,
- UI__GetSupportedLanguages__response__parameters};
-
-const ford_message_descriptions::ParameterDescription*
- UI__GetLanguage__request__parameters[] = {NULL};
-const ford_message_descriptions::MessageDescription UI__GetLanguage__request = {
- "UI",
- "GetLanguage",
- hmi_apis::messageType::request,
- hmi_apis::FunctionID::UI_GetLanguage,
- UI__GetLanguage__request__parameters};
-
-const ford_message_descriptions::ParameterDescription
- UI__GetLanguage__response__parameter1 = {
- "language", ford_message_descriptions::Enum, true};
-const ford_message_descriptions::ParameterDescription*
- UI__GetLanguage__response__parameters[] = {
- (const ford_message_descriptions::
- ParameterDescription*)&UI__GetLanguage__response__parameter1,
- NULL};
-const ford_message_descriptions::MessageDescription UI__GetLanguage__response =
- {"UI",
- "GetLanguage",
- hmi_apis::messageType::response,
- hmi_apis::FunctionID::UI_GetLanguage,
- UI__GetLanguage__response__parameters};
-
-const ford_message_descriptions::ParameterDescription
- UI__OnDriverDistraction__notification__parameter1 = {
- "state", ford_message_descriptions::Enum, true};
-const ford_message_descriptions::ParameterDescription*
- UI__OnDriverDistraction__notification__parameters[] = {
- (const ford_message_descriptions::
- ParameterDescription*)&UI__OnDriverDistraction__notification__parameter1,
- NULL};
-const ford_message_descriptions::MessageDescription
- UI__OnDriverDistraction__notification = {
- "UI",
- "OnDriverDistraction",
- hmi_apis::messageType::notification,
- hmi_apis::FunctionID::UI_OnDriverDistraction,
- UI__OnDriverDistraction__notification__parameters};
-
-const ford_message_descriptions::StructDescription
- UI__SetAppIcon__request__parameter1 = {
- {"syncFileName", ford_message_descriptions::Struct, true},
- Structs::Common__Image__parameters};
-const ford_message_descriptions::ParameterDescription
- UI__SetAppIcon__request__parameter2 = {
- "appID", ford_message_descriptions::Integer, true};
-const ford_message_descriptions::ParameterDescription*
- UI__SetAppIcon__request__parameters[] = {
- (const ford_message_descriptions::
- ParameterDescription*)&UI__SetAppIcon__request__parameter1,
- (const ford_message_descriptions::
- ParameterDescription*)&UI__SetAppIcon__request__parameter2,
- NULL};
-const ford_message_descriptions::MessageDescription UI__SetAppIcon__request = {
- "UI",
- "SetAppIcon",
- hmi_apis::messageType::request,
- hmi_apis::FunctionID::UI_SetAppIcon,
- UI__SetAppIcon__request__parameters};
-
-const ford_message_descriptions::ParameterDescription*
- UI__SetAppIcon__response__parameters[] = {NULL};
-const ford_message_descriptions::MessageDescription UI__SetAppIcon__response = {
- "UI",
- "SetAppIcon",
- hmi_apis::messageType::response,
- hmi_apis::FunctionID::UI_SetAppIcon,
- UI__SetAppIcon__response__parameters};
-
-const ford_message_descriptions::ParameterDescription
- UI__SetDisplayLayout__request__parameter1 = {
- "displayLayout", ford_message_descriptions::String, true};
-const ford_message_descriptions::ParameterDescription
- UI__SetDisplayLayout__request__parameter2 = {
- "appID", ford_message_descriptions::Integer, true};
-const ford_message_descriptions::ParameterDescription*
- UI__SetDisplayLayout__request__parameters[] = {
- (const ford_message_descriptions::
- ParameterDescription*)&UI__SetDisplayLayout__request__parameter1,
- (const ford_message_descriptions::
- ParameterDescription*)&UI__SetDisplayLayout__request__parameter2,
- NULL};
-const ford_message_descriptions::MessageDescription
- UI__SetDisplayLayout__request = {"UI",
- "SetDisplayLayout",
- hmi_apis::messageType::request,
- hmi_apis::FunctionID::UI_SetDisplayLayout,
- UI__SetDisplayLayout__request__parameters};
-
-const ford_message_descriptions::StructDescription
- UI__SetDisplayLayout__response__parameter1 = {
- {"displayCapabilities", ford_message_descriptions::Struct, false},
- Structs::Common__DisplayCapabilities__parameters};
-const ford_message_descriptions::StructDescription
- UI__SetDisplayLayout__response__parameter2_array = {
- {"buttonCapabilities", ford_message_descriptions::Struct, true},
- Structs::Common__ButtonCapabilities__parameters};
-const ford_message_descriptions::ArrayDescription
- UI__SetDisplayLayout__response__parameter2 = {
- {"buttonCapabilities", ford_message_descriptions::Array, false},
- (const ford_message_descriptions::
- ParameterDescription*)&UI__SetDisplayLayout__response__parameter2_array,
- "(ibbb)"};
-const ford_message_descriptions::StructDescription
- UI__SetDisplayLayout__response__parameter3_array = {
- {"softButtonCapabilities", ford_message_descriptions::Struct, true},
- Structs::Common__SoftButtonCapabilities__parameters};
-const ford_message_descriptions::ArrayDescription
- UI__SetDisplayLayout__response__parameter3 = {
- {"softButtonCapabilities", ford_message_descriptions::Array, false},
- (const ford_message_descriptions::
- ParameterDescription*)&UI__SetDisplayLayout__response__parameter3_array,
- "(bbbb)"};
-const ford_message_descriptions::StructDescription
- UI__SetDisplayLayout__response__parameter4 = {
- {"presetBankCapabilities", ford_message_descriptions::Struct, false},
- Structs::Common__PresetBankCapabilities__parameters};
-const ford_message_descriptions::ParameterDescription*
- UI__SetDisplayLayout__response__parameters[] = {
- (const ford_message_descriptions::
- ParameterDescription*)&UI__SetDisplayLayout__response__parameter1,
- (const ford_message_descriptions::
- ParameterDescription*)&UI__SetDisplayLayout__response__parameter2,
- (const ford_message_descriptions::
- ParameterDescription*)&UI__SetDisplayLayout__response__parameter3,
- (const ford_message_descriptions::
- ParameterDescription*)&UI__SetDisplayLayout__response__parameter4,
- NULL};
-const ford_message_descriptions::MessageDescription
- UI__SetDisplayLayout__response = {
- "UI",
- "SetDisplayLayout",
- hmi_apis::messageType::response,
- hmi_apis::FunctionID::UI_SetDisplayLayout,
- UI__SetDisplayLayout__response__parameters};
-
-const ford_message_descriptions::ParameterDescription
- UI__ShowCustomForm__request__parameter1 = {
- "customFormID", ford_message_descriptions::String, true};
-const ford_message_descriptions::ParameterDescription
- UI__ShowCustomForm__request__parameter2 = {
- "parentFormID", ford_message_descriptions::String, false};
-const ford_message_descriptions::ParameterDescription*
- UI__ShowCustomForm__request__parameters[] = {
- (const ford_message_descriptions::
- ParameterDescription*)&UI__ShowCustomForm__request__parameter1,
- (const ford_message_descriptions::
- ParameterDescription*)&UI__ShowCustomForm__request__parameter2,
- NULL};
-const ford_message_descriptions::MessageDescription
- UI__ShowCustomForm__request = {"UI",
- "ShowCustomForm",
- hmi_apis::messageType::request,
- hmi_apis::FunctionID::UI_ShowCustomForm,
- UI__ShowCustomForm__request__parameters};
-
-const ford_message_descriptions::ParameterDescription
- UI__ShowCustomForm__response__parameter1 = {
- "info", ford_message_descriptions::String, false};
-const ford_message_descriptions::ParameterDescription*
- UI__ShowCustomForm__response__parameters[] = {
- (const ford_message_descriptions::
- ParameterDescription*)&UI__ShowCustomForm__response__parameter1,
- NULL};
-const ford_message_descriptions::MessageDescription
- UI__ShowCustomForm__response = {"UI",
- "ShowCustomForm",
- hmi_apis::messageType::response,
- hmi_apis::FunctionID::UI_ShowCustomForm,
- UI__ShowCustomForm__response__parameters};
-
-const ford_message_descriptions::ParameterDescription
- UI__OnKeyboardInput__notification__parameter1 = {
- "event", ford_message_descriptions::Enum, true};
-const ford_message_descriptions::ParameterDescription
- UI__OnKeyboardInput__notification__parameter2 = {
- "data", ford_message_descriptions::String, false};
-const ford_message_descriptions::ParameterDescription*
- UI__OnKeyboardInput__notification__parameters[] = {
- (const ford_message_descriptions::
- ParameterDescription*)&UI__OnKeyboardInput__notification__parameter1,
- (const ford_message_descriptions::
- ParameterDescription*)&UI__OnKeyboardInput__notification__parameter2,
- NULL};
-const ford_message_descriptions::MessageDescription
- UI__OnKeyboardInput__notification = {
- "UI",
- "OnKeyboardInput",
- hmi_apis::messageType::notification,
- hmi_apis::FunctionID::UI_OnKeyboardInput,
- UI__OnKeyboardInput__notification__parameters};
-
-const ford_message_descriptions::ParameterDescription
- UI__OnTouchEvent__notification__parameter1 = {
- "type", ford_message_descriptions::Enum, true};
-const ford_message_descriptions::StructDescription
- UI__OnTouchEvent__notification__parameter2_array = {
- {"event", ford_message_descriptions::Struct, true},
- Structs::Common__TouchEvent__parameters};
-const ford_message_descriptions::ArrayDescription
- UI__OnTouchEvent__notification__parameter2 = {
- {"event", ford_message_descriptions::Array, true},
- (const ford_message_descriptions::
- ParameterDescription*)&UI__OnTouchEvent__notification__parameter2_array,
- "(iaia(ii))"};
-const ford_message_descriptions::ParameterDescription*
- UI__OnTouchEvent__notification__parameters[] = {
- (const ford_message_descriptions::
- ParameterDescription*)&UI__OnTouchEvent__notification__parameter1,
- (const ford_message_descriptions::
- ParameterDescription*)&UI__OnTouchEvent__notification__parameter2,
- NULL};
-const ford_message_descriptions::MessageDescription
- UI__OnTouchEvent__notification = {
- "UI",
- "OnTouchEvent",
- hmi_apis::messageType::notification,
- hmi_apis::FunctionID::UI_OnTouchEvent,
- UI__OnTouchEvent__notification__parameters};
-
-const ford_message_descriptions::ParameterDescription
- UI__Slider__request__parameter1 = {
- "numTicks", ford_message_descriptions::Integer, true};
-const ford_message_descriptions::ParameterDescription
- UI__Slider__request__parameter2 = {
- "position", ford_message_descriptions::Integer, true};
-const ford_message_descriptions::ParameterDescription
- UI__Slider__request__parameter3 = {
- "sliderHeader", ford_message_descriptions::String, true};
-const ford_message_descriptions::ParameterDescription
- UI__Slider__request__parameter4_array = {
- "sliderFooter", ford_message_descriptions::String, true};
-const ford_message_descriptions::ArrayDescription
- UI__Slider__request__parameter4 = {
- {"sliderFooter", ford_message_descriptions::Array, false},
- (const ford_message_descriptions::
- ParameterDescription*)&UI__Slider__request__parameter4_array,
- "s"};
-const ford_message_descriptions::ParameterDescription
- UI__Slider__request__parameter5 = {
- "timeout", ford_message_descriptions::Integer, true};
-const ford_message_descriptions::ParameterDescription
- UI__Slider__request__parameter6 = {
- "appID", ford_message_descriptions::Integer, true};
-const ford_message_descriptions::ParameterDescription*
- UI__Slider__request__parameters[] = {
- (const ford_message_descriptions::
- ParameterDescription*)&UI__Slider__request__parameter1,
- (const ford_message_descriptions::
- ParameterDescription*)&UI__Slider__request__parameter2,
- (const ford_message_descriptions::
- ParameterDescription*)&UI__Slider__request__parameter3,
- (const ford_message_descriptions::
- ParameterDescription*)&UI__Slider__request__parameter4,
- (const ford_message_descriptions::
- ParameterDescription*)&UI__Slider__request__parameter5,
- (const ford_message_descriptions::
- ParameterDescription*)&UI__Slider__request__parameter6,
- NULL};
-const ford_message_descriptions::MessageDescription UI__Slider__request = {
- "UI",
- "Slider",
- hmi_apis::messageType::request,
- hmi_apis::FunctionID::UI_Slider,
- UI__Slider__request__parameters};
-
-const ford_message_descriptions::ParameterDescription
- UI__Slider__response__parameter1 = {
- "sliderPosition", ford_message_descriptions::Integer, false};
-const ford_message_descriptions::ParameterDescription*
- UI__Slider__response__parameters[] = {
- (const ford_message_descriptions::
- ParameterDescription*)&UI__Slider__response__parameter1,
- NULL};
-const ford_message_descriptions::MessageDescription UI__Slider__response = {
- "UI",
- "Slider",
- hmi_apis::messageType::response,
- hmi_apis::FunctionID::UI_Slider,
- UI__Slider__response__parameters};
-
-const ford_message_descriptions::StructDescription
- UI__ScrollableMessage__request__parameter1 = {
- {"messageText", ford_message_descriptions::Struct, true},
- Structs::Common__TextFieldStruct__parameters};
-const ford_message_descriptions::ParameterDescription
- UI__ScrollableMessage__request__parameter2 = {
- "timeout", ford_message_descriptions::Integer, true};
-const ford_message_descriptions::StructDescription
- UI__ScrollableMessage__request__parameter3_array = {
- {"softButtons", ford_message_descriptions::Struct, true},
- Structs::Common__SoftButton__parameters};
-const ford_message_descriptions::ArrayDescription
- UI__ScrollableMessage__request__parameter3 = {
- {"softButtons", ford_message_descriptions::Array, false},
- (const ford_message_descriptions::
- ParameterDescription*)&UI__ScrollableMessage__request__parameter3_array,
- "(i(bs)(b(si))(bb)ii)"};
-const ford_message_descriptions::ParameterDescription
- UI__ScrollableMessage__request__parameter4 = {
- "appID", ford_message_descriptions::Integer, true};
-const ford_message_descriptions::ParameterDescription*
- UI__ScrollableMessage__request__parameters[] = {
- (const ford_message_descriptions::
- ParameterDescription*)&UI__ScrollableMessage__request__parameter1,
- (const ford_message_descriptions::
- ParameterDescription*)&UI__ScrollableMessage__request__parameter2,
- (const ford_message_descriptions::
- ParameterDescription*)&UI__ScrollableMessage__request__parameter3,
- (const ford_message_descriptions::
- ParameterDescription*)&UI__ScrollableMessage__request__parameter4,
- NULL};
-const ford_message_descriptions::MessageDescription
- UI__ScrollableMessage__request = {
- "UI",
- "ScrollableMessage",
- hmi_apis::messageType::request,
- hmi_apis::FunctionID::UI_ScrollableMessage,
- UI__ScrollableMessage__request__parameters};
-
-const ford_message_descriptions::ParameterDescription*
- UI__ScrollableMessage__response__parameters[] = {NULL};
-const ford_message_descriptions::MessageDescription
- UI__ScrollableMessage__response = {
- "UI",
- "ScrollableMessage",
- hmi_apis::messageType::response,
- hmi_apis::FunctionID::UI_ScrollableMessage,
- UI__ScrollableMessage__response__parameters};
-
-const ford_message_descriptions::ParameterDescription
- UI__PerformAudioPassThru__request__parameter1 = {
- "appID", ford_message_descriptions::Integer, true};
-const ford_message_descriptions::StructDescription
- UI__PerformAudioPassThru__request__parameter2_array = {
- {"audioPassThruDisplayTexts", ford_message_descriptions::Struct, true},
- Structs::Common__TextFieldStruct__parameters};
-const ford_message_descriptions::ArrayDescription
- UI__PerformAudioPassThru__request__parameter2 = {
- {"audioPassThruDisplayTexts", ford_message_descriptions::Array, true},
- (const ford_message_descriptions::
- ParameterDescription*)&UI__PerformAudioPassThru__request__parameter2_array,
- "(is)"};
-const ford_message_descriptions::ParameterDescription
- UI__PerformAudioPassThru__request__parameter3 = {
- "maxDuration", ford_message_descriptions::Integer, true};
-const ford_message_descriptions::ParameterDescription
- UI__PerformAudioPassThru__request__parameter4 = {
- "muteAudio", ford_message_descriptions::Boolean, true};
-const ford_message_descriptions::ParameterDescription*
- UI__PerformAudioPassThru__request__parameters[] = {
- (const ford_message_descriptions::
- ParameterDescription*)&UI__PerformAudioPassThru__request__parameter1,
- (const ford_message_descriptions::
- ParameterDescription*)&UI__PerformAudioPassThru__request__parameter2,
- (const ford_message_descriptions::
- ParameterDescription*)&UI__PerformAudioPassThru__request__parameter3,
- (const ford_message_descriptions::
- ParameterDescription*)&UI__PerformAudioPassThru__request__parameter4,
- NULL};
-const ford_message_descriptions::MessageDescription
- UI__PerformAudioPassThru__request = {
- "UI",
- "PerformAudioPassThru",
- hmi_apis::messageType::request,
- hmi_apis::FunctionID::UI_PerformAudioPassThru,
- UI__PerformAudioPassThru__request__parameters};
-
-const ford_message_descriptions::ParameterDescription*
- UI__PerformAudioPassThru__response__parameters[] = {NULL};
-const ford_message_descriptions::MessageDescription
- UI__PerformAudioPassThru__response = {
- "UI",
- "PerformAudioPassThru",
- hmi_apis::messageType::response,
- hmi_apis::FunctionID::UI_PerformAudioPassThru,
- UI__PerformAudioPassThru__response__parameters};
-
-const ford_message_descriptions::ParameterDescription*
- UI__EndAudioPassThru__request__parameters[] = {NULL};
-const ford_message_descriptions::MessageDescription
- UI__EndAudioPassThru__request = {"UI",
- "EndAudioPassThru",
- hmi_apis::messageType::request,
- hmi_apis::FunctionID::UI_EndAudioPassThru,
- UI__EndAudioPassThru__request__parameters};
-
-const ford_message_descriptions::ParameterDescription*
- UI__EndAudioPassThru__response__parameters[] = {NULL};
-const ford_message_descriptions::MessageDescription
- UI__EndAudioPassThru__response = {
- "UI",
- "EndAudioPassThru",
- hmi_apis::messageType::response,
- hmi_apis::FunctionID::UI_EndAudioPassThru,
- UI__EndAudioPassThru__response__parameters};
-
-const ford_message_descriptions::ParameterDescription*
- UI__IsReady__request__parameters[] = {NULL};
-const ford_message_descriptions::MessageDescription UI__IsReady__request = {
- "UI",
- "IsReady",
- hmi_apis::messageType::request,
- hmi_apis::FunctionID::UI_IsReady,
- UI__IsReady__request__parameters};
-
-const ford_message_descriptions::ParameterDescription
- UI__IsReady__response__parameter1 = {
- "available", ford_message_descriptions::Boolean, true};
-const ford_message_descriptions::ParameterDescription*
- UI__IsReady__response__parameters[] = {
- (const ford_message_descriptions::
- ParameterDescription*)&UI__IsReady__response__parameter1,
- NULL};
-const ford_message_descriptions::MessageDescription UI__IsReady__response = {
- "UI",
- "IsReady",
- hmi_apis::messageType::response,
- hmi_apis::FunctionID::UI_IsReady,
- UI__IsReady__response__parameters};
-
-const ford_message_descriptions::ParameterDescription
- UI__ClosePopUp__request__parameter1 = {
- "methodName", ford_message_descriptions::String, false};
-const ford_message_descriptions::ParameterDescription*
- UI__ClosePopUp__request__parameters[] = {
- (const ford_message_descriptions::
- ParameterDescription*)&UI__ClosePopUp__request__parameter1,
- NULL};
-const ford_message_descriptions::MessageDescription UI__ClosePopUp__request = {
- "UI",
- "ClosePopUp",
- hmi_apis::messageType::request,
- hmi_apis::FunctionID::UI_ClosePopUp,
- UI__ClosePopUp__request__parameters};
-
-const ford_message_descriptions::ParameterDescription*
- UI__ClosePopUp__response__parameters[] = {NULL};
-const ford_message_descriptions::MessageDescription UI__ClosePopUp__response = {
- "UI",
- "ClosePopUp",
- hmi_apis::messageType::response,
- hmi_apis::FunctionID::UI_ClosePopUp,
- UI__ClosePopUp__response__parameters};
-
-const ford_message_descriptions::ParameterDescription
- UI__OnResetTimeout__notification__parameter1 = {
- "appID", ford_message_descriptions::Integer, true};
-const ford_message_descriptions::ParameterDescription
- UI__OnResetTimeout__notification__parameter2 = {
- "methodName", ford_message_descriptions::String, true};
-const ford_message_descriptions::ParameterDescription*
- UI__OnResetTimeout__notification__parameters[] = {
- (const ford_message_descriptions::
- ParameterDescription*)&UI__OnResetTimeout__notification__parameter1,
- (const ford_message_descriptions::
- ParameterDescription*)&UI__OnResetTimeout__notification__parameter2,
- NULL};
-const ford_message_descriptions::MessageDescription
- UI__OnResetTimeout__notification = {
- "UI",
- "OnResetTimeout",
- hmi_apis::messageType::notification,
- hmi_apis::FunctionID::UI_OnResetTimeout,
- UI__OnResetTimeout__notification__parameters};
-
-const ford_message_descriptions::ParameterDescription
- UI__OnRecordStart__notification__parameter1 = {
- "appID", ford_message_descriptions::Integer, true};
-const ford_message_descriptions::ParameterDescription*
- UI__OnRecordStart__notification__parameters[] = {
- (const ford_message_descriptions::
- ParameterDescription*)&UI__OnRecordStart__notification__parameter1,
- NULL};
-const ford_message_descriptions::MessageDescription
- UI__OnRecordStart__notification = {
- "UI",
- "OnRecordStart",
- hmi_apis::messageType::notification,
- hmi_apis::FunctionID::UI_OnRecordStart,
- UI__OnRecordStart__notification__parameters};
-
-const ford_message_descriptions::ParameterDescription
- UI__SendHapticData__request__parameter1 = {
- "appID", ford_message_descriptions::Integer, true};
-const ford_message_descriptions::StructDescription
- UI__SendHapticData__request__parameter2_array = {
- {"hapticRectData", ford_message_descriptions::Struct, true},
- Structs::Common__HapticRect__parameters};
-const ford_message_descriptions::ArrayDescription
- UI__SendHapticData__request__parameter2 = {
- {"hapticRectData", ford_message_descriptions::Array, false},
- (const ford_message_descriptions::
- ParameterDescription*)&UI__SendHapticData__request__parameter2_array,
- "(i(dddd))"};
-const ford_message_descriptions::ParameterDescription*
- UI__SendHapticData__request__parameters[] = {
- (const ford_message_descriptions::
- ParameterDescription*)&UI__SendHapticData__request__parameter1,
- (const ford_message_descriptions::
- ParameterDescription*)&UI__SendHapticData__request__parameter2,
- NULL};
-const ford_message_descriptions::MessageDescription
- UI__SendHapticData__request = {"UI",
- "SendHapticData",
- hmi_apis::messageType::request,
- hmi_apis::FunctionID::UI_SendHapticData,
- UI__SendHapticData__request__parameters};
-
-const ford_message_descriptions::ParameterDescription*
- UI__SendHapticData__response__parameters[] = {NULL};
-const ford_message_descriptions::MessageDescription
- UI__SendHapticData__response = {"UI",
- "SendHapticData",
- hmi_apis::messageType::response,
- hmi_apis::FunctionID::UI_SendHapticData,
- UI__SendHapticData__response__parameters};
-
-const ford_message_descriptions::ParameterDescription*
- Navigation__IsReady__request__parameters[] = {NULL};
-const ford_message_descriptions::MessageDescription
- Navigation__IsReady__request = {"Navigation",
- "IsReady",
- hmi_apis::messageType::request,
- hmi_apis::FunctionID::Navigation_IsReady,
- Navigation__IsReady__request__parameters};
-
-const ford_message_descriptions::ParameterDescription
- Navigation__IsReady__response__parameter1 = {
- "available", ford_message_descriptions::Boolean, true};
-const ford_message_descriptions::ParameterDescription*
- Navigation__IsReady__response__parameters[] = {
- (const ford_message_descriptions::
- ParameterDescription*)&Navigation__IsReady__response__parameter1,
- NULL};
-const ford_message_descriptions::MessageDescription
- Navigation__IsReady__response = {"Navigation",
- "IsReady",
- hmi_apis::messageType::response,
- hmi_apis::FunctionID::Navigation_IsReady,
- Navigation__IsReady__response__parameters};
-
-const ford_message_descriptions::ParameterDescription
- Navigation__SendLocation__request__parameter1 = {
- "appID", ford_message_descriptions::Integer, true};
-const ford_message_descriptions::ParameterDescription
- Navigation__SendLocation__request__parameter2 = {
- "longitudeDegrees", ford_message_descriptions::Float, true};
-const ford_message_descriptions::ParameterDescription
- Navigation__SendLocation__request__parameter3 = {
- "latitudeDegrees", ford_message_descriptions::Float, true};
-const ford_message_descriptions::ParameterDescription
- Navigation__SendLocation__request__parameter4 = {
- "locationName", ford_message_descriptions::String, false};
-const ford_message_descriptions::ParameterDescription
- Navigation__SendLocation__request__parameter5 = {
- "locationDescription", ford_message_descriptions::String, false};
-const ford_message_descriptions::ParameterDescription
- Navigation__SendLocation__request__parameter6_array = {
- "addressLines", ford_message_descriptions::String, true};
-const ford_message_descriptions::ArrayDescription
- Navigation__SendLocation__request__parameter6 = {
- {"addressLines", ford_message_descriptions::Array, false},
- (const ford_message_descriptions::
- ParameterDescription*)&Navigation__SendLocation__request__parameter6_array,
- "s"};
-const ford_message_descriptions::ParameterDescription
- Navigation__SendLocation__request__parameter7 = {
- "phoneNumber", ford_message_descriptions::String, false};
-const ford_message_descriptions::StructDescription
- Navigation__SendLocation__request__parameter8 = {
- {"locationImage", ford_message_descriptions::Struct, false},
- Structs::Common__Image__parameters};
-const ford_message_descriptions::ParameterDescription*
- Navigation__SendLocation__request__parameters[] = {
- (const ford_message_descriptions::
- ParameterDescription*)&Navigation__SendLocation__request__parameter1,
- (const ford_message_descriptions::
- ParameterDescription*)&Navigation__SendLocation__request__parameter2,
- (const ford_message_descriptions::
- ParameterDescription*)&Navigation__SendLocation__request__parameter3,
- (const ford_message_descriptions::
- ParameterDescription*)&Navigation__SendLocation__request__parameter4,
- (const ford_message_descriptions::
- ParameterDescription*)&Navigation__SendLocation__request__parameter5,
- (const ford_message_descriptions::
- ParameterDescription*)&Navigation__SendLocation__request__parameter6,
- (const ford_message_descriptions::
- ParameterDescription*)&Navigation__SendLocation__request__parameter7,
- (const ford_message_descriptions::
- ParameterDescription*)&Navigation__SendLocation__request__parameter8,
- NULL};
-const ford_message_descriptions::MessageDescription
- Navigation__SendLocation__request = {
- "Navigation",
- "SendLocation",
- hmi_apis::messageType::request,
- hmi_apis::FunctionID::Navigation_SendLocation,
- Navigation__SendLocation__request__parameters};
-
-const ford_message_descriptions::ParameterDescription*
- Navigation__SendLocation__response__parameters[] = {NULL};
-const ford_message_descriptions::MessageDescription
- Navigation__SendLocation__response = {
- "Navigation",
- "SendLocation",
- hmi_apis::messageType::response,
- hmi_apis::FunctionID::Navigation_SendLocation,
- Navigation__SendLocation__response__parameters};
-
-const ford_message_descriptions::ParameterDescription
- Navigation__DialNumber__request__parameter1 = {
- "number", ford_message_descriptions::String, true};
-const ford_message_descriptions::ParameterDescription*
- Navigation__DialNumber__request__parameters[] = {
- (const ford_message_descriptions::
- ParameterDescription*)&Navigation__DialNumber__request__parameter1,
- NULL};
-const ford_message_descriptions::MessageDescription
- Navigation__DialNumber__request = {
- "Navigation",
- "DialNumber",
- hmi_apis::messageType::request,
- hmi_apis::FunctionID::Navigation_DialNumber,
- Navigation__DialNumber__request__parameters};
-
-const ford_message_descriptions::ParameterDescription*
- Navigation__DialNumber__response__parameters[] = {NULL};
-const ford_message_descriptions::MessageDescription
- Navigation__DialNumber__response = {
- "Navigation",
- "DialNumber",
- hmi_apis::messageType::response,
- hmi_apis::FunctionID::Navigation_DialNumber,
- Navigation__DialNumber__response__parameters};
-
-const ford_message_descriptions::StructDescription
- Navigation__ShowConstantTBT__request__parameter1_array = {
- {"navigationTexts", ford_message_descriptions::Struct, true},
- Structs::Common__TextFieldStruct__parameters};
-const ford_message_descriptions::ArrayDescription
- Navigation__ShowConstantTBT__request__parameter1 = {
- {"navigationTexts", ford_message_descriptions::Array, true},
- (const ford_message_descriptions::
- ParameterDescription*)&Navigation__ShowConstantTBT__request__parameter1_array,
- "(is)"};
-const ford_message_descriptions::StructDescription
- Navigation__ShowConstantTBT__request__parameter2 = {
- {"turnIcon", ford_message_descriptions::Struct, false},
- Structs::Common__Image__parameters};
-const ford_message_descriptions::StructDescription
- Navigation__ShowConstantTBT__request__parameter3 = {
- {"nextTurnIcon", ford_message_descriptions::Struct, false},
- Structs::Common__Image__parameters};
-const ford_message_descriptions::ParameterDescription
- Navigation__ShowConstantTBT__request__parameter4 = {
- "distanceToManeuver", ford_message_descriptions::Float, true};
-const ford_message_descriptions::ParameterDescription
- Navigation__ShowConstantTBT__request__parameter5 = {
- "distanceToManeuverScale", ford_message_descriptions::Float, true};
-const ford_message_descriptions::ParameterDescription
- Navigation__ShowConstantTBT__request__parameter6 = {
- "maneuverComplete", ford_message_descriptions::Boolean, false};
-const ford_message_descriptions::StructDescription
- Navigation__ShowConstantTBT__request__parameter7_array = {
- {"softButtons", ford_message_descriptions::Struct, true},
- Structs::Common__SoftButton__parameters};
-const ford_message_descriptions::ArrayDescription
- Navigation__ShowConstantTBT__request__parameter7 = {
- {"softButtons", ford_message_descriptions::Array, false},
- (const ford_message_descriptions::
- ParameterDescription*)&Navigation__ShowConstantTBT__request__parameter7_array,
- "(i(bs)(b(si))(bb)ii)"};
-const ford_message_descriptions::ParameterDescription
- Navigation__ShowConstantTBT__request__parameter8 = {
- "appID", ford_message_descriptions::Integer, true};
-const ford_message_descriptions::ParameterDescription*
- Navigation__ShowConstantTBT__request__parameters[] = {
- (const ford_message_descriptions::
- ParameterDescription*)&Navigation__ShowConstantTBT__request__parameter1,
- (const ford_message_descriptions::
- ParameterDescription*)&Navigation__ShowConstantTBT__request__parameter2,
- (const ford_message_descriptions::
- ParameterDescription*)&Navigation__ShowConstantTBT__request__parameter3,
- (const ford_message_descriptions::
- ParameterDescription*)&Navigation__ShowConstantTBT__request__parameter4,
- (const ford_message_descriptions::
- ParameterDescription*)&Navigation__ShowConstantTBT__request__parameter5,
- (const ford_message_descriptions::
- ParameterDescription*)&Navigation__ShowConstantTBT__request__parameter6,
- (const ford_message_descriptions::
- ParameterDescription*)&Navigation__ShowConstantTBT__request__parameter7,
- (const ford_message_descriptions::
- ParameterDescription*)&Navigation__ShowConstantTBT__request__parameter8,
- NULL};
-const ford_message_descriptions::MessageDescription
- Navigation__ShowConstantTBT__request = {
- "Navigation",
- "ShowConstantTBT",
- hmi_apis::messageType::request,
- hmi_apis::FunctionID::Navigation_ShowConstantTBT,
- Navigation__ShowConstantTBT__request__parameters};
-
-const ford_message_descriptions::ParameterDescription*
- Navigation__ShowConstantTBT__response__parameters[] = {NULL};
-const ford_message_descriptions::MessageDescription
- Navigation__ShowConstantTBT__response = {
- "Navigation",
- "ShowConstantTBT",
- hmi_apis::messageType::response,
- hmi_apis::FunctionID::Navigation_ShowConstantTBT,
- Navigation__ShowConstantTBT__response__parameters};
-
-const ford_message_descriptions::StructDescription
- Navigation__AlertManeuver__request__parameter1_array = {
- {"softButtons", ford_message_descriptions::Struct, true},
- Structs::Common__SoftButton__parameters};
-const ford_message_descriptions::ArrayDescription
- Navigation__AlertManeuver__request__parameter1 = {
- {"softButtons", ford_message_descriptions::Array, false},
- (const ford_message_descriptions::
- ParameterDescription*)&Navigation__AlertManeuver__request__parameter1_array,
- "(i(bs)(b(si))(bb)ii)"};
-const ford_message_descriptions::ParameterDescription
- Navigation__AlertManeuver__request__parameter2 = {
- "appID", ford_message_descriptions::Integer, true};
-const ford_message_descriptions::ParameterDescription*
- Navigation__AlertManeuver__request__parameters[] = {
- (const ford_message_descriptions::
- ParameterDescription*)&Navigation__AlertManeuver__request__parameter1,
- (const ford_message_descriptions::
- ParameterDescription*)&Navigation__AlertManeuver__request__parameter2,
- NULL};
-const ford_message_descriptions::MessageDescription
- Navigation__AlertManeuver__request = {
- "Navigation",
- "AlertManeuver",
- hmi_apis::messageType::request,
- hmi_apis::FunctionID::Navigation_AlertManeuver,
- Navigation__AlertManeuver__request__parameters};
-
-const ford_message_descriptions::ParameterDescription*
- Navigation__AlertManeuver__response__parameters[] = {NULL};
-const ford_message_descriptions::MessageDescription
- Navigation__AlertManeuver__response = {
- "Navigation",
- "AlertManeuver",
- hmi_apis::messageType::response,
- hmi_apis::FunctionID::Navigation_AlertManeuver,
- Navigation__AlertManeuver__response__parameters};
-
-const ford_message_descriptions::StructDescription
- Navigation__UpdateTurnList__request__parameter1_array = {
- {"turnList", ford_message_descriptions::Struct, true},
- Structs::Common__Turn__parameters};
-const ford_message_descriptions::ArrayDescription
- Navigation__UpdateTurnList__request__parameter1 = {
- {"turnList", ford_message_descriptions::Array, false},
- (const ford_message_descriptions::
- ParameterDescription*)&Navigation__UpdateTurnList__request__parameter1_array,
- "((b(is))(b(si)))"};
-const ford_message_descriptions::StructDescription
- Navigation__UpdateTurnList__request__parameter2_array = {
- {"softButtons", ford_message_descriptions::Struct, true},
- Structs::Common__SoftButton__parameters};
-const ford_message_descriptions::ArrayDescription
- Navigation__UpdateTurnList__request__parameter2 = {
- {"softButtons", ford_message_descriptions::Array, false},
- (const ford_message_descriptions::
- ParameterDescription*)&Navigation__UpdateTurnList__request__parameter2_array,
- "(i(bs)(b(si))(bb)ii)"};
-const ford_message_descriptions::ParameterDescription
- Navigation__UpdateTurnList__request__parameter3 = {
- "appID", ford_message_descriptions::Integer, true};
-const ford_message_descriptions::ParameterDescription*
- Navigation__UpdateTurnList__request__parameters[] = {
- (const ford_message_descriptions::
- ParameterDescription*)&Navigation__UpdateTurnList__request__parameter1,
- (const ford_message_descriptions::
- ParameterDescription*)&Navigation__UpdateTurnList__request__parameter2,
- (const ford_message_descriptions::
- ParameterDescription*)&Navigation__UpdateTurnList__request__parameter3,
- NULL};
-const ford_message_descriptions::MessageDescription
- Navigation__UpdateTurnList__request = {
- "Navigation",
- "UpdateTurnList",
- hmi_apis::messageType::request,
- hmi_apis::FunctionID::Navigation_UpdateTurnList,
- Navigation__UpdateTurnList__request__parameters};
-
-const ford_message_descriptions::ParameterDescription*
- Navigation__UpdateTurnList__response__parameters[] = {NULL};
-const ford_message_descriptions::MessageDescription
- Navigation__UpdateTurnList__response = {
- "Navigation",
- "UpdateTurnList",
- hmi_apis::messageType::response,
- hmi_apis::FunctionID::Navigation_UpdateTurnList,
- Navigation__UpdateTurnList__response__parameters};
-
-const ford_message_descriptions::ParameterDescription
- Navigation__OnTBTClientState__notification__parameter1 = {
- "state", ford_message_descriptions::Enum, true};
-const ford_message_descriptions::ParameterDescription*
- Navigation__OnTBTClientState__notification__parameters[] = {
- (const ford_message_descriptions::
- ParameterDescription*)&Navigation__OnTBTClientState__notification__parameter1,
- NULL};
-const ford_message_descriptions::MessageDescription
- Navigation__OnTBTClientState__notification = {
- "Navigation",
- "OnTBTClientState",
- hmi_apis::messageType::notification,
- hmi_apis::FunctionID::Navigation_OnTBTClientState,
- Navigation__OnTBTClientState__notification__parameters};
-
-const ford_message_descriptions::StructDescription
- Navigation__SetVideoConfig__request__parameter1 = {
- {"config", ford_message_descriptions::Struct, true},
- Structs::Common__VideoConfig__parameters};
-const ford_message_descriptions::ParameterDescription
- Navigation__SetVideoConfig__request__parameter2 = {
- "appID", ford_message_descriptions::Integer, true};
-const ford_message_descriptions::ParameterDescription*
- Navigation__SetVideoConfig__request__parameters[] = {
- (const ford_message_descriptions::
- ParameterDescription*)&Navigation__SetVideoConfig__request__parameter1,
- (const ford_message_descriptions::
- ParameterDescription*)&Navigation__SetVideoConfig__request__parameter2,
- NULL};
-const ford_message_descriptions::MessageDescription
- Navigation__SetVideoConfig__request = {
- "Navigation",
- "SetVideoConfig",
- hmi_apis::messageType::request,
- hmi_apis::FunctionID::Navigation_SetVideoConfig,
- Navigation__SetVideoConfig__request__parameters};
-
-const ford_message_descriptions::ParameterDescription
- Navigation__SetVideoConfig__response__parameter1_array = {
- "rejectedParams", ford_message_descriptions::String, true};
-const ford_message_descriptions::ArrayDescription
- Navigation__SetVideoConfig__response__parameter1 = {
- {"rejectedParams", ford_message_descriptions::Array, false},
- (const ford_message_descriptions::
- ParameterDescription*)&Navigation__SetVideoConfig__response__parameter1_array,
- "s"};
-const ford_message_descriptions::ParameterDescription*
- Navigation__SetVideoConfig__response__parameters[] = {
- (const ford_message_descriptions::
- ParameterDescription*)&Navigation__SetVideoConfig__response__parameter1,
- NULL};
-const ford_message_descriptions::MessageDescription
- Navigation__SetVideoConfig__response = {
- "Navigation",
- "SetVideoConfig",
- hmi_apis::messageType::response,
- hmi_apis::FunctionID::Navigation_SetVideoConfig,
- Navigation__SetVideoConfig__response__parameters};
-
-const ford_message_descriptions::ParameterDescription
- Navigation__StartStream__request__parameter1 = {
- "url", ford_message_descriptions::String, true};
-const ford_message_descriptions::ParameterDescription
- Navigation__StartStream__request__parameter2 = {
- "appID", ford_message_descriptions::Integer, true};
-const ford_message_descriptions::ParameterDescription*
- Navigation__StartStream__request__parameters[] = {
- (const ford_message_descriptions::
- ParameterDescription*)&Navigation__StartStream__request__parameter1,
- (const ford_message_descriptions::
- ParameterDescription*)&Navigation__StartStream__request__parameter2,
- NULL};
-const ford_message_descriptions::MessageDescription
- Navigation__StartStream__request = {
- "Navigation",
- "StartStream",
- hmi_apis::messageType::request,
- hmi_apis::FunctionID::Navigation_StartStream,
- Navigation__StartStream__request__parameters};
-
-const ford_message_descriptions::ParameterDescription*
- Navigation__StartStream__response__parameters[] = {NULL};
-const ford_message_descriptions::MessageDescription
- Navigation__StartStream__response = {
- "Navigation",
- "StartStream",
- hmi_apis::messageType::response,
- hmi_apis::FunctionID::Navigation_StartStream,
- Navigation__StartStream__response__parameters};
-
-const ford_message_descriptions::ParameterDescription
- Navigation__StopStream__request__parameter1 = {
- "appID", ford_message_descriptions::Integer, true};
-const ford_message_descriptions::ParameterDescription*
- Navigation__StopStream__request__parameters[] = {
- (const ford_message_descriptions::
- ParameterDescription*)&Navigation__StopStream__request__parameter1,
- NULL};
-const ford_message_descriptions::MessageDescription
- Navigation__StopStream__request = {
- "Navigation",
- "StopStream",
- hmi_apis::messageType::request,
- hmi_apis::FunctionID::Navigation_StopStream,
- Navigation__StopStream__request__parameters};
-
-const ford_message_descriptions::ParameterDescription*
- Navigation__StopStream__response__parameters[] = {NULL};
-const ford_message_descriptions::MessageDescription
- Navigation__StopStream__response = {
- "Navigation",
- "StopStream",
- hmi_apis::messageType::response,
- hmi_apis::FunctionID::Navigation_StopStream,
- Navigation__StopStream__response__parameters};
-
-const ford_message_descriptions::ParameterDescription
- Navigation__StartAudioStream__request__parameter1 = {
- "url", ford_message_descriptions::String, true};
-const ford_message_descriptions::ParameterDescription
- Navigation__StartAudioStream__request__parameter2 = {
- "appID", ford_message_descriptions::Integer, true};
-const ford_message_descriptions::ParameterDescription*
- Navigation__StartAudioStream__request__parameters[] = {
- (const ford_message_descriptions::
- ParameterDescription*)&Navigation__StartAudioStream__request__parameter1,
- (const ford_message_descriptions::
- ParameterDescription*)&Navigation__StartAudioStream__request__parameter2,
- NULL};
-const ford_message_descriptions::MessageDescription
- Navigation__StartAudioStream__request = {
- "Navigation",
- "StartAudioStream",
- hmi_apis::messageType::request,
- hmi_apis::FunctionID::Navigation_StartAudioStream,
- Navigation__StartAudioStream__request__parameters};
-
-const ford_message_descriptions::ParameterDescription*
- Navigation__StartAudioStream__response__parameters[] = {NULL};
-const ford_message_descriptions::MessageDescription
- Navigation__StartAudioStream__response = {
- "Navigation",
- "StartAudioStream",
- hmi_apis::messageType::response,
- hmi_apis::FunctionID::Navigation_StartAudioStream,
- Navigation__StartAudioStream__response__parameters};
-
-const ford_message_descriptions::ParameterDescription
- Navigation__StopAudioStream__request__parameter1 = {
- "appID", ford_message_descriptions::Integer, true};
-const ford_message_descriptions::ParameterDescription*
- Navigation__StopAudioStream__request__parameters[] = {
- (const ford_message_descriptions::
- ParameterDescription*)&Navigation__StopAudioStream__request__parameter1,
- NULL};
-const ford_message_descriptions::MessageDescription
- Navigation__StopAudioStream__request = {
- "Navigation",
- "StopAudioStream",
- hmi_apis::messageType::request,
- hmi_apis::FunctionID::Navigation_StopAudioStream,
- Navigation__StopAudioStream__request__parameters};
-
-const ford_message_descriptions::ParameterDescription*
- Navigation__StopAudioStream__response__parameters[] = {NULL};
-const ford_message_descriptions::MessageDescription
- Navigation__StopAudioStream__response = {
- "Navigation",
- "StopAudioStream",
- hmi_apis::messageType::response,
- hmi_apis::FunctionID::Navigation_StopAudioStream,
- Navigation__StopAudioStream__response__parameters};
-
-const ford_message_descriptions::ParameterDescription
- Navigation__OnAudioDataStreaming__notification__parameter1 = {
- "available", ford_message_descriptions::Boolean, true};
-const ford_message_descriptions::ParameterDescription*
- Navigation__OnAudioDataStreaming__notification__parameters[] = {
- (const ford_message_descriptions::
- ParameterDescription*)&Navigation__OnAudioDataStreaming__notification__parameter1,
- NULL};
-const ford_message_descriptions::MessageDescription
- Navigation__OnAudioDataStreaming__notification = {
- "Navigation",
- "OnAudioDataStreaming",
- hmi_apis::messageType::notification,
- hmi_apis::FunctionID::Navigation_OnAudioDataStreaming,
- Navigation__OnAudioDataStreaming__notification__parameters};
-
-const ford_message_descriptions::ParameterDescription
- Navigation__OnVideoDataStreaming__notification__parameter1 = {
- "available", ford_message_descriptions::Boolean, true};
-const ford_message_descriptions::ParameterDescription*
- Navigation__OnVideoDataStreaming__notification__parameters[] = {
- (const ford_message_descriptions::
- ParameterDescription*)&Navigation__OnVideoDataStreaming__notification__parameter1,
- NULL};
-const ford_message_descriptions::MessageDescription
- Navigation__OnVideoDataStreaming__notification = {
- "Navigation",
- "OnVideoDataStreaming",
- hmi_apis::messageType::notification,
- hmi_apis::FunctionID::Navigation_OnVideoDataStreaming,
- Navigation__OnVideoDataStreaming__notification__parameters};
-
-const ford_message_descriptions::ParameterDescription
- Navigation__GetWayPoints__request__parameter1 = {
- "wayPointType", ford_message_descriptions::Enum, true};
-const ford_message_descriptions::ParameterDescription
- Navigation__GetWayPoints__request__parameter2 = {
- "appID", ford_message_descriptions::Integer, true};
-const ford_message_descriptions::ParameterDescription*
- Navigation__GetWayPoints__request__parameters[] = {
- (const ford_message_descriptions::
- ParameterDescription*)&Navigation__GetWayPoints__request__parameter1,
- (const ford_message_descriptions::
- ParameterDescription*)&Navigation__GetWayPoints__request__parameter2,
- NULL};
-const ford_message_descriptions::MessageDescription
- Navigation__GetWayPoints__request = {
- "Navigation",
- "GetWayPoints",
- hmi_apis::messageType::request,
- hmi_apis::FunctionID::Navigation_GetWayPoints,
- Navigation__GetWayPoints__request__parameters};
-
-const ford_message_descriptions::ParameterDescription
- Navigation__GetWayPoints__response__parameter1 = {
- "appID", ford_message_descriptions::Integer, true};
-const ford_message_descriptions::StructDescription
- Navigation__GetWayPoints__response__parameter2_array = {
- {"wayPoints", ford_message_descriptions::Struct, true},
- Structs::Common__LocationDetails__parameters};
-const ford_message_descriptions::ArrayDescription
- Navigation__GetWayPoints__response__parameter2 = {
- {"wayPoints", ford_message_descriptions::Array, false},
- (const ford_message_descriptions::
- ParameterDescription*)&Navigation__GetWayPoints__response__parameter2_array,
- "((b(dd))(bs)(bas)(bs)(bs)(b(si))(b((bs)(bs)(bs)(bs)(bs)(bs)(bs)(bs)("
- "bs))))"};
-const ford_message_descriptions::ParameterDescription*
- Navigation__GetWayPoints__response__parameters[] = {
- (const ford_message_descriptions::
- ParameterDescription*)&Navigation__GetWayPoints__response__parameter1,
- (const ford_message_descriptions::
- ParameterDescription*)&Navigation__GetWayPoints__response__parameter2,
- NULL};
-const ford_message_descriptions::MessageDescription
- Navigation__GetWayPoints__response = {
- "Navigation",
- "GetWayPoints",
- hmi_apis::messageType::response,
- hmi_apis::FunctionID::Navigation_GetWayPoints,
- Navigation__GetWayPoints__response__parameters};
-
-const ford_message_descriptions::StructDescription
- Navigation__OnWayPointChange__notification__parameter1_array = {
- {"wayPoints", ford_message_descriptions::Struct, true},
- Structs::Common__LocationDetails__parameters};
-const ford_message_descriptions::ArrayDescription
- Navigation__OnWayPointChange__notification__parameter1 = {
- {"wayPoints", ford_message_descriptions::Array, true},
- (const ford_message_descriptions::
- ParameterDescription*)&Navigation__OnWayPointChange__notification__parameter1_array,
- "((b(dd))(bs)(bas)(bs)(bs)(b(si))(b((bs)(bs)(bs)(bs)(bs)(bs)(bs)(bs)("
- "bs))))"};
-const ford_message_descriptions::ParameterDescription*
- Navigation__OnWayPointChange__notification__parameters[] = {
- (const ford_message_descriptions::
- ParameterDescription*)&Navigation__OnWayPointChange__notification__parameter1,
- NULL};
-const ford_message_descriptions::MessageDescription
- Navigation__OnWayPointChange__notification = {
- "Navigation",
- "OnWayPointChange",
- hmi_apis::messageType::notification,
- hmi_apis::FunctionID::Navigation_OnWayPointChange,
- Navigation__OnWayPointChange__notification__parameters};
-
-const ford_message_descriptions::ParameterDescription*
- Navigation__SubscribeWayPoints__request__parameters[] = {NULL};
-const ford_message_descriptions::MessageDescription
- Navigation__SubscribeWayPoints__request = {
- "Navigation",
- "SubscribeWayPoints",
- hmi_apis::messageType::request,
- hmi_apis::FunctionID::Navigation_SubscribeWayPoints,
- Navigation__SubscribeWayPoints__request__parameters};
-
-const ford_message_descriptions::ParameterDescription*
- Navigation__SubscribeWayPoints__response__parameters[] = {NULL};
-const ford_message_descriptions::MessageDescription
- Navigation__SubscribeWayPoints__response = {
- "Navigation",
- "SubscribeWayPoints",
- hmi_apis::messageType::response,
- hmi_apis::FunctionID::Navigation_SubscribeWayPoints,
- Navigation__SubscribeWayPoints__response__parameters};
-
-const ford_message_descriptions::ParameterDescription*
- Navigation__UnsubscribeWayPoints__request__parameters[] = {NULL};
-const ford_message_descriptions::MessageDescription
- Navigation__UnsubscribeWayPoints__request = {
- "Navigation",
- "UnsubscribeWayPoints",
- hmi_apis::messageType::request,
- hmi_apis::FunctionID::Navigation_UnsubscribeWayPoints,
- Navigation__UnsubscribeWayPoints__request__parameters};
-
-const ford_message_descriptions::ParameterDescription*
- Navigation__UnsubscribeWayPoints__response__parameters[] = {NULL};
-const ford_message_descriptions::MessageDescription
- Navigation__UnsubscribeWayPoints__response = {
- "Navigation",
- "UnsubscribeWayPoints",
- hmi_apis::messageType::response,
- hmi_apis::FunctionID::Navigation_UnsubscribeWayPoints,
- Navigation__UnsubscribeWayPoints__response__parameters};
-
-const ford_message_descriptions::ParameterDescription*
- VehicleInfo__IsReady__request__parameters[] = {NULL};
-const ford_message_descriptions::MessageDescription
- VehicleInfo__IsReady__request = {"VehicleInfo",
- "IsReady",
- hmi_apis::messageType::request,
- hmi_apis::FunctionID::VehicleInfo_IsReady,
- VehicleInfo__IsReady__request__parameters};
-
-const ford_message_descriptions::ParameterDescription
- VehicleInfo__IsReady__response__parameter1 = {
- "available", ford_message_descriptions::Boolean, true};
-const ford_message_descriptions::ParameterDescription*
- VehicleInfo__IsReady__response__parameters[] = {
- (const ford_message_descriptions::
- ParameterDescription*)&VehicleInfo__IsReady__response__parameter1,
- NULL};
-const ford_message_descriptions::MessageDescription
- VehicleInfo__IsReady__response = {
- "VehicleInfo",
- "IsReady",
- hmi_apis::messageType::response,
- hmi_apis::FunctionID::VehicleInfo_IsReady,
- VehicleInfo__IsReady__response__parameters};
-
-const ford_message_descriptions::ParameterDescription*
- VehicleInfo__GetVehicleType__request__parameters[] = {NULL};
-const ford_message_descriptions::MessageDescription
- VehicleInfo__GetVehicleType__request = {
- "VehicleInfo",
- "GetVehicleType",
- hmi_apis::messageType::request,
- hmi_apis::FunctionID::VehicleInfo_GetVehicleType,
- VehicleInfo__GetVehicleType__request__parameters};
-
-const ford_message_descriptions::StructDescription
- VehicleInfo__GetVehicleType__response__parameter1 = {
- {"vehicleType", ford_message_descriptions::Struct, true},
- Structs::Common__VehicleType__parameters};
-const ford_message_descriptions::ParameterDescription*
- VehicleInfo__GetVehicleType__response__parameters[] = {
- (const ford_message_descriptions::
- ParameterDescription*)&VehicleInfo__GetVehicleType__response__parameter1,
- NULL};
-const ford_message_descriptions::MessageDescription
- VehicleInfo__GetVehicleType__response = {
- "VehicleInfo",
- "GetVehicleType",
- hmi_apis::messageType::response,
- hmi_apis::FunctionID::VehicleInfo_GetVehicleType,
- VehicleInfo__GetVehicleType__response__parameters};
-
-const ford_message_descriptions::ParameterDescription
- VehicleInfo__ReadDID__request__parameter1 = {
- "ecuName", ford_message_descriptions::Integer, true};
-const ford_message_descriptions::ParameterDescription
- VehicleInfo__ReadDID__request__parameter2_array = {
- "didLocation", ford_message_descriptions::Integer, true};
-const ford_message_descriptions::ArrayDescription
- VehicleInfo__ReadDID__request__parameter2 = {
- {"didLocation", ford_message_descriptions::Array, true},
- (const ford_message_descriptions::
- ParameterDescription*)&VehicleInfo__ReadDID__request__parameter2_array,
- "i"};
-const ford_message_descriptions::ParameterDescription
- VehicleInfo__ReadDID__request__parameter3 = {
- "appID", ford_message_descriptions::Integer, true};
-const ford_message_descriptions::ParameterDescription*
- VehicleInfo__ReadDID__request__parameters[] = {
- (const ford_message_descriptions::
- ParameterDescription*)&VehicleInfo__ReadDID__request__parameter1,
- (const ford_message_descriptions::
- ParameterDescription*)&VehicleInfo__ReadDID__request__parameter2,
- (const ford_message_descriptions::
- ParameterDescription*)&VehicleInfo__ReadDID__request__parameter3,
- NULL};
-const ford_message_descriptions::MessageDescription
- VehicleInfo__ReadDID__request = {"VehicleInfo",
- "ReadDID",
- hmi_apis::messageType::request,
- hmi_apis::FunctionID::VehicleInfo_ReadDID,
- VehicleInfo__ReadDID__request__parameters};
-
-const ford_message_descriptions::StructDescription
- VehicleInfo__ReadDID__response__parameter1_array = {
- {"didResult", ford_message_descriptions::Struct, true},
- Structs::Common__DIDResult__parameters};
-const ford_message_descriptions::ArrayDescription
- VehicleInfo__ReadDID__response__parameter1 = {
- {"didResult", ford_message_descriptions::Array, false},
- (const ford_message_descriptions::
- ParameterDescription*)&VehicleInfo__ReadDID__response__parameter1_array,
- "(ii(bs))"};
-const ford_message_descriptions::ParameterDescription*
- VehicleInfo__ReadDID__response__parameters[] = {
- (const ford_message_descriptions::
- ParameterDescription*)&VehicleInfo__ReadDID__response__parameter1,
- NULL};
-const ford_message_descriptions::MessageDescription
- VehicleInfo__ReadDID__response = {
- "VehicleInfo",
- "ReadDID",
- hmi_apis::messageType::response,
- hmi_apis::FunctionID::VehicleInfo_ReadDID,
- VehicleInfo__ReadDID__response__parameters};
-
-const ford_message_descriptions::ParameterDescription
- VehicleInfo__GetDTCs__request__parameter1 = {
- "ecuName", ford_message_descriptions::Integer, true};
-const ford_message_descriptions::ParameterDescription
- VehicleInfo__GetDTCs__request__parameter2 = {
- "dtcMask", ford_message_descriptions::Integer, false};
-const ford_message_descriptions::ParameterDescription
- VehicleInfo__GetDTCs__request__parameter3 = {
- "appID", ford_message_descriptions::Integer, true};
-const ford_message_descriptions::ParameterDescription*
- VehicleInfo__GetDTCs__request__parameters[] = {
- (const ford_message_descriptions::
- ParameterDescription*)&VehicleInfo__GetDTCs__request__parameter1,
- (const ford_message_descriptions::
- ParameterDescription*)&VehicleInfo__GetDTCs__request__parameter2,
- (const ford_message_descriptions::
- ParameterDescription*)&VehicleInfo__GetDTCs__request__parameter3,
- NULL};
-const ford_message_descriptions::MessageDescription
- VehicleInfo__GetDTCs__request = {"VehicleInfo",
- "GetDTCs",
- hmi_apis::messageType::request,
- hmi_apis::FunctionID::VehicleInfo_GetDTCs,
- VehicleInfo__GetDTCs__request__parameters};
-
-const ford_message_descriptions::ParameterDescription
- VehicleInfo__GetDTCs__response__parameter1 = {
- "ecuHeader", ford_message_descriptions::Integer, true};
-const ford_message_descriptions::ParameterDescription
- VehicleInfo__GetDTCs__response__parameter2_array = {
- "dtc", ford_message_descriptions::String, true};
-const ford_message_descriptions::ArrayDescription
- VehicleInfo__GetDTCs__response__parameter2 = {
- {"dtc", ford_message_descriptions::Array, false},
- (const ford_message_descriptions::
- ParameterDescription*)&VehicleInfo__GetDTCs__response__parameter2_array,
- "s"};
-const ford_message_descriptions::ParameterDescription*
- VehicleInfo__GetDTCs__response__parameters[] = {
- (const ford_message_descriptions::
- ParameterDescription*)&VehicleInfo__GetDTCs__response__parameter1,
- (const ford_message_descriptions::
- ParameterDescription*)&VehicleInfo__GetDTCs__response__parameter2,
- NULL};
-const ford_message_descriptions::MessageDescription
- VehicleInfo__GetDTCs__response = {
- "VehicleInfo",
- "GetDTCs",
- hmi_apis::messageType::response,
- hmi_apis::FunctionID::VehicleInfo_GetDTCs,
- VehicleInfo__GetDTCs__response__parameters};
-
-const ford_message_descriptions::ParameterDescription
- VehicleInfo__DiagnosticMessage__request__parameter1 = {
- "targetID", ford_message_descriptions::Integer, true};
-const ford_message_descriptions::ParameterDescription
- VehicleInfo__DiagnosticMessage__request__parameter2 = {
- "messageLength", ford_message_descriptions::Integer, true};
-const ford_message_descriptions::ParameterDescription
- VehicleInfo__DiagnosticMessage__request__parameter3_array = {
- "messageData", ford_message_descriptions::Integer, true};
-const ford_message_descriptions::ArrayDescription
- VehicleInfo__DiagnosticMessage__request__parameter3 = {
- {"messageData", ford_message_descriptions::Array, true},
- (const ford_message_descriptions::
- ParameterDescription*)&VehicleInfo__DiagnosticMessage__request__parameter3_array,
- "i"};
-const ford_message_descriptions::ParameterDescription
- VehicleInfo__DiagnosticMessage__request__parameter4 = {
- "appID", ford_message_descriptions::Integer, true};
-const ford_message_descriptions::ParameterDescription*
- VehicleInfo__DiagnosticMessage__request__parameters[] = {
- (const ford_message_descriptions::
- ParameterDescription*)&VehicleInfo__DiagnosticMessage__request__parameter1,
- (const ford_message_descriptions::
- ParameterDescription*)&VehicleInfo__DiagnosticMessage__request__parameter2,
- (const ford_message_descriptions::
- ParameterDescription*)&VehicleInfo__DiagnosticMessage__request__parameter3,
- (const ford_message_descriptions::
- ParameterDescription*)&VehicleInfo__DiagnosticMessage__request__parameter4,
- NULL};
-const ford_message_descriptions::MessageDescription
- VehicleInfo__DiagnosticMessage__request = {
- "VehicleInfo",
- "DiagnosticMessage",
- hmi_apis::messageType::request,
- hmi_apis::FunctionID::VehicleInfo_DiagnosticMessage,
- VehicleInfo__DiagnosticMessage__request__parameters};
-
-const ford_message_descriptions::ParameterDescription
- VehicleInfo__DiagnosticMessage__response__parameter1_array = {
- "messageDataResult", ford_message_descriptions::Integer, true};
-const ford_message_descriptions::ArrayDescription
- VehicleInfo__DiagnosticMessage__response__parameter1 = {
- {"messageDataResult", ford_message_descriptions::Array, true},
- (const ford_message_descriptions::
- ParameterDescription*)&VehicleInfo__DiagnosticMessage__response__parameter1_array,
- "i"};
-const ford_message_descriptions::ParameterDescription*
- VehicleInfo__DiagnosticMessage__response__parameters[] = {
- (const ford_message_descriptions::
- ParameterDescription*)&VehicleInfo__DiagnosticMessage__response__parameter1,
- NULL};
-const ford_message_descriptions::MessageDescription
- VehicleInfo__DiagnosticMessage__response = {
- "VehicleInfo",
- "DiagnosticMessage",
- hmi_apis::messageType::response,
- hmi_apis::FunctionID::VehicleInfo_DiagnosticMessage,
- VehicleInfo__DiagnosticMessage__response__parameters};
-
-const ford_message_descriptions::ParameterDescription
- VehicleInfo__SubscribeVehicleData__request__parameter1 = {
- "gps", ford_message_descriptions::Boolean, false};
-const ford_message_descriptions::ParameterDescription
- VehicleInfo__SubscribeVehicleData__request__parameter2 = {
- "speed", ford_message_descriptions::Boolean, false};
-const ford_message_descriptions::ParameterDescription
- VehicleInfo__SubscribeVehicleData__request__parameter3 = {
- "rpm", ford_message_descriptions::Boolean, false};
-const ford_message_descriptions::ParameterDescription
- VehicleInfo__SubscribeVehicleData__request__parameter4 = {
- "fuelLevel", ford_message_descriptions::Boolean, false};
-const ford_message_descriptions::ParameterDescription
- VehicleInfo__SubscribeVehicleData__request__parameter5 = {
- "fuelLevel_State", ford_message_descriptions::Boolean, false};
-const ford_message_descriptions::ParameterDescription
- VehicleInfo__SubscribeVehicleData__request__parameter6 = {
- "instantFuelConsumption", ford_message_descriptions::Boolean, false};
-const ford_message_descriptions::ParameterDescription
- VehicleInfo__SubscribeVehicleData__request__parameter7 = {
- "externalTemperature", ford_message_descriptions::Boolean, false};
-const ford_message_descriptions::ParameterDescription
- VehicleInfo__SubscribeVehicleData__request__parameter8 = {
- "prndl", ford_message_descriptions::Boolean, false};
-const ford_message_descriptions::ParameterDescription
- VehicleInfo__SubscribeVehicleData__request__parameter9 = {
- "tirePressure", ford_message_descriptions::Boolean, false};
-const ford_message_descriptions::ParameterDescription
- VehicleInfo__SubscribeVehicleData__request__parameter10 = {
- "odometer", ford_message_descriptions::Boolean, false};
-const ford_message_descriptions::ParameterDescription
- VehicleInfo__SubscribeVehicleData__request__parameter11 = {
- "beltStatus", ford_message_descriptions::Boolean, false};
-const ford_message_descriptions::ParameterDescription
- VehicleInfo__SubscribeVehicleData__request__parameter12 = {
- "bodyInformation", ford_message_descriptions::Boolean, false};
-const ford_message_descriptions::ParameterDescription
- VehicleInfo__SubscribeVehicleData__request__parameter13 = {
- "deviceStatus", ford_message_descriptions::Boolean, false};
-const ford_message_descriptions::ParameterDescription
- VehicleInfo__SubscribeVehicleData__request__parameter14 = {
- "driverBraking", ford_message_descriptions::Boolean, false};
-const ford_message_descriptions::ParameterDescription
- VehicleInfo__SubscribeVehicleData__request__parameter15 = {
- "wiperStatus", ford_message_descriptions::Boolean, false};
-const ford_message_descriptions::ParameterDescription
- VehicleInfo__SubscribeVehicleData__request__parameter16 = {
- "headLampStatus", ford_message_descriptions::Boolean, false};
-const ford_message_descriptions::ParameterDescription
- VehicleInfo__SubscribeVehicleData__request__parameter17 = {
- "engineTorque", ford_message_descriptions::Boolean, false};
-const ford_message_descriptions::ParameterDescription
- VehicleInfo__SubscribeVehicleData__request__parameter18 = {
- "accPedalPosition", ford_message_descriptions::Boolean, false};
-const ford_message_descriptions::ParameterDescription
- VehicleInfo__SubscribeVehicleData__request__parameter19 = {
- "steeringWheelAngle", ford_message_descriptions::Boolean, false};
-const ford_message_descriptions::ParameterDescription
- VehicleInfo__SubscribeVehicleData__request__parameter20 = {
- "eCallInfo", ford_message_descriptions::Boolean, false};
-const ford_message_descriptions::ParameterDescription
- VehicleInfo__SubscribeVehicleData__request__parameter21 = {
- "airbagStatus", ford_message_descriptions::Boolean, false};
-const ford_message_descriptions::ParameterDescription
- VehicleInfo__SubscribeVehicleData__request__parameter22 = {
- "emergencyEvent", ford_message_descriptions::Boolean, false};
-const ford_message_descriptions::ParameterDescription
- VehicleInfo__SubscribeVehicleData__request__parameter23 = {
- "clusterModeStatus", ford_message_descriptions::Boolean, false};
-const ford_message_descriptions::ParameterDescription
- VehicleInfo__SubscribeVehicleData__request__parameter24 = {
- "myKey", ford_message_descriptions::Boolean, false};
-const ford_message_descriptions::ParameterDescription* VehicleInfo__SubscribeVehicleData__request__parameters[] = {
- (const ford_message_descriptions::
- ParameterDescription*)&VehicleInfo__SubscribeVehicleData__request__parameter1,
- (const ford_message_descriptions::
- ParameterDescription*)&VehicleInfo__SubscribeVehicleData__request__parameter2,
- (const ford_message_descriptions::
- ParameterDescription*)&VehicleInfo__SubscribeVehicleData__request__parameter3,
- (const ford_message_descriptions::
- ParameterDescription*)&VehicleInfo__SubscribeVehicleData__request__parameter4,
- (const ford_message_descriptions::
- ParameterDescription*)&VehicleInfo__SubscribeVehicleData__request__parameter5,
- (const ford_message_descriptions::
- ParameterDescription*)&VehicleInfo__SubscribeVehicleData__request__parameter6,
- (const ford_message_descriptions::
- ParameterDescription*)&VehicleInfo__SubscribeVehicleData__request__parameter7,
- (const ford_message_descriptions::
- ParameterDescription*)&VehicleInfo__SubscribeVehicleData__request__parameter8,
- (const ford_message_descriptions::
- ParameterDescription*)&VehicleInfo__SubscribeVehicleData__request__parameter9,
- (const ford_message_descriptions::
- ParameterDescription*)&VehicleInfo__SubscribeVehicleData__request__parameter10,
- (const ford_message_descriptions::
- ParameterDescription*)&VehicleInfo__SubscribeVehicleData__request__parameter11,
- (const ford_message_descriptions::
- ParameterDescription*)&VehicleInfo__SubscribeVehicleData__request__parameter12,
- (const ford_message_descriptions::
- ParameterDescription*)&VehicleInfo__SubscribeVehicleData__request__parameter13,
- (const ford_message_descriptions::
- ParameterDescription*)&VehicleInfo__SubscribeVehicleData__request__parameter14,
- (const ford_message_descriptions::
- ParameterDescription*)&VehicleInfo__SubscribeVehicleData__request__parameter15,
- (const ford_message_descriptions::
- ParameterDescription*)&VehicleInfo__SubscribeVehicleData__request__parameter16,
- (const ford_message_descriptions::
- ParameterDescription*)&VehicleInfo__SubscribeVehicleData__request__parameter17,
- (const ford_message_descriptions::
- ParameterDescription*)&VehicleInfo__SubscribeVehicleData__request__parameter18,
- (const ford_message_descriptions::
- ParameterDescription*)&VehicleInfo__SubscribeVehicleData__request__parameter19,
- (const ford_message_descriptions::
- ParameterDescription*)&VehicleInfo__SubscribeVehicleData__request__parameter20,
- (const ford_message_descriptions::
- ParameterDescription*)&VehicleInfo__SubscribeVehicleData__request__parameter21,
- (const ford_message_descriptions::
- ParameterDescription*)&VehicleInfo__SubscribeVehicleData__request__parameter22,
- (const ford_message_descriptions::
- ParameterDescription*)&VehicleInfo__SubscribeVehicleData__request__parameter23,
- (const ford_message_descriptions::
- ParameterDescription*)&VehicleInfo__SubscribeVehicleData__request__parameter24,
- NULL};
-const ford_message_descriptions::MessageDescription
- VehicleInfo__SubscribeVehicleData__request = {
- "VehicleInfo",
- "SubscribeVehicleData",
- hmi_apis::messageType::request,
- hmi_apis::FunctionID::VehicleInfo_SubscribeVehicleData,
- VehicleInfo__SubscribeVehicleData__request__parameters};
-
-const ford_message_descriptions::StructDescription
- VehicleInfo__SubscribeVehicleData__response__parameter1 = {
- {"gps", ford_message_descriptions::Struct, false},
- Structs::Common__VehicleDataResult__parameters};
-const ford_message_descriptions::StructDescription
- VehicleInfo__SubscribeVehicleData__response__parameter2 = {
- {"speed", ford_message_descriptions::Struct, false},
- Structs::Common__VehicleDataResult__parameters};
-const ford_message_descriptions::StructDescription
- VehicleInfo__SubscribeVehicleData__response__parameter3 = {
- {"rpm", ford_message_descriptions::Struct, false},
- Structs::Common__VehicleDataResult__parameters};
-const ford_message_descriptions::StructDescription
- VehicleInfo__SubscribeVehicleData__response__parameter4 = {
- {"fuelLevel", ford_message_descriptions::Struct, false},
- Structs::Common__VehicleDataResult__parameters};
-const ford_message_descriptions::StructDescription
- VehicleInfo__SubscribeVehicleData__response__parameter5 = {
- {"fuelLevel_State", ford_message_descriptions::Struct, false},
- Structs::Common__VehicleDataResult__parameters};
-const ford_message_descriptions::StructDescription
- VehicleInfo__SubscribeVehicleData__response__parameter6 = {
- {"instantFuelConsumption", ford_message_descriptions::Struct, false},
- Structs::Common__VehicleDataResult__parameters};
-const ford_message_descriptions::StructDescription
- VehicleInfo__SubscribeVehicleData__response__parameter7 = {
- {"externalTemperature", ford_message_descriptions::Struct, false},
- Structs::Common__VehicleDataResult__parameters};
-const ford_message_descriptions::StructDescription
- VehicleInfo__SubscribeVehicleData__response__parameter8 = {
- {"prndl", ford_message_descriptions::Struct, false},
- Structs::Common__VehicleDataResult__parameters};
-const ford_message_descriptions::StructDescription
- VehicleInfo__SubscribeVehicleData__response__parameter9 = {
- {"tirePressure", ford_message_descriptions::Struct, false},
- Structs::Common__VehicleDataResult__parameters};
-const ford_message_descriptions::StructDescription
- VehicleInfo__SubscribeVehicleData__response__parameter10 = {
- {"odometer", ford_message_descriptions::Struct, false},
- Structs::Common__VehicleDataResult__parameters};
-const ford_message_descriptions::StructDescription
- VehicleInfo__SubscribeVehicleData__response__parameter11 = {
- {"beltStatus", ford_message_descriptions::Struct, false},
- Structs::Common__VehicleDataResult__parameters};
-const ford_message_descriptions::StructDescription
- VehicleInfo__SubscribeVehicleData__response__parameter12 = {
- {"bodyInformation", ford_message_descriptions::Struct, false},
- Structs::Common__VehicleDataResult__parameters};
-const ford_message_descriptions::StructDescription
- VehicleInfo__SubscribeVehicleData__response__parameter13 = {
- {"deviceStatus", ford_message_descriptions::Struct, false},
- Structs::Common__VehicleDataResult__parameters};
-const ford_message_descriptions::StructDescription
- VehicleInfo__SubscribeVehicleData__response__parameter14 = {
- {"driverBraking", ford_message_descriptions::Struct, false},
- Structs::Common__VehicleDataResult__parameters};
-const ford_message_descriptions::StructDescription
- VehicleInfo__SubscribeVehicleData__response__parameter15 = {
- {"wiperStatus", ford_message_descriptions::Struct, false},
- Structs::Common__VehicleDataResult__parameters};
-const ford_message_descriptions::StructDescription
- VehicleInfo__SubscribeVehicleData__response__parameter16 = {
- {"headLampStatus", ford_message_descriptions::Struct, false},
- Structs::Common__VehicleDataResult__parameters};
-const ford_message_descriptions::StructDescription
- VehicleInfo__SubscribeVehicleData__response__parameter17 = {
- {"engineTorque", ford_message_descriptions::Struct, false},
- Structs::Common__VehicleDataResult__parameters};
-const ford_message_descriptions::StructDescription
- VehicleInfo__SubscribeVehicleData__response__parameter18 = {
- {"accPedalPosition", ford_message_descriptions::Struct, false},
- Structs::Common__VehicleDataResult__parameters};
-const ford_message_descriptions::StructDescription
- VehicleInfo__SubscribeVehicleData__response__parameter19 = {
- {"steeringWheelAngle", ford_message_descriptions::Struct, false},
- Structs::Common__VehicleDataResult__parameters};
-const ford_message_descriptions::StructDescription
- VehicleInfo__SubscribeVehicleData__response__parameter20 = {
- {"eCallInfo", ford_message_descriptions::Struct, false},
- Structs::Common__VehicleDataResult__parameters};
-const ford_message_descriptions::StructDescription
- VehicleInfo__SubscribeVehicleData__response__parameter21 = {
- {"airbagStatus", ford_message_descriptions::Struct, false},
- Structs::Common__VehicleDataResult__parameters};
-const ford_message_descriptions::StructDescription
- VehicleInfo__SubscribeVehicleData__response__parameter22 = {
- {"emergencyEvent", ford_message_descriptions::Struct, false},
- Structs::Common__VehicleDataResult__parameters};
-const ford_message_descriptions::StructDescription
- VehicleInfo__SubscribeVehicleData__response__parameter23 = {
- {"clusterModes", ford_message_descriptions::Struct, false},
- Structs::Common__VehicleDataResult__parameters};
-const ford_message_descriptions::StructDescription
- VehicleInfo__SubscribeVehicleData__response__parameter24 = {
- {"myKey", ford_message_descriptions::Struct, false},
- Structs::Common__VehicleDataResult__parameters};
-const ford_message_descriptions::ParameterDescription* VehicleInfo__SubscribeVehicleData__response__parameters[] = {
- (const ford_message_descriptions::
- ParameterDescription*)&VehicleInfo__SubscribeVehicleData__response__parameter1,
- (const ford_message_descriptions::
- ParameterDescription*)&VehicleInfo__SubscribeVehicleData__response__parameter2,
- (const ford_message_descriptions::
- ParameterDescription*)&VehicleInfo__SubscribeVehicleData__response__parameter3,
- (const ford_message_descriptions::
- ParameterDescription*)&VehicleInfo__SubscribeVehicleData__response__parameter4,
- (const ford_message_descriptions::
- ParameterDescription*)&VehicleInfo__SubscribeVehicleData__response__parameter5,
- (const ford_message_descriptions::
- ParameterDescription*)&VehicleInfo__SubscribeVehicleData__response__parameter6,
- (const ford_message_descriptions::
- ParameterDescription*)&VehicleInfo__SubscribeVehicleData__response__parameter7,
- (const ford_message_descriptions::
- ParameterDescription*)&VehicleInfo__SubscribeVehicleData__response__parameter8,
- (const ford_message_descriptions::
- ParameterDescription*)&VehicleInfo__SubscribeVehicleData__response__parameter9,
- (const ford_message_descriptions::
- ParameterDescription*)&VehicleInfo__SubscribeVehicleData__response__parameter10,
- (const ford_message_descriptions::
- ParameterDescription*)&VehicleInfo__SubscribeVehicleData__response__parameter11,
- (const ford_message_descriptions::
- ParameterDescription*)&VehicleInfo__SubscribeVehicleData__response__parameter12,
- (const ford_message_descriptions::
- ParameterDescription*)&VehicleInfo__SubscribeVehicleData__response__parameter13,
- (const ford_message_descriptions::
- ParameterDescription*)&VehicleInfo__SubscribeVehicleData__response__parameter14,
- (const ford_message_descriptions::
- ParameterDescription*)&VehicleInfo__SubscribeVehicleData__response__parameter15,
- (const ford_message_descriptions::
- ParameterDescription*)&VehicleInfo__SubscribeVehicleData__response__parameter16,
- (const ford_message_descriptions::
- ParameterDescription*)&VehicleInfo__SubscribeVehicleData__response__parameter17,
- (const ford_message_descriptions::
- ParameterDescription*)&VehicleInfo__SubscribeVehicleData__response__parameter18,
- (const ford_message_descriptions::
- ParameterDescription*)&VehicleInfo__SubscribeVehicleData__response__parameter19,
- (const ford_message_descriptions::
- ParameterDescription*)&VehicleInfo__SubscribeVehicleData__response__parameter20,
- (const ford_message_descriptions::
- ParameterDescription*)&VehicleInfo__SubscribeVehicleData__response__parameter21,
- (const ford_message_descriptions::
- ParameterDescription*)&VehicleInfo__SubscribeVehicleData__response__parameter22,
- (const ford_message_descriptions::
- ParameterDescription*)&VehicleInfo__SubscribeVehicleData__response__parameter23,
- (const ford_message_descriptions::
- ParameterDescription*)&VehicleInfo__SubscribeVehicleData__response__parameter24,
- NULL};
-const ford_message_descriptions::MessageDescription
- VehicleInfo__SubscribeVehicleData__response = {
- "VehicleInfo",
- "SubscribeVehicleData",
- hmi_apis::messageType::response,
- hmi_apis::FunctionID::VehicleInfo_SubscribeVehicleData,
- VehicleInfo__SubscribeVehicleData__response__parameters};
-
-const ford_message_descriptions::ParameterDescription
- VehicleInfo__UnsubscribeVehicleData__request__parameter1 = {
- "appID", ford_message_descriptions::Integer, true};
-const ford_message_descriptions::ParameterDescription
- VehicleInfo__UnsubscribeVehicleData__request__parameter2 = {
- "gps", ford_message_descriptions::Boolean, false};
-const ford_message_descriptions::ParameterDescription
- VehicleInfo__UnsubscribeVehicleData__request__parameter3 = {
- "speed", ford_message_descriptions::Boolean, false};
-const ford_message_descriptions::ParameterDescription
- VehicleInfo__UnsubscribeVehicleData__request__parameter4 = {
- "rpm", ford_message_descriptions::Boolean, false};
-const ford_message_descriptions::ParameterDescription
- VehicleInfo__UnsubscribeVehicleData__request__parameter5 = {
- "fuelLevel", ford_message_descriptions::Boolean, false};
-const ford_message_descriptions::ParameterDescription
- VehicleInfo__UnsubscribeVehicleData__request__parameter6 = {
- "fuelLevel_State", ford_message_descriptions::Boolean, false};
-const ford_message_descriptions::ParameterDescription
- VehicleInfo__UnsubscribeVehicleData__request__parameter7 = {
- "instantFuelConsumption", ford_message_descriptions::Boolean, false};
-const ford_message_descriptions::ParameterDescription
- VehicleInfo__UnsubscribeVehicleData__request__parameter8 = {
- "externalTemperature", ford_message_descriptions::Boolean, false};
-const ford_message_descriptions::ParameterDescription
- VehicleInfo__UnsubscribeVehicleData__request__parameter9 = {
- "prndl", ford_message_descriptions::Boolean, false};
-const ford_message_descriptions::ParameterDescription
- VehicleInfo__UnsubscribeVehicleData__request__parameter10 = {
- "tirePressure", ford_message_descriptions::Boolean, false};
-const ford_message_descriptions::ParameterDescription
- VehicleInfo__UnsubscribeVehicleData__request__parameter11 = {
- "odometer", ford_message_descriptions::Boolean, false};
-const ford_message_descriptions::ParameterDescription
- VehicleInfo__UnsubscribeVehicleData__request__parameter12 = {
- "beltStatus", ford_message_descriptions::Boolean, false};
-const ford_message_descriptions::ParameterDescription
- VehicleInfo__UnsubscribeVehicleData__request__parameter13 = {
- "bodyInformation", ford_message_descriptions::Boolean, false};
-const ford_message_descriptions::ParameterDescription
- VehicleInfo__UnsubscribeVehicleData__request__parameter14 = {
- "deviceStatus", ford_message_descriptions::Boolean, false};
-const ford_message_descriptions::ParameterDescription
- VehicleInfo__UnsubscribeVehicleData__request__parameter15 = {
- "driverBraking", ford_message_descriptions::Boolean, false};
-const ford_message_descriptions::ParameterDescription
- VehicleInfo__UnsubscribeVehicleData__request__parameter16 = {
- "wiperStatus", ford_message_descriptions::Boolean, false};
-const ford_message_descriptions::ParameterDescription
- VehicleInfo__UnsubscribeVehicleData__request__parameter17 = {
- "headLampStatus", ford_message_descriptions::Boolean, false};
-const ford_message_descriptions::ParameterDescription
- VehicleInfo__UnsubscribeVehicleData__request__parameter18 = {
- "engineTorque", ford_message_descriptions::Boolean, false};
-const ford_message_descriptions::ParameterDescription
- VehicleInfo__UnsubscribeVehicleData__request__parameter19 = {
- "accPedalPosition", ford_message_descriptions::Boolean, false};
-const ford_message_descriptions::ParameterDescription
- VehicleInfo__UnsubscribeVehicleData__request__parameter20 = {
- "steeringWheelAngle", ford_message_descriptions::Boolean, false};
-const ford_message_descriptions::ParameterDescription
- VehicleInfo__UnsubscribeVehicleData__request__parameter21 = {
- "eCallInfo", ford_message_descriptions::Boolean, false};
-const ford_message_descriptions::ParameterDescription
- VehicleInfo__UnsubscribeVehicleData__request__parameter22 = {
- "airbagStatus", ford_message_descriptions::Boolean, false};
-const ford_message_descriptions::ParameterDescription
- VehicleInfo__UnsubscribeVehicleData__request__parameter23 = {
- "emergencyEvent", ford_message_descriptions::Boolean, false};
-const ford_message_descriptions::ParameterDescription
- VehicleInfo__UnsubscribeVehicleData__request__parameter24 = {
- "clusterModeStatus", ford_message_descriptions::Boolean, false};
-const ford_message_descriptions::ParameterDescription
- VehicleInfo__UnsubscribeVehicleData__request__parameter25 = {
- "myKey", ford_message_descriptions::Boolean, false};
-const ford_message_descriptions::ParameterDescription* VehicleInfo__UnsubscribeVehicleData__request__parameters[] = {
- (const ford_message_descriptions::
- ParameterDescription*)&VehicleInfo__UnsubscribeVehicleData__request__parameter1,
- (const ford_message_descriptions::
- ParameterDescription*)&VehicleInfo__UnsubscribeVehicleData__request__parameter2,
- (const ford_message_descriptions::
- ParameterDescription*)&VehicleInfo__UnsubscribeVehicleData__request__parameter3,
- (const ford_message_descriptions::
- ParameterDescription*)&VehicleInfo__UnsubscribeVehicleData__request__parameter4,
- (const ford_message_descriptions::
- ParameterDescription*)&VehicleInfo__UnsubscribeVehicleData__request__parameter5,
- (const ford_message_descriptions::
- ParameterDescription*)&VehicleInfo__UnsubscribeVehicleData__request__parameter6,
- (const ford_message_descriptions::
- ParameterDescription*)&VehicleInfo__UnsubscribeVehicleData__request__parameter7,
- (const ford_message_descriptions::
- ParameterDescription*)&VehicleInfo__UnsubscribeVehicleData__request__parameter8,
- (const ford_message_descriptions::
- ParameterDescription*)&VehicleInfo__UnsubscribeVehicleData__request__parameter9,
- (const ford_message_descriptions::
- ParameterDescription*)&VehicleInfo__UnsubscribeVehicleData__request__parameter10,
- (const ford_message_descriptions::
- ParameterDescription*)&VehicleInfo__UnsubscribeVehicleData__request__parameter11,
- (const ford_message_descriptions::
- ParameterDescription*)&VehicleInfo__UnsubscribeVehicleData__request__parameter12,
- (const ford_message_descriptions::
- ParameterDescription*)&VehicleInfo__UnsubscribeVehicleData__request__parameter13,
- (const ford_message_descriptions::
- ParameterDescription*)&VehicleInfo__UnsubscribeVehicleData__request__parameter14,
- (const ford_message_descriptions::
- ParameterDescription*)&VehicleInfo__UnsubscribeVehicleData__request__parameter15,
- (const ford_message_descriptions::
- ParameterDescription*)&VehicleInfo__UnsubscribeVehicleData__request__parameter16,
- (const ford_message_descriptions::
- ParameterDescription*)&VehicleInfo__UnsubscribeVehicleData__request__parameter17,
- (const ford_message_descriptions::
- ParameterDescription*)&VehicleInfo__UnsubscribeVehicleData__request__parameter18,
- (const ford_message_descriptions::
- ParameterDescription*)&VehicleInfo__UnsubscribeVehicleData__request__parameter19,
- (const ford_message_descriptions::
- ParameterDescription*)&VehicleInfo__UnsubscribeVehicleData__request__parameter20,
- (const ford_message_descriptions::
- ParameterDescription*)&VehicleInfo__UnsubscribeVehicleData__request__parameter21,
- (const ford_message_descriptions::
- ParameterDescription*)&VehicleInfo__UnsubscribeVehicleData__request__parameter22,
- (const ford_message_descriptions::
- ParameterDescription*)&VehicleInfo__UnsubscribeVehicleData__request__parameter23,
- (const ford_message_descriptions::
- ParameterDescription*)&VehicleInfo__UnsubscribeVehicleData__request__parameter24,
- (const ford_message_descriptions::
- ParameterDescription*)&VehicleInfo__UnsubscribeVehicleData__request__parameter25,
- NULL};
-const ford_message_descriptions::MessageDescription
- VehicleInfo__UnsubscribeVehicleData__request = {
- "VehicleInfo",
- "UnsubscribeVehicleData",
- hmi_apis::messageType::request,
- hmi_apis::FunctionID::VehicleInfo_UnsubscribeVehicleData,
- VehicleInfo__UnsubscribeVehicleData__request__parameters};
-
-const ford_message_descriptions::StructDescription
- VehicleInfo__UnsubscribeVehicleData__response__parameter1 = {
- {"gps", ford_message_descriptions::Struct, false},
- Structs::Common__VehicleDataResult__parameters};
-const ford_message_descriptions::StructDescription
- VehicleInfo__UnsubscribeVehicleData__response__parameter2 = {
- {"speed", ford_message_descriptions::Struct, false},
- Structs::Common__VehicleDataResult__parameters};
-const ford_message_descriptions::StructDescription
- VehicleInfo__UnsubscribeVehicleData__response__parameter3 = {
- {"rpm", ford_message_descriptions::Struct, false},
- Structs::Common__VehicleDataResult__parameters};
-const ford_message_descriptions::StructDescription
- VehicleInfo__UnsubscribeVehicleData__response__parameter4 = {
- {"fuelLevel", ford_message_descriptions::Struct, false},
- Structs::Common__VehicleDataResult__parameters};
-const ford_message_descriptions::StructDescription
- VehicleInfo__UnsubscribeVehicleData__response__parameter5 = {
- {"fuelLevel_State", ford_message_descriptions::Struct, false},
- Structs::Common__VehicleDataResult__parameters};
-const ford_message_descriptions::StructDescription
- VehicleInfo__UnsubscribeVehicleData__response__parameter6 = {
- {"instantFuelConsumption", ford_message_descriptions::Struct, false},
- Structs::Common__VehicleDataResult__parameters};
-const ford_message_descriptions::StructDescription
- VehicleInfo__UnsubscribeVehicleData__response__parameter7 = {
- {"externalTemperature", ford_message_descriptions::Struct, false},
- Structs::Common__VehicleDataResult__parameters};
-const ford_message_descriptions::StructDescription
- VehicleInfo__UnsubscribeVehicleData__response__parameter8 = {
- {"prndl", ford_message_descriptions::Struct, false},
- Structs::Common__VehicleDataResult__parameters};
-const ford_message_descriptions::StructDescription
- VehicleInfo__UnsubscribeVehicleData__response__parameter9 = {
- {"tirePressure", ford_message_descriptions::Struct, false},
- Structs::Common__VehicleDataResult__parameters};
-const ford_message_descriptions::StructDescription
- VehicleInfo__UnsubscribeVehicleData__response__parameter10 = {
- {"odometer", ford_message_descriptions::Struct, false},
- Structs::Common__VehicleDataResult__parameters};
-const ford_message_descriptions::StructDescription
- VehicleInfo__UnsubscribeVehicleData__response__parameter11 = {
- {"beltStatus", ford_message_descriptions::Struct, false},
- Structs::Common__VehicleDataResult__parameters};
-const ford_message_descriptions::StructDescription
- VehicleInfo__UnsubscribeVehicleData__response__parameter12 = {
- {"bodyInformation", ford_message_descriptions::Struct, false},
- Structs::Common__VehicleDataResult__parameters};
-const ford_message_descriptions::StructDescription
- VehicleInfo__UnsubscribeVehicleData__response__parameter13 = {
- {"deviceStatus", ford_message_descriptions::Struct, false},
- Structs::Common__VehicleDataResult__parameters};
-const ford_message_descriptions::StructDescription
- VehicleInfo__UnsubscribeVehicleData__response__parameter14 = {
- {"driverBraking", ford_message_descriptions::Struct, false},
- Structs::Common__VehicleDataResult__parameters};
-const ford_message_descriptions::StructDescription
- VehicleInfo__UnsubscribeVehicleData__response__parameter15 = {
- {"wiperStatus", ford_message_descriptions::Struct, false},
- Structs::Common__VehicleDataResult__parameters};
-const ford_message_descriptions::StructDescription
- VehicleInfo__UnsubscribeVehicleData__response__parameter16 = {
- {"headLampStatus", ford_message_descriptions::Struct, false},
- Structs::Common__VehicleDataResult__parameters};
-const ford_message_descriptions::StructDescription
- VehicleInfo__UnsubscribeVehicleData__response__parameter17 = {
- {"engineTorque", ford_message_descriptions::Struct, false},
- Structs::Common__VehicleDataResult__parameters};
-const ford_message_descriptions::StructDescription
- VehicleInfo__UnsubscribeVehicleData__response__parameter18 = {
- {"accPedalPosition", ford_message_descriptions::Struct, false},
- Structs::Common__VehicleDataResult__parameters};
-const ford_message_descriptions::StructDescription
- VehicleInfo__UnsubscribeVehicleData__response__parameter19 = {
- {"steeringWheelAngle", ford_message_descriptions::Struct, false},
- Structs::Common__VehicleDataResult__parameters};
-const ford_message_descriptions::StructDescription
- VehicleInfo__UnsubscribeVehicleData__response__parameter20 = {
- {"eCallInfo", ford_message_descriptions::Struct, false},
- Structs::Common__VehicleDataResult__parameters};
-const ford_message_descriptions::StructDescription
- VehicleInfo__UnsubscribeVehicleData__response__parameter21 = {
- {"airbagStatus", ford_message_descriptions::Struct, false},
- Structs::Common__VehicleDataResult__parameters};
-const ford_message_descriptions::StructDescription
- VehicleInfo__UnsubscribeVehicleData__response__parameter22 = {
- {"emergencyEvent", ford_message_descriptions::Struct, false},
- Structs::Common__VehicleDataResult__parameters};
-const ford_message_descriptions::StructDescription
- VehicleInfo__UnsubscribeVehicleData__response__parameter23 = {
- {"clusterModes", ford_message_descriptions::Struct, false},
- Structs::Common__VehicleDataResult__parameters};
-const ford_message_descriptions::StructDescription
- VehicleInfo__UnsubscribeVehicleData__response__parameter24 = {
- {"myKey", ford_message_descriptions::Struct, false},
- Structs::Common__VehicleDataResult__parameters};
-const ford_message_descriptions::ParameterDescription* VehicleInfo__UnsubscribeVehicleData__response__parameters[] = {
- (const ford_message_descriptions::
- ParameterDescription*)&VehicleInfo__UnsubscribeVehicleData__response__parameter1,
- (const ford_message_descriptions::
- ParameterDescription*)&VehicleInfo__UnsubscribeVehicleData__response__parameter2,
- (const ford_message_descriptions::
- ParameterDescription*)&VehicleInfo__UnsubscribeVehicleData__response__parameter3,
- (const ford_message_descriptions::
- ParameterDescription*)&VehicleInfo__UnsubscribeVehicleData__response__parameter4,
- (const ford_message_descriptions::
- ParameterDescription*)&VehicleInfo__UnsubscribeVehicleData__response__parameter5,
- (const ford_message_descriptions::
- ParameterDescription*)&VehicleInfo__UnsubscribeVehicleData__response__parameter6,
- (const ford_message_descriptions::
- ParameterDescription*)&VehicleInfo__UnsubscribeVehicleData__response__parameter7,
- (const ford_message_descriptions::
- ParameterDescription*)&VehicleInfo__UnsubscribeVehicleData__response__parameter8,
- (const ford_message_descriptions::
- ParameterDescription*)&VehicleInfo__UnsubscribeVehicleData__response__parameter9,
- (const ford_message_descriptions::
- ParameterDescription*)&VehicleInfo__UnsubscribeVehicleData__response__parameter10,
- (const ford_message_descriptions::
- ParameterDescription*)&VehicleInfo__UnsubscribeVehicleData__response__parameter11,
- (const ford_message_descriptions::
- ParameterDescription*)&VehicleInfo__UnsubscribeVehicleData__response__parameter12,
- (const ford_message_descriptions::
- ParameterDescription*)&VehicleInfo__UnsubscribeVehicleData__response__parameter13,
- (const ford_message_descriptions::
- ParameterDescription*)&VehicleInfo__UnsubscribeVehicleData__response__parameter14,
- (const ford_message_descriptions::
- ParameterDescription*)&VehicleInfo__UnsubscribeVehicleData__response__parameter15,
- (const ford_message_descriptions::
- ParameterDescription*)&VehicleInfo__UnsubscribeVehicleData__response__parameter16,
- (const ford_message_descriptions::
- ParameterDescription*)&VehicleInfo__UnsubscribeVehicleData__response__parameter17,
- (const ford_message_descriptions::
- ParameterDescription*)&VehicleInfo__UnsubscribeVehicleData__response__parameter18,
- (const ford_message_descriptions::
- ParameterDescription*)&VehicleInfo__UnsubscribeVehicleData__response__parameter19,
- (const ford_message_descriptions::
- ParameterDescription*)&VehicleInfo__UnsubscribeVehicleData__response__parameter20,
- (const ford_message_descriptions::
- ParameterDescription*)&VehicleInfo__UnsubscribeVehicleData__response__parameter21,
- (const ford_message_descriptions::
- ParameterDescription*)&VehicleInfo__UnsubscribeVehicleData__response__parameter22,
- (const ford_message_descriptions::
- ParameterDescription*)&VehicleInfo__UnsubscribeVehicleData__response__parameter23,
- (const ford_message_descriptions::
- ParameterDescription*)&VehicleInfo__UnsubscribeVehicleData__response__parameter24,
- NULL};
-const ford_message_descriptions::MessageDescription
- VehicleInfo__UnsubscribeVehicleData__response = {
- "VehicleInfo",
- "UnsubscribeVehicleData",
- hmi_apis::messageType::response,
- hmi_apis::FunctionID::VehicleInfo_UnsubscribeVehicleData,
- VehicleInfo__UnsubscribeVehicleData__response__parameters};
-
-const ford_message_descriptions::ParameterDescription
- VehicleInfo__GetVehicleData__request__parameter1 = {
- "gps", ford_message_descriptions::Boolean, false};
-const ford_message_descriptions::ParameterDescription
- VehicleInfo__GetVehicleData__request__parameter2 = {
- "speed", ford_message_descriptions::Boolean, false};
-const ford_message_descriptions::ParameterDescription
- VehicleInfo__GetVehicleData__request__parameter3 = {
- "rpm", ford_message_descriptions::Boolean, false};
-const ford_message_descriptions::ParameterDescription
- VehicleInfo__GetVehicleData__request__parameter4 = {
- "fuelLevel", ford_message_descriptions::Boolean, false};
-const ford_message_descriptions::ParameterDescription
- VehicleInfo__GetVehicleData__request__parameter5 = {
- "fuelLevel_State", ford_message_descriptions::Boolean, false};
-const ford_message_descriptions::ParameterDescription
- VehicleInfo__GetVehicleData__request__parameter6 = {
- "instantFuelConsumption", ford_message_descriptions::Boolean, false};
-const ford_message_descriptions::ParameterDescription
- VehicleInfo__GetVehicleData__request__parameter7 = {
- "externalTemperature", ford_message_descriptions::Boolean, false};
-const ford_message_descriptions::ParameterDescription
- VehicleInfo__GetVehicleData__request__parameter8 = {
- "vin", ford_message_descriptions::Boolean, false};
-const ford_message_descriptions::ParameterDescription
- VehicleInfo__GetVehicleData__request__parameter9 = {
- "prndl", ford_message_descriptions::Boolean, false};
-const ford_message_descriptions::ParameterDescription
- VehicleInfo__GetVehicleData__request__parameter10 = {
- "tirePressure", ford_message_descriptions::Boolean, false};
-const ford_message_descriptions::ParameterDescription
- VehicleInfo__GetVehicleData__request__parameter11 = {
- "odometer", ford_message_descriptions::Boolean, false};
-const ford_message_descriptions::ParameterDescription
- VehicleInfo__GetVehicleData__request__parameter12 = {
- "beltStatus", ford_message_descriptions::Boolean, false};
-const ford_message_descriptions::ParameterDescription
- VehicleInfo__GetVehicleData__request__parameter13 = {
- "bodyInformation", ford_message_descriptions::Boolean, false};
-const ford_message_descriptions::ParameterDescription
- VehicleInfo__GetVehicleData__request__parameter14 = {
- "deviceStatus", ford_message_descriptions::Boolean, false};
-const ford_message_descriptions::ParameterDescription
- VehicleInfo__GetVehicleData__request__parameter15 = {
- "driverBraking", ford_message_descriptions::Boolean, false};
-const ford_message_descriptions::ParameterDescription
- VehicleInfo__GetVehicleData__request__parameter16 = {
- "wiperStatus", ford_message_descriptions::Boolean, false};
-const ford_message_descriptions::ParameterDescription
- VehicleInfo__GetVehicleData__request__parameter17 = {
- "headLampStatus", ford_message_descriptions::Boolean, false};
-const ford_message_descriptions::ParameterDescription
- VehicleInfo__GetVehicleData__request__parameter18 = {
- "engineTorque", ford_message_descriptions::Boolean, false};
-const ford_message_descriptions::ParameterDescription
- VehicleInfo__GetVehicleData__request__parameter19 = {
- "accPedalPosition", ford_message_descriptions::Boolean, false};
-const ford_message_descriptions::ParameterDescription
- VehicleInfo__GetVehicleData__request__parameter20 = {
- "steeringWheelAngle", ford_message_descriptions::Boolean, false};
-const ford_message_descriptions::ParameterDescription
- VehicleInfo__GetVehicleData__request__parameter21 = {
- "eCallInfo", ford_message_descriptions::Boolean, false};
-const ford_message_descriptions::ParameterDescription
- VehicleInfo__GetVehicleData__request__parameter22 = {
- "airbagStatus", ford_message_descriptions::Boolean, false};
-const ford_message_descriptions::ParameterDescription
- VehicleInfo__GetVehicleData__request__parameter23 = {
- "emergencyEvent", ford_message_descriptions::Boolean, false};
-const ford_message_descriptions::ParameterDescription
- VehicleInfo__GetVehicleData__request__parameter24 = {
- "clusterModeStatus", ford_message_descriptions::Boolean, false};
-const ford_message_descriptions::ParameterDescription
- VehicleInfo__GetVehicleData__request__parameter25 = {
- "myKey", ford_message_descriptions::Boolean, false};
-const ford_message_descriptions::ParameterDescription* VehicleInfo__GetVehicleData__request__parameters[] = {
- (const ford_message_descriptions::
- ParameterDescription*)&VehicleInfo__GetVehicleData__request__parameter1,
- (const ford_message_descriptions::
- ParameterDescription*)&VehicleInfo__GetVehicleData__request__parameter2,
- (const ford_message_descriptions::
- ParameterDescription*)&VehicleInfo__GetVehicleData__request__parameter3,
- (const ford_message_descriptions::
- ParameterDescription*)&VehicleInfo__GetVehicleData__request__parameter4,
- (const ford_message_descriptions::
- ParameterDescription*)&VehicleInfo__GetVehicleData__request__parameter5,
- (const ford_message_descriptions::
- ParameterDescription*)&VehicleInfo__GetVehicleData__request__parameter6,
- (const ford_message_descriptions::
- ParameterDescription*)&VehicleInfo__GetVehicleData__request__parameter7,
- (const ford_message_descriptions::
- ParameterDescription*)&VehicleInfo__GetVehicleData__request__parameter8,
- (const ford_message_descriptions::
- ParameterDescription*)&VehicleInfo__GetVehicleData__request__parameter9,
- (const ford_message_descriptions::
- ParameterDescription*)&VehicleInfo__GetVehicleData__request__parameter10,
- (const ford_message_descriptions::
- ParameterDescription*)&VehicleInfo__GetVehicleData__request__parameter11,
- (const ford_message_descriptions::
- ParameterDescription*)&VehicleInfo__GetVehicleData__request__parameter12,
- (const ford_message_descriptions::
- ParameterDescription*)&VehicleInfo__GetVehicleData__request__parameter13,
- (const ford_message_descriptions::
- ParameterDescription*)&VehicleInfo__GetVehicleData__request__parameter14,
- (const ford_message_descriptions::
- ParameterDescription*)&VehicleInfo__GetVehicleData__request__parameter15,
- (const ford_message_descriptions::
- ParameterDescription*)&VehicleInfo__GetVehicleData__request__parameter16,
- (const ford_message_descriptions::
- ParameterDescription*)&VehicleInfo__GetVehicleData__request__parameter17,
- (const ford_message_descriptions::
- ParameterDescription*)&VehicleInfo__GetVehicleData__request__parameter18,
- (const ford_message_descriptions::
- ParameterDescription*)&VehicleInfo__GetVehicleData__request__parameter19,
- (const ford_message_descriptions::
- ParameterDescription*)&VehicleInfo__GetVehicleData__request__parameter20,
- (const ford_message_descriptions::
- ParameterDescription*)&VehicleInfo__GetVehicleData__request__parameter21,
- (const ford_message_descriptions::
- ParameterDescription*)&VehicleInfo__GetVehicleData__request__parameter22,
- (const ford_message_descriptions::
- ParameterDescription*)&VehicleInfo__GetVehicleData__request__parameter23,
- (const ford_message_descriptions::
- ParameterDescription*)&VehicleInfo__GetVehicleData__request__parameter24,
- (const ford_message_descriptions::
- ParameterDescription*)&VehicleInfo__GetVehicleData__request__parameter25,
- NULL};
-const ford_message_descriptions::MessageDescription
- VehicleInfo__GetVehicleData__request = {
- "VehicleInfo",
- "GetVehicleData",
- hmi_apis::messageType::request,
- hmi_apis::FunctionID::VehicleInfo_GetVehicleData,
- VehicleInfo__GetVehicleData__request__parameters};
-
-const ford_message_descriptions::StructDescription
- VehicleInfo__GetVehicleData__response__parameter1 = {
- {"gps", ford_message_descriptions::Struct, false},
- Structs::Common__GPSData__parameters};
-const ford_message_descriptions::ParameterDescription
- VehicleInfo__GetVehicleData__response__parameter2 = {
- "speed", ford_message_descriptions::Float, false};
-const ford_message_descriptions::ParameterDescription
- VehicleInfo__GetVehicleData__response__parameter3 = {
- "rpm", ford_message_descriptions::Integer, false};
-const ford_message_descriptions::ParameterDescription
- VehicleInfo__GetVehicleData__response__parameter4 = {
- "fuelLevel", ford_message_descriptions::Float, false};
-const ford_message_descriptions::ParameterDescription
- VehicleInfo__GetVehicleData__response__parameter5 = {
- "fuelLevel_State", ford_message_descriptions::Enum, false};
-const ford_message_descriptions::ParameterDescription
- VehicleInfo__GetVehicleData__response__parameter6 = {
- "instantFuelConsumption", ford_message_descriptions::Float, false};
-const ford_message_descriptions::ParameterDescription
- VehicleInfo__GetVehicleData__response__parameter7 = {
- "externalTemperature", ford_message_descriptions::Float, false};
-const ford_message_descriptions::ParameterDescription
- VehicleInfo__GetVehicleData__response__parameter8 = {
- "vin", ford_message_descriptions::String, false};
-const ford_message_descriptions::ParameterDescription
- VehicleInfo__GetVehicleData__response__parameter9 = {
- "prndl", ford_message_descriptions::Enum, false};
-const ford_message_descriptions::StructDescription
- VehicleInfo__GetVehicleData__response__parameter10 = {
- {"tirePressure", ford_message_descriptions::Struct, false},
- Structs::Common__TireStatus__parameters};
-const ford_message_descriptions::ParameterDescription
- VehicleInfo__GetVehicleData__response__parameter11 = {
- "odometer", ford_message_descriptions::Integer, false};
-const ford_message_descriptions::StructDescription
- VehicleInfo__GetVehicleData__response__parameter12 = {
- {"beltStatus", ford_message_descriptions::Struct, false},
- Structs::Common__BeltStatus__parameters};
-const ford_message_descriptions::StructDescription
- VehicleInfo__GetVehicleData__response__parameter13 = {
- {"bodyInformation", ford_message_descriptions::Struct, false},
- Structs::Common__BodyInformation__parameters};
-const ford_message_descriptions::StructDescription
- VehicleInfo__GetVehicleData__response__parameter14 = {
- {"deviceStatus", ford_message_descriptions::Struct, false},
- Structs::Common__DeviceStatus__parameters};
-const ford_message_descriptions::ParameterDescription
- VehicleInfo__GetVehicleData__response__parameter15 = {
- "driverBraking", ford_message_descriptions::Enum, false};
-const ford_message_descriptions::ParameterDescription
- VehicleInfo__GetVehicleData__response__parameter16 = {
- "wiperStatus", ford_message_descriptions::Enum, false};
-const ford_message_descriptions::StructDescription
- VehicleInfo__GetVehicleData__response__parameter17 = {
- {"headLampStatus", ford_message_descriptions::Struct, false},
- Structs::Common__HeadLampStatus__parameters};
-const ford_message_descriptions::ParameterDescription
- VehicleInfo__GetVehicleData__response__parameter18 = {
- "engineTorque", ford_message_descriptions::Float, false};
-const ford_message_descriptions::ParameterDescription
- VehicleInfo__GetVehicleData__response__parameter19 = {
- "accPedalPosition", ford_message_descriptions::Float, false};
-const ford_message_descriptions::ParameterDescription
- VehicleInfo__GetVehicleData__response__parameter20 = {
- "steeringWheelAngle", ford_message_descriptions::Float, false};
-const ford_message_descriptions::StructDescription
- VehicleInfo__GetVehicleData__response__parameter21 = {
- {"eCallInfo", ford_message_descriptions::Struct, false},
- Structs::Common__ECallInfo__parameters};
-const ford_message_descriptions::StructDescription
- VehicleInfo__GetVehicleData__response__parameter22 = {
- {"airbagStatus", ford_message_descriptions::Struct, false},
- Structs::Common__AirbagStatus__parameters};
-const ford_message_descriptions::StructDescription
- VehicleInfo__GetVehicleData__response__parameter23 = {
- {"emergencyEvent", ford_message_descriptions::Struct, false},
- Structs::Common__EmergencyEvent__parameters};
-const ford_message_descriptions::StructDescription
- VehicleInfo__GetVehicleData__response__parameter24 = {
- {"clusterModeStatus", ford_message_descriptions::Struct, false},
- Structs::Common__ClusterModeStatus__parameters};
-const ford_message_descriptions::StructDescription
- VehicleInfo__GetVehicleData__response__parameter25 = {
- {"myKey", ford_message_descriptions::Struct, false},
- Structs::Common__MyKey__parameters};
-const ford_message_descriptions::ParameterDescription* VehicleInfo__GetVehicleData__response__parameters[] = {
- (const ford_message_descriptions::
- ParameterDescription*)&VehicleInfo__GetVehicleData__response__parameter1,
- (const ford_message_descriptions::
- ParameterDescription*)&VehicleInfo__GetVehicleData__response__parameter2,
- (const ford_message_descriptions::
- ParameterDescription*)&VehicleInfo__GetVehicleData__response__parameter3,
- (const ford_message_descriptions::
- ParameterDescription*)&VehicleInfo__GetVehicleData__response__parameter4,
- (const ford_message_descriptions::
- ParameterDescription*)&VehicleInfo__GetVehicleData__response__parameter5,
- (const ford_message_descriptions::
- ParameterDescription*)&VehicleInfo__GetVehicleData__response__parameter6,
- (const ford_message_descriptions::
- ParameterDescription*)&VehicleInfo__GetVehicleData__response__parameter7,
- (const ford_message_descriptions::
- ParameterDescription*)&VehicleInfo__GetVehicleData__response__parameter8,
- (const ford_message_descriptions::
- ParameterDescription*)&VehicleInfo__GetVehicleData__response__parameter9,
- (const ford_message_descriptions::
- ParameterDescription*)&VehicleInfo__GetVehicleData__response__parameter10,
- (const ford_message_descriptions::
- ParameterDescription*)&VehicleInfo__GetVehicleData__response__parameter11,
- (const ford_message_descriptions::
- ParameterDescription*)&VehicleInfo__GetVehicleData__response__parameter12,
- (const ford_message_descriptions::
- ParameterDescription*)&VehicleInfo__GetVehicleData__response__parameter13,
- (const ford_message_descriptions::
- ParameterDescription*)&VehicleInfo__GetVehicleData__response__parameter14,
- (const ford_message_descriptions::
- ParameterDescription*)&VehicleInfo__GetVehicleData__response__parameter15,
- (const ford_message_descriptions::
- ParameterDescription*)&VehicleInfo__GetVehicleData__response__parameter16,
- (const ford_message_descriptions::
- ParameterDescription*)&VehicleInfo__GetVehicleData__response__parameter17,
- (const ford_message_descriptions::
- ParameterDescription*)&VehicleInfo__GetVehicleData__response__parameter18,
- (const ford_message_descriptions::
- ParameterDescription*)&VehicleInfo__GetVehicleData__response__parameter19,
- (const ford_message_descriptions::
- ParameterDescription*)&VehicleInfo__GetVehicleData__response__parameter20,
- (const ford_message_descriptions::
- ParameterDescription*)&VehicleInfo__GetVehicleData__response__parameter21,
- (const ford_message_descriptions::
- ParameterDescription*)&VehicleInfo__GetVehicleData__response__parameter22,
- (const ford_message_descriptions::
- ParameterDescription*)&VehicleInfo__GetVehicleData__response__parameter23,
- (const ford_message_descriptions::
- ParameterDescription*)&VehicleInfo__GetVehicleData__response__parameter24,
- (const ford_message_descriptions::
- ParameterDescription*)&VehicleInfo__GetVehicleData__response__parameter25,
- NULL};
-const ford_message_descriptions::MessageDescription
- VehicleInfo__GetVehicleData__response = {
- "VehicleInfo",
- "GetVehicleData",
- hmi_apis::messageType::response,
- hmi_apis::FunctionID::VehicleInfo_GetVehicleData,
- VehicleInfo__GetVehicleData__response__parameters};
-
-const ford_message_descriptions::StructDescription
- VehicleInfo__OnVehicleData__notification__parameter1 = {
- {"gps", ford_message_descriptions::Struct, false},
- Structs::Common__GPSData__parameters};
-const ford_message_descriptions::ParameterDescription
- VehicleInfo__OnVehicleData__notification__parameter2 = {
- "speed", ford_message_descriptions::Float, false};
-const ford_message_descriptions::ParameterDescription
- VehicleInfo__OnVehicleData__notification__parameter3 = {
- "rpm", ford_message_descriptions::Integer, false};
-const ford_message_descriptions::ParameterDescription
- VehicleInfo__OnVehicleData__notification__parameter4 = {
- "fuelLevel", ford_message_descriptions::Float, false};
-const ford_message_descriptions::ParameterDescription
- VehicleInfo__OnVehicleData__notification__parameter5 = {
- "fuelLevel_State", ford_message_descriptions::Enum, false};
-const ford_message_descriptions::ParameterDescription
- VehicleInfo__OnVehicleData__notification__parameter6 = {
- "instantFuelConsumption", ford_message_descriptions::Float, false};
-const ford_message_descriptions::ParameterDescription
- VehicleInfo__OnVehicleData__notification__parameter7 = {
- "externalTemperature", ford_message_descriptions::Float, false};
-const ford_message_descriptions::ParameterDescription
- VehicleInfo__OnVehicleData__notification__parameter8 = {
- "vin", ford_message_descriptions::String, false};
-const ford_message_descriptions::ParameterDescription
- VehicleInfo__OnVehicleData__notification__parameter9 = {
- "prndl", ford_message_descriptions::Enum, false};
-const ford_message_descriptions::StructDescription
- VehicleInfo__OnVehicleData__notification__parameter10 = {
- {"tirePressure", ford_message_descriptions::Struct, false},
- Structs::Common__TireStatus__parameters};
-const ford_message_descriptions::ParameterDescription
- VehicleInfo__OnVehicleData__notification__parameter11 = {
- "odometer", ford_message_descriptions::Integer, false};
-const ford_message_descriptions::StructDescription
- VehicleInfo__OnVehicleData__notification__parameter12 = {
- {"beltStatus", ford_message_descriptions::Struct, false},
- Structs::Common__BeltStatus__parameters};
-const ford_message_descriptions::StructDescription
- VehicleInfo__OnVehicleData__notification__parameter13 = {
- {"bodyInformation", ford_message_descriptions::Struct, false},
- Structs::Common__BodyInformation__parameters};
-const ford_message_descriptions::StructDescription
- VehicleInfo__OnVehicleData__notification__parameter14 = {
- {"deviceStatus", ford_message_descriptions::Struct, false},
- Structs::Common__DeviceStatus__parameters};
-const ford_message_descriptions::ParameterDescription
- VehicleInfo__OnVehicleData__notification__parameter15 = {
- "driverBraking", ford_message_descriptions::Enum, false};
-const ford_message_descriptions::ParameterDescription
- VehicleInfo__OnVehicleData__notification__parameter16 = {
- "wiperStatus", ford_message_descriptions::Enum, false};
-const ford_message_descriptions::StructDescription
- VehicleInfo__OnVehicleData__notification__parameter17 = {
- {"headLampStatus", ford_message_descriptions::Struct, false},
- Structs::Common__HeadLampStatus__parameters};
-const ford_message_descriptions::ParameterDescription
- VehicleInfo__OnVehicleData__notification__parameter18 = {
- "engineTorque", ford_message_descriptions::Float, false};
-const ford_message_descriptions::ParameterDescription
- VehicleInfo__OnVehicleData__notification__parameter19 = {
- "accPedalPosition", ford_message_descriptions::Float, false};
-const ford_message_descriptions::ParameterDescription
- VehicleInfo__OnVehicleData__notification__parameter20 = {
- "steeringWheelAngle", ford_message_descriptions::Float, false};
-const ford_message_descriptions::StructDescription
- VehicleInfo__OnVehicleData__notification__parameter21 = {
- {"eCallInfo", ford_message_descriptions::Struct, false},
- Structs::Common__ECallInfo__parameters};
-const ford_message_descriptions::StructDescription
- VehicleInfo__OnVehicleData__notification__parameter22 = {
- {"airbagStatus", ford_message_descriptions::Struct, false},
- Structs::Common__AirbagStatus__parameters};
-const ford_message_descriptions::StructDescription
- VehicleInfo__OnVehicleData__notification__parameter23 = {
- {"emergencyEvent", ford_message_descriptions::Struct, false},
- Structs::Common__EmergencyEvent__parameters};
-const ford_message_descriptions::StructDescription
- VehicleInfo__OnVehicleData__notification__parameter24 = {
- {"clusterModeStatus", ford_message_descriptions::Struct, false},
- Structs::Common__ClusterModeStatus__parameters};
-const ford_message_descriptions::StructDescription
- VehicleInfo__OnVehicleData__notification__parameter25 = {
- {"myKey", ford_message_descriptions::Struct, false},
- Structs::Common__MyKey__parameters};
-const ford_message_descriptions::ParameterDescription* VehicleInfo__OnVehicleData__notification__parameters[] = {
- (const ford_message_descriptions::
- ParameterDescription*)&VehicleInfo__OnVehicleData__notification__parameter1,
- (const ford_message_descriptions::
- ParameterDescription*)&VehicleInfo__OnVehicleData__notification__parameter2,
- (const ford_message_descriptions::
- ParameterDescription*)&VehicleInfo__OnVehicleData__notification__parameter3,
- (const ford_message_descriptions::
- ParameterDescription*)&VehicleInfo__OnVehicleData__notification__parameter4,
- (const ford_message_descriptions::
- ParameterDescription*)&VehicleInfo__OnVehicleData__notification__parameter5,
- (const ford_message_descriptions::
- ParameterDescription*)&VehicleInfo__OnVehicleData__notification__parameter6,
- (const ford_message_descriptions::
- ParameterDescription*)&VehicleInfo__OnVehicleData__notification__parameter7,
- (const ford_message_descriptions::
- ParameterDescription*)&VehicleInfo__OnVehicleData__notification__parameter8,
- (const ford_message_descriptions::
- ParameterDescription*)&VehicleInfo__OnVehicleData__notification__parameter9,
- (const ford_message_descriptions::
- ParameterDescription*)&VehicleInfo__OnVehicleData__notification__parameter10,
- (const ford_message_descriptions::
- ParameterDescription*)&VehicleInfo__OnVehicleData__notification__parameter11,
- (const ford_message_descriptions::
- ParameterDescription*)&VehicleInfo__OnVehicleData__notification__parameter12,
- (const ford_message_descriptions::
- ParameterDescription*)&VehicleInfo__OnVehicleData__notification__parameter13,
- (const ford_message_descriptions::
- ParameterDescription*)&VehicleInfo__OnVehicleData__notification__parameter14,
- (const ford_message_descriptions::
- ParameterDescription*)&VehicleInfo__OnVehicleData__notification__parameter15,
- (const ford_message_descriptions::
- ParameterDescription*)&VehicleInfo__OnVehicleData__notification__parameter16,
- (const ford_message_descriptions::
- ParameterDescription*)&VehicleInfo__OnVehicleData__notification__parameter17,
- (const ford_message_descriptions::
- ParameterDescription*)&VehicleInfo__OnVehicleData__notification__parameter18,
- (const ford_message_descriptions::
- ParameterDescription*)&VehicleInfo__OnVehicleData__notification__parameter19,
- (const ford_message_descriptions::
- ParameterDescription*)&VehicleInfo__OnVehicleData__notification__parameter20,
- (const ford_message_descriptions::
- ParameterDescription*)&VehicleInfo__OnVehicleData__notification__parameter21,
- (const ford_message_descriptions::
- ParameterDescription*)&VehicleInfo__OnVehicleData__notification__parameter22,
- (const ford_message_descriptions::
- ParameterDescription*)&VehicleInfo__OnVehicleData__notification__parameter23,
- (const ford_message_descriptions::
- ParameterDescription*)&VehicleInfo__OnVehicleData__notification__parameter24,
- (const ford_message_descriptions::
- ParameterDescription*)&VehicleInfo__OnVehicleData__notification__parameter25,
- NULL};
-const ford_message_descriptions::MessageDescription
- VehicleInfo__OnVehicleData__notification = {
- "VehicleInfo",
- "OnVehicleData",
- hmi_apis::messageType::notification,
- hmi_apis::FunctionID::VehicleInfo_OnVehicleData,
- VehicleInfo__OnVehicleData__notification__parameters};
-
-const ford_message_descriptions::ParameterDescription
- VehicleInfo__GetGpsData__request__parameter1 = {
- "appID", ford_message_descriptions::Integer, true};
-const ford_message_descriptions::ParameterDescription*
- VehicleInfo__GetGpsData__request__parameters[] = {
- (const ford_message_descriptions::
- ParameterDescription*)&VehicleInfo__GetGpsData__request__parameter1,
- NULL};
-const ford_message_descriptions::MessageDescription
- VehicleInfo__GetGpsData__request = {
- "VehicleInfo",
- "GetGpsData",
- hmi_apis::messageType::request,
- hmi_apis::FunctionID::VehicleInfo_GetGpsData,
- VehicleInfo__GetGpsData__request__parameters};
-
-const ford_message_descriptions::StructDescription
- VehicleInfo__GetGpsData__response__parameter1 = {
- {"gps", ford_message_descriptions::Struct, true},
- Structs::Common__GPSData__parameters};
-const ford_message_descriptions::ParameterDescription*
- VehicleInfo__GetGpsData__response__parameters[] = {
- (const ford_message_descriptions::
- ParameterDescription*)&VehicleInfo__GetGpsData__response__parameter1,
- NULL};
-const ford_message_descriptions::MessageDescription
- VehicleInfo__GetGpsData__response = {
- "VehicleInfo",
- "GetGpsData",
- hmi_apis::messageType::response,
- hmi_apis::FunctionID::VehicleInfo_GetGpsData,
- VehicleInfo__GetGpsData__response__parameters};
-
-const ford_message_descriptions::ParameterDescription
- VehicleInfo__GetSpeed__request__parameter1 = {
- "appID", ford_message_descriptions::Integer, true};
-const ford_message_descriptions::ParameterDescription*
- VehicleInfo__GetSpeed__request__parameters[] = {
- (const ford_message_descriptions::
- ParameterDescription*)&VehicleInfo__GetSpeed__request__parameter1,
- NULL};
-const ford_message_descriptions::MessageDescription
- VehicleInfo__GetSpeed__request = {
- "VehicleInfo",
- "GetSpeed",
- hmi_apis::messageType::request,
- hmi_apis::FunctionID::VehicleInfo_GetSpeed,
- VehicleInfo__GetSpeed__request__parameters};
-
-const ford_message_descriptions::ParameterDescription
- VehicleInfo__GetSpeed__response__parameter1 = {
- "speed", ford_message_descriptions::Float, true};
-const ford_message_descriptions::ParameterDescription*
- VehicleInfo__GetSpeed__response__parameters[] = {
- (const ford_message_descriptions::
- ParameterDescription*)&VehicleInfo__GetSpeed__response__parameter1,
- NULL};
-const ford_message_descriptions::MessageDescription
- VehicleInfo__GetSpeed__response = {
- "VehicleInfo",
- "GetSpeed",
- hmi_apis::messageType::response,
- hmi_apis::FunctionID::VehicleInfo_GetSpeed,
- VehicleInfo__GetSpeed__response__parameters};
-
-const ford_message_descriptions::ParameterDescription
- VehicleInfo__GetRpm__request__parameter1 = {
- "appID", ford_message_descriptions::Integer, true};
-const ford_message_descriptions::ParameterDescription*
- VehicleInfo__GetRpm__request__parameters[] = {
- (const ford_message_descriptions::
- ParameterDescription*)&VehicleInfo__GetRpm__request__parameter1,
- NULL};
-const ford_message_descriptions::MessageDescription
- VehicleInfo__GetRpm__request = {"VehicleInfo",
- "GetRpm",
- hmi_apis::messageType::request,
- hmi_apis::FunctionID::VehicleInfo_GetRpm,
- VehicleInfo__GetRpm__request__parameters};
-
-const ford_message_descriptions::ParameterDescription
- VehicleInfo__GetRpm__response__parameter1 = {
- "rpm", ford_message_descriptions::Integer, true};
-const ford_message_descriptions::ParameterDescription*
- VehicleInfo__GetRpm__response__parameters[] = {
- (const ford_message_descriptions::
- ParameterDescription*)&VehicleInfo__GetRpm__response__parameter1,
- NULL};
-const ford_message_descriptions::MessageDescription
- VehicleInfo__GetRpm__response = {"VehicleInfo",
- "GetRpm",
- hmi_apis::messageType::response,
- hmi_apis::FunctionID::VehicleInfo_GetRpm,
- VehicleInfo__GetRpm__response__parameters};
-
-const ford_message_descriptions::ParameterDescription
- VehicleInfo__GetFuelLevel__request__parameter1 = {
- "appID", ford_message_descriptions::Integer, true};
-const ford_message_descriptions::ParameterDescription*
- VehicleInfo__GetFuelLevel__request__parameters[] = {
- (const ford_message_descriptions::
- ParameterDescription*)&VehicleInfo__GetFuelLevel__request__parameter1,
- NULL};
-const ford_message_descriptions::MessageDescription
- VehicleInfo__GetFuelLevel__request = {
- "VehicleInfo",
- "GetFuelLevel",
- hmi_apis::messageType::request,
- hmi_apis::FunctionID::VehicleInfo_GetFuelLevel,
- VehicleInfo__GetFuelLevel__request__parameters};
-
-const ford_message_descriptions::ParameterDescription
- VehicleInfo__GetFuelLevel__response__parameter1 = {
- "fuelLevel", ford_message_descriptions::Float, true};
-const ford_message_descriptions::ParameterDescription*
- VehicleInfo__GetFuelLevel__response__parameters[] = {
- (const ford_message_descriptions::
- ParameterDescription*)&VehicleInfo__GetFuelLevel__response__parameter1,
- NULL};
-const ford_message_descriptions::MessageDescription
- VehicleInfo__GetFuelLevel__response = {
- "VehicleInfo",
- "GetFuelLevel",
- hmi_apis::messageType::response,
- hmi_apis::FunctionID::VehicleInfo_GetFuelLevel,
- VehicleInfo__GetFuelLevel__response__parameters};
-
-const ford_message_descriptions::ParameterDescription
- VehicleInfo__GetFuelLevelState__request__parameter1 = {
- "appID", ford_message_descriptions::Integer, true};
-const ford_message_descriptions::ParameterDescription*
- VehicleInfo__GetFuelLevelState__request__parameters[] = {
- (const ford_message_descriptions::
- ParameterDescription*)&VehicleInfo__GetFuelLevelState__request__parameter1,
- NULL};
-const ford_message_descriptions::MessageDescription
- VehicleInfo__GetFuelLevelState__request = {
- "VehicleInfo",
- "GetFuelLevelState",
- hmi_apis::messageType::request,
- hmi_apis::FunctionID::VehicleInfo_GetFuelLevelState,
- VehicleInfo__GetFuelLevelState__request__parameters};
-
-const ford_message_descriptions::ParameterDescription
- VehicleInfo__GetFuelLevelState__response__parameter1 = {
- "fuelLevel_State", ford_message_descriptions::Enum, true};
-const ford_message_descriptions::ParameterDescription*
- VehicleInfo__GetFuelLevelState__response__parameters[] = {
- (const ford_message_descriptions::
- ParameterDescription*)&VehicleInfo__GetFuelLevelState__response__parameter1,
- NULL};
-const ford_message_descriptions::MessageDescription
- VehicleInfo__GetFuelLevelState__response = {
- "VehicleInfo",
- "GetFuelLevelState",
- hmi_apis::messageType::response,
- hmi_apis::FunctionID::VehicleInfo_GetFuelLevelState,
- VehicleInfo__GetFuelLevelState__response__parameters};
-
-const ford_message_descriptions::ParameterDescription
- VehicleInfo__GetInstantFuelConsumption__request__parameter1 = {
- "appID", ford_message_descriptions::Integer, true};
-const ford_message_descriptions::ParameterDescription*
- VehicleInfo__GetInstantFuelConsumption__request__parameters[] = {
- (const ford_message_descriptions::
- ParameterDescription*)&VehicleInfo__GetInstantFuelConsumption__request__parameter1,
- NULL};
-const ford_message_descriptions::MessageDescription
- VehicleInfo__GetInstantFuelConsumption__request = {
- "VehicleInfo",
- "GetInstantFuelConsumption",
- hmi_apis::messageType::request,
- hmi_apis::FunctionID::VehicleInfo_GetInstantFuelConsumption,
- VehicleInfo__GetInstantFuelConsumption__request__parameters};
-
-const ford_message_descriptions::ParameterDescription
- VehicleInfo__GetInstantFuelConsumption__response__parameter1 = {
- "instantFuelConsumption", ford_message_descriptions::Float, true};
-const ford_message_descriptions::ParameterDescription*
- VehicleInfo__GetInstantFuelConsumption__response__parameters[] = {
- (const ford_message_descriptions::
- ParameterDescription*)&VehicleInfo__GetInstantFuelConsumption__response__parameter1,
- NULL};
-const ford_message_descriptions::MessageDescription
- VehicleInfo__GetInstantFuelConsumption__response = {
- "VehicleInfo",
- "GetInstantFuelConsumption",
- hmi_apis::messageType::response,
- hmi_apis::FunctionID::VehicleInfo_GetInstantFuelConsumption,
- VehicleInfo__GetInstantFuelConsumption__response__parameters};
-
-const ford_message_descriptions::ParameterDescription
- VehicleInfo__GetExternalTemperature__request__parameter1 = {
- "appID", ford_message_descriptions::Integer, true};
-const ford_message_descriptions::ParameterDescription*
- VehicleInfo__GetExternalTemperature__request__parameters[] = {
- (const ford_message_descriptions::
- ParameterDescription*)&VehicleInfo__GetExternalTemperature__request__parameter1,
- NULL};
-const ford_message_descriptions::MessageDescription
- VehicleInfo__GetExternalTemperature__request = {
- "VehicleInfo",
- "GetExternalTemperature",
- hmi_apis::messageType::request,
- hmi_apis::FunctionID::VehicleInfo_GetExternalTemperature,
- VehicleInfo__GetExternalTemperature__request__parameters};
-
-const ford_message_descriptions::ParameterDescription
- VehicleInfo__GetExternalTemperature__response__parameter1 = {
- "externalTemperature", ford_message_descriptions::Float, true};
-const ford_message_descriptions::ParameterDescription*
- VehicleInfo__GetExternalTemperature__response__parameters[] = {
- (const ford_message_descriptions::
- ParameterDescription*)&VehicleInfo__GetExternalTemperature__response__parameter1,
- NULL};
-const ford_message_descriptions::MessageDescription
- VehicleInfo__GetExternalTemperature__response = {
- "VehicleInfo",
- "GetExternalTemperature",
- hmi_apis::messageType::response,
- hmi_apis::FunctionID::VehicleInfo_GetExternalTemperature,
- VehicleInfo__GetExternalTemperature__response__parameters};
-
-const ford_message_descriptions::ParameterDescription
- VehicleInfo__GetVin__request__parameter1 = {
- "appID", ford_message_descriptions::Integer, true};
-const ford_message_descriptions::ParameterDescription*
- VehicleInfo__GetVin__request__parameters[] = {
- (const ford_message_descriptions::
- ParameterDescription*)&VehicleInfo__GetVin__request__parameter1,
- NULL};
-const ford_message_descriptions::MessageDescription
- VehicleInfo__GetVin__request = {"VehicleInfo",
- "GetVin",
- hmi_apis::messageType::request,
- hmi_apis::FunctionID::VehicleInfo_GetVin,
- VehicleInfo__GetVin__request__parameters};
-
-const ford_message_descriptions::ParameterDescription
- VehicleInfo__GetVin__response__parameter1 = {
- "vin", ford_message_descriptions::String, true};
-const ford_message_descriptions::ParameterDescription*
- VehicleInfo__GetVin__response__parameters[] = {
- (const ford_message_descriptions::
- ParameterDescription*)&VehicleInfo__GetVin__response__parameter1,
- NULL};
-const ford_message_descriptions::MessageDescription
- VehicleInfo__GetVin__response = {"VehicleInfo",
- "GetVin",
- hmi_apis::messageType::response,
- hmi_apis::FunctionID::VehicleInfo_GetVin,
- VehicleInfo__GetVin__response__parameters};
-
-const ford_message_descriptions::ParameterDescription
- VehicleInfo__GetPrndl__request__parameter1 = {
- "appID", ford_message_descriptions::Integer, true};
-const ford_message_descriptions::ParameterDescription*
- VehicleInfo__GetPrndl__request__parameters[] = {
- (const ford_message_descriptions::
- ParameterDescription*)&VehicleInfo__GetPrndl__request__parameter1,
- NULL};
-const ford_message_descriptions::MessageDescription
- VehicleInfo__GetPrndl__request = {
- "VehicleInfo",
- "GetPrndl",
- hmi_apis::messageType::request,
- hmi_apis::FunctionID::VehicleInfo_GetPrndl,
- VehicleInfo__GetPrndl__request__parameters};
-
-const ford_message_descriptions::ParameterDescription
- VehicleInfo__GetPrndl__response__parameter1 = {
- "prndl", ford_message_descriptions::Enum, true};
-const ford_message_descriptions::ParameterDescription*
- VehicleInfo__GetPrndl__response__parameters[] = {
- (const ford_message_descriptions::
- ParameterDescription*)&VehicleInfo__GetPrndl__response__parameter1,
- NULL};
-const ford_message_descriptions::MessageDescription
- VehicleInfo__GetPrndl__response = {
- "VehicleInfo",
- "GetPrndl",
- hmi_apis::messageType::response,
- hmi_apis::FunctionID::VehicleInfo_GetPrndl,
- VehicleInfo__GetPrndl__response__parameters};
-
-const ford_message_descriptions::ParameterDescription
- VehicleInfo__GetTirePressure__request__parameter1 = {
- "appID", ford_message_descriptions::Integer, true};
-const ford_message_descriptions::ParameterDescription*
- VehicleInfo__GetTirePressure__request__parameters[] = {
- (const ford_message_descriptions::
- ParameterDescription*)&VehicleInfo__GetTirePressure__request__parameter1,
- NULL};
-const ford_message_descriptions::MessageDescription
- VehicleInfo__GetTirePressure__request = {
- "VehicleInfo",
- "GetTirePressure",
- hmi_apis::messageType::request,
- hmi_apis::FunctionID::VehicleInfo_GetTirePressure,
- VehicleInfo__GetTirePressure__request__parameters};
-
-const ford_message_descriptions::StructDescription
- VehicleInfo__GetTirePressure__response__parameter1 = {
- {"tirePressure", ford_message_descriptions::Struct, true},
- Structs::Common__TireStatus__parameters};
-const ford_message_descriptions::ParameterDescription*
- VehicleInfo__GetTirePressure__response__parameters[] = {
- (const ford_message_descriptions::
- ParameterDescription*)&VehicleInfo__GetTirePressure__response__parameter1,
- NULL};
-const ford_message_descriptions::MessageDescription
- VehicleInfo__GetTirePressure__response = {
- "VehicleInfo",
- "GetTirePressure",
- hmi_apis::messageType::response,
- hmi_apis::FunctionID::VehicleInfo_GetTirePressure,
- VehicleInfo__GetTirePressure__response__parameters};
-
-const ford_message_descriptions::ParameterDescription
- VehicleInfo__GetOdometer__request__parameter1 = {
- "appID", ford_message_descriptions::Integer, true};
-const ford_message_descriptions::ParameterDescription*
- VehicleInfo__GetOdometer__request__parameters[] = {
- (const ford_message_descriptions::
- ParameterDescription*)&VehicleInfo__GetOdometer__request__parameter1,
- NULL};
-const ford_message_descriptions::MessageDescription
- VehicleInfo__GetOdometer__request = {
- "VehicleInfo",
- "GetOdometer",
- hmi_apis::messageType::request,
- hmi_apis::FunctionID::VehicleInfo_GetOdometer,
- VehicleInfo__GetOdometer__request__parameters};
-
-const ford_message_descriptions::ParameterDescription
- VehicleInfo__GetOdometer__response__parameter1 = {
- "odometer", ford_message_descriptions::Integer, true};
-const ford_message_descriptions::ParameterDescription*
- VehicleInfo__GetOdometer__response__parameters[] = {
- (const ford_message_descriptions::
- ParameterDescription*)&VehicleInfo__GetOdometer__response__parameter1,
- NULL};
-const ford_message_descriptions::MessageDescription
- VehicleInfo__GetOdometer__response = {
- "VehicleInfo",
- "GetOdometer",
- hmi_apis::messageType::response,
- hmi_apis::FunctionID::VehicleInfo_GetOdometer,
- VehicleInfo__GetOdometer__response__parameters};
-
-const ford_message_descriptions::ParameterDescription
- VehicleInfo__GetBeltStatus__request__parameter1 = {
- "appID", ford_message_descriptions::Integer, true};
-const ford_message_descriptions::ParameterDescription*
- VehicleInfo__GetBeltStatus__request__parameters[] = {
- (const ford_message_descriptions::
- ParameterDescription*)&VehicleInfo__GetBeltStatus__request__parameter1,
- NULL};
-const ford_message_descriptions::MessageDescription
- VehicleInfo__GetBeltStatus__request = {
- "VehicleInfo",
- "GetBeltStatus",
- hmi_apis::messageType::request,
- hmi_apis::FunctionID::VehicleInfo_GetBeltStatus,
- VehicleInfo__GetBeltStatus__request__parameters};
-
-const ford_message_descriptions::StructDescription
- VehicleInfo__GetBeltStatus__response__parameter1 = {
- {"beltStatus", ford_message_descriptions::Struct, true},
- Structs::Common__BeltStatus__parameters};
-const ford_message_descriptions::ParameterDescription*
- VehicleInfo__GetBeltStatus__response__parameters[] = {
- (const ford_message_descriptions::
- ParameterDescription*)&VehicleInfo__GetBeltStatus__response__parameter1,
- NULL};
-const ford_message_descriptions::MessageDescription
- VehicleInfo__GetBeltStatus__response = {
- "VehicleInfo",
- "GetBeltStatus",
- hmi_apis::messageType::response,
- hmi_apis::FunctionID::VehicleInfo_GetBeltStatus,
- VehicleInfo__GetBeltStatus__response__parameters};
-
-const ford_message_descriptions::ParameterDescription
- VehicleInfo__GetBodyInformation__request__parameter1 = {
- "appID", ford_message_descriptions::Integer, true};
-const ford_message_descriptions::ParameterDescription*
- VehicleInfo__GetBodyInformation__request__parameters[] = {
- (const ford_message_descriptions::
- ParameterDescription*)&VehicleInfo__GetBodyInformation__request__parameter1,
- NULL};
-const ford_message_descriptions::MessageDescription
- VehicleInfo__GetBodyInformation__request = {
- "VehicleInfo",
- "GetBodyInformation",
- hmi_apis::messageType::request,
- hmi_apis::FunctionID::VehicleInfo_GetBodyInformation,
- VehicleInfo__GetBodyInformation__request__parameters};
-
-const ford_message_descriptions::StructDescription
- VehicleInfo__GetBodyInformation__response__parameter1 = {
- {"bodyInformation", ford_message_descriptions::Struct, true},
- Structs::Common__BodyInformation__parameters};
-const ford_message_descriptions::ParameterDescription*
- VehicleInfo__GetBodyInformation__response__parameters[] = {
- (const ford_message_descriptions::
- ParameterDescription*)&VehicleInfo__GetBodyInformation__response__parameter1,
- NULL};
-const ford_message_descriptions::MessageDescription
- VehicleInfo__GetBodyInformation__response = {
- "VehicleInfo",
- "GetBodyInformation",
- hmi_apis::messageType::response,
- hmi_apis::FunctionID::VehicleInfo_GetBodyInformation,
- VehicleInfo__GetBodyInformation__response__parameters};
-
-const ford_message_descriptions::ParameterDescription
- VehicleInfo__GetDeviceStatus__request__parameter1 = {
- "appID", ford_message_descriptions::Integer, true};
-const ford_message_descriptions::ParameterDescription*
- VehicleInfo__GetDeviceStatus__request__parameters[] = {
- (const ford_message_descriptions::
- ParameterDescription*)&VehicleInfo__GetDeviceStatus__request__parameter1,
- NULL};
-const ford_message_descriptions::MessageDescription
- VehicleInfo__GetDeviceStatus__request = {
- "VehicleInfo",
- "GetDeviceStatus",
- hmi_apis::messageType::request,
- hmi_apis::FunctionID::VehicleInfo_GetDeviceStatus,
- VehicleInfo__GetDeviceStatus__request__parameters};
-
-const ford_message_descriptions::StructDescription
- VehicleInfo__GetDeviceStatus__response__parameter1 = {
- {"deviceStatus", ford_message_descriptions::Struct, true},
- Structs::Common__DeviceStatus__parameters};
-const ford_message_descriptions::ParameterDescription*
- VehicleInfo__GetDeviceStatus__response__parameters[] = {
- (const ford_message_descriptions::
- ParameterDescription*)&VehicleInfo__GetDeviceStatus__response__parameter1,
- NULL};
-const ford_message_descriptions::MessageDescription
- VehicleInfo__GetDeviceStatus__response = {
- "VehicleInfo",
- "GetDeviceStatus",
- hmi_apis::messageType::response,
- hmi_apis::FunctionID::VehicleInfo_GetDeviceStatus,
- VehicleInfo__GetDeviceStatus__response__parameters};
-
-const ford_message_descriptions::ParameterDescription
- VehicleInfo__GetDriverBraking__request__parameter1 = {
- "appID", ford_message_descriptions::Integer, true};
-const ford_message_descriptions::ParameterDescription*
- VehicleInfo__GetDriverBraking__request__parameters[] = {
- (const ford_message_descriptions::
- ParameterDescription*)&VehicleInfo__GetDriverBraking__request__parameter1,
- NULL};
-const ford_message_descriptions::MessageDescription
- VehicleInfo__GetDriverBraking__request = {
- "VehicleInfo",
- "GetDriverBraking",
- hmi_apis::messageType::request,
- hmi_apis::FunctionID::VehicleInfo_GetDriverBraking,
- VehicleInfo__GetDriverBraking__request__parameters};
-
-const ford_message_descriptions::ParameterDescription
- VehicleInfo__GetDriverBraking__response__parameter1 = {
- "driverBraking", ford_message_descriptions::Enum, true};
-const ford_message_descriptions::ParameterDescription*
- VehicleInfo__GetDriverBraking__response__parameters[] = {
- (const ford_message_descriptions::
- ParameterDescription*)&VehicleInfo__GetDriverBraking__response__parameter1,
- NULL};
-const ford_message_descriptions::MessageDescription
- VehicleInfo__GetDriverBraking__response = {
- "VehicleInfo",
- "GetDriverBraking",
- hmi_apis::messageType::response,
- hmi_apis::FunctionID::VehicleInfo_GetDriverBraking,
- VehicleInfo__GetDriverBraking__response__parameters};
-
-const ford_message_descriptions::ParameterDescription
- VehicleInfo__GetWiperStatus__request__parameter1 = {
- "appID", ford_message_descriptions::Integer, true};
-const ford_message_descriptions::ParameterDescription*
- VehicleInfo__GetWiperStatus__request__parameters[] = {
- (const ford_message_descriptions::
- ParameterDescription*)&VehicleInfo__GetWiperStatus__request__parameter1,
- NULL};
-const ford_message_descriptions::MessageDescription
- VehicleInfo__GetWiperStatus__request = {
- "VehicleInfo",
- "GetWiperStatus",
- hmi_apis::messageType::request,
- hmi_apis::FunctionID::VehicleInfo_GetWiperStatus,
- VehicleInfo__GetWiperStatus__request__parameters};
-
-const ford_message_descriptions::ParameterDescription
- VehicleInfo__GetWiperStatus__response__parameter1 = {
- "wiperStatus", ford_message_descriptions::Enum, true};
-const ford_message_descriptions::ParameterDescription*
- VehicleInfo__GetWiperStatus__response__parameters[] = {
- (const ford_message_descriptions::
- ParameterDescription*)&VehicleInfo__GetWiperStatus__response__parameter1,
- NULL};
-const ford_message_descriptions::MessageDescription
- VehicleInfo__GetWiperStatus__response = {
- "VehicleInfo",
- "GetWiperStatus",
- hmi_apis::messageType::response,
- hmi_apis::FunctionID::VehicleInfo_GetWiperStatus,
- VehicleInfo__GetWiperStatus__response__parameters};
-
-const ford_message_descriptions::ParameterDescription
- VehicleInfo__GetHeadLampStatus__request__parameter1 = {
- "appID", ford_message_descriptions::Integer, true};
-const ford_message_descriptions::ParameterDescription*
- VehicleInfo__GetHeadLampStatus__request__parameters[] = {
- (const ford_message_descriptions::
- ParameterDescription*)&VehicleInfo__GetHeadLampStatus__request__parameter1,
- NULL};
-const ford_message_descriptions::MessageDescription
- VehicleInfo__GetHeadLampStatus__request = {
- "VehicleInfo",
- "GetHeadLampStatus",
- hmi_apis::messageType::request,
- hmi_apis::FunctionID::VehicleInfo_GetHeadLampStatus,
- VehicleInfo__GetHeadLampStatus__request__parameters};
-
-const ford_message_descriptions::StructDescription
- VehicleInfo__GetHeadLampStatus__response__parameter1 = {
- {"headLampStatus", ford_message_descriptions::Struct, true},
- Structs::Common__HeadLampStatus__parameters};
-const ford_message_descriptions::ParameterDescription*
- VehicleInfo__GetHeadLampStatus__response__parameters[] = {
- (const ford_message_descriptions::
- ParameterDescription*)&VehicleInfo__GetHeadLampStatus__response__parameter1,
- NULL};
-const ford_message_descriptions::MessageDescription
- VehicleInfo__GetHeadLampStatus__response = {
- "VehicleInfo",
- "GetHeadLampStatus",
- hmi_apis::messageType::response,
- hmi_apis::FunctionID::VehicleInfo_GetHeadLampStatus,
- VehicleInfo__GetHeadLampStatus__response__parameters};
-
-const ford_message_descriptions::ParameterDescription
- VehicleInfo__GetEngineTorque__request__parameter1 = {
- "appID", ford_message_descriptions::Integer, true};
-const ford_message_descriptions::ParameterDescription*
- VehicleInfo__GetEngineTorque__request__parameters[] = {
- (const ford_message_descriptions::
- ParameterDescription*)&VehicleInfo__GetEngineTorque__request__parameter1,
- NULL};
-const ford_message_descriptions::MessageDescription
- VehicleInfo__GetEngineTorque__request = {
- "VehicleInfo",
- "GetEngineTorque",
- hmi_apis::messageType::request,
- hmi_apis::FunctionID::VehicleInfo_GetEngineTorque,
- VehicleInfo__GetEngineTorque__request__parameters};
-
-const ford_message_descriptions::ParameterDescription
- VehicleInfo__GetEngineTorque__response__parameter1 = {
- "engineTorque", ford_message_descriptions::Float, true};
-const ford_message_descriptions::ParameterDescription*
- VehicleInfo__GetEngineTorque__response__parameters[] = {
- (const ford_message_descriptions::
- ParameterDescription*)&VehicleInfo__GetEngineTorque__response__parameter1,
- NULL};
-const ford_message_descriptions::MessageDescription
- VehicleInfo__GetEngineTorque__response = {
- "VehicleInfo",
- "GetEngineTorque",
- hmi_apis::messageType::response,
- hmi_apis::FunctionID::VehicleInfo_GetEngineTorque,
- VehicleInfo__GetEngineTorque__response__parameters};
-
-const ford_message_descriptions::ParameterDescription
- VehicleInfo__GetAccPedalPosition__request__parameter1 = {
- "appID", ford_message_descriptions::Integer, true};
-const ford_message_descriptions::ParameterDescription*
- VehicleInfo__GetAccPedalPosition__request__parameters[] = {
- (const ford_message_descriptions::
- ParameterDescription*)&VehicleInfo__GetAccPedalPosition__request__parameter1,
- NULL};
-const ford_message_descriptions::MessageDescription
- VehicleInfo__GetAccPedalPosition__request = {
- "VehicleInfo",
- "GetAccPedalPosition",
- hmi_apis::messageType::request,
- hmi_apis::FunctionID::VehicleInfo_GetAccPedalPosition,
- VehicleInfo__GetAccPedalPosition__request__parameters};
-
-const ford_message_descriptions::ParameterDescription
- VehicleInfo__GetAccPedalPosition__response__parameter1 = {
- "accPedalPosition", ford_message_descriptions::Float, true};
-const ford_message_descriptions::ParameterDescription*
- VehicleInfo__GetAccPedalPosition__response__parameters[] = {
- (const ford_message_descriptions::
- ParameterDescription*)&VehicleInfo__GetAccPedalPosition__response__parameter1,
- NULL};
-const ford_message_descriptions::MessageDescription
- VehicleInfo__GetAccPedalPosition__response = {
- "VehicleInfo",
- "GetAccPedalPosition",
- hmi_apis::messageType::response,
- hmi_apis::FunctionID::VehicleInfo_GetAccPedalPosition,
- VehicleInfo__GetAccPedalPosition__response__parameters};
-
-const ford_message_descriptions::ParameterDescription
- VehicleInfo__GetSteeringWheelAngle__request__parameter1 = {
- "appID", ford_message_descriptions::Integer, true};
-const ford_message_descriptions::ParameterDescription*
- VehicleInfo__GetSteeringWheelAngle__request__parameters[] = {
- (const ford_message_descriptions::
- ParameterDescription*)&VehicleInfo__GetSteeringWheelAngle__request__parameter1,
- NULL};
-const ford_message_descriptions::MessageDescription
- VehicleInfo__GetSteeringWheelAngle__request = {
- "VehicleInfo",
- "GetSteeringWheelAngle",
- hmi_apis::messageType::request,
- hmi_apis::FunctionID::VehicleInfo_GetSteeringWheelAngle,
- VehicleInfo__GetSteeringWheelAngle__request__parameters};
-
-const ford_message_descriptions::ParameterDescription
- VehicleInfo__GetSteeringWheelAngle__response__parameter1 = {
- "steeringWheelAngle", ford_message_descriptions::Float, true};
-const ford_message_descriptions::ParameterDescription*
- VehicleInfo__GetSteeringWheelAngle__response__parameters[] = {
- (const ford_message_descriptions::
- ParameterDescription*)&VehicleInfo__GetSteeringWheelAngle__response__parameter1,
- NULL};
-const ford_message_descriptions::MessageDescription
- VehicleInfo__GetSteeringWheelAngle__response = {
- "VehicleInfo",
- "GetSteeringWheelAngle",
- hmi_apis::messageType::response,
- hmi_apis::FunctionID::VehicleInfo_GetSteeringWheelAngle,
- VehicleInfo__GetSteeringWheelAngle__response__parameters};
-
-const ford_message_descriptions::ParameterDescription
- VehicleInfo__GetECallInfo__request__parameter1 = {
- "appID", ford_message_descriptions::Integer, true};
-const ford_message_descriptions::ParameterDescription*
- VehicleInfo__GetECallInfo__request__parameters[] = {
- (const ford_message_descriptions::
- ParameterDescription*)&VehicleInfo__GetECallInfo__request__parameter1,
- NULL};
-const ford_message_descriptions::MessageDescription
- VehicleInfo__GetECallInfo__request = {
- "VehicleInfo",
- "GetECallInfo",
- hmi_apis::messageType::request,
- hmi_apis::FunctionID::VehicleInfo_GetECallInfo,
- VehicleInfo__GetECallInfo__request__parameters};
-
-const ford_message_descriptions::StructDescription
- VehicleInfo__GetECallInfo__response__parameter1 = {
- {"eCallInfo", ford_message_descriptions::Struct, true},
- Structs::Common__ECallInfo__parameters};
-const ford_message_descriptions::ParameterDescription*
- VehicleInfo__GetECallInfo__response__parameters[] = {
- (const ford_message_descriptions::
- ParameterDescription*)&VehicleInfo__GetECallInfo__response__parameter1,
- NULL};
-const ford_message_descriptions::MessageDescription
- VehicleInfo__GetECallInfo__response = {
- "VehicleInfo",
- "GetECallInfo",
- hmi_apis::messageType::response,
- hmi_apis::FunctionID::VehicleInfo_GetECallInfo,
- VehicleInfo__GetECallInfo__response__parameters};
-
-const ford_message_descriptions::ParameterDescription
- VehicleInfo__GetAirbagStatus__request__parameter1 = {
- "appID", ford_message_descriptions::Integer, true};
-const ford_message_descriptions::ParameterDescription*
- VehicleInfo__GetAirbagStatus__request__parameters[] = {
- (const ford_message_descriptions::
- ParameterDescription*)&VehicleInfo__GetAirbagStatus__request__parameter1,
- NULL};
-const ford_message_descriptions::MessageDescription
- VehicleInfo__GetAirbagStatus__request = {
- "VehicleInfo",
- "GetAirbagStatus",
- hmi_apis::messageType::request,
- hmi_apis::FunctionID::VehicleInfo_GetAirbagStatus,
- VehicleInfo__GetAirbagStatus__request__parameters};
-
-const ford_message_descriptions::StructDescription
- VehicleInfo__GetAirbagStatus__response__parameter1 = {
- {"airbagStatus", ford_message_descriptions::Struct, true},
- Structs::Common__AirbagStatus__parameters};
-const ford_message_descriptions::ParameterDescription*
- VehicleInfo__GetAirbagStatus__response__parameters[] = {
- (const ford_message_descriptions::
- ParameterDescription*)&VehicleInfo__GetAirbagStatus__response__parameter1,
- NULL};
-const ford_message_descriptions::MessageDescription
- VehicleInfo__GetAirbagStatus__response = {
- "VehicleInfo",
- "GetAirbagStatus",
- hmi_apis::messageType::response,
- hmi_apis::FunctionID::VehicleInfo_GetAirbagStatus,
- VehicleInfo__GetAirbagStatus__response__parameters};
-
-const ford_message_descriptions::ParameterDescription
- VehicleInfo__GetEmergencyEvent__request__parameter1 = {
- "appID", ford_message_descriptions::Integer, true};
-const ford_message_descriptions::ParameterDescription*
- VehicleInfo__GetEmergencyEvent__request__parameters[] = {
- (const ford_message_descriptions::
- ParameterDescription*)&VehicleInfo__GetEmergencyEvent__request__parameter1,
- NULL};
-const ford_message_descriptions::MessageDescription
- VehicleInfo__GetEmergencyEvent__request = {
- "VehicleInfo",
- "GetEmergencyEvent",
- hmi_apis::messageType::request,
- hmi_apis::FunctionID::VehicleInfo_GetEmergencyEvent,
- VehicleInfo__GetEmergencyEvent__request__parameters};
-
-const ford_message_descriptions::StructDescription
- VehicleInfo__GetEmergencyEvent__response__parameter1 = {
- {"emergencyEvent", ford_message_descriptions::Struct, true},
- Structs::Common__EmergencyEvent__parameters};
-const ford_message_descriptions::ParameterDescription*
- VehicleInfo__GetEmergencyEvent__response__parameters[] = {
- (const ford_message_descriptions::
- ParameterDescription*)&VehicleInfo__GetEmergencyEvent__response__parameter1,
- NULL};
-const ford_message_descriptions::MessageDescription
- VehicleInfo__GetEmergencyEvent__response = {
- "VehicleInfo",
- "GetEmergencyEvent",
- hmi_apis::messageType::response,
- hmi_apis::FunctionID::VehicleInfo_GetEmergencyEvent,
- VehicleInfo__GetEmergencyEvent__response__parameters};
-
-const ford_message_descriptions::ParameterDescription
- VehicleInfo__GetClusterModeStatus__request__parameter1 = {
- "appID", ford_message_descriptions::Integer, true};
-const ford_message_descriptions::ParameterDescription*
- VehicleInfo__GetClusterModeStatus__request__parameters[] = {
- (const ford_message_descriptions::
- ParameterDescription*)&VehicleInfo__GetClusterModeStatus__request__parameter1,
- NULL};
-const ford_message_descriptions::MessageDescription
- VehicleInfo__GetClusterModeStatus__request = {
- "VehicleInfo",
- "GetClusterModeStatus",
- hmi_apis::messageType::request,
- hmi_apis::FunctionID::VehicleInfo_GetClusterModeStatus,
- VehicleInfo__GetClusterModeStatus__request__parameters};
-
-const ford_message_descriptions::StructDescription
- VehicleInfo__GetClusterModeStatus__response__parameter1 = {
- {"clusterModeStatus", ford_message_descriptions::Struct, true},
- Structs::Common__ClusterModeStatus__parameters};
-const ford_message_descriptions::ParameterDescription*
- VehicleInfo__GetClusterModeStatus__response__parameters[] = {
- (const ford_message_descriptions::
- ParameterDescription*)&VehicleInfo__GetClusterModeStatus__response__parameter1,
- NULL};
-const ford_message_descriptions::MessageDescription
- VehicleInfo__GetClusterModeStatus__response = {
- "VehicleInfo",
- "GetClusterModeStatus",
- hmi_apis::messageType::response,
- hmi_apis::FunctionID::VehicleInfo_GetClusterModeStatus,
- VehicleInfo__GetClusterModeStatus__response__parameters};
-
-const ford_message_descriptions::ParameterDescription
- VehicleInfo__GetMyKey__request__parameter1 = {
- "appID", ford_message_descriptions::Integer, true};
-const ford_message_descriptions::ParameterDescription*
- VehicleInfo__GetMyKey__request__parameters[] = {
- (const ford_message_descriptions::
- ParameterDescription*)&VehicleInfo__GetMyKey__request__parameter1,
- NULL};
-const ford_message_descriptions::MessageDescription
- VehicleInfo__GetMyKey__request = {
- "VehicleInfo",
- "GetMyKey",
- hmi_apis::messageType::request,
- hmi_apis::FunctionID::VehicleInfo_GetMyKey,
- VehicleInfo__GetMyKey__request__parameters};
-
-const ford_message_descriptions::StructDescription
- VehicleInfo__GetMyKey__response__parameter1 = {
- {"myKey", ford_message_descriptions::Struct, true},
- Structs::Common__MyKey__parameters};
-const ford_message_descriptions::ParameterDescription*
- VehicleInfo__GetMyKey__response__parameters[] = {
- (const ford_message_descriptions::
- ParameterDescription*)&VehicleInfo__GetMyKey__response__parameter1,
- NULL};
-const ford_message_descriptions::MessageDescription
- VehicleInfo__GetMyKey__response = {
- "VehicleInfo",
- "GetMyKey",
- hmi_apis::messageType::response,
- hmi_apis::FunctionID::VehicleInfo_GetMyKey,
- VehicleInfo__GetMyKey__response__parameters};
-
-const ford_message_descriptions::StructDescription
- VehicleInfo__OnGpsData__notification__parameter1 = {
- {"gps", ford_message_descriptions::Struct, true},
- Structs::Common__GPSData__parameters};
-const ford_message_descriptions::ParameterDescription*
- VehicleInfo__OnGpsData__notification__parameters[] = {
- (const ford_message_descriptions::
- ParameterDescription*)&VehicleInfo__OnGpsData__notification__parameter1,
- NULL};
-const ford_message_descriptions::MessageDescription
- VehicleInfo__OnGpsData__notification = {
- "VehicleInfo",
- "OnGpsData",
- hmi_apis::messageType::notification,
- hmi_apis::FunctionID::VehicleInfo_OnGpsData,
- VehicleInfo__OnGpsData__notification__parameters};
-
-const ford_message_descriptions::ParameterDescription
- VehicleInfo__OnSpeed__notification__parameter1 = {
- "speed", ford_message_descriptions::Float, true};
-const ford_message_descriptions::ParameterDescription*
- VehicleInfo__OnSpeed__notification__parameters[] = {
- (const ford_message_descriptions::
- ParameterDescription*)&VehicleInfo__OnSpeed__notification__parameter1,
- NULL};
-const ford_message_descriptions::MessageDescription
- VehicleInfo__OnSpeed__notification = {
- "VehicleInfo",
- "OnSpeed",
- hmi_apis::messageType::notification,
- hmi_apis::FunctionID::VehicleInfo_OnSpeed,
- VehicleInfo__OnSpeed__notification__parameters};
-
-const ford_message_descriptions::ParameterDescription
- VehicleInfo__OnRpm__notification__parameter1 = {
- "rpm", ford_message_descriptions::Integer, true};
-const ford_message_descriptions::ParameterDescription*
- VehicleInfo__OnRpm__notification__parameters[] = {
- (const ford_message_descriptions::
- ParameterDescription*)&VehicleInfo__OnRpm__notification__parameter1,
- NULL};
-const ford_message_descriptions::MessageDescription
- VehicleInfo__OnRpm__notification = {
- "VehicleInfo",
- "OnRpm",
- hmi_apis::messageType::notification,
- hmi_apis::FunctionID::VehicleInfo_OnRpm,
- VehicleInfo__OnRpm__notification__parameters};
-
-const ford_message_descriptions::ParameterDescription
- VehicleInfo__OnFuelLevel__notification__parameter1 = {
- "fuelLevel", ford_message_descriptions::Float, true};
-const ford_message_descriptions::ParameterDescription*
- VehicleInfo__OnFuelLevel__notification__parameters[] = {
- (const ford_message_descriptions::
- ParameterDescription*)&VehicleInfo__OnFuelLevel__notification__parameter1,
- NULL};
-const ford_message_descriptions::MessageDescription
- VehicleInfo__OnFuelLevel__notification = {
- "VehicleInfo",
- "OnFuelLevel",
- hmi_apis::messageType::notification,
- hmi_apis::FunctionID::VehicleInfo_OnFuelLevel,
- VehicleInfo__OnFuelLevel__notification__parameters};
-
-const ford_message_descriptions::ParameterDescription
- VehicleInfo__OnFuelLevelState__notification__parameter1 = {
- "fuelLevel_State", ford_message_descriptions::Enum, true};
-const ford_message_descriptions::ParameterDescription*
- VehicleInfo__OnFuelLevelState__notification__parameters[] = {
- (const ford_message_descriptions::
- ParameterDescription*)&VehicleInfo__OnFuelLevelState__notification__parameter1,
- NULL};
-const ford_message_descriptions::MessageDescription
- VehicleInfo__OnFuelLevelState__notification = {
- "VehicleInfo",
- "OnFuelLevelState",
- hmi_apis::messageType::notification,
- hmi_apis::FunctionID::VehicleInfo_OnFuelLevelState,
- VehicleInfo__OnFuelLevelState__notification__parameters};
-
-const ford_message_descriptions::ParameterDescription
- VehicleInfo__OnInstantFuelConsumption__notification__parameter1 = {
- "instantFuelConsumption", ford_message_descriptions::Float, true};
-const ford_message_descriptions::ParameterDescription*
- VehicleInfo__OnInstantFuelConsumption__notification__parameters[] = {
- (const ford_message_descriptions::
- ParameterDescription*)&VehicleInfo__OnInstantFuelConsumption__notification__parameter1,
- NULL};
-const ford_message_descriptions::MessageDescription
- VehicleInfo__OnInstantFuelConsumption__notification = {
- "VehicleInfo",
- "OnInstantFuelConsumption",
- hmi_apis::messageType::notification,
- hmi_apis::FunctionID::VehicleInfo_OnInstantFuelConsumption,
- VehicleInfo__OnInstantFuelConsumption__notification__parameters};
-
-const ford_message_descriptions::ParameterDescription
- VehicleInfo__OnExternalTemperature__notification__parameter1 = {
- "externalTemperature", ford_message_descriptions::Float, true};
-const ford_message_descriptions::ParameterDescription*
- VehicleInfo__OnExternalTemperature__notification__parameters[] = {
- (const ford_message_descriptions::
- ParameterDescription*)&VehicleInfo__OnExternalTemperature__notification__parameter1,
- NULL};
-const ford_message_descriptions::MessageDescription
- VehicleInfo__OnExternalTemperature__notification = {
- "VehicleInfo",
- "OnExternalTemperature",
- hmi_apis::messageType::notification,
- hmi_apis::FunctionID::VehicleInfo_OnExternalTemperature,
- VehicleInfo__OnExternalTemperature__notification__parameters};
-
-const ford_message_descriptions::ParameterDescription
- VehicleInfo__OnVin__notification__parameter1 = {
- "vin", ford_message_descriptions::String, true};
-const ford_message_descriptions::ParameterDescription*
- VehicleInfo__OnVin__notification__parameters[] = {
- (const ford_message_descriptions::
- ParameterDescription*)&VehicleInfo__OnVin__notification__parameter1,
- NULL};
-const ford_message_descriptions::MessageDescription
- VehicleInfo__OnVin__notification = {
- "VehicleInfo",
- "OnVin",
- hmi_apis::messageType::notification,
- hmi_apis::FunctionID::VehicleInfo_OnVin,
- VehicleInfo__OnVin__notification__parameters};
-
-const ford_message_descriptions::ParameterDescription
- VehicleInfo__OnPrndl__notification__parameter1 = {
- "prndl", ford_message_descriptions::Enum, true};
-const ford_message_descriptions::ParameterDescription*
- VehicleInfo__OnPrndl__notification__parameters[] = {
- (const ford_message_descriptions::
- ParameterDescription*)&VehicleInfo__OnPrndl__notification__parameter1,
- NULL};
-const ford_message_descriptions::MessageDescription
- VehicleInfo__OnPrndl__notification = {
- "VehicleInfo",
- "OnPrndl",
- hmi_apis::messageType::notification,
- hmi_apis::FunctionID::VehicleInfo_OnPrndl,
- VehicleInfo__OnPrndl__notification__parameters};
-
-const ford_message_descriptions::StructDescription
- VehicleInfo__OnTirePressure__notification__parameter1 = {
- {"tirePressure", ford_message_descriptions::Struct, true},
- Structs::Common__TireStatus__parameters};
-const ford_message_descriptions::ParameterDescription*
- VehicleInfo__OnTirePressure__notification__parameters[] = {
- (const ford_message_descriptions::
- ParameterDescription*)&VehicleInfo__OnTirePressure__notification__parameter1,
- NULL};
-const ford_message_descriptions::MessageDescription
- VehicleInfo__OnTirePressure__notification = {
- "VehicleInfo",
- "OnTirePressure",
- hmi_apis::messageType::notification,
- hmi_apis::FunctionID::VehicleInfo_OnTirePressure,
- VehicleInfo__OnTirePressure__notification__parameters};
-
-const ford_message_descriptions::ParameterDescription
- VehicleInfo__OnOdometer__notification__parameter1 = {
- "odometer", ford_message_descriptions::Integer, true};
-const ford_message_descriptions::ParameterDescription*
- VehicleInfo__OnOdometer__notification__parameters[] = {
- (const ford_message_descriptions::
- ParameterDescription*)&VehicleInfo__OnOdometer__notification__parameter1,
- NULL};
-const ford_message_descriptions::MessageDescription
- VehicleInfo__OnOdometer__notification = {
- "VehicleInfo",
- "OnOdometer",
- hmi_apis::messageType::notification,
- hmi_apis::FunctionID::VehicleInfo_OnOdometer,
- VehicleInfo__OnOdometer__notification__parameters};
-
-const ford_message_descriptions::StructDescription
- VehicleInfo__OnBeltStatus__notification__parameter1 = {
- {"beltStatus", ford_message_descriptions::Struct, true},
- Structs::Common__BeltStatus__parameters};
-const ford_message_descriptions::ParameterDescription*
- VehicleInfo__OnBeltStatus__notification__parameters[] = {
- (const ford_message_descriptions::
- ParameterDescription*)&VehicleInfo__OnBeltStatus__notification__parameter1,
- NULL};
-const ford_message_descriptions::MessageDescription
- VehicleInfo__OnBeltStatus__notification = {
- "VehicleInfo",
- "OnBeltStatus",
- hmi_apis::messageType::notification,
- hmi_apis::FunctionID::VehicleInfo_OnBeltStatus,
- VehicleInfo__OnBeltStatus__notification__parameters};
-
-const ford_message_descriptions::StructDescription
- VehicleInfo__OnBodyInformation__notification__parameter1 = {
- {"bodyInformation", ford_message_descriptions::Struct, true},
- Structs::Common__BodyInformation__parameters};
-const ford_message_descriptions::ParameterDescription*
- VehicleInfo__OnBodyInformation__notification__parameters[] = {
- (const ford_message_descriptions::
- ParameterDescription*)&VehicleInfo__OnBodyInformation__notification__parameter1,
- NULL};
-const ford_message_descriptions::MessageDescription
- VehicleInfo__OnBodyInformation__notification = {
- "VehicleInfo",
- "OnBodyInformation",
- hmi_apis::messageType::notification,
- hmi_apis::FunctionID::VehicleInfo_OnBodyInformation,
- VehicleInfo__OnBodyInformation__notification__parameters};
-
-const ford_message_descriptions::StructDescription
- VehicleInfo__OnDeviceStatus__notification__parameter1 = {
- {"deviceStatus", ford_message_descriptions::Struct, true},
- Structs::Common__DeviceStatus__parameters};
-const ford_message_descriptions::ParameterDescription*
- VehicleInfo__OnDeviceStatus__notification__parameters[] = {
- (const ford_message_descriptions::
- ParameterDescription*)&VehicleInfo__OnDeviceStatus__notification__parameter1,
- NULL};
-const ford_message_descriptions::MessageDescription
- VehicleInfo__OnDeviceStatus__notification = {
- "VehicleInfo",
- "OnDeviceStatus",
- hmi_apis::messageType::notification,
- hmi_apis::FunctionID::VehicleInfo_OnDeviceStatus,
- VehicleInfo__OnDeviceStatus__notification__parameters};
-
-const ford_message_descriptions::ParameterDescription
- VehicleInfo__OnDriverBraking__notification__parameter1 = {
- "driverBraking", ford_message_descriptions::Enum, true};
-const ford_message_descriptions::ParameterDescription*
- VehicleInfo__OnDriverBraking__notification__parameters[] = {
- (const ford_message_descriptions::
- ParameterDescription*)&VehicleInfo__OnDriverBraking__notification__parameter1,
- NULL};
-const ford_message_descriptions::MessageDescription
- VehicleInfo__OnDriverBraking__notification = {
- "VehicleInfo",
- "OnDriverBraking",
- hmi_apis::messageType::notification,
- hmi_apis::FunctionID::VehicleInfo_OnDriverBraking,
- VehicleInfo__OnDriverBraking__notification__parameters};
-
-const ford_message_descriptions::ParameterDescription
- VehicleInfo__OnWiperStatus__notification__parameter1 = {
- "wiperStatus", ford_message_descriptions::Enum, true};
-const ford_message_descriptions::ParameterDescription*
- VehicleInfo__OnWiperStatus__notification__parameters[] = {
- (const ford_message_descriptions::
- ParameterDescription*)&VehicleInfo__OnWiperStatus__notification__parameter1,
- NULL};
-const ford_message_descriptions::MessageDescription
- VehicleInfo__OnWiperStatus__notification = {
- "VehicleInfo",
- "OnWiperStatus",
- hmi_apis::messageType::notification,
- hmi_apis::FunctionID::VehicleInfo_OnWiperStatus,
- VehicleInfo__OnWiperStatus__notification__parameters};
-
-const ford_message_descriptions::StructDescription
- VehicleInfo__OnHeadLampStatus__notification__parameter1 = {
- {"headLampStatus", ford_message_descriptions::Struct, true},
- Structs::Common__HeadLampStatus__parameters};
-const ford_message_descriptions::ParameterDescription*
- VehicleInfo__OnHeadLampStatus__notification__parameters[] = {
- (const ford_message_descriptions::
- ParameterDescription*)&VehicleInfo__OnHeadLampStatus__notification__parameter1,
- NULL};
-const ford_message_descriptions::MessageDescription
- VehicleInfo__OnHeadLampStatus__notification = {
- "VehicleInfo",
- "OnHeadLampStatus",
- hmi_apis::messageType::notification,
- hmi_apis::FunctionID::VehicleInfo_OnHeadLampStatus,
- VehicleInfo__OnHeadLampStatus__notification__parameters};
-
-const ford_message_descriptions::ParameterDescription
- VehicleInfo__OnEngineTorque__notification__parameter1 = {
- "engineTorque", ford_message_descriptions::Float, true};
-const ford_message_descriptions::ParameterDescription*
- VehicleInfo__OnEngineTorque__notification__parameters[] = {
- (const ford_message_descriptions::
- ParameterDescription*)&VehicleInfo__OnEngineTorque__notification__parameter1,
- NULL};
-const ford_message_descriptions::MessageDescription
- VehicleInfo__OnEngineTorque__notification = {
- "VehicleInfo",
- "OnEngineTorque",
- hmi_apis::messageType::notification,
- hmi_apis::FunctionID::VehicleInfo_OnEngineTorque,
- VehicleInfo__OnEngineTorque__notification__parameters};
-
-const ford_message_descriptions::ParameterDescription
- VehicleInfo__OnAccPedalPosition__notification__parameter1 = {
- "accPedalPosition", ford_message_descriptions::Float, true};
-const ford_message_descriptions::ParameterDescription*
- VehicleInfo__OnAccPedalPosition__notification__parameters[] = {
- (const ford_message_descriptions::
- ParameterDescription*)&VehicleInfo__OnAccPedalPosition__notification__parameter1,
- NULL};
-const ford_message_descriptions::MessageDescription
- VehicleInfo__OnAccPedalPosition__notification = {
- "VehicleInfo",
- "OnAccPedalPosition",
- hmi_apis::messageType::notification,
- hmi_apis::FunctionID::VehicleInfo_OnAccPedalPosition,
- VehicleInfo__OnAccPedalPosition__notification__parameters};
-
-const ford_message_descriptions::ParameterDescription
- VehicleInfo__OnSteeringWheelAngle__notification__parameter1 = {
- "steeringWheelAngle", ford_message_descriptions::Float, true};
-const ford_message_descriptions::ParameterDescription*
- VehicleInfo__OnSteeringWheelAngle__notification__parameters[] = {
- (const ford_message_descriptions::
- ParameterDescription*)&VehicleInfo__OnSteeringWheelAngle__notification__parameter1,
- NULL};
-const ford_message_descriptions::MessageDescription
- VehicleInfo__OnSteeringWheelAngle__notification = {
- "VehicleInfo",
- "OnSteeringWheelAngle",
- hmi_apis::messageType::notification,
- hmi_apis::FunctionID::VehicleInfo_OnSteeringWheelAngle,
- VehicleInfo__OnSteeringWheelAngle__notification__parameters};
-
-const ford_message_descriptions::StructDescription
- VehicleInfo__OnECallInfo__notification__parameter1 = {
- {"eCallInfo", ford_message_descriptions::Struct, true},
- Structs::Common__ECallInfo__parameters};
-const ford_message_descriptions::ParameterDescription*
- VehicleInfo__OnECallInfo__notification__parameters[] = {
- (const ford_message_descriptions::
- ParameterDescription*)&VehicleInfo__OnECallInfo__notification__parameter1,
- NULL};
-const ford_message_descriptions::MessageDescription
- VehicleInfo__OnECallInfo__notification = {
- "VehicleInfo",
- "OnECallInfo",
- hmi_apis::messageType::notification,
- hmi_apis::FunctionID::VehicleInfo_OnECallInfo,
- VehicleInfo__OnECallInfo__notification__parameters};
-
-const ford_message_descriptions::StructDescription
- VehicleInfo__OnAirbagStatus__notification__parameter1 = {
- {"airbagStatus", ford_message_descriptions::Struct, true},
- Structs::Common__AirbagStatus__parameters};
-const ford_message_descriptions::ParameterDescription*
- VehicleInfo__OnAirbagStatus__notification__parameters[] = {
- (const ford_message_descriptions::
- ParameterDescription*)&VehicleInfo__OnAirbagStatus__notification__parameter1,
- NULL};
-const ford_message_descriptions::MessageDescription
- VehicleInfo__OnAirbagStatus__notification = {
- "VehicleInfo",
- "OnAirbagStatus",
- hmi_apis::messageType::notification,
- hmi_apis::FunctionID::VehicleInfo_OnAirbagStatus,
- VehicleInfo__OnAirbagStatus__notification__parameters};
-
-const ford_message_descriptions::StructDescription
- VehicleInfo__OnEmergencyEvent__notification__parameter1 = {
- {"emergencyEvent", ford_message_descriptions::Struct, true},
- Structs::Common__EmergencyEvent__parameters};
-const ford_message_descriptions::ParameterDescription*
- VehicleInfo__OnEmergencyEvent__notification__parameters[] = {
- (const ford_message_descriptions::
- ParameterDescription*)&VehicleInfo__OnEmergencyEvent__notification__parameter1,
- NULL};
-const ford_message_descriptions::MessageDescription
- VehicleInfo__OnEmergencyEvent__notification = {
- "VehicleInfo",
- "OnEmergencyEvent",
- hmi_apis::messageType::notification,
- hmi_apis::FunctionID::VehicleInfo_OnEmergencyEvent,
- VehicleInfo__OnEmergencyEvent__notification__parameters};
-
-const ford_message_descriptions::StructDescription
- VehicleInfo__OnClusterModeStatus__notification__parameter1 = {
- {"clusterModeStatus", ford_message_descriptions::Struct, true},
- Structs::Common__ClusterModeStatus__parameters};
-const ford_message_descriptions::ParameterDescription*
- VehicleInfo__OnClusterModeStatus__notification__parameters[] = {
- (const ford_message_descriptions::
- ParameterDescription*)&VehicleInfo__OnClusterModeStatus__notification__parameter1,
- NULL};
-const ford_message_descriptions::MessageDescription
- VehicleInfo__OnClusterModeStatus__notification = {
- "VehicleInfo",
- "OnClusterModeStatus",
- hmi_apis::messageType::notification,
- hmi_apis::FunctionID::VehicleInfo_OnClusterModeStatus,
- VehicleInfo__OnClusterModeStatus__notification__parameters};
-
-const ford_message_descriptions::StructDescription
- VehicleInfo__OnMyKey__notification__parameter1 = {
- {"myKey", ford_message_descriptions::Struct, true},
- Structs::Common__MyKey__parameters};
-const ford_message_descriptions::ParameterDescription*
- VehicleInfo__OnMyKey__notification__parameters[] = {
- (const ford_message_descriptions::
- ParameterDescription*)&VehicleInfo__OnMyKey__notification__parameter1,
- NULL};
-const ford_message_descriptions::MessageDescription
- VehicleInfo__OnMyKey__notification = {
- "VehicleInfo",
- "OnMyKey",
- hmi_apis::messageType::notification,
- hmi_apis::FunctionID::VehicleInfo_OnMyKey,
- VehicleInfo__OnMyKey__notification__parameters};
-
-const ford_message_descriptions::ParameterDescription*
- VehicleInfo__SubscribeGps__request__parameters[] = {NULL};
-const ford_message_descriptions::MessageDescription
- VehicleInfo__SubscribeGps__request = {
- "VehicleInfo",
- "SubscribeGps",
- hmi_apis::messageType::request,
- hmi_apis::FunctionID::VehicleInfo_SubscribeGps,
- VehicleInfo__SubscribeGps__request__parameters};
-
-const ford_message_descriptions::StructDescription
- VehicleInfo__SubscribeGps__response__parameter1 = {
- {"gps", ford_message_descriptions::Struct, true},
- Structs::Common__VehicleDataResult__parameters};
-const ford_message_descriptions::ParameterDescription*
- VehicleInfo__SubscribeGps__response__parameters[] = {
- (const ford_message_descriptions::
- ParameterDescription*)&VehicleInfo__SubscribeGps__response__parameter1,
- NULL};
-const ford_message_descriptions::MessageDescription
- VehicleInfo__SubscribeGps__response = {
- "VehicleInfo",
- "SubscribeGps",
- hmi_apis::messageType::response,
- hmi_apis::FunctionID::VehicleInfo_SubscribeGps,
- VehicleInfo__SubscribeGps__response__parameters};
-
-const ford_message_descriptions::ParameterDescription*
- VehicleInfo__UnsubscribeGps__request__parameters[] = {NULL};
-const ford_message_descriptions::MessageDescription
- VehicleInfo__UnsubscribeGps__request = {
- "VehicleInfo",
- "UnsubscribeGps",
- hmi_apis::messageType::request,
- hmi_apis::FunctionID::VehicleInfo_UnsubscribeGps,
- VehicleInfo__UnsubscribeGps__request__parameters};
-
-const ford_message_descriptions::StructDescription
- VehicleInfo__UnsubscribeGps__response__parameter1 = {
- {"gps", ford_message_descriptions::Struct, true},
- Structs::Common__VehicleDataResult__parameters};
-const ford_message_descriptions::ParameterDescription*
- VehicleInfo__UnsubscribeGps__response__parameters[] = {
- (const ford_message_descriptions::
- ParameterDescription*)&VehicleInfo__UnsubscribeGps__response__parameter1,
- NULL};
-const ford_message_descriptions::MessageDescription
- VehicleInfo__UnsubscribeGps__response = {
- "VehicleInfo",
- "UnsubscribeGps",
- hmi_apis::messageType::response,
- hmi_apis::FunctionID::VehicleInfo_UnsubscribeGps,
- VehicleInfo__UnsubscribeGps__response__parameters};
-
-const ford_message_descriptions::ParameterDescription*
- VehicleInfo__SubscribeSpeed__request__parameters[] = {NULL};
-const ford_message_descriptions::MessageDescription
- VehicleInfo__SubscribeSpeed__request = {
- "VehicleInfo",
- "SubscribeSpeed",
- hmi_apis::messageType::request,
- hmi_apis::FunctionID::VehicleInfo_SubscribeSpeed,
- VehicleInfo__SubscribeSpeed__request__parameters};
-
-const ford_message_descriptions::StructDescription
- VehicleInfo__SubscribeSpeed__response__parameter1 = {
- {"speed", ford_message_descriptions::Struct, true},
- Structs::Common__VehicleDataResult__parameters};
-const ford_message_descriptions::ParameterDescription*
- VehicleInfo__SubscribeSpeed__response__parameters[] = {
- (const ford_message_descriptions::
- ParameterDescription*)&VehicleInfo__SubscribeSpeed__response__parameter1,
- NULL};
-const ford_message_descriptions::MessageDescription
- VehicleInfo__SubscribeSpeed__response = {
- "VehicleInfo",
- "SubscribeSpeed",
- hmi_apis::messageType::response,
- hmi_apis::FunctionID::VehicleInfo_SubscribeSpeed,
- VehicleInfo__SubscribeSpeed__response__parameters};
-
-const ford_message_descriptions::ParameterDescription*
- VehicleInfo__UnsubscribeSpeed__request__parameters[] = {NULL};
-const ford_message_descriptions::MessageDescription
- VehicleInfo__UnsubscribeSpeed__request = {
- "VehicleInfo",
- "UnsubscribeSpeed",
- hmi_apis::messageType::request,
- hmi_apis::FunctionID::VehicleInfo_UnsubscribeSpeed,
- VehicleInfo__UnsubscribeSpeed__request__parameters};
-
-const ford_message_descriptions::StructDescription
- VehicleInfo__UnsubscribeSpeed__response__parameter1 = {
- {"speed", ford_message_descriptions::Struct, true},
- Structs::Common__VehicleDataResult__parameters};
-const ford_message_descriptions::ParameterDescription*
- VehicleInfo__UnsubscribeSpeed__response__parameters[] = {
- (const ford_message_descriptions::
- ParameterDescription*)&VehicleInfo__UnsubscribeSpeed__response__parameter1,
- NULL};
-const ford_message_descriptions::MessageDescription
- VehicleInfo__UnsubscribeSpeed__response = {
- "VehicleInfo",
- "UnsubscribeSpeed",
- hmi_apis::messageType::response,
- hmi_apis::FunctionID::VehicleInfo_UnsubscribeSpeed,
- VehicleInfo__UnsubscribeSpeed__response__parameters};
-
-const ford_message_descriptions::ParameterDescription*
- VehicleInfo__SubscribeRpm__request__parameters[] = {NULL};
-const ford_message_descriptions::MessageDescription
- VehicleInfo__SubscribeRpm__request = {
- "VehicleInfo",
- "SubscribeRpm",
- hmi_apis::messageType::request,
- hmi_apis::FunctionID::VehicleInfo_SubscribeRpm,
- VehicleInfo__SubscribeRpm__request__parameters};
-
-const ford_message_descriptions::StructDescription
- VehicleInfo__SubscribeRpm__response__parameter1 = {
- {"rpm", ford_message_descriptions::Struct, true},
- Structs::Common__VehicleDataResult__parameters};
-const ford_message_descriptions::ParameterDescription*
- VehicleInfo__SubscribeRpm__response__parameters[] = {
- (const ford_message_descriptions::
- ParameterDescription*)&VehicleInfo__SubscribeRpm__response__parameter1,
- NULL};
-const ford_message_descriptions::MessageDescription
- VehicleInfo__SubscribeRpm__response = {
- "VehicleInfo",
- "SubscribeRpm",
- hmi_apis::messageType::response,
- hmi_apis::FunctionID::VehicleInfo_SubscribeRpm,
- VehicleInfo__SubscribeRpm__response__parameters};
-
-const ford_message_descriptions::ParameterDescription*
- VehicleInfo__UnsubscribeRpm__request__parameters[] = {NULL};
-const ford_message_descriptions::MessageDescription
- VehicleInfo__UnsubscribeRpm__request = {
- "VehicleInfo",
- "UnsubscribeRpm",
- hmi_apis::messageType::request,
- hmi_apis::FunctionID::VehicleInfo_UnsubscribeRpm,
- VehicleInfo__UnsubscribeRpm__request__parameters};
-
-const ford_message_descriptions::StructDescription
- VehicleInfo__UnsubscribeRpm__response__parameter1 = {
- {"rpm", ford_message_descriptions::Struct, true},
- Structs::Common__VehicleDataResult__parameters};
-const ford_message_descriptions::ParameterDescription*
- VehicleInfo__UnsubscribeRpm__response__parameters[] = {
- (const ford_message_descriptions::
- ParameterDescription*)&VehicleInfo__UnsubscribeRpm__response__parameter1,
- NULL};
-const ford_message_descriptions::MessageDescription
- VehicleInfo__UnsubscribeRpm__response = {
- "VehicleInfo",
- "UnsubscribeRpm",
- hmi_apis::messageType::response,
- hmi_apis::FunctionID::VehicleInfo_UnsubscribeRpm,
- VehicleInfo__UnsubscribeRpm__response__parameters};
-
-const ford_message_descriptions::ParameterDescription*
- VehicleInfo__SubscribeFuelLevel__request__parameters[] = {NULL};
-const ford_message_descriptions::MessageDescription
- VehicleInfo__SubscribeFuelLevel__request = {
- "VehicleInfo",
- "SubscribeFuelLevel",
- hmi_apis::messageType::request,
- hmi_apis::FunctionID::VehicleInfo_SubscribeFuelLevel,
- VehicleInfo__SubscribeFuelLevel__request__parameters};
-
-const ford_message_descriptions::StructDescription
- VehicleInfo__SubscribeFuelLevel__response__parameter1 = {
- {"fuelLevel", ford_message_descriptions::Struct, true},
- Structs::Common__VehicleDataResult__parameters};
-const ford_message_descriptions::ParameterDescription*
- VehicleInfo__SubscribeFuelLevel__response__parameters[] = {
- (const ford_message_descriptions::
- ParameterDescription*)&VehicleInfo__SubscribeFuelLevel__response__parameter1,
- NULL};
-const ford_message_descriptions::MessageDescription
- VehicleInfo__SubscribeFuelLevel__response = {
- "VehicleInfo",
- "SubscribeFuelLevel",
- hmi_apis::messageType::response,
- hmi_apis::FunctionID::VehicleInfo_SubscribeFuelLevel,
- VehicleInfo__SubscribeFuelLevel__response__parameters};
-
-const ford_message_descriptions::ParameterDescription*
- VehicleInfo__UnsubscribeFuelLevel__request__parameters[] = {NULL};
-const ford_message_descriptions::MessageDescription
- VehicleInfo__UnsubscribeFuelLevel__request = {
- "VehicleInfo",
- "UnsubscribeFuelLevel",
- hmi_apis::messageType::request,
- hmi_apis::FunctionID::VehicleInfo_UnsubscribeFuelLevel,
- VehicleInfo__UnsubscribeFuelLevel__request__parameters};
-
-const ford_message_descriptions::StructDescription
- VehicleInfo__UnsubscribeFuelLevel__response__parameter1 = {
- {"fuelLevel", ford_message_descriptions::Struct, true},
- Structs::Common__VehicleDataResult__parameters};
-const ford_message_descriptions::ParameterDescription*
- VehicleInfo__UnsubscribeFuelLevel__response__parameters[] = {
- (const ford_message_descriptions::
- ParameterDescription*)&VehicleInfo__UnsubscribeFuelLevel__response__parameter1,
- NULL};
-const ford_message_descriptions::MessageDescription
- VehicleInfo__UnsubscribeFuelLevel__response = {
- "VehicleInfo",
- "UnsubscribeFuelLevel",
- hmi_apis::messageType::response,
- hmi_apis::FunctionID::VehicleInfo_UnsubscribeFuelLevel,
- VehicleInfo__UnsubscribeFuelLevel__response__parameters};
-
-const ford_message_descriptions::ParameterDescription*
- VehicleInfo__SubscribeFuelLevel_State__request__parameters[] = {NULL};
-const ford_message_descriptions::MessageDescription
- VehicleInfo__SubscribeFuelLevel_State__request = {
- "VehicleInfo",
- "SubscribeFuelLevel_State",
- hmi_apis::messageType::request,
- hmi_apis::FunctionID::VehicleInfo_SubscribeFuelLevel_State,
- VehicleInfo__SubscribeFuelLevel_State__request__parameters};
-
-const ford_message_descriptions::StructDescription
- VehicleInfo__SubscribeFuelLevel_State__response__parameter1 = {
- {"fuelLevel_State", ford_message_descriptions::Struct, true},
- Structs::Common__VehicleDataResult__parameters};
-const ford_message_descriptions::ParameterDescription*
- VehicleInfo__SubscribeFuelLevel_State__response__parameters[] = {
- (const ford_message_descriptions::
- ParameterDescription*)&VehicleInfo__SubscribeFuelLevel_State__response__parameter1,
- NULL};
-const ford_message_descriptions::MessageDescription
- VehicleInfo__SubscribeFuelLevel_State__response = {
- "VehicleInfo",
- "SubscribeFuelLevel_State",
- hmi_apis::messageType::response,
- hmi_apis::FunctionID::VehicleInfo_SubscribeFuelLevel_State,
- VehicleInfo__SubscribeFuelLevel_State__response__parameters};
-
-const ford_message_descriptions::ParameterDescription*
- VehicleInfo__UnsubscribeFuelLevel_State__request__parameters[] = {NULL};
-const ford_message_descriptions::MessageDescription
- VehicleInfo__UnsubscribeFuelLevel_State__request = {
- "VehicleInfo",
- "UnsubscribeFuelLevel_State",
- hmi_apis::messageType::request,
- hmi_apis::FunctionID::VehicleInfo_UnsubscribeFuelLevel_State,
- VehicleInfo__UnsubscribeFuelLevel_State__request__parameters};
-
-const ford_message_descriptions::StructDescription
- VehicleInfo__UnsubscribeFuelLevel_State__response__parameter1 = {
- {"fuelLevel_State", ford_message_descriptions::Struct, true},
- Structs::Common__VehicleDataResult__parameters};
-const ford_message_descriptions::ParameterDescription*
- VehicleInfo__UnsubscribeFuelLevel_State__response__parameters[] = {
- (const ford_message_descriptions::
- ParameterDescription*)&VehicleInfo__UnsubscribeFuelLevel_State__response__parameter1,
- NULL};
-const ford_message_descriptions::MessageDescription
- VehicleInfo__UnsubscribeFuelLevel_State__response = {
- "VehicleInfo",
- "UnsubscribeFuelLevel_State",
- hmi_apis::messageType::response,
- hmi_apis::FunctionID::VehicleInfo_UnsubscribeFuelLevel_State,
- VehicleInfo__UnsubscribeFuelLevel_State__response__parameters};
-
-const ford_message_descriptions::ParameterDescription*
- VehicleInfo__SubscribeInstantFuelConsumption__request__parameters[] = {
- NULL};
-const ford_message_descriptions::MessageDescription
- VehicleInfo__SubscribeInstantFuelConsumption__request = {
- "VehicleInfo",
- "SubscribeInstantFuelConsumption",
- hmi_apis::messageType::request,
- hmi_apis::FunctionID::VehicleInfo_SubscribeInstantFuelConsumption,
- VehicleInfo__SubscribeInstantFuelConsumption__request__parameters};
-
-const ford_message_descriptions::StructDescription
- VehicleInfo__SubscribeInstantFuelConsumption__response__parameter1 = {
- {"instantFuelConsumption", ford_message_descriptions::Struct, true},
- Structs::Common__VehicleDataResult__parameters};
-const ford_message_descriptions::ParameterDescription*
- VehicleInfo__SubscribeInstantFuelConsumption__response__parameters[] = {
- (const ford_message_descriptions::
- ParameterDescription*)&VehicleInfo__SubscribeInstantFuelConsumption__response__parameter1,
- NULL};
-const ford_message_descriptions::MessageDescription
- VehicleInfo__SubscribeInstantFuelConsumption__response = {
- "VehicleInfo",
- "SubscribeInstantFuelConsumption",
- hmi_apis::messageType::response,
- hmi_apis::FunctionID::VehicleInfo_SubscribeInstantFuelConsumption,
- VehicleInfo__SubscribeInstantFuelConsumption__response__parameters};
-
-const ford_message_descriptions::ParameterDescription*
- VehicleInfo__UnsubscribeInstantFuelConsumption__request__parameters[] = {
- NULL};
-const ford_message_descriptions::MessageDescription
- VehicleInfo__UnsubscribeInstantFuelConsumption__request = {
- "VehicleInfo",
- "UnsubscribeInstantFuelConsumption",
- hmi_apis::messageType::request,
- hmi_apis::FunctionID::VehicleInfo_UnsubscribeInstantFuelConsumption,
- VehicleInfo__UnsubscribeInstantFuelConsumption__request__parameters};
-
-const ford_message_descriptions::StructDescription
- VehicleInfo__UnsubscribeInstantFuelConsumption__response__parameter1 = {
- {"instantFuelConsumption", ford_message_descriptions::Struct, true},
- Structs::Common__VehicleDataResult__parameters};
-const ford_message_descriptions::ParameterDescription*
- VehicleInfo__UnsubscribeInstantFuelConsumption__response__parameters[] = {
- (const ford_message_descriptions::
- ParameterDescription*)&VehicleInfo__UnsubscribeInstantFuelConsumption__response__parameter1,
- NULL};
-const ford_message_descriptions::MessageDescription
- VehicleInfo__UnsubscribeInstantFuelConsumption__response = {
- "VehicleInfo",
- "UnsubscribeInstantFuelConsumption",
- hmi_apis::messageType::response,
- hmi_apis::FunctionID::VehicleInfo_UnsubscribeInstantFuelConsumption,
- VehicleInfo__UnsubscribeInstantFuelConsumption__response__parameters};
-
-const ford_message_descriptions::ParameterDescription*
- VehicleInfo__SubscribeExternalTemperature__request__parameters[] = {NULL};
-const ford_message_descriptions::MessageDescription
- VehicleInfo__SubscribeExternalTemperature__request = {
- "VehicleInfo",
- "SubscribeExternalTemperature",
- hmi_apis::messageType::request,
- hmi_apis::FunctionID::VehicleInfo_SubscribeExternalTemperature,
- VehicleInfo__SubscribeExternalTemperature__request__parameters};
-
-const ford_message_descriptions::StructDescription
- VehicleInfo__SubscribeExternalTemperature__response__parameter1 = {
- {"externalTemperature", ford_message_descriptions::Struct, true},
- Structs::Common__VehicleDataResult__parameters};
-const ford_message_descriptions::ParameterDescription*
- VehicleInfo__SubscribeExternalTemperature__response__parameters[] = {
- (const ford_message_descriptions::
- ParameterDescription*)&VehicleInfo__SubscribeExternalTemperature__response__parameter1,
- NULL};
-const ford_message_descriptions::MessageDescription
- VehicleInfo__SubscribeExternalTemperature__response = {
- "VehicleInfo",
- "SubscribeExternalTemperature",
- hmi_apis::messageType::response,
- hmi_apis::FunctionID::VehicleInfo_SubscribeExternalTemperature,
- VehicleInfo__SubscribeExternalTemperature__response__parameters};
-
-const ford_message_descriptions::ParameterDescription*
- VehicleInfo__UnsubscribeExternalTemperature__request__parameters[] = {NULL};
-const ford_message_descriptions::MessageDescription
- VehicleInfo__UnsubscribeExternalTemperature__request = {
- "VehicleInfo",
- "UnsubscribeExternalTemperature",
- hmi_apis::messageType::request,
- hmi_apis::FunctionID::VehicleInfo_UnsubscribeExternalTemperature,
- VehicleInfo__UnsubscribeExternalTemperature__request__parameters};
-
-const ford_message_descriptions::StructDescription
- VehicleInfo__UnsubscribeExternalTemperature__response__parameter1 = {
- {"externalTemperature", ford_message_descriptions::Struct, true},
- Structs::Common__VehicleDataResult__parameters};
-const ford_message_descriptions::ParameterDescription*
- VehicleInfo__UnsubscribeExternalTemperature__response__parameters[] = {
- (const ford_message_descriptions::
- ParameterDescription*)&VehicleInfo__UnsubscribeExternalTemperature__response__parameter1,
- NULL};
-const ford_message_descriptions::MessageDescription
- VehicleInfo__UnsubscribeExternalTemperature__response = {
- "VehicleInfo",
- "UnsubscribeExternalTemperature",
- hmi_apis::messageType::response,
- hmi_apis::FunctionID::VehicleInfo_UnsubscribeExternalTemperature,
- VehicleInfo__UnsubscribeExternalTemperature__response__parameters};
-
-const ford_message_descriptions::ParameterDescription*
- VehicleInfo__SubscribePrndl__request__parameters[] = {NULL};
-const ford_message_descriptions::MessageDescription
- VehicleInfo__SubscribePrndl__request = {
- "VehicleInfo",
- "SubscribePrndl",
- hmi_apis::messageType::request,
- hmi_apis::FunctionID::VehicleInfo_SubscribePrndl,
- VehicleInfo__SubscribePrndl__request__parameters};
-
-const ford_message_descriptions::StructDescription
- VehicleInfo__SubscribePrndl__response__parameter1 = {
- {"prndl", ford_message_descriptions::Struct, true},
- Structs::Common__VehicleDataResult__parameters};
-const ford_message_descriptions::ParameterDescription*
- VehicleInfo__SubscribePrndl__response__parameters[] = {
- (const ford_message_descriptions::
- ParameterDescription*)&VehicleInfo__SubscribePrndl__response__parameter1,
- NULL};
-const ford_message_descriptions::MessageDescription
- VehicleInfo__SubscribePrndl__response = {
- "VehicleInfo",
- "SubscribePrndl",
- hmi_apis::messageType::response,
- hmi_apis::FunctionID::VehicleInfo_SubscribePrndl,
- VehicleInfo__SubscribePrndl__response__parameters};
-
-const ford_message_descriptions::ParameterDescription*
- VehicleInfo__UnsubscribePrndl__request__parameters[] = {NULL};
-const ford_message_descriptions::MessageDescription
- VehicleInfo__UnsubscribePrndl__request = {
- "VehicleInfo",
- "UnsubscribePrndl",
- hmi_apis::messageType::request,
- hmi_apis::FunctionID::VehicleInfo_UnsubscribePrndl,
- VehicleInfo__UnsubscribePrndl__request__parameters};
-
-const ford_message_descriptions::StructDescription
- VehicleInfo__UnsubscribePrndl__response__parameter1 = {
- {"prndl", ford_message_descriptions::Struct, true},
- Structs::Common__VehicleDataResult__parameters};
-const ford_message_descriptions::ParameterDescription*
- VehicleInfo__UnsubscribePrndl__response__parameters[] = {
- (const ford_message_descriptions::
- ParameterDescription*)&VehicleInfo__UnsubscribePrndl__response__parameter1,
- NULL};
-const ford_message_descriptions::MessageDescription
- VehicleInfo__UnsubscribePrndl__response = {
- "VehicleInfo",
- "UnsubscribePrndl",
- hmi_apis::messageType::response,
- hmi_apis::FunctionID::VehicleInfo_UnsubscribePrndl,
- VehicleInfo__UnsubscribePrndl__response__parameters};
-
-const ford_message_descriptions::ParameterDescription*
- VehicleInfo__SubscribeVin__request__parameters[] = {NULL};
-const ford_message_descriptions::MessageDescription
- VehicleInfo__SubscribeVin__request = {
- "VehicleInfo",
- "SubscribeVin",
- hmi_apis::messageType::request,
- hmi_apis::FunctionID::VehicleInfo_SubscribeVin,
- VehicleInfo__SubscribeVin__request__parameters};
-
-const ford_message_descriptions::ParameterDescription
- VehicleInfo__SubscribeVin__response__parameter1 = {
- "vin", ford_message_descriptions::String, true};
-const ford_message_descriptions::ParameterDescription*
- VehicleInfo__SubscribeVin__response__parameters[] = {
- (const ford_message_descriptions::
- ParameterDescription*)&VehicleInfo__SubscribeVin__response__parameter1,
- NULL};
-const ford_message_descriptions::MessageDescription
- VehicleInfo__SubscribeVin__response = {
- "VehicleInfo",
- "SubscribeVin",
- hmi_apis::messageType::response,
- hmi_apis::FunctionID::VehicleInfo_SubscribeVin,
- VehicleInfo__SubscribeVin__response__parameters};
-
-const ford_message_descriptions::ParameterDescription*
- VehicleInfo__UnsubscribeVin__request__parameters[] = {NULL};
-const ford_message_descriptions::MessageDescription
- VehicleInfo__UnsubscribeVin__request = {
- "VehicleInfo",
- "UnsubscribeVin",
- hmi_apis::messageType::request,
- hmi_apis::FunctionID::VehicleInfo_UnsubscribeVin,
- VehicleInfo__UnsubscribeVin__request__parameters};
-
-const ford_message_descriptions::ParameterDescription
- VehicleInfo__UnsubscribeVin__response__parameter1 = {
- "vin", ford_message_descriptions::String, true};
-const ford_message_descriptions::ParameterDescription*
- VehicleInfo__UnsubscribeVin__response__parameters[] = {
- (const ford_message_descriptions::
- ParameterDescription*)&VehicleInfo__UnsubscribeVin__response__parameter1,
- NULL};
-const ford_message_descriptions::MessageDescription
- VehicleInfo__UnsubscribeVin__response = {
- "VehicleInfo",
- "UnsubscribeVin",
- hmi_apis::messageType::response,
- hmi_apis::FunctionID::VehicleInfo_UnsubscribeVin,
- VehicleInfo__UnsubscribeVin__response__parameters};
-
-const ford_message_descriptions::ParameterDescription*
- VehicleInfo__SubscribeTirePressure__request__parameters[] = {NULL};
-const ford_message_descriptions::MessageDescription
- VehicleInfo__SubscribeTirePressure__request = {
- "VehicleInfo",
- "SubscribeTirePressure",
- hmi_apis::messageType::request,
- hmi_apis::FunctionID::VehicleInfo_SubscribeTirePressure,
- VehicleInfo__SubscribeTirePressure__request__parameters};
-
-const ford_message_descriptions::StructDescription
- VehicleInfo__SubscribeTirePressure__response__parameter1 = {
- {"tirePressure", ford_message_descriptions::Struct, true},
- Structs::Common__VehicleDataResult__parameters};
-const ford_message_descriptions::ParameterDescription*
- VehicleInfo__SubscribeTirePressure__response__parameters[] = {
- (const ford_message_descriptions::
- ParameterDescription*)&VehicleInfo__SubscribeTirePressure__response__parameter1,
- NULL};
-const ford_message_descriptions::MessageDescription
- VehicleInfo__SubscribeTirePressure__response = {
- "VehicleInfo",
- "SubscribeTirePressure",
- hmi_apis::messageType::response,
- hmi_apis::FunctionID::VehicleInfo_SubscribeTirePressure,
- VehicleInfo__SubscribeTirePressure__response__parameters};
-
-const ford_message_descriptions::ParameterDescription*
- VehicleInfo__UnsubscribeTirePressure__request__parameters[] = {NULL};
-const ford_message_descriptions::MessageDescription
- VehicleInfo__UnsubscribeTirePressure__request = {
- "VehicleInfo",
- "UnsubscribeTirePressure",
- hmi_apis::messageType::request,
- hmi_apis::FunctionID::VehicleInfo_UnsubscribeTirePressure,
- VehicleInfo__UnsubscribeTirePressure__request__parameters};
-
-const ford_message_descriptions::StructDescription
- VehicleInfo__UnsubscribeTirePressure__response__parameter1 = {
- {"tirePressure", ford_message_descriptions::Struct, true},
- Structs::Common__VehicleDataResult__parameters};
-const ford_message_descriptions::ParameterDescription*
- VehicleInfo__UnsubscribeTirePressure__response__parameters[] = {
- (const ford_message_descriptions::
- ParameterDescription*)&VehicleInfo__UnsubscribeTirePressure__response__parameter1,
- NULL};
-const ford_message_descriptions::MessageDescription
- VehicleInfo__UnsubscribeTirePressure__response = {
- "VehicleInfo",
- "UnsubscribeTirePressure",
- hmi_apis::messageType::response,
- hmi_apis::FunctionID::VehicleInfo_UnsubscribeTirePressure,
- VehicleInfo__UnsubscribeTirePressure__response__parameters};
-
-const ford_message_descriptions::ParameterDescription*
- VehicleInfo__SubscribeOdometer__request__parameters[] = {NULL};
-const ford_message_descriptions::MessageDescription
- VehicleInfo__SubscribeOdometer__request = {
- "VehicleInfo",
- "SubscribeOdometer",
- hmi_apis::messageType::request,
- hmi_apis::FunctionID::VehicleInfo_SubscribeOdometer,
- VehicleInfo__SubscribeOdometer__request__parameters};
-
-const ford_message_descriptions::StructDescription
- VehicleInfo__SubscribeOdometer__response__parameter1 = {
- {"odometer", ford_message_descriptions::Struct, true},
- Structs::Common__VehicleDataResult__parameters};
-const ford_message_descriptions::ParameterDescription*
- VehicleInfo__SubscribeOdometer__response__parameters[] = {
- (const ford_message_descriptions::
- ParameterDescription*)&VehicleInfo__SubscribeOdometer__response__parameter1,
- NULL};
-const ford_message_descriptions::MessageDescription
- VehicleInfo__SubscribeOdometer__response = {
- "VehicleInfo",
- "SubscribeOdometer",
- hmi_apis::messageType::response,
- hmi_apis::FunctionID::VehicleInfo_SubscribeOdometer,
- VehicleInfo__SubscribeOdometer__response__parameters};
-
-const ford_message_descriptions::ParameterDescription*
- VehicleInfo__UnsubscribeOdometer__request__parameters[] = {NULL};
-const ford_message_descriptions::MessageDescription
- VehicleInfo__UnsubscribeOdometer__request = {
- "VehicleInfo",
- "UnsubscribeOdometer",
- hmi_apis::messageType::request,
- hmi_apis::FunctionID::VehicleInfo_UnsubscribeOdometer,
- VehicleInfo__UnsubscribeOdometer__request__parameters};
-
-const ford_message_descriptions::StructDescription
- VehicleInfo__UnsubscribeOdometer__response__parameter1 = {
- {"odometer", ford_message_descriptions::Struct, true},
- Structs::Common__VehicleDataResult__parameters};
-const ford_message_descriptions::ParameterDescription*
- VehicleInfo__UnsubscribeOdometer__response__parameters[] = {
- (const ford_message_descriptions::
- ParameterDescription*)&VehicleInfo__UnsubscribeOdometer__response__parameter1,
- NULL};
-const ford_message_descriptions::MessageDescription
- VehicleInfo__UnsubscribeOdometer__response = {
- "VehicleInfo",
- "UnsubscribeOdometer",
- hmi_apis::messageType::response,
- hmi_apis::FunctionID::VehicleInfo_UnsubscribeOdometer,
- VehicleInfo__UnsubscribeOdometer__response__parameters};
-
-const ford_message_descriptions::ParameterDescription*
- VehicleInfo__SubscribeBeltStatus__request__parameters[] = {NULL};
-const ford_message_descriptions::MessageDescription
- VehicleInfo__SubscribeBeltStatus__request = {
- "VehicleInfo",
- "SubscribeBeltStatus",
- hmi_apis::messageType::request,
- hmi_apis::FunctionID::VehicleInfo_SubscribeBeltStatus,
- VehicleInfo__SubscribeBeltStatus__request__parameters};
-
-const ford_message_descriptions::StructDescription
- VehicleInfo__SubscribeBeltStatus__response__parameter1 = {
- {"beltStatus", ford_message_descriptions::Struct, true},
- Structs::Common__VehicleDataResult__parameters};
-const ford_message_descriptions::ParameterDescription*
- VehicleInfo__SubscribeBeltStatus__response__parameters[] = {
- (const ford_message_descriptions::
- ParameterDescription*)&VehicleInfo__SubscribeBeltStatus__response__parameter1,
- NULL};
-const ford_message_descriptions::MessageDescription
- VehicleInfo__SubscribeBeltStatus__response = {
- "VehicleInfo",
- "SubscribeBeltStatus",
- hmi_apis::messageType::response,
- hmi_apis::FunctionID::VehicleInfo_SubscribeBeltStatus,
- VehicleInfo__SubscribeBeltStatus__response__parameters};
-
-const ford_message_descriptions::ParameterDescription*
- VehicleInfo__UnsubscribeBeltStatus__request__parameters[] = {NULL};
-const ford_message_descriptions::MessageDescription
- VehicleInfo__UnsubscribeBeltStatus__request = {
- "VehicleInfo",
- "UnsubscribeBeltStatus",
- hmi_apis::messageType::request,
- hmi_apis::FunctionID::VehicleInfo_UnsubscribeBeltStatus,
- VehicleInfo__UnsubscribeBeltStatus__request__parameters};
-
-const ford_message_descriptions::StructDescription
- VehicleInfo__UnsubscribeBeltStatus__response__parameter1 = {
- {"beltStatus", ford_message_descriptions::Struct, true},
- Structs::Common__VehicleDataResult__parameters};
-const ford_message_descriptions::ParameterDescription*
- VehicleInfo__UnsubscribeBeltStatus__response__parameters[] = {
- (const ford_message_descriptions::
- ParameterDescription*)&VehicleInfo__UnsubscribeBeltStatus__response__parameter1,
- NULL};
-const ford_message_descriptions::MessageDescription
- VehicleInfo__UnsubscribeBeltStatus__response = {
- "VehicleInfo",
- "UnsubscribeBeltStatus",
- hmi_apis::messageType::response,
- hmi_apis::FunctionID::VehicleInfo_UnsubscribeBeltStatus,
- VehicleInfo__UnsubscribeBeltStatus__response__parameters};
-
-const ford_message_descriptions::ParameterDescription*
- VehicleInfo__SubscribeBodyInformation__request__parameters[] = {NULL};
-const ford_message_descriptions::MessageDescription
- VehicleInfo__SubscribeBodyInformation__request = {
- "VehicleInfo",
- "SubscribeBodyInformation",
- hmi_apis::messageType::request,
- hmi_apis::FunctionID::VehicleInfo_SubscribeBodyInformation,
- VehicleInfo__SubscribeBodyInformation__request__parameters};
-
-const ford_message_descriptions::StructDescription
- VehicleInfo__SubscribeBodyInformation__response__parameter1 = {
- {"bodyInformation", ford_message_descriptions::Struct, true},
- Structs::Common__VehicleDataResult__parameters};
-const ford_message_descriptions::ParameterDescription*
- VehicleInfo__SubscribeBodyInformation__response__parameters[] = {
- (const ford_message_descriptions::
- ParameterDescription*)&VehicleInfo__SubscribeBodyInformation__response__parameter1,
- NULL};
-const ford_message_descriptions::MessageDescription
- VehicleInfo__SubscribeBodyInformation__response = {
- "VehicleInfo",
- "SubscribeBodyInformation",
- hmi_apis::messageType::response,
- hmi_apis::FunctionID::VehicleInfo_SubscribeBodyInformation,
- VehicleInfo__SubscribeBodyInformation__response__parameters};
-
-const ford_message_descriptions::ParameterDescription*
- VehicleInfo__UnsubscribeBodyInformation__request__parameters[] = {NULL};
-const ford_message_descriptions::MessageDescription
- VehicleInfo__UnsubscribeBodyInformation__request = {
- "VehicleInfo",
- "UnsubscribeBodyInformation",
- hmi_apis::messageType::request,
- hmi_apis::FunctionID::VehicleInfo_UnsubscribeBodyInformation,
- VehicleInfo__UnsubscribeBodyInformation__request__parameters};
-
-const ford_message_descriptions::StructDescription
- VehicleInfo__UnsubscribeBodyInformation__response__parameter1 = {
- {"bodyInformation", ford_message_descriptions::Struct, true},
- Structs::Common__VehicleDataResult__parameters};
-const ford_message_descriptions::ParameterDescription*
- VehicleInfo__UnsubscribeBodyInformation__response__parameters[] = {
- (const ford_message_descriptions::
- ParameterDescription*)&VehicleInfo__UnsubscribeBodyInformation__response__parameter1,
- NULL};
-const ford_message_descriptions::MessageDescription
- VehicleInfo__UnsubscribeBodyInformation__response = {
- "VehicleInfo",
- "UnsubscribeBodyInformation",
- hmi_apis::messageType::response,
- hmi_apis::FunctionID::VehicleInfo_UnsubscribeBodyInformation,
- VehicleInfo__UnsubscribeBodyInformation__response__parameters};
-
-const ford_message_descriptions::ParameterDescription*
- VehicleInfo__SubscribeDeviceStatus__request__parameters[] = {NULL};
-const ford_message_descriptions::MessageDescription
- VehicleInfo__SubscribeDeviceStatus__request = {
- "VehicleInfo",
- "SubscribeDeviceStatus",
- hmi_apis::messageType::request,
- hmi_apis::FunctionID::VehicleInfo_SubscribeDeviceStatus,
- VehicleInfo__SubscribeDeviceStatus__request__parameters};
-
-const ford_message_descriptions::StructDescription
- VehicleInfo__SubscribeDeviceStatus__response__parameter1 = {
- {"deviceStatus", ford_message_descriptions::Struct, true},
- Structs::Common__VehicleDataResult__parameters};
-const ford_message_descriptions::ParameterDescription*
- VehicleInfo__SubscribeDeviceStatus__response__parameters[] = {
- (const ford_message_descriptions::
- ParameterDescription*)&VehicleInfo__SubscribeDeviceStatus__response__parameter1,
- NULL};
-const ford_message_descriptions::MessageDescription
- VehicleInfo__SubscribeDeviceStatus__response = {
- "VehicleInfo",
- "SubscribeDeviceStatus",
- hmi_apis::messageType::response,
- hmi_apis::FunctionID::VehicleInfo_SubscribeDeviceStatus,
- VehicleInfo__SubscribeDeviceStatus__response__parameters};
-
-const ford_message_descriptions::ParameterDescription*
- VehicleInfo__UnsubscribeDeviceStatus__request__parameters[] = {NULL};
-const ford_message_descriptions::MessageDescription
- VehicleInfo__UnsubscribeDeviceStatus__request = {
- "VehicleInfo",
- "UnsubscribeDeviceStatus",
- hmi_apis::messageType::request,
- hmi_apis::FunctionID::VehicleInfo_UnsubscribeDeviceStatus,
- VehicleInfo__UnsubscribeDeviceStatus__request__parameters};
-
-const ford_message_descriptions::StructDescription
- VehicleInfo__UnsubscribeDeviceStatus__response__parameter1 = {
- {"deviceStatus", ford_message_descriptions::Struct, true},
- Structs::Common__VehicleDataResult__parameters};
-const ford_message_descriptions::ParameterDescription*
- VehicleInfo__UnsubscribeDeviceStatus__response__parameters[] = {
- (const ford_message_descriptions::
- ParameterDescription*)&VehicleInfo__UnsubscribeDeviceStatus__response__parameter1,
- NULL};
-const ford_message_descriptions::MessageDescription
- VehicleInfo__UnsubscribeDeviceStatus__response = {
- "VehicleInfo",
- "UnsubscribeDeviceStatus",
- hmi_apis::messageType::response,
- hmi_apis::FunctionID::VehicleInfo_UnsubscribeDeviceStatus,
- VehicleInfo__UnsubscribeDeviceStatus__response__parameters};
-
-const ford_message_descriptions::ParameterDescription*
- VehicleInfo__SubscribeDriverBraking__request__parameters[] = {NULL};
-const ford_message_descriptions::MessageDescription
- VehicleInfo__SubscribeDriverBraking__request = {
- "VehicleInfo",
- "SubscribeDriverBraking",
- hmi_apis::messageType::request,
- hmi_apis::FunctionID::VehicleInfo_SubscribeDriverBraking,
- VehicleInfo__SubscribeDriverBraking__request__parameters};
-
-const ford_message_descriptions::StructDescription
- VehicleInfo__SubscribeDriverBraking__response__parameter1 = {
- {"driverBraking", ford_message_descriptions::Struct, true},
- Structs::Common__VehicleDataResult__parameters};
-const ford_message_descriptions::ParameterDescription*
- VehicleInfo__SubscribeDriverBraking__response__parameters[] = {
- (const ford_message_descriptions::
- ParameterDescription*)&VehicleInfo__SubscribeDriverBraking__response__parameter1,
- NULL};
-const ford_message_descriptions::MessageDescription
- VehicleInfo__SubscribeDriverBraking__response = {
- "VehicleInfo",
- "SubscribeDriverBraking",
- hmi_apis::messageType::response,
- hmi_apis::FunctionID::VehicleInfo_SubscribeDriverBraking,
- VehicleInfo__SubscribeDriverBraking__response__parameters};
-
-const ford_message_descriptions::ParameterDescription*
- VehicleInfo__UnsubscribeDriverBraking__request__parameters[] = {NULL};
-const ford_message_descriptions::MessageDescription
- VehicleInfo__UnsubscribeDriverBraking__request = {
- "VehicleInfo",
- "UnsubscribeDriverBraking",
- hmi_apis::messageType::request,
- hmi_apis::FunctionID::VehicleInfo_UnsubscribeDriverBraking,
- VehicleInfo__UnsubscribeDriverBraking__request__parameters};
-
-const ford_message_descriptions::StructDescription
- VehicleInfo__UnsubscribeDriverBraking__response__parameter1 = {
- {"driverBraking", ford_message_descriptions::Struct, true},
- Structs::Common__VehicleDataResult__parameters};
-const ford_message_descriptions::ParameterDescription*
- VehicleInfo__UnsubscribeDriverBraking__response__parameters[] = {
- (const ford_message_descriptions::
- ParameterDescription*)&VehicleInfo__UnsubscribeDriverBraking__response__parameter1,
- NULL};
-const ford_message_descriptions::MessageDescription
- VehicleInfo__UnsubscribeDriverBraking__response = {
- "VehicleInfo",
- "UnsubscribeDriverBraking",
- hmi_apis::messageType::response,
- hmi_apis::FunctionID::VehicleInfo_UnsubscribeDriverBraking,
- VehicleInfo__UnsubscribeDriverBraking__response__parameters};
-
-const ford_message_descriptions::ParameterDescription*
- VehicleInfo__SubscribeWiperStatus__request__parameters[] = {NULL};
-const ford_message_descriptions::MessageDescription
- VehicleInfo__SubscribeWiperStatus__request = {
- "VehicleInfo",
- "SubscribeWiperStatus",
- hmi_apis::messageType::request,
- hmi_apis::FunctionID::VehicleInfo_SubscribeWiperStatus,
- VehicleInfo__SubscribeWiperStatus__request__parameters};
-
-const ford_message_descriptions::StructDescription
- VehicleInfo__SubscribeWiperStatus__response__parameter1 = {
- {"wiperStatus", ford_message_descriptions::Struct, true},
- Structs::Common__VehicleDataResult__parameters};
-const ford_message_descriptions::ParameterDescription*
- VehicleInfo__SubscribeWiperStatus__response__parameters[] = {
- (const ford_message_descriptions::
- ParameterDescription*)&VehicleInfo__SubscribeWiperStatus__response__parameter1,
- NULL};
-const ford_message_descriptions::MessageDescription
- VehicleInfo__SubscribeWiperStatus__response = {
- "VehicleInfo",
- "SubscribeWiperStatus",
- hmi_apis::messageType::response,
- hmi_apis::FunctionID::VehicleInfo_SubscribeWiperStatus,
- VehicleInfo__SubscribeWiperStatus__response__parameters};
-
-const ford_message_descriptions::ParameterDescription*
- VehicleInfo__UnsubscribeWiperStatus__request__parameters[] = {NULL};
-const ford_message_descriptions::MessageDescription
- VehicleInfo__UnsubscribeWiperStatus__request = {
- "VehicleInfo",
- "UnsubscribeWiperStatus",
- hmi_apis::messageType::request,
- hmi_apis::FunctionID::VehicleInfo_UnsubscribeWiperStatus,
- VehicleInfo__UnsubscribeWiperStatus__request__parameters};
-
-const ford_message_descriptions::StructDescription
- VehicleInfo__UnsubscribeWiperStatus__response__parameter1 = {
- {"wiperStatus", ford_message_descriptions::Struct, true},
- Structs::Common__VehicleDataResult__parameters};
-const ford_message_descriptions::ParameterDescription*
- VehicleInfo__UnsubscribeWiperStatus__response__parameters[] = {
- (const ford_message_descriptions::
- ParameterDescription*)&VehicleInfo__UnsubscribeWiperStatus__response__parameter1,
- NULL};
-const ford_message_descriptions::MessageDescription
- VehicleInfo__UnsubscribeWiperStatus__response = {
- "VehicleInfo",
- "UnsubscribeWiperStatus",
- hmi_apis::messageType::response,
- hmi_apis::FunctionID::VehicleInfo_UnsubscribeWiperStatus,
- VehicleInfo__UnsubscribeWiperStatus__response__parameters};
-
-const ford_message_descriptions::ParameterDescription*
- VehicleInfo__SubscribeHeadLampStatus__request__parameters[] = {NULL};
-const ford_message_descriptions::MessageDescription
- VehicleInfo__SubscribeHeadLampStatus__request = {
- "VehicleInfo",
- "SubscribeHeadLampStatus",
- hmi_apis::messageType::request,
- hmi_apis::FunctionID::VehicleInfo_SubscribeHeadLampStatus,
- VehicleInfo__SubscribeHeadLampStatus__request__parameters};
-
-const ford_message_descriptions::StructDescription
- VehicleInfo__SubscribeHeadLampStatus__response__parameter1 = {
- {"headLampStatus", ford_message_descriptions::Struct, true},
- Structs::Common__VehicleDataResult__parameters};
-const ford_message_descriptions::ParameterDescription*
- VehicleInfo__SubscribeHeadLampStatus__response__parameters[] = {
- (const ford_message_descriptions::
- ParameterDescription*)&VehicleInfo__SubscribeHeadLampStatus__response__parameter1,
- NULL};
-const ford_message_descriptions::MessageDescription
- VehicleInfo__SubscribeHeadLampStatus__response = {
- "VehicleInfo",
- "SubscribeHeadLampStatus",
- hmi_apis::messageType::response,
- hmi_apis::FunctionID::VehicleInfo_SubscribeHeadLampStatus,
- VehicleInfo__SubscribeHeadLampStatus__response__parameters};
-
-const ford_message_descriptions::ParameterDescription*
- VehicleInfo__UnsubscribeHeadLampStatus__request__parameters[] = {NULL};
-const ford_message_descriptions::MessageDescription
- VehicleInfo__UnsubscribeHeadLampStatus__request = {
- "VehicleInfo",
- "UnsubscribeHeadLampStatus",
- hmi_apis::messageType::request,
- hmi_apis::FunctionID::VehicleInfo_UnsubscribeHeadLampStatus,
- VehicleInfo__UnsubscribeHeadLampStatus__request__parameters};
-
-const ford_message_descriptions::StructDescription
- VehicleInfo__UnsubscribeHeadLampStatus__response__parameter1 = {
- {"headLampStatus", ford_message_descriptions::Struct, true},
- Structs::Common__VehicleDataResult__parameters};
-const ford_message_descriptions::ParameterDescription*
- VehicleInfo__UnsubscribeHeadLampStatus__response__parameters[] = {
- (const ford_message_descriptions::
- ParameterDescription*)&VehicleInfo__UnsubscribeHeadLampStatus__response__parameter1,
- NULL};
-const ford_message_descriptions::MessageDescription
- VehicleInfo__UnsubscribeHeadLampStatus__response = {
- "VehicleInfo",
- "UnsubscribeHeadLampStatus",
- hmi_apis::messageType::response,
- hmi_apis::FunctionID::VehicleInfo_UnsubscribeHeadLampStatus,
- VehicleInfo__UnsubscribeHeadLampStatus__response__parameters};
-
-const ford_message_descriptions::ParameterDescription*
- VehicleInfo__SubscribeEngineTorque__request__parameters[] = {NULL};
-const ford_message_descriptions::MessageDescription
- VehicleInfo__SubscribeEngineTorque__request = {
- "VehicleInfo",
- "SubscribeEngineTorque",
- hmi_apis::messageType::request,
- hmi_apis::FunctionID::VehicleInfo_SubscribeEngineTorque,
- VehicleInfo__SubscribeEngineTorque__request__parameters};
-
-const ford_message_descriptions::StructDescription
- VehicleInfo__SubscribeEngineTorque__response__parameter1 = {
- {"engineTorque", ford_message_descriptions::Struct, true},
- Structs::Common__VehicleDataResult__parameters};
-const ford_message_descriptions::ParameterDescription*
- VehicleInfo__SubscribeEngineTorque__response__parameters[] = {
- (const ford_message_descriptions::
- ParameterDescription*)&VehicleInfo__SubscribeEngineTorque__response__parameter1,
- NULL};
-const ford_message_descriptions::MessageDescription
- VehicleInfo__SubscribeEngineTorque__response = {
- "VehicleInfo",
- "SubscribeEngineTorque",
- hmi_apis::messageType::response,
- hmi_apis::FunctionID::VehicleInfo_SubscribeEngineTorque,
- VehicleInfo__SubscribeEngineTorque__response__parameters};
-
-const ford_message_descriptions::ParameterDescription*
- VehicleInfo__UnsubscribeEngineTorque__request__parameters[] = {NULL};
-const ford_message_descriptions::MessageDescription
- VehicleInfo__UnsubscribeEngineTorque__request = {
- "VehicleInfo",
- "UnsubscribeEngineTorque",
- hmi_apis::messageType::request,
- hmi_apis::FunctionID::VehicleInfo_UnsubscribeEngineTorque,
- VehicleInfo__UnsubscribeEngineTorque__request__parameters};
-
-const ford_message_descriptions::StructDescription
- VehicleInfo__UnsubscribeEngineTorque__response__parameter1 = {
- {"engineTorque", ford_message_descriptions::Struct, true},
- Structs::Common__VehicleDataResult__parameters};
-const ford_message_descriptions::ParameterDescription*
- VehicleInfo__UnsubscribeEngineTorque__response__parameters[] = {
- (const ford_message_descriptions::
- ParameterDescription*)&VehicleInfo__UnsubscribeEngineTorque__response__parameter1,
- NULL};
-const ford_message_descriptions::MessageDescription
- VehicleInfo__UnsubscribeEngineTorque__response = {
- "VehicleInfo",
- "UnsubscribeEngineTorque",
- hmi_apis::messageType::response,
- hmi_apis::FunctionID::VehicleInfo_UnsubscribeEngineTorque,
- VehicleInfo__UnsubscribeEngineTorque__response__parameters};
-
-const ford_message_descriptions::ParameterDescription*
- VehicleInfo__SubscribeAccPedalPosition__request__parameters[] = {NULL};
-const ford_message_descriptions::MessageDescription
- VehicleInfo__SubscribeAccPedalPosition__request = {
- "VehicleInfo",
- "SubscribeAccPedalPosition",
- hmi_apis::messageType::request,
- hmi_apis::FunctionID::VehicleInfo_SubscribeAccPedalPosition,
- VehicleInfo__SubscribeAccPedalPosition__request__parameters};
-
-const ford_message_descriptions::StructDescription
- VehicleInfo__SubscribeAccPedalPosition__response__parameter1 = {
- {"accPedalPosition", ford_message_descriptions::Struct, true},
- Structs::Common__VehicleDataResult__parameters};
-const ford_message_descriptions::ParameterDescription*
- VehicleInfo__SubscribeAccPedalPosition__response__parameters[] = {
- (const ford_message_descriptions::
- ParameterDescription*)&VehicleInfo__SubscribeAccPedalPosition__response__parameter1,
- NULL};
-const ford_message_descriptions::MessageDescription
- VehicleInfo__SubscribeAccPedalPosition__response = {
- "VehicleInfo",
- "SubscribeAccPedalPosition",
- hmi_apis::messageType::response,
- hmi_apis::FunctionID::VehicleInfo_SubscribeAccPedalPosition,
- VehicleInfo__SubscribeAccPedalPosition__response__parameters};
-
-const ford_message_descriptions::ParameterDescription*
- VehicleInfo__UnsubscribeAccPedalPosition__request__parameters[] = {NULL};
-const ford_message_descriptions::MessageDescription
- VehicleInfo__UnsubscribeAccPedalPosition__request = {
- "VehicleInfo",
- "UnsubscribeAccPedalPosition",
- hmi_apis::messageType::request,
- hmi_apis::FunctionID::VehicleInfo_UnsubscribeAccPedalPosition,
- VehicleInfo__UnsubscribeAccPedalPosition__request__parameters};
-
-const ford_message_descriptions::StructDescription
- VehicleInfo__UnsubscribeAccPedalPosition__response__parameter1 = {
- {"accPedalPosition", ford_message_descriptions::Struct, true},
- Structs::Common__VehicleDataResult__parameters};
-const ford_message_descriptions::ParameterDescription*
- VehicleInfo__UnsubscribeAccPedalPosition__response__parameters[] = {
- (const ford_message_descriptions::
- ParameterDescription*)&VehicleInfo__UnsubscribeAccPedalPosition__response__parameter1,
- NULL};
-const ford_message_descriptions::MessageDescription
- VehicleInfo__UnsubscribeAccPedalPosition__response = {
- "VehicleInfo",
- "UnsubscribeAccPedalPosition",
- hmi_apis::messageType::response,
- hmi_apis::FunctionID::VehicleInfo_UnsubscribeAccPedalPosition,
- VehicleInfo__UnsubscribeAccPedalPosition__response__parameters};
-
-const ford_message_descriptions::ParameterDescription*
- VehicleInfo__SubscribeSteeringWheelAngle__request__parameters[] = {NULL};
-const ford_message_descriptions::MessageDescription
- VehicleInfo__SubscribeSteeringWheelAngle__request = {
- "VehicleInfo",
- "SubscribeSteeringWheelAngle",
- hmi_apis::messageType::request,
- hmi_apis::FunctionID::VehicleInfo_SubscribeSteeringWheelAngle,
- VehicleInfo__SubscribeSteeringWheelAngle__request__parameters};
-
-const ford_message_descriptions::StructDescription
- VehicleInfo__SubscribeSteeringWheelAngle__response__parameter1 = {
- {"steeringWheelAngle", ford_message_descriptions::Struct, true},
- Structs::Common__VehicleDataResult__parameters};
-const ford_message_descriptions::ParameterDescription*
- VehicleInfo__SubscribeSteeringWheelAngle__response__parameters[] = {
- (const ford_message_descriptions::
- ParameterDescription*)&VehicleInfo__SubscribeSteeringWheelAngle__response__parameter1,
- NULL};
-const ford_message_descriptions::MessageDescription
- VehicleInfo__SubscribeSteeringWheelAngle__response = {
- "VehicleInfo",
- "SubscribeSteeringWheelAngle",
- hmi_apis::messageType::response,
- hmi_apis::FunctionID::VehicleInfo_SubscribeSteeringWheelAngle,
- VehicleInfo__SubscribeSteeringWheelAngle__response__parameters};
-
-const ford_message_descriptions::ParameterDescription*
- VehicleInfo__UnsubscribeSteeringWheelAngle__request__parameters[] = {NULL};
-const ford_message_descriptions::MessageDescription
- VehicleInfo__UnsubscribeSteeringWheelAngle__request = {
- "VehicleInfo",
- "UnsubscribeSteeringWheelAngle",
- hmi_apis::messageType::request,
- hmi_apis::FunctionID::VehicleInfo_UnsubscribeSteeringWheelAngle,
- VehicleInfo__UnsubscribeSteeringWheelAngle__request__parameters};
-
-const ford_message_descriptions::StructDescription
- VehicleInfo__UnsubscribeSteeringWheelAngle__response__parameter1 = {
- {"steeringWheelAngle", ford_message_descriptions::Struct, true},
- Structs::Common__VehicleDataResult__parameters};
-const ford_message_descriptions::ParameterDescription*
- VehicleInfo__UnsubscribeSteeringWheelAngle__response__parameters[] = {
- (const ford_message_descriptions::
- ParameterDescription*)&VehicleInfo__UnsubscribeSteeringWheelAngle__response__parameter1,
- NULL};
-const ford_message_descriptions::MessageDescription
- VehicleInfo__UnsubscribeSteeringWheelAngle__response = {
- "VehicleInfo",
- "UnsubscribeSteeringWheelAngle",
- hmi_apis::messageType::response,
- hmi_apis::FunctionID::VehicleInfo_UnsubscribeSteeringWheelAngle,
- VehicleInfo__UnsubscribeSteeringWheelAngle__response__parameters};
-
-const ford_message_descriptions::ParameterDescription*
- VehicleInfo__SubscribeECallInfo__request__parameters[] = {NULL};
-const ford_message_descriptions::MessageDescription
- VehicleInfo__SubscribeECallInfo__request = {
- "VehicleInfo",
- "SubscribeECallInfo",
- hmi_apis::messageType::request,
- hmi_apis::FunctionID::VehicleInfo_SubscribeECallInfo,
- VehicleInfo__SubscribeECallInfo__request__parameters};
-
-const ford_message_descriptions::StructDescription
- VehicleInfo__SubscribeECallInfo__response__parameter1 = {
- {"eCallInfo", ford_message_descriptions::Struct, true},
- Structs::Common__VehicleDataResult__parameters};
-const ford_message_descriptions::ParameterDescription*
- VehicleInfo__SubscribeECallInfo__response__parameters[] = {
- (const ford_message_descriptions::
- ParameterDescription*)&VehicleInfo__SubscribeECallInfo__response__parameter1,
- NULL};
-const ford_message_descriptions::MessageDescription
- VehicleInfo__SubscribeECallInfo__response = {
- "VehicleInfo",
- "SubscribeECallInfo",
- hmi_apis::messageType::response,
- hmi_apis::FunctionID::VehicleInfo_SubscribeECallInfo,
- VehicleInfo__SubscribeECallInfo__response__parameters};
-
-const ford_message_descriptions::ParameterDescription*
- VehicleInfo__UnsubscribeECallInfo__request__parameters[] = {NULL};
-const ford_message_descriptions::MessageDescription
- VehicleInfo__UnsubscribeECallInfo__request = {
- "VehicleInfo",
- "UnsubscribeECallInfo",
- hmi_apis::messageType::request,
- hmi_apis::FunctionID::VehicleInfo_UnsubscribeECallInfo,
- VehicleInfo__UnsubscribeECallInfo__request__parameters};
-
-const ford_message_descriptions::StructDescription
- VehicleInfo__UnsubscribeECallInfo__response__parameter1 = {
- {"eCallInfo", ford_message_descriptions::Struct, true},
- Structs::Common__VehicleDataResult__parameters};
-const ford_message_descriptions::ParameterDescription*
- VehicleInfo__UnsubscribeECallInfo__response__parameters[] = {
- (const ford_message_descriptions::
- ParameterDescription*)&VehicleInfo__UnsubscribeECallInfo__response__parameter1,
- NULL};
-const ford_message_descriptions::MessageDescription
- VehicleInfo__UnsubscribeECallInfo__response = {
- "VehicleInfo",
- "UnsubscribeECallInfo",
- hmi_apis::messageType::response,
- hmi_apis::FunctionID::VehicleInfo_UnsubscribeECallInfo,
- VehicleInfo__UnsubscribeECallInfo__response__parameters};
-
-const ford_message_descriptions::ParameterDescription*
- VehicleInfo__SubscribeAirbagStatus__request__parameters[] = {NULL};
-const ford_message_descriptions::MessageDescription
- VehicleInfo__SubscribeAirbagStatus__request = {
- "VehicleInfo",
- "SubscribeAirbagStatus",
- hmi_apis::messageType::request,
- hmi_apis::FunctionID::VehicleInfo_SubscribeAirbagStatus,
- VehicleInfo__SubscribeAirbagStatus__request__parameters};
-
-const ford_message_descriptions::StructDescription
- VehicleInfo__SubscribeAirbagStatus__response__parameter1 = {
- {"airbagStatus", ford_message_descriptions::Struct, true},
- Structs::Common__VehicleDataResult__parameters};
-const ford_message_descriptions::ParameterDescription*
- VehicleInfo__SubscribeAirbagStatus__response__parameters[] = {
- (const ford_message_descriptions::
- ParameterDescription*)&VehicleInfo__SubscribeAirbagStatus__response__parameter1,
- NULL};
-const ford_message_descriptions::MessageDescription
- VehicleInfo__SubscribeAirbagStatus__response = {
- "VehicleInfo",
- "SubscribeAirbagStatus",
- hmi_apis::messageType::response,
- hmi_apis::FunctionID::VehicleInfo_SubscribeAirbagStatus,
- VehicleInfo__SubscribeAirbagStatus__response__parameters};
-
-const ford_message_descriptions::ParameterDescription*
- VehicleInfo__UnsubscribeAirbagStatus__request__parameters[] = {NULL};
-const ford_message_descriptions::MessageDescription
- VehicleInfo__UnsubscribeAirbagStatus__request = {
- "VehicleInfo",
- "UnsubscribeAirbagStatus",
- hmi_apis::messageType::request,
- hmi_apis::FunctionID::VehicleInfo_UnsubscribeAirbagStatus,
- VehicleInfo__UnsubscribeAirbagStatus__request__parameters};
-
-const ford_message_descriptions::StructDescription
- VehicleInfo__UnsubscribeAirbagStatus__response__parameter1 = {
- {"airbagStatus", ford_message_descriptions::Struct, true},
- Structs::Common__VehicleDataResult__parameters};
-const ford_message_descriptions::ParameterDescription*
- VehicleInfo__UnsubscribeAirbagStatus__response__parameters[] = {
- (const ford_message_descriptions::
- ParameterDescription*)&VehicleInfo__UnsubscribeAirbagStatus__response__parameter1,
- NULL};
-const ford_message_descriptions::MessageDescription
- VehicleInfo__UnsubscribeAirbagStatus__response = {
- "VehicleInfo",
- "UnsubscribeAirbagStatus",
- hmi_apis::messageType::response,
- hmi_apis::FunctionID::VehicleInfo_UnsubscribeAirbagStatus,
- VehicleInfo__UnsubscribeAirbagStatus__response__parameters};
-
-const ford_message_descriptions::ParameterDescription*
- VehicleInfo__SubscribeEmergencyEvent__request__parameters[] = {NULL};
-const ford_message_descriptions::MessageDescription
- VehicleInfo__SubscribeEmergencyEvent__request = {
- "VehicleInfo",
- "SubscribeEmergencyEvent",
- hmi_apis::messageType::request,
- hmi_apis::FunctionID::VehicleInfo_SubscribeEmergencyEvent,
- VehicleInfo__SubscribeEmergencyEvent__request__parameters};
-
-const ford_message_descriptions::StructDescription
- VehicleInfo__SubscribeEmergencyEvent__response__parameter1 = {
- {"emergencyEvent", ford_message_descriptions::Struct, true},
- Structs::Common__VehicleDataResult__parameters};
-const ford_message_descriptions::ParameterDescription*
- VehicleInfo__SubscribeEmergencyEvent__response__parameters[] = {
- (const ford_message_descriptions::
- ParameterDescription*)&VehicleInfo__SubscribeEmergencyEvent__response__parameter1,
- NULL};
-const ford_message_descriptions::MessageDescription
- VehicleInfo__SubscribeEmergencyEvent__response = {
- "VehicleInfo",
- "SubscribeEmergencyEvent",
- hmi_apis::messageType::response,
- hmi_apis::FunctionID::VehicleInfo_SubscribeEmergencyEvent,
- VehicleInfo__SubscribeEmergencyEvent__response__parameters};
-
-const ford_message_descriptions::ParameterDescription*
- VehicleInfo__UnsubscribeEmergencyEvent__request__parameters[] = {NULL};
-const ford_message_descriptions::MessageDescription
- VehicleInfo__UnsubscribeEmergencyEvent__request = {
- "VehicleInfo",
- "UnsubscribeEmergencyEvent",
- hmi_apis::messageType::request,
- hmi_apis::FunctionID::VehicleInfo_UnsubscribeEmergencyEvent,
- VehicleInfo__UnsubscribeEmergencyEvent__request__parameters};
-
-const ford_message_descriptions::StructDescription
- VehicleInfo__UnsubscribeEmergencyEvent__response__parameter1 = {
- {"emergencyEvent", ford_message_descriptions::Struct, true},
- Structs::Common__VehicleDataResult__parameters};
-const ford_message_descriptions::ParameterDescription*
- VehicleInfo__UnsubscribeEmergencyEvent__response__parameters[] = {
- (const ford_message_descriptions::
- ParameterDescription*)&VehicleInfo__UnsubscribeEmergencyEvent__response__parameter1,
- NULL};
-const ford_message_descriptions::MessageDescription
- VehicleInfo__UnsubscribeEmergencyEvent__response = {
- "VehicleInfo",
- "UnsubscribeEmergencyEvent",
- hmi_apis::messageType::response,
- hmi_apis::FunctionID::VehicleInfo_UnsubscribeEmergencyEvent,
- VehicleInfo__UnsubscribeEmergencyEvent__response__parameters};
-
-const ford_message_descriptions::ParameterDescription*
- VehicleInfo__SubscribeClusterModeStatus__request__parameters[] = {NULL};
-const ford_message_descriptions::MessageDescription
- VehicleInfo__SubscribeClusterModeStatus__request = {
- "VehicleInfo",
- "SubscribeClusterModeStatus",
- hmi_apis::messageType::request,
- hmi_apis::FunctionID::VehicleInfo_SubscribeClusterModeStatus,
- VehicleInfo__SubscribeClusterModeStatus__request__parameters};
-
-const ford_message_descriptions::StructDescription
- VehicleInfo__SubscribeClusterModeStatus__response__parameter1 = {
- {"clusterModeStatus", ford_message_descriptions::Struct, true},
- Structs::Common__VehicleDataResult__parameters};
-const ford_message_descriptions::ParameterDescription*
- VehicleInfo__SubscribeClusterModeStatus__response__parameters[] = {
- (const ford_message_descriptions::
- ParameterDescription*)&VehicleInfo__SubscribeClusterModeStatus__response__parameter1,
- NULL};
-const ford_message_descriptions::MessageDescription
- VehicleInfo__SubscribeClusterModeStatus__response = {
- "VehicleInfo",
- "SubscribeClusterModeStatus",
- hmi_apis::messageType::response,
- hmi_apis::FunctionID::VehicleInfo_SubscribeClusterModeStatus,
- VehicleInfo__SubscribeClusterModeStatus__response__parameters};
-
-const ford_message_descriptions::ParameterDescription*
- VehicleInfo__UnsubscribeClusterModeStatus__request__parameters[] = {NULL};
-const ford_message_descriptions::MessageDescription
- VehicleInfo__UnsubscribeClusterModeStatus__request = {
- "VehicleInfo",
- "UnsubscribeClusterModeStatus",
- hmi_apis::messageType::request,
- hmi_apis::FunctionID::VehicleInfo_UnsubscribeClusterModeStatus,
- VehicleInfo__UnsubscribeClusterModeStatus__request__parameters};
-
-const ford_message_descriptions::StructDescription
- VehicleInfo__UnsubscribeClusterModeStatus__response__parameter1 = {
- {"clusterModeStatus", ford_message_descriptions::Struct, true},
- Structs::Common__VehicleDataResult__parameters};
-const ford_message_descriptions::ParameterDescription*
- VehicleInfo__UnsubscribeClusterModeStatus__response__parameters[] = {
- (const ford_message_descriptions::
- ParameterDescription*)&VehicleInfo__UnsubscribeClusterModeStatus__response__parameter1,
- NULL};
-const ford_message_descriptions::MessageDescription
- VehicleInfo__UnsubscribeClusterModeStatus__response = {
- "VehicleInfo",
- "UnsubscribeClusterModeStatus",
- hmi_apis::messageType::response,
- hmi_apis::FunctionID::VehicleInfo_UnsubscribeClusterModeStatus,
- VehicleInfo__UnsubscribeClusterModeStatus__response__parameters};
-
-const ford_message_descriptions::ParameterDescription*
- VehicleInfo__SubscribeMyKey__request__parameters[] = {NULL};
-const ford_message_descriptions::MessageDescription
- VehicleInfo__SubscribeMyKey__request = {
- "VehicleInfo",
- "SubscribeMyKey",
- hmi_apis::messageType::request,
- hmi_apis::FunctionID::VehicleInfo_SubscribeMyKey,
- VehicleInfo__SubscribeMyKey__request__parameters};
-
-const ford_message_descriptions::StructDescription
- VehicleInfo__SubscribeMyKey__response__parameter1 = {
- {"myKey", ford_message_descriptions::Struct, true},
- Structs::Common__VehicleDataResult__parameters};
-const ford_message_descriptions::ParameterDescription*
- VehicleInfo__SubscribeMyKey__response__parameters[] = {
- (const ford_message_descriptions::
- ParameterDescription*)&VehicleInfo__SubscribeMyKey__response__parameter1,
- NULL};
-const ford_message_descriptions::MessageDescription
- VehicleInfo__SubscribeMyKey__response = {
- "VehicleInfo",
- "SubscribeMyKey",
- hmi_apis::messageType::response,
- hmi_apis::FunctionID::VehicleInfo_SubscribeMyKey,
- VehicleInfo__SubscribeMyKey__response__parameters};
-
-const ford_message_descriptions::ParameterDescription*
- VehicleInfo__UnsubscribeMyKey__request__parameters[] = {NULL};
-const ford_message_descriptions::MessageDescription
- VehicleInfo__UnsubscribeMyKey__request = {
- "VehicleInfo",
- "UnsubscribeMyKey",
- hmi_apis::messageType::request,
- hmi_apis::FunctionID::VehicleInfo_UnsubscribeMyKey,
- VehicleInfo__UnsubscribeMyKey__request__parameters};
-
-const ford_message_descriptions::StructDescription
- VehicleInfo__UnsubscribeMyKey__response__parameter1 = {
- {"myKey", ford_message_descriptions::Struct, true},
- Structs::Common__VehicleDataResult__parameters};
-const ford_message_descriptions::ParameterDescription*
- VehicleInfo__UnsubscribeMyKey__response__parameters[] = {
- (const ford_message_descriptions::
- ParameterDescription*)&VehicleInfo__UnsubscribeMyKey__response__parameter1,
- NULL};
-const ford_message_descriptions::MessageDescription
- VehicleInfo__UnsubscribeMyKey__response = {
- "VehicleInfo",
- "UnsubscribeMyKey",
- hmi_apis::messageType::response,
- hmi_apis::FunctionID::VehicleInfo_UnsubscribeMyKey,
- VehicleInfo__UnsubscribeMyKey__response__parameters};
-
-const ford_message_descriptions::ParameterDescription
- SDL__ActivateApp__request__parameter1 = {
- "appID", ford_message_descriptions::Integer, true};
-const ford_message_descriptions::ParameterDescription*
- SDL__ActivateApp__request__parameters[] = {
- (const ford_message_descriptions::
- ParameterDescription*)&SDL__ActivateApp__request__parameter1,
- NULL};
-const ford_message_descriptions::MessageDescription SDL__ActivateApp__request =
- {"SDL",
- "ActivateApp",
- hmi_apis::messageType::request,
- hmi_apis::FunctionID::SDL_ActivateApp,
- SDL__ActivateApp__request__parameters};
-
-const ford_message_descriptions::ParameterDescription
- SDL__ActivateApp__response__parameter1 = {
- "isSDLAllowed", ford_message_descriptions::Boolean, true};
-const ford_message_descriptions::StructDescription
- SDL__ActivateApp__response__parameter2 = {
- {"device", ford_message_descriptions::Struct, false},
- Structs::Common__DeviceInfo__parameters};
-const ford_message_descriptions::ParameterDescription
- SDL__ActivateApp__response__parameter3 = {
- "isPermissionsConsentNeeded", ford_message_descriptions::Boolean, true};
-const ford_message_descriptions::ParameterDescription
- SDL__ActivateApp__response__parameter4 = {
- "isAppPermissionsRevoked", ford_message_descriptions::Boolean, true};
-const ford_message_descriptions::StructDescription
- SDL__ActivateApp__response__parameter5_array = {
- {"appRevokedPermissions", ford_message_descriptions::Struct, true},
- Structs::Common__PermissionItem__parameters};
-const ford_message_descriptions::ArrayDescription
- SDL__ActivateApp__response__parameter5 = {
- {"appRevokedPermissions", ford_message_descriptions::Array, false},
- (const ford_message_descriptions::
- ParameterDescription*)&SDL__ActivateApp__response__parameter5_array,
- "(si(bb))"};
-const ford_message_descriptions::ParameterDescription
- SDL__ActivateApp__response__parameter6 = {
- "isAppRevoked", ford_message_descriptions::Boolean, true};
-const ford_message_descriptions::ParameterDescription
- SDL__ActivateApp__response__parameter7 = {
- "priority", ford_message_descriptions::Enum, false};
-const ford_message_descriptions::ParameterDescription*
- SDL__ActivateApp__response__parameters[] = {
- (const ford_message_descriptions::
- ParameterDescription*)&SDL__ActivateApp__response__parameter1,
- (const ford_message_descriptions::
- ParameterDescription*)&SDL__ActivateApp__response__parameter2,
- (const ford_message_descriptions::
- ParameterDescription*)&SDL__ActivateApp__response__parameter3,
- (const ford_message_descriptions::
- ParameterDescription*)&SDL__ActivateApp__response__parameter4,
- (const ford_message_descriptions::
- ParameterDescription*)&SDL__ActivateApp__response__parameter5,
- (const ford_message_descriptions::
- ParameterDescription*)&SDL__ActivateApp__response__parameter6,
- (const ford_message_descriptions::
- ParameterDescription*)&SDL__ActivateApp__response__parameter7,
- NULL};
-const ford_message_descriptions::MessageDescription SDL__ActivateApp__response =
- {"SDL",
- "ActivateApp",
- hmi_apis::messageType::response,
- hmi_apis::FunctionID::SDL_ActivateApp,
- SDL__ActivateApp__response__parameters};
-
-const ford_message_descriptions::ParameterDescription
- SDL__GetUserFriendlyMessage__request__parameter1_array = {
- "messageCodes", ford_message_descriptions::String, true};
-const ford_message_descriptions::ArrayDescription
- SDL__GetUserFriendlyMessage__request__parameter1 = {
- {"messageCodes", ford_message_descriptions::Array, true},
- (const ford_message_descriptions::
- ParameterDescription*)&SDL__GetUserFriendlyMessage__request__parameter1_array,
- "s"};
-const ford_message_descriptions::ParameterDescription
- SDL__GetUserFriendlyMessage__request__parameter2 = {
- "language", ford_message_descriptions::Enum, false};
-const ford_message_descriptions::ParameterDescription*
- SDL__GetUserFriendlyMessage__request__parameters[] = {
- (const ford_message_descriptions::
- ParameterDescription*)&SDL__GetUserFriendlyMessage__request__parameter1,
- (const ford_message_descriptions::
- ParameterDescription*)&SDL__GetUserFriendlyMessage__request__parameter2,
- NULL};
-const ford_message_descriptions::MessageDescription
- SDL__GetUserFriendlyMessage__request = {
- "SDL",
- "GetUserFriendlyMessage",
- hmi_apis::messageType::request,
- hmi_apis::FunctionID::SDL_GetUserFriendlyMessage,
- SDL__GetUserFriendlyMessage__request__parameters};
-
-const ford_message_descriptions::StructDescription
- SDL__GetUserFriendlyMessage__response__parameter1_array = {
- {"messages", ford_message_descriptions::Struct, true},
- Structs::Common__UserFriendlyMessage__parameters};
-const ford_message_descriptions::ArrayDescription
- SDL__GetUserFriendlyMessage__response__parameter1 = {
- {"messages", ford_message_descriptions::Array, false},
- (const ford_message_descriptions::
- ParameterDescription*)&SDL__GetUserFriendlyMessage__response__parameter1_array,
- "(s(bs)(bs)(bs)(bs)(bs))"};
-const ford_message_descriptions::ParameterDescription*
- SDL__GetUserFriendlyMessage__response__parameters[] = {
- (const ford_message_descriptions::
- ParameterDescription*)&SDL__GetUserFriendlyMessage__response__parameter1,
- NULL};
-const ford_message_descriptions::MessageDescription
- SDL__GetUserFriendlyMessage__response = {
- "SDL",
- "GetUserFriendlyMessage",
- hmi_apis::messageType::response,
- hmi_apis::FunctionID::SDL_GetUserFriendlyMessage,
- SDL__GetUserFriendlyMessage__response__parameters};
-
-const ford_message_descriptions::StructDescription
- SDL__OnAllowSDLFunctionality__notification__parameter1 = {
- {"device", ford_message_descriptions::Struct, false},
- Structs::Common__DeviceInfo__parameters};
-const ford_message_descriptions::ParameterDescription
- SDL__OnAllowSDLFunctionality__notification__parameter2 = {
- "allowed", ford_message_descriptions::Boolean, true};
-const ford_message_descriptions::ParameterDescription
- SDL__OnAllowSDLFunctionality__notification__parameter3 = {
- "source", ford_message_descriptions::Enum, true};
-const ford_message_descriptions::ParameterDescription*
- SDL__OnAllowSDLFunctionality__notification__parameters[] = {
- (const ford_message_descriptions::
- ParameterDescription*)&SDL__OnAllowSDLFunctionality__notification__parameter1,
- (const ford_message_descriptions::
- ParameterDescription*)&SDL__OnAllowSDLFunctionality__notification__parameter2,
- (const ford_message_descriptions::
- ParameterDescription*)&SDL__OnAllowSDLFunctionality__notification__parameter3,
- NULL};
-const ford_message_descriptions::MessageDescription
- SDL__OnAllowSDLFunctionality__notification = {
- "SDL",
- "OnAllowSDLFunctionality",
- hmi_apis::messageType::notification,
- hmi_apis::FunctionID::SDL_OnAllowSDLFunctionality,
- SDL__OnAllowSDLFunctionality__notification__parameters};
-
-const ford_message_descriptions::ParameterDescription
- SDL__OnReceivedPolicyUpdate__notification__parameter1 = {
- "policyfile", ford_message_descriptions::String, true};
-const ford_message_descriptions::ParameterDescription*
- SDL__OnReceivedPolicyUpdate__notification__parameters[] = {
- (const ford_message_descriptions::
- ParameterDescription*)&SDL__OnReceivedPolicyUpdate__notification__parameter1,
- NULL};
-const ford_message_descriptions::MessageDescription
- SDL__OnReceivedPolicyUpdate__notification = {
- "SDL",
- "OnReceivedPolicyUpdate",
- hmi_apis::messageType::notification,
- hmi_apis::FunctionID::SDL_OnReceivedPolicyUpdate,
- SDL__OnReceivedPolicyUpdate__notification__parameters};
-
-const ford_message_descriptions::ParameterDescription*
- SDL__OnPolicyUpdate__notification__parameters[] = {NULL};
-const ford_message_descriptions::MessageDescription
- SDL__OnPolicyUpdate__notification = {
- "SDL",
- "OnPolicyUpdate",
- hmi_apis::messageType::notification,
- hmi_apis::FunctionID::SDL_OnPolicyUpdate,
- SDL__OnPolicyUpdate__notification__parameters};
-
-const ford_message_descriptions::ParameterDescription
- SDL__GetListOfPermissions__request__parameter1 = {
- "appID", ford_message_descriptions::Integer, false};
-const ford_message_descriptions::ParameterDescription*
- SDL__GetListOfPermissions__request__parameters[] = {
- (const ford_message_descriptions::
- ParameterDescription*)&SDL__GetListOfPermissions__request__parameter1,
- NULL};
-const ford_message_descriptions::MessageDescription
- SDL__GetListOfPermissions__request = {
- "SDL",
- "GetListOfPermissions",
- hmi_apis::messageType::request,
- hmi_apis::FunctionID::SDL_GetListOfPermissions,
- SDL__GetListOfPermissions__request__parameters};
-
-const ford_message_descriptions::StructDescription
- SDL__GetListOfPermissions__response__parameter1_array = {
- {"allowedFunctions", ford_message_descriptions::Struct, true},
- Structs::Common__PermissionItem__parameters};
-const ford_message_descriptions::ArrayDescription
- SDL__GetListOfPermissions__response__parameter1 = {
- {"allowedFunctions", ford_message_descriptions::Array, true},
- (const ford_message_descriptions::
- ParameterDescription*)&SDL__GetListOfPermissions__response__parameter1_array,
- "(si(bb))"};
-const ford_message_descriptions::ParameterDescription*
- SDL__GetListOfPermissions__response__parameters[] = {
- (const ford_message_descriptions::
- ParameterDescription*)&SDL__GetListOfPermissions__response__parameter1,
- NULL};
-const ford_message_descriptions::MessageDescription
- SDL__GetListOfPermissions__response = {
- "SDL",
- "GetListOfPermissions",
- hmi_apis::messageType::response,
- hmi_apis::FunctionID::SDL_GetListOfPermissions,
- SDL__GetListOfPermissions__response__parameters};
-
-const ford_message_descriptions::ParameterDescription
- SDL__OnAppPermissionConsent__notification__parameter1 = {
- "appID", ford_message_descriptions::Integer, false};
-const ford_message_descriptions::StructDescription
- SDL__OnAppPermissionConsent__notification__parameter2_array = {
- {"consentedFunctions", ford_message_descriptions::Struct, true},
- Structs::Common__PermissionItem__parameters};
-const ford_message_descriptions::ArrayDescription
- SDL__OnAppPermissionConsent__notification__parameter2 = {
- {"consentedFunctions", ford_message_descriptions::Array, true},
- (const ford_message_descriptions::
- ParameterDescription*)&SDL__OnAppPermissionConsent__notification__parameter2_array,
- "(si(bb))"};
-const ford_message_descriptions::ParameterDescription
- SDL__OnAppPermissionConsent__notification__parameter3 = {
- "source", ford_message_descriptions::Enum, true};
-const ford_message_descriptions::ParameterDescription*
- SDL__OnAppPermissionConsent__notification__parameters[] = {
- (const ford_message_descriptions::
- ParameterDescription*)&SDL__OnAppPermissionConsent__notification__parameter1,
- (const ford_message_descriptions::
- ParameterDescription*)&SDL__OnAppPermissionConsent__notification__parameter2,
- (const ford_message_descriptions::
- ParameterDescription*)&SDL__OnAppPermissionConsent__notification__parameter3,
- NULL};
-const ford_message_descriptions::MessageDescription
- SDL__OnAppPermissionConsent__notification = {
- "SDL",
- "OnAppPermissionConsent",
- hmi_apis::messageType::notification,
- hmi_apis::FunctionID::SDL_OnAppPermissionConsent,
- SDL__OnAppPermissionConsent__notification__parameters};
-
-const ford_message_descriptions::ParameterDescription
- SDL__OnAppPermissionChanged__notification__parameter1 = {
- "appID", ford_message_descriptions::Integer, true};
-const ford_message_descriptions::ParameterDescription
- SDL__OnAppPermissionChanged__notification__parameter2 = {
- "isAppPermissionsRevoked", ford_message_descriptions::Boolean, false};
-const ford_message_descriptions::StructDescription
- SDL__OnAppPermissionChanged__notification__parameter3_array = {
- {"appRevokedPermissions", ford_message_descriptions::Struct, true},
- Structs::Common__PermissionItem__parameters};
-const ford_message_descriptions::ArrayDescription
- SDL__OnAppPermissionChanged__notification__parameter3 = {
- {"appRevokedPermissions", ford_message_descriptions::Array, false},
- (const ford_message_descriptions::
- ParameterDescription*)&SDL__OnAppPermissionChanged__notification__parameter3_array,
- "(si(bb))"};
-const ford_message_descriptions::ParameterDescription
- SDL__OnAppPermissionChanged__notification__parameter4 = {
- "appRevoked", ford_message_descriptions::Boolean, false};
-const ford_message_descriptions::ParameterDescription
- SDL__OnAppPermissionChanged__notification__parameter5 = {
- "appPermissionsConsentNeeded",
- ford_message_descriptions::Boolean,
- false};
-const ford_message_descriptions::ParameterDescription
- SDL__OnAppPermissionChanged__notification__parameter6 = {
- "appUnauthorized", ford_message_descriptions::Boolean, false};
-const ford_message_descriptions::ParameterDescription
- SDL__OnAppPermissionChanged__notification__parameter7 = {
- "priority", ford_message_descriptions::Enum, false};
-const ford_message_descriptions::ParameterDescription
- SDL__OnAppPermissionChanged__notification__parameter8_array = {
- "requestType", ford_message_descriptions::Enum, true};
-const ford_message_descriptions::ArrayDescription
- SDL__OnAppPermissionChanged__notification__parameter8 = {
- {"requestType", ford_message_descriptions::Array, false},
- (const ford_message_descriptions::
- ParameterDescription*)&SDL__OnAppPermissionChanged__notification__parameter8_array,
- "i"};
-const ford_message_descriptions::ParameterDescription*
- SDL__OnAppPermissionChanged__notification__parameters[] = {
- (const ford_message_descriptions::
- ParameterDescription*)&SDL__OnAppPermissionChanged__notification__parameter1,
- (const ford_message_descriptions::
- ParameterDescription*)&SDL__OnAppPermissionChanged__notification__parameter2,
- (const ford_message_descriptions::
- ParameterDescription*)&SDL__OnAppPermissionChanged__notification__parameter3,
- (const ford_message_descriptions::
- ParameterDescription*)&SDL__OnAppPermissionChanged__notification__parameter4,
- (const ford_message_descriptions::
- ParameterDescription*)&SDL__OnAppPermissionChanged__notification__parameter5,
- (const ford_message_descriptions::
- ParameterDescription*)&SDL__OnAppPermissionChanged__notification__parameter6,
- (const ford_message_descriptions::
- ParameterDescription*)&SDL__OnAppPermissionChanged__notification__parameter7,
- (const ford_message_descriptions::
- ParameterDescription*)&SDL__OnAppPermissionChanged__notification__parameter8,
- NULL};
-const ford_message_descriptions::MessageDescription
- SDL__OnAppPermissionChanged__notification = {
- "SDL",
- "OnAppPermissionChanged",
- hmi_apis::messageType::notification,
- hmi_apis::FunctionID::SDL_OnAppPermissionChanged,
- SDL__OnAppPermissionChanged__notification__parameters};
-
-const ford_message_descriptions::StructDescription
- SDL__OnSDLConsentNeeded__notification__parameter1 = {
- {"device", ford_message_descriptions::Struct, true},
- Structs::Common__DeviceInfo__parameters};
-const ford_message_descriptions::ParameterDescription*
- SDL__OnSDLConsentNeeded__notification__parameters[] = {
- (const ford_message_descriptions::
- ParameterDescription*)&SDL__OnSDLConsentNeeded__notification__parameter1,
- NULL};
-const ford_message_descriptions::MessageDescription
- SDL__OnSDLConsentNeeded__notification = {
- "SDL",
- "OnSDLConsentNeeded",
- hmi_apis::messageType::notification,
- hmi_apis::FunctionID::SDL_OnSDLConsentNeeded,
- SDL__OnSDLConsentNeeded__notification__parameters};
-
-const ford_message_descriptions::ParameterDescription*
- SDL__UpdateSDL__request__parameters[] = {NULL};
-const ford_message_descriptions::MessageDescription SDL__UpdateSDL__request = {
- "SDL",
- "UpdateSDL",
- hmi_apis::messageType::request,
- hmi_apis::FunctionID::SDL_UpdateSDL,
- SDL__UpdateSDL__request__parameters};
-
-const ford_message_descriptions::ParameterDescription
- SDL__UpdateSDL__response__parameter1 = {
- "result", ford_message_descriptions::Enum, true};
-const ford_message_descriptions::ParameterDescription*
- SDL__UpdateSDL__response__parameters[] = {
- (const ford_message_descriptions::
- ParameterDescription*)&SDL__UpdateSDL__response__parameter1,
- NULL};
-const ford_message_descriptions::MessageDescription SDL__UpdateSDL__response = {
- "SDL",
- "UpdateSDL",
- hmi_apis::messageType::response,
- hmi_apis::FunctionID::SDL_UpdateSDL,
- SDL__UpdateSDL__response__parameters};
-
-const ford_message_descriptions::ParameterDescription*
- SDL__GetStatusUpdate__request__parameters[] = {NULL};
-const ford_message_descriptions::MessageDescription
- SDL__GetStatusUpdate__request = {"SDL",
- "GetStatusUpdate",
- hmi_apis::messageType::request,
- hmi_apis::FunctionID::SDL_GetStatusUpdate,
- SDL__GetStatusUpdate__request__parameters};
-
-const ford_message_descriptions::ParameterDescription
- SDL__GetStatusUpdate__response__parameter1 = {
- "status", ford_message_descriptions::Enum, true};
-const ford_message_descriptions::ParameterDescription*
- SDL__GetStatusUpdate__response__parameters[] = {
- (const ford_message_descriptions::
- ParameterDescription*)&SDL__GetStatusUpdate__response__parameter1,
- NULL};
-const ford_message_descriptions::MessageDescription
- SDL__GetStatusUpdate__response = {
- "SDL",
- "GetStatusUpdate",
- hmi_apis::messageType::response,
- hmi_apis::FunctionID::SDL_GetStatusUpdate,
- SDL__GetStatusUpdate__response__parameters};
-
-const ford_message_descriptions::ParameterDescription
- SDL__OnStatusUpdate__notification__parameter1 = {
- "status", ford_message_descriptions::Enum, true};
-const ford_message_descriptions::ParameterDescription*
- SDL__OnStatusUpdate__notification__parameters[] = {
- (const ford_message_descriptions::
- ParameterDescription*)&SDL__OnStatusUpdate__notification__parameter1,
- NULL};
-const ford_message_descriptions::MessageDescription
- SDL__OnStatusUpdate__notification = {
- "SDL",
- "OnStatusUpdate",
- hmi_apis::messageType::notification,
- hmi_apis::FunctionID::SDL_OnStatusUpdate,
- SDL__OnStatusUpdate__notification__parameters};
-
-const ford_message_descriptions::ParameterDescription
- SDL__OnSystemError__notification__parameter1 = {
- "error", ford_message_descriptions::Enum, true};
-const ford_message_descriptions::ParameterDescription*
- SDL__OnSystemError__notification__parameters[] = {
- (const ford_message_descriptions::
- ParameterDescription*)&SDL__OnSystemError__notification__parameter1,
- NULL};
-const ford_message_descriptions::MessageDescription
- SDL__OnSystemError__notification = {
- "SDL",
- "OnSystemError",
- hmi_apis::messageType::notification,
- hmi_apis::FunctionID::SDL_OnSystemError,
- SDL__OnSystemError__notification__parameters};
-
-const ford_message_descriptions::ParameterDescription
- SDL__AddStatisticsInfo__notification__parameter1 = {
- "statisticType", ford_message_descriptions::Enum, true};
-const ford_message_descriptions::ParameterDescription*
- SDL__AddStatisticsInfo__notification__parameters[] = {
- (const ford_message_descriptions::
- ParameterDescription*)&SDL__AddStatisticsInfo__notification__parameter1,
- NULL};
-const ford_message_descriptions::MessageDescription
- SDL__AddStatisticsInfo__notification = {
- "SDL",
- "AddStatisticsInfo",
- hmi_apis::messageType::notification,
- hmi_apis::FunctionID::SDL_AddStatisticsInfo,
- SDL__AddStatisticsInfo__notification__parameters};
-
-const ford_message_descriptions::ParameterDescription
- SDL__GetURLS__request__parameter1 = {
- "service", ford_message_descriptions::Integer, true};
-const ford_message_descriptions::ParameterDescription*
- SDL__GetURLS__request__parameters[] = {
- (const ford_message_descriptions::
- ParameterDescription*)&SDL__GetURLS__request__parameter1,
- NULL};
-const ford_message_descriptions::MessageDescription SDL__GetURLS__request = {
- "SDL",
- "GetURLS",
- hmi_apis::messageType::request,
- hmi_apis::FunctionID::SDL_GetURLS,
- SDL__GetURLS__request__parameters};
-
-const ford_message_descriptions::StructDescription
- SDL__GetURLS__response__parameter1_array = {
- {"urls", ford_message_descriptions::Struct, true},
- Structs::Common__ServiceInfo__parameters};
-const ford_message_descriptions::ArrayDescription
- SDL__GetURLS__response__parameter1 = {
- {"urls", ford_message_descriptions::Array, false},
- (const ford_message_descriptions::
- ParameterDescription*)&SDL__GetURLS__response__parameter1_array,
- "(s(bs))"};
-const ford_message_descriptions::ParameterDescription*
- SDL__GetURLS__response__parameters[] = {
- (const ford_message_descriptions::
- ParameterDescription*)&SDL__GetURLS__response__parameter1,
- NULL};
-const ford_message_descriptions::MessageDescription SDL__GetURLS__response = {
- "SDL",
- "GetURLS",
- hmi_apis::messageType::response,
- hmi_apis::FunctionID::SDL_GetURLS,
- SDL__GetURLS__response__parameters};
-
-const ford_message_descriptions::ParameterDescription
- SDL__OnDeviceStateChanged__notification__parameter1 = {
- "deviceState", ford_message_descriptions::Enum, true};
-const ford_message_descriptions::ParameterDescription
- SDL__OnDeviceStateChanged__notification__parameter2 = {
- "deviceInternalId", ford_message_descriptions::String, true};
-const ford_message_descriptions::StructDescription
- SDL__OnDeviceStateChanged__notification__parameter3 = {
- {"deviceId", ford_message_descriptions::Struct, false},
- Structs::Common__DeviceInfo__parameters};
-const ford_message_descriptions::ParameterDescription*
- SDL__OnDeviceStateChanged__notification__parameters[] = {
- (const ford_message_descriptions::
- ParameterDescription*)&SDL__OnDeviceStateChanged__notification__parameter1,
- (const ford_message_descriptions::
- ParameterDescription*)&SDL__OnDeviceStateChanged__notification__parameter2,
- (const ford_message_descriptions::
- ParameterDescription*)&SDL__OnDeviceStateChanged__notification__parameter3,
- NULL};
-const ford_message_descriptions::MessageDescription
- SDL__OnDeviceStateChanged__notification = {
- "SDL",
- "OnDeviceStateChanged",
- hmi_apis::messageType::notification,
- hmi_apis::FunctionID::SDL_OnDeviceStateChanged,
- SDL__OnDeviceStateChanged__notification__parameters};
-
-const ford_message_descriptions::ParameterDescription*
- RC__IsReady__request__parameters[] = {NULL};
-const ford_message_descriptions::MessageDescription RC__IsReady__request = {
- "RC",
- "IsReady",
- hmi_apis::messageType::request,
- hmi_apis::FunctionID::RC_IsReady,
- RC__IsReady__request__parameters};
-
-const ford_message_descriptions::ParameterDescription
- RC__IsReady__response__parameter1 = {
- "available", ford_message_descriptions::Boolean, true};
-const ford_message_descriptions::ParameterDescription*
- RC__IsReady__response__parameters[] = {
- (const ford_message_descriptions::
- ParameterDescription*)&RC__IsReady__response__parameter1,
- NULL};
-const ford_message_descriptions::MessageDescription RC__IsReady__response = {
- "RC",
- "IsReady",
- hmi_apis::messageType::response,
- hmi_apis::FunctionID::RC_IsReady,
- RC__IsReady__response__parameters};
-
-const ford_message_descriptions::ParameterDescription*
- RC__GetCapabilities__request__parameters[] = {NULL};
-const ford_message_descriptions::MessageDescription
- RC__GetCapabilities__request = {"RC",
- "GetCapabilities",
- hmi_apis::messageType::request,
- hmi_apis::FunctionID::RC_GetCapabilities,
- RC__GetCapabilities__request__parameters};
-
-const ford_message_descriptions::StructDescription
- RC__GetCapabilities__response__parameter1 = {
- {"remoteControlCapability", ford_message_descriptions::Struct, false},
- Structs::Common__RemoteControlCapabilities__parameters};
-const ford_message_descriptions::ParameterDescription*
- RC__GetCapabilities__response__parameters[] = {
- (const ford_message_descriptions::
- ParameterDescription*)&RC__GetCapabilities__response__parameter1,
- NULL};
-const ford_message_descriptions::MessageDescription
- RC__GetCapabilities__response = {"RC",
- "GetCapabilities",
- hmi_apis::messageType::response,
- hmi_apis::FunctionID::RC_GetCapabilities,
- RC__GetCapabilities__response__parameters};
-
-const ford_message_descriptions::StructDescription
- RC__SetInteriorVehicleData__request__parameter1 = {
- {"moduleData", ford_message_descriptions::Struct, true},
- Structs::Common__ModuleData__parameters};
-const ford_message_descriptions::ParameterDescription
- RC__SetInteriorVehicleData__request__parameter2 = {
- "appID", ford_message_descriptions::Integer, true};
-const ford_message_descriptions::ParameterDescription*
- RC__SetInteriorVehicleData__request__parameters[] = {
- (const ford_message_descriptions::
- ParameterDescription*)&RC__SetInteriorVehicleData__request__parameter1,
- (const ford_message_descriptions::
- ParameterDescription*)&RC__SetInteriorVehicleData__request__parameter2,
- NULL};
-const ford_message_descriptions::MessageDescription
- RC__SetInteriorVehicleData__request = {
- "RC",
- "SetInteriorVehicleData",
- hmi_apis::messageType::request,
- hmi_apis::FunctionID::RC_SetInteriorVehicleData,
- RC__SetInteriorVehicleData__request__parameters};
-
-const ford_message_descriptions::StructDescription
- RC__SetInteriorVehicleData__response__parameter1 = {
- {"moduleData", ford_message_descriptions::Struct, true},
- Structs::Common__ModuleData__parameters};
-const ford_message_descriptions::ParameterDescription*
- RC__SetInteriorVehicleData__response__parameters[] = {
- (const ford_message_descriptions::
- ParameterDescription*)&RC__SetInteriorVehicleData__response__parameter1,
- NULL};
-const ford_message_descriptions::MessageDescription
- RC__SetInteriorVehicleData__response = {
- "RC",
- "SetInteriorVehicleData",
- hmi_apis::messageType::response,
- hmi_apis::FunctionID::RC_SetInteriorVehicleData,
- RC__SetInteriorVehicleData__response__parameters};
-
-const ford_message_descriptions::ParameterDescription
- RC__GetInteriorVehicleData__request__parameter1 = {
- "moduleType", ford_message_descriptions::Enum, true};
-const ford_message_descriptions::ParameterDescription
- RC__GetInteriorVehicleData__request__parameter2 = {
- "subscribe", ford_message_descriptions::Boolean, false};
-const ford_message_descriptions::ParameterDescription
- RC__GetInteriorVehicleData__request__parameter3 = {
- "appID", ford_message_descriptions::Integer, true};
-const ford_message_descriptions::ParameterDescription*
- RC__GetInteriorVehicleData__request__parameters[] = {
- (const ford_message_descriptions::
- ParameterDescription*)&RC__GetInteriorVehicleData__request__parameter1,
- (const ford_message_descriptions::
- ParameterDescription*)&RC__GetInteriorVehicleData__request__parameter2,
- (const ford_message_descriptions::
- ParameterDescription*)&RC__GetInteriorVehicleData__request__parameter3,
- NULL};
-const ford_message_descriptions::MessageDescription
- RC__GetInteriorVehicleData__request = {
- "RC",
- "GetInteriorVehicleData",
- hmi_apis::messageType::request,
- hmi_apis::FunctionID::RC_GetInteriorVehicleData,
- RC__GetInteriorVehicleData__request__parameters};
-
-const ford_message_descriptions::StructDescription
- RC__GetInteriorVehicleData__response__parameter1 = {
- {"moduleData", ford_message_descriptions::Struct, true},
- Structs::Common__ModuleData__parameters};
-const ford_message_descriptions::ParameterDescription
- RC__GetInteriorVehicleData__response__parameter2 = {
- "isSubscribed", ford_message_descriptions::Boolean, false};
-const ford_message_descriptions::ParameterDescription*
- RC__GetInteriorVehicleData__response__parameters[] = {
- (const ford_message_descriptions::
- ParameterDescription*)&RC__GetInteriorVehicleData__response__parameter1,
- (const ford_message_descriptions::
- ParameterDescription*)&RC__GetInteriorVehicleData__response__parameter2,
- NULL};
-const ford_message_descriptions::MessageDescription
- RC__GetInteriorVehicleData__response = {
- "RC",
- "GetInteriorVehicleData",
- hmi_apis::messageType::response,
- hmi_apis::FunctionID::RC_GetInteriorVehicleData,
- RC__GetInteriorVehicleData__response__parameters};
-
-const ford_message_descriptions::ParameterDescription
- RC__GetInteriorVehicleDataConsent__request__parameter1 = {
- "moduleType", ford_message_descriptions::Enum, true};
-const ford_message_descriptions::ParameterDescription
- RC__GetInteriorVehicleDataConsent__request__parameter2 = {
- "appID", ford_message_descriptions::Integer, true};
-const ford_message_descriptions::ParameterDescription*
- RC__GetInteriorVehicleDataConsent__request__parameters[] = {
- (const ford_message_descriptions::
- ParameterDescription*)&RC__GetInteriorVehicleDataConsent__request__parameter1,
- (const ford_message_descriptions::
- ParameterDescription*)&RC__GetInteriorVehicleDataConsent__request__parameter2,
- NULL};
-const ford_message_descriptions::MessageDescription
- RC__GetInteriorVehicleDataConsent__request = {
- "RC",
- "GetInteriorVehicleDataConsent",
- hmi_apis::messageType::request,
- hmi_apis::FunctionID::RC_GetInteriorVehicleDataConsent,
- RC__GetInteriorVehicleDataConsent__request__parameters};
-
-const ford_message_descriptions::ParameterDescription
- RC__GetInteriorVehicleDataConsent__response__parameter1 = {
- "allowed", ford_message_descriptions::Boolean, true};
-const ford_message_descriptions::ParameterDescription*
- RC__GetInteriorVehicleDataConsent__response__parameters[] = {
- (const ford_message_descriptions::
- ParameterDescription*)&RC__GetInteriorVehicleDataConsent__response__parameter1,
- NULL};
-const ford_message_descriptions::MessageDescription
- RC__GetInteriorVehicleDataConsent__response = {
- "RC",
- "GetInteriorVehicleDataConsent",
- hmi_apis::messageType::response,
- hmi_apis::FunctionID::RC_GetInteriorVehicleDataConsent,
- RC__GetInteriorVehicleDataConsent__response__parameters};
-
-const ford_message_descriptions::StructDescription
- RC__OnInteriorVehicleData__notification__parameter1 = {
- {"moduleData", ford_message_descriptions::Struct, true},
- Structs::Common__ModuleData__parameters};
-const ford_message_descriptions::ParameterDescription*
- RC__OnInteriorVehicleData__notification__parameters[] = {
- (const ford_message_descriptions::
- ParameterDescription*)&RC__OnInteriorVehicleData__notification__parameter1,
- NULL};
-const ford_message_descriptions::MessageDescription
- RC__OnInteriorVehicleData__notification = {
- "RC",
- "OnInteriorVehicleData",
- hmi_apis::messageType::notification,
- hmi_apis::FunctionID::RC_OnInteriorVehicleData,
- RC__OnInteriorVehicleData__notification__parameters};
-
-const ford_message_descriptions::ParameterDescription
- RC__OnRemoteControlSettings__notification__parameter1 = {
- "allowed", ford_message_descriptions::Boolean, false};
-const ford_message_descriptions::ParameterDescription
- RC__OnRemoteControlSettings__notification__parameter2 = {
- "accessMode", ford_message_descriptions::Enum, false};
-const ford_message_descriptions::ParameterDescription*
- RC__OnRemoteControlSettings__notification__parameters[] = {
- (const ford_message_descriptions::
- ParameterDescription*)&RC__OnRemoteControlSettings__notification__parameter1,
- (const ford_message_descriptions::
- ParameterDescription*)&RC__OnRemoteControlSettings__notification__parameter2,
- NULL};
-const ford_message_descriptions::MessageDescription
- RC__OnRemoteControlSettings__notification = {
- "RC",
- "OnRemoteControlSettings",
- hmi_apis::messageType::notification,
- hmi_apis::FunctionID::RC_OnRemoteControlSettings,
- RC__OnRemoteControlSettings__notification__parameters};
-}
-
-namespace ford_message_descriptions {
-
-const MessageDescription* message_descriptions[] = {
- &Buttons__GetCapabilities__request,
- &Buttons__GetCapabilities__response,
- &Buttons__OnButtonEvent__notification,
- &Buttons__OnButtonPress__notification,
- &Buttons__OnButtonSubscription__notification,
- &BasicCommunication__OnReady__notification,
- &BasicCommunication__OnStartDeviceDiscovery__notification,
- &BasicCommunication__OnUpdateDeviceList__notification,
- &BasicCommunication__OnPhoneCall__notification,
- &BasicCommunication__OnEmergencyEvent__notification,
- &BasicCommunication__OnResumeAudioSource__notification,
- &BasicCommunication__OnSDLPersistenceComplete__notification,
- &BasicCommunication__UpdateAppList__request,
- &BasicCommunication__UpdateAppList__response,
- &BasicCommunication__UpdateDeviceList__request,
- &BasicCommunication__UpdateDeviceList__response,
- &BasicCommunication__OnFileRemoved__notification,
- &BasicCommunication__AllowDeviceToConnect__request,
- &BasicCommunication__AllowDeviceToConnect__response,
- &BasicCommunication__OnDeviceChosen__notification,
- &BasicCommunication__OnFindApplications__notification,
- &BasicCommunication__ActivateApp__request,
- &BasicCommunication__ActivateApp__response,
- &BasicCommunication__OnAppActivated__notification,
- &BasicCommunication__OnAppDeactivated__notification,
- &BasicCommunication__OnAppRegistered__notification,
- &BasicCommunication__OnAppUnregistered__notification,
- &BasicCommunication__OnExitApplication__notification,
- &BasicCommunication__OnExitAllApplications__notification,
- &BasicCommunication__OnAwakeSDL__notification,
- &BasicCommunication__MixingAudioSupported__request,
- &BasicCommunication__MixingAudioSupported__response,
- &BasicCommunication__PlayTone__notification,
- &BasicCommunication__DialNumber__request,
- &BasicCommunication__DialNumber__response,
- &BasicCommunication__OnSystemRequest__notification,
- &BasicCommunication__SystemRequest__request,
- &BasicCommunication__SystemRequest__response,
- &BasicCommunication__PolicyUpdate__request,
- &BasicCommunication__PolicyUpdate__response,
- &BasicCommunication__OnSDLClose__notification,
- &BasicCommunication__OnPutFile__notification,
- &BasicCommunication__GetSystemInfo__request,
- &BasicCommunication__GetSystemInfo__response,
- &BasicCommunication__OnSystemInfoChanged__notification,
- &BasicCommunication__OnIgnitionCycleOver__notification,
- &BasicCommunication__DecryptCertificate__request,
- &BasicCommunication__DecryptCertificate__response,
- &BasicCommunication__OnEventChanged__notification,
- &VR__IsReady__request,
- &VR__IsReady__response,
- &VR__Started__notification,
- &VR__Stopped__notification,
- &VR__AddCommand__request,
- &VR__AddCommand__response,
- &VR__DeleteCommand__request,
- &VR__DeleteCommand__response,
- &VR__PerformInteraction__request,
- &VR__PerformInteraction__response,
- &VR__OnCommand__notification,
- &VR__ChangeRegistration__request,
- &VR__ChangeRegistration__response,
- &VR__OnLanguageChange__notification,
- &VR__GetSupportedLanguages__request,
- &VR__GetSupportedLanguages__response,
- &VR__GetLanguage__request,
- &VR__GetLanguage__response,
- &VR__GetCapabilities__request,
- &VR__GetCapabilities__response,
- &TTS__GetCapabilities__request,
- &TTS__GetCapabilities__response,
- &TTS__Started__notification,
- &TTS__Stopped__notification,
- &TTS__IsReady__request,
- &TTS__IsReady__response,
- &TTS__Speak__request,
- &TTS__Speak__response,
- &TTS__StopSpeaking__request,
- &TTS__StopSpeaking__response,
- &TTS__ChangeRegistration__request,
- &TTS__ChangeRegistration__response,
- &TTS__OnLanguageChange__notification,
- &TTS__GetSupportedLanguages__request,
- &TTS__GetSupportedLanguages__response,
- &TTS__GetLanguage__request,
- &TTS__GetLanguage__response,
- &TTS__SetGlobalProperties__request,
- &TTS__SetGlobalProperties__response,
- &TTS__OnResetTimeout__notification,
- &UI__Alert__request,
- &UI__Alert__response,
- &UI__Show__request,
- &UI__Show__response,
- &UI__AddCommand__request,
- &UI__AddCommand__response,
- &UI__DeleteCommand__request,
- &UI__DeleteCommand__response,
- &UI__AddSubMenu__request,
- &UI__AddSubMenu__response,
- &UI__DeleteSubMenu__request,
- &UI__DeleteSubMenu__response,
- &UI__PerformInteraction__request,
- &UI__PerformInteraction__response,
- &UI__SetMediaClockTimer__request,
- &UI__SetMediaClockTimer__response,
- &UI__SetGlobalProperties__request,
- &UI__SetGlobalProperties__response,
- &UI__OnCommand__notification,
- &UI__OnSystemContext__notification,
- &UI__GetCapabilities__request,
- &UI__GetCapabilities__response,
- &UI__ChangeRegistration__request,
- &UI__ChangeRegistration__response,
- &UI__OnLanguageChange__notification,
- &UI__GetSupportedLanguages__request,
- &UI__GetSupportedLanguages__response,
- &UI__GetLanguage__request,
- &UI__GetLanguage__response,
- &UI__OnDriverDistraction__notification,
- &UI__SetAppIcon__request,
- &UI__SetAppIcon__response,
- &UI__SetDisplayLayout__request,
- &UI__SetDisplayLayout__response,
- &UI__ShowCustomForm__request,
- &UI__ShowCustomForm__response,
- &UI__OnKeyboardInput__notification,
- &UI__OnTouchEvent__notification,
- &UI__Slider__request,
- &UI__Slider__response,
- &UI__ScrollableMessage__request,
- &UI__ScrollableMessage__response,
- &UI__PerformAudioPassThru__request,
- &UI__PerformAudioPassThru__response,
- &UI__EndAudioPassThru__request,
- &UI__EndAudioPassThru__response,
- &UI__IsReady__request,
- &UI__IsReady__response,
- &UI__ClosePopUp__request,
- &UI__ClosePopUp__response,
- &UI__OnResetTimeout__notification,
- &UI__OnRecordStart__notification,
- &UI__SendHapticData__request,
- &UI__SendHapticData__response,
- &Navigation__IsReady__request,
- &Navigation__IsReady__response,
- &Navigation__SendLocation__request,
- &Navigation__SendLocation__response,
- &Navigation__DialNumber__request,
- &Navigation__DialNumber__response,
- &Navigation__ShowConstantTBT__request,
- &Navigation__ShowConstantTBT__response,
- &Navigation__AlertManeuver__request,
- &Navigation__AlertManeuver__response,
- &Navigation__UpdateTurnList__request,
- &Navigation__UpdateTurnList__response,
- &Navigation__OnTBTClientState__notification,
- &Navigation__SetVideoConfig__request,
- &Navigation__SetVideoConfig__response,
- &Navigation__StartStream__request,
- &Navigation__StartStream__response,
- &Navigation__StopStream__request,
- &Navigation__StopStream__response,
- &Navigation__StartAudioStream__request,
- &Navigation__StartAudioStream__response,
- &Navigation__StopAudioStream__request,
- &Navigation__StopAudioStream__response,
- &Navigation__OnAudioDataStreaming__notification,
- &Navigation__OnVideoDataStreaming__notification,
- &Navigation__GetWayPoints__request,
- &Navigation__GetWayPoints__response,
- &Navigation__OnWayPointChange__notification,
- &Navigation__SubscribeWayPoints__request,
- &Navigation__SubscribeWayPoints__response,
- &Navigation__UnsubscribeWayPoints__request,
- &Navigation__UnsubscribeWayPoints__response,
- &VehicleInfo__IsReady__request,
- &VehicleInfo__IsReady__response,
- &VehicleInfo__GetVehicleType__request,
- &VehicleInfo__GetVehicleType__response,
- &VehicleInfo__ReadDID__request,
- &VehicleInfo__ReadDID__response,
- &VehicleInfo__GetDTCs__request,
- &VehicleInfo__GetDTCs__response,
- &VehicleInfo__DiagnosticMessage__request,
- &VehicleInfo__DiagnosticMessage__response,
- &VehicleInfo__SubscribeVehicleData__request,
- &VehicleInfo__SubscribeVehicleData__response,
- &VehicleInfo__UnsubscribeVehicleData__request,
- &VehicleInfo__UnsubscribeVehicleData__response,
- &VehicleInfo__GetVehicleData__request,
- &VehicleInfo__GetVehicleData__response,
- &VehicleInfo__OnVehicleData__notification,
- &VehicleInfo__GetGpsData__request,
- &VehicleInfo__GetGpsData__response,
- &VehicleInfo__GetSpeed__request,
- &VehicleInfo__GetSpeed__response,
- &VehicleInfo__GetRpm__request,
- &VehicleInfo__GetRpm__response,
- &VehicleInfo__GetFuelLevel__request,
- &VehicleInfo__GetFuelLevel__response,
- &VehicleInfo__GetFuelLevelState__request,
- &VehicleInfo__GetFuelLevelState__response,
- &VehicleInfo__GetInstantFuelConsumption__request,
- &VehicleInfo__GetInstantFuelConsumption__response,
- &VehicleInfo__GetExternalTemperature__request,
- &VehicleInfo__GetExternalTemperature__response,
- &VehicleInfo__GetVin__request,
- &VehicleInfo__GetVin__response,
- &VehicleInfo__GetPrndl__request,
- &VehicleInfo__GetPrndl__response,
- &VehicleInfo__GetTirePressure__request,
- &VehicleInfo__GetTirePressure__response,
- &VehicleInfo__GetOdometer__request,
- &VehicleInfo__GetOdometer__response,
- &VehicleInfo__GetBeltStatus__request,
- &VehicleInfo__GetBeltStatus__response,
- &VehicleInfo__GetBodyInformation__request,
- &VehicleInfo__GetBodyInformation__response,
- &VehicleInfo__GetDeviceStatus__request,
- &VehicleInfo__GetDeviceStatus__response,
- &VehicleInfo__GetDriverBraking__request,
- &VehicleInfo__GetDriverBraking__response,
- &VehicleInfo__GetWiperStatus__request,
- &VehicleInfo__GetWiperStatus__response,
- &VehicleInfo__GetHeadLampStatus__request,
- &VehicleInfo__GetHeadLampStatus__response,
- &VehicleInfo__GetEngineTorque__request,
- &VehicleInfo__GetEngineTorque__response,
- &VehicleInfo__GetAccPedalPosition__request,
- &VehicleInfo__GetAccPedalPosition__response,
- &VehicleInfo__GetSteeringWheelAngle__request,
- &VehicleInfo__GetSteeringWheelAngle__response,
- &VehicleInfo__GetECallInfo__request,
- &VehicleInfo__GetECallInfo__response,
- &VehicleInfo__GetAirbagStatus__request,
- &VehicleInfo__GetAirbagStatus__response,
- &VehicleInfo__GetEmergencyEvent__request,
- &VehicleInfo__GetEmergencyEvent__response,
- &VehicleInfo__GetClusterModeStatus__request,
- &VehicleInfo__GetClusterModeStatus__response,
- &VehicleInfo__GetMyKey__request,
- &VehicleInfo__GetMyKey__response,
- &VehicleInfo__OnGpsData__notification,
- &VehicleInfo__OnSpeed__notification,
- &VehicleInfo__OnRpm__notification,
- &VehicleInfo__OnFuelLevel__notification,
- &VehicleInfo__OnFuelLevelState__notification,
- &VehicleInfo__OnInstantFuelConsumption__notification,
- &VehicleInfo__OnExternalTemperature__notification,
- &VehicleInfo__OnVin__notification,
- &VehicleInfo__OnPrndl__notification,
- &VehicleInfo__OnTirePressure__notification,
- &VehicleInfo__OnOdometer__notification,
- &VehicleInfo__OnBeltStatus__notification,
- &VehicleInfo__OnBodyInformation__notification,
- &VehicleInfo__OnDeviceStatus__notification,
- &VehicleInfo__OnDriverBraking__notification,
- &VehicleInfo__OnWiperStatus__notification,
- &VehicleInfo__OnHeadLampStatus__notification,
- &VehicleInfo__OnEngineTorque__notification,
- &VehicleInfo__OnAccPedalPosition__notification,
- &VehicleInfo__OnSteeringWheelAngle__notification,
- &VehicleInfo__OnECallInfo__notification,
- &VehicleInfo__OnAirbagStatus__notification,
- &VehicleInfo__OnEmergencyEvent__notification,
- &VehicleInfo__OnClusterModeStatus__notification,
- &VehicleInfo__OnMyKey__notification,
- &VehicleInfo__SubscribeGps__request,
- &VehicleInfo__SubscribeGps__response,
- &VehicleInfo__UnsubscribeGps__request,
- &VehicleInfo__UnsubscribeGps__response,
- &VehicleInfo__SubscribeSpeed__request,
- &VehicleInfo__SubscribeSpeed__response,
- &VehicleInfo__UnsubscribeSpeed__request,
- &VehicleInfo__UnsubscribeSpeed__response,
- &VehicleInfo__SubscribeRpm__request,
- &VehicleInfo__SubscribeRpm__response,
- &VehicleInfo__UnsubscribeRpm__request,
- &VehicleInfo__UnsubscribeRpm__response,
- &VehicleInfo__SubscribeFuelLevel__request,
- &VehicleInfo__SubscribeFuelLevel__response,
- &VehicleInfo__UnsubscribeFuelLevel__request,
- &VehicleInfo__UnsubscribeFuelLevel__response,
- &VehicleInfo__SubscribeFuelLevel_State__request,
- &VehicleInfo__SubscribeFuelLevel_State__response,
- &VehicleInfo__UnsubscribeFuelLevel_State__request,
- &VehicleInfo__UnsubscribeFuelLevel_State__response,
- &VehicleInfo__SubscribeInstantFuelConsumption__request,
- &VehicleInfo__SubscribeInstantFuelConsumption__response,
- &VehicleInfo__UnsubscribeInstantFuelConsumption__request,
- &VehicleInfo__UnsubscribeInstantFuelConsumption__response,
- &VehicleInfo__SubscribeExternalTemperature__request,
- &VehicleInfo__SubscribeExternalTemperature__response,
- &VehicleInfo__UnsubscribeExternalTemperature__request,
- &VehicleInfo__UnsubscribeExternalTemperature__response,
- &VehicleInfo__SubscribePrndl__request,
- &VehicleInfo__SubscribePrndl__response,
- &VehicleInfo__UnsubscribePrndl__request,
- &VehicleInfo__UnsubscribePrndl__response,
- &VehicleInfo__SubscribeVin__request,
- &VehicleInfo__SubscribeVin__response,
- &VehicleInfo__UnsubscribeVin__request,
- &VehicleInfo__UnsubscribeVin__response,
- &VehicleInfo__SubscribeTirePressure__request,
- &VehicleInfo__SubscribeTirePressure__response,
- &VehicleInfo__UnsubscribeTirePressure__request,
- &VehicleInfo__UnsubscribeTirePressure__response,
- &VehicleInfo__SubscribeOdometer__request,
- &VehicleInfo__SubscribeOdometer__response,
- &VehicleInfo__UnsubscribeOdometer__request,
- &VehicleInfo__UnsubscribeOdometer__response,
- &VehicleInfo__SubscribeBeltStatus__request,
- &VehicleInfo__SubscribeBeltStatus__response,
- &VehicleInfo__UnsubscribeBeltStatus__request,
- &VehicleInfo__UnsubscribeBeltStatus__response,
- &VehicleInfo__SubscribeBodyInformation__request,
- &VehicleInfo__SubscribeBodyInformation__response,
- &VehicleInfo__UnsubscribeBodyInformation__request,
- &VehicleInfo__UnsubscribeBodyInformation__response,
- &VehicleInfo__SubscribeDeviceStatus__request,
- &VehicleInfo__SubscribeDeviceStatus__response,
- &VehicleInfo__UnsubscribeDeviceStatus__request,
- &VehicleInfo__UnsubscribeDeviceStatus__response,
- &VehicleInfo__SubscribeDriverBraking__request,
- &VehicleInfo__SubscribeDriverBraking__response,
- &VehicleInfo__UnsubscribeDriverBraking__request,
- &VehicleInfo__UnsubscribeDriverBraking__response,
- &VehicleInfo__SubscribeWiperStatus__request,
- &VehicleInfo__SubscribeWiperStatus__response,
- &VehicleInfo__UnsubscribeWiperStatus__request,
- &VehicleInfo__UnsubscribeWiperStatus__response,
- &VehicleInfo__SubscribeHeadLampStatus__request,
- &VehicleInfo__SubscribeHeadLampStatus__response,
- &VehicleInfo__UnsubscribeHeadLampStatus__request,
- &VehicleInfo__UnsubscribeHeadLampStatus__response,
- &VehicleInfo__SubscribeEngineTorque__request,
- &VehicleInfo__SubscribeEngineTorque__response,
- &VehicleInfo__UnsubscribeEngineTorque__request,
- &VehicleInfo__UnsubscribeEngineTorque__response,
- &VehicleInfo__SubscribeAccPedalPosition__request,
- &VehicleInfo__SubscribeAccPedalPosition__response,
- &VehicleInfo__UnsubscribeAccPedalPosition__request,
- &VehicleInfo__UnsubscribeAccPedalPosition__response,
- &VehicleInfo__SubscribeSteeringWheelAngle__request,
- &VehicleInfo__SubscribeSteeringWheelAngle__response,
- &VehicleInfo__UnsubscribeSteeringWheelAngle__request,
- &VehicleInfo__UnsubscribeSteeringWheelAngle__response,
- &VehicleInfo__SubscribeECallInfo__request,
- &VehicleInfo__SubscribeECallInfo__response,
- &VehicleInfo__UnsubscribeECallInfo__request,
- &VehicleInfo__UnsubscribeECallInfo__response,
- &VehicleInfo__SubscribeAirbagStatus__request,
- &VehicleInfo__SubscribeAirbagStatus__response,
- &VehicleInfo__UnsubscribeAirbagStatus__request,
- &VehicleInfo__UnsubscribeAirbagStatus__response,
- &VehicleInfo__SubscribeEmergencyEvent__request,
- &VehicleInfo__SubscribeEmergencyEvent__response,
- &VehicleInfo__UnsubscribeEmergencyEvent__request,
- &VehicleInfo__UnsubscribeEmergencyEvent__response,
- &VehicleInfo__SubscribeClusterModeStatus__request,
- &VehicleInfo__SubscribeClusterModeStatus__response,
- &VehicleInfo__UnsubscribeClusterModeStatus__request,
- &VehicleInfo__UnsubscribeClusterModeStatus__response,
- &VehicleInfo__SubscribeMyKey__request,
- &VehicleInfo__SubscribeMyKey__response,
- &VehicleInfo__UnsubscribeMyKey__request,
- &VehicleInfo__UnsubscribeMyKey__response,
- &SDL__ActivateApp__request,
- &SDL__ActivateApp__response,
- &SDL__GetUserFriendlyMessage__request,
- &SDL__GetUserFriendlyMessage__response,
- &SDL__OnAllowSDLFunctionality__notification,
- &SDL__OnReceivedPolicyUpdate__notification,
- &SDL__OnPolicyUpdate__notification,
- &SDL__GetListOfPermissions__request,
- &SDL__GetListOfPermissions__response,
- &SDL__OnAppPermissionConsent__notification,
- &SDL__OnAppPermissionChanged__notification,
- &SDL__OnSDLConsentNeeded__notification,
- &SDL__UpdateSDL__request,
- &SDL__UpdateSDL__response,
- &SDL__GetStatusUpdate__request,
- &SDL__GetStatusUpdate__response,
- &SDL__OnStatusUpdate__notification,
- &SDL__OnSystemError__notification,
- &SDL__AddStatisticsInfo__notification,
- &SDL__GetURLS__request,
- &SDL__GetURLS__response,
- &SDL__OnDeviceStateChanged__notification,
- &RC__IsReady__request,
- &RC__IsReady__response,
- &RC__GetCapabilities__request,
- &RC__GetCapabilities__response,
- &RC__SetInteriorVehicleData__request,
- &RC__SetInteriorVehicleData__response,
- &RC__GetInteriorVehicleData__request,
- &RC__GetInteriorVehicleData__response,
- &RC__GetInteriorVehicleDataConsent__request,
- &RC__GetInteriorVehicleDataConsent__response,
- &RC__OnInteriorVehicleData__notification,
- &RC__OnRemoteControlSettings__notification,
- NULL};
-}
diff --git a/src/components/dbus/src/schema.cc b/src/components/dbus/src/schema.cc
deleted file mode 100644
index 3107d9ce6c..0000000000
--- a/src/components/dbus/src/schema.cc
+++ /dev/null
@@ -1,145 +0,0 @@
-/*
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-#include "dbus/schema.h"
-
-#include <algorithm>
-#include <functional>
-
-namespace dbus {
-
-struct Description {
- MessageId id;
- MessageName name;
- MessageType type;
- ListArgs args;
-};
-
-struct IsId : public std::unary_function<const Description*, bool> {
- explicit IsId(MessageId id) : id_(id) {}
- bool operator()(const Description* desc) {
- return desc->id == id_;
- }
-
- private:
- MessageId id_;
-};
-
-struct IsName : public std::unary_function<const Description*, bool> {
- explicit IsName(const MessageName& name) : name_(name) {}
- bool operator()(const Description* desc) {
- return desc->name == name_;
- }
-
- private:
- MessageName name_;
-};
-
-struct IsIdType : public std::unary_function<const Description*, bool> {
- explicit IsIdType(const MessageId& id, const MessageType& type)
- : id_(id), type_(type) {}
- bool operator()(const Description* desc) {
- return desc->id == id_ && desc->type == type_;
- }
-
- private:
- MessageId id_;
- MessageType type_;
-};
-
-struct IsNameType : public std::unary_function<const Description*, bool> {
- explicit IsNameType(const MessageName& name, const MessageType& type)
- : name_(name), type_(type) {}
- bool operator()(const Description* desc) {
- return desc->name == name_ && desc->type == type_;
- }
-
- private:
- MessageName name_;
- MessageType type_;
-};
-
-DBusSchema::DBusSchema(const MessageDescription** array) {
- const MessageDescription** msg = array;
- while (*msg != NULL) {
- Description* desc = new Description();
- desc->id = (*msg)->function_id;
- desc->name = std::make_pair((*msg)->interface, (*msg)->name);
- desc->type = (*msg)->message_type;
- const ParameterDescription** param;
- param = (*msg)->parameters;
- while (*param != NULL) {
- desc->args.push_back(*param);
- param++;
- }
- msgs_.push_back(desc);
- msg++;
- }
-}
-
-MessageName DBusSchema::getMessageName(MessageId id) const {
- Messages::const_iterator it =
- std::find_if(msgs_.begin(), msgs_.end(), IsId(id));
- if (msgs_.end() != it) {
- return (*it)->name;
- }
- return MessageName();
-}
-
-MessageId DBusSchema::getMessageId(const MessageName& name) const {
- Messages::const_iterator it =
- std::find_if(msgs_.begin(), msgs_.end(), IsName(name));
- if (msgs_.end() != it) {
- return (*it)->id;
- }
- return hmi_apis::FunctionID::eType::INVALID_ENUM;
-}
-
-ListArgs DBusSchema::getListArgs(MessageId id, MessageType type) const {
- Messages::const_iterator it =
- std::find_if(msgs_.begin(), msgs_.end(), IsIdType(id, type));
- if (msgs_.end() != it) {
- return (*it)->args;
- }
- return ListArgs();
-}
-
-ListArgs DBusSchema::getListArgs(const MessageName& name,
- MessageType type) const {
- Messages::const_iterator it =
- std::find_if(msgs_.begin(), msgs_.end(), IsNameType(name, type));
- if (msgs_.end() != it) {
- return (*it)->args;
- }
- return ListArgs();
-}
-
-} // namespace dbus_schema
diff --git a/src/components/dbus/test/CMakeLists.txt b/src/components/dbus/test/CMakeLists.txt
deleted file mode 100644
index 914bd2ca84..0000000000
--- a/src/components/dbus/test/CMakeLists.txt
+++ /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(${CMAKE_SOURCE_DIR}/tools/cmake/helpers/sources.cmake)
-
-include_directories (
- ${GMOCK_INCLUDE_DIRECTORY}
- ${COMPONENTS_DIR}/dbus/include/
- ${COMPONENTS_DIR}/dbus/test/include/
-)
-
-#FIXME: exclude some tests
-set (EXCLUDE_PATHS
- dbus_message_controller_test.cc
-)
-
-collect_sources(SOURCES "${CMAKE_CURRENT_SOURCE_DIR}" ${EXCLUDE_PATHS})
-
-set (LIBRARIES
- gmock
- DBus
- formatters
- SmartObjects
-)
-
-create_test(test_DBus_test "${SOURCES}" "${LIBRARIES}")
diff --git a/src/components/dbus/test/dbus_adapter_test.cc b/src/components/dbus/test/dbus_adapter_test.cc
deleted file mode 100644
index 74a6de1aa9..0000000000
--- a/src/components/dbus/test/dbus_adapter_test.cc
+++ /dev/null
@@ -1,59 +0,0 @@
-/*
- * \file test_dbus_adapter.cc
- * \brief
- *
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 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 "dbus/dbus_adapter.h"
-
-using ::dbus::DBusAdapter;
-
-namespace test {
-namespace components {
-namespace dbus {
-
-class DBusAdapterTest : public ::testing::Test {};
-
-TEST_F(DBusAdapterTest, Initialization) {
- const std::string kSdlServiceName = "test.ford.sdl.core";
- const std::string kSdlObjectPath = "/";
- const std::string kHmiServiceName = "test.ford.sdl.hmi";
- const std::string kHmiObjectPath = "/";
- ::dbus::DBusAdapter adapter(
- kSdlServiceName, kSdlObjectPath, kHmiServiceName, kHmiObjectPath);
- EXPECT_TRUE(adapter.Init());
-}
-
-} // namespace dbus
-} // namespace components
-} // namespace test
diff --git a/src/components/dbus/test/dbus_message_controller_test.cc b/src/components/dbus/test/dbus_message_controller_test.cc
deleted file mode 100644
index c06e144f9b..0000000000
--- a/src/components/dbus/test/dbus_message_controller_test.cc
+++ /dev/null
@@ -1,116 +0,0 @@
-/*
- * \file test_dbus_adapter.cc
- * \brief
- *
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include <pthread.h>
-#include <gtest/gtest.h>
-#include <gmock/gmock.h>
-#include "dbus/mock_dbus_message_controller.h"
-#include "dbus/mock_subscriber.h"
-
-using ::testing::_;
-
-namespace test {
-namespace components {
-namespace dbus {
-
-ACTION_P(SignalTest, test) {
- if (test->thread_id != pthread_self()) {
- pthread_mutex_lock(&test->test_mutex);
- pthread_cond_signal(&test->test_cond);
- pthread_mutex_unlock(&test->test_mutex);
- } else {
- test->one_thread = true;
- }
-}
-
-class DBusMessageControllerTest : public ::testing::Test {
- public:
- volatile bool one_thread;
- pthread_t thread_id;
- static pthread_mutex_t test_mutex;
- static pthread_cond_t test_cond;
-
- protected:
- MockDBusMessageController* controller_;
- MockSubscriber* subscriber_;
-
- static void SetUpTestCase() {}
-
- static void TearDownTestCase() {}
-
- virtual void SetUp() {
- const std::string kService = "sdl.core.test_api";
- const std::string kPath = "/dbus_test";
- controller_ = new MockDBusMessageController(kService, kPath);
- subscriber_ = new MockSubscriber(kService, kPath);
- ASSERT_TRUE(controller_->Init());
- ASSERT_TRUE(subscriber_->Start());
- }
-
- void TearDown() OVERRIDE {
- delete controller_;
- delete subscriber_;
- }
-
- bool waitCond(int seconds) {
- if (one_thread)
- return true;
- timespec elapsed;
- clock_gettime(CLOCK_REALTIME, &elapsed);
- elapsed.tv_sec += seconds;
- return pthread_cond_timedwait(&test_cond, &test_mutex, &elapsed) !=
- ETIMEDOUT;
- }
-};
-
-pthread_mutex_t DBusMessageControllerTest::test_mutex;
-pthread_cond_t DBusMessageControllerTest::test_cond;
-
-TEST_F(DBusMessageControllerTest, Receive) {
- std::string text = "Test message for call method DBus";
- EXPECT_CALL(*controller_, Recv(text)).Times(1).WillOnce(SignalTest(this));
- subscriber_->Send(text);
- EXPECT_TRUE(waitCond(1));
-}
-
-TEST_F(DBusMessageControllerTest, DISABLED_Send) {
- const std::string kText = "Test message for signal DBus";
- // EXPECT_CALL(*subscriber_, Receive(kText)).Times(1);
- controller_->Send(kText);
-}
-
-} // namespace dbus
-} // namespace components
-} // namespace test
diff --git a/src/components/dbus/test/include/dbus/mock_dbus_message_controller.h b/src/components/dbus/test/include/dbus/mock_dbus_message_controller.h
deleted file mode 100644
index 30410a6c7e..0000000000
--- a/src/components/dbus/test/include/dbus/mock_dbus_message_controller.h
+++ /dev/null
@@ -1,75 +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_DBUS_TEST_INCLUDE_DBUS_MOCK_DBUS_MESSAGE_CONTROLLER_H_
-#define SRC_COMPONENTS_DBUS_TEST_INCLUDE_DBUS_MOCK_DBUS_MESSAGE_CONTROLLER_H_
-
-#include <pthread.h>
-#include "dbus/dbus_message_controller.h"
-
-namespace test {
-namespace components {
-namespace dbus_test {
-
-class MockDBusMessageController : public ::dbus::DBusMessageController {
- public:
- MOCK_METHOD1(Recv, void(std::string&));
-
- MockDBusMessageController(const std::string& serviceName,
- const std::string& path)
- : DBusMessageController(serviceName, path), thread_() {}
-
- virtual void processResponse(std::string method, Json::Value& root) {}
- virtual void processRequest(Json::Value& root) {}
- virtual void processNotification(Json::Value& root) {}
-
- bool Init() {
- return ::hmi_message_handler::DBusMessageController::Init() &&
- pthread_create(&thread_, 0, &Run, this) == 0;
- }
-
- private:
- pthread_t thread_;
- static void* Run(void* data) {
- if (NULL != data) {
- static_cast<MockDBusMessageController*>(data)
- ->MethodForReceiverThread(nullptr);
- }
- return 0;
- }
-};
-
-} // namespace dbus_test
-} // namespace components
-} // namespace test
-
-#endif // SRC_COMPONENTS_DBUS_TEST_INCLUDE_DBUS_MOCK_DBUS_MESSAGE_CONTROLLER_H_
diff --git a/src/components/dbus/test/include/dbus/mock_subscriber.h b/src/components/dbus/test/include/dbus/mock_subscriber.h
deleted file mode 100644
index b2a369e371..0000000000
--- a/src/components/dbus/test/include/dbus/mock_subscriber.h
+++ /dev/null
@@ -1,62 +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_DBUS_TEST_INCLUDE_DBUS_MOCK_SUBSCRIBER_H_
-#define SRC_COMPONENTS_DBUS_TEST_INCLUDE_DBUS_MOCK_SUBSCRIBER_H_
-
-#include <string>
-
-struct DBusConnection;
-
-namespace test {
-namespace components {
-namespace dbus {
-
-class MockSubscriber {
- public:
- MockSubscriber(const std::string nameService, const std::string path);
- virtual ~MockSubscriber();
- virtual void Receive();
- bool Start();
- void Send(const std::string& message);
-
- private:
- std::string nameService_;
- std::string path_;
- DBusConnection* conn_;
-};
-
-} // namespace dbus
-} // namespace components
-} // namespace test
-
-#endif // SRC_COMPONENTS_DBUS_TEST_INCLUDE_DBUS_MOCK_SUBSCRIBER_H_
diff --git a/src/components/dbus/test/mock_subscriber.cc b/src/components/dbus/test/mock_subscriber.cc
deleted file mode 100644
index 2c5dccaa50..0000000000
--- a/src/components/dbus/test/mock_subscriber.cc
+++ /dev/null
@@ -1,71 +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 "dbus/dbus.h"
-#include "dbus/mock_subscriber.h"
-
-namespace test {
-namespace components {
-namespace dbus {
-
-MockSubscriber::MockSubscriber(const std::string nameService,
- const std::string path)
- : nameService_(nameService), path_(path), conn_(NULL) {}
-
-MockSubscriber::~MockSubscriber() {}
-
-void MockSubscriber::Receive() {}
-
-bool MockSubscriber::Start() {
- DBusError err;
- dbus_error_init(&err);
- conn_ = dbus_bus_get(DBUS_BUS_SESSION, &err);
- if (dbus_error_is_set(&err)) {
- dbus_error_free(&err);
- return false;
- }
-
- std::string rule = "type='signal',interface='" + nameService_ + "'";
- dbus_bus_add_match(conn_, rule.c_str(), &err);
- dbus_connection_flush(conn_);
- if (dbus_error_is_set(&err)) {
- dbus_error_free(&err);
- return false;
- }
- return true;
-}
-
-void MockSubscriber::Send(const std::string& message) {}
-
-} // namespace dbus
-} // namespace components
-} // namespace test
diff --git a/src/components/dbus/test/schema_test.cc b/src/components/dbus/test/schema_test.cc
deleted file mode 100644
index 37831279b9..0000000000
--- a/src/components/dbus/test/schema_test.cc
+++ /dev/null
@@ -1,118 +0,0 @@
-/*
- * \file test_schema.cc
- * \brief
- *
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 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 "dbus/schema.h"
-
-using dbus::DBusSchema;
-using dbus::MessageId;
-using dbus::MessageName;
-using dbus::MessageType;
-using dbus::ListArgs;
-using ford_message_descriptions::ParameterDescription;
-
-namespace test {
-namespace components {
-namespace dbus {
-
-class DBusSchemaTest : public ::testing::Test {
- protected:
- static void SetUpTestCase() {
- schema_ = new DBusSchema(ford_message_descriptions::message_descriptions);
- }
-
- static void TearDownTestCase() {
- delete schema_;
- }
-
- static const DBusSchema* schema_;
- static const int test_negative_value = -3;
-};
-
-const DBusSchema* DBusSchemaTest::schema_ = 0;
-
-TEST_F(DBusSchemaTest, GetName) {
- const MessageId kId = hmi_apis::FunctionID::Buttons_GetCapabilities;
- const MessageName kExpName("Buttons", "GetCapabilities");
- MessageName name = schema_->getMessageName(kId);
- EXPECT_EQ(kExpName, name);
-
- const MessageId kIdWrong = static_cast<const MessageId>(test_negative_value);
- const MessageName kExpNameWrong("", "");
- name = schema_->getMessageName(kIdWrong);
- EXPECT_EQ(kExpNameWrong, name);
-}
-
-TEST_F(DBusSchemaTest, GetId) {
- const MessageName kName("Buttons", "GetCapabilities");
- const MessageId kExpId = hmi_apis::FunctionID::Buttons_GetCapabilities;
- MessageId id = schema_->getMessageId(kName);
- EXPECT_EQ(kExpId, id);
-
- const MessageName kNameWrong("TestInterface", "TestMessage");
- const MessageId kExpIdWrong = hmi_apis::FunctionID::INVALID_ENUM;
- id = schema_->getMessageId(kNameWrong);
- EXPECT_EQ(kExpIdWrong, id);
-}
-
-TEST_F(DBusSchemaTest, GetListArg) {
- const MessageName kName("Buttons", "GetCapabilities");
- const MessageType kType = hmi_apis::messageType::response;
- const MessageId kId = hmi_apis::FunctionID::Buttons_GetCapabilities;
- ListArgs argsName = schema_->getListArgs(kName, kType);
- const ParameterDescription** params =
- ford_message_descriptions::message_descriptions[1]->parameters;
- EXPECT_EQ(params[0], argsName[0]);
- EXPECT_EQ(params[1], argsName[1]);
-
- ListArgs argsId = schema_->getListArgs(kId, kType);
- EXPECT_EQ(params[0], argsId[0]);
- EXPECT_EQ(params[1], argsId[1]);
-
- const MessageId kIdWrong = static_cast<const MessageId>(test_negative_value);
- const MessageName kNameWrong("TestInterface", "TestMessage");
- const MessageType kTypeWrong =
- static_cast<const MessageType>(test_negative_value);
- const ListArgs kExpListWrong;
- argsName = schema_->getListArgs(kNameWrong, kTypeWrong);
- EXPECT_EQ(kExpListWrong, argsName);
-
- argsId = schema_->getListArgs(kIdWrong, kTypeWrong);
- EXPECT_EQ(kExpListWrong, argsId);
-}
-
-} // namespace dbus
-} // namespace components
-} // namespace test
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 95bd4a0505..0000000000
--- a/src/components/functional_module/test/include/mock_application.h
+++ /dev/null
@@ -1,250 +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_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/CMakeLists.txt b/src/components/hmi_message_handler/CMakeLists.txt
index 9fb233b446..8fafee1ac5 100644
--- a/src/components/hmi_message_handler/CMakeLists.txt
+++ b/src/components/hmi_message_handler/CMakeLists.txt
@@ -43,7 +43,6 @@ include_directories (
${MESSAGE_BROKER_INCLUDE_DIRECTORY}
${COMPONENTS_DIR}
${CMAKE_BINARY_DIR}/src/components/
- ${COMPONENTS_DIR}/dbus/include/
${CMAKE_SOURCE_DIR}/
${LOG4CXX_INCLUDE_DIRECTORY}
${COMPONENTS_DIR}/hmi_message_handler/include
@@ -56,14 +55,6 @@ set(PATHS
${CMAKE_CURRENT_SOURCE_DIR}/src
)
-if (HMIADAPTER STREQUAL "dbus")
- set(EXCLUDE_PATHS messagebroker_adapter.cc)
- set(DBUS_ADAPTER DBus)
-else()
- set(EXCLUDE_PATHS dbus_message_adapter.cc)
- set(DBUS_ADAPTER)
-endif ()
-
list(APPEND EXCLUDE_PATHS
mqueue_adapter.cc
)
@@ -72,7 +63,6 @@ collect_sources(SOURCES "${PATHS}" "${EXCLUDE_PATHS}")
set(LIBRARIES
Utils
- ${DBUS_ADAPTER}
${RTLIB}
)
diff --git a/src/components/hmi_message_handler/include/hmi_message_handler/dbus_message_adapter.h b/src/components/hmi_message_handler/include/hmi_message_handler/dbus_message_adapter.h
deleted file mode 100644
index beb7a9ad1d..0000000000
--- a/src/components/hmi_message_handler/include/hmi_message_handler/dbus_message_adapter.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_HMI_MESSAGE_HANDLER_INCLUDE_HMI_MESSAGE_HANDLER_DBUS_MESSAGE_ADAPTER_H_
-#define SRC_COMPONENTS_HMI_MESSAGE_HANDLER_INCLUDE_HMI_MESSAGE_HANDLER_DBUS_MESSAGE_ADAPTER_H_
-
-#include <string>
-#include "hmi_message_handler/hmi_message_adapter_impl.h"
-#include "dbus/dbus_message_controller.h"
-#include "smart_objects/smart_object.h"
-
-namespace hmi_message_handler {
-
-/**
- * \brief adapter for DBus
- */
-class DBusMessageAdapter : public HMIMessageAdapterImpl,
- public dbus::DBusMessageController {
- public:
- typedef utils::SharedPtr<application_manager::Message> MessageSharedPointer;
- explicit DBusMessageAdapter(HMIMessageHandler* hmi_msg_handler);
- ~DBusMessageAdapter();
- void SendMessageToHMI(MessageSharedPointer message);
-
- /**
- * \brief subscribes to signals
- */
- void SubscribeTo();
-
- private:
- static const std::string SDL_SERVICE_NAME;
- static const std::string SDL_OBJECT_PATH;
- static const std::string HMI_SERVICE_NAME;
- static const std::string HMI_OBJECT_PATH;
-
- /**
- * \brief sends request to HMI
- * \param obj request
- */
- void Request(const smart_objects::SmartObject& obj);
-
- /**
- * \brief sends notification to HMI
- * \param obj notification
- */
- void Notification(const smart_objects::SmartObject& obj);
-
- /**
- * \brief sends response to HMI
- * \param obj response
- */
- void Response(const smart_objects::SmartObject& obj);
-
- /**
- * \brief sends error response to HMI
- * \param obj error
- */
- void ErrorResponse(const smart_objects::SmartObject& obj);
-
- /**
- * \brief sends message to core
- * \param obj
- */
- void SendMessageToCore(const smart_objects::SmartObject& obj);
-};
-
-} // namespace hmi_message_handler
-
-#endif // SRC_COMPONENTS_HMI_MESSAGE_HANDLER_INCLUDE_HMI_MESSAGE_HANDLER_DBUS_MESSAGE_ADAPTER_H_
diff --git a/src/components/hmi_message_handler/src/dbus_message_adapter.cc b/src/components/hmi_message_handler/src/dbus_message_adapter.cc
deleted file mode 100644
index 5b0b11e557..0000000000
--- a/src/components/hmi_message_handler/src/dbus_message_adapter.cc
+++ /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.
- */
-
-#include "hmi_message_handler/dbus_message_adapter.h"
-#include <sstream>
-#include "utils/logger.h"
-#include "formatters/CSmartFactory.h"
-#include "smart_objects/smart_object.h"
-
-namespace sos = NsSmartDeviceLink::NsJSONHandler::strings;
-
-namespace hmi_message_handler {
-
-CREATE_LOGGERPTR_GLOBAL(logger_, "HMIMessageHandler")
-
-const std::string DBusMessageAdapter::SDL_SERVICE_NAME = "com.ford.sdl.core";
-const std::string DBusMessageAdapter::SDL_OBJECT_PATH = "/";
-const std::string DBusMessageAdapter::HMI_SERVICE_NAME = "com.ford.sdl.hmi";
-const std::string DBusMessageAdapter::HMI_OBJECT_PATH = "/";
-
-std::vector<std::string>& split(const std::string& s,
- char delim,
- std::vector<std::string>& elems) {
- std::stringstream ss(s);
- std::string item;
- while (std::getline(ss, item, delim)) {
- elems.push_back(item);
- }
- return elems;
-}
-
-DBusMessageAdapter::DBusMessageAdapter(HMIMessageHandler* hmi_msg_handler)
- : HMIMessageAdapterImpl(hmi_msg_handler)
- , DBusMessageController(SDL_SERVICE_NAME,
- SDL_OBJECT_PATH,
- HMI_SERVICE_NAME,
- HMI_OBJECT_PATH) {
- LOG4CXX_INFO(logger_, "Created DBusMessageAdapter");
-}
-
-DBusMessageAdapter::~DBusMessageAdapter() {}
-
-void DBusMessageAdapter::SendMessageToHMI(MessageSharedPointer message) {
- LOG4CXX_INFO(logger_, "DBusMessageAdapter::sendMessageToHMI");
-
- const smart_objects::SmartObject& smart = message->smart_object();
- switch (smart[sos::S_PARAMS][sos::S_MESSAGE_TYPE].asInt()) {
- case hmi_apis::messageType::request:
- Request(smart);
- break;
- case hmi_apis::messageType::notification:
- Notification(smart);
- break;
- case hmi_apis::messageType::response:
- Response(smart);
- break;
- case hmi_apis::messageType::error_response:
- ErrorResponse(smart);
- break;
- case hmi_apis::messageType::INVALID_ENUM:
- default:
- LOG4CXX_WARN(logger_, "Message type is invalid");
- }
-}
-
-void DBusMessageAdapter::SubscribeTo() {
- LOG4CXX_INFO(logger_, "DBusMessageAdapter::subscribeTo");
- DBusMessageController::SubscribeTo("Buttons", "OnButtonEvent");
- DBusMessageController::SubscribeTo("Buttons", "OnButtonPress");
- DBusMessageController::SubscribeTo("UI", "OnCommand");
- DBusMessageController::SubscribeTo("UI", "OnDriverDistraction");
- DBusMessageController::SubscribeTo("UI", "OnSystemContext");
- DBusMessageController::SubscribeTo("UI", "OnLanguageChange");
- DBusMessageController::SubscribeTo("UI", "OnKeyboardInput");
- DBusMessageController::SubscribeTo("UI", "OnTouchEvent");
- DBusMessageController::SubscribeTo("UI", "OnResetTimeout");
- DBusMessageController::SubscribeTo("TTS", "OnResetTimeout");
- DBusMessageController::SubscribeTo("VR", "Started");
- DBusMessageController::SubscribeTo("VR", "Stopped");
- DBusMessageController::SubscribeTo("VR", "OnCommand");
- DBusMessageController::SubscribeTo("VR", "OnLanguageChange");
- DBusMessageController::SubscribeTo("BasicCommunication", "OnReady");
- DBusMessageController::SubscribeTo("BasicCommunication", "OnAppDeactivated");
- DBusMessageController::SubscribeTo("BasicCommunication",
- "OnStartDeviceDiscovery");
- DBusMessageController::SubscribeTo("BasicCommunication",
- "OnUpdateDeviceList");
- DBusMessageController::SubscribeTo("BasicCommunication",
- "OnFindApplications");
- DBusMessageController::SubscribeTo("BasicCommunication", "OnAppActivated");
- DBusMessageController::SubscribeTo("BasicCommunication", "OnExitApplication");
- DBusMessageController::SubscribeTo("BasicCommunication",
- "OnExitAllApplications");
- DBusMessageController::SubscribeTo("BasicCommunication", "OnDeviceChosen");
- DBusMessageController::SubscribeTo("BasicCommunication",
- "OnIgnitionCycleOver");
- DBusMessageController::SubscribeTo("BasicCommunication", "OnSystemRequest");
- DBusMessageController::SubscribeTo("BasicCommunication",
- "OnSystemInfoChanged");
- DBusMessageController::SubscribeTo("TTS", "Started");
- DBusMessageController::SubscribeTo("TTS", "Stopped");
- DBusMessageController::SubscribeTo("TTS", "OnLanguageChange");
- DBusMessageController::SubscribeTo("VehicleInfo", "OnGpsData");
- DBusMessageController::SubscribeTo("VehicleInfo", "OnSpeed");
- DBusMessageController::SubscribeTo("VehicleInfo", "OnRpm");
- DBusMessageController::SubscribeTo("VehicleInfo", "OnFuelLevel");
- DBusMessageController::SubscribeTo("VehicleInfo", "OnFuelLevelState");
- DBusMessageController::SubscribeTo("VehicleInfo", "OnInstantFuelConsumption");
- DBusMessageController::SubscribeTo("VehicleInfo", "OnExternalTemperature");
- DBusMessageController::SubscribeTo("VehicleInfo", "OnVin");
- DBusMessageController::SubscribeTo("VehicleInfo", "OnPrndl");
- DBusMessageController::SubscribeTo("VehicleInfo", "OnTirePressure");
- DBusMessageController::SubscribeTo("VehicleInfo", "OnOdometer");
- DBusMessageController::SubscribeTo("VehicleInfo", "OnBeltStatus");
- DBusMessageController::SubscribeTo("VehicleInfo", "OnBodyInformation");
- DBusMessageController::SubscribeTo("VehicleInfo", "OnDeviceStatus");
- DBusMessageController::SubscribeTo("VehicleInfo", "OnDriverBraking");
- DBusMessageController::SubscribeTo("VehicleInfo", "OnWiperStatus");
- DBusMessageController::SubscribeTo("VehicleInfo", "OnHeadLampStatus");
- DBusMessageController::SubscribeTo("VehicleInfo", "OnEngineTorque");
- DBusMessageController::SubscribeTo("VehicleInfo", "OnAccPedalPosition");
- DBusMessageController::SubscribeTo("VehicleInfo", "OnSteeringWheelAngle");
- DBusMessageController::SubscribeTo("VehicleInfo", "OnMyKey");
- DBusMessageController::SubscribeTo("Navigation", "OnTBTClientState");
- DBusMessageController::SubscribeTo("Navigation", "OnWayPointChange");
- DBusMessageController::SubscribeTo("SDL", "OnAllowSDLFunctionality");
- DBusMessageController::SubscribeTo("SDL", "OnReceivedPolicyUpdate");
- DBusMessageController::SubscribeTo("SDL", "OnPolicyUpdate");
- DBusMessageController::SubscribeTo("SDL", "OnAppPermissionConsent");
- DBusMessageController::SubscribeTo("SDL", "OnSystemError");
- DBusMessageController::SubscribeTo("SDL", "AddStatisticsInfo");
- DBusMessageController::SubscribeTo("SDL", "OnDeviceStateChanged");
-
- LOG4CXX_INFO(logger_, "Subscribed to notifications.");
-}
-
-void DBusMessageAdapter::SendMessageToCore(
- const smart_objects::SmartObject& obj) {
- LOG4CXX_AUTO_TRACE(logger_);
-
- if (!handler()) {
- LOG4CXX_WARN(logger_, "DBusMessageAdapter hasn't handler");
- return;
- }
-
- MessageSharedPointer message = new application_manager::Message(
- protocol_handler::MessagePriority::kDefault); // todo: ykazakov constant
- // is a temp solution to
- // finish
- // merge
- // MessagePriority::FromServiceType(message.servicetype)
- // shall be used instead
- message->set_protocol_version(
- protocol_handler::MajorProtocolVersion::PROTOCOL_VERSION_HMI);
- message->set_smart_object(obj);
- handler()->OnMessageReceived(message);
- LOG4CXX_INFO(logger_, "Successfully sent to observer");
-}
-
-void DBusMessageAdapter::Request(const smart_objects::SmartObject& obj) {
- LOG4CXX_AUTO_TRACE(logger_);
- dbus::MessageId func_id = static_cast<dbus::MessageId>(
- obj[sos::S_PARAMS][sos::S_FUNCTION_ID].asInt());
- dbus::MessageName name = get_schema().getMessageName(func_id);
- uint id = obj[sos::S_PARAMS][sos::S_CORRELATION_ID].asInt();
- MethodCall(id, func_id, name, obj[sos::S_MSG_PARAMS]);
-}
-
-void DBusMessageAdapter::Notification(const smart_objects::SmartObject& obj) {
- LOG4CXX_AUTO_TRACE(logger_);
- dbus::MessageId func_id = static_cast<dbus::MessageId>(
- obj[sos::S_PARAMS][sos::S_FUNCTION_ID].asInt());
- dbus::MessageName name = get_schema().getMessageName(func_id);
- Signal(func_id, name, obj[sos::S_MSG_PARAMS]);
-}
-
-void DBusMessageAdapter::Response(const smart_objects::SmartObject& obj) {
- LOG4CXX_AUTO_TRACE(logger_);
- dbus::MessageId func_id = static_cast<dbus::MessageId>(
- obj[sos::S_PARAMS][sos::S_FUNCTION_ID].asInt());
- dbus::MessageName name = get_schema().getMessageName(func_id);
- uint id = obj[sos::S_PARAMS][sos::S_CORRELATION_ID].asInt();
- MethodReturn(id, func_id, name, obj[sos::S_MSG_PARAMS]);
-}
-
-void DBusMessageAdapter::ErrorResponse(const smart_objects::SmartObject& obj) {
- LOG4CXX_DEBUG(logger_, "Error");
- std::string error = obj[sos::S_PARAMS][sos::kCode].asString();
- std::string description = obj[sos::S_PARAMS][sos::kMessage].asString();
- uint id = obj[sos::S_PARAMS][sos::S_CORRELATION_ID].asInt();
- Error(id, error, description);
-}
-
-} // namespace hmi_message_handler
diff --git a/src/components/hmi_message_handler/src/websocket_session.cc b/src/components/hmi_message_handler/src/websocket_session.cc
index 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 f6f06bd7cd..39fc3c7ae6 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,23 +317,24 @@ 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;
+
+ /**
+ * @brief Checks if required transport for resumption is available
+ *
+ * The required transport can be configured through smartDeviceLink.ini file.
+ *
+ * @param application an instance of the app to check
+ * @return true if the app is connected through one of the required
+ * transports, false otherwise
+ */
+ virtual bool CheckResumptionRequiredTransportAvailable(
+ ApplicationConstSharedPtr application) const = 0;
+
/**
* @brief hmi_capabilities return capabilities of hmi
* @return capabilities of hmi
@@ -380,6 +390,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 +446,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 +478,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 +630,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
@@ -690,9 +710,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)
diff --git a/src/components/include/application_manager/application_manager_settings.h b/src/components/include/application_manager/application_manager_settings.h
index e745a831c6..8f9d7496c8 100644
--- a/src/components/include/application_manager/application_manager_settings.h
+++ b/src/components/include/application_manager/application_manager_settings.h
@@ -38,6 +38,8 @@
#include <stdint.h>
#include <string>
+#include <map>
+#include <vector>
namespace application_manager {
class ApplicationManagerSettings : public RequestControlerSettings,
@@ -87,6 +89,13 @@ class ApplicationManagerSettings : public RequestControlerSettings,
virtual const uint32_t& app_resuming_timeout() const = 0;
virtual uint16_t attempts_to_open_resumption_db() const = 0;
virtual uint16_t open_attempt_timeout_ms_resumption_db() const = 0;
+ virtual const std::map<std::string, std::vector<std::string> >&
+ transport_required_for_resumption_map() const = 0;
+ virtual const std::string& navigation_lowbandwidth_resumption_level()
+ const = 0;
+ virtual const std::string& projection_lowbandwidth_resumption_level()
+ const = 0;
+ virtual const std::string& media_lowbandwidth_resumption_level() const = 0;
virtual void set_config_file_name(const std::string& fileName) = 0;
virtual const std::pair<uint32_t, int32_t>& start_stream_retry_amount()
const = 0;
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 d48c7307b9..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"
@@ -471,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
@@ -536,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/connection_handler/connection_handler.h b/src/components/include/connection_handler/connection_handler.h
index 1fcf5e4477..bfaacf5fc1 100644
--- a/src/components/include/connection_handler/connection_handler.h
+++ b/src/components/include/connection_handler/connection_handler.h
@@ -40,6 +40,7 @@
#include "connection_handler/connection.h"
#include "connection_handler/devices_discovery_starter.h"
#include "utils/macro.h"
+#include "utils/data_accessor.h"
/**
* \namespace connection_handler
@@ -51,6 +52,14 @@ enum CloseSessionReason { kCommon = 0, kFlood, kMalformed, kUnauthorizedApp };
class ConnectionHandlerObserver;
+// The SessionConnectionMap keeps track of the primary and secondary transports
+// associated with a session ID
+typedef struct {
+ transport_manager::ConnectionUID primary_transport;
+ transport_manager::ConnectionUID secondary_transport;
+} SessionTransports;
+typedef std::map<uint8_t, SessionTransports> SessionConnectionMap;
+
/**
* \class ConnectionHandler
* \brief SmartDeviceLink ConnectionHandler interface class
@@ -183,21 +192,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.
*
@@ -217,6 +211,43 @@ class ConnectionHandler {
virtual DevicesDiscoveryStarter& get_device_discovery_starter() = 0;
/**
+ * \brief Add a session. This is meant to be called from Connection class.
+ * \param primary_transport_id the primary connection ID to associate with the
+ * newly created session
+ * \return new session id, or 0 if failed
+ **/
+ virtual uint32_t AddSession(
+ const transport_manager::ConnectionUID primary_transport_id) = 0;
+
+ /**
+ * \brief Remove a session. This is meant to be called from Connection class.
+ * \param session_id ID of the session to remove
+ * \return true if successful, false otherwise
+ **/
+ virtual bool RemoveSession(uint8_t session_id) = 0;
+
+ virtual DataAccessor<SessionConnectionMap> session_connection_map() = 0;
+
+ /**
+ * \brief Associate a secondary transport ID with a session
+ * \param session_id the session ID
+ * \param connection_id the new secondary connection ID to associate with the
+ * session
+ * \return the SessionTransports (newly) associated with the session
+ **/
+ virtual SessionTransports SetSecondaryTransportID(
+ uint8_t session_id,
+ transport_manager::ConnectionUID secondary_transport_id) = 0;
+
+ /**
+ * \brief Retrieve the session transports associated with a session
+ * \param session_id the session ID
+ * \return the SessionTransports associated with the session
+ **/
+ virtual const SessionTransports GetSessionTransports(
+ uint8_t session_id) const = 0;
+
+ /**
* \brief Invoked when observer's OnServiceStartedCallback is completed
* \param session_key the key of started session passed to
* OnServiceStartedCallback().
@@ -232,6 +263,28 @@ class ConnectionHandler {
bool result,
std::vector<std::string>& rejected_params) = 0;
+ /**
+ * \brief Called when secondary transport with given session ID is established
+ * \param primary_connection_handle Set to identifier of primary connection
+ * \param secondary_connection_handle Identifier of secondary connection
+ * \param session_id session ID taken from Register Secondary Transport frame
+ * \return true if successful
+ **/
+ virtual bool OnSecondaryTransportStarted(
+ transport_manager::ConnectionUID& primary_connection_handle,
+ const transport_manager::ConnectionUID secondary_connection_handle,
+ const uint8_t session_id) = 0;
+
+ /**
+ * \brief Called when secondary transport shuts down
+ * \param primary_connection_handle Identifier of primary connection
+ * \param secondary_connection_handle Identifier of secondary connection
+ * transport
+ **/
+ virtual void OnSecondaryTransportEnded(
+ const transport_manager::ConnectionUID primary_connection_handle,
+ const transport_manager::ConnectionUID secondary_connection_handle) = 0;
+
protected:
/**
* \brief Destructor
diff --git a/src/components/include/connection_handler/connection_handler_observer.h b/src/components/include/connection_handler/connection_handler_observer.h
index b4c04c17c9..2f4ee94449 100644
--- a/src/components/include/connection_handler/connection_handler_observer.h
+++ b/src/components/include/connection_handler/connection_handler_observer.h
@@ -157,6 +157,23 @@ class ConnectionHandlerObserver {
virtual security_manager::SSLContext::HandshakeContext GetHandshakeContext(
uint32_t key) const = 0;
#endif // ENABLE_SECURITY
+
+ /**
+ * \brief Called when secondary transport for a particular app is started.
+ * \param device_handle Device identifier on which the secondary transport is
+ * started.
+ * \param session_key session ID representing the app
+ */
+ virtual void OnSecondaryTransportStartedCallback(
+ const connection_handler::DeviceHandle device_handle,
+ const int32_t session_key) = 0;
+
+ /**
+ * \brief Called when secondary transport for a particular app is terminated.
+ * \param session_key session ID representing the app
+ */
+ virtual void OnSecondaryTransportEndedCallback(const int32_t session_key) = 0;
+
protected:
/**
* \brief Destructor
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 7970d525c5..83038472cd 100644
--- a/src/components/include/policy/policy_external/policy/policy_manager.h
+++ b/src/components/include/policy/policy_external/policy/policy_manager.h
@@ -42,10 +42,7 @@
#include "policy/policy_listener.h"
#include "policy/usage_statistics/statistics_manager.h"
#include "policy/cache_manager_interface.h"
-
-#ifdef SDL_REMOTE_CONTROL
#include "policy/access_remote.h"
-#endif // SDL_REMOTE_CONTROL
namespace policy {
class PolicySettings;
@@ -565,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
@@ -614,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 84d48a691e..bd29b2942e 100644
--- a/src/components/include/policy/policy_regular/policy/policy_manager.h
+++ b/src/components/include/policy/policy_regular/policy/policy_manager.h
@@ -42,10 +42,7 @@
#include "policy/policy_listener.h"
#include "policy/usage_statistics/statistics_manager.h"
#include "policy/cache_manager_interface.h"
-
-#ifdef SDL_REMOTE_CONTROL
#include "policy/access_remote.h"
-#endif // SDL_REMOTE_CONTROL
namespace policy {
class PolicySettings;
@@ -543,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
@@ -593,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/bson_object_keys.h b/src/components/include/protocol/bson_object_keys.h
index 6f80aeec2b..56bd5cebd6 100644
--- a/src/components/include/protocol/bson_object_keys.h
+++ b/src/components/include/protocol/bson_object_keys.h
@@ -42,6 +42,12 @@ extern const char* height;
extern const char* width;
extern const char* video_protocol;
extern const char* video_codec;
+extern const char* secondary_transports;
+extern const char* audio_service_transports;
+extern const char* video_service_transports;
+extern const char* tcp_ip_address;
+extern const char* tcp_port;
+extern const char* reason;
} // namespace strings
diff --git a/src/components/include/protocol/common.h b/src/components/include/protocol/common.h
index 00d57a9bf5..1c95020a96 100644
--- a/src/components/include/protocol/common.h
+++ b/src/components/include/protocol/common.h
@@ -167,6 +167,22 @@ enum {
*/
FRAME_DATA_END_SERVICE_NACK = 0x06,
/**
+ *\brief Register Secondary Transport frame
+ */
+ FRAME_DATA_REGISTER_SECONDARY_TRANSPORT = 0x07,
+ /**
+ *\brief Register Secondary Transport acknowledgement frame
+ */
+ FRAME_DATA_REGISTER_SECONDARY_TRANSPORT_ACK = 0x08,
+ /**
+ *\brief Register Secondary Transport not acknowledgement frame
+ */
+ FRAME_DATA_REGISTER_SECONDARY_TRANSPORT_NACK = 0x09,
+ /**
+ *\brief Transport Event Update frame
+ */
+ FRAME_DATA_TRANSPORT_EVENT_UPDATE = 0xFD,
+ /**
*\brief Service data ACK frame
*/
FRAME_DATA_SERVICE_DATA_ACK = 0xFE,
diff --git a/src/components/include/protocol_handler/protocol_handler.h b/src/components/include/protocol_handler/protocol_handler.h
index 6aafd7d53f..bb79964b12 100644
--- a/src/components/include/protocol_handler/protocol_handler.h
+++ b/src/components/include/protocol_handler/protocol_handler.h
@@ -100,9 +100,23 @@ class ProtocolHandler {
*/
virtual void SendEndSession(int32_t connection_id, uint8_t session_id) = 0;
- virtual void SendEndService(int32_t connection_id,
+ /**
+ * \brief Sends ending session to mobile application
+ * \param primary_connection_id Identifier of connection within which
+ * service exists
+ * \param connection_id Identifier of the actual transport for the service
+ * \param session_id ID of session to be ended
+ */
+ virtual void SendEndService(int32_t primary_connection_id,
+ 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/protocol_handler_settings.h b/src/components/include/protocol_handler/protocol_handler_settings.h
index e1107cb2a9..c4f9bb6420 100644
--- a/src/components/include/protocol_handler/protocol_handler_settings.h
+++ b/src/components/include/protocol_handler/protocol_handler_settings.h
@@ -51,6 +51,28 @@ class ProtocolHandlerSettings {
*/
virtual const std::vector<int>& force_unprotected_service() const = 0;
#endif // ENABLE_SECURITY
+
+ /**
+ * @brief Returns true multiple transports is enabled
+ */
+ virtual const bool multiple_transports_enabled() const = 0;
+
+ /**
+ * @brief Returns list of secondary transports available
+ * for the named primary transport
+ */
+ virtual const std::vector<std::string>& secondary_transports_for_bluetooth()
+ const = 0;
+ virtual const std::vector<std::string>& secondary_transports_for_usb()
+ const = 0;
+ virtual const std::vector<std::string>& secondary_transports_for_wifi()
+ const = 0;
+
+ /**
+ * @brief Returns list of allowed transports for the named service
+ */
+ virtual const std::vector<std::string>& audio_service_transports() const = 0;
+ virtual const std::vector<std::string>& video_service_transports() const = 0;
};
} // namespace protocol_handler
#endif // SRC_COMPONENTS_INCLUDE_PROTOCOL_HANDLER_PROTOCOL_HANDLER_SETTINGS_H_
diff --git a/src/components/include/protocol_handler/session_observer.h b/src/components/include/protocol_handler/session_observer.h
index 3482c6569c..d50b1e694e 100644
--- a/src/components/include/protocol_handler/session_observer.h
+++ b/src/components/include/protocol_handler/session_observer.h
@@ -59,6 +59,7 @@ enum { HASH_ID_NOT_SUPPORTED = 0, HASH_ID_WRONG = 0xFFFF0000 };
* @brief Struct with data containing attributes of starting session
**/
struct SessionContext {
+ transport_manager::ConnectionUID primary_connection_id_;
transport_manager::ConnectionUID connection_id_;
uint8_t initial_session_id_;
uint8_t new_session_id_;
@@ -66,23 +67,24 @@ struct SessionContext {
uint32_t hash_id_;
bool is_protected_;
bool is_new_service_;
- bool is_ptu_required_;
/**
* @brief Constructor
*/
SessionContext()
- : connection_id_(0)
+ : primary_connection_id_(0)
+ , connection_id_(0)
, initial_session_id_(0)
, new_session_id_(0)
, 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
+ * @param primary_connection_id Connection identifier of the primary
+ * connection in which the session is started
* @param connection_id_ Connection identifier within which session is
* started.
* @param session_id Session ID specified to OnSessionStartedCallback()
@@ -93,20 +95,21 @@ struct SessionContext {
* @param is_protected Whether service will be protected
* @param is_new_service Whether service was already established
**/
- SessionContext(transport_manager::ConnectionUID connection_id,
+ SessionContext(transport_manager::ConnectionUID primary_connection_id,
+ transport_manager::ConnectionUID connection_id,
uint8_t session_id,
uint8_t new_session_id,
protocol_handler::ServiceType service_type,
uint32_t hash_id,
const bool is_protected)
- : connection_id_(connection_id)
+ : primary_connection_id_(primary_connection_id)
+ , connection_id_(connection_id)
, initial_session_id_(session_id)
, new_session_id_(new_session_id)
, service_type_(service_type)
, hash_id_(hash_id)
, is_protected_(is_protected)
- , is_new_service_(false)
- , is_ptu_required_(false) {}
+ , is_new_service_(false) {}
};
/**
@@ -208,6 +211,24 @@ class SessionObserver {
virtual void OnMalformedMessageCallback(const uint32_t& connection_key) = 0;
/**
+ * @brief Converts connection handle to transport type string used in
+ * smartDeviceLink.ini file, e.g. "TCP_WIFI"
+ * @param connection_handle A connection identifier
+ * @return string representation of the transport of the device
+ */
+ virtual const std::string TransportTypeProfileStringFromConnHandle(
+ transport_manager::ConnectionUID connection_handle) const = 0;
+
+ /**
+ * @brief Converts device handle to transport type string used in
+ * smartDeviceLink.ini file, e.g. "TCP_WIFI"
+ * @param device_handle A device handle
+ * @return string representation of the transport of the device
+ */
+ virtual const std::string TransportTypeProfileStringFromDeviceHandle(
+ transport_manager::DeviceHandle device_handle) const = 0;
+
+ /**
* \brief Creates unique identifier of session (can be used as hash)
* from given connection identifier
* within which session exists and session number.
@@ -231,20 +252,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 bc1c0d08d2..0bb759fc1f 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(
@@ -143,6 +131,9 @@ class MockApplicationManager : public application_manager::ApplicationManager {
MOCK_METHOD0(hmi_capabilities, application_manager::HMICapabilities&());
MOCK_CONST_METHOD0(hmi_capabilities,
const application_manager::HMICapabilities&());
+ MOCK_CONST_METHOD1(
+ CheckResumptionRequiredTransportAvailable,
+ bool(application_manager::ApplicationConstSharedPtr application));
MOCK_METHOD2(ProcessQueryApp,
void(const smart_objects::SmartObject& sm_object,
const uint32_t connection_key));
@@ -158,6 +149,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 +166,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 +178,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 +231,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));
@@ -311,14 +310,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_application_manager_settings.h b/src/components/include/test/application_manager/mock_application_manager_settings.h
index 25cf994566..735539156a 100644
--- a/src/components/include/test/application_manager/mock_application_manager_settings.h
+++ b/src/components/include/test/application_manager/mock_application_manager_settings.h
@@ -95,6 +95,13 @@ class MockApplicationManagerSettings
MOCK_CONST_METHOD0(app_resuming_timeout, const uint32_t&());
MOCK_CONST_METHOD0(attempts_to_open_resumption_db, uint16_t());
MOCK_CONST_METHOD0(open_attempt_timeout_ms_resumption_db, uint16_t());
+ MOCK_CONST_METHOD0(transport_required_for_resumption_map,
+ std::map<std::string, std::vector<std::string> >&());
+ MOCK_CONST_METHOD0(navigation_lowbandwidth_resumption_level,
+ const std::string&());
+ MOCK_CONST_METHOD0(projection_lowbandwidth_resumption_level,
+ const std::string&());
+ MOCK_CONST_METHOD0(media_lowbandwidth_resumption_level, const std::string&());
MOCK_METHOD1(set_config_file_name, void(const std::string& fileName));
// The following line won't really compile, as the return
// type has multiple template arguments. To fix it, use a
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/policies/mock_policy_handler_interface.h b/src/components/include/test/application_manager/policies/mock_policy_handler_interface.h
index dfd537c678..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
@@ -239,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,
@@ -270,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/connection_handler/mock_connection_handler.h b/src/components/include/test/connection_handler/mock_connection_handler.h
index f1416c999e..2de3a0f9a7 100644
--- a/src/components/include/test/connection_handler/mock_connection_handler.h
+++ b/src/components/include/test/connection_handler/mock_connection_handler.h
@@ -51,6 +51,7 @@ using connection_handler::ConnectionHandle;
using connection_handler::DeviceHandle;
using connection_handler::CloseSessionReason;
using connection_handler::DevicesDiscoveryStarter;
+using connection_handler::SessionTransports;
class MockConnectionHandler : public connection_handler::ConnectionHandler {
public:
@@ -84,13 +85,6 @@ class MockConnectionHandler : public connection_handler::ConnectionHandler {
void(uint32_t connection_key, uint8_t session_id));
MOCK_METHOD2(BindProtocolVersionWithSession,
void(uint32_t connection_key, uint8_t protocol_version));
-
- // DEPRECATED
- MOCK_CONST_METHOD4(GetDataOnSessionKey,
- int32_t(uint32_t key,
- uint32_t* app_id,
- std::list<int32_t>* sessions_list,
- uint32_t* device_id));
MOCK_CONST_METHOD4(GetDataOnSessionKey,
int32_t(uint32_t key,
uint32_t* app_id,
@@ -103,10 +97,31 @@ class MockConnectionHandler : public connection_handler::ConnectionHandler {
MOCK_METHOD0(get_device_discovery_starter, DevicesDiscoveryStarter&());
MOCK_CONST_METHOD1(GetConnectedDevicesMAC,
void(std::vector<std::string>& macs));
+ MOCK_METHOD1(
+ AddSession,
+ uint32_t(const transport_manager::ConnectionUID primary_transport_id));
+ MOCK_METHOD1(RemoveSession, bool(uint8_t session_id));
+ MOCK_METHOD0(session_connection_map,
+ DataAccessor<connection_handler::SessionConnectionMap>());
+ MOCK_METHOD2(SetSecondaryTransportID,
+ SessionTransports(
+ uint8_t session_id,
+ transport_manager::ConnectionUID secondary_transport_id));
+ MOCK_CONST_METHOD1(GetSessionTransports,
+ const SessionTransports(uint8_t session_id));
MOCK_METHOD3(NotifyServiceStartedResult,
void(uint32_t session_key,
bool result,
std::vector<std::string>& rejected_params));
+ MOCK_METHOD3(
+ OnSecondaryTransportStarted,
+ bool(transport_manager::ConnectionUID& primary_connection_handle,
+ const transport_manager::ConnectionUID secondary_connection_handle,
+ const uint8_t session_id));
+ MOCK_METHOD2(
+ OnSecondaryTransportEnded,
+ void(const transport_manager::ConnectionUID primary_connection_handle,
+ const transport_manager::ConnectionUID secondary_connection_handle));
};
} // namespace connection_handler_test
diff --git a/src/components/include/test/connection_handler/mock_connection_handler_observer.h b/src/components/include/test/connection_handler/mock_connection_handler_observer.h
index a96498028d..ede08a9a4a 100644
--- a/src/components/include/test/connection_handler/mock_connection_handler_observer.h
+++ b/src/components/include/test/connection_handler/mock_connection_handler_observer.h
@@ -74,6 +74,11 @@ class MockConnectionHandlerObserver
const connection_handler::Device& device_to));
MOCK_METHOD1(OnDeviceSwitchingFinish, void(const std::string& device_uid));
MOCK_CONST_METHOD1(CheckAppIsNavi, bool(const uint32_t app_id));
+ MOCK_METHOD2(OnSecondaryTransportStartedCallback,
+ void(const connection_handler::DeviceHandle device_handle,
+ const int32_t session_key));
+ MOCK_METHOD1(OnSecondaryTransportEndedCallback,
+ void(const int32_t session_key));
};
} // namespace connection_handler_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 96e484acae..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));
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 cf20dcb666..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,
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 0b8823d307..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());
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..13c0264cb8 100644
--- a/src/components/include/test/protocol_handler/mock_protocol_handler.h
+++ b/src/components/include/test/protocol_handler/mock_protocol_handler.h
@@ -55,8 +55,9 @@ class MockProtocolHandler : public ::protocol_handler::ProtocolHandler {
void(uint32_t connection_key, int32_t number_of_frames));
MOCK_METHOD2(SendHeartBeat, void(int32_t connection_id, uint8_t session_id));
MOCK_METHOD2(SendEndSession, void(int32_t connection_id, uint8_t session_id));
- MOCK_METHOD3(SendEndService,
- void(int32_t connection_id,
+ MOCK_METHOD4(SendEndService,
+ void(int32_t primary_connection_id,
+ int32_t connection_id,
uint8_t session_id,
uint8_t service_type));
MOCK_CONST_METHOD0(get_settings,
@@ -72,6 +73,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/protocol_handler/mock_protocol_handler_settings.h b/src/components/include/test/protocol_handler/mock_protocol_handler_settings.h
index 8ddeded889..2ed9c47e9d 100644
--- a/src/components/include/test/protocol_handler/mock_protocol_handler_settings.h
+++ b/src/components/include/test/protocol_handler/mock_protocol_handler_settings.h
@@ -60,6 +60,17 @@ class MockProtocolHandlerSettings
MOCK_CONST_METHOD0(force_protected_service, const std::vector<int>&());
MOCK_CONST_METHOD0(force_unprotected_service, const std::vector<int>&());
#endif
+ MOCK_CONST_METHOD0(multiple_transports_enabled, const bool());
+ MOCK_CONST_METHOD0(secondary_transports_for_bluetooth,
+ const std::vector<std::string>&());
+ MOCK_CONST_METHOD0(secondary_transports_for_usb,
+ const std::vector<std::string>&());
+ MOCK_CONST_METHOD0(secondary_transports_for_wifi,
+ const std::vector<std::string>&());
+ MOCK_CONST_METHOD0(audio_service_transports,
+ const std::vector<std::string>&());
+ MOCK_CONST_METHOD0(video_service_transports,
+ const std::vector<std::string>&());
};
} // namespace protocol_handler_test
diff --git a/src/components/include/test/protocol_handler/mock_session_observer.h b/src/components/include/test/protocol_handler/mock_session_observer.h
index ae32f35948..c0612ce137 100644
--- a/src/components/include/test/protocol_handler/mock_session_observer.h
+++ b/src/components/include/test/protocol_handler/mock_session_observer.h
@@ -76,6 +76,12 @@ class MockSessionObserver : public ::protocol_handler::SessionObserver {
void(const uint32_t& connection_key));
MOCK_METHOD1(OnMalformedMessageCallback,
void(const uint32_t& connection_key));
+ MOCK_CONST_METHOD1(
+ TransportTypeProfileStringFromConnHandle,
+ const std::string(transport_manager::ConnectionUID connection_handle));
+ MOCK_CONST_METHOD1(
+ TransportTypeProfileStringFromDeviceHandle,
+ const std::string(transport_manager::DeviceHandle device_handle));
MOCK_CONST_METHOD2(
KeyFromPair,
uint32_t(transport_manager::ConnectionUID connection_handle,
@@ -89,11 +95,6 @@ class MockSessionObserver : public ::protocol_handler::SessionObserver {
uint32_t* app_id,
std::list<int32_t>* sessions_list,
transport_manager::DeviceHandle* device_id));
- DEPRECATED MOCK_CONST_METHOD4(GetDataOnSessionKey,
- int32_t(uint32_t key,
- uint32_t* app_id,
- std::list<int32_t>* sessions_list,
- uint32_t* device_id));
MOCK_CONST_METHOD5(GetDataOnDeviceID,
int32_t(transport_manager::DeviceHandle device_handle,
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/transport_manager/mock_transport_manager_listener.h b/src/components/include/test/transport_manager/mock_transport_manager_listener.h
index f4c4fdcf68..133dabe732 100644
--- a/src/components/include/test/transport_manager/mock_transport_manager_listener.h
+++ b/src/components/include/test/transport_manager/mock_transport_manager_listener.h
@@ -85,6 +85,8 @@ class MockTransportManagerListener : public TransportManagerListener {
void(const DeviceUID& device_uid_from,
const DeviceUID& device_uid_to));
MOCK_METHOD1(OnDeviceSwitchingFinish, void(const DeviceUID& device_uid));
+ MOCK_METHOD1(OnTransportConfigUpdated,
+ void(const std::map<std::string, std::string>& configs));
};
} // namespace transport_manager_test
diff --git a/src/components/include/test/transport_manager/mock_transport_manager_settings.h b/src/components/include/test/transport_manager/mock_transport_manager_settings.h
index 88112df003..3e7c8f36f7 100644
--- a/src/components/include/test/transport_manager/mock_transport_manager_settings.h
+++ b/src/components/include/test/transport_manager/mock_transport_manager_settings.h
@@ -61,6 +61,8 @@ class MockTransportManagerSettings
MOCK_CONST_METHOD0(iap_hub_connection_wait_timeout, uint32_t());
MOCK_CONST_METHOD0(app_transport_change_timer, uint32_t());
MOCK_CONST_METHOD0(app_transport_change_timer_addition, uint32_t());
+ MOCK_CONST_METHOD0(transport_manager_tcp_adapter_network_interface,
+ std::string&());
};
} // namespace transport_manager_test
diff --git a/src/components/include/test/transport_manager/transport_adapter/mock_transport_adapter.h b/src/components/include/test/transport_manager/transport_adapter/mock_transport_adapter.h
index c37c41d4f8..eff0abdcd3 100644
--- a/src/components/include/test/transport_manager/transport_adapter/mock_transport_adapter.h
+++ b/src/components/include/test/transport_manager/transport_adapter/mock_transport_adapter.h
@@ -103,6 +103,8 @@ class MockTransportAdapter
void(const ::transport_manager::DeviceUID& device_handle));
MOCK_CONST_METHOD0(GetSwitchableDevices,
transport_manager::SwitchableDevices());
+ MOCK_CONST_METHOD0(GetTransportConfiguration,
+ transport_manager::transport_adapter::TransportConfig());
#ifdef TELEMETRY_MONITOR
MOCK_METHOD0(GetTelemetryObserver,
::transport_manager::TMTelemetryObserver*());
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/transport_manager/transport_adapter/transport_adapter.h b/src/components/include/transport_manager/transport_adapter/transport_adapter.h
index 7f6d347535..c00adb33b8 100644
--- a/src/components/include/transport_manager/transport_adapter/transport_adapter.h
+++ b/src/components/include/transport_manager/transport_adapter/transport_adapter.h
@@ -5,6 +5,9 @@
* Copyright (c) 2016, Ford Motor Company
* All rights reserved.
*
+ * Copyright (c) 2018 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:
*
@@ -16,7 +19,7 @@
* disclaimer in the documentation and/or other materials provided with the
* distribution.
*
- * Neither the name of the Ford Motor Company nor the names of its contributors
+ * Neither the name 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.
*
@@ -70,6 +73,9 @@ enum DeviceType {
IOS_BT,
IOS_USB,
TCP,
+ IOS_USB_HOST_MODE,
+ IOS_USB_DEVICE_MODE,
+ IOS_CARPLAY_WIRELESS, // running on iAP over Carplay wireless transport
UNKNOWN
};
@@ -86,6 +92,18 @@ typedef std::map<DeviceUID, DeviceSptr> DeviceMap;
*/
typedef std::list<TransportAdapterListener*> TransportAdapterListenerList;
+/**
+ * @brief Type definition for transport's configuration information
+ */
+typedef std::map<std::string, std::string> TransportConfig;
+
+/**
+ * @brief TransportConfig keys
+ */
+extern const char* tc_enabled;
+extern const char* tc_tcp_port;
+extern const char* tc_tcp_ip_address;
+
class TransportAdapter {
public:
/**
@@ -312,6 +330,12 @@ class TransportAdapter {
virtual void DeviceSwitched(const DeviceUID& device_handle) = 0;
virtual SwitchableDevices GetSwitchableDevices() const = 0;
+
+ /**
+ * @brief Returns the transport's configuration information
+ */
+ virtual TransportConfig GetTransportConfiguration() const = 0;
+
#ifdef TELEMETRY_MONITOR
/**
* @brief Return Time metric observer
diff --git a/src/components/include/transport_manager/transport_adapter/transport_adapter_event.h b/src/components/include/transport_manager/transport_adapter/transport_adapter_event.h
index 18f4ccb2d1..5d55960943 100644
--- a/src/components/include/transport_manager/transport_adapter/transport_adapter_event.h
+++ b/src/components/include/transport_manager/transport_adapter/transport_adapter_event.h
@@ -2,6 +2,9 @@
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
+ * Copyright (c) 2018 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:
*
@@ -13,7 +16,7 @@
* disclaimer in the documentation and/or other materials provided with the
* distribution.
*
- * Neither the name of the Ford Motor Company nor the names of its contributors
+ * Neither the name 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.
*
@@ -57,7 +60,8 @@ enum class EventTypeEnum {
ON_RECEIVED_FAIL,
ON_COMMUNICATION_ERROR,
ON_UNEXPECTED_DISCONNECT,
- ON_TRANSPORT_SWITCH_REQUESTED
+ ON_TRANSPORT_SWITCH_REQUESTED,
+ ON_TRANSPORT_CONFIG_UPDATED
};
class TransportAdapterEvent {
diff --git a/src/components/include/transport_manager/transport_manager_listener.h b/src/components/include/transport_manager/transport_manager_listener.h
index d336eade45..0d02bfd8c7 100644
--- a/src/components/include/transport_manager/transport_manager_listener.h
+++ b/src/components/include/transport_manager/transport_manager_listener.h
@@ -2,6 +2,9 @@
* Copyright (c) 2014, Ford Motor Company
* All rights reserved.
*
+ * Copyright (c) 2018 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:
*
@@ -13,7 +16,7 @@
* disclaimer in the documentation and/or other materials provided with the
* distribution.
*
- * Neither the name of the Ford Motor Company nor the names of its contributors
+ * Neither the name 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.
*
@@ -33,6 +36,7 @@
#ifndef SRC_COMPONENTS_INCLUDE_TRANSPORT_MANAGER_TRANSPORT_MANAGER_LISTENER_H_
#define SRC_COMPONENTS_INCLUDE_TRANSPORT_MANAGER_TRANSPORT_MANAGER_LISTENER_H_
+#include <map>
#include <vector>
#include "transport_manager/common.h"
#include "transport_manager/info.h"
@@ -193,6 +197,14 @@ class TransportManagerListener {
virtual void OnTMMessageSendFailed(
const DataSendError& error,
const ::protocol_handler::RawMessagePtr message) = 0;
+
+ /**
+ * @brief Notifies that configuration of a transport has been updated.
+ *
+ * @param configs pairs of key and value that represent configuration.
+ */
+ virtual void OnTransportConfigUpdated(
+ const std::map<std::string, std::string>& configs) = 0;
};
} // namespace transport_manager
#endif // SRC_COMPONENTS_INCLUDE_TRANSPORT_MANAGER_TRANSPORT_MANAGER_LISTENER_H_
diff --git a/src/components/include/transport_manager/transport_manager_listener_empty.h b/src/components/include/transport_manager/transport_manager_listener_empty.h
index ca6c573a06..a255256290 100644
--- a/src/components/include/transport_manager/transport_manager_listener_empty.h
+++ b/src/components/include/transport_manager/transport_manager_listener_empty.h
@@ -2,6 +2,9 @@
* Copyright (c) 2014, Ford Motor Company
* All rights reserved.
*
+ * Copyright (c) 2018 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:
*
@@ -13,7 +16,7 @@
* disclaimer in the documentation and/or other materials provided with the
* distribution.
*
- * Neither the name of the Ford Motor Company nor the names of its contributors
+ * Neither the name 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.
*
@@ -187,6 +190,14 @@ class TransportManagerListenerEmpty : public TransportManagerListener {
void OnTMMessageSendFailed(
const DataSendError& error,
const ::protocol_handler::RawMessagePtr message) OVERRIDE {}
+
+ /**
+ * @brief Notifies that configuration of a transport has been updated.
+ *
+ * @param configs pairs of key and value that represent configuration.
+ */
+ void OnTransportConfigUpdated(
+ const std::map<std::string, std::string>& configs) OVERRIDE {}
};
} // namespace transport_manager
#endif // SRC_COMPONENTS_INCLUDE_TRANSPORT_MANAGER_TRANSPORT_MANAGER_LISTENER_EMPTY_H_
diff --git a/src/components/include/transport_manager/transport_manager_settings.h b/src/components/include/transport_manager/transport_manager_settings.h
index feb3fa2c02..3912bbe747 100644
--- a/src/components/include/transport_manager/transport_manager_settings.h
+++ b/src/components/include/transport_manager/transport_manager_settings.h
@@ -63,6 +63,12 @@ class TransportManagerSettings : public TransportManagerMMESettings {
* the transport change timeout value.
*/
virtual uint32_t app_transport_change_timer_addition() const = 0;
+
+ /**
+ * @brief Returns the network interface name for TCP transport adapter
+ */
+ virtual const std::string& transport_manager_tcp_adapter_network_interface()
+ const = 0;
};
} // namespace transport_manager
#endif // SRC_COMPONENTS_INCLUDE_TRANSPORT_MANAGER_TRANSPORT_MANAGER_SETTINGS_H_
diff --git a/src/components/include/utils/data_accessor.h b/src/components/include/utils/data_accessor.h
index 9be28a638b..6d0fb0ed68 100644
--- a/src/components/include/utils/data_accessor.h
+++ b/src/components/include/utils/data_accessor.h
@@ -32,18 +32,18 @@
#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"
-// This class is for thread-safe access to data
+// This class is for thread-safe const access to data
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/CMakeLists.txt b/src/components/interfaces/CMakeLists.txt
index 1ea481f11a..660cbd661d 100644
--- a/src/components/interfaces/CMakeLists.txt
+++ b/src/components/interfaces/CMakeLists.txt
@@ -44,31 +44,8 @@ add_library(v4_protocol_v1_2_no_extra ${CMAKE_CURRENT_BINARY_DIR}/v4_protocol_v1
generate_interface("MOBILE_API.xml" "mobile_apis" "sdlrpcv2")
add_library(MOBILE_API ${CMAKE_CURRENT_BINARY_DIR}/MOBILE_API_schema.cc)
-if(HMI_JSON_API)
- generate_interface("HMI_API.xml" "hmi_apis" "jsonrpc")
- add_library(HMI_API ${CMAKE_CURRENT_BINARY_DIR}/HMI_API_schema.cc)
-endif()
-
-if(HMI_DBUS_API)
- generate_interface("QT_HMI_API.xml" "hmi_apis" "jsonrpc")
-
- add_custom_command(
- OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/HMI_API.h"
- COMMAND sed "-e" "s/QT_HMI_API/HMI_API/g" "${CMAKE_CURRENT_BINARY_DIR}/QT_HMI_API.h" > "${CMAKE_CURRENT_BINARY_DIR}/HMI_API.h"
- DEPENDS "${CMAKE_CURRENT_BINARY_DIR}/QT_HMI_API.h"
- )
- add_custom_command(
- OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/HMI_API_schema.h"
- COMMAND sed "-e" "s/QT_HMI_API/HMI_API/g" "${CMAKE_CURRENT_BINARY_DIR}/QT_HMI_API_schema.h" > "${CMAKE_CURRENT_BINARY_DIR}/HMI_API_schema.h"
- DEPENDS "${CMAKE_CURRENT_BINARY_DIR}/QT_HMI_API_schema.h"
- )
- add_custom_command(
- OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/HMI_API_schema.cc"
- COMMAND sed "-e" "s/QT_HMI_API/HMI_API/g" "${CMAKE_CURRENT_BINARY_DIR}/QT_HMI_API_schema.cc" > "${CMAKE_CURRENT_BINARY_DIR}/HMI_API_schema.cc"
- DEPENDS "${CMAKE_CURRENT_BINARY_DIR}/QT_HMI_API_schema.cc" "${CMAKE_CURRENT_BINARY_DIR}/HMI_API_schema.h" "${CMAKE_CURRENT_BINARY_DIR}/HMI_API.h")
-
- add_library(HMI_API ${CMAKE_CURRENT_BINARY_DIR}/HMI_API_schema.cc)
-endif()
+generate_interface("HMI_API.xml" "hmi_apis" "jsonrpc")
+add_library(HMI_API ${CMAKE_CURRENT_BINARY_DIR}/HMI_API_schema.cc)
target_link_libraries(v4_protocol_v1_2_no_extra Utils)
target_link_libraries(MOBILE_API Utils)
diff --git a/src/components/interfaces/HMI_API.xml b/src/components/interfaces/HMI_API.xml
index def5d22933..bf0f71b9c3 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">
@@ -729,6 +730,33 @@
</enum>
<!--IVI part-->
+<enum name="ElectronicParkBrakeStatus">
+ <element name="CLOSED">
+ <description>
+ Park brake actuators have been fully applied.
+ </description>
+ </element>
+ <element name="TRANSITION">
+ <description>
+ Park brake actuators are transitioning to either Apply/Closed or Release/Open state.
+ </description>
+ </element>
+ <element name="OPEN">
+ <description>
+ Park brake actuators are released.
+ </description>
+ </element>
+ <element name="DRIVE_ACTIVE">
+ <description>
+ When driver pulls the Electronic Park Brake switch while driving "at speed".
+ </description>
+ </element>
+ <element name="FAULT">
+ <description>
+ When system has a fault or is under maintenance.
+ </description>
+ </element>
+</enum>
<enum name="FuelType">
<element name="GASOLINE" />
<element name="DIESEL" />
@@ -1019,6 +1047,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" />
@@ -1040,6 +1069,7 @@
<element name="VEHICLEDATA_STEERINGWHEEL" />
<element name="VEHICLEDATA_FUELRANGE" />
<element name="VEHICLEDATA_ENGINEOILLIFE" />
+ <element name="VEHICLEDATA_ELECTRONICPARKBRAKESTATUS" />
</enum>
<enum name="WiperStatus">
@@ -1452,21 +1482,21 @@
<element name="UPDATING" />
<element name="UPDATE_NEEDED"/>
</enum>
-
+
<enum name="SystemError">
<element name="SYNC_REBOOTED"/>
<element name="SYNC_OUT_OF_MEMMORY" />
</enum>
-
+
<enum name="StatisticsType">
<element name="iAPP_BUFFER_FULL"/>
</enum>
-
+
<enum name="ConsentSource">
<element name="GUI"/>
<element name="VUI" />
</enum>
-
+
<enum name="DeviceState">
<element name="UNKNOWN"/>
<element name="UNPAIRED"/>
@@ -1479,7 +1509,7 @@
<param name="line2" type="String" mandatory="false"/>
<param name="textBody" type="String" mandatory="false"/>
</struct>
-
+
<struct name="PermissionItem">
<param name="name" type="String" mandatory="true">
<description>Code of message of user-friendly text about functional group to be allowed/disallowed</description>
@@ -1490,7 +1520,7 @@
<param name="allowed" type="Boolean" mandatory="false">
<description>Specifies whether functionality was allowed/disallowed. If ommited - no information about User Consent is yet found for app.</description>
</param>
- </struct>
+ </struct>
<struct name="ServiceInfo">
<param name="url" type="String" mandatory="true">
<description>Get URL based on service type.</description>
@@ -1927,12 +1957,12 @@
</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>
@@ -1972,6 +2002,9 @@
<param name="deviceInfo" type="Common.DeviceInfo" mandatory="true">
<description>The ID, serial number, transport type the named-app's-device is connected over to HU.</description>
</param>
+ <param name="secondaryDeviceInfo" type="Common.DeviceInfo" mandatory="false">
+ <description>The ID, serial number, transport type that are acquired through Secondary Transport.</description>
+ </param>
<param name="policyAppID" type="String" maxlength="50" minlength="1" mandatory="true">
<description>Policy ID(=the appID the application registers with) of registered application.</description>
</param>
@@ -2023,7 +2056,7 @@
</description>
</param>
<param name="dayColorScheme" type="Common.TemplateColorScheme" mandatory="false"></param>
- <param name="nightColorScheme" type="Common.TemplateColorScheme" mandatory="false"></param>
+ <param name="nightColorScheme" type="Common.TemplateColorScheme" mandatory="false"></param>
</struct>
<struct name="MenuParams">
@@ -2291,6 +2324,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">
@@ -2601,7 +2650,7 @@
<struct name="DateTime">
<param name="millisecond" type="Integer" minvalue="0" maxvalue="999" mandatory="false">
- <description>Milliseconds </description>
+ <description>Milliseconds </description>
</param>
<param name="second" type="Integer" minvalue="0" maxvalue="60" mandatory="false">
<description>Seconds part of time</description>
@@ -2853,6 +2902,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>
@@ -3348,10 +3408,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>
@@ -3571,6 +3631,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>
@@ -3787,7 +3850,7 @@
<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>
+ <param name="nightColorScheme" type="Common.TemplateColorScheme" mandatory="false"></param>
</function>
<function name="SetDisplayLayout" messagetype="response">
<param name="displayCapabilities" type="Common.DisplayCapabilities" mandatory="false">
@@ -3982,7 +4045,7 @@
</function>
</interface>
-<interface name="Navigation" version="1.5.0" date="2017-08-15">
+<interface name="Navigation" version="1.5.0" date="2017-08-15">
<function name="IsReady" messagetype="request">
<description>Method is invoked at system startup. Response must provide the information about presence of UI Navigation module and its readiness to cooperate with SDL.</description>
@@ -4319,6 +4382,9 @@
<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>
@@ -4358,6 +4424,9 @@
<param name="engineOilLife" type="Boolean" mandatory="false">
<description>The estimated percentage of remaining oil life of the engine.</description>
</param>
+ <param name="electronicParkBrakeStatus" type="Boolean" mandatory="false">
+ <description>The status of the park brake as provided by Electric Park Brake (EPB) system.</description>
+ </param>
<!-- Ford Specific Data Items -->
<param name="eCallInfo" type="Boolean" mandatory="false">
<description>Emergency Call notification and confirmation data</description>
@@ -4401,6 +4470,9 @@
<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>
@@ -4440,6 +4512,9 @@
<param name="engineOilLife" type="Common.VehicleDataResult" mandatory="false">
<description>The estimated percentage of remaining oil life of the engine.</description>
</param>
+ <param name="electronicParkBrakeStatus" type="Common.VehicleDataResult" mandatory="false">
+ <description>The status of the park brake as provided by Electric Park Brake (EPB) system.</description>
+ </param>
<!-- Ford Specific Data Items -->
<param name="eCallInfo" type="Common.VehicleDataResult" mandatory="false">
<description>Emergency Call notification and confirmation data</description>
@@ -4489,6 +4564,9 @@
<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>
@@ -4528,6 +4606,9 @@
<param name="engineOilLife" type="Boolean" mandatory="false">
<description>The estimated percentage of remaining oil life of the engine.</description>
</param>
+ <param name="electronicParkBrakeStatus" type="Boolean" mandatory="false">
+ <description>The status of the park brake as provided by Electric Park Brake (EPB) system.</description>
+ </param>
<!-- Ford Specific Data Items -->
<param name="eCallInfo" type="Boolean" mandatory="false">
<description>Emergency Call notification and confirmation data</description>
@@ -4571,6 +4652,9 @@
<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>
@@ -4610,6 +4694,9 @@
<param name="engineOilLife" type="Common.VehicleDataResult" mandatory="false">
<description>The estimated percentage of remaining oil life of the engine.</description>
</param>
+ <param name="electronicParkBrakeStatus" type="Common.VehicleDataResult" mandatory="false">
+ <description>The status of the park brake as provided by Electric Park Brake (EPB) system.</description>
+ </param>
<!-- Ford Specific Data Items -->
<param name="eCallInfo" type="Common.VehicleDataResult" mandatory="false">
<description>Emergency Call notification and confirmation data</description>
@@ -4654,6 +4741,9 @@
<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>
@@ -4696,6 +4786,9 @@
<param name="engineOilLife" type="Boolean" mandatory="false">
<description>The estimated percentage of remaining oil life of the engine.</description>
</param>
+ <param name="electronicParkBrakeStatus" type="Boolean" mandatory="false">
+ <description>The status of the park brake as provided by Electric Park Brake (EPB) system.</description>
+ </param>
<param name="eCallInfo" type="Boolean" mandatory="false">
<description>Emergency Call notification and confirmation data</description>
</param>
@@ -4737,6 +4830,9 @@
<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>
@@ -4779,6 +4875,9 @@
<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="electronicParkBrakeStatus" type="Common.ElectronicParkBrakeStatus" mandatory="false">
+ <description>The status of the park brake as provided by Electric Park Brake (EPB) system.</description>
+ </param>
<param name="eCallInfo" type="Common.ECallInfo" mandatory="false">
<description>Emergency Call notification and confirmation data</description>
</param>
@@ -4816,11 +4915,14 @@
<description>The instantaneous fuel consumption in microlitres</description>
</param>
<param name="fuelRange" type="Common.FuelRange" minsize="0" maxsize="100" array="true" mandatory="false">
- <description>The estimate range in KM the vehicle can travel based on fuel level and consumption</description>
+ <description>The 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>
@@ -4836,6 +4938,9 @@
<param name="beltStatus" type="Common.BeltStatus" mandatory="false">
<description>The status of the seat belts</description>
</param>
+ <param name="electronicParkBrakeStatus" type="Common.ElectronicParkBrakeStatus" mandatory="false">
+ <description>The status of the park brake as provided by Electric Park Brake (EPB) system.</description>
+ </param>
<param name="bodyInformation" type="Common.BodyInformation" mandatory="false">
<description>The body information including power modes</description>
</param>
@@ -5090,7 +5195,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">
@@ -5140,5 +5245,19 @@
<description>The remote control access mode specified by the driver via HMI.</description>
</param>
</function>
+
+<function name="OnRCStatus" messagetype="notification">
+ <description>Issued by SDL to notify HMI about remote control status change on SDL</description>
+ <param name="appID" type="Integer" mandatory="true">
+ <description>ID of selected application.</description>
+ </param>
+ <param name="allocatedModules" type="Common.ModuleData" minsize="0" maxsize="100" array="true" mandatory="true">
+ <description>Contains a list (zero or more) of module types that are allocated to the application.</description>
+ </param>
+ <param name="freeModules" type="Common.ModuleData" minsize="0" maxsize="100" array="true" mandatory="true">
+ <description>Contains a list (zero or more) of module types that are free to access for the application.</description>
+ </param>
+</function>
+
</interface>
</interfaces>
diff --git a/src/components/interfaces/MOBILE_API.xml b/src/components/interfaces/MOBILE_API.xml
index a5504916ba..bf8b912849 100644
--- a/src/components/interfaces/MOBILE_API.xml
+++ b/src/components/interfaces/MOBILE_API.xml
@@ -447,6 +447,7 @@
<element name="LHPLUS_PHONEMES" />
<element name="PRE_RECORDED" />
<element name="SILENCE" />
+ <element name="FILE" />
</enum>
<enum name="VrCapabilities">
@@ -503,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" />
@@ -524,6 +526,7 @@
<element name="VEHICLEDATA_STEERINGWHEEL" />
<element name="VEHICLEDATA_FUELRANGE" />
<element name="VEHICLEDATA_ENGINEOILLIFE" />
+ <element name="VEHICLEDATA_ELECTRONICPARKBRAKESTATUS" />
</enum>
<enum name="ButtonName">
@@ -1128,6 +1131,34 @@
</element>
</enum>
+ <enum name="ElectronicParkBrakeStatus">
+ <element name="CLOSED">
+ <description>
+ Park brake actuators have been fully applied.
+ </description>
+ </element>
+ <element name="TRANSITION">
+ <description>
+ Park brake actuators are transitioning to either Apply/Closed or Release/Open state.
+ </description>
+ </element>
+ <element name="OPEN">
+ <description>
+ Park brake actuators are released.
+ </description>
+ </element>
+ <element name="DRIVE_ACTIVE">
+ <description>
+ When driver pulls the Electronic Park Brake switch while driving "at speed".
+ </description>
+ </element>
+ <element name="FAULT">
+ <description>
+ When system has a fault or is under maintenance.
+ </description>
+ </element>
+ </enum>
+
<enum name="FuelType">
<element name="GASOLINE" />
<element name="DIESEL" />
@@ -1763,6 +1794,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">
@@ -2103,15 +2151,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">
@@ -2446,7 +2494,8 @@
<element name="OnHashChangeID" value="32782" hexvalue="800E" />
<element name="OnInteriorVehicleDataID" value="32783" hexvalue="800F" />
<element name="OnWayPointChangeID" value="32784" hexvalue="8010" />
-
+ <element name="OnRCStatusID" value="32785" hexvalue="8011" />
+
<!--
Ford Specific Request / Response RPCs
Range = 0x 0001 0000 - 0x 0001 7FFF
@@ -3452,6 +3501,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">
@@ -4175,6 +4227,9 @@
<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>
@@ -4214,6 +4269,10 @@
<param name="engineOilLife" type="Boolean" mandatory="false">
<description>The estimated percentage of remaining oil life of the engine.</description>
</param>
+ <param name="electronicParkBrakeStatus" type="Boolean" mandatory="false">
+ <description>The status of the park brake as provided by Electric Park Brake (EPB) system.</description>
+ </param>
+
<!-- Ford Specific Data Items -->
<param name="eCallInfo" type="Boolean" mandatory="false">
@@ -4284,6 +4343,9 @@
<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>
@@ -4323,6 +4385,10 @@
<param name="engineOilLife" type="VehicleDataResult" mandatory="false">
<description>The estimated percentage of remaining oil life of the engine.</description>
</param>
+ <param name="electronicParkBrakeStatus" type="VehicleDataResult" mandatory="false">
+ <description>The status of the park brake as provided by Electric Park Brake (EPB) system.</description>
+ </param>
+
<!-- Ford Specific Data Items -->
<param name="eCallInfo" type="VehicleDataResult" mandatory="false">
@@ -4371,6 +4437,9 @@
<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>
@@ -4410,6 +4479,10 @@
<param name="engineOilLife" type="Boolean" mandatory="false">
<description>The estimated percentage of remaining oil life of the engine.</description>
</param>
+ <param name="electronicParkBrakeStatus" type="Boolean" mandatory="false">
+ <description>The status of the park brake as provided by Electric Park Brake (EPB) system.</description>
+ </param>
+
<!-- Ford Specific Data Items -->
<param name="eCallInfo" type="Boolean" mandatory="false">
@@ -4478,6 +4551,9 @@
<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>
@@ -4517,6 +4593,10 @@
<param name="engineOilLife" type="VehicleDataResult" mandatory="false">
<description>The estimated percentage of remaining oil life of the engine.</description>
</param>
+ <param name="electronicParkBrakeStatus" type="VehicleDataResult" mandatory="false">
+ <description>The status of the park brake as provided by Electric Park Brake (EPB) system.</description>
+ </param>
+
<!-- Ford Specific Data Items -->
<param name="eCallInfo" type="VehicleDataResult" mandatory="false">
@@ -4565,6 +4645,9 @@
<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>
@@ -4607,6 +4690,10 @@
<param name="engineOilLife" type="Boolean" mandatory="false">
<description>The estimated percentage of remaining oil life of the engine.</description>
</param>
+ <param name="electronicParkBrakeStatus" type="Boolean" mandatory="false">
+ <description>The status of the park brake as provided by Electric Park Brake (EPB) system.</description>
+ </param>
+
<!-- Ford Specific Data Items -->
<param name="eCallInfo" type="Boolean" mandatory="false">
@@ -4676,6 +4763,9 @@
<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>
@@ -4718,6 +4808,10 @@
<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="electronicParkBrakeStatus" type="ElectronicParkBrakeStatus" mandatory="false">
+ <description>The status of the park brake as provided by Electric Park Brake (EPB) system.</description>
+ </param>
+
<!-- Ford Specific Data Items -->
<param name="eCallInfo" type="ECallInfo" mandatory="false">
@@ -5632,7 +5726,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.
@@ -5915,6 +6009,9 @@
<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>
@@ -5957,6 +6054,10 @@
<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="electronicParkBrakeStatus" type="ElectronicParkBrakeStatus" mandatory="false">
+ <description>The status of the park brake as provided by Electric Park Brake (EPB) system.</description>
+ </param>
+
<!-- Ford Specific Vehicle Data -->
<param name="eCallInfo" type="ECallInfo" mandatory="false">
@@ -6108,6 +6209,16 @@
<param name="moduleData" type="ModuleData" mandatory="true">
</param>
</function>
+
+ <function name="OnRCStatus" functionID="OnRCStatusID" messagetype="notification">
+ <description>Issued by SDL to notify the application about remote control status change on SDL</description>
+ <param name="allocatedModules" type="ModuleData" minsize="0" maxsize="100" array="true" mandatory="true">
+ <description>Contains a list (zero or more) of module types that are allocated to the application.</description>
+ </param>
+ <param name="freeModules" type="ModuleData" minsize="0" maxsize="100" array="true" mandatory="true">
+ <description>Contains a list (zero or more) of module types that are free to access for the application.</description>
+ </param>
+ </function>
<!-- ~~~~~~~~~~~~~~~~~~ -->
<!-- Ford Specific APIs -->
diff --git a/src/components/interfaces/QT_HMI_API.xml b/src/components/interfaces/QT_HMI_API.xml
deleted file mode 100644
index 0c86d4eea3..0000000000
--- a/src/components/interfaces/QT_HMI_API.xml
+++ /dev/null
@@ -1,5517 +0,0 @@
-<!--
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE. -->
-
-<!--
- * DEPRECATED, use HMI_API instead. This API is used with the DBus adapter,
- * which will be removed or refactored to use HMI_API in the next major release
--->
-<interfaces name="SmartDeviceLink HMI API">
- <interface name="Common" version="1.1" date="2013-10-02">
- <enum name="Result">
- <element name="SUCCESS" value="0"/>
- <element name="UNSUPPORTED_REQUEST" value="1"/>
- <element name="UNSUPPORTED_RESOURCE" value="2"/>
- <element name="DISALLOWED" value="3"/>
- <element name="REJECTED" value="4"/>
- <element name="ABORTED" value="5"/>
- <element name="IGNORED" value="6"/>
- <element name="RETRY" value="7"/>
- <element name="IN_USE" value="8"/>
- <element name="DATA_NOT_AVAILABLE" value="9"/>
- <element name="TIMED_OUT" value="10"/>
- <element name="INVALID_DATA" value="11"/>
- <element name="CHAR_LIMIT_EXCEEDED" value="12"/>
- <element name="INVALID_ID" value="13"/>
- <element name="DUPLICATE_NAME" value="14"/>
- <element name="APPLICATION_NOT_REGISTERED" value="15"/>
- <element name="WRONG_LANGUAGE" value="16"/>
- <element name="OUT_OF_MEMORY" value="17"/>
- <element name="TOO_MANY_PENDING_REQUESTS" value="18"/>
- <element name="NO_APPS_REGISTERED" value="19"/>
- <element name="NO_DEVICES_CONNECTED" value="20"/>
- <element name="WARNINGS" value="21"/>
- <element name="GENERIC_ERROR" value="22"/>
- <element name="USER_DISALLOWED" value="23"/>
- <element name="TRUNCATED_DATA" value="24"/>
- <element name="SAVED" value="25"/>
- <element name="READ_ONLY" value="26"/>
- </enum>
- <enum name="TransportType">
- <description>
- Lists of the transport types used for device connection to HU.
- </description>
- <element name="BLUETOOTH"/>
- <element name="USB_IOS"/>
- <element name="USB_AOA"/>
- <element name="WIFI"/>
- </enum>
- <enum name="ButtonName">
- <description>Defines the hard (physical) and soft (touchscreen) buttons available from SYNC</description>
- <element name="OK"/>
- <element name="SEEKLEFT"/>
- <element name="SEEKRIGHT"/>
- <element name="TUNEUP"/>
- <element name="TUNEDOWN"/>
- <element name="PRESET_0"/>
- <element name="PRESET_1"/>
- <element name="PRESET_2"/>
- <element name="PRESET_3"/>
- <element name="PRESET_4"/>
- <element name="PRESET_5"/>
- <element name="PRESET_6"/>
- <element name="PRESET_7"/>
- <element name="PRESET_8"/>
- <element name="PRESET_9"/>
- <element name="CUSTOM_BUTTON"/>
- <element name="SEARCH"/>
- </enum>
- <enum name="ButtonEventMode">
- <element name="BUTTONUP">
- <description>A button has been released up</description>
- </element>
- <element name="BUTTONDOWN">
- <description>A button has been pressed down</description>
- </element>
- </enum>
- <enum name="ButtonPressMode">
- <element name="LONG">
- <description>A button was released, after it was pressed for a long time. Actual timing is defined by head unit and may vary</description>
- </element>
- <element name="SHORT">
- <description>A button was released, after it was pressed for a short time. Actual timing is defined by head unit and may vary</description>
- </element>
- </enum>
- <enum name="Language">
- <element name="EN-US" internal_name="EN_US">
- <description>English - US</description>
- </element>
- <element name="ES-MX" internal_name="ES_MX">
- <description>Spanish - Mexico</description>
- </element>
- <element name="FR-CA" internal_name="FR_CA">
- <description>French - Canada</description>
- </element>
- <element name="DE-DE" internal_name="DE_DE">
- <description>German - Germany</description>
- </element>
- <element name="ES-ES" internal_name="ES_ES">
- <description>Spanish - Spain</description>
- </element>
- <element name="EN-GB" internal_name="EN_GB">
- <description>English - GB</description>
- </element>
- <element name="RU-RU" internal_name="RU_RU">
- <description>Russian - Russia</description>
- </element>
- <element name="TR-TR" internal_name="TR_TR">
- <description>Turkish - Turkey</description>
- </element>
- <element name="PL-PL" internal_name="PL_PL">
- <description>Polish - Poland</description>
- </element>
- <element name="FR-FR" internal_name="FR_FR">
- <description>French - France</description>
- </element>
- <element name="IT-IT" internal_name="IT_IT">
- <description>Italian - Italy</description>
- </element>
- <element name="SV-SE" internal_name="SV_SE">
- <description>Swedish - Sweden</description>
- </element>
- <element name="PT-PT" internal_name="PT_PT">
- <description>Portuguese - Portugal</description>
- </element>
- <element name="NL-NL" internal_name="NL_NL">
- <description>Dutch (Standard) - Netherlands</description>
- </element>
- <element name="EN-AU" internal_name="EN_AU">
- <description>English - Australia</description>
- </element>
- <element name="ZH-CN" internal_name="ZH_CN">
- <description>Mandarin - China</description>
- </element>
- <element name="ZH-TW" internal_name="ZH_TW">
- <description>Mandarin - Taiwan</description>
- </element>
- <element name="JA-JP" internal_name="JA_JP">
- <description>Japanese - Japan</description>
- </element>
- <element name="AR-SA" internal_name="AR_SA">
- <description>Arabic - Saudi Arabia</description>
- </element>
- <element name="KO-KR" internal_name="KO_KR">
- <description>Korean - South Korea</description>
- </element>
- <element name="PT-BR" internal_name="PT_BR">
- <description>Portuguese - Brazil</description>
- </element>
- <element name="CS-CZ" internal_name="CS_CZ">
- <description>Czech - Czech Republic</description>
- </element>
- <element name="DA-DK" internal_name="DA_DK">
- <description>Danish - Denmark</description>
- </element>
- <element name="NO-NO" internal_name="NO_NO">
- <description>Norwegian - Norway</description>
- </element>
- <element name="NL-BE" internal_name="NL_BE">
- <description>Dutch (Flemish) - Belgium</description>
- </element>
- <element name="EL-GR" internal_name="EL_GR">
- <description>Greek - Greece</description>
- </element>
- <element name="HU-HU" internal_name="HU_HU">
- <description>Hungarian - Hungary</description>
- </element>
- <element name="FI-FI" internal_name="FI_FI">
- <description>Finnish - Finland</description>
- </element>
- <element name="SK-SK" internal_name="SK_SK">
- <description>Slovak - Slovakia</description>
- </element>
- <element name="EN-IN" internal_name="EN_IN">
- <description>English - India</description>
- </element>
- <element name="TH-TH" internal_name="TH_TH">
- <description>Thai - Thailand</description>
- </element>
- <element name="EN-SA" internal_name="EN_SA">
- <description>English - Middle East</description>
- </element>
- <element name="HE-IL" internal_name="HE_IL">
- <description>Hebrew - Israel</description>
- </element>
- <element name="RO-RO" internal_name="RO_RO">
- <description>Romanian - Romania</description>
- </element>
- <element name="UK-UA" internal_name="UK_UA">
- <description>Ukrainian - Ukraine</description>
- </element>
- <element name="ID-ID" internal_name="ID_ID">
- <description>Indonesian - Indonesia</description>
- </element>
- <element name="VI-VN" internal_name="VI_VN">
- <description>Vietnamese - Vietnam</description>
- </element>
- <element name="MS-MY" internal_name="MS_MY">
- <description>Malay - Malaysia</description>
- </element>
- <element name="HI-IN" internal_name="HI_IN">
- <description>Hindi - India</description>
- </element>
- </enum>
- <enum name="SoftButtonType">
- <description>Contains information about the SoftButton capabilities.</description>
- <element name="TEXT" internal_name="SBT_TEXT"/>
- <element name="IMAGE" internal_name="SBT_IMAGE"/>
- <element name="BOTH" internal_name="SBT_BOTH"/>
- </enum>
- <enum name="SystemAction">
- <description>Enumeration that describes system actions that can be triggered.</description>
- <element name="DEFAULT_ACTION">
- <description>Default action occurs. Standard behavior (e.g. SoftButton clears overlay).</description>
- </element>
- <element name="STEAL_FOCUS">
- <description>The calling app's dialog or related event should clear and the app should be brought into HMI_FULL.</description>
- </element>
- <element name="KEEP_CONTEXT">
- <description>Current system context is maintained. An overlay is persisted even though a SoftButton has been pressed and the notification sent.</description>
- </element>
- </enum>
- <enum name="AppHMIType">
- <description>Enumeration listing possible app types.</description>
- <element name="DEFAULT"/>
- <element name="COMMUNICATION"/>
- <element name="MEDIA"/>
- <element name="MESSAGING"/>
- <element name="NAVIGATION"/>
- <element name="INFORMATION"/>
- <element name="SOCIAL"/>
- <element name="BACKGROUND_PROCESS"/>
- <element name="TESTING"/>
- <element name="SYSTEM"/>
- </enum>
- <enum name="WayPointType">
- <description>Describes what kind of waypoint is requested/provided.</description>
- <element name="ALL" />
- <element name="DESTINATION" />
- </enum>
-
- <struct name="Coordinate">
- <param name="latitudeDegrees" minvalue="-90" maxvalue="90" type="Float" mandatory="true">
- <description>Latitude of the location.</description>
- </param>
- <param name="longitudeDegrees" minvalue="-180" maxvalue="180" type="Float" mandatory="true">
- <description>Longitude of the location.</description>
- </param>
- </struct>
- <enum name="LayoutMode">
- <description>For touchscreen interactions, the mode of how the choices are presented.</description>
- <element name="ICON_ONLY"/>
- <description>This mode causes the interaction to display the previous set of choices as icons.</description>
- <element name="ICON_WITH_SEARCH"/>
- <description>This mode causes the interaction to display the previous set of choices as icons along with a search field in the HMI.</description>
- <element name="LIST_ONLY"/>
- <description>This mode causes the interaction to display the previous set of choices as a list.</description>
- <element name="LIST_WITH_SEARCH"/>
- <description>This mode causes the interaction to display the previous set of choices as a list along with a search field in the HMI.</description>
- <element name="KEYBOARD"/>
- <description>This mode causes the interaction to immediately display a keyboard entry through the HMI.</description>
- </enum>
- <enum name="DeactivateReason">
- <description>Specifies the functionality the User has switched to.</description>
- <element name="AUDIO">
- <description>Navigated to audio(radio, etc)</description>
- </element>
- <element name="PHONECALL">
- <description>Navigated to make a call.</description>
- </element>
- <element name="NAVIGATIONMAP">
- <description>Navigated to navigation screen.</description>
- </element>
- <element name="PHONEMENU">
- <description>Navigated to phone menu.</description>
- </element>
- <element name="SYNCSETTINGS">
- <description>Navigated to settings menu.</description>
- </element>
- <element name="GENERAL">
- <description>Other screens navigation apart from other mobile app.</description>
- </element>
- </enum>
- <enum name="ClockUpdateMode">
- <description>Describes how the media clock timer should behave on the platform</description>
- <element name="COUNTUP"/>
- <description>Starts the media clock timer counting upwards, as in time elapsed.</description>
- <element name="COUNTDOWN"/>
- <description>Starts the media clock timer counting downwards, as in time remaining.</description>
- <element name="PAUSE"/>
- <description>Pauses the media clock timer</description>
- <element name="RESUME"/>
- <description>Resume the media clock timer</description>
- <element name="CLEAR"/>
- <description>Clears the media clock timer (previously done through Show-&gt;mediaClock)</description>
- </enum>
- <enum name="SystemContext">
- <description>Enumeration that describes possible contexts the application might be in on HU.</description>
- <description>Communicated to whichever app is in HMI FULL, except Alert.</description>
- <element name="MAIN" internal_name="SYSCTXT_MAIN">
- <description>The app's persistent display (whether media/non-media/navigation) is fully visible onscreen.</description>
- <description> There is currently no user interaction (user-initiated or app-initiated) with the head-unit</description>
- </element>
- <element name="VRSESSION" internal_name="SYSCTXT_VRSESSION">
- <description>The system is currently in a VR session (with whatever dedicated VR screen being overlaid onscreen).</description>
- </element>
- <element name="MENU" internal_name="SYSCTXT_MENU">
- <description>The system is currently displaying a system or in-App menu onscreen.</description>
- </element>
- <element name="HMI_OBSCURED" internal_name="SYSCTXT_HMI_OBSCURED">
- <description>The app's display HMI is currently obscuring with either a system or other app's overlay (except of Alert element).</description>
- </element>
- <element name="ALERT" internal_name="SYSCTXT_ALERT">
- <description>Broadcast only to whichever app has an alert currently being displayed.</description>
- </element>
- </enum>
- <enum name="HmiZoneCapabilities">
- <description>Contains information about the HMI zone capabilities.</description>
- <description>For future use.</description>
- <element name="FRONT"/>
- <element name="BACK"/>
- </enum>
- <enum name="SpeechCapabilities">
- <description>Contains information about the TTS capabilities.</description>
- <element name="TEXT" internal_name="SC_TEXT"/>
- <element name="SAPI_PHONEMES"/>
- <element name="LHPLUS_PHONEMES"/>
- <element name="PRE_RECORDED"/>
- <element name="SILENCE"/>
- </enum>
- <enum name="VrCapabilities">
- <description>Contains information about the VR capabilities.</description>
- <element name="TEXT" internal_name="VR_TEXT"/>
- </enum>
- <enum name="PrerecordedSpeech">
- <description>Contains a list of prerecorded speech items present on the platform.</description>
- <element name="HELP_JINGLE"/>
- <element name="INITIAL_JINGLE"/>
- <element name="LISTEN_JINGLE"/>
- <element name="POSITIVE_JINGLE"/>
- <element name="NEGATIVE_JINGLE"/>
- </enum>
- <enum name="TBTState">
- <description>Enumeration that describes possible states of turn-by-turn client or SmartDeviceLink app.</description>
- <element name="ROUTE_UPDATE_REQUEST"/>
- <element name="ROUTE_ACCEPTED"/>
- <element name="ROUTE_REFUSED"/>
- <element name="ROUTE_CANCELLED"/>
- <element name="ETA_REQUEST"/>
- <element name="NEXT_TURN_REQUEST"/>
- <element name="ROUTE_STATUS_REQUEST"/>
- <element name="ROUTE_SUMMARY_REQUEST"/>
- <element name="TRIP_STATUS_REQUEST"/>
- <element name="ROUTE_UPDATE_REQUEST_TIMEOUT"/>
- </enum>
- <enum name="ApplicationsCloseReason">
- <description>Describes the reasons for exiting all of applications.</description>
- <element name="IGNITION_OFF"/>
- <element name="MASTER_RESET"/>
- <element name="FACTORY_DEFAULTS"/>
- <element name="SUSPEND"/>
- </enum>
- <enum name="DisplayType">
- <description>The possible types of HU display.</description>
- <element name="CID">
- <description> A 2-line x 20 character "dot matrix" display </description>
- </element>
- <element name="TYPE2">
- <description> 1 line older radio head unit.</description>
- </element>
- <element name="TYPE5">
- <description> Old radio head unit.</description>
- </element>
- <element name="NGN">
- <description> Next Generation Navigation display.</description>
- </element>
- <element name="GEN2_8_DMA">
- <description> GEN-2, 8 inch display.</description>
- </element>
- <element name="GEN2_6_DMA">
- <description> GEN-2, 6 inch display.</description>
- </element>
- <element name="MFD3">
- <description> 3 inch GEN1.1 display </description>
- </element>
- <element name="MFD4">
- <description> 4 inch GEN1.1 display </description>
- </element>
- <element name="MFD5">
- <description> 5 inch GEN1.1 display </description>
- </element>
- <element name="GEN3_8_INCH"/>
- </enum>
- <enum name="ImageType">
- <description>Contains information about the type of image.</description>
- <element name="STATIC"/>
- <element name="DYNAMIC"/>
- </enum>
- <enum name="ApplicationExitReason">
- <element name="DRIVER_DISTRACTION_VIOLATION">
- <description>By getting this value, SDL puts the named app to NONE HMILevel</description>
- </element>
- <element name="USER_EXIT">
- <description>By getting this value, SDL puts the named app to NONE HMILevel</description>
- </element>
- <element name="UNAUTHORIZED_TRANSPORT_REGISTRATION">
- <description>By getting this value, SDL unregisters the named application</description>
- </element>
- <element name="UNSUPPORTED_HMI_RESOURCE">
- <description>By getting this value, SDL unregisters the named application</description>
- </element>
- </enum>
- <enum name="TextFieldName">
- <element name="mainField1">
- <description>The first line of first set of main fields of the persistent display; applies to "Show"</description>
- </element>
- <element name="mainField2">
- <description>The second line of first set of main fields of the persistent display; applies to "Show"</description>
- </element>
- <element name="mainField3">
- <description>The first line of second set of main fields of persistent display; applies to "Show"</description>
- </element>
- <element name="mainField4">
- <description>The second line of second set of main fields of the persistent display; applies to "Show"</description>
- </element>
- <element name="statusBar">
- <description>The status bar on NGN; applies to "Show"</description>
- </element>
- <element name="mediaClock">
- <description>Text value for MediaClock field; applies to "Show"</description>
- </element>
- <element name="mediaTrack">
- <description>The track field of NGN and GEN1.1 MFD displays. This field is only available for media applications; applies to "Show"</description>
- </element>
- <element name="alertText1">
- <description>The first line of the alert text field; applies to "Alert"</description>
- </element>
- <element name="alertText2">
- <description>The second line of the alert text field; applies to "Alert"</description>
- </element>
- <element name="alertText3">
- <description>The third line of the alert text field; applies to "Alert"</description>
- </element>
- <element name="scrollableMessageBody">
- <description>Long form body of text that can include newlines and tabs; applies to "ScrollableMessage"</description>
- </element>
- <element name="initialInteractionText">
- <description> First line suggestion for a user response (in the case of VR enabled interaction</description>
- </element>
- <element name="navigationText1">
- <description> First line of navigation text</description>
- </element>
- <element name="navigationText2">
- <description> Second line of navigation text</description>
- </element>
- <element name="ETA">
- <description> Estimated Time of Arrival time for navigation</description>
- </element>
- <element name="totalDistance">
- <description> Total distance to destination for navigation</description>
- </element>
- <element name="audioPassThruDisplayText1">
- <description> First line of text for audio pass thru</description>
- </element>
- <element name="audioPassThruDisplayText2">
- <description> Second line of text for audio pass thru</description>
- </element>
- <element name="sliderHeader">
- <description> Header text for slider</description>
- </element>
- <element name="sliderFooter">
- <description> Footer text for slider</description>
- </element>
- <element name="menuName">
- <description> Primary text for Choice</description>
- </element>
- <element name="secondaryText">
- <description> Secondary text for Choice</description>
- </element>
- <element name="tertiaryText">
- <description> Tertiary text for Choice</description>
- </element>
- <element name="menuTitle">
- <description> Optional text to label an app menu button (for certain touchscreen platforms).</description>
- </element>
- <element name="timeToDestination"/>
- <element name="navigationText">
- <description>Navigation text for UpdateTurnList.</description>
- </element>
- <element name="notificationText">
- <description>Text of notification to be displayed on screen.</description>
- </element>
- <element name="locationName">
- <description> Optional name / title of intended location for SendLocation.</description>
- </element>
- <element name="locationDescription">
- <description> Optional description of intended location / establishment (if applicable) for SendLocation.</description>
- </element>
- <element name="addressLines">
- <description> Optional location address (if applicable) for SendLocation.</description>
- </element>
- <element name="phoneNumber">
- <description> Optional hone number of intended location / establishment (if applicable) for SendLocation.</description>
- </element>
- <!-- TO DO to be removed -->
- <element name="turnText"/>
- </enum>
- <enum name="MetadataType">
- <element name="mediaTitle">
- <description>The data in this field contains the title of the currently playing audio track.</description>
- </element>
- <element name="mediaArtist">
- <description>The data in this field contains the artist or creator of the currently playing audio track.</description>
- </element>
- <element name="mediaAlbum">
- <description>The data in this field contains the album title of the currently playing audio track.</description>
- </element>
- <element name="mediaYear">
- <description>The data in this field contains the creation year of the currently playing audio track.</description>
- </element>
- <element name="mediaGenre">
- <description>The data in this field contains the genre of the currently playing audio track.</description>
- </element>
- <element name="mediaStation">
- <description>The data in this field contains the name of the current source for the media.</description>
- </element>
- <element name="rating">
- <description>The data in this field is a rating.</description>
- </element>
- <element name="currentTemperature">
- <description>The data in this field is the current temperature.</description>
- </element>
- <element name="maximumTemperature">
- <description>The data in this field is the maximum temperature for the day.</description>
- </element>
- <element name="minimumTemperature">
- <description>The data in this field is the minimum temperature for the day.</description>
- </element>
- <element name="weatherTerm">
- <description>The data in this field describes the current weather (ex. cloudy, clear, etc.).</description>
- </element>
- <element name="humidity">
- <description>The data in this field describes the current humidity value.</description>
- </element>
- </enum>
- <enum name="ImageFieldName">
- <element name="softButtonImage">
- <description>The image field for SoftButton</description>
- </element>
- <element name="choiceImage">
- <description>The first image field for Choice</description>
- </element>
- <element name="choiceSecondaryImage">
- <description>The secondary image field for Choice</description>
- </element>
- <element name="vrHelpItem">
- <description>The image field for vrHelpItem</description>
- </element>
- <element name="turnIcon">
- <description>The image field for Turn</description>
- </element>
- <element name="menuIcon">
- <description>The image field for the menu icon in SetGlobalProperties</description>
- </element>
- <element name="cmdIcon">
- <description>The image field for AddCommand</description>
- </element>
- <element name="appIcon">
- <description>The image field for the app icon (set by setAppIcon)</description>
- </element>
- <element name="graphic">
- <description>The image field for Show</description>
- </element>
- <element name="showConstantTBTIcon">
- <description>The primary image field for ShowConstantTBT</description>
- </element>
- <element name="showConstantTBTNextTurnIcon">
- <description>The secondary image field for ShowConstantTBT</description>
- </element>
- <element name="locationImage">
- <description>The optional image of a destination / location</description>
- </element>
- </enum>
- <enum name="TextAlignment">
- <description>The list of possible alignments, left, right, or centered</description>
- <element name="LEFT_ALIGNED"/>
- <element name="RIGHT_ALIGNED"/>
- <element name="CENTERED"/>
- </enum>
- <enum name="DriverDistractionState">
- <description>Enumeration that describes possible states of driver distraction.</description>
- <element name="DD_ON"/>
- <element name="DD_OFF"/>
- </enum>
- <enum name="MediaClockFormat">
- <element name="CLOCK1">
- <description>
- minutesFieldWidth = 2;minutesFieldMax = 19;secondsFieldWidth = 2;secondsFieldMax = 99;maxHours = 19;maxMinutes = 59;maxSeconds = 59;
- Is used for Type II, NGN and CID head units.
- </description>
- </element>
- <element name="CLOCK2">
- <description>
- minutesFieldWidth = 3;minutesFieldMax = 199;secondsFieldWidth = 2;secondsFieldMax = 99;maxHours = 59;maxMinutes = 59;maxSeconds = 59;
- Is used for Type V head units.
- </description>
- </element>
- <element name="CLOCK3">
- <description>
- minutesFieldWidth = 2;minutesFieldMax = 59;secondsFieldWidth = 2;secondsFieldMax = 59;maxHours = 9;maxMinutes = 59;maxSeconds = 59;
- Is used for GEN1.1 (i.e. MFD3/4/5) head units.
- </description>
- </element>
- <element name="CLOCKTEXT1">
- <description>
- 5 characters possible
- Format: 1|sp c :|sp c c
- 1|sp : digit "1" or space
- c : character out of following character set: sp|0-9|[letters
- :|sp : colon or space
- Is used for Type II head unit
- </description>
- </element>
- <element name="CLOCKTEXT2">
- <description>
- 5 chars possible
- Format: 1|sp c :|sp c c
- 1|sp : digit "1" or space
- c : character out of following character set: sp|0-9|[letters
- :|sp : colon or space
- Is used for CID and NGN head unit
- </description>
- </element>
- <element name="CLOCKTEXT3">
- <description>
- 6 chars possible
- Format: 1|sp c c :|sp c c
- 1|sp : digit "1" or space
- c : character out of following character set: sp|0-9|[letters
- :|sp : colon or space
- Is used for Type V head unit
- </description>
- </element>
- <element name="CLOCKTEXT4">
- <description>
- 6 chars possible
- Format: c :|sp c c : c c
- :|sp : colon or space
- c : character out of following character set: sp|0-9|[letters].
- Is used for GEN1.1 (i.e. MFD3/4/5) head units
- </description>
- </element>
- </enum>
- <enum name="VRCommandType">
- <element name="Choice">
- <description>Type that expound that current AddCommand should be pocessed as choise for initiated PerformInteraction request for current active on HMI.</description>
- </element>
- <element name="Command">
- <description>Type that expound that current AddCommand should be pocessed as common command for current application on HMI.</description>
- </element>
- </enum>
- <!--IVI part-->
- <enum name="ComponentVolumeStatus">
- <description>The volume status of a vehicle component.</description>
- <element name="UNKNOWN" internal_name="CVS_UNKNOWN">
- <description> The data is unknown.</description>
- </element>
- <element name="NORMAL" internal_name="CVS_NORMAL">
- <description> The volume is normal.</description>
- </element>
- <element name="LOW" internal_name="CVS_LOW">
- <description> The volume is low.</description>
- </element>
- <element name="FAULT" internal_name="CVS_FAULT">
- <description> The module/sensor is currently faulted. </description>
- </element>
- <element name="ALERT" internal_name="CVS_ALERT">
- <description> The component`s volume is in critical level.</description>
- </element>
- <element name="NOT_SUPPORTED" internal_name="CVS_NOT_SUPPORTED">
- <description> The data is not supported.</description>
- </element>
- </enum>
- <enum name="PRNDL">
- <description>The selected gear.</description>
- <element name="PARK">
- <description>Parking</description>
- </element>
- <element name="REVERSE">
- <description>Reverse gear</description>
- </element>
- <element name="NEUTRAL">
- <description>No gear</description>
- </element>
- <element name="DRIVE">
- </element>
- <element name="SPORT">
- <description>Drive Sport mode</description>
- </element>
- <element name="LOWGEAR">
- <description>1st gear hold</description>
- </element>
- <element name="FIRST">
- </element>
- <element name="SECOND">
- </element>
- <element name="THIRD">
- </element>
- <element name="FOURTH">
- </element>
- <element name="FIFTH">
- </element>
- <element name="SIXTH">
- </element>
- <element name="SEVENTH">
- </element>
- <element name="EIGHTH">
- </element>
- <element name="FAULT">
- </element>
- </enum>
- <enum name="VehicleDataEventStatus">
- <description>Reflects the status of a vehicle data event; e.g. a seat belt event status.</description>
- <element name="NO_EVENT" internal_name="VDES_NO_EVENT">
- <description> The system does not have the adequate information to send valid YES or NO states.</description>
- </element>
- <element name="NO" internal_name="VDES_NO">
- <description> The requested event is in NO state.</description>
- </element>
- <element name="YES" internal_name="VDES_YES">
- <description> The requested event is in YES state.</description>
- </element>
- <element name="NOT_SUPPORTED" internal_name="VDES_NOT_SUPPORTED">
- <description> The requested data is not supported </description>
- </element>
- <element name="FAULT" internal_name="VDES_FAULT">
- <description> The module/sensor is currently faulted.</description>
- </element>
- </enum>
- <enum name="VehicleDataStatus">
- <description>Reflects the status of a binary vehicle data item.</description>
- <element name="NO_DATA_EXISTS" internal_name="VDS_NO_DATA_EXISTS">
- </element>
- <element name="OFF" internal_name="VDS_OFF">
- </element>
- <element name="ON" internal_name="VDS_ON">
- </element>
- </enum>
- <enum name="IgnitionStableStatus">
- <description>Reflects the ignition switch stability.</description>
- <element name="IGNITION_SWITCH_NOT_STABLE">
- </element>
- <element name="IGNITION_SWITCH_STABLE">
- </element>
- <element name="MISSING_FROM_TRANSMITTER">
- <description> Either the data is not accessible or the sensor is broken.</description>
- </element>
- </enum>
- <enum name="IgnitionStatus">
- <description>Reflects the status of ignition.</description>
- <element name="UNKNOWN" internal_name="IS_UNKNOWN">
- <description> The information is not acceptable. </description>
- </element>
- <element name="OFF" internal_name="IS_OFF">
- <description> The ignition is off.</description>
- </element>
- <element name="ACCESSORY" internal_name="IS_ACCESSORY">
- <description> The accessories are active (power windows, audio, display, etc.).</description>
- </element>
- <element name="RUN" internal_name="IS_RUN">
- <description> Ignition is active.</description>
- </element>
- <element name="START" internal_name="IS_START">
- <description> Starter is switched.</description>
- </element>
- <element name="INVALID" internal_name="IS_INVALID">
- <description> The data is provided, but there is some sort of fault or problem.</description>
- </element>
- </enum>
- <enum name="DeviceLevelStatus">
- <description>Reflects the reported component status of the connected device, if reported.</description>
- <element name="ZERO_LEVEL_BARS">
- </element>
- <element name="ONE_LEVEL_BARS">
- </element>
- <element name="TWO_LEVEL_BARS">
- </element>
- <element name="THREE_LEVEL_BARS">
- </element>
- <element name="FOUR_LEVEL_BARS">
- </element>
- <element name="NOT_PROVIDED">
- </element>
- </enum>
- <enum name="PrimaryAudioSource">
- <description>Reflects the current primary audio source (if selected).</description>
- <element name="NO_SOURCE_SELECTED">
- </element>
- <element name="USB">
- </element>
- <element name="USB2">
- </element>
- <element name="BLUETOOTH_STEREO_BTST">
- </element>
- <element name="LINE_IN">
- </element>
- <element name="IPOD">
- </element>
- <element name="MOBILE_APP">
- </element>
- </enum>
- <enum name="CompassDirection">
- <description>The list of potential compass directions</description>
- <element name="NORTH">
- </element>
- <element name="NORTHWEST">
- </element>
- <element name="WEST">
- </element>
- <element name="SOUTHWEST">
- </element>
- <element name="SOUTH">
- </element>
- <element name="SOUTHEAST">
- </element>
- <element name="EAST">
- </element>
- <element name="NORTHEAST">
- </element>
- </enum>
- <enum name="Dimension">
- <description>The supported dimensions of the GPS</description>
- <element name="NO_FIX" internal_name="Dimension_NO_FIX">
- <description>No GPS at all</description>
- </element>
- <element name="2D" internal_name="Dimension_2D">
- <description>Longitude and lattitude</description>
- </element>
- <element name="3D" internal_name="Dimension_3D">
- <description>Longitude and lattitude and altitude</description>
- </element>
- </enum>
- <enum name="TouchType">
- <element name="BEGIN"/>
- <element name="MOVE"/>
- <element name="END"/>
- </enum>
- <enum name="WarningLightStatus">
- <description>Reflects the status of a cluster instrument warning light.</description>
- <element name="OFF" internal_name="WLS_OFF">
- </element>
- <element name="ON" internal_name="WLS_ON">
- </element>
- <element name="FLASH" internal_name="WLS_FLASH">
- </element>
- <element name="NOT_USED" internal_name="WLS_NOT_USED">
- </element>
- </enum>
- <enum name="VehicleDataResultCode">
- <description>Enumeration that describes possible result codes of a vehicle data entry request.</description>
- <element name="SUCCESS" internal_name="VDRC_SUCCESS"/>
- <element name="TRUNCATED_DATA" internal_name="VDRC_TRUNCATED_DATA"/>
- <element name="DISALLOWED" internal_name="VDRC_DISALLOWED"/>
- <element name="USER_DISALLOWED" internal_name="VDRC_USER_DISALLOWED"/>
- <element name="INVALID_ID" internal_name="VDRC_INVALID_ID"/>
- <element name="VEHICLE_DATA_NOT_AVAILABLE" internal_name="VDRC_DATA_NOT_AVAILABLE"/>
- <element name="DATA_ALREADY_SUBSCRIBED" internal_name="VDRC_DATA_ALREADY_SUBSCRIBED"/>
- <element name="DATA_NOT_SUBSCRIBED" internal_name="VDRC_DATA_NOT_SUBSCRIBED"/>
- <element name="IGNORED" internal_name="VDRC_IGNORED"/>
- </enum>
- <enum name="VehicleDataType">
- <description>Defines the data types that can be published and subscribed to.</description>
- <element name="VEHICLEDATA_GPS">
- <description>Notifies GPSData may be subscribed</description>
- </element>
- <element name="VEHICLEDATA_SPEED"/>
- <element name="VEHICLEDATA_RPM"/>
- <element name="VEHICLEDATA_FUELLEVEL"/>
- <element name="VEHICLEDATA_FUELLEVEL_STATE"/>
- <element name="VEHICLEDATA_FUELCONSUMPTION"/>
- <element name="VEHICLEDATA_EXTERNTEMP"/>
- <element name="VEHICLEDATA_VIN"/>
- <element name="VEHICLEDATA_PRNDL"/>
- <element name="VEHICLEDATA_TIREPRESSURE"/>
- <element name="VEHICLEDATA_ODOMETER"/>
- <element name="VEHICLEDATA_BELTSTATUS"/>
- <element name="VEHICLEDATA_BODYINFO"/>
- <element name="VEHICLEDATA_DEVICESTATUS"/>
- <element name="VEHICLEDATA_ECALLINFO"/>
- <element name="VEHICLEDATA_AIRBAGSTATUS"/>
- <element name="VEHICLEDATA_EMERGENCYEVENT"/>
- <element name="VEHICLEDATA_CLUSTERMODESTATUS"/>
- <element name="VEHICLEDATA_MYKEY"/>
- <element name="VEHICLEDATA_BRAKING"/>
- <element name="VEHICLEDATA_WIPERSTATUS"/>
- <element name="VEHICLEDATA_HEADLAMPSTATUS"/>
- <element name="VEHICLEDATA_BATTVOLTAGE"/>
- <element name="VEHICLEDATA_ENGINETORQUE"/>
- <element name="VEHICLEDATA_ACCPEDAL"/>
- <element name="VEHICLEDATA_STEERINGWHEEL"/>
- </enum>
- <enum name="WiperStatus">
- <description>Reflects the status of the wipers.</description>
- <element name="OFF">
- <description> The wipers are off.</description>
- </element>
- <element name="AUTO_OFF">
- <description> The wipers are automatically off </description>
- </element>
- <element name="OFF_MOVING">
- <description> Means that though set to off, somehow the wipers have been engaged (physically moved enough to engage a wiping motion).</description>
- </element>
- <element name="MAN_INT_OFF">
- <description> The wipers are manually off after having been working.</description>
- </element>
- <element name="MAN_INT_ON">
- <description> The wipers are manually on.</description>
- </element>
- <element name="MAN_LOW">
- <description> The wipers are manually set to low speed.</description>
- </element>
- <element name="MAN_HIGH">
- <description> The wipers are manually set to high speed.</description>
- </element>
- <element name="MAN_FLICK">
- <description> The wipers are manually set for doing a flick.</description>
- </element>
- <element name="WASH">
- <description> The wipers are set to use the water from vehicle washer bottle for cleaning the windscreen.</description>
- </element>
- <element name="AUTO_LOW">
- <description> The wipers are automatically set to low speed.</description>
- </element>
- <element name="AUTO_HIGH">
- <description> The wipers are automatically set to high speed.</description>
- </element>
- <element name="COURTESYWIPE">
- <description> This is for when a user has just initiated a WASH and several seconds later a secondary wipe is automatically initiated to clear remaining fluid.</description>
- </element>
- <element name="AUTO_ADJUST">
- <description> This is set as the user moves between possible automatic wiper speeds.</description>
- </element>
- <element name="STALLED">
- <description> The wiper is stalled to its place. </description>
- </element>
- <element name="NO_DATA_EXISTS">
- <description> The sensor / module cannot provide any information for wiper.</description>
- </element>
- </enum>
- <enum name="SamplingRate">
- <description>Describes different sampling options for PerformAudioPassThru.</description>
- <element name="8KHZ" internal_name="RATE_8KHZ"/>
- <element name="16KHZ" internal_name="RATE_16KHZ"/>
- <element name="22KHZ" internal_name="RATE_22KHZ"/>
- <element name="44KHZ" internal_name="RATE_44KHZ"/>
- </enum>
- <enum name="BitsPerSample">
- <description>Describes different quality options for PerformAudioPassThru.</description>
- <element name="8_BIT" internal_name="RATE_8_BIT"/>
- <element name="16_BIT" internal_name="RATE_16_BIT"/>
- </enum>
- <enum name="AudioType">
- <description>Describes different audio type options for PerformAudioPassThru.</description>
- <element name="PCM"/>
- </enum>
- <enum name="KeyboardLayout">
- <description>Enumeration listing possible keyboard layouts.</description>
- <element name="QWERTY"/>
- <element name="QWERTZ"/>
- <element name="AZERTY"/>
- </enum>
- <enum name="KeyboardEvent">
- <description>Enumeration listing possible keyboard events.</description>
- <element name="KEYPRESS"/>
- <element name="ENTRY_SUBMITTED"/>
- <element name="ENTRY_VOICE"/>
- <element name="ENTRY_CANCELLED"/>
- <element name="ENTRY_ABORTED"/>
- </enum>
- <enum name="KeypressMode">
- <description>Enumeration listing possible keyboard events.</description>
- <element name="SINGLE_KEYPRESS">
- <description>Each keypress is individually sent as the user presses the keyboard keys.</description>
- </element>
- <element name="QUEUE_KEYPRESSES">
- <description>The keypresses are queued and a string is eventually sent once the user chooses to submit their entry.</description>
- </element>
- <element name="RESEND_CURRENT_ENTRY">
- <description>The keypresses are queue and a string is sent each time the user presses a keyboard key; the string contains the entire current entry.</description>
- </element>
- </enum>
- <enum name="AmbientLightStatus">
- <description>Reflects the status of the ambient light sensor.</description>
- <element name="NIGHT"/>
- <element name="TWILIGHT_1"/>
- <element name="TWILIGHT_2"/>
- <element name="TWILIGHT_3"/>
- <element name="TWILIGHT_4"/>
- <element name="DAY"/>
- <element name="UNKNOWN"/>
- <element name="INVALID"/>
- </enum>
- <enum name="FileType">
- <description>Enumeration listing possible file types.</description>
- <element name="GRAPHIC_BMP"/>
- <element name="GRAPHIC_JPEG"/>
- <element name="GRAPHIC_PNG"/>
- <element name="AUDIO_WAVE"/>
- <element name="AUDIO_MP3"/>
- <element name="AUDIO_AAC"/>
- <element name="BINARY"/>
- <element name="JSON"/>
- </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"/>
- <element name="QUERY_APPS"/>
- <element name="LAUNCH_APP"/>
- <element name="LOCK_SCREEN_ICON_URL"/>
- <element name="TRAFFIC_MESSAGE_CHANNEL"/>
- <element name="DRIVER_PROFILE"/>
- <element name="VOICE_SEARCH"/>
- <element name="NAVIGATION"/>
- <element name="PHONE"/>
- <element name="CLIMATE"/>
- <element name="SETTINGS"/>
- <element name="VEHICLE_DIAGNOSTICS"/>
- <element name="EMERGENCY"/>
- <element name="MEDIA"/>
- <element name="FOTA"/>
- </enum>
- <enum name="ECallConfirmationStatus">
- <description>Reflects the status of the eCall Notification.</description>
- <element name="NORMAL" internal_name="ECCS_NORMAL">
- </element>
- <element name="CALL_IN_PROGRESS" internal_name="ECCS_CALL_IN_PROGRESS">
- </element>
- <element name="CALL_CANCELLED" internal_name="ECCS_CALL_CANCELLED">
- </element>
- <element name="CALL_COMPLETED">
- </element>
- <element name="CALL_UNSUCCESSFUL" internal_name="ECCS_CALL_UNSUCCESSFUL">
- </element>
- <element name="ECALL_CONFIGURED_OFF" internal_name="ECCS_ECALL_CONFIGURED_OFF">
- </element>
- <element name="CALL_COMPLETE_DTMF_TIMEOUT" internal_name="ECCS_CALL_COMPLETE_DTMF_TIMEOUT">
- </element>
- </enum>
- <enum name="VehicleDataNotificationStatus">
- <description>Reflects the status of a vehicle data notification.</description>
- <element name="NOT_SUPPORTED" internal_name="VDNS_NOT_SUPPORTED">
- </element>
- <element name="NORMAL" internal_name="VDNS_NORMAL">
- </element>
- <element name="ACTIVE" internal_name="VDNS_ACTIVE">
- </element>
- <element name="NOT_USED" internal_name="VDNS_NOT_USED">
- </element>
- </enum>
- <enum name="EmergencyEventType">
- <description>Reflects the emergency event status of the vehicle.</description>
- <element name="NO_EVENT" internal_name="EET_NO_EVENT">
- </element>
- <element name="FRONTAL" internal_name="EET_FRONTAL">
- </element>
- <element name="SIDE" internal_name="EET_SIDE">
- </element>
- <element name="REAR" internal_name="EET_REAR">
- </element>
- <element name="ROLLOVER" internal_name="EET_ROLLOVER">
- </element>
- <element name="NOT_SUPPORTED" internal_name="EET_NOT_SUPPORTED">
- </element>
- <element name="FAULT" internal_name="EET_FAULT">
- </element>
- </enum>
- <enum name="FuelCutoffStatus">
- <description>Reflects the status of the RCM fuel cutoff.</description>
- <element name="TERMINATE_FUEL" internal_name="FCS_TERMINATE_FUEL">
- </element>
- <element name="NORMAL_OPERATION" internal_name="FCS_NORMAL_OPERATION">
- </element>
- <element name="FAULT" internal_name="FCS_FAULT">
- </element>
- </enum>
- <enum name="PowerModeQualificationStatus">
- <description>Reflects the status of the current power mode qualification.</description>
- <element name="POWER_MODE_UNDEFINED">
- </element>
- <element name="POWER_MODE_EVALUATION_IN_PROGRESS">
- </element>
- <element name="NOT_DEFINED">
- </element>
- <element name="POWER_MODE_OK">
- </element>
- </enum>
- <enum name="CarModeStatus">
- <description>Reflects the status of the current car mode.</description>
- <element name="NORMAL" internal_name="CMS_NORMAL">
- </element>
- <element name="FACTORY" internal_name="CMS_FACTORY">
- </element>
- <element name="TRANSPORT" internal_name="CMS_TRANSPORT">
- </element>
- <element name="CRASH" internal_name="CMS_CRASH">
- </element>
- </enum>
- <enum name="PowerModeStatus">
- <description>Reflects the status of the current power mode.</description>
- <element name="KEY_OUT">
- </element>
- <element name="KEY_RECENTLY_OUT">
- </element>
- <element name="KEY_APPROVED_0">
- </element>
- <element name="POST_ACCESORY_0">
- </element>
- <element name="ACCESORY_1">
- </element>
- <element name="POST_IGNITION_1">
- </element>
- <element name="IGNITION_ON_2">
- </element>
- <element name="RUNNING_2">
- </element>
- <element name="CRANK_3">
- </element>
- </enum>
- <enum name="CharacterSet">
- <description>The list of potential character sets</description>
- <element name="TYPE2SET">
- <description>See [@TODO: create file ref]</description>
- </element>
- <element name="TYPE5SET">
- <description>See [@TODO: create file ref]</description>
- </element>
- <element name="CID1SET">
- <description>See [@TODO: create file ref]</description>
- </element>
- <element name="CID2SET">
- <description>See [@TODO: create file ref]</description>
- </element>
- </enum>
- <!-- End of IVI part-->
- <enum name="AppPriority">
- <element name="EMERGENCY"/>
- <element name="NAVIGATION"/>
- <element name="VOICE_COMMUNICATION"/>
- <element name="COMMUNICATION"/>
- <element name="NORMAL"/>
- <element name="NONE"/>
- </enum>
-<enum name="MethodName">
- <description>Defines the type of the request which causes text-to-speech prompt</description>
- <element name="ALERT"/>
- <element name="SPEAK"/>
- <element name="AUDIO_PASS_THRU"/>
- <element name="ALERT_MANEUVER"/>
-</enum>
-
-<enum name="AlertType">
-<description>Defines the type of the request which causes text-to-speech prompt</description>
-<element name="UI"/>
-<element name="BOTH"/>
-</enum>
-
-<enum name="HMILevel">
- <element name="FULL"/>
- <element name="LIMITED"/>
- <element name="BACKGROUND"/>
- <element name="NONE"/>
-</enum>
-
-<enum name="EventTypes">
- <description>Reflects the current active event</description>
- <element name="AUDIO_SOURCE">
- <description>Navigated to audio(radio, etc)</description>
- </element>
- <element name="EMBEDDED_NAVI">
- <description>Navigated to navigation screen</description>
- </element>
- <element name="PHONE_CALL">
- <description>Phone call is active</description>
- </element>
- <element name="EMERGENCY_EVENT">
- <description>Active emergency event, active parking event</description>
- </element>
- <element name="DEACTIVATE_HMI">
- <description> GAL/DIO is active </description>
- </element>
-</enum>
-
-<enum name="VideoStreamingProtocol">
- <description>Enum for each type of video streaming protocol type.</description>
- <element name="RAW">
- <description>
- Raw stream bytes that contains no timestamp data and is the lowest supported video streaming
- </description>
- </element>
- <element name="RTP">
- <description>
- RTP facilitates the transfer of real-time data. Information provided by this protocol include
- timestamps (for synchronization), sequence numbers (for packet loss and reordering detection)
- and the payload format which indicates the encoded format of the data.
- </description>
- </element>
- <element name="RTSP">
- <description>
- The transmission of streaming data itself is not a task of RTSP. Most RTSP servers use the
- Real-time Transport Protocol (RTP) in conjunction with Real-time Control Protocol (RTCP)
- for media stream delivery. However, some vendors implement proprietary transport protocols.
- </description>
- </element>
- <element name="RTMP">
- <description>
- Real-Time Messaging Protocol (RTMP) was initially a proprietary protocol developed by
- Macromedia for streaming audio, video and data over the Internet, between a Flash player
- and a server. Macromedia is now owned by Adobe, which has released an incomplete version
- of the specification of the protocol for public use.
- </description>
- </element>
- <element name="WEBM">
- <description>
- The WebM container is based on a profile of Matroska. WebM initially supported VP8 video and
- Vorbis audio streams. In 2013 it was updated to accommodate VP9 video and Opus audio.
- </description>
- </element>
-</enum>
-
-<enum name="VideoStreamingCodec">
- <description>Enum for each type of video streaming codec.</description>
- <element name="H264">
- <description>
- A block-oriented motion-compensation-based video compression standard.
- As of 2014 it is one of the most commonly used formats for the recording, compression, and
- distribution of video content.
- </description>
- </element>
- <element name="H265">
- <description>
- High Efficiency Video Coding (HEVC), also known as H.265 and MPEG-H Part 2, is a video
- compression standard, one of several potential successors to the widely used AVC (H.264 or
- MPEG-4 Part 10). In comparison to AVC, HEVC offers about double the data compression ratio
- at the same level of video quality, or substantially improved video quality at the same
- bit rate. It supports resolutions up to 8192x4320, including 8K UHD.
- </description>
- </element>
- <element name="Theora">
- <description>
- Theora is derived from the formerly proprietary VP3 codec, released into the public domain
- by On2 Technologies. It is broadly comparable in design and bitrate efficiency to
- MPEG-4 Part 2, early versions of Windows Media Video, and RealVideo while lacking some of
- the features present in some of these other codecs. It is comparable in open standards
- philosophy to the BBC's Dirac codec.
- </description>
- </element>
- <element name="VP8">
- <description>
- VP8 can be multiplexed into the Matroska-based container format WebM along with Vorbis and
- Opus audio. The image format WebP is based on VP8's intra-frame coding. VP8's direct
- successor, VP9, and the emerging royalty-free internet video format AV1 from the Alliance for
- Open Media (AOMedia) are based on VP8.
- </description>
- </element>
- <element name="VP9">
- <description>
- Similar to VP8, but VP9 is customized for video resolutions beyond high-definition video (UHD)
- and also enables lossless compression.
- </description>
- </element>
-</enum>
-
- <!-- Policies -->
- <enum name="UpdateResult">
- <element name="UP_TO_DATE"/>
- <element name="UPDATING"/>
- <element name="UPDATE_NEEDED"/>
- </enum>
- <enum name="SystemError">
- <element name="SYNC_REBOOTED"/>
- <element name="SYNC_OUT_OF_MEMMORY"/>
- </enum>
- <enum name="StatisticsType">
- <element name="iAPP_BUFFER_FULL"/>
- </enum>
- <enum name="ConsentSource">
- <element name="GUI"/>
- <element name="VUI"/>
- </enum>
- <enum name="DeviceState">
- <element name="UNKNOWN"/>
- <element name="UNPAIRED"/>
- </enum>
- <struct name="DeviceInfo">
- <param name="name" type="String" mandatory="true">
- <description>The name of the device connected.</description>
- </param>
- <param name="id" type="String" mandatory="true">
- <description>The ID of the device connected</description>
- </param>
- <param name="transportType" type="Common.TransportType" mandatory="false">
- <description>The transport type the named-app's-device is connected over HU(BlueTooth, USB or WiFi). It must be provided in OnAppRegistered and in UpdateDeviceList</description>
- </param>
- <param name="isSDLAllowed" type="Boolean" mandatory="false">
- <description>Sent by SDL in UpdateDeviceList. &#8217;true&#8217; &#8211; if device is allowed for PolicyTable Exchange; &#8216;false&#8217; &#8211; if device is NOT allowed for PolicyTable Exchange </description>
- </param>
- </struct>
- <struct name="UserFriendlyMessage" scope="internal">
- <param name="messageCode" type="String" mandatory="true"/>
- <param name="ttsString" type="String" mandatory="false"/>
- <param name="label" type="String" mandatory="false"/>
- <param name="line1" type="String" mandatory="false"/>
- <param name="line2" type="String" mandatory="false"/>
- <param name="textBody" type="String" mandatory="false"/>
- </struct>
- <struct name="PermissionItem">
- <param name="name" type="String" mandatory="true">
- <description>Code of message of user-friendly text about functional group to be allowed/disallowed</description>
- </param>
- <param name="id" type="Integer" mandatory="true">
- <description>Id of corresponding functional group, needed by SDL.</description>
- </param>
- <param name="allowed" type="Boolean" mandatory="false">
- <description>Specifies whether functionality was allowed/disallowed. If ommited - no information about User Consent is yet found for app.</description>
- </param>
- </struct>
- <struct name="ServiceInfo">
- <param name="url" type="String" mandatory="true">
- <description>Get URL based on service type.</description>
- </param>
- <param name="policyAppId" type="String" mandatory="false">
- <description>Used if URL needed are specific for application.</description>
- </param>
- </struct>
- <!-- End of Policies -->
- <struct name="TextField">
- <param name="name" type="Common.TextFieldName" mandatory="true">
- <description>The name that identifies the field. See TextFieldName.</description>
- </param>
- <param name="characterSet" type="Common.CharacterSet" mandatory="true">
- <description>The character set that is supported in this field. See CharacterSet.</description>
- </param>
- <param name="width" type="Integer" minvalue="1" maxvalue="500" mandatory="true">
- <description>The number of characters in one row of this field.</description>
- </param>
- <param name="rows" type="Integer" minvalue="1" maxvalue="8" mandatory="true">
- <description>The number of rows of this field.</description>
- </param>
- </struct>
- <struct name="ButtonCapabilities">
- <description>Contains the information about capabilities of a button.</description>
- <param name="name" type="Common.ButtonName" mandatory="true">
- <description>The name of the Button from the ButtonName enum</description>
- </param>
- <param name="shortPressAvailable" type="Boolean" mandatory="true">
- <description>The button supports a short press. Whenever the button is pressed short, onButtonPressed(SHORT) should be invoked.</description>
- </param>
- <param name="longPressAvailable" type="Boolean" mandatory="true">
- <description>The button supports a LONG press. Whenever the button is pressed long, onButtonPressed(LONG) should be invoked.</description>
- </param>
- <param name="upDownAvailable" type="Boolean" mandatory="true">
- <description>The button supports "button down" and "button up". Whenever the button is pressed, onButtonEvent(DOWN) should be invoked. Whenever the button is released, onButtonEvent(UP) should be invoked.</description>
- </param>
- </struct>
- <struct name="VehicleDataResult">
- <description>Individual published data request result</description>
- <param name="dataType" type="Common.VehicleDataType" mandatory="true">
- <description>Defined published data element type.</description>
- </param>
- <param name="resultCode" type="Common.VehicleDataResultCode" mandatory="true">
- <description>Published data result code.</description>
- </param>
- </struct>
- <struct name="TouchCoord">
- <param name="x" type="Integer" mandatory="true" minvalue="0" maxvalue="10000">
- <description>The x coordinate of the touch.</description>
- </param>
- <param name="y" type="Integer" mandatory="true" minvalue="0" maxvalue="10000">
- <description>The y coordinate of the touch.</description>
- </param>
- </struct>
- <struct name="TouchEvent">
- <param name="id" type="Integer" mandatory="true" minvalue="0" maxvalue="9">
- <description>
- A touch's unique identifier. The application can track the current touch events by id.
- If a touch event has type begin, the id should be added to the set of touches.
- If a touch event has type end, the id should be removed from the set of touches.
- </description>
- </param>
- <param name="ts" type="Integer" mandatory="true" array="true" minvalue="0" maxvalue="2147483647" minsize="1" maxsize="1000">
- <description>
- The time that the touch was recorded. This number can the time since the beginning of the session or something else as long as the units are in milliseconds.
- The timestamp is used to determined the rate of change of position of a touch.
- The application also uses the time to verify whether two touches, with different ids, are part of a single action by the user.
- If there is only a single timestamp in this array, it is the same for every coordinate in the coordinates array.
- </description>
- </param>
- <param name="c" type="Common.TouchCoord" mandatory="true" array="true" minsize="1" maxsize="1000">
- </param>
- </struct>
- <struct name="PresetBankCapabilities">
- <description>Contains information about on-screen preset capabilities (whether the HW preset buttons could be duplicated with onscreen buttons).</description>
- <param name="onScreenPresetsAvailable" type="Boolean" mandatory="true">
- <description>Must be true if onscreen custom presets are available.</description>
- </param>
- </struct>
- <struct name="Image">
- <param name="value" maxlength="65535" type="String" mandatory="true">
- <description>The path to the dynamic image stored on HU or the static binary image itself.</description>
- </param>
- <param name="imageType" type="Common.ImageType" mandatory="true">
- <description>Describes, whether it is a static or dynamic image.</description>
- </param>
- </struct>
- <struct name="SoftButton">
- <param name="type" type="Common.SoftButtonType" mandatory="true">
- <description>Describes, whether text, icon or both text and image should be displayed on the soft button. See softButtonType</description>
- </param>
- <param name="text" maxlength="500" type="String" mandatory="false">
- <description>Optional text to be displayed (if defined as TEXT or BOTH)</description>
- </param>
- <param name="image" type="Common.Image" mandatory="false">
- <description>Optional image struct for SoftButton (if defined as IMAGE or BOTH)</description>
- </param>
- <param name="isHighlighted" type="Boolean" mandatory="false">
- <description>If true, must be highlighted</description>
- <description>If false, must be not</description>
- </param>
- <param name="softButtonID" type="Integer" minvalue="0" maxvalue="65535" mandatory="true">
- <description>Value which must be returned via OnButtonPress / OnButtonEvent</description>
- </param>
- <param name="systemAction" type="Common.SystemAction" mandatory="true">
- <description>Parameter indicates whether clicking a SoftButton must call a specific system action. See SystemAction</description>
- </param>
- </struct>
- <struct name="TTSChunk">
- <description>A TTS chunk, that consists of the text/phonemes to be spoken</description>
- <param name="text" type="String" mandatory="true" maxlength="500">
- <description>The text or phonemes to be spoken.</description>
- </param>
- <param name="type" type="Common.SpeechCapabilities" mandatory="true">
- <description>Describes, whether it is text or a specific phoneme set. See SpeechCapabilities.</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">
- <description>The mobile application name, e.g. "Ford Drive Green".</description>
- </param>
- <param name="ngnMediaScreenAppName" type="String" maxlength="100" mandatory="false">
- <description>Provides an abbreviated version of the app name (if needed), that may be displayed on the NGN media screen.</description>
- <description>If not provided, the appName should be used instead (and may be truncated if too long)</description>
- </param>
- <param name="icon" type="String" mandatory="false">
- <description>Path to application icon stored on HU.</description>
- </param>
- <param name="deviceInfo" type="Common.DeviceInfo" mandatory="true">
- <description>The ID, serial number, transport type the named-app's-device is connected over to HU.</description>
- </param>
- <param name="policyAppID" type="String" maxlength="50" minlength="1" mandatory="true">
- <description>Policy ID(=the appID the application registers with) of registered application.</description>
- </param>
- <param name="ttsName" type="Common.TTSChunk" minsize="1" maxsize="100" array="true" mandatory="false">
- <description>
- TTS string for VR recognition of the mobile application name, e.g. "Ford Drive Green".
- Meant to overcome any failing on speech engine in properly pronouncing / understanding app name.
- May not be empty.
- May not start with a new line character.
- Not unique value
- </description>
- </param>
- <param name="vrSynonyms" type="String" maxlength="40" minsize="1" maxsize="100" array="true" mandatory="false">
- <description>
- Defines an additional voice recognition command.
- Must not interfere with any name of previously registered applications(SDL makes check).
- </description>
- </param>
- <param name="appID" type="Integer" mandatory="true">
- <description>Unique (during ignition cycle) id of the application. To be used in all RPCs sent by both HU system and SDL</description>
- </param>
- <param name="hmiDisplayLanguageDesired" type="Common.Language" mandatory="true">
- <description>The language the application intends to use on HU </description>
- </param>
- <param name="isMediaApplication" type="Boolean" mandatory="true">
- <description>Indicates whether it is a media or a non-media application.</description>
- </param>
- <param name="appType" type="Common.AppHMIType" minsize="1" maxsize="100" array="true" mandatory="false">
- <description>List of all applicable app types stating which classifications to be given to the app.</description>
- <description>e.g. for platforms like GEN2, this determines which "corner(s)" the app can populate.</description>
- </param>
- <param name="greyOut" type="Boolean" mandatory="false">
- <description>Indicates whether application should be dimmed on the screen.</description>
- <description>Applicable only for apps received through QueryApps and still not registered.</description>
- </param>
- <param name="requestType" type="Common.RequestType" minsize="0" maxsize="100" array="true" mandatory="false">
- <description>The list of SystemRequest's RequestTypes allowed by policies for the named application</description>
- <description>(the app's SystemRequest sent with RequestType out of this list will get 'disallowed' response from SDL).</description>
- <description>If SDL sends an empty array - any RequestType is allowed for this app.</description>
- <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>
- </struct>
- <struct name="MenuParams">
- <param name="parentID" type="Integer" minvalue="0" maxvalue="2000000000" mandatory="false">
- <description>unique ID of the sub menu, the command must be added to.</description>
- <description>If not provided, the command must be added to the top level of the in application menu.</description>
- </param>
- <param name="position" type="Integer" minvalue="0" maxvalue="1000" mandatory="false">
- <description>Position within the items that are at the top level of the in application menu.</description>
- <description>0 should insert at the front.</description>
- <description>1 should insert at the second position.</description>
- <description>if position is greater than or equal to the number of items on the top level, the the sub menu/command should be appended to the end.</description>
- <description>If this param is omitted the entry should be added at the end.</description>
- </param>
- <param name="menuName" type="String" maxlength="500" mandatory="true">
- <description>The name of the sub menu/command.</description>
- </param>
- </struct>
- <struct name="Choice">
- <description>A choice is an option given to the user which can be selected either by menu, or through voice recognition system.</description>
- <param name="choiceID" type="Integer" minvalue="0" maxvalue="65535" mandatory="true">
- <description> The unique within the concerned application identifier for this choice </description>
- </param>
- <param name="menuName" type="String" maxlength="500" mandatory="false">
- <description> The name of the choice </description>
- </param>
- <param name="image" type="Common.Image" mandatory="false">
- <description> The image for representing the choice </description>
- </param>
- <param name="secondaryText" maxlength="500" type="String" mandatory="false">
- <description>Optional secondary text to display; e.g. address of POI in a search result entry</description>
- </param>
- <param name="tertiaryText" maxlength="500" type="String" mandatory="false">
- <description>Optional tertiary text to display; e.g. distance to POI for a search result entry</description>
- </param>
- <param name="secondaryImage" type="Image" mandatory="false">
- <description>Optional secondary image struct for choice</description>
- </param>
- </struct>
- <struct name="VrHelpItem">
- <param name="text" maxlength="500" type="String" mandatory="true">
- <description>Text to display for VR Help item</description>
- </param>
- <param name="image" type="Common.Image" mandatory="false">
- <description>Image struct for VR Help item</description>
- </param>
- <param name="position" type="Integer" minvalue="1" maxvalue="100" mandatory="true">
- <description>Position to display item in VR Help list</description>
- </param>
- </struct>
- <struct name="TimeFormat">
- <param name="hours" type="Integer" minvalue="0" maxvalue="59" mandatory="true">
- <description>The hour of the media clock.</description>
- <description>Some units only support a max of 19 hours. If out of range, it should be rejected.</description>
- </param>
- <param name="minutes" type="Integer" minvalue="0" maxvalue="59" mandatory="true"/>
- <param name="seconds" type="Integer" minvalue="0" maxvalue="59" mandatory="true"/>
- </struct>
- <struct name="TouchEventCapabilities">
- <param name="pressAvailable" type="Boolean" mandatory="true">
- </param>
- <param name="multiTouchAvailable" type="Boolean" mandatory="true">
- </param>
- <param name="doublePressAvailable" type="Boolean" mandatory="true">
- </param>
- </struct>
- <struct name="ImageResolution">
- <param name="resolutionWidth" type="Integer" minvalue="1" maxvalue="10000" mandatory="true">
- <description>The image resolution width.</description>
- </param>
- <param name="resolutionHeight" type="Integer" minvalue="1" maxvalue="10000" mandatory="true">
- <description>The image resolution height.</description>
- </param>
- </struct>
- <struct name="ScreenParams">
- <param name="resolution" type="Common.ImageResolution" mandatory="true">
- <description>The resolution of the prescribed screen area.</description>
- </param>
- <param name="touchEventAvailable" type="Common.TouchEventCapabilities" mandatory="false">
- <description>Types of screen touch events available in screen area.</description>
- </param>
- </struct>
- <struct name="ImageField">
- <param name="name" type="Common.ImageFieldName" mandatory="true">
- <description>The name that identifies the field. See ImageFieldName.</description>
- </param>
- <param name="imageTypeSupported" type="Common.FileType" maxsize="100" array="true" mandatory="false" minsize="1">
- <description>The image types that are supported in this field. See FileType.</description>
- </param>
- <param name="imageResolution" type="Common.ImageResolution" mandatory="false">
- <description>The image resolution of this field.</description>
- </param>
- </struct>
- <struct name="VideoStreamingFormat">
- <description>Video streaming formats and their specifications.</description>
- <param name="protocol" type="Common.VideoStreamingProtocol" mandatory="true">
- <description>Protocol type, see VideoStreamingProtocol</description>
- </param>
- <param name="codec" type="Common.VideoStreamingCodec" mandatory="true">
- <description>Codec type, see VideoStreamingCodec</description>
- </param>
- </struct>
-
- <struct name="VideoConfig">
- <description>Configuration of a video stream.</description>
- <param name="protocol" type="Common.VideoStreamingProtocol" mandatory="false">
- <description>The video protocol configuration</description>
- </param>
- <param name="codec" type="Common.VideoStreamingCodec" mandatory="false">
- <description>The video codec configuration</description>
- </param>
- <param name="width" type="Integer" mandatory="false">
- <description>Width of the video stream, in pixels.</description>
- </param>
- <param name="height" type="Integer" mandatory="false">
- <description>Height of the video stream, in pixels.</description>
- </param>
- </struct>
- <struct name="DisplayCapabilities">
- <description>Contains information about the display capabilities.</description>
- <param name="displayType" type="Common.DisplayType" mandatory="true">
- <description>The type of the display. See DisplayType</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>
- </param>
- <param name="imageFields" type="Common.ImageField" minsize="1" maxsize="100" array="true" mandatory="false">
- <description>A set of all fields that support images. See ImageField</description>
- </param>
- <param name="mediaClockFormats" type="Common.MediaClockFormat" minsize="0" maxsize="100" array="true" mandatory="true">
- <description>A set of all supported formats of the media clock. See MediaClockFormat</description>
- </param>
- <param name="imageCapabilities" type="Common.ImageType" array="true" minsize="0" maxsize="2" mandatory="false">
- </param>
- <param name="graphicSupported" type="Boolean" mandatory="true">
- <description>The display's persistent screen supports referencing a static or dynamic image.</description>
- </param>
- <param name="templatesAvailable" type="String" minsize="0" maxsize="100" maxlength="100" array="true" mandatory="true">
- <description>A set of all predefined persistent display templates available on headunit. To be referenced in SetDisplayLayout.</description>
- </param>
- <param name="screenParams" type="Common.ScreenParams" mandatory="false">
- <description>A set of all parameters related to a prescribed screen area (e.g. for video / touch input).</description>
- </param>
- <param name="numCustomPresetsAvailable" type="Integer" minvalue="1" maxvalue="100" mandatory="false">
- <description>The number of on-screen custom presets available (if any); otherwise omitted.</description>
- </param>
- </struct>
- <struct name="SoftButtonCapabilities">
- <description>Contains information about a SoftButton's capabilities.</description>
- <param name="shortPressAvailable" type="Boolean" mandatory="true">
- <description>The button supports a short press.</description>
- <description>Whenever the button is pressed short, onButtonPressed( SHORT) must be invoked.</description>
- </param>
- <param name="longPressAvailable" type="Boolean" mandatory="true">
- <description>The button supports a LONG press.</description>
- <description>Whenever the button is pressed long, onButtonPressed( LONG) must be invoked.</description>
- </param>
- <param name="upDownAvailable" type="Boolean" mandatory="true">
- <description>The button supports "button down" and "button up".</description>
- <description>Whenever the button is pressed, onButtonEvent( DOWN) must be invoked.</description>
- <description>Whenever the button is released, onButtonEvent( UP) must be invoked.</description>
- </param>
- <param name="imageSupported" type="Boolean" mandatory="true">
- <description>Must be true if the button supports referencing a static or dynamic image.</description>
- </param>
- </struct>
- <struct name="HMICapabilities">
- <param name="navigation" type="Boolean" mandatory="false">
- <description>Availability of build in Nav. True: Available, False: Not Available</description>
- </param>
- <param name="phoneCall" type="Boolean" mandatory="false">
- <description>Availability of build in phone. True: Available, False: Not Available</description>
- </param>
- </struct>
- <struct name="AudioPassThruCapabilities">
- <description>
- Describes different audio type configurations for PerformAudioPassThru.
- e.g. 8kHz,8-bit,PCM
- </description>
- <param name="samplingRate" type="Common.SamplingRate" mandatory="true"/>
- <param name="bitsPerSample" type="Common.BitsPerSample" mandatory="true"/>
- <param name="audioType" type="Common.AudioType" mandatory="true"/>
- </struct>
- <struct name="TextFieldStruct">
- <param name="fieldName" type="Common.TextFieldName" mandatory="true">
- <description>The name of the field for displaying the text.</description>
- </param>
- <param name="fieldText" type="String" maxlength="500" mandatory="true">
- <description>The text itself.</description>
- </param>
- </struct>
- <struct name="KeyboardProperties">
- <description>Configuration of on-screen keyboard (if available).</description>
- <param name="language" type="Common.Language" mandatory="false">
- <description>The keyboard language.</description>
- </param>
- <param name="keyboardLayout" type="Common.KeyboardLayout" mandatory="false">
- <description>Desired keyboard layout.</description>
- </param>
- <param name="keypressMode" type="Common.KeypressMode" mandatory="false">
- <description>
- Desired keypress mode.
- If omitted, this value will be set to RESEND_CURRENT_ENTRY.
- </description>
- </param>
- <param name="limitedCharacterList" type="String" maxlength="1" minsize="1" maxsize="100" array="true" mandatory="false">
- <description>Array of keyboard characters to enable.</description>
- <description>All omitted characters will be greyed out (disabled) on the keyboard.</description>
- <description>If omitted, the entire keyboard will be enabled.</description>
- </param>
- <param name="autoCompleteText" type="String" maxlength="1000" mandatory="false">
- <description>Allows an app to prepopulate the text field with a suggested or completed entry as the user types</description>
- </param>
- </struct>
- <struct name="Turn">
- <param name="navigationText" type="Common.TextFieldStruct" mandatory="false">
- <description>Uses navigationText from TextFieldStruct.</description>
- </param>
- <param name="turnIcon" type="Common.Image" mandatory="false">
- </param>
- </struct>
- <struct name="VehicleType">
- <param name="make" type="String" maxlength="500" mandatory="false">
- <description>Make of the vehicle</description>
- <description>e.g. Ford</description>
- </param>
- <param name="model" type="String" maxlength="500" mandatory="false">
- <description>Model of the vehicle</description>
- <description>e.g. Fiesta</description>
- </param>
- <param name="modelYear" type="String" maxlength="500" mandatory="false">
- <description>Model Year of the vehicle</description>
- <description>e.g. 2013</description>
- </param>
- <param name="trim" type="String" maxlength="500" mandatory="false">
- <description>Trim of the vehicle</description>
- <description>e.g. SE</description>
- </param>
- </struct>
- <!--IVI part-->
- <struct name="GPSData">
- <description>Struct with the GPS data.</description>
- <param name="longitudeDegrees" type="Float" minvalue="-180" maxvalue="180" mandatory="false">
- </param>
- <param name="latitudeDegrees" type="Float" minvalue="-90" maxvalue="90" mandatory="false">
- </param>
- <param name="utcYear" type="Integer" minvalue="2010" maxvalue="2100" mandatory="false">
- <description>The current UTC year.</description>
- </param>
- <param name="utcMonth" type="Integer" minvalue="1" maxvalue="12" mandatory="false">
- <description>The current UTC month.</description>
- </param>
- <param name="utcDay" type="Integer" minvalue="1" maxvalue="31" mandatory="false">
- <description>The current UTC day.</description>
- </param>
- <param name="utcHours" type="Integer" minvalue="0" maxvalue="23" mandatory="false">
- <description>The current UTC hour.</description>
- </param>
- <param name="utcMinutes" type="Integer" minvalue="0" maxvalue="59" mandatory="false">
- <description>The current UTC minute.</description>
- </param>
- <param name="utcSeconds" type="Integer" minvalue="0" maxvalue="59" mandatory="false">
- <description>The current UTC second.</description>
- </param>
- <param name="compassDirection" type="Common.CompassDirection" mandatory="false">
- <description>See CompassDirection.</description>
- </param>
- <param name="pdop" type="Float" minvalue="0" maxvalue="10" mandatory="false">
- <description>PDOP.</description>
- </param>
- <param name="hdop" type="Float" minvalue="0" maxvalue="10" mandatory="false">
- <description>HDOP.</description>
- </param>
- <param name="vdop" type="Float" minvalue="0" maxvalue="10" mandatory="false">
- <description>VDOP.</description>
- </param>
- <param name="actual" type="Boolean" mandatory="false">
- <description>
- True, if actual.
- False, if infered.
- </description>
- </param>
- <param name="satellites" type="Integer" minvalue="0" maxvalue="31" mandatory="false">
- <description>Number of satellites in view</description>
- </param>
- <param name="dimension" type="Common.Dimension" mandatory="false">
- <description>See Dimension</description>
- </param>
- <param name="altitude" type="Float" minvalue="-10000" maxvalue="10000" mandatory="false">
- <description>Altitude in meters</description>
- </param>
- <param name="heading" type="Float" minvalue="0" maxvalue="359.99" mandatory="false">
- <description>The heading. North is 0. Resolution is 0.01</description>
- </param>
- <param name="speed" type="Float" minvalue="0" maxvalue="500" mandatory="false">
- <description>The speed in KPH</description>
- </param>
- </struct>
- <struct name="SingleTireStatus">
- <param name="status" type="Common.ComponentVolumeStatus" mandatory="true">
- <description>The status of component volume. See ComponentVolumeStatus.</description>
- </param>
- </struct>
- <struct name="DIDResult">
- <description>Individual requested DID result and data</description>
- <param name="resultCode" type="Common.VehicleDataResultCode" mandatory="true">
- <description>Individual DID result code.</description>
- </param>
- <param name="didLocation" type="Integer" minvalue="0" maxvalue="65535" mandatory="true">
- <description>Location of raw data (the address from ReadDID request)</description>
- </param>
- <param name="data" type="String" maxlength="5000" mandatory="false">
- <description>Raw DID-based data returned for requested element.</description>
- </param>
- </struct>
- <struct name="HeadLampStatus">
- <param name="lowBeamsOn" type="Boolean" mandatory="true">
- <description>Status of the low beam lamps.</description>
- </param>
- <param name="highBeamsOn" type="Boolean" mandatory="true">
- <description>Status of the high beam lamps.</description>
- </param>
- <param name="ambientLightSensorStatus" type="Common.AmbientLightStatus" mandatory="true">
- <description>Status of the ambient light sensor.</description>
- </param>
- </struct>
- <struct name="TireStatus">
- <description>The status and pressure of the tires.</description>
- <param name="pressureTelltale" type="Common.WarningLightStatus" mandatory="false">
- <description>Status of the Tire Pressure Telltale. See WarningLightStatus.</description>
- </param>
- <param name="leftFront" type="Common.SingleTireStatus" mandatory="false">
- <description>The status of the left front tire.</description>
- </param>
- <param name="rightFront" type="Common.SingleTireStatus" mandatory="false">
- <description>The status of the right front tire.</description>
- </param>
- <param name="leftRear" type="Common.SingleTireStatus" mandatory="false">
- <description>The status of the left rear tire.</description>
- </param>
- <param name="rightRear" type="Common.SingleTireStatus" mandatory="false">
- <description>The status of the right rear tire.</description>
- </param>
- <param name="innerLeftRear" type="Common.SingleTireStatus" mandatory="false">
- <description>The status of the inner left rear.</description>
- </param>
- <param name="innerRightRear" type="Common.SingleTireStatus" mandatory="false">
- <description>The status of the inner right rear.</description>
- </param>
- </struct>
- <struct name="BeltStatus">
- <param name="driverBeltDeployed" type="Common.VehicleDataEventStatus" mandatory="false">
- <description>See VehicleDataEventStatus.</description>
- </param>
- <param name="passengerBeltDeployed" type="Common.VehicleDataEventStatus" mandatory="false">
- <description>See VehicleDataEventStatus.</description>
- </param>
- <param name="passengerBuckleBelted" type="Common.VehicleDataEventStatus" mandatory="false">
- <description>See VehicleDataEventStatus.</description>
- </param>
- <param name="driverBuckleBelted" type="Common.VehicleDataEventStatus" mandatory="false">
- <description>See VehicleDataEventStatus.</description>
- </param>
- <param name="leftRow2BuckleBelted" type="Common.VehicleDataEventStatus" mandatory="false">
- <description>See VehicleDataEventStatus.</description>
- </param>
- <param name="passengerChildDetected" type="Common.VehicleDataEventStatus" mandatory="false">
- <description>See VehicleDataEventStatus.</description>
- </param>
- <param name="rightRow2BuckleBelted" type="Common.VehicleDataEventStatus" mandatory="false">
- <description>See VehicleDataEventStatus.</description>
- </param>
- <param name="middleRow2BuckleBelted" type="Common.VehicleDataEventStatus" mandatory="false">
- <description>See VehicleDataEventStatus.</description>
- </param>
- <param name="middleRow3BuckleBelted" type="Common.VehicleDataEventStatus" mandatory="false">
- <description>See VehicleDataEventStatus.</description>
- </param>
- <param name="leftRow3BuckleBelted" type="Common.VehicleDataEventStatus" mandatory="false">
- <description>See VehicleDataEventStatus.</description>
- </param>
- <param name="rightRow3BuckleBelted" type="Common.VehicleDataEventStatus" mandatory="false">
- <description>See VehicleDataEventStatus.</description>
- </param>
- <param name="leftRearInflatableBelted" type="Common.VehicleDataEventStatus" mandatory="false">
- <description>See VehicleDataEventStatus.</description>
- </param>
- <param name="rightRearInflatableBelted" type="Common.VehicleDataEventStatus" mandatory="false">
- <description>See VehicleDataEventStatus.</description>
- </param>
- <param name="middleRow1BeltDeployed" type="Common.VehicleDataEventStatus" mandatory="false">
- <description>See VehicleDataEventStatus.</description>
- </param>
- <param name="middleRow1BuckleBelted" type="Common.VehicleDataEventStatus" mandatory="false">
- <description>See VehicleDataEventStatus.</description>
- </param>
- </struct>
- <struct name="BodyInformation">
- <param name="parkBrakeActive" type="Boolean" mandatory="true">
- <description>Must be true if the park brake is active</description>
- </param>
- <param name="ignitionStableStatus" type="Common.IgnitionStableStatus" mandatory="true">
- <description>Information about the ignition switch. See IgnitionStableStatus.</description>
- </param>
- <param name="ignitionStatus" type="Common.IgnitionStatus" mandatory="true">
- <description>The status of the ignition. See IgnitionStatus.</description>
- </param>
- <param name="driverDoorAjar" type="Boolean" mandatory="false">
- <description>References signal "DrStatDrv_B_Actl".</description>
- </param>
- <param name="passengerDoorAjar" type="Boolean" mandatory="false">
- <description>References signal "DrStatPsngr_B_Actl".</description>
- </param>
- <param name="rearLeftDoorAjar" type="Boolean" mandatory="false">
- <description>References signal "DrStatRl_B_Actl".</description>
- </param>
- <param name="rearRightDoorAjar" type="Boolean" mandatory="false">
- <description>References signal "DrStatRr_B_Actl".</description>
- </param>
- </struct>
- <struct name="DeviceStatus">
- <param name="voiceRecOn" type="Boolean" mandatory="false">
- <description>Must be true if the voice recording is on.</description>
- </param>
- <param name="btIconOn" type="Boolean" mandatory="false">
- <description>Must be true if Bluetooth icon is displayed.</description>
- </param>
- <param name="callActive" type="Boolean" mandatory="false">
- <description>Must be true if there is an active call..</description>
- </param>
- <param name="phoneRoaming" type="Boolean" mandatory="false">
- <description>Must be true if ther is a phone roaming.</description>
- </param>
- <param name="textMsgAvailable" type="Boolean" mandatory="false">
- <description>Must be true if the text message is available.</description>
- </param>
- <param name="battLevelStatus" type="Common.DeviceLevelStatus" mandatory="false">
- <description>Device battery level status. See DeviceLevelStatus.</description>
- </param>
- <param name="stereoAudioOutputMuted" type="Boolean" mandatory="false">
- <description>Must be true if stereo audio output is muted.</description>
- </param>
- <param name="monoAudioOutputMuted" type="Boolean" mandatory="false">
- <description>Must be true if mono audio output is muted.</description>
- </param>
- <param name="signalLevelStatus" type="Common.DeviceLevelStatus" mandatory="false">
- <description>Device signal level status. See DeviceLevelStatus.</description>
- </param>
- <param name="primaryAudioSource" type="Common.PrimaryAudioSource" mandatory="false">
- <description>See PrimaryAudioSource.</description>
- </param>
- <param name="eCallEventActive" type="Boolean" mandatory="false">
- <description>Must be true if emergency call event is active.</description>
- </param>
- </struct>
- <struct name="ECallInfo">
- <param name="eCallNotificationStatus" type="Common.VehicleDataNotificationStatus" mandatory="true">
- <description>References signal "eCallNotification_4A". See VehicleDataNotificationStatus.</description>
- </param>
- <param name="auxECallNotificationStatus" type="Common.VehicleDataNotificationStatus" mandatory="true">
- <description>References signal "eCallNotification". See VehicleDataNotificationStatus.</description>
- </param>
- <param name="eCallConfirmationStatus" type="Common.ECallConfirmationStatus" mandatory="true">
- <description>References signal "eCallConfirmation". See ECallConfirmationStatus.</description>
- </param>
- </struct>
- <struct name="AirbagStatus">
- <param name="driverAirbagDeployed" type="Common.VehicleDataEventStatus" mandatory="true">
- <description>References signal "VedsDrvBag_D_Ltchd". See VehicleDataEventStatus.</description>
- </param>
- <param name="driverSideAirbagDeployed" type="Common.VehicleDataEventStatus" mandatory="true">
- <description>References signal "VedsDrvSideBag_D_Ltchd". See VehicleDataEventStatus.</description>
- </param>
- <param name="driverCurtainAirbagDeployed" type="Common.VehicleDataEventStatus" mandatory="true">
- <description>References signal "VedsDrvCrtnBag_D_Ltchd". See VehicleDataEventStatus.</description>
- </param>
- <param name="passengerAirbagDeployed" type="Common.VehicleDataEventStatus" mandatory="true">
- <description>References signal "VedsPasBag_D_Ltchd". See VehicleDataEventStatus.</description>
- </param>
- <param name="passengerCurtainAirbagDeployed" type="Common.VehicleDataEventStatus" mandatory="true">
- <description>References signal "VedsPasCrtnBag_D_Ltchd". See VehicleDataEventStatus.</description>
- </param>
- <param name="driverKneeAirbagDeployed" type="Common.VehicleDataEventStatus" mandatory="true">
- <description>References signal "VedsKneeDrvBag_D_Ltchd". See VehicleDataEventStatus.</description>
- </param>
- <param name="passengerSideAirbagDeployed" type="Common.VehicleDataEventStatus" mandatory="true">
- <description>References signal "VedsPasSideBag_D_Ltchd". See VehicleDataEventStatus.</description>
- </param>
- <param name="passengerKneeAirbagDeployed" type="Common.VehicleDataEventStatus" mandatory="true">
- <description>References signal "VedsKneePasBag_D_Ltchd". See VehicleDataEventStatus.</description>
- </param>
- </struct>
- <struct name="EmergencyEvent">
- <param name="emergencyEventType" type="Common.EmergencyEventType" mandatory="true">
- <description>References signal "VedsEvntType_D_Ltchd". See EmergencyEventType.</description>
- </param>
- <param name="fuelCutoffStatus" type="Common.FuelCutoffStatus" mandatory="true">
- <description>References signal "RCM_FuelCutoff". See FuelCutoffStatus.</description>
- </param>
- <param name="rolloverEvent" type="Common.VehicleDataEventStatus" mandatory="true">
- <description>References signal "VedsEvntRoll_D_Ltchd". See VehicleDataEventStatus.</description>
- </param>
- <param name="maximumChangeVelocity" type="Common.VehicleDataEventStatus" mandatory="true">
- <description>References signal "VedsMaxDeltaV_D_Ltchd". See VehicleDataEventStatus.</description>
- </param>
- <param name="multipleEvents" type="Common.VehicleDataEventStatus" mandatory="true">
- <description>References signal "VedsMultiEvnt_D_Ltchd". See VehicleDataEventStatus.</description>
- </param>
- </struct>
- <struct name="ClusterModeStatus">
- <param name="powerModeActive" type="Boolean" mandatory="true">
- <description>References signal "PowerMode_UB".</description>
- </param>
- <param name="powerModeQualificationStatus" type="Common.PowerModeQualificationStatus" mandatory="true">
- <description>References signal "PowerModeQF". See PowerModeQualificationStatus.</description>
- </param>
- <param name="carModeStatus" type="Common.CarModeStatus" mandatory="true">
- <description>References signal "CarMode". See CarMode.</description>
- </param>
- <param name="powerModeStatus" type="Common.PowerModeStatus" mandatory="true">
- <description>References signal "PowerMode". See PowerMode.</description>
- </param>
- </struct>
- <struct name="MyKey">
- <param name="e911Override" type="Common.VehicleDataStatus" mandatory="true">
- <description>Indicates whether e911 override is on. See VehicleDataStatus.</description>
- </param>
- </struct>
- <!--end of IVI part-->
- <!-- Remote Control -->
- <enum name="ModuleType">
- <element name="CLIMATE"/>
- <element name="RADIO"/>
- </enum>
-
- <enum name="RadioBand">
- <element name="AM"/>
- <element name="FM"/>
- <element name="XM"/>
- </enum>
-
- <struct name="RdsData">
- <param name="PS" type="String" minlength="0" maxlength="8" mandatory="false">
- <description>Program Service Name</description>
- </param>
- <param name="RT" type="String" minlength="0" maxlength="64" mandatory="false">
- <description>Radio Text</description>
- </param>
- <param name="CT" type="String" minlength="24" maxlength="24" mandatory="false">
- <description>The clock text in UTC format as YYYY-MM-DDThh:mm:ss.sTZD</description>
- </param>
- <param name="PI" type="String" minlength="0" maxlength="6" mandatory="false">
- <description>Program Identification - the call sign for the radio station</description>
- </param>
- <param name="PTY" type="Integer" minvalue="0" maxvalue="31" mandatory="false">
- <description>The program type - The region should be used to differentiate between EU and North America program types</description>
- </param>
- <param name="TP" type="Boolean" mandatory="false">
- <description>Traffic Program Identification - Identifies a station that offers traffic</description>
- </param>
- <param name="TA" type="Boolean" mandatory="false">
- <description>Traffic Announcement Identification - Indicates an ongoing traffic announcement</description>
- </param>
- <param name="REG" type="String" mandatory="false">
- <description>Region</description>
- </param>
- </struct>
-
- <enum name="RadioState">
- <element name="ACQUIRING"/>
- <element name="ACQUIRED"/>
- <element name="MULTICAST"/>
- <element name="NOT_FOUND"/>
- </enum>
-
- <struct name="RadioControlData">
- <param name="frequencyInteger" type="Integer" minvalue="0" maxvalue="1710" mandatory="false">
- <description>The integer part of the frequency ie for 101.7 this value should be 101</description>
- </param>
- <param name="frequencyFraction" type="Integer" minvalue="0" maxvalue="9" mandatory="false">
- <description>The fractional part of the frequency for 101.7 is 7</description>
- </param>
- <param name="band" type="Common.RadioBand" mandatory="false">
- </param>
- <param name="rdsData" type="Common.RdsData" mandatory="false">
- </param>
- <param name="availableHDs" type="Integer" minvalue="1" maxvalue="3" mandatory="false">
- <description>number of HD sub-channels if available</description>
- </param>
- <param name="hdChannel" type="Integer" minvalue="1" maxvalue="3" mandatory="false">
- <description>Current HD sub-channel if available</description>
- </param>
- <param name="signalStrength" type="Integer" minvalue="0" maxvalue="100" mandatory="false">
- </param>
- <param name="signalChangeThreshold" type="Integer" minvalue="0" maxvalue="100" mandatory="false">
- <description>If the signal strength falls below the set value for this parameter, the radio will tune to an alternative frequency</description>
- </param>
- <param name="radioEnable" type="Boolean" mandatory="false">
- <description> True if the radio is on, false is the radio is off</description>
- </param>
- <param name="state" type="Common.RadioState" mandatory="false">
- </param>
- </struct>
-
- <struct name="RadioControlCapabilities">
- <description>Contains information about a radio control module's capabilities.</description>
- <param name="moduleName" type="String" maxlength="100" mandatory="true" >
- <description>The short name or a short description of the radio control module.</description>
- </param>
- <param name="radioEnableAvailable" type="Boolean" mandatory="false">
- <description>
- Availability of the control of enable/disable radio.
- True: Available, False: Not Available, Not present: Not Available.
- </description>
- </param>
- <param name="radioBandAvailable" type="Boolean" mandatory="false" >
- <description>
- Availability of the control of radio band.
- True: Available, False: Not Available, Not present: Not Available.
- </description>
- </param>
- <param name="radioFrequencyAvailable" type="Boolean" mandatory="false" >
- <description>
- Availability of the control of radio frequency.
- True: Available, False: Not Available, Not present: Not Available.
- </description>
- </param>
- <param name="hdChannelAvailable" type="Boolean" mandatory="false" >
- <description>
- Availability of the control of HD radio channel.
- True: Available, False: Not Available, Not present: Not Available.
- </description>
- </param>
- <param name="rdsDataAvailable" type="Boolean" mandatory="false" >
- <description>
- Availability of the getting Radio Data System (RDS) data.
- True: Available, False: Not Available, Not present: Not Available.
- </description>
- </param>
- <param name="availableHDsAvailable" type="Boolean" mandatory="false" >
- <description>
- Availability of the getting the number of available HD channels.
- True: Available, False: Not Available, Not present: Not Available.
- </description>
- </param>
- <param name="stateAvailable" type="Boolean" mandatory="false" >
- <description>
- Availability of the getting the Radio state.
- True: Available, False: Not Available, Not present: Not Available.
- </description>
- </param>
- <param name="signalStrengthAvailable" type="Boolean" mandatory="false" >
- <description>
- Availability of the getting the signal strength.
- True: Available, False: Not Available, Not present: Not Available.
- </description>
- </param>
- <param name="signalChangeThresholdAvailable" type="Boolean" mandatory="false" >
- <description>
- Availability of the getting the signal Change Threshold.
- True: Available, False: Not Available, Not present: Not Available.
- </description>
- </param>
- </struct>
-
- <enum name="DefrostZone">
- <element name="FRONT"/>
- <element name="REAR"/>
- <element name="ALL"/>
- <element name="NONE"/>
- </enum>
-
- <enum name="VentilationMode">
- <element name="UPPER"/>
- <element name="LOWER"/>
- <element name="BOTH"/>
- <element name="NONE"/>
- </enum>
-
- <enum name="TemperatureUnit">
- <element name="FAHRENHEIT"/>
- <element name="CELSIUS"/>
- </enum>
-
- <struct name="Temperature">
- <param name="unit" type="TemperatureUnit" mandatory="true" >
- <description>Temperature Unit</description>
- </param>
- <param name="value" type="Float" mandatory="true" >
- <description>Temperature Value in TemperatureUnit specified unit. Range depends on OEM and is not checked by SDL.</description>
- </param>
- </struct>
-
- <struct name="ClimateControlData">
- <param name="fanSpeed" type="Integer" minvalue="0" maxvalue="100" mandatory="false">
- </param>
- <param name="currentTemperature" type="Common.Temperature" mandatory="false">
- </param>
- <param name="desiredTemperature" type="Common.Temperature" mandatory="false">
- </param>
- <param name="acEnable" type="Boolean" mandatory="false">
- </param>
- <param name="circulateAirEnable" type="Boolean" mandatory="false">
- </param>
- <param name="autoModeEnable" type="Boolean" mandatory="false">
- </param>
- <param name="defrostZone" type="DefrostZone" mandatory="false">
- </param>
- <param name="dualModeEnable" type="Boolean" mandatory="false">
- </param>
- <param name="acMaxEnable" type="Boolean" mandatory="false">
- </param>
- <param name="ventilationMode" type="Common.VentilationMode" mandatory="false">
- </param>
- </struct>
-
- <struct name="ClimateControlCapabilities">
- <description>Contains information about a climate control module's capabilities.</description>
- <param name="moduleName" type="String" maxlength="100" mandatory="true" >
- <description>The short name or a short description of the climate control module.</description>
- </param>
- <param name="currentTemperatureAvailable" type="Boolean" mandatory="false">
- <description>
- Availability of the reading of current temperature.
- True: Available, False: Not Available, Not present: Not Available.
- </description>
- </param>
- <param name="fanSpeedAvailable" type="Boolean" mandatory="false">
- <description>
- Availability of the control of fan speed.
- True: Available, False: Not Available, Not present: Not Available.
- </description>
- </param>
- <param name="desiredTemperatureAvailable" type="Boolean" mandatory="false">
- <description>
- Availability of the control of desired temperature.
- True: Available, False: Not Available, Not present: Not Available.
- </description>
- </param>
- <param name="acEnableAvailable" type="Boolean" mandatory="false">
- <description>
- Availability of the control of turn on/off AC.
- True: Available, False: Not Available, Not present: Not Available.
- </description>
- </param>
- <param name="acMaxEnableAvailable" type="Boolean" mandatory="false">
- <description>
- Availability of the control of enable/disable air conditioning is ON on the maximum level.
- True: Available, False: Not Available, Not present: Not Available.
- </description>
- </param>
- <param name="circulateAirEnableAvailable" type="Boolean" mandatory="false">
- <description>
- Availability of the control of enable/disable circulate Air mode.
- True: Available, False: Not Available, Not present: Not Available.
- </description>
- </param>
- <param name="autoModeEnableAvailable" type="Boolean" mandatory="false">
- <description>
- Availability of the control of enable/disable auto mode.
- True: Available, False: Not Available, Not present: Not Available.
- </description>
- </param>
- <param name="dualModeEnableAvailable" type="Boolean" mandatory="false">
- <description>
- Availability of the control of enable/disable dual mode.
- True: Available, False: Not Available, Not present: Not Available.
- </description>
- </param>
- <param name="defrostZoneAvailable" type="Boolean" mandatory="false">
- <description>
- Availability of the control of defrost zones.
- True: Available, False: Not Available, Not present: Not Available.
- </description>
- </param>
- <param name="defrostZone" type="Common.DefrostZone" minsize="1" maxsize="100" array="true" mandatory="false">
- <description>
- A set of all defrost zones that are controllable.
- </description>
- </param>
- <param name="ventilationModeAvailable" type="Boolean" mandatory="false">
- <description>
- Availability of the control of air ventilation mode.
- True: Available, False: Not Available, Not present: Not Available.
- </description>
- </param>
- <param name="ventilationMode" type="Common.VentilationMode" minsize="1" maxsize="100" array="true" mandatory="false">
- <description>
- A set of all ventilation modes that are controllable.
- </description>
- </param>
- </struct>
-
- <struct name="ModuleData">
- <description>The moduleType indicates which type of data should be changed and identifies which data object exists in this struct. For example, if the moduleType is CLIMATE then a "climateControlData" should exist</description>
- <param name="moduleType" type="Common.ModuleType" mandatory="true" >
- </param>
- <param name="radioControlData" type="Common.RadioControlData" mandatory="false">
- </param>
- <param name="climateControlData" type="Common.ClimateControlData" mandatory="false">
- </param>
- </struct>
-
- <enum name="RCAccessMode">
- <description>Enumeration that describes possible remote control access mode the application might be in on HU.</description>
- <element name="AUTO_ALLOW"/>
- <element name="AUTO_DENY"/>
- <element name="ASK_DRIVER"/>
- </enum>
-<struct name="DateTime">
- <param name="millisecond" type="Integer" minvalue="0" maxvalue="999" mandatory="false">
- <description>Milliseconds </description>
- </param>
- <param name="second" type="Integer" minvalue="0" maxvalue="60" mandatory="false">
- <description>Seconds part of time</description>
- </param>
- <param name="minute" type="Integer" minvalue="0" maxvalue="59" mandatory="false">
- <description>Minutes part of time</description>
- </param>
- <param name="hour" type="Integer" minvalue="0" maxvalue="23" mandatory="false">
- <description>Hours part of time. Note that this structure accepts time only in 24 Hr format</description>
- </param>
- <param name="day" type="Integer" minvalue="1" maxvalue="31" mandatory="false">
- <description>Day of the month</description>
- </param>
- <param name="month" type="Integer" minvalue="1" maxvalue="12" mandatory="false">
- <description>Month of the year</description>
- </param>
- <param name="year" type="Integer" maxvalue="4095" mandatory="false">
- <description>The year in YYYY format</description>
- </param>
- <param name="tz_hour" type="Integer" minvalue="-12" maxvalue="14" defvalue="0" mandatory="false">
- <description>Time zone offset in Hours wrt UTC.</description>
- </param>
- <param name="tz_minute" type="Integer" minvalue="0" maxvalue="59" defvalue="0" mandatory="false">
- <description>Time zone offset in Min wrt UTC.</description>
- </param>
-</struct>
-
-<struct name="OASISAddress">
- <param name="countryName" minlength="0" maxlength="200" type="String" mandatory="false">
- <description>Name of the country (localized)</description>
- </param>
- <param name="countryCode" minlength="0" maxlength="50" type="String" mandatory="false">
- <description>Name of country (ISO 3166-2)</description>
- </param>
- <param name="postalCode" minlength="0" maxlength="16" type="String" mandatory="false">
- <description>(PLZ, ZIP, PIN, CAP etc.)</description>
- </param>
- <param name="administrativeArea" minlength="0" maxlength="200" type="String" mandatory="false">
- <description>Portion of country (e.g. state)</description>
- </param>
- <param name="subAdministrativeArea" minlength="0" maxlength="200" type="String" mandatory="false">
- <description>Portion of e.g. state (e.g. county)</description>
- </param>
- <param name="locality" minlength="0" maxlength="200" type="String" mandatory="false">
- <description>Hypernym for e.g. city/village</description>
- </param>
- <param name="subLocality" minlength="0" maxlength="200" type="String" mandatory="false">
- <description>Hypernym for e.g. district</description>
- </param>
- <param name="thoroughfare" minlength="0" maxlength="200" type="String" mandatory="false">
- <description>Hypernym for street, road etc.</description>
- </param>
- <param name="subThoroughfare" minlength="0" maxlength="200" type="String" mandatory="false">
- <description>Portion of thoroughfare e.g. house number</description>
- </param>
-</struct>
-
- <struct name="LocationDetails">
- <param name="coordinate" type="Coordinate" mandatory="false">
- <description>Latitude/Longitude of the location.</description>
- </param>
- <param name="locationName" type="String" maxlength="500" mandatory="false">
- <description>Name of location.</description>
- </param>
- <param name="addressLines" type="String" maxlength="500" minsize="0" maxsize="4" array="true" mandatory="false">
- <description>Location address for display purposes only</description>
- </param>
- <param name="locationDescription" type="String" maxlength="500" mandatory="false">
- <description>Description intended location / establishment (if applicable)</description>
- </param>
- <param name="phoneNumber" type="String" maxlength="500" mandatory="false">
- <description>Phone number of location / establishment.</description>
- </param>
- <param name="locationImage" type="Image" mandatory="false">
- <description>Image / icon of intended location.</description>
- </param>
- <param name="searchAddress" type="OASISAddress" mandatory="false">
- <description>Address to be used by navigation engines for search</description>
- </param>
- </struct>
-
- <struct name="NavigationCapability">
- <description>Extended capabilities for an onboard navigation system</description>
- <param name="sendLocationEnabled" type="Boolean" mandatory="false">
- <description>If the module has the ability to add locations to the onboard nav</description>
- </param>
- <param name="getWayPointsEnabled" type="Boolean" mandatory="false">
- <description>If the module has the ability to return way points from onboard nav</description>
- </param>
- </struct>
-
- <struct name="PhoneCapability">
- <description>Extended capabilities of the module's phone feature</description>
- <param name="dialNumberEnabled" type="Boolean" mandatory="false">
- <description>If the module has the abiulity to perform dial number</description>
- </param>
- </struct>
-
- <struct name="VideoStreamingCapability">
- <description>Contains information about this system's video streaming capabilities.</description>
- <param name="preferredResolution" type="Common.ImageResolution" mandatory="false">
- <description>The preferred resolution of a video stream for decoding and rendering on HMI.</description>
- </param>
- <param name="maxBitrate" type="Integer" minvalue="0" maxvalue="2147483647" mandatory="false">
- <description>The maximum bitrate of video stream that is supported, in kbps.</description>
- </param>
- <param name="supportedFormats" type="Common.VideoStreamingFormat" array="true" mandatory="false">
- <description>
- Detailed information on each format supported by this system, in its preferred order
- (i.e. the first element in the array is most preferable to the system).
- Each object will contain a VideoStreamingFormat that describes what can be expected.
- </description>
- </param>
- <param name="hapticSpatialDataSupported" type="Boolean" mandatory="false">
- <description>True if the system can utilize the haptic spatial data from the source being streamed. </description>
- </param>
- </struct>
-
- <struct name="SystemCapabilities">
- <param name="navigationCapability" type="NavigationCapability" mandatory="false">
- </param>
- <param name="phoneCapability" type="PhoneCapability" mandatory="false">
- </param>
- <param name="videoStreamingCapability" type="VideoStreamingCapability" mandatory="false">
- </param>
- </struct>
-
- <struct name="RemoteControlCapabilities">
- <param name="climateControlCapabilities" type="ClimateControlCapabilities" mandatory="false" minsize="1" maxsize="100" array="true">
- <description>If included, the platform supports RC climate controls. For this baseline version, maxsize=1. i.e. only one climate control module is supported.</description >
- </param>
- <param name="radioControlCapabilities" type="RadioControlCapabilities" mandatory="false" minsize="1" maxsize="100" array="true">
- <description>If included, the platform supports RC radio controls. For this baseline version, maxsize=1. i.e. only one climate control module is supported.</description >
- </param>
- <param name="buttonCapabilities" type="ButtonCapabilities" mandatory="false" minsize="1" maxsize="100" array="true" >
- <description>If included, the platform supports RC button controls with the included button names.</description >
- </param>
- </struct>
-
- <struct name="Rectangle">
- <param name="x" type="Float" mandatory="true">
- <description>The X-coordinate of the user control</description>
- </param>
- <param name="y" type="Float" mandatory="true">
- <description>The Y-coordinate of the user control</description>
- </param>
- <param name="width" type="Float" mandatory="true">
- <description>The width of the user control's bounding rectangle</description>
- </param>
- <param name="height" type="Float" mandatory="true">
- <description>The height of the user control's bounding rectangle</description>
- </param>
- </struct>
-
- <struct name="HapticRect">
- <description>Defines haptic rectangle data for each user control object for video streaming application</description>
- <param name="id" type="Integer" minvalue="0" maxvalue="2000000000" mandatory="true">
- <description>A user control spatial identifier</description>
- </param>
- <param name="rect" type="Common.Rectangle" mandatory="true">
- <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>
- </interface>
- <interface name="Buttons" version="1.0" date="2013-04-12">
- <function name="GetCapabilities" messagetype="request" provider="hmi">
- <description>Method is invoked at system start-up. SDL requests the information about all supported hardware buttons and their capabilities</description>
- </function>
- <function name="GetCapabilities" messagetype="response">
- <param name="capabilities" type="Common.ButtonCapabilities" array="true" minsize="1" maxsize="100" mandatory="true">
- <description>Response must provide the names of available buttons and their capabilities.See ButtonCapabilities</description>
- </param>
- <param name="presetBankCapabilities" type="Common.PresetBankCapabilities" mandatory="false">
- <description>Must be returned if the platform supports custom on-screen Presets</description>
- </param>
- </function>
- <function name="OnButtonEvent" messagetype="notification" provider="hmi">
- <description>HU system must notify about every UP/DOWN event for buttons</description>
- <param name="name" type="Common.ButtonName" mandatory="true"/>
- <param name="mode" type="Common.ButtonEventMode" mandatory="true">
- <description>Indicates whether this is an UP or DOWN event.</description>
- </param>
- <param name="customButtonID" type="Integer" mandatory="false" minvalue="0" maxvalue="65536">
- <description>Must be provided if ButtonName is CUSTOM_BUTTON, this references the integer ID passed by a custom button. (e.g. softButtonName)</description>
- </param>
- <param name="appID" type="Integer" mandatory="false">
- <description>
- In case the ButtonName is CUSTOM_BUTTON, HMI must include appID parameters to OnButtonPress notification sent to SDL.
- Otherwise, if appID is not sent together with CUSTOM_BUTTON, this notification will be ignored by SDL.
- </description>
- </param>
- </function>
- <function name="OnButtonPress" messagetype="notification" provider="hmi">
- <param name="name" type="Common.ButtonName" mandatory="true"/>
- <param name="mode" type="Common.ButtonPressMode" mandatory="true">
- <description>Indicates whether this is a LONG or SHORT button press event.</description>
- </param>
- <param name="customButtonID" type="Integer" mandatory="false" minvalue="0" maxvalue="65536">
- <description>Must be returned if ButtonName is CUSTOM_BUTTON, this references the string passed by a custom button. (e.g. softButtonName)</description>
- </param>
- <param name="appID" type="Integer" mandatory="false">
- <description>
- In case the ButtonName is CUSTOM_BUTTON, HMI must include appID parameters to OnButtonPress notification sent to SDL.
- Otherwise, if appID is not sent together with CUSTOM_BUTTON, this notification will be ignored by SDL.
- </description>
- </param>
- </function>
- <function name="OnButtonSubscription" messagetype="notification">
- <description>
- Sender: SDL-&gt;HMI. Purpose: to notify about button subscription state is changed for the named application
- </description>
- <param name="name" type="Common.ButtonName" mandatory="true"/>
- <param name="isSubscribed" type="Boolean" mandatory="true">
- <description>
- Defines whether the named button has status of 'subscribed' or 'unsubscribed':
- If "true" - the named button is subscribed.
- If "false" - the named button is unsubscribed.
- </description>
- </param>
- <param name="appID" type="Integer" mandatory="true">
- <description>
- The ID of application that relates to this button-subscription status change.
- </description>
- </param>
- </function>
- </interface>
- <interface name="BasicCommunication" version="1.0" date="2013-04-12">
- <function name="OnReady" messagetype="notification" provider="hmi">
- <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>
- <function name="OnStartDeviceDiscovery" messagetype="notification" provider="hmi">
- <description>Initiated by HMI user for getting the list of connected devices.</description>
- </function>
- <function name="OnUpdateDeviceList" messagetype="notification" provider="hmi">
- <description>Notification from HMI to SDL sent when HMI requires update of device list (i.e. when user clicks 'Change Device' button)</description>
- </function>
- <function name="OnPhoneCall" messagetype="notification">
- <description>Sender: HMI-&gt;SDL. When: upon phone-call event started or ended</description>
- <param name="isActive" type="Boolean" mandatory="true">
- <description>Must be 'true' - when the phone call is started on HMI. Must be 'false' when the phone call is ended on HMI</description>
- </param>
- </function>
- <function name="OnEmergencyEvent" messagetype="notification">
- <description>
- "Sender: HMI-&gt;SDL. Conditions: when HMI enters the mode of "911 Assist", or other rear view camera,
- or something else in the future. Purpose: for SDL to change the audioStreamingState of the related apps to
- NOT_AUDIBLE when "enabled:true" and back to AUDIBLE when "enabled:false""
- </description>
- <param name="enabled" type="Boolean" mandatory="true">
- </param>
- </function>
- <function name="OnResumeAudioSource" messagetype="notification" provider="sdl">
- <description>This method must be invoked by SDL to update audio state.</description>
- <param name="appID" type="Integer" mandatory="true">
- <description>The ID of app to be resumed audio source.</description>
- </param>
- </function>
- <function name="OnSDLPersistenceComplete" messagetype="notification" provider="sdl">
- </function>
- <function name="UpdateAppList" messagetype="request" provider="hmi">
- <description>Issued by SDL to notify HMI about new applications registered.</description>
- <param name="applications" type="Common.HMIApplication" mandatory="true" array="true" minsize="0" maxsize="100"/>
- </function>
- <function name="UpdateAppList" messagetype="response">
- </function>
- <function name="UpdateDeviceList" messagetype="request" provider="hmi">
- <description>Request from SmartDeviceLink to HMI to change device list.</description>
- <param name="deviceList" type="Common.DeviceInfo" mandatory="true" array="true" minsize="0" maxsize="100">
- <description>The array of names/IDs of connected devices</description>
- </param>
- </function>
- <function name="UpdateDeviceList" messagetype="response">
- </function>
- <function name="OnFileRemoved" messagetype="notification" provider="sdl">
- <description>Notifies HMI in case some application file has been removed</description>
- <param name="fileName" type="String" minlength="1" maxlength="30" mandatory="true">
- <description>The name of the removed file</description>
- </param>
- <param name="fileType" type="Common.FileType" mandatory="true">
- <description>The file type. See FileType.</description>
- </param>
- <param name="appID" type="Integer" mandatory="true">
- <description>ID of the application.</description>
- </param>
- </function>
- <function name="AllowDeviceToConnect" messagetype="request" provider="hmi">
- <description>Request from SmartDeviceLink to HMI to get the permissions of new device connection.</description>
- <param name="device" type="Common.DeviceInfo" mandatory="true"/>
- </function>
- <function name="AllowDeviceToConnect" messagetype="response">
- <param name="allow" type="Boolean" mandatory="true"/>
- </function>
- <function name="OnDeviceChosen" messagetype="notification" provider="hmi">
- <description>Notification must be initiated by HMI on user selecting device in the list of devices.</description>
- <param name="deviceInfo" type="Common.DeviceInfo" mandatory="true">
- <description>The name and ID of the device chosen</description>
- </param>
- </function>
- <function name="OnFindApplications" messagetype="notification" provider="hmi">
- <description>This method must be invoked by HMI to get list of registered apps.</description>
- <param name="deviceInfo" type="Common.DeviceInfo" mandatory="false">
- <description>The name and ID of the device the list of registered applications is required for.</description>
- </param>
- </function>
- <function name="ActivateApp" messagetype="request" provider="hmi">
- <description>Request from SDL to HMI to bring specified application to front on UI e.g make it HMI status 'FULL'.</description>
- <param name="appID" type="Integer" mandatory="true">
- <description>ID of deactivated application.</description>
- </param>
- <param name="priority" type="Common.AppPriority" mandatory="false">
- <description>Send to HMI so that it can coordinate order of requests/notifications correspondingly.</description>
- </param>
- <param name="level" type="Common.HMILevel" mandatory="false">
- <description>If level for application is to be changed to something else then FULL then this parameter should be used.</description>
- </param>
- </function>
- <function name="ActivateApp" messagetype="response">
- </function>
- <function name="OnAppActivated" messagetype="notification" provider="hmi">
- <description>Must be sent by HU system when the user clicks on app in the list of registered apps or on soft button with 'STEAL_FOCUS' action.</description>
- <param name="appID" type="Integer" mandatory="true">
- <description>ID of selected application.</description>
- </param>
- </function>
- <function name="OnAppDeactivated" messagetype="notification" provider="hmi">
- <description>Must be sent by HU system when the user switches to any functionality which is not other mobile application.</description>
- <param name="appID" type="Integer" mandatory="true">
- <description>ID of deactivated application.</description>
- </param>
- <param name="reason" type="Common.DeactivateReason" mandatory="true">
- <description>Specifies the functionality the user has switched to.</description>
- </param>
- </function>
- <function name="OnAppRegistered" messagetype="notification" provider="sdl">
- <description>Issued by SDL to notify HMI about new application registered.</description>
- <param name="application" type="Common.HMIApplication" mandatory="true">
- <description>The information about application registered. See HMIApplication. </description>
- </param>
- <param name="ttsName" type="Common.TTSChunk" minsize="1" maxsize="100" array="true" mandatory="false">
- <description>
- TTS string for VR recognition of the mobile application name, e.g. "Ford Drive Green".
- Meant to overcome any failing on speech engine in properly pronouncing / understanding app name.
- May not be empty.
- May not start with a new line character.
- Not unique value
- </description>
- </param>
- <param name="vrSynonyms" type="String" maxlength="40" minsize="1" maxsize="100" array="true" mandatory="false">
- <description>
- Defines an additional voice recognition command.
- Must not interfere with any name of previously registered applications(SDL makes check).
- </description>
- </param>
- <param name="resumeVrGrammars" type="Boolean" mandatory="false">
- <description>The flag if VR grammars resume is required</description>
- </param>
- <param name="priority" type="Common.AppPriority" mandatory="false">
- <description>Send to HMI so that it can coordinate order of requests/notifications correspondingly.</description>
- </param>
- </function>
- <function name="OnAppUnregistered" messagetype="notification" provider="sdl">
- <description>
- Issued by SDL to notify HMI about application unregistered.
- Application then to be removed from application list; all data connected with application has to be cleared up.
- </description>
- <param name="unexpectedDisconnect" type="Boolean" mandatory="true">
- <description>
- SDL sends 'true' in case the connection is unexpectedly lost.
- SDL sends 'false' in case the mobile app is unregistered gracefully (via appropriate RPC)
- </description>
- </param>
- <param name="appID" type="Integer" mandatory="true">
- <description>ID of the application unregistered</description>
- </param>
- </function>
- <function name="OnExitApplication" messagetype="notification" provider="hmi">
- <description>Must be sent by HMI when the User chooses to exit the application..</description>
- <param name="reason" type="Common.ApplicationExitReason" mandatory="true">
- <description>Specifies reason of moving the app to NONE</description>
- </param>
- <param name="appID" type="Integer" mandatory="true">
- <description>ID of the application to be exited.</description>
- </param>
- </function>
- <function name="OnExitAllApplications" messagetype="notification" provider="hmi">
- <description>Sent by HMI to SDL to close all registered applications.</description>
- <param name="reason" type="Common.ApplicationsCloseReason" mandatory="true">
- <description>Specifies reason for exiting all apllications.</description>
- </param>
- </function>
- <function name="OnAwakeSDL" messagetype="notification">
- <description>
- Sender: HMI-&gt;SDL. Must be sent to return SDL to normal operation after 'Suspend' or 'LowVoltage' events
- </description>
- </function>
- <function name="MixingAudioSupported" messagetype="request" provider="hmi">
- <description>Request from SDL to HMI to find out if the last one supports mixing audio (i.e. recording TTS command and playing audio).</description>
- </function>
- <function name="MixingAudioSupported" messagetype="response">
- <description>If no response received SDL supposes that mixing audio is not supported</description>
- <param name="attenuatedSupported" type="Boolean" mandatory="true">
- <description>Must be true if supported</description>
- </param>
- </function>
- <function name="PlayTone" messagetype="notification" provider="sdl">
- <description>Sent by SDL to HMI to notify that the tone should be played.</description>
- <param name="appID" type="Integer" mandatory="true">
- <description>ID of the application that invoked this notification</description>
- </param>
- <param name="methodName" type="Common.MethodName" mandatory="true">
- <description>Defines the name of app's request that initiates playing a tone</description>
- </param>
- </function>
- <function name="DialNumber" messagetype="request">
- <description>Request from SDL to call a specific number.</description>
- <param name="number" type="String" maxlength="40" mandatory="true">
- <description>The number to dial. Only the character + and numbers are allowed.</description>
- </param>
- <param name="appID" type="Integer" mandatory="true">
- <description>ID of application that concerns this RPC.</description>
- </param>
- </function>
- <function name="DialNumber" messagetype="response">
- </function>
- <!-- Policies -->
- <!-- SyncP RPC-->
- <function name="OnSystemRequest" messagetype="notification" provider="hmi">
- <description>
- An asynchronous request from the system for specific data from the device or the cloud or response to a request from the device or cloud
- Binary data can be included in hybrid part of message for some requests (such as Authentication request responses)
- </description>
- <param name="requestType" type="Common.RequestType" mandatory="true">
- <description>The type of system request.</description>
- </param>
- <param name="url" type="String" maxlength="1000" minlength="1" mandatory="false">
- <description>Optional array of URL(s) for HTTP requests.</description>
- </param>
- <param name="fileType" type="Common.FileType" mandatory="false">
- <description>Optional file type (meant for HTTP file requests).</description>
- </param>
- <param name="offset" type="Integer" minvalue="0" maxvalue="100000000000" mandatory="false">
- <description>Optional offset in bytes for resuming partial data chunks</description>
- </param>
- <param name="length" type="Integer" minvalue="0" maxvalue="100000000000" mandatory="false">
- <description>Optional length in bytes for resuming partial data chunks</description>
- </param>
- <param name="timeout" type="Integer" minvalue="0" maxvalue="2000000000" mandatory="false">
- </param>
- <param name="fileName" type="String" maxlength="255" minlength="1" mandatory="true">
- <description>File reference name.</description>
- </param>
- <param name="appID" type="String" maxlength="50" minlength="1" mandatory="false">
- <description>ID of application that requested this RPC.</description>
- </param>
- </function>
- <function name="SystemRequest" messagetype="request" provider="hmi">
- <description>An asynchronous request from the device; binary data can be included in hybrid part of message for some requests (such as Authentication requests)</description>
- <param name="requestType" type="Common.RequestType" mandatory="true">
- <description>The type of system request.</description>
- </param>
- <param name="fileName" type="String" maxlength="255" minlength="1" mandatory="true">
- <description>The path to file.</description>
- </param>
- <param name="appID" type="String" maxlength="50" minlength="1" mandatory="false">
- <description>ID of application that requested this RPC.</description>
- </param>
- </function>
- <function name="SystemRequest" messagetype="response">
- </function>
- <function name="PolicyUpdate" messagetype="request" provider="hmi">
- <description>
- From: SDL
- To: SYNCP Manager
- Asks SYNCP Manager to send given Policy Table snapshot to the backend
- </description>
- <param name="file" type="String" minlength="1" maxlength="255" mandatory="true">
- <description>
- Location of policy table snapshot
- </description>
- </param>
- <param name="timeout" type="Integer" minvalue="0" maxvalue="65535" mandatory="true">
- <description>
- Send attempt timeout in seconds
- </description>
- </param>
- <param name="retry" type="Integer" minvalue="0" maxvalue="65535" array="true" minsize="1" maxsize="5" mandatory="true">
- <description>
- Array of delays to wait after failed atempts
- </description>
- </param>
- </function>
- <function name="PolicyUpdate" messagetype="response">
- </function>
- <!-- End of SyncP RPC-->
- <function name="OnSDLClose" messagetype="notification" provider="sdl">
- <description>SDL must notify HMI about finish working application</description>
- </function>
- <function name="OnPutFile" messagetype="notification" provider="sdl">
- <description>
- Notification, that comes to HMI when mobile sents file with systemFile flag
- </description>
- <param name="offset" type="Integer" minvalue="0" maxvalue="100000000000" mandatory="false">
- <description>Optional offset in bytes for resuming partial data chunks</description>
- </param>
- <param name="length" type="Integer" minvalue="0" maxvalue="100000000000" mandatory="false">
- <description>Optional length in bytes for resuming partial data chunks</description>
- </param>
- <param name="fileSize" type="Integer" minvalue="0" maxvalue="100000000000" mandatory="false">
- <description>Full Size of file. sends in first OnPutFile notification if file is splited
- into many PutFiles
- </description>
- </param>
- <param name="FileName" type="String" maxlength="255" mandatory="true">
- <description>File reference name.</description>
- </param>
- <param name="syncFileName" type="String" maxlength="255" mandatory="true">
- <description>File reference name.</description>
- </param>
- <param name="fileType" type="Common.FileType" mandatory="true">
- <description>Selected file type.</description>
- </param>
- <param name="persistentFile" type="Boolean" defvalue="false" mandatory="false">
- <description>
- Indicates if the file is meant to persist between sessions / ignition cycles.
- If set to TRUE, then the system will aim to persist this file through session / cycles.
- While files with this designation will have priority over others, they are subject to deletion by the system at any time.
- In the event of automatic deletion by the system, the app will receive a rejection and have to resend the file.
- If omitted, the value will be set to false.
- </description>
- </param>
- </function>
- <!-- Policies -->
- <function name="GetSystemInfo" messagetype="request" provider="hmi">
- <description>Request from SDL to HMI to obtain information about head unit system.</description>
- </function>
- <function name="GetSystemInfo" messagetype="response">
- <param name="ccpu_version" type="String" maxlength="500" mandatory="true">
- <description>Software version of the module</description>
- </param>
- <param name="language" type="Common.Language" mandatory="true">
- <description>ISO 639-1 combined with ISO 3166 alpha-2 country code (i.e. en-us)</description>
- </param>
- <param name="wersCountryCode" type="String" maxlength="500" mandatory="true">
- <description>Country code from the Ford system WERS (i.e.WAEGB).</description>
- </param>
- </function>
- <function name="OnSystemInfoChanged" messagetype="notification" provider="hmi">
- <description>Issued by system to SDL to notify that some system param has changed. Currently applied for Sync Language.</description>
- <param name="language" type="Common.Language" mandatory="true"/>
- </function>
- <function name="OnIgnitionCycleOver" messagetype="notification" provider="hmi">
- <description>Notification from system to SDL to let it know that ignition cycle is over.</description>
- </function>
- <function name="DecryptCertificate" messagetype="request">
- <description>Sender: SDL-&gt;HMI. Purpose: to decrypt the certificate received via the Updated Policy Table. </description>
- <param name="fileName" type="String" maxlength="255" minlength="1" mandatory="true">
- <description>The path to the file with the encrypted certificate from the PolicyTable.</description>
- </param>
- </function>
- <function name="DecryptCertificate" messagetype="response">
- <description>SUCCESS - in case the certificate is decrypted and placed to the same file from request.</description>
- </function>
- <function name="OnEventChanged" messagetype="notification">
- <description>Sender: HMI->SDL. When event is become active</description>
- <param name="eventName" type="Common.EventTypes" mandatory="true">
- <description>Specifies the types of active events.</description>
- </param>
- <param name="isActive" type="Boolean" mandatory="true">
- <description>Must be 'true' - when the event is started on HMI. Must be 'false' when the event is ended on HMI</description>
- </param>
- </function>
- <!-- End of Policies -->
- </interface>
- <interface name="VR" version="1.0" date="2013-04-17">
- <function name="IsReady" messagetype="request" provider="hmi">
- <description>Method is invoked at system startup. Response provides information about presence of VR module and its readiness to cooperate with SDL.</description>
- </function>
- <function name="IsReady" messagetype="response">
- <param name="available" type="Boolean" mandatory="true">
- <description>Must be true if VR is present and ready to communicate with SDL.</description>
- </param>
- </function>
- <function name="Started" messagetype="notification" provider="hmi">
- <description>Must be initiated by VR module to let SDL know that VR session has started.</description>
- </function>
- <function name="Stopped" messagetype="notification" provider="hmi">
- <description>Must be initiated by VR module to let SDL know that VR session has stopped.</description>
- </function>
- <function name="AddCommand" messagetype="request" provider="hmi">
- <description>Request from SDL to add a command(string with associated id) to VR.</description>
- <param name="cmdID" type="Integer" minvalue="0" maxvalue="2000000000" mandatory="true">
- <description>ID of a command (further to be used in OnCommand notification).</description>
- </param>
- <param name="vrCommands" type="String" mandatory="true" maxlength="99" minsize="1" maxsize="100" array="true">
- <description>List of strings to be used as VR commands.</description>
- </param>
- <param name="type" type="Common.VRCommandType" mandatory="true">
- <description>Type of added command. See VRCommandType.</description>
- </param>
- <param name="grammarID" type="Integer" minvalue="0" maxvalue="2000000000" mandatory="true">
- <description>
- ID of the specific grammar, whether top-level or choice set.
- </description>
- </param>
- <param name="appID" type="Integer" mandatory="false">
- <description>ID of application that requested this RPC.</description>
- </param>
- </function>
- <function name="AddCommand" messagetype="response">
- </function>
- <function name="DeleteCommand" messagetype="request" provider="hmi">
- <description>Request from SDL to delete a command from VR.</description>
- <param name="cmdID" type="Integer" minvalue="0" maxvalue="2000000000" mandatory="true">
- <description>Id of a command (list of strings), previously sent by AddCommand.</description>
- </param>
- <param name="type" type="Common.VRCommandType" mandatory="true">
- <description>Type of added command. See VRCommandType.</description>
- </param>
- <param name="grammarID" type="Integer" minvalue="0" maxvalue="2000000000" mandatory="true">
- <description>ID of the specific grammar.</description>
- </param>
- <param name="appID" type="Integer" mandatory="true">
- <description>ID of application that requested this RPC.</description>
- </param>
- </function>
- <function name="DeleteCommand" messagetype="response">
- </function>
- <function name="PerformInteraction" messagetype="request" provider="hmi">
- <description>
- Sets some properties for the application initiated request.
- </description>
- <param name="helpPrompt" type="Common.TTSChunk" minsize="1" maxsize="100" array="true" mandatory="false">
- <description>
- The help prompt. An array of text chunks of type TTSChunk. See TTSChunk. The array must have at least one item.
- </description>
- </param>
- <param name="initialPrompt" type="Common.TTSChunk" minsize="1" maxsize="100" array="true" mandatory="false">
- <description>
- This is the intial prompt spoken to the user at the start of an interaction. An array of text chunks of type TTSChunk. See TTSChunk. The array must have at least one item.
- </description>
- </param>
- <param name="timeoutPrompt" type="Common.TTSChunk" minsize="1" maxsize="100" array="true" mandatory="false">
- <description>
- Help text for a wait timeout. An array of text chunks of type TTSChunk. See TTSChunk. The array must have at least one item.
- </description>
- </param>
- <param name="timeout" type="Integer" mandatory="true">
- <description>Timeout initiate timeoutPrompt</description>
- </param>
- <param name="grammarID" type="Integer" minvalue="0" maxvalue="2000000000" minsize="1" maxsize="100" array="true" mandatory="false">
- <description>
- IDs of the specific compiled grammars for this voice interaction.
- </description>
- </param>
- </function>
- <function name="PerformInteraction" messagetype="response">
- <param name="choiceID" type="Integer" minvalue="0" maxvalue="2000000000" mandatory="false">
- <description>
- ID of the choice that was selected in response to PerformInteraction.
- </description>
- </param>
- </function>
- <function name="OnCommand" messagetype="notification" provider="hmi">
- <description>Notifies SDL about command trigerred via VR</description>
- <param name="cmdID" type="Integer" mandatory="true" minvalue="0" maxvalue="2000000000">
- <description>ID of of the command (list of strings)</description>
- </param>
- <param name="appID" type="Integer" mandatory="true">
- <description>ID of application related to this RPC.</description>
- </param>
- </function>
- <function name="ChangeRegistration" messagetype="request" provider="hmi">
- <description>Request from SmartDeviceLink to HMI to change language of VR.</description>
- <param name="vrSynonyms" type="String" maxlength="40" minsize="1" maxsize="100" array="true" mandatory="false">
- <description>
- Request new VR synonyms registration
- Defines an additional voice recognition command.
- Must not interfere with any name of previously registered applications(SDL makes check).
- </description>
- </param>
- <param name="language" type="Common.Language" mandatory="true">
- <description>The language application wants to switch to.</description>
- </param>
- <param name="appID" type="Integer" mandatory="true">
- <description>ID of application that concerns this RPC.</description>
- </param>
- </function>
- <function name="ChangeRegistration" messagetype="response">
- </function>
- <function name="OnLanguageChange" messagetype="notification" provider="hmi">
- <description>Notification from HMI to SmartDeviceLink about change of language.</description>
- <param name="language" type="Common.Language" mandatory="true">
- <description>Language VR has switched to.</description>
- </param>
- </function>
- <function name="GetSupportedLanguages" messagetype="request" provider="hmi">
- <description>Method is invoked at system start-up. Response must provide the information about VR supported languages.</description>
- </function>
- <function name="GetSupportedLanguages" messagetype="response">
- <param name="languages" type="Common.Language" mandatory="true" array="true" minsize="1" maxsize="100">
- <description>List of languages supported in VR.</description>
- </param>
- </function>
- <function name="GetLanguage" messagetype="request" provider="hmi">
- <description>Request from SmartDeviceLink to HMI to get currently active VR language</description>
- </function>
- <function name="GetLanguage" messagetype="response">
- <param name="language" type="Common.Language" mandatory="true"/>
- </function>
- <function name="GetCapabilities" messagetype="request" provider="hmi">
- <description>Method is invoked at system startup by SDL to request information about VR capabilities of HMI.</description>
- </function>
- <function name="GetCapabilities" messagetype="response">
- <param name="vrCapabilities" type="Common.VrCapabilities" minsize="1" maxsize="100" array="true" mandatory="false">
- <description>Types of input recognized by VR module.</description>
- </param>
- </function>
- </interface>
- <interface name="TTS" version="1.0" date="2013-04-18">
- <description>RPCs for communication between TTS and SDL.</description>
- <function name="GetCapabilities" messagetype="request" provider="hmi">
- <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">
- <description>See SpeechCapabilities</description>
- </param>
- <param name="prerecordedSpeechCapabilities" type="Common.PrerecordedSpeech" minsize="1" maxsize="5" array="true" mandatory="true">
- <description>See PrerecordedSpeech</description>
- </param>
- </function>
- <function name="Started" messagetype="notification" provider="hmi">
- <description>Must be initiated by TTS module to let SDL know that TTS session has started.</description>
- </function>
- <function name="Stopped" messagetype="notification" provider="hmi">
- <description>Must be initiated by TTS module to let SDL know that TTS session has stopped.</description>
- </function>
- <function name="IsReady" messagetype="request" provider="hmi">
- <description>Method is invoked at system start-up. Response must provide the information about presence of TTS module and its readiness to cooperate with SDL.</description>
- </function>
- <function name="IsReady" messagetype="response">
- <param name="available" type="Boolean" mandatory="true">
- <description>Must be true if TTS is present and ready to communicate with SDL.</description>
- </param>
- </function>
- <function name="Speak" messagetype="request" provider="hmi">
- <description>RPC from SDL to TTS for speaking the text.</description>
- <param name="ttsChunks" type="Common.TTSChunk" mandatory="true" array="true" minsize="1" maxsize="100">
- <description>List of strings to be spoken.</description>
- </param>
- <param name="appID" type="Integer" mandatory="true">
- <description>ID of application that requested this RPC.</description>
- </param>
- <param name="speakType" type="Common.MethodName" mandatory="false">
- <description>Defines the type of the request which causes text-to-speech</description>
- </param>
- </function>
- <function name="Speak" messagetype="response">
- <description>Provides information about success of operation.</description>
- </function>
- <function name="StopSpeaking" messagetype="request" provider="hmi">
- <description>Initiated by SDL to stop speaking the text.</description>
- </function>
- <function name="StopSpeaking" messagetype="response">
- </function>
- <function name="ChangeRegistration" messagetype="request" provider="hmi">
- <description>Request from SmartDeviceLink to HMI to change language of TTS.</description>
- <param name="ttsName" type="Common.TTSChunk" minsize="1" maxsize="100" array="true" mandatory="false">
- <description>
- Request new ttsName registration
- TTS string for VR recognition of the mobile application name, e.g. "Ford Drive Green".
- Meant to overcome any failing on speech engine in properly pronouncing / understanding app name.
- May not be empty.
- May not start with a new line character.
- Not unique value (SDL makes all the checks)
- </description>
- </param>
- <param name="language" type="Common.Language" mandatory="true">
- <description>The language application wants to switch to.</description>
- </param>
- <param name="appID" type="Integer" mandatory="true">
- <description>ID of application related to this RPC.</description>
- </param>
- </function>
- <function name="ChangeRegistration" messagetype="response">
- </function>
- <function name="OnLanguageChange" messagetype="notification" provider="hmi">
- <description>Notification from HMI to SmartDeviceLink about change of language.</description>
- <param name="language" type="Common.Language" mandatory="true">
- <description>Language TTS has switched to.</description>
- </param>
- </function>
- <function name="GetSupportedLanguages" messagetype="request" provider="hmi">
- <description>Method is invoked at system start-up by SDL. Response must provide the information about TTS supported languages.</description>
- </function>
- <function name="GetSupportedLanguages" messagetype="response">
- <param name="languages" type="Common.Language" mandatory="true" array="true" minsize="1" maxsize="100">
- <description>List of languages supported in TTS.</description>
- </param>
- </function>
- <function name="GetLanguage" messagetype="request" provider="hmi">
- <description>Request from SmartDeviceLink to HMI to get currently active TTS language</description>
- </function>
- <function name="GetLanguage" messagetype="response">
- <param name="language" type="Common.Language" mandatory="true"/>
- </function>
- <function name="SetGlobalProperties" messagetype="request" provider="hmi">
- <description>Sets some properties for the application initiated request.</description>
- <param name="helpPrompt" type="Common.TTSChunk" minsize="1" maxsize="100" array="true" mandatory="false">
- <description>
- The help prompt.
- An array of text chunks of type TTSChunk. See TTSChunk.
- The array must have at least one item.
- </description>
- </param>
- <param name="timeoutPrompt" type="Common.TTSChunk" minsize="1" maxsize="100" array="true" mandatory="false">
- <description>
- Help text for a wait timeout.
- An array of text chunks of type TTSChunk. See TTSChunk.
- The array must have at least one item.
- </description>
- </param>
- <param name="appID" type="Integer" mandatory="true">
- <description>ID of application related to this RPC.</description>
- </param>
- </function>
- <function name="SetGlobalProperties" messagetype="response">
- </function>
- <function name="OnResetTimeout" messagetype="notification">
- <description>
- Sender: HMI-&gt;SDL. HMI must send this notification every 10 sec. in case the 'methodName'
- results long processing on HMI
- </description>
- <param name="appID" type="Integer" mandatory="true">
- <description>Id of application that concerns the 'methodName'.</description>
- </param>
- <param name="methodName" type="String" mandatory="true">
- <description>The name of the method, the renew of timeout is required for</description>
- </param>
- </function>
- </interface>
- <interface name="UI" version="1.0" date="2013-04-16">
- <function name="Alert" messagetype="request" provider="hmi">
- <description>Request from SDL to show an alert message on the display.</description>
- <param name="alertStrings" type="Common.TextFieldStruct" mandatory="true" array="true" minsize="0" maxsize="3">
- <description>Array of lines of alert text fields. See TextFieldStruct. Uses alertText1, alertText2, alertText3.</description>
- </param>
- <param name="duration" type="Integer" mandatory="true" minvalue="3000" maxvalue="10000">
- <description>Timeout in milliseconds.</description>
- </param>
- <param name="softButtons" type="Common.SoftButton" mandatory="false" minsize="0" maxsize="4" array="true">
- <description>App defined SoftButtons</description>
- </param>
- <param name="progressIndicator" type="Boolean" mandatory="false">
- <description>If supported on the given platform, the alert GUI will include some sort of animation indicating that loading of a feature is progressing. e.g. a spinning wheel or hourglass, etc.</description>
- </param>
- <param name="alertType" type="Common.AlertType" mandatory="true">
- <description>Defines if only UI or BOTH portions of the Alert request are being sent to HMI Side</description>
- </param>
- <param name="appID" type="Integer" mandatory="true">
- <description>ID of application requested this RPC.</description>
- </param>
- </function>
- <function name="Alert" messagetype="response">
- <param name="tryAgainTime" type="Integer" mandatory="false" minvalue="0" maxvalue="2000000000">
- <description>Amount of time (in milliseconds) that SDL must wait before resending an alert. Must be provided if another system event or overlay currently has a higher priority than this alert.</description>
- </param>
- </function>
- <function name="Show" messagetype="request" provider="hmi">
- <param name="showStrings" type="Common.TextFieldStruct" mandatory="true" array="true" minsize="0" maxsize="7">
- <description>Array of lines of show text fields. See TextFieldStruct. Uses mainField1, mainField2, mainField3, mainField4. If some field is not set, the corresponding text should stay unchanged. If field's text is empty "", the field must be cleared.
- mainField1: The text that should be displayed in a single or upper display line.
- mainField2: The text that should be displayed on the second display line.
- mainField3: The text that should be displayed on the second "page" first display line.
- mainField4: The text that should be displayed on the second "page" second display line.
- statusBar: statusBar.
- mediaClock: Text value for MediaClock field.
- mediaTrack: The text that should be displayed in the track field. This field is only valid for media applications on NGN type ACMs.
- </description>
- </param>
- <param name="alignment" type="Common.TextAlignment" mandatory="false">
- <description>Specifies how mainField1 and mainField2 texts should be aligned on the display.</description>
- <description>If omitted, texts must be centered</description>
- </param>
- <param name="graphic" type="Common.Image" mandatory="false">
- <description>Path to optional dynamic image or the static binary image itself. See Image. If omitted, the displayed graphic should not change.</description>
- </param>
- <param name="secondaryGraphic" type="Common.Image" mandatory="false">
- <description>
- Image struct determining whether static or dynamic secondary image to display in app.
- If omitted on supported displays, the displayed secondary graphic shall not change.
- </description>
- </param>
- <param name="softButtons" type="Common.SoftButton" minsize="0" maxsize="8" array="true" mandatory="false">
- <description>App defined SoftButtons.</description>
- <description>If omitted, the currently displayed SoftButton values should not change.</description>
- </param>
- <param name="customPresets" type="String" maxlength="500" minsize="0" maxsize="10" array="true" mandatory="false">
- <description>App labeled on-screen presets (i.e. GEN3 media presets or dynamic search suggestions).</description>
- <description>If omitted on supported displays, the presets will be shown as not defined.</description>
- </param>
- <param name="appID" type="Integer" mandatory="true">
- <description>Id of application related to this RPC.</description>
- </param>
- </function>
- <function name="Show" messagetype="response">
- </function>
- <function name="AddCommand" messagetype="request" provider="hmi">
- <description>Request from SDL to add a command to the application menu.</description>
- <param name="cmdID" type="Integer" minvalue="0" maxvalue="2000000000" mandatory="true">
- <description>ID of the command to be added.</description>
- </param>
- <param name="menuParams" type="Common.MenuParams" mandatory="false">
- <description>Optional sub value containing parameters of the command (position, name, etc.). See MenuParams. If omitted the command should be added to the end of the list of commands.</description>
- </param>
- <param name="cmdIcon" type="Common.Image" mandatory="false">
- <description>Image to be displayed for representing the command. See Image.</description>
- <description>If omitted, no (or the default if applicable) icon should be displayed.</description>
- </param>
- <param name="appID" type="Integer" mandatory="true">
- <description>ID of application that concerns this RPC.</description>
- </param>
- </function>
- <function name="AddCommand" messagetype="response">
- </function>
- <function name="DeleteCommand" messagetype="request" provider="hmi">
- <description>Request from SDL to delete a command from the in-application menu with the specified command id.</description>
- <param name="cmdID" type="Integer" mandatory="true" minvalue="0" maxvalue="2000000000">
- <description>cmdId previously sent via AddCommand request - id of the command to be deleted.</description>
- </param>
- <param name="appID" type="Integer" mandatory="true">
- <description>ID of application that concerns this RPC.</description>
- </param>
- </function>
- <function name="DeleteCommand" messagetype="response">
- </function>
- <function name="AddSubMenu" messagetype="request" provider="hmi">
- <description>Request from SDL to add a sub menu to the in-application menu.</description>
- <param name="menuID" type="Integer" minvalue="1" maxvalue="2000000000" mandatory="true">
- <description>ID of the sub menu to be added. Unique for the application.</description>
- </param>
- <param name="menuParams" type="Common.MenuParams" mandatory="true">
- <description>Position and name of menu to be added. 'parent' field is omitted for this RPC. </description>
- </param>
- <param name="appID" type="Integer" mandatory="true">
- <description>ID of application that requested this RPC.</description>
- </param>
- </function>
- <function name="AddSubMenu" messagetype="response">
- </function>
- <function name="DeleteSubMenu" messagetype="request" provider="hmi">
- <description>Request from SDL to delete a submenu from the in-application menu.</description>
- <param name="menuID" type="Integer" minvalue="1" maxvalue="2000000000" mandatory="true">
- <description>The "menuID" of the sub-menu to be deleted. (See addSubMenu.menuID)</description>
- </param>
- <param name="appID" type="Integer" mandatory="true">
- <description>ID of application that concerns this RPC.</description>
- </param>
- </function>
- <function name="DeleteSubMenu" messagetype="response">
- </function>
- <function name="PerformInteraction" messagetype="request" provider="hmi">
- <description>Request from SDL for triggering an interaction (e.g. "Permit GPS?" - Yes, no, Always Allow).</description>
- <param name="initialText" type="Common.TextFieldStruct" mandatory="false">
- <description>Uses initialInteractionText. See TextFieldStruct.</description>
- </param>
- <param name="choiceSet" type="Common.Choice" minsize="1" maxsize="100" array="true" mandatory="false">
- <description>The list of choices to be used for the interaction with the user</description>
- </param>
- <param name="vrHelpTitle" type="String" maxlength="500" mandatory="false">
- <description>VR Help Title text.</description>
- <description>If omitted on supported displays, the default HU system help title should be used.</description>
- </param>
- <param name="vrHelp" type="Common.VrHelpItem" minsize="1" maxsize="100" array="true" mandatory="false">
- <description>VR Help Items. If omitted on supported displays, the default HU system generated help items should be used.</description>
- </param>
- <param name="timeout" type="Integer" minvalue="5000" maxvalue="100000" defvalue="10000" mandatory="true">
- <description>Timeout in milliseconds.</description>
- </param>
- <param name="interactionLayout" type="Common.LayoutMode" mandatory="false">
- <description>See LayoutMode.</description>
- </param>
- <param name="appID" type="Integer" mandatory="true">
- <description>ID of application that concerns this RPC.</description>
- </param>
- </function>
- <function name="PerformInteraction" messagetype="response">
- <param name="choiceID" type="Integer" minvalue="0" maxvalue="2000000000" mandatory="false">
- <description>ID of the choice that was selected in response to PerformInteraction.</description>
- </param>
- <param name="manualTextEntry" type="String" minlength="0" maxlength="500" mandatory="false">
- <description>
- Manually entered text selection, e.g. through keyboard
- Can be returned in lieu of choiceID, depending on trigger source
- </description>
- </param>
- </function>
- <function name="SetMediaClockTimer" messagetype="request" provider="hmi">
- <description>Sets the initial media clock value and automatic update method.</description>
- <param name="startTime" type="Common.TimeFormat" mandatory="false">
- <description>startTime should be ignored for "PAUSE", "RESUME", and "CLEAR"</description>
- </param>
- <param name="endTime" type="Common.TimeFormat" mandatory="false">
- <description>
- See TimeFormat.
- endTime can be provided for "COUNTUP" and "COUNTDOWN"; to be used to calculate any visual progress bar (if not provided, this feature is ignored)
- If endTime is greater then startTime for COUNTDOWN or less than startTime for COUNTUP, then the request will return an INVALID_DATA.
- endTime will be ignored for "PAUSE", "RESUME", and "CLEAR"
- </description>
- </param>
- <param name="updateMode" type="Common.ClockUpdateMode" mandatory="true">
- <description>The update method of the media clock.</description>
- <description>In case of pause, resume, or clear, the start time value is ignored and shall be left out. For resume, the time continues with the same value as it was when paused.</description>
- </param>
- <param name="appID" type="Integer" mandatory="true">
- <description>ID of application that requested this RPC.</description>
- </param>
- </function>
- <function name="SetMediaClockTimer" messagetype="response">
- </function>
- <function name="SetGlobalProperties" messagetype="request" provider="hmi">
- <description>Request from SDL to set some properties for VR help.</description>
- <param name="vrHelpTitle" type="String" maxlength="500" mandatory="false">
- <description>VR Help Title text.</description>
- <description>If omitted on supported displays, the default HU system help title should be used.</description>
- </param>
- <param name="vrHelp" type="Common.VrHelpItem" minsize="1" maxsize="100" array="true" mandatory="false">
- <description>VR Help Items. If omitted on supported displays, the default HU system generated help items should be used.</description>
- </param>
- <param name="menuTitle" maxlength="500" type="String" mandatory="false">
- <description>Optional text to label an app menu button (for certain touchscreen platforms).</description>
- </param>
- <param name="menuIcon" type="Common.Image" mandatory="false">
- <description>&gt;Optional icon to draw on an app menu button (for certain touchscreen platforms).</description>
- </param>
- <param name="keyboardProperties" type="Common.KeyboardProperties" mandatory="false">
- <description>On-screen keybaord configuration (if available).</description>
- </param>
- <param name="appID" type="Integer" mandatory="true">
- <description>ID of application that concerns this RPC.</description>
- </param>
- </function>
- <function name="SetGlobalProperties" messagetype="response">
- </function>
- <function name="OnCommand" messagetype="notification" provider="hmi">
- <description>Notification must be initiated by HMI on user choosing menu item.</description>
- <param name="cmdID" type="Integer" minvalue="0" maxvalue="2000000000" mandatory="true">
- <description>Command ID, which is related to a specific menu entry (previously sent with AddCommand).</description>
- </param>
- <param name="appID" type="Integer" mandatory="true">
- <description>ID of application that is related to this RPC.</description>
- </param>
- </function>
- <function name="OnSystemContext" messagetype="notification" provider="hmi">
- <description>
- Notification must be initiated by HMI when the user changes the context of application: goes to menu (in-application menu or system menu);
- switches to VR; pop-up appears on screen etc.
- </description>
- <param name="systemContext" type="Common.SystemContext" mandatory="true">
- <description>The context the application is brought into.</description>
- </param>
- <param name="appID" type="Integer" mandatory="false">
- <description>ID of application that is related to this RPC.</description>
- </param>
- </function>
- <function name="GetCapabilities" messagetype="request" provider="hmi">
- <description>Method is invoked at system startup by SDL to request information about UI capabilities of HMI.</description>
- </function>
- <function name="GetCapabilities" messagetype="response">
- <param name="displayCapabilities" type="Common.DisplayCapabilities" mandatory="true">
- <description>Information about the capabilities of the display: its type, text field supported, etc. See DisplayCapabilities. </description>
- </param>
- <param name="audioPassThruCapabilities" type="Common.AudioPassThruCapabilities" mandatory="true"/>
- <param name="hmiZoneCapabilities" type="Common.HmiZoneCapabilities" mandatory="true"/>
- <param name="softButtonCapabilities" type="Common.SoftButtonCapabilities" minsize="1" maxsize="100" array="true" mandatory="false">
- <description>Must be returned if the platform supports on-screen SoftButtons.</description>
- </param>
- <param name="hmiCapabilities" type="Common.HMICapabilities" mandatory="false">
- <description>Specifies the HMI&#8217;s capabilities. See HMICapabilities.</description>
- </param>
- </function>
- <function name="ChangeRegistration" messagetype="request" provider="hmi">
- <description>Request from SmartDeviceLink to HMI to change language for app.</description>
- <param name="appName" type="String" maxlength="100" mandatory="false">
- <description>
- Request new app name registration
- Needs to be unique over all applications.
- May not be empty. May not start with a new line character.
- May not interfere with any name or synonym of any registered applications.
- Applications with the same name will be rejected. (SDL makes all the checks)
- </description>
- </param>
- <param name="ngnMediaScreenAppName" type="String" maxlength="100" mandatory="false">
- <description>Request new app short name registration</description>
- </param>
- <param name="language" type="Common.Language" mandatory="true">
- <description>The language application wants to switch to.</description>
- </param>
- <param name="appHMIType" type="Common.AppHMIType" minsize="1" maxsize="100" array="true" mandatory="false">
- <description>
- Sent when app's requested-during-registration AppHMIType is changed to different one due to Policies update. Contains the updated list of all allowed app's AppHMITypes.
- </description>
- </param>
- <param name="appID" type="Integer" mandatory="true">
- <description>ID of application that concerns this RPC.</description>
- </param>
- </function>
- <function name="ChangeRegistration" messagetype="response">
- </function>
- <function name="OnLanguageChange" messagetype="notification" provider="hmi">
- <description>Notification from HMI to SmartDeviceLink about change of language.</description>
- <param name="language" type="Common.Language" mandatory="true">
- <description>Language UI has switched to.</description>
- </param>
- </function>
- <function name="GetSupportedLanguages" messagetype="request" provider="hmi">
- <description>Method should be invoked at system startup. Response provides information about UI supported languages.</description>
- </function>
- <function name="GetSupportedLanguages" messagetype="response">
- <param name="languages" type="Common.Language" mandatory="true" array="true" minsize="1" maxsize="100">
- <description>List of languages supported in UI.</description>
- </param>
- </function>
- <function name="GetLanguage" messagetype="request" provider="hmi">
- <description>Request from SmartDeviceLink to HMI to get currently active UI language</description>
- </function>
- <function name="GetLanguage" messagetype="response">
- <param name="language" type="Common.Language" mandatory="true"/>
- </function>
- <function name="OnDriverDistraction" messagetype="notification" provider="hmi">
- <description>Notification must be sent from HMI to SDL when driver distraction state is changed. Driver distraction rules are defined by the platform.</description>
- <param name="state" type="Common.DriverDistractionState" mandatory="true">
- <description>See DriverDistractionState. </description>
- </param>
- </function>
- <function name="SetAppIcon" messagetype="request" provider="hmi">
- <description>Used to set existing local file on SYNC as the app's icon.</description>
- <param name="syncFileName" type="Common.Image" mandatory="true">
- <description>Either the path to the dynamic image stored on HY or the static binary image itself. See Image</description>
- </param>
- <param name="appID" type="Integer" mandatory="true">
- <description>ID of application related to this RPC.</description>
- </param>
- </function>
- <function name="SetAppIcon" messagetype="response">
- </function>
- <function name="SetDisplayLayout" messagetype="request" provider="hmi">
- <param name="displayLayout" type="String" maxlength="500" mandatory="true">
- <description>
- Predefined or dynamically created screen layout.
- Currently only predefined screen layouts are defined.
- </description>
- </param>
- <param name="appID" type="Integer" mandatory="true">
- <description>ID of application related to this RPC.</description>
- </param>
- </function>
- <function name="SetDisplayLayout" messagetype="response">
- <param name="displayCapabilities" type="Common.DisplayCapabilities" mandatory="false">
- <description>See DisplayCapabilities</description>
- </param>
- <param name="buttonCapabilities" type="Common.ButtonCapabilities" minsize="1" maxsize="100" array="true" mandatory="false">
- <description>See ButtonCapabilities</description>
- </param>
- <param name="softButtonCapabilities" type="Common.SoftButtonCapabilities" minsize="1" maxsize="100" array="true" mandatory="false">
- <description>If returned, the platform supports on-screen SoftButtons; see SoftButtonCapabilities.</description>
- </param>
- <param name="presetBankCapabilities" type="Common.PresetBankCapabilities" mandatory="false">
- <description>If returned, the platform supports custom on-screen Presets; see PresetBankCapabilities.</description>
- </param>
- </function>
- <function name="ShowCustomForm" messagetype="request" provider="hmi">
- <description>Used to show a custom form; it can be a parent or child screen. If no parent screen is designated, it is set as a parent screen.</description>
- <param name="customFormID" type="String" maxlength="500" mandatory="true">
- <description>
- Predefined or dynamically created screen layout.
- Currently only predefined forms are defined.
- Predefined layouts include:
- "DEFAULT" - Default media / non-media screen
- "ONSCREEN_PRESETS" - Custom root media screen containing app-defined onscreen presets.
- "KEYBOARD_SEARCH" - Custom template containing app-configured on-screen keyboard with active search updating; user also can trigger voice search.
- "NAV_FULLSCREEN_MAP" - Custom root template screen containing full screen map with navigation controls.
- "NAV_POI_MENU" - Custom template containing app-defined POI options.
- "NAV_SEARCH_RESULTS" - Custom template containing a list of app-defined search results
- "NAV_POI_INFO" - Custom template containing app-defined POI information (and potentially map data).
- </description>
- </param>
- <param name="parentFormID" type="String" maxlength="500" defvalue="DEFAULT" mandatory="false">
- <description>
- Parent screen of predefined form to display.
- Currently only predefined forms are defined.
- If not provided, then set to "DEFAULT".
- Predefined layouts include:
- "DEFAULT" - Default media / non-media screen
- "ONSCREEN_PRESETS" - Custom root media screen containing app-defined onscreen presets.
- "NAV_FULLSCREEN_MAP" - Custom template containing full screen map with navigation controls.
- </description>
- </param>
- </function>
- <function name="ShowCustomForm" messagetype="response">
- <param name="info" type="String" maxlength="1000" mandatory="false" platform="documentation">
- <description>Provides additional human readable info regarding the result.</description>
- </param>
- </function>
- <function name="OnKeyboardInput" messagetype="notification" provider="hmi">
- <description>On-screen keyboard event.</description>
- <description>Can be full string or individual keypresses depending on keyboard mode.</description>
- <param name="event" type="Common.KeyboardEvent" mandatory="true">
- <description>On-screen keyboard input data.</description>
- </param>
- <param name="data" type="String" minlength="0" maxlength="500" mandatory="false">
- <description>On-screen keyboard input data.</description>
- <description>For dynamic keypress events, this will be the current compounded string of entry text.</description>
- <description>For entry submission events, this will be the full text entry (this will always return regardless of the mode).</description>
- <description>For entry cancelled and entry aborted events, this data param will be omitted.</description>
- </param>
- </function>
- <function name="OnTouchEvent" messagetype="notification" provider="hmi">
- <description>Notifies about touch events on the screen's prescribed area</description>
- <param name="type" type="Common.TouchType" mandatory="true">
- <description>The type of touch event.</description>
- </param>
- <param name="event" type="Common.TouchEvent" mandatory="true" minsize="1" maxsize="10" array="true">
- <description>List of all individual touches involved in this event.</description>
- </param>
- </function>
- <function name="Slider" messagetype="request" provider="hmi">
- <description>Creates a full screen or pop-up overlay (depending on platform) with a single user controlled slider.</description>
- <param name="numTicks" type="Integer" minvalue="2" maxvalue="26" mandatory="true">
- <description>Number of selectable items on a horizontal axis</description>
- </param>
- <param name="position" type="Integer" minvalue="1" maxvalue="26" mandatory="true">
- <description>Initial position of slider control (cannot exceed numTicks)</description>
- </param>
- <param name="sliderHeader" type="String" maxlength="500" mandatory="true">
- <description>Text header to be displayed.</description>
- </param>
- <param name="sliderFooter" type="String" maxlength="500" minsize="1" maxsize="26" array="true" mandatory="false">
- <description>Text footer to be displayed (meant to display min/max threshold descriptors).</description>
- <description>For a static text footer, only one footer string shall be provided in the array.</description>
- <description>For a dynamic text footer, the number of footer text string in the array must match the numTicks value.</description>
- <description>For a dynamic text footer, text array string should correlate with potential slider position index.</description>
- <description>If omitted on supported displays, no footer text shall be displayed.</description>
- </param>
- <param name="timeout" type="Integer" minvalue="1000" maxvalue="65535" mandatory="true">
- <description>Timeout. The slider should be displayed until the defined amount of time has elapsed. </description>
- </param>
- <param name="appID" type="Integer" mandatory="true">
- <description>ID of application that concerns this RPC.</description>
- </param>
- </function>
- <function name="Slider" messagetype="response">
- <param name="sliderPosition" type="Integer" minvalue="1" maxvalue="26" mandatory="false">
- <description>Current slider position. Must be returned when the user has clicked the &#8216;Save&#8217; or &#8216;Canceled&#8217; button or by the timeout </description>
- </param>
- </function>
- <function name="ScrollableMessage" messagetype="request" provider="hmi">
- <description>Creates a full screen overlay containing a large block of formatted text that can be scrolled with up to 8 SoftButtons defined</description>
- <param name="messageText" type="Common.TextFieldStruct" mandatory="true">
- <description>Body of text that can include newlines and tabs. Uses scrollableMessageBody.</description>
- </param>
- <param name="timeout" type="Integer" minvalue="0" maxvalue="65535" mandatory="true">
- <description>Timeout in milliseconds. The message should be displayed until the time defined is up.</description>
- </param>
- <param name="softButtons" type="Common.SoftButton" minsize="0" maxsize="8" array="true" mandatory="false">
- <description>App defined SoftButtons.</description>
- <description>If omitted on supported displays, only the system defined "Close" SoftButton should be displayed.</description>
- </param>
- <param name="appID" type="Integer" mandatory="true">
- <description>ID of application related to this RPC.</description>
- </param>
- </function>
- <function name="ScrollableMessage" messagetype="response">
- </function>
- <function name="PerformAudioPassThru" messagetype="request" provider="hmi">
- <param name="appID" type="Integer" mandatory="true">
- <description>ID of application related to this RPC.</description>
- </param>
- <param name="audioPassThruDisplayTexts" type="Common.TextFieldStruct" mandatory="true" minsize="0" maxsize="2" array="true">
- <description>Uses
- audioPassThruDisplayText1: First line of text displayed during audio capture.
- audioPassThruDisplayText2: Second line of text displayed during audio capture.</description>
- </param>
- <param name="maxDuration" type="Integer" minvalue="1" maxvalue="1000000" mandatory="true">
- <description>The maximum duration of audio recording in milliseconds. If not provided, the recording should be performed until EndAudioPassThru arrives.</description>
- </param>
- <param name="muteAudio" type="Boolean" mandatory="true">
- <description>
- Defines if the current audio source should be muted during the APT session. If not, the audio source will play without interruption.
- If omitted, the value is set to true.
- </description>
- </param>
- </function>
- <function name="PerformAudioPassThru" messagetype="response">
- </function>
- <function name="EndAudioPassThru" messagetype="request" provider="hmi">
- <description>Request is sent by SDL to stop the audio capturing.</description>
- </function>
- <function name="EndAudioPassThru" messagetype="response">
- </function>
- <function name="IsReady" messagetype="request" provider="hmi">
- <description>Method is invoked at system startup. Response provides information about presence of UI module and its readiness to cooperate with SDL.</description>
- </function>
- <function name="IsReady" messagetype="response">
- <param name="available" type="Boolean" mandatory="true">
- <description>Must be true if UI is present and ready to communicate with SDL.</description>
- </param>
- </function>
- <function name="ClosePopUp" messagetype="request" provider="hmi">
- <description>Initiated by SDL to close currently active pop-up on HMI.</description>
- <param name="methodName" type="String" mandatory="false">
- <description>Method to be closed</description>
- </param>
- </function>
- <function name="ClosePopUp" messagetype="response">
- <description>Provides the result of operation.</description>
- </function>
- <function name="OnResetTimeout" messagetype="notification" provider="hmi">
- <description>HMI must provide SDL with notifications specific to the current Turn-By-Turn client status on the module</description>
- <param name="appID" type="Integer" mandatory="true">
- <description>Id of application that invoked notifcation.</description>
- </param>
- <param name="methodName" type="String" mandatory="true">
- <description>Currently used method name on which was triggered action</description>
- </param>
- </function>
- <function name="OnRecordStart" messagetype="notification" provider="sdl">
- <description>Issued by SDL to notify HMI about capturing mic data should be started</description>
- <param name="appID" type="Integer" mandatory="true">
- <description>ID of application related to this RPC.</description>
- </param>
- </function>
- <function name="SendHapticData" messagetype="request">
- <description>Send the UI spatial data from MOBILE. This data will be utilized by the HMI to determine how and when haptic events should occur</description>
- <param name="appID" type="Integer" mandatory="true">
- <description>Internal ID of the application that requested this RPC.</description>
- </param>
- <param name="hapticRectData" type="Common.HapticRect" minsize="0" maxsize="1000" mandatory="false" array="true">
- <description>
- Array of rectangle data structures that represent the locations of all user controls present on the HMI.
- This data should be updated if/when the application presents a new screen.
- When a request is sent, if successful, it will replace all rectangle data previously sent through RPC.
- Avoidance of doubt, when an empty hapticRectData, it will be clear all rectangle data previously sent through RPC.
- </description>
- </param>
- </function>
- <function name="SendHapticData" messagetype="response">
- </function>
- </interface>
- <interface name="Navigation" version="1.0" date="2013-05-22">
- <function name="IsReady" messagetype="request" provider="hmi">
- <description>Method is invoked at system startup. Response must provide the information about presence of UI Navigation module and its readiness to cooperate with SDL.</description>
- </function>
- <function name="IsReady" messagetype="response">
- <param name="available" type="Boolean" mandatory="true">
- <description>Must be true if Navigation is present and ready to communicate with SDL.</description>
- </param>
- </function>
- <function name="SendLocation" messagetype="request">
- <description>That allows the app to send a destination to the embedded nav system.</description>
- <param name="appID" type="Integer" mandatory="true">
- <description>ID of application related to this RPC.</description>
- </param>
- <param name="longitudeDegrees" type="Float" minvalue="-180" maxvalue="180" mandatory="true">
- </param>
- <param name="latitudeDegrees" type="Float" minvalue="-90" maxvalue="90" mandatory="true">
- </param>
- <param name="locationName" type="String" maxlength="500" mandatory="false">
- <description> Name / title of intended location </description>
- </param>
- <param name="locationDescription" type="String" maxlength="500" mandatory="false">
- <description> Description intended location / establishment (if applicable) </description>
- </param>
- <param name="addressLines" type="String" maxlength="500" minsize="0" maxsize="4" array="true" mandatory="false">
- <description> Location address (if applicable) </description>
- </param>
- <param name="phoneNumber" type="String" maxlength="500" mandatory="false">
- <description> Phone number of intended location / establishment (if applicable) </description>
- </param>
- <param name="locationImage" type="Common.Image" mandatory="false">
- <description> Image / icon of intended location (if applicable and supported) </description>
- </param>
- </function>
- <function name="SendLocation" messagetype="response">
- </function>
-
- <function name="DialNumber" functionID="DialNumberID" messagetype="request">
- <description>Dials a phone number and switches to phone application.</description>
- <param name="number" type="String" maxlength="40" mandatory="true">
- <description>Phone number is a string, which can be up to 40 chars.</description>
- </param>
- </function>
-
- <function name="DialNumber" functionID="DialNumberID" messagetype="response">
- </function>
-
- <function name="ShowConstantTBT" messagetype="request" provider="hmi">
- <description>Request from SmartDeviceLinkCore to HMI to show info about navigation.</description>
- <param name="navigationTexts" type="Common.TextFieldStruct" mandatory="true" array="true" minsize="0" maxsize="5">
- <description>See TextFieldStruct. Uses:
- navigationText1
- navigationText2
- ETA
- totalDistance
- timeToDestination.
- </description>
- </param>
- <param name="turnIcon" type="Common.Image" mandatory="false">
- </param>
- <param name="nextTurnIcon" type="Common.Image" mandatory="false">
- </param>
- <param name="distanceToManeuver" type="Float" minvalue="0" maxvalue="1000000000" mandatory="true">
- <description>Fraction of distance till next maneuver (from previous maneuver).</description>
- <description>May be used to calculate progress bar.</description>
- </param>
- <param name="distanceToManeuverScale" type="Float" minvalue="0" maxvalue="1000000000" mandatory="true">
- <description>Fraction of distance till next maneuver (starting from when AlertManeuver is triggered).</description>
- <description>May be used to calculate progress bar.</description>
- </param>
- <param name="maneuverComplete" type="Boolean" mandatory="false">
- <description>If and when a maneuver has completed while an AlertManeuver is active, SDL will send this value set to TRUE in order to clear the AlertManeuver overlay.</description>
- <description>If omitted the value should be assumed as FALSE.</description>
- </param>
- <param name="softButtons" type="Common.SoftButton" minsize="0" maxsize="3" array="true" mandatory="false">
- <description>Three dynamic SoftButtons available</description>
- <description>If omitted on supported displays, the currently displayed SoftButton values will not change.</description>
- </param>
- <param name="appID" type="Integer" mandatory="true">
- <description>ID of application related to this RPC.</description>
- </param>
- </function>
- <function name="ShowConstantTBT" messagetype="response">
- </function>
- <function name="AlertManeuver" messagetype="request" provider="hmi">
- <description>Request from SmartDeviceLinkCore to HMI to announce navigation maneuver</description>
- <param name="softButtons" type="Common.SoftButton" minsize="0" maxsize="3" array="true" mandatory="false">
- <description>If omitted, only the system defined "Close" SoftButton should be displayed.</description>
- </param>
- <param name="appID" type="Integer" mandatory="true">
- <description>ID of the application requested this RPC.</description>
- </param>
- </function>
- <function name="AlertManeuver" messagetype="response">
- </function>
- <function name="UpdateTurnList" messagetype="request" provider="hmi">
- <description>Request from SmartDeviceLinkCore to HMI to update turn list.</description>
- <param name="turnList" type="Common.Turn" minsize="1" maxsize="100" array="true" mandatory="false">
- </param>
- <param name="softButtons" type="Common.SoftButton" minsize="0" maxsize="1" array="true" mandatory="false">
- <description>If omitted, app-defined SoftButton should be left blank.</description>
- </param>
- <param name="appID" type="Integer" mandatory="true">
- <description>ID of application related to this RPC.</description>
- </param>
- </function>
- <function name="UpdateTurnList" messagetype="response">
- </function>
- <function name="OnTBTClientState" messagetype="notification" provider="hmi">
- <description>HMI must provide SDL with notifications specific to the current Turn-By-Turn client status on the module</description>
- <param name="state" type="Common.TBTState" mandatory="true">
- <description>Current State of TBT client</description>
- </param>
- </function>
- <function name="SetVideoConfig" messagetype="request">
- <description>Request from SDL to HMI to ask whether HMI accepts a video stream with given configuration.</description>
- <param name="config" type="Common.VideoConfig" mandatory="true">
- <description>Configuration of a video stream.</description>
- </param>
- <param name="appID" type="Integer" mandatory="true">
- <description>ID of application related to this RPC.</description>
- </param>
- </function>
- <function name="SetVideoConfig" messagetype="response">
- <description>
- Response from HMI to SDL whether the configuration is accepted.
- In a negative response, a list of rejected parameters are supplied.
- </description>
- <param name="rejectedParams" type="String" array="true" minsize="1" maxsize="1000" mandatory="false">
- <description>
- List of params of VideoConfig struct which are not accepted by HMI, e.g. "protocol" and "codec".
- This param exists only when the response is negative.
- </description>
- </param>
- </function>
- <function name="StartStream" messagetype="request" provider="hmi">
- <description>Request from SmartDeviceLinkCore to HMI to start playing video streaming.</description>
- <param name="url" type="String" minlength="21" maxlength="500" mandatory="true">
- <description>URL that HMI start playing.</description>
- </param>
- <param name="appID" type="Integer" mandatory="true">
- <description>ID of application related to this RPC.</description>
- </param>
- </function>
- <function name="StartStream" messagetype="response">
- </function>
- <function name="StopStream" messagetype="request" provider="hmi">
- <description>Request from SmartDeviceLinkCore to HMI to stop playing video streaming.</description>
- <param name="appID" type="Integer" mandatory="true">
- <description>ID of application related to this RPC.</description>
- </param>
- </function>
- <function name="StopStream" messagetype="response">
- </function>
- <function name="StartAudioStream" messagetype="request" provider="hmi">
- <description>Request from SmartDeviceLinkCore to HMI to start playing audio streaming.</description>
- <param name="url" type="String" minlength="21" maxlength="500" mandatory="true">
- <description>URL that HMI start playing.</description>
- </param>
- <param name="appID" type="Integer" mandatory="true">
- <description>ID of application related to this RPC.</description>
- </param>
- </function>
- <function name="StartAudioStream" messagetype="response">
- </function>
- <function name="StopAudioStream" messagetype="request" provider="hmi">
- <description>Request from SmartDeviceLinkCore to HMI to stop playing audio streaming.</description>
- <param name="appID" type="Integer" mandatory="true">
- <description>ID of application related to this RPC.</description>
- </param>
- </function>
- <function name="StopAudioStream" messagetype="response">
- </function>
- <function name="OnAudioDataStreaming" messagetype="notification">
- <description>Sender: SDL-&gt;HMI. Purpose: notify about raw audio data presence over the URL provided via StartAudioStream SDL's request.</description>
- <param name="available" type="Boolean" mandatory="true">
- <description>If "true" - audio data started. If "false" - audio data stopped.</description>
- </param>
- </function>
- <function name="OnVideoDataStreaming" messagetype="notification">
- <description>Sender: SDL-&gt;HMI. Purpose: notify about raw video data presence over the URL provided via StartStream SDL's request.</description>
- <param name="available" type="Boolean" mandatory="true">
- <description>If "true" - video data started. If "false" - video data stopped.</description>
- </param>
- </function>
- <function name="GetWayPoints" functionID="GetWayPointsID" messagetype="request">
- <description>Request for getting waypoint/destination data.</description>
- <param name="wayPointType" type="Common.WayPointType" mandatory="true">
- <description>To request for either the destination only or for all waypoints including destination</description>
- </param>
- <param name="appID" type="Integer" mandatory="true">
- <description>ID of the application.</description>
- </param>
- </function>
- <function name="GetWayPoints" functionID="GetWayPointsID" messagetype="response">
- <param name="appID" type="Integer" mandatory="true">
- <description>ID of the application.</description>
- </param>
- <param name="wayPoints" type="Common.LocationDetails" mandatory="false" array="true" minsize="1" maxsize="10">
- <description>See LocationDetails</description>
- </param>
- </function>
- <function name="OnWayPointChange" functionID="OnWayPointChangeID" messagetype="notification">
- <description>Notification which provides the entire LocationDetails when there is a change to any waypoints or destination.</description>
- <param name="wayPoints" type="Common.LocationDetails" mandatory="true" array="true" minsize="1" maxsize="10">
- <description>See LocationDetails</description>
- </param>
- </function>
-
- <function name="SubscribeWayPoints" functionID="SubscribeWayPointsID" messagetype="request">
- <description>To subscribe in getting changes for Waypoints/destinations</description>
- </function>
-
- <function name="SubscribeWayPoints" functionID="SubscribeWayPointsID" messagetype="response">
- </function>
-
- <function name="UnsubscribeWayPoints" functionID="UnsubscribeWayPointsID" messagetype="request">
- <description>Request to unsubscribe from WayPoints and Destination</description>
- </function>
-
- <function name="UnsubscribeWayPoints" functionID="UnsubscribeWayPointsID" messagetype="response">
- </function>
- </interface>
-
- <interface name="VehicleInfo" version="1.0" date="2013-04-21">
- <function name="IsReady" messagetype="request" provider="hmi">
- <description>Method is invoked at system startup. Response should provide information about presence of any of vehicle information modules (ECU, GPS, etc) and their readiness to cooperate with SDL.</description>
- </function>
- <function name="IsReady" messagetype="response">
- <param name="available" type="Boolean" mandatory="true">
- <description>Must be true if vehicle data modules are present and ready to communicate with SDL.</description>
- </param>
- </function>
- <function name="GetVehicleType" messagetype="request" provider="hmi">
- <description>Request from SmartDeviceLinkCore to HMI to get info about the vehicle (type, model, etc.).</description>
- </function>
- <function name="GetVehicleType" messagetype="response">
- <param name="vehicleType" type="Common.VehicleType" mandatory="true"/>
- </function>
- <function name="ReadDID" messagetype="request" provider="hmi">
- <description>Request from SDL for vehicle data reading.</description>
- <param name="ecuName" type="Integer" minvalue="0" maxvalue="65535" mandatory="true">
- <description>Name of ECU.</description>
- </param>
- <param name="didLocation" type="Integer" minvalue="0" maxvalue="65535" minsize="1" maxsize="1000" array="true" mandatory="true">
- <description>Get raw data from vehicle data DID location(s).</description>
- </param>
- <param name="appID" type="Integer" mandatory="true">
- <description>ID of application related to this RPC.</description>
- </param>
- </function>
- <function name="ReadDID" messagetype="response">
- <param name="didResult" type="Common.DIDResult" minsize="0" maxsize="1000" array="true" mandatory="false">
- <description>Array of requested DID results (with data if available).</description>
- </param>
- </function>
- <function name="GetDTCs" messagetype="request" provider="hmi">
- <description>Vehicle module diagnostic trouble code request.</description>
- <param name="ecuName" type="Integer" minvalue="0" maxvalue="65535" mandatory="true">
- <description>Name of ECU.</description>
- </param>
- <param name="dtcMask" type="Integer" minvalue="0" maxvalue="255" mandatory="false">
- <description>DTC Mask Byte to be sent in diagnostic request to module .</description>
- </param>
- <param name="appID" type="Integer" mandatory="true">
- <description>ID of application that requested this RPC.</description>
- </param>
- </function>
- <function name="GetDTCs" messagetype="response">
- <param name="ecuHeader" type="Integer" minvalue="0" maxvalue="65535" mandatory="true">
- <description>2 byte ECU Header for DTC response (as defined in VHR_Layout_Specification_DTCs.pdf)</description>
- </param>
- <param name="dtc" type="String" mandatory="false" minsize="1" maxsize="15" maxlength="10" array="true">
- <description>
- Array of all reported DTCs on module. Each DTC is represented with 4 bytes:
- 3 bytes for data
- 1 byte for status
- </description>
- </param>
- </function>
- <function name="DiagnosticMessage" messagetype="request" provider="hmi">
- <description>Non periodic vehicle diagnostic request</description>
- <param name="targetID" type="Integer" minvalue="0" maxvalue="65535" mandatory="true">
- <description>Name of target ECU.</description>
- </param>
- <param name="messageLength" type="Integer" minvalue="0" maxvalue="65535" mandatory="true">
- <description>Length of message (in bytes).</description>
- </param>
- <param name="messageData" type="Integer" minvalue="0" maxvalue="255" minsize="1" maxsize="65535" array="true" mandatory="true">
- <description>
- Array of bytes comprising CAN message.
- </description>
- </param>
- <param name="appID" type="Integer" mandatory="true">
- <description>ID of application that requested this RPC.</description>
- </param>
- </function>
- <function name="DiagnosticMessage" messagetype="response">
- <param name="messageDataResult" type="Integer" minvalue="0" maxvalue="255" minsize="1" maxsize="65535" array="true" mandatory="true">
- <description>
- Array of bytes comprising CAN message result.
- </description>
- </param>
- </function>
- <function name="SubscribeVehicleData" messagetype="request">
- <description>
- Subscribes for specific published data items.
- The data will be only sent if it has changed.
- The application will be notified by the onVehicleData notification whenever new data is available.
- To unsubscribe the notifications, use unsubscribe with the same subscriptionType.
- </description>
- <param name="gps" type="Boolean" mandatory="false">
- <description>See GPSData</description>
- </param>
- <param name="speed" type="Boolean" mandatory="false">
- <description>The vehicle speed in kilometers per hour</description>
- </param>
- <param name="rpm" type="Boolean" mandatory="false">
- <description>The number of revolutions per minute of the engine</description>
- </param>
- <param name="fuelLevel" type="Boolean" mandatory="false">
- <description>The fuel level in the tank (percentage)</description>
- </param>
- <param name="fuelLevel_State" type="Boolean" mandatory="false">
- <description>The fuel level state</description>
- </param>
- <param name="instantFuelConsumption" type="Boolean" mandatory="false">
- <description>The instantaneous fuel consumption in microlitres</description>
- </param>
- <param name="externalTemperature" type="Boolean" mandatory="false">
- <description>The external temperature in degrees celsius</description>
- </param>
- <param name="prndl" type="Boolean" mandatory="false">
- <description>See PRNDL</description>
- </param>
- <param name="tirePressure" type="Boolean" mandatory="false">
- <description>See TireStatus</description>
- </param>
- <param name="odometer" type="Boolean" mandatory="false">
- <description>Odometer in km</description>
- </param>
- <param name="beltStatus" type="Boolean" mandatory="false">
- <description>The status of the seat belts</description>
- </param>
- <param name="bodyInformation" type="Boolean" mandatory="false">
- <description>The body information including power modes</description>
- </param>
- <param name="deviceStatus" type="Boolean" mandatory="false">
- <description>The device status including signal and battery strength</description>
- </param>
- <param name="driverBraking" type="Boolean" mandatory="false">
- <description>The status of the brake pedal</description>
- </param>
- <param name="wiperStatus" type="Boolean" mandatory="false">
- <description>The status of the wipers</description>
- </param>
- <param name="headLampStatus" type="Boolean" mandatory="false">
- <description>Status of the head lamps</description>
- </param>
- <param name="engineTorque" type="Boolean" mandatory="false">
- <description>Torque value for engine (in Nm) on non-diesel variants</description>
- </param>
- <param name="accPedalPosition" type="Boolean" mandatory="false">
- <description>Accelerator pedal position (percentage depressed)</description>
- </param>
- <param name="steeringWheelAngle" type="Boolean" mandatory="false">
- <description>Current angle of the steering wheel (in deg)</description>
- </param>
- <!-- Ford Specific Data Items -->
- <param name="eCallInfo" type="Boolean" mandatory="false">
- <description>Emergency Call notification and confirmation data</description>
- </param>
- <param name="airbagStatus" type="Boolean" mandatory="false">
- <description>The status of the air bags</description>
- </param>
- <param name="emergencyEvent" type="Boolean" mandatory="false">
- <description>Information related to an emergency event (and if it occurred)</description>
- </param>
- <param name="clusterModeStatus" type="Boolean" mandatory="false">
- <description>The status modes of the cluster</description>
- </param>
- <param name="myKey" type="Boolean" mandatory="false">
- <description>Information related to the MyKey feature</description>
- </param>
- <!-- / Ford Specific Data Items -->
- </function>
- <function name="SubscribeVehicleData" messagetype="response">
- <param name="gps" type="Common.VehicleDataResult" mandatory="false">
- <description>See GPSData</description>
- </param>
- <param name="speed" type="Common.VehicleDataResult" mandatory="false">
- <description>The vehicle speed in kilometers per hour</description>
- </param>
- <param name="rpm" type="Common.VehicleDataResult" mandatory="false">
- <description>The number of revolutions per minute of the engine</description>
- </param>
- <param name="fuelLevel" type="Common.VehicleDataResult" mandatory="false">
- <description>The fuel level in the tank (percentage)</description>
- </param>
- <param name="fuelLevel_State" type="Common.VehicleDataResult" mandatory="false">
- <description>The fuel level state</description>
- </param>
- <param name="instantFuelConsumption" type="Common.VehicleDataResult" mandatory="false">
- <description>The instantaneous fuel consumption in microlitres</description>
- </param>
- <param name="externalTemperature" type="Common.VehicleDataResult" mandatory="false">
- <description>The external temperature in degrees celsius.</description>
- </param>
- <param name="prndl" type="Common.VehicleDataResult" mandatory="false">
- <description>See PRNDL</description>
- </param>
- <param name="tirePressure" type="Common.VehicleDataResult" mandatory="false">
- <description>See TireStatus</description>
- </param>
- <param name="odometer" type="Common.VehicleDataResult" mandatory="false">
- <description>Odometer in km</description>
- </param>
- <param name="beltStatus" type="Common.VehicleDataResult" mandatory="false">
- <description>The status of the seat belts</description>
- </param>
- <param name="bodyInformation" type="Common.VehicleDataResult" mandatory="false">
- <description>The body information including power modes</description>
- </param>
- <param name="deviceStatus" type="Common.VehicleDataResult" mandatory="false">
- <description>The device status including signal and battery strength</description>
- </param>
- <param name="driverBraking" type="Common.VehicleDataResult" mandatory="false">
- <description>The status of the brake pedal</description>
- </param>
- <param name="wiperStatus" type="Common.VehicleDataResult" mandatory="false">
- <description>The status of the wipers</description>
- </param>
- <param name="headLampStatus" type="Common.VehicleDataResult" mandatory="false">
- <description>Status of the head lamps</description>
- </param>
- <param name="engineTorque" type="Common.VehicleDataResult" mandatory="false">
- <description>Torque value for engine (in Nm) on non-diesel variants</description>
- </param>
- <param name="accPedalPosition" type="Common.VehicleDataResult" mandatory="false">
- <description>Accelerator pedal position (percentage depressed)</description>
- </param>
- <param name="steeringWheelAngle" type="Common.VehicleDataResult" mandatory="false">
- <description>Current angle of the steering wheel (in deg)</description>
- </param>
- <!-- Ford Specific Data Items -->
- <param name="eCallInfo" type="Common.VehicleDataResult" mandatory="false">
- <description>Emergency Call notification and confirmation data</description>
- </param>
- <param name="airbagStatus" type="Common.VehicleDataResult" mandatory="false">
- <description>The status of the air bags</description>
- </param>
- <param name="emergencyEvent" type="Common.VehicleDataResult" mandatory="false">
- <description>Information related to an emergency event (and if it occurred)</description>
- </param>
- <param name="clusterModes" type="Common.VehicleDataResult" mandatory="false">
- <description>The status modes of the cluster</description>
- </param>
- <param name="myKey" type="Common.VehicleDataResult" mandatory="false">
- <description>Information related to the MyKey feature</description>
- </param>
- <!-- / Ford Specific Data Items -->
- </function>
- <function name="UnsubscribeVehicleData" messagetype="request">
- <description>
- This function is used to unsubscribe the notifications from the subscribeVehicleData function.
- </description>
- <param name="appID" type="Integer" mandatory="true">
- <description>ID of application that requested this RPC.</description>
- </param>
- <param name="gps" type="Boolean" mandatory="false">
- <description>See GPSData</description>
- </param>
- <param name="speed" type="Boolean" mandatory="false">
- <description>The vehicle speed in kilometers per hour</description>
- </param>
- <param name="rpm" type="Boolean" mandatory="false">
- <description>The number of revolutions per minute of the engine</description>
- </param>
- <param name="fuelLevel" type="Boolean" mandatory="false">
- <description>The fuel level in the tank (percentage)</description>
- </param>
- <param name="fuelLevel_State" type="Boolean" mandatory="false">
- <description>The fuel level state</description>
- </param>
- <param name="instantFuelConsumption" type="Boolean" mandatory="false">
- <description>The instantaneous fuel consumption in microlitres</description>
- </param>
- <param name="externalTemperature" type="Boolean" mandatory="false">
- <description>The external temperature in degrees celsius.</description>
- </param>
- <param name="prndl" type="Boolean" mandatory="false">
- <description>See PRNDL</description>
- </param>
- <param name="tirePressure" type="Boolean" mandatory="false">
- <description>See TireStatus</description>
- </param>
- <param name="odometer" type="Boolean" mandatory="false">
- <description>Odometer in km</description>
- </param>
- <param name="beltStatus" type="Boolean" mandatory="false">
- <description>The status of the seat belts</description>
- </param>
- <param name="bodyInformation" type="Boolean" mandatory="false">
- <description>The body information including power modes</description>
- </param>
- <param name="deviceStatus" type="Boolean" mandatory="false">
- <description>The device status including signal and battery strength</description>
- </param>
- <param name="driverBraking" type="Boolean" mandatory="false">
- <description>The status of the brake pedal</description>
- </param>
- <param name="wiperStatus" type="Boolean" mandatory="false">
- <description>The status of the wipers</description>
- </param>
- <param name="headLampStatus" type="Boolean" mandatory="false">
- <description>Status of the head lamps</description>
- </param>
- <param name="engineTorque" type="Boolean" mandatory="false">
- <description>Torque value for engine (in Nm) on non-diesel variants</description>
- </param>
- <param name="accPedalPosition" type="Boolean" mandatory="false">
- <description>Accelerator pedal position (percentage depressed)</description>
- </param>
- <param name="steeringWheelAngle" type="Boolean" mandatory="false">
- <description>Current angle of the steering wheel (in deg)</description>
- </param>
- <!-- Ford Specific Data Items -->
- <param name="eCallInfo" type="Boolean" mandatory="false">
- <description>Emergency Call notification and confirmation data</description>
- </param>
- <param name="airbagStatus" type="Boolean" mandatory="false">
- <description>The status of the air bags</description>
- </param>
- <param name="emergencyEvent" type="Boolean" mandatory="false">
- <description>Information related to an emergency event (and if it occurred)</description>
- </param>
- <param name="clusterModeStatus" type="Boolean" mandatory="false">
- <description>The status modes of the cluster</description>
- </param>
- <param name="myKey" type="Boolean" mandatory="false">
- <description>Information related to the MyKey feature</description>
- </param>
- <!-- / Ford Specific Data Items -->
- </function>
- <function name="UnsubscribeVehicleData" messagetype="response">
- <param name="gps" type="Common.VehicleDataResult" mandatory="false">
- <description>See GPSData</description>
- </param>
- <param name="speed" type="Common.VehicleDataResult" mandatory="false">
- <description>The vehicle speed in kilometers per hour</description>
- </param>
- <param name="rpm" type="Common.VehicleDataResult" mandatory="false">
- <description>The number of revolutions per minute of the engine</description>
- </param>
- <param name="fuelLevel" type="Common.VehicleDataResult" mandatory="false">
- <description>The fuel level in the tank (percentage)</description>
- </param>
- <param name="fuelLevel_State" type="Common.VehicleDataResult" mandatory="false">
- <description>The fuel level state</description>
- </param>
- <param name="instantFuelConsumption" type="Common.VehicleDataResult" mandatory="false">
- <description>The instantaneous fuel consumption in microlitres</description>
- </param>
- <param name="externalTemperature" type="Common.VehicleDataResult" mandatory="false">
- <description>The external temperature in degrees celsius</description>
- </param>
- <param name="prndl" type="Common.VehicleDataResult" mandatory="false">
- <description>See PRNDL</description>
- </param>
- <param name="tirePressure" type="Common.VehicleDataResult" mandatory="false">
- <description>See TireStatus</description>
- </param>
- <param name="odometer" type="Common.VehicleDataResult" mandatory="false">
- <description>Odometer in km</description>
- </param>
- <param name="beltStatus" type="Common.VehicleDataResult" mandatory="false">
- <description>The status of the seat belts</description>
- </param>
- <param name="bodyInformation" type="Common.VehicleDataResult" mandatory="false">
- <description>The body information including power modes</description>
- </param>
- <param name="deviceStatus" type="Common.VehicleDataResult" mandatory="false">
- <description>The device status including signal and battery strength</description>
- </param>
- <param name="driverBraking" type="Common.VehicleDataResult" mandatory="false">
- <description>The status of the brake pedal</description>
- </param>
- <param name="wiperStatus" type="Common.VehicleDataResult" mandatory="false">
- <description>The status of the wipers</description>
- </param>
- <param name="headLampStatus" type="Common.VehicleDataResult" mandatory="false">
- <description>Status of the head lamps</description>
- </param>
- <param name="engineTorque" type="Common.VehicleDataResult" mandatory="false">
- <description>Torque value for engine (in Nm) on non-diesel variants</description>
- </param>
- <param name="accPedalPosition" type="Common.VehicleDataResult" mandatory="false">
- <description>Accelerator pedal position (percentage depressed)</description>
- </param>
- <param name="steeringWheelAngle" type="Common.VehicleDataResult" mandatory="false">
- <description>Current angle of the steering wheel (in deg)</description>
- </param>
- <!-- Ford Specific Data Items -->
- <param name="eCallInfo" type="Common.VehicleDataResult" mandatory="false">
- <description>Emergency Call notification and confirmation data</description>
- </param>
- <param name="airbagStatus" type="Common.VehicleDataResult" mandatory="false">
- <description>The status of the air bags</description>
- </param>
- <param name="emergencyEvent" type="Common.VehicleDataResult" mandatory="false">
- <description>Information related to an emergency event (and if it occurred)</description>
- </param>
- <param name="clusterModes" type="Common.VehicleDataResult" mandatory="false">
- <description>The status modes of the cluster</description>
- </param>
- <param name="myKey" type="Common.VehicleDataResult" mandatory="false">
- <description>Information related to the MyKey feature</description>
- </param>
- <!-- / Ford Specific Data Items -->
- </function>
- <function name="GetVehicleData" messagetype="request">
- <description>Non periodic vehicle data read request.</description>
- <param name="gps" type="Boolean" mandatory="false">
- <description>See GPSData</description>
- </param>
- <param name="speed" type="Boolean" mandatory="false">
- <description>The vehicle speed in kilometers per hour</description>
- </param>
- <param name="rpm" type="Boolean" mandatory="false">
- <description>The number of revolutions per minute of the engine</description>
- </param>
- <param name="fuelLevel" type="Boolean" mandatory="false">
- <description>The fuel level in the tank (percentage)</description>
- </param>
- <param name="fuelLevel_State" type="Boolean" mandatory="false">
- <description>The fuel level state</description>
- </param>
- <param name="instantFuelConsumption" type="Boolean" mandatory="false">
- <description>The instantaneous fuel consumption in microlitres</description>
- </param>
- <param name="externalTemperature" type="Boolean" mandatory="false">
- <description>The external temperature in degrees celsius</description>
- </param>
- <param name="vin" type="Boolean" mandatory="false">
- <description>Vehicle identification number</description>
- </param>
- <param name="prndl" type="Boolean" mandatory="false">
- <description>See PRNDL</description>
- </param>
- <param name="tirePressure" type="Boolean" mandatory="false">
- <description>See TireStatus</description>
- </param>
- <param name="odometer" type="Boolean" mandatory="false">
- <description>Odometer in km</description>
- </param>
- <param name="beltStatus" type="Boolean" mandatory="false">
- <description>The status of the seat belts</description>
- </param>
- <param name="bodyInformation" type="Boolean" mandatory="false">
- <description>The body information including ignition status and internal temp</description>
- </param>
- <param name="deviceStatus" type="Boolean" mandatory="false">
- <description>The device status including signal and battery strength</description>
- </param>
- <param name="driverBraking" type="Boolean" mandatory="false">
- <description>The status of the brake pedal</description>
- </param>
- <param name="wiperStatus" type="Boolean" mandatory="false">
- <description>The status of the wipers</description>
- </param>
- <param name="headLampStatus" type="Boolean" mandatory="false">
- <description>Status of the head lamps</description>
- </param>
- <param name="engineTorque" type="Boolean" mandatory="false">
- <description>Torque value for engine (in Nm) on non-diesel variants</description>
- </param>
- <param name="accPedalPosition" type="Boolean" mandatory="false">
- <description>Accelerator pedal position (percentage depressed)</description>
- </param>
- <param name="steeringWheelAngle" type="Boolean" mandatory="false">
- <description>Current angle of the steering wheel (in deg)</description>
- </param>
- <param name="eCallInfo" type="Boolean" mandatory="false">
- <description>Emergency Call notification and confirmation data</description>
- </param>
- <param name="airbagStatus" type="Boolean" mandatory="false">
- <description>The status of the air bags</description>
- </param>
- <param name="emergencyEvent" type="Boolean" mandatory="false">
- <description>Information related to an emergency event (and if it occurred)</description>
- </param>
- <param name="clusterModeStatus" type="Boolean" mandatory="false">
- <description>The status modes of the cluster</description>
- </param>
- <param name="myKey" type="Boolean" mandatory="false">
- <description>Information related to the MyKey feature</description>
- </param>
- </function>
- <function name="GetVehicleData" messagetype="response">
- <param name="gps" type="Common.GPSData" mandatory="false">
- <description>See GPSData</description>
- </param>
- <param name="speed" type="Float" minvalue="0" maxvalue="700" mandatory="false">
- <description>The vehicle speed in kilometers per hour</description>
- </param>
- <param name="rpm" type="Integer" minvalue="0" maxvalue="20000" mandatory="false">
- <description>The number of revolutions per minute of the engine</description>
- </param>
- <param name="fuelLevel" type="Float" minvalue="-6" maxvalue="106" mandatory="false">
- <description>The fuel level in the tank (percentage)</description>
- </param>
- <param name="fuelLevel_State" type="Common.ComponentVolumeStatus" mandatory="false">
- <description>The fuel level state</description>
- </param>
- <param name="instantFuelConsumption" type="Float" minvalue="0" maxvalue="25575" mandatory="false">
- <description>The instantaneous fuel consumption in microlitres</description>
- </param>
- <param name="externalTemperature" type="Float" minvalue="-40" maxvalue="100" mandatory="false">
- <description>The external temperature in degrees celsius</description>
- </param>
- <param name="vin" type="String" maxlength="17" mandatory="false">
- <description>Vehicle identification number</description>
- </param>
- <param name="prndl" type="Common.PRNDL" mandatory="false">
- <description>See PRNDL</description>
- </param>
- <param name="tirePressure" type="Common.TireStatus" mandatory="false">
- <description>See TireStatus</description>
- </param>
- <param name="odometer" type="Integer" minvalue="0" maxvalue="17000000" mandatory="false">
- <description>Odometer in km</description>
- </param>
- <param name="beltStatus" type="Common.BeltStatus" mandatory="false">
- <description>The status of the seat belts</description>
- </param>
- <param name="bodyInformation" type="Common.BodyInformation" mandatory="false">
- <description>The body information including power modes</description>
- </param>
- <param name="deviceStatus" type="Common.DeviceStatus" mandatory="false">
- <description>The device status including signal and battery strength</description>
- </param>
- <param name="driverBraking" type="Common.VehicleDataEventStatus" mandatory="false">
- <description>The status of the brake pedal</description>
- </param>
- <param name="wiperStatus" type="Common.WiperStatus" mandatory="false">
- <description>The status of the wipers</description>
- </param>
- <param name="headLampStatus" type="Common.HeadLampStatus" mandatory="false">
- <description>Status of the head lamps</description>
- </param>
- <param name="engineTorque" type="Float" minvalue="-1000" maxvalue="2000" mandatory="false">
- <description>Torque value for engine (in Nm) on non-diesel variants</description>
- </param>
- <param name="accPedalPosition" type="Float" minvalue="0" maxvalue="100" mandatory="false">
- <description>Accelerator pedal position (percentage depressed)</description>
- </param>
- <param name="steeringWheelAngle" type="Float" minvalue="-2000" maxvalue="2000" mandatory="false">
- <description>Current angle of the steering wheel (in deg)</description>
- </param>
- <param name="eCallInfo" type="Common.ECallInfo" mandatory="false">
- <description>Emergency Call notification and confirmation data</description>
- </param>
- <param name="airbagStatus" type="Common.AirbagStatus" mandatory="false">
- <description>The status of the air bags</description>
- </param>
- <param name="emergencyEvent" type="Common.EmergencyEvent" mandatory="false">
- <description>Information related to an emergency event (and if it occurred)</description>
- </param>
- <param name="clusterModeStatus" type="Common.ClusterModeStatus" mandatory="false">
- <description>The status modes of the cluster</description>
- </param>
- <param name="myKey" type="Common.MyKey" mandatory="false">
- <description>Information related to the MyKey feature</description>
- </param>
- </function>
- <function name="OnVehicleData" messagetype="notification">
- <description>Callback for the periodic and non periodic vehicle data read function.</description>
- <param name="gps" type="Common.GPSData" mandatory="false">
- <description>See GPSData</description>
- </param>
- <param name="speed" type="Float" minvalue="0" maxvalue="700" mandatory="false">
- <description>The vehicle speed in kilometers per hour</description>
- </param>
- <param name="rpm" type="Integer" minvalue="0" maxvalue="20000" mandatory="false">
- <description>The number of revolutions per minute of the engine</description>
- </param>
- <param name="fuelLevel" type="Float" minvalue="-6" maxvalue="106" mandatory="false">
- <description>The fuel level in the tank (percentage)</description>
- </param>
- <param name="fuelLevel_State" type="Common.ComponentVolumeStatus" mandatory="false">
- <description>The fuel level state</description>
- </param>
- <param name="instantFuelConsumption" type="Float" minvalue="0" maxvalue="25575" mandatory="false">
- <description>The instantaneous fuel consumption in microlitres</description>
- </param>
- <param name="externalTemperature" type="Float" minvalue="-40" maxvalue="100" mandatory="false">
- <description>The external temperature in degrees celsius</description>
- </param>
- <param name="vin" type="String" maxlength="17" mandatory="false">
- <description>Vehicle identification number.</description>
- </param>
- <param name="prndl" type="Common.PRNDL" mandatory="false">
- <description>See PRNDL</description>
- </param>
- <param name="tirePressure" type="Common.TireStatus" mandatory="false">
- <description>See TireStatus</description>
- </param>
- <param name="odometer" type="Integer" minvalue="0" maxvalue="17000000" mandatory="false">
- <description>Odometer in km</description>
- </param>
- <param name="beltStatus" type="Common.BeltStatus" mandatory="false">
- <description>The status of the seat belts</description>
- </param>
- <param name="bodyInformation" type="Common.BodyInformation" mandatory="false">
- <description>The body information including power modes</description>
- </param>
- <param name="deviceStatus" type="Common.DeviceStatus" mandatory="false">
- <description>The device status including signal and battery strength</description>
- </param>
- <param name="driverBraking" type="Common.VehicleDataEventStatus" mandatory="false">
- <description>The status of the brake pedal</description>
- </param>
- <param name="wiperStatus" type="Common.WiperStatus" mandatory="false">
- <description>The status of the wipers</description>
- </param>
- <param name="headLampStatus" type="Common.HeadLampStatus" mandatory="false">
- <description>Status of the head lamps</description>
- </param>
- <param name="engineTorque" type="Float" minvalue="-1000" maxvalue="2000" mandatory="false">
- <description>Torque value for engine (in Nm) on non-diesel variants</description>
- </param>
- <param name="accPedalPosition" type="Float" minvalue="0" maxvalue="100" mandatory="false">
- <description>Accelerator pedal position (percentage depressed)</description>
- </param>
- <param name="steeringWheelAngle" type="Float" minvalue="-2000" maxvalue="2000" mandatory="false">
- <description>Current angle of the steering wheel (in deg)</description>
- </param>
- <param name="eCallInfo" type="Common.ECallInfo" mandatory="false">
- <description>Emergency Call notification and confirmation data</description>
- </param>
- <param name="airbagStatus" type="Common.AirbagStatus" mandatory="false">
- <description>The status of the air bags</description>
- </param>
- <param name="emergencyEvent" type="Common.EmergencyEvent" mandatory="false">
- <description>Information related to an emergency event (and if it occurred)</description>
- </param>
- <param name="clusterModeStatus" type="Common.ClusterModeStatus" mandatory="false">
- <description>The status modes of the cluster</description>
- </param>
- <param name="myKey" type="Common.MyKey" mandatory="false">
- <description>Information related to the MyKey feature</description>
- </param>
- </function>
- <!--Qt HMI version of GetVehicleData-->
- <function name="GetGpsData" messagetype="request" provider="hmi">
- <param name="appID" type="Integer" mandatory="true">
- <description>ID of application requested this RPC.</description>
- </param>
- </function>
- <function name="GetGpsData" messagetype="response">
- <param name="gps" type="Common.GPSData" mandatory="true">
- <description>See GPSData</description>
- </param>
- </function>
- <function name="GetSpeed" messagetype="request" provider="hmi">
- <param name="appID" type="Integer" mandatory="true">
- <description>ID of application requested this RPC.</description>
- </param>
- </function>
- <function name="GetSpeed" messagetype="response">
- <param name="speed" type="Float" minvalue="0" maxvalue="700" mandatory="true">
- <description>The vehicle speed in kilometers per hour</description>
- </param>
- </function>
- <function name="GetRpm" messagetype="request" provider="hmi">
- <param name="appID" type="Integer" mandatory="true">
- <description>ID of application requested this RPC.</description>
- </param>
- </function>
- <function name="GetRpm" messagetype="response">
- <param name="rpm" type="Integer" minvalue="0" maxvalue="20000" mandatory="true">
- <description>The number of revolutions per minute of the engine</description>
- </param>
- </function>
- <function name="GetFuelLevel" messagetype="request" provider="hmi">
- <param name="appID" type="Integer" mandatory="true">
- <description>ID of application requested this RPC.</description>
- </param>
- </function>
- <function name="GetFuelLevel" messagetype="response">
- <param name="fuelLevel" type="Float" minvalue="-6" maxvalue="106" mandatory="true">
- <description>The fuel level in the tank (percentage)</description>
- </param>
- </function>
- <function name="GetFuelLevelState" messagetype="request" provider="hmi">
- <param name="appID" type="Integer" mandatory="true">
- <description>ID of application requested this RPC.</description>
- </param>
- </function>
- <function name="GetFuelLevelState" messagetype="response">
- <param name="fuelLevel_State" type="Common.ComponentVolumeStatus" mandatory="true">
- <description>The fuel level state</description>
- </param>
- </function>
- <function name="GetInstantFuelConsumption" messagetype="request" provider="hmi">
- <param name="appID" type="Integer" mandatory="true">
- <description>ID of application requested this RPC.</description>
- </param>
- </function>
- <function name="GetInstantFuelConsumption" messagetype="response">
- <param name="instantFuelConsumption" type="Float" minvalue="0" maxvalue="25575" mandatory="true">
- <description>The instantaneous fuel consumption in microlitres</description>
- </param>
- </function>
- <function name="GetExternalTemperature" messagetype="request" provider="hmi">
- <param name="appID" type="Integer" mandatory="true">
- <description>ID of application requested this RPC.</description>
- </param>
- </function>
- <function name="GetExternalTemperature" messagetype="response">
- <param name="externalTemperature" type="Float" minvalue="-40" maxvalue="100" mandatory="true">
- <description>The external temperature in degrees celsius</description>
- </param>
- </function>
- <function name="GetVin" messagetype="request" provider="hmi">
- <param name="appID" type="Integer" mandatory="true">
- <description>ID of application requested this RPC.</description>
- </param>
- </function>
- <function name="GetVin" messagetype="response">
- <param name="vin" type="String" maxlength="17" mandatory="true">
- <description>Vehicle identification number</description>
- </param>
- </function>
- <function name="GetPrndl" messagetype="request" provider="hmi">
- <param name="appID" type="Integer" mandatory="true">
- <description>ID of application requested this RPC.</description>
- </param>
- </function>
- <function name="GetPrndl" messagetype="response">
- <param name="prndl" type="Common.PRNDL" mandatory="true">
- <description>See PRNDL</description>
- </param>
- </function>
- <function name="GetTirePressure" messagetype="request" provider="hmi">
- <param name="appID" type="Integer" mandatory="true">
- <description>ID of application requested this RPC.</description>
- </param>
- </function>
- <function name="GetTirePressure" messagetype="response">
- <param name="tirePressure" type="Common.TireStatus" mandatory="true">
- <description>See TireStatus</description>
- </param>
- </function>
- <function name="GetOdometer" messagetype="request" provider="hmi">
- <param name="appID" type="Integer" mandatory="true">
- <description>ID of application requested this RPC.</description>
- </param>
- </function>
- <function name="GetOdometer" messagetype="response">
- <param name="odometer" type="Integer" minvalue="0" maxvalue="17000000" mandatory="true">
- <description>Odometer in km</description>
- </param>
- </function>
- <function name="GetBeltStatus" messagetype="request" provider="hmi">
- <param name="appID" type="Integer" mandatory="true">
- <description>ID of application requested this RPC.</description>
- </param>
- </function>
- <function name="GetBeltStatus" messagetype="response">
- <param name="beltStatus" type="Common.BeltStatus" mandatory="true">
- <description>The status of the seat belts</description>
- </param>
- </function>
- <function name="GetBodyInformation" messagetype="request" provider="hmi">
- <param name="appID" type="Integer" mandatory="true">
- <description>ID of application requested this RPC.</description>
- </param>
- </function>
- <function name="GetBodyInformation" messagetype="response">
- <param name="bodyInformation" type="Common.BodyInformation" mandatory="true">
- <description>The body information including power modes</description>
- </param>
- </function>
- <function name="GetDeviceStatus" messagetype="request" provider="hmi">
- <param name="appID" type="Integer" mandatory="true">
- <description>ID of application requested this RPC.</description>
- </param>
- </function>
- <function name="GetDeviceStatus" messagetype="response">
- <param name="deviceStatus" type="Common.DeviceStatus" mandatory="true">
- <description>The device status including signal and battery strength</description>
- </param>
- </function>
- <function name="GetDriverBraking" messagetype="request" provider="hmi">
- <param name="appID" type="Integer" mandatory="true">
- <description>ID of application requested this RPC.</description>
- </param>
- </function>
- <function name="GetDriverBraking" messagetype="response">
- <param name="driverBraking" type="Common.VehicleDataEventStatus" mandatory="true">
- <description>The status of the brake pedal</description>
- </param>
- </function>
- <function name="GetWiperStatus" messagetype="request" provider="hmi">
- <param name="appID" type="Integer" mandatory="true">
- <description>ID of application requested this RPC.</description>
- </param>
- </function>
- <function name="GetWiperStatus" messagetype="response">
- <param name="wiperStatus" type="Common.WiperStatus" mandatory="true">
- <description>The status of the wipers</description>
- </param>
- </function>
- <function name="GetHeadLampStatus" messagetype="request" provider="hmi">
- <param name="appID" type="Integer" mandatory="true">
- <description>ID of application requested this RPC.</description>
- </param>
- </function>
- <function name="GetHeadLampStatus" messagetype="response">
- <param name="headLampStatus" type="Common.HeadLampStatus" mandatory="true">
- <description>Status of the head lamps</description>
- </param>
- </function>
- <function name="GetEngineTorque" messagetype="request" provider="hmi">
- <param name="appID" type="Integer" mandatory="true">
- <description>ID of application requested this RPC.</description>
- </param>
- </function>
- <function name="GetEngineTorque" messagetype="response">
- <param name="engineTorque" type="Float" minvalue="-1000" maxvalue="2000" mandatory="true">
- <description>Torque value for engine (in Nm) on non-diesel variants</description>
- </param>
- </function>
- <function name="GetAccPedalPosition" messagetype="request" provider="hmi">
- <param name="appID" type="Integer" mandatory="true">
- <description>ID of application requested this RPC.</description>
- </param>
- </function>
- <function name="GetAccPedalPosition" messagetype="response">
- <param name="accPedalPosition" type="Float" minvalue="0" maxvalue="100" mandatory="true">
- <description>Accelerator pedal position (percentage depressed)</description>
- </param>
- </function>
- <function name="GetSteeringWheelAngle" messagetype="request" provider="hmi">
- <param name="appID" type="Integer" mandatory="true">
- <description>ID of application requested this RPC.</description>
- </param>
- </function>
- <function name="GetSteeringWheelAngle" messagetype="response">
- <param name="steeringWheelAngle" type="Float" minvalue="-2000" maxvalue="2000" mandatory="true">
- <description>Current angle of the steering wheel (in deg)</description>
- </param>
- </function>
- <function name="GetECallInfo" messagetype="request" provider="hmi">
- <param name="appID" type="Integer" mandatory="true">
- <description>ID of application requested this RPC.</description>
- </param>
- </function>
- <function name="GetECallInfo" messagetype="response">
- <param name="eCallInfo" type="Common.ECallInfo" mandatory="true">
- <description>Emergency Call notification and confirmation data</description>
- </param>
- </function>
- <function name="GetAirbagStatus" messagetype="request" provider="hmi">
- <param name="appID" type="Integer" mandatory="true">
- <description>ID of application requested this RPC.</description>
- </param>
- </function>
- <function name="GetAirbagStatus" messagetype="response">
- <param name="airbagStatus" type="Common.AirbagStatus" mandatory="true">
- <description>The status of the air bags</description>
- </param>
- </function>
- <function name="GetEmergencyEvent" messagetype="request" provider="hmi">
- <param name="appID" type="Integer" mandatory="true">
- <description>ID of application requested this RPC.</description>
- </param>
- </function>
- <function name="GetEmergencyEvent" messagetype="response">
- <param name="emergencyEvent" type="Common.EmergencyEvent" mandatory="true">
- <description>Information related to an emergency event (and if it occurred)</description>
- </param>
- </function>
- <function name="GetClusterModeStatus" messagetype="request" provider="hmi">
- <param name="appID" type="Integer" mandatory="true">
- <description>ID of application requested this RPC.</description>
- </param>
- </function>
- <function name="GetClusterModeStatus" messagetype="response">
- <param name="clusterModeStatus" type="Common.ClusterModeStatus" mandatory="true">
- <description>The status modes of the cluster</description>
- </param>
- </function>
- <function name="GetMyKey" messagetype="request" provider="hmi">
- <param name="appID" type="Integer" mandatory="true">
- <description>ID of application requested this RPC.</description>
- </param>
- </function>
- <function name="GetMyKey" messagetype="response">
- <param name="myKey" type="Common.MyKey" mandatory="true">
- <description>Information related to the MyKey feature</description>
- </param>
- </function>
- <!--end Qt HMI version of GetVehicleData-->
- <!--Qt HMI version of OnVehicleData-->
- <function name="OnGpsData" messagetype="notification" provider="hmi">
- <param name="gps" type="Common.GPSData" mandatory="true">
- <description>See GPSData</description>
- </param>
- </function>
- <function name="OnSpeed" messagetype="notification" provider="hmi">
- <param name="speed" type="Float" minvalue="0" maxvalue="700" mandatory="true">
- <description>The vehicle speed in kilometers per hour</description>
- </param>
- </function>
- <function name="OnRpm" messagetype="notification" provider="hmi">
- <param name="rpm" type="Integer" minvalue="0" maxvalue="20000" mandatory="true">
- <description>The number of revolutions per minute of the engine</description>
- </param>
- </function>
- <function name="OnFuelLevel" messagetype="notification" provider="hmi">
- <param name="fuelLevel" type="Float" minvalue="-6" maxvalue="106" mandatory="true">
- <description>The fuel level in the tank (percentage)</description>
- </param>
- </function>
- <function name="OnFuelLevelState" messagetype="notification" provider="hmi">
- <param name="fuelLevel_State" type="Common.ComponentVolumeStatus" mandatory="true">
- <description>The fuel level state</description>
- </param>
- </function>
- <function name="OnInstantFuelConsumption" messagetype="notification" provider="hmi">
- <param name="instantFuelConsumption" type="Float" minvalue="0" maxvalue="25575" mandatory="true">
- <description>The instantaneous fuel consumption in microlitres</description>
- </param>
- </function>
- <function name="OnExternalTemperature" messagetype="notification" provider="hmi">
- <param name="externalTemperature" type="Float" minvalue="-40" maxvalue="100" mandatory="true">
- <description>The external temperature in degrees celsius</description>
- </param>
- </function>
- <function name="OnVin" messagetype="notification" provider="hmi">
- <param name="vin" type="String" maxlength="17" mandatory="true">
- <description>Vehicle identification number.</description>
- </param>
- </function>
- <function name="OnPrndl" messagetype="notification" provider="hmi">
- <param name="prndl" type="Common.PRNDL" mandatory="true">
- <description>See PRNDL</description>
- </param>
- </function>
- <function name="OnTirePressure" messagetype="notification" provider="hmi">
- <param name="tirePressure" type="Common.TireStatus" mandatory="true">
- <description>See TireStatus</description>
- </param>
- </function>
- <function name="OnOdometer" messagetype="notification" provider="hmi">
- <param name="odometer" type="Integer" minvalue="0" maxvalue="17000000" mandatory="true">
- <description>Odometer in km</description>
- </param>
- </function>
- <function name="OnBeltStatus" messagetype="notification" provider="hmi">
- <param name="beltStatus" type="Common.BeltStatus" mandatory="true">
- <description>The status of the seat belts</description>
- </param>
- </function>
- <function name="OnBodyInformation" messagetype="notification" provider="hmi">
- <param name="bodyInformation" type="Common.BodyInformation" mandatory="true">
- <description>The body information including power modes</description>
- </param>
- </function>
- <function name="OnDeviceStatus" messagetype="notification" provider="hmi">
- <param name="deviceStatus" type="Common.DeviceStatus" mandatory="true">
- <description>The device status including signal and battery strength</description>
- </param>
- </function>
- <function name="OnDriverBraking" messagetype="notification" provider="hmi">
- <param name="driverBraking" type="Common.VehicleDataEventStatus" mandatory="true">
- <description>The status of the brake pedal</description>
- </param>
- </function>
- <function name="OnWiperStatus" messagetype="notification" provider="hmi">
- <param name="wiperStatus" type="Common.WiperStatus" mandatory="true">
- <description>The status of the wipers</description>
- </param>
- </function>
- <function name="OnHeadLampStatus" messagetype="notification" provider="hmi">
- <param name="headLampStatus" type="Common.HeadLampStatus" mandatory="true">
- <description>Status of the head lamps</description>
- </param>
- </function>
- <function name="OnEngineTorque" messagetype="notification" provider="hmi">
- <param name="engineTorque" type="Float" minvalue="-1000" maxvalue="2000" mandatory="true">
- <description>Torque value for engine (in Nm) on non-diesel variants</description>
- </param>
- </function>
- <function name="OnAccPedalPosition" messagetype="notification" provider="hmi">
- <param name="accPedalPosition" type="Float" minvalue="0" maxvalue="100" mandatory="true">
- <description>Accelerator pedal position (percentage depressed)</description>
- </param>
- </function>
- <function name="OnSteeringWheelAngle" messagetype="notification" provider="hmi">
- <param name="steeringWheelAngle" type="Float" minvalue="-2000" maxvalue="2000" mandatory="true">
- <description>Current angle of the steering wheel (in deg)</description>
- </param>
- </function>
- <function name="OnECallInfo" messagetype="notification" provider="hmi">
- <param name="eCallInfo" type="Common.ECallInfo" mandatory="true">
- <description>Current angle of the steering wheel (in deg)</description>
- </param>
- </function>
- <function name="OnAirbagStatus" messagetype="notification" provider="hmi">
- <param name="airbagStatus" type="Common.AirbagStatus" mandatory="true">
- <description>Current angle of the steering wheel (in deg)</description>
- </param>
- </function>
- <function name="OnEmergencyEvent" messagetype="notification" provider="hmi">
- <param name="emergencyEvent" type="Common.EmergencyEvent" mandatory="true">
- <description>Current angle of the steering wheel (in deg)</description>
- </param>
- </function>
- <function name="OnClusterModeStatus" messagetype="notification" provider="hmi">
- <param name="clusterModeStatus" type="Common.ClusterModeStatus" mandatory="true">
- <description>Current angle of the steering wheel (in deg)</description>
- </param>
- </function>
- <function name="OnMyKey" messagetype="notification" provider="hmi">
- <param name="myKey" type="Common.MyKey" mandatory="true">
- <description>Information related to the MyKey feature</description>
- </param>
- </function>
- <!--end Qt HMI version of OnVehicleData-->
- <!--Qt HMI version of SubscribeVehicleData/UnsubscribeVehicleData-->
- <function name="SubscribeGps" messagetype="request" provider="hmi">
- </function>
- <function name="SubscribeGps" messagetype="response">
- <param name="gps" type="Common.VehicleDataResult" mandatory="true">
- <description>See GPSData</description>
- </param>
- </function>
- <function name="UnsubscribeGps" messagetype="request" provider="hmi">
- </function>
- <function name="UnsubscribeGps" messagetype="response">
- <param name="gps" type="Common.VehicleDataResult" mandatory="true">
- <description>See GPSData</description>
- </param>
- </function>
- <function name="SubscribeSpeed" messagetype="request" provider="hmi">
- </function>
- <function name="SubscribeSpeed" messagetype="response">
- <param name="speed" type="Common.VehicleDataResult" mandatory="true">
- <description>The vehicle speed in kilometers per hour</description>
- </param>
- </function>
- <function name="UnsubscribeSpeed" messagetype="request" provider="hmi">
- </function>
- <function name="UnsubscribeSpeed" messagetype="response">
- <param name="speed" type="Common.VehicleDataResult" mandatory="true">
- <description>The vehicle speed in kilometers per hour</description>
- </param>
- </function>
- <function name="SubscribeRpm" messagetype="request" provider="hmi">
- </function>
- <function name="SubscribeRpm" messagetype="response">
- <param name="rpm" type="Common.VehicleDataResult" mandatory="true">
- <description>The number of revolutions per minute of the engine</description>
- </param>
- </function>
- <function name="UnsubscribeRpm" messagetype="request" provider="hmi">
- </function>
- <function name="UnsubscribeRpm" messagetype="response">
- <param name="rpm" type="Common.VehicleDataResult" mandatory="true">
- <description>The number of revolutions per minute of the engine</description>
- </param>
- </function>
- <function name="SubscribeFuelLevel" messagetype="request" provider="hmi">
- </function>
- <function name="SubscribeFuelLevel" messagetype="response">
- <param name="fuelLevel" type="Common.VehicleDataResult" mandatory="true">
- <description>The fuel level in the tank (percentage)</description>
- </param>
- </function>
- <function name="UnsubscribeFuelLevel" messagetype="request" provider="hmi">
- </function>
- <function name="UnsubscribeFuelLevel" messagetype="response">
- <param name="fuelLevel" type="Common.VehicleDataResult" mandatory="true">
- <description>The fuel level in the tank (percentage)</description>
- </param>
- </function>
- <function name="SubscribeFuelLevel_State" messagetype="request" provider="hmi">
- </function>
- <function name="SubscribeFuelLevel_State" messagetype="response">
- <param name="fuelLevel_State" type="Common.VehicleDataResult" mandatory="true">
- <description>The fuel level state</description>
- </param>
- </function>
- <function name="UnsubscribeFuelLevel_State" messagetype="request" provider="hmi">
- </function>
- <function name="UnsubscribeFuelLevel_State" messagetype="response">
- <param name="fuelLevel_State" type="Common.VehicleDataResult" mandatory="true">
- <description>The fuel level state</description>
- </param>
- </function>
- <function name="SubscribeInstantFuelConsumption" messagetype="request" provider="hmi">
- </function>
- <function name="SubscribeInstantFuelConsumption" messagetype="response">
- <param name="instantFuelConsumption" type="Common.VehicleDataResult" mandatory="true">
- <description>The instantaneous fuel consumption in microlitres</description>
- </param>
- </function>
- <function name="UnsubscribeInstantFuelConsumption" messagetype="request" provider="hmi">
- </function>
- <function name="UnsubscribeInstantFuelConsumption" messagetype="response">
- <param name="instantFuelConsumption" type="Common.VehicleDataResult" mandatory="true">
- <description>The instantaneous fuel consumption in microlitres</description>
- </param>
- </function>
- <function name="SubscribeExternalTemperature" messagetype="request" provider="hmi">
- </function>
- <function name="SubscribeExternalTemperature" messagetype="response">
- <param name="externalTemperature" type="Common.VehicleDataResult" mandatory="true">
- <description>The external temperature in degrees celsius</description>
- </param>
- </function>
- <function name="UnsubscribeExternalTemperature" messagetype="request" provider="hmi">
- </function>
- <function name="UnsubscribeExternalTemperature" messagetype="response">
- <param name="externalTemperature" type="Common.VehicleDataResult" mandatory="true">
- <description>The external temperature in degrees celsius</description>
- </param>
- </function>
- <function name="SubscribePrndl" messagetype="request" provider="hmi">
- </function>
- <function name="SubscribePrndl" messagetype="response">
- <param name="prndl" type="Common.VehicleDataResult" mandatory="true">
- <description>See PRNDL</description>
- </param>
- </function>
- <function name="UnsubscribePrndl" messagetype="request" provider="hmi">
- </function>
- <function name="UnsubscribePrndl" messagetype="response">
- <param name="prndl" type="Common.VehicleDataResult" mandatory="true">
- <description>See PRNDL</description>
- </param>
- </function>
- <function name="SubscribeVin" messagetype="request" provider="hmi">
- </function>
- <function name="SubscribeVin" messagetype="response">
- <param name="vin" type="String" maxlength="17" mandatory="true">
- <description>Vehicle identification number</description>
- </param>
- </function>
- <function name="UnsubscribeVin" messagetype="request" provider="hmi">
- </function>
- <function name="UnsubscribeVin" messagetype="response">
- <param name="vin" type="String" maxlength="17" mandatory="true">
- <description>Vehicle identification number</description>
- </param>
- </function>
- <function name="SubscribeTirePressure" messagetype="request" provider="hmi">
- </function>
- <function name="SubscribeTirePressure" messagetype="response">
- <param name="tirePressure" type="Common.VehicleDataResult" mandatory="true">
- <description>See TireStatus</description>
- </param>
- </function>
- <function name="UnsubscribeTirePressure" messagetype="request" provider="hmi">
- </function>
- <function name="UnsubscribeTirePressure" messagetype="response">
- <param name="tirePressure" type="Common.VehicleDataResult" mandatory="true">
- <description>See TireStatus</description>
- </param>
- </function>
- <function name="SubscribeOdometer" messagetype="request" provider="hmi">
- </function>
- <function name="SubscribeOdometer" messagetype="response">
- <param name="odometer" type="Common.VehicleDataResult" mandatory="true">
- <description>Odometer in km</description>
- </param>
- </function>
- <function name="UnsubscribeOdometer" messagetype="request" provider="hmi">
- </function>
- <function name="UnsubscribeOdometer" messagetype="response">
- <param name="odometer" type="Common.VehicleDataResult" mandatory="true">
- <description>Odometer in km</description>
- </param>
- </function>
- <function name="SubscribeBeltStatus" messagetype="request" provider="hmi">
- </function>
- <function name="SubscribeBeltStatus" messagetype="response">
- <param name="beltStatus" type="Common.VehicleDataResult" mandatory="true">
- <description>The status of the seat belts</description>
- </param>
- </function>
- <function name="UnsubscribeBeltStatus" messagetype="request" provider="hmi">
- </function>
- <function name="UnsubscribeBeltStatus" messagetype="response">
- <param name="beltStatus" type="Common.VehicleDataResult" mandatory="true">
- <description>The status of the seat belts</description>
- </param>
- </function>
- <function name="SubscribeBodyInformation" messagetype="request" provider="hmi">
- </function>
- <function name="SubscribeBodyInformation" messagetype="response">
- <param name="bodyInformation" type="Common.VehicleDataResult" mandatory="true">
- <description>The body information including power modes</description>
- </param>
- </function>
- <function name="UnsubscribeBodyInformation" messagetype="request" provider="hmi">
- </function>
- <function name="UnsubscribeBodyInformation" messagetype="response">
- <param name="bodyInformation" type="Common.VehicleDataResult" mandatory="true">
- <description>The body information including power modes</description>
- </param>
- </function>
- <function name="SubscribeDeviceStatus" messagetype="request" provider="hmi">
- </function>
- <function name="SubscribeDeviceStatus" messagetype="response">
- <param name="deviceStatus" type="Common.VehicleDataResult" mandatory="true">
- <description>The device status including signal and battery strength</description>
- </param>
- </function>
- <function name="UnsubscribeDeviceStatus" messagetype="request" provider="hmi">
- </function>
- <function name="UnsubscribeDeviceStatus" messagetype="response">
- <param name="deviceStatus" type="Common.VehicleDataResult" mandatory="true">
- <description>The device status including signal and battery strength</description>
- </param>
- </function>
- <function name="SubscribeDriverBraking" messagetype="request" provider="hmi">
- </function>
- <function name="SubscribeDriverBraking" messagetype="response">
- <param name="driverBraking" type="Common.VehicleDataResult" mandatory="true">
- <description>The status of the brake pedal</description>
- </param>
- </function>
- <function name="UnsubscribeDriverBraking" messagetype="request" provider="hmi">
- </function>
- <function name="UnsubscribeDriverBraking" messagetype="response">
- <param name="driverBraking" type="Common.VehicleDataResult" mandatory="true">
- <description>The status of the brake pedal</description>
- </param>
- </function>
- <function name="SubscribeWiperStatus" messagetype="request" provider="hmi">
- </function>
- <function name="SubscribeWiperStatus" messagetype="response">
- <param name="wiperStatus" type="Common.VehicleDataResult" mandatory="true">
- <description>The status of the wipers</description>
- </param>
- </function>
- <function name="UnsubscribeWiperStatus" messagetype="request" provider="hmi">
- </function>
- <function name="UnsubscribeWiperStatus" messagetype="response">
- <param name="wiperStatus" type="Common.VehicleDataResult" mandatory="true">
- <description>The status of the wipers</description>
- </param>
- </function>
- <function name="SubscribeHeadLampStatus" messagetype="request" provider="hmi">
- </function>
- <function name="SubscribeHeadLampStatus" messagetype="response">
- <param name="headLampStatus" type="Common.VehicleDataResult" mandatory="true">
- <description>Status of the head lamps</description>
- </param>
- </function>
- <function name="UnsubscribeHeadLampStatus" messagetype="request" provider="hmi">
- </function>
- <function name="UnsubscribeHeadLampStatus" messagetype="response">
- <param name="headLampStatus" type="Common.VehicleDataResult" mandatory="true">
- <description>Status of the head lamps</description>
- </param>
- </function>
- <function name="SubscribeEngineTorque" messagetype="request" provider="hmi">
- </function>
- <function name="SubscribeEngineTorque" messagetype="response">
- <param name="engineTorque" type="Common.VehicleDataResult" mandatory="true">
- <description>Torque value for engine (in Nm) on non-diesel variants</description>
- </param>
- </function>
- <function name="UnsubscribeEngineTorque" messagetype="request" provider="hmi">
- </function>
- <function name="UnsubscribeEngineTorque" messagetype="response">
- <param name="engineTorque" type="Common.VehicleDataResult" mandatory="true">
- <description>Torque value for engine (in Nm) on non-diesel variants</description>
- </param>
- </function>
- <function name="SubscribeAccPedalPosition" messagetype="request" provider="hmi">
- </function>
- <function name="SubscribeAccPedalPosition" messagetype="response">
- <param name="accPedalPosition" type="Common.VehicleDataResult" mandatory="true">
- <description>Accelerator pedal position (percentage depressed)</description>
- </param>
- </function>
- <function name="UnsubscribeAccPedalPosition" messagetype="request" provider="hmi">
- </function>
- <function name="UnsubscribeAccPedalPosition" messagetype="response">
- <param name="accPedalPosition" type="Common.VehicleDataResult" mandatory="true">
- <description>Accelerator pedal position (percentage depressed)</description>
- </param>
- </function>
- <function name="SubscribeSteeringWheelAngle" messagetype="request" provider="hmi">
- </function>
- <function name="SubscribeSteeringWheelAngle" messagetype="response">
- <param name="steeringWheelAngle" type="Common.VehicleDataResult" mandatory="true">
- <description>Current angle of the steering wheel (in deg)</description>
- </param>
- </function>
- <function name="UnsubscribeSteeringWheelAngle" messagetype="request" provider="hmi">
- </function>
- <function name="UnsubscribeSteeringWheelAngle" messagetype="response">
- <param name="steeringWheelAngle" type="Common.VehicleDataResult" mandatory="true">
- <description>Current angle of the steering wheel (in deg)</description>
- </param>
- </function>
- <function name="SubscribeECallInfo" messagetype="request" provider="hmi">
- </function>
- <function name="SubscribeECallInfo" messagetype="response">
- <param name="eCallInfo" type="Common.VehicleDataResult" mandatory="true">
- <description>Emergency Call notification and confirmation data</description>
- </param>
- </function>
- <function name="UnsubscribeECallInfo" messagetype="request" provider="hmi">
- </function>
- <function name="UnsubscribeECallInfo" messagetype="response">
- <param name="eCallInfo" type="Common.VehicleDataResult" mandatory="true">
- <description>Emergency Call notification and confirmation data</description>
- </param>
- </function>
- <function name="SubscribeAirbagStatus" messagetype="request" provider="hmi">
- </function>
- <function name="SubscribeAirbagStatus" messagetype="response">
- <param name="airbagStatus" type="Common.VehicleDataResult" mandatory="true">
- <description>The status of the air bags</description>
- </param>
- </function>
- <function name="UnsubscribeAirbagStatus" messagetype="request" provider="hmi">
- </function>
- <function name="UnsubscribeAirbagStatus" messagetype="response">
- <param name="airbagStatus" type="Common.VehicleDataResult" mandatory="true">
- <description>The status of the air bags</description>
- </param>
- </function>
- <function name="SubscribeEmergencyEvent" messagetype="request" provider="hmi">
- </function>
- <function name="SubscribeEmergencyEvent" messagetype="response">
- <param name="emergencyEvent" type="Common.VehicleDataResult" mandatory="true">
- <description>Information related to an emergency event (and if it occurred)</description>
- </param>
- </function>
- <function name="UnsubscribeEmergencyEvent" messagetype="request" provider="hmi">
- </function>
- <function name="UnsubscribeEmergencyEvent" messagetype="response">
- <param name="emergencyEvent" type="Common.VehicleDataResult" mandatory="true">
- <description>Information related to an emergency event (and if it occurred)</description>
- </param>
- </function>
- <function name="SubscribeClusterModeStatus" messagetype="request" provider="hmi">
- </function>
- <function name="SubscribeClusterModeStatus" messagetype="response">
- <param name="clusterModeStatus" type="Common.VehicleDataResult" mandatory="true">
- <description>The status modes of the cluster</description>
- </param>
- </function>
- <function name="UnsubscribeClusterModeStatus" messagetype="request" provider="hmi">
- </function>
- <function name="UnsubscribeClusterModeStatus" messagetype="response">
- <param name="clusterModeStatus" type="Common.VehicleDataResult" mandatory="true">
- <description>The status modes of the cluster</description>
- </param>
- </function>
- <function name="SubscribeMyKey" messagetype="request" provider="hmi">
- </function>
- <function name="SubscribeMyKey" messagetype="response">
- <param name="myKey" type="Common.VehicleDataResult" mandatory="true">
- <description>Information related to the MyKey feature</description>
- </param>
- </function>
- <function name="UnsubscribeMyKey" messagetype="request" provider="hmi">
- </function>
- <function name="UnsubscribeMyKey" messagetype="response">
- <param name="myKey" type="Common.VehicleDataResult" mandatory="true">
- <description>Information related to the MyKey feature</description>
- </param>
- </function>
- <!--end Qt HMI version of SubscribeVehicleData/UnsubscribeVehicleData-->
- </interface>
- <!-- Policies -->
- <interface name="SDL" version="1.0" date="2014-03-12">
- <function name="ActivateApp" messagetype="request" provider="sdl">
- <param name="appID" type="Integer" mandatory="true">
- </param>
- </function>
- <function name="ActivateApp" messagetype="response">
- <param name="isSDLAllowed" type="Boolean" mandatory="true" scope="internal"/>
- <param name="device" type="Common.DeviceInfo" mandatory="false" scope="internal">
- <description>If isSDLAllowed is false, consent for sending PT through specified device is required.</description>
- </param>
- <param name="isPermissionsConsentNeeded" type="Boolean" mandatory="true"/>
- <param name="isAppPermissionsRevoked" type="Boolean" mandatory="true"/>
- <param name="appRevokedPermissions" type="Common.PermissionItem" array="true" minsize="1" maxsize="100" mandatory="false">
- <description>If app permissions were reduced (isAppPermissionsRevoked == true), then this array specifies list of removed permissions. </description>
- </param>
- <param name="isAppRevoked" type="Boolean" mandatory="true"/>
- <param name="priority" type="Common.AppPriority" mandatory="false">
- <description>Send to HMI so that it can coordinate order of requests/notifications correspondingly.</description>
- </param>
- </function>
- <function name="GetUserFriendlyMessage" messagetype="request" scope="internal" provider="sdl">
- <description>Request from HMI to SDL to get user friendly messages for UI/TTS info boxes/texts (i.e. for help/dialogs etc) from Policy Table.</description>
- <param name="messageCodes" type="String" array="true" minsize="1" maxsize="100" maxlength="500" mandatory="true">
- <description>Id of message to be received according to Policy Table i.e. StatusNeeded, Notifications, DrivingCharacteristics etc.</description>
- </param>
- <param name="language" type="Common.Language" mandatory="false">
- <description>Optional parameter if HMI wants message in some other language then its current one already known to SDL.</description>
- </param>
- </function>
- <function name="GetUserFriendlyMessage" messagetype="response">
- <param name="messages" type="Common.UserFriendlyMessage" array="true" minsize="1" maxsize="100" mandatory="false">
- <description>If no message was found in PT for specified message code and for HMI current or specified language, this parameter will be omitted.</description>
- </param>
- </function>
- <function name="OnAllowSDLFunctionality" messagetype="notification" provider="hmi">
- <description>Initiated by HMI. Notifies about user/HMI allowing SDL functionality or disallowing access to all mobile apps. Needed if HMI has additional ways of asking user about this (i.e. Settings etc)</description>
- <param name="device" type="Common.DeviceInfo" mandatory="false">
- <description>If no device is specified permission counts for SDL functionality in general.</description>
- </param>
- <param name="allowed" type="Boolean" mandatory="true">
- <description>Must be true if allowed</description>
- </param>
- <param name="source" type="Common.ConsentSource" mandatory="true"/>
- </function>
- <!-- SyncP RPC-->
- <function name="OnReceivedPolicyUpdate" messagetype="notification" provider="hmi">
- <description>
- From: SYNCP Manager
- To: SDL
- Notification sent to SDL when SYNCP Manager receives and decrypts updated policy table
- </description>
- <param name="policyfile" type="String" minlength="1" maxlength="255" mandatory="true">
- <description>Location of decrypted policy table Json file on target</description>
- </param>
- </function>
- <function name="OnPolicyUpdate" messagetype="notification" provider="hmi">
- <description>
- From: SYNCP Manager
- To: SDL
- Notifies SDL to supply a new "PolicyUpdate" request with more recent snapshot data
- </description>
- </function>
- <!-- End of SyncP RPC-->
- <function name="GetListOfPermissions" messagetype="request" provider="sdl">
- <description>Request from HMI to SDL to get list of permissions for app. If no app specified - list of permissions for all apps.</description>
- <param name="appID" type="Integer" mandatory="false"/>
- </function>
- <function name="GetListOfPermissions" messagetype="response">
- <param name="allowedFunctions" type="Common.PermissionItem" mandatory="true" array="true" minsize="0" maxsize="100">
- <description>If no permissions were specified for application the array will come empty.</description>
- </param>
- </function>
- <function name="OnAppPermissionConsent" messagetype="notification" provider="hmi">
- <description>Initiated by HMI for specifying the allowance for the application to perform some functionality. Duplicates functionality of the request, needed if HMI has specific ways to allow/disallow functionality (i.e.Setting Menu)</description>
- <param name="appID" type="Integer" mandatory="false">
- <description>Information about the application. See HMIApplication. If omitted - allow/disallow all applications </description>
- </param>
- <param name="consentedFunctions" type="Common.PermissionItem" mandatory="true" array="true" minsize="1" maxsize="100">
- </param>
- <param name="source" type="Common.ConsentSource" mandatory="true"/>
- </function>
- <function name="OnAppPermissionChanged" messagetype="notification" provider="sdl">
- <description>Notification from SDL to HMI. Occurs when app permissions were reduced. If no permission specified means that app was dissallowed and has to be unregitstered.</description>
- <param name="appID" type="Integer" mandatory="true"/>
- <param name="isAppPermissionsRevoked" type="Boolean" mandatory="false"/>
- <param name="appRevokedPermissions" type="Common.PermissionItem" array="true" minsize="1" maxsize="100" mandatory="false">
- <description>If app permissions were reduced (isAppPermissionsRevoked == true), then this array specifies list of removed permissions. </description>
- </param>
- <param name="appRevoked" type="Boolean" mandatory="false">
- <description>If present then specified application was prohibited to used with Sync.</description>
- </param>
- <param name="appPermissionsConsentNeeded" type="Boolean" mandatory="false">
- <description>If present specifies that permissions were added to application that require User Consent, then HMI can send GetListOfPermissions request to obtain list of permissions.</description>
- </param>
- <param name="appUnauthorized" type="Boolean" mandatory="false">
- <description>When present and set to true (should be if present) then this means that application was not authorized (nickname check failed.)</description>
- </param>
- <param name="priority" type="Common.AppPriority" mandatory="false">
- <description>Send to HMI so that it can coordinate order of requests/notifications correspondingly.</description>
- </param>
- <param name="requestType" type="Common.RequestType" minsize="0" maxsize="100" array="true" mandatory="false">
- <description>The list of SystemRequest's RequestTypes allowed by policies for the named application (the app's SystemRequest sent with RequestType out of this list will get 'disallowed' response from SDL).
- If SDL sends an empty array - any RequestType is allowed for this app.
- If SDL omits this parameter - nothing is changed for RequestType in the policies
- </description>
- </param>
- </function>
- <function name="OnSDLConsentNeeded" messagetype="notification" provider="sdl">
- <description>Send from SDL to HMI to notify that data consent is needed for device either because PT update or Retry strategy.</description>
- <param name="device" type="Common.DeviceInfo" mandatory="true"/>
- </function>
- <function name="UpdateSDL" messagetype="request" provider="sdl">
- <description>Request from HMI to SDL to start update of Policy Table.</description>
- </function>
- <function name="UpdateSDL" messagetype="response">
- <description>Specify result: no update needed, update was successful/unsuccessful etc</description>
- <param name="result" type="Common.UpdateResult" mandatory="true"/>
- </function>
- <function name="GetStatusUpdate" messagetype="request" provider="sdl">
- <description>Request from HMI to SDL to find out current status of PT exchange process.</description>
- </function>
- <function name="GetStatusUpdate" messagetype="response">
- <param name="status" type="Common.UpdateResult" mandatory="true"/>
- </function>
- <function name="OnStatusUpdate" messagetype="notification" provider="sdl">
- <description>Notification from SDL to HMI when current status of PT exchange changed (i.e. it Succeded or Failed etc)</description>
- <param name="status" type="Common.UpdateResult" mandatory="true"/>
- </function>
- <function name="OnSystemError" messagetype="notification" provider="hmi">
- <param name="error" type="Common.SystemError" mandatory="true"/>
- </function>
- <function name="AddStatisticsInfo" messagetype="notification" provider="hmi">
- <description>Sent by system to record statiscs and error counts. Increases statistics specified by statisticType by one.</description>
- <param name="statisticType" type="Common.StatisticsType" mandatory="true"/>
- </function>
- <function name="GetURLS" messagetype="request" scope="internal" provider="sdl">
- <description>Sent by system to SDL to get list of URL for specified service type and optionally policy's application id.</description>
- <param name="service" type="Integer" minvalue="0" maxvalue="100" mandatory="true"/>
- </function>
- <function name="GetURLS" messagetype="response" scope="internal">
- <param name="urls" type="Common.ServiceInfo" array="true" mandatory="false" minsize="1" maxsize="100"/>
- </function>
- <function name="OnDeviceStateChanged" messagetype="notification" scope="internal" provider="hmi">
- <param name="deviceState" type="Common.DeviceState" mandatory="true"/>
- <param name="deviceInternalId" type="String" mandatory="true" minlength="0" maxlength="500"/>
- <param name="deviceId" type="Common.DeviceInfo" mandatory="false"/>
- </function>
- </interface>
-<interface name="RC" version="1.1.0" date="2017-07-18">
- <function name="IsReady" messagetype="request">
- <description>Method is invoked at system startup. Response should provide information about presence of any of remote controllable module and its readiness to cooperate with SDL.</description>
- </function>
- <function name="IsReady" messagetype="response">
- <param name="available" type="Boolean" mandatory="true">
- <description>Must be true if vehicle RC modules are present and ready to communicate with SDL.</description>
- </param>
- </function>
-
- <function name="GetCapabilities" messagetype="request">
- <description>Method is invoked at system startup by SDL to request information about Remote Control capabilities of HMI.</description>
- </function>
- <function name="GetCapabilities" messagetype="response">
- <param name="remoteControlCapability" type="Common.RemoteControlCapabilities" mandatory="false">
- <description>See RemoteControlCapabilities, all available RC modules and buttons shall be returned.</description>
- </param>
- </function>
-
- <function name="SetInteriorVehicleData" functionID="SetInteriorVehicleDataID" messagetype="request">
- <param name="moduleData" type="Common.ModuleData" mandatory="true" >
- <description>The module type and data to set</description>
- </param>
- <param name="appID" type="Integer" mandatory="true">
- <description>Internal SDL-assigned ID of the related application</description>
- </param>
- </function>
-
- <function name="SetInteriorVehicleData" messagetype="response">
- <description>Used to set the values of one zone and one data type within that zone</description>
- <param name="moduleData" type="Common.ModuleData" mandatory="true" >
- </param>
- </function>
-
-<function name="GetInteriorVehicleData" messagetype="request">
- <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">
- <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">
- <description>Internal SDL-assigned ID of the related application</description>
- </param>
-</function>
-
-<function name="GetInteriorVehicleData" messagetype="response">
- <param name="moduleData" type="Common.ModuleData" mandatory="true" >
- </param>
- <param name="isSubscribed" type="Boolean" mandatory="false" >
- <description>Is a conditional-mandatory parameter: must be returned in case "subscribe" parameter was present in the related request.
- if "true" - the "moduleType" from request is successfully subscribed and the head unit will send onInteriorVehicleData notifications for the moduleDescription.
- if "false" - the "moduleType" from request is either unsubscribed or failed to subscribe.</description>
- </param>
-</function>
-
-<function name="GetInteriorVehicleDataConsent" messagetype="request">
- <description>Sender: SDL->HMI. </description>
- <description>HMI is expected to display a permission prompt to the driver showing the RC module and app details (for example, app's name).
- The driver is expected to have an ability to grant or deny the permission.</description>
- <param name="moduleType" type="Common.ModuleType" mandatory="true">
- <description>The module type that the app requests to control.</description>
- </param>
- <param name="appID" type="Integer" mandatory="true">
- <description>ID of the application that triggers the permission prompt.</description>
- </param>
- </function>
- <function name="GetInteriorVehicleDataConsent" messagetype="response">
- <param name="allowed" type="Boolean" mandatory="true">
- <description>"true" - if the driver grants the permission for controlling to the named app;
- "false" - in case the driver denies the permission for controlling to the named app.</description>
- </param>
-</function>
-
-<function name="OnInteriorVehicleData" messagetype="notification">
- <param name="moduleData" type="Common.ModuleData" mandatory="true" >
- </param>
-</function>
-
-<function name="OnRemoteControlSettings" messagetype="notification">
- <description>Sender: vehicle -> RSDL. Notification about remote-control settings changed. Sent after User`s choice through HMI.</description>
- <param name="allowed" type="Boolean" mandatory="false" >
- <description>If "true" - RC is allowed; if "false" - RC is disallowed.</description>
- </param>
- <param name="accessMode" type="Common.RCAccessMode" mandatory="false" >
- <description>The remote control access mode specified by the driver via HMI.</description>
- </param>
-</function>
-</interface>
-</interfaces> \ No newline at end of file
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/.gitignore b/src/components/policy/policy_external/.gitignore
index d67909069a..d6052d61da 100644
--- a/src/components/policy/policy_external/.gitignore
+++ b/src/components/policy/policy_external/.gitignore
@@ -29,8 +29,6 @@ src/appMain/hmi_link
src/appMain/smartDeviceLinkCore
test/components/application_manager/policies_manager/test_policies_table
test/components/application_manager/test_formatters_commands
-test/components/dbus/test_DBusAdapter
-test/components/dbus/test_DBusSchema
test/components/protocol_handler/test_ProtocolHandler
test/components/request_watchdog/test_RequestWatchdog
test/components/smart_objects/SchemaItem/test_SmartObject_AlwaysFalseSchemaItemTest
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/policy_manager_impl.h b/src/components/policy/policy_external/include/policy/policy_manager_impl.h
index fcd9c9f69a..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
@@ -868,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
@@ -905,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
@@ -1021,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 96a6748436..02dad1ac3e 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,6 +66,7 @@ enum Parameter {
P_SPEED,
P_ENGINETORQUE,
P_EXTERNALTEMPERATURE,
+ P_TURNSIGNAL,
P_FUELLEVEL,
P_FUELLEVEL_STATE,
P_HEADLAMPSTATUS,
@@ -77,6 +78,7 @@ enum Parameter {
P_VIN,
P_ACCPEDALPOSITION,
P_BELTSTATUS,
+ P_ELECTRONICPARKBRAKESTATUS,
P_DRIVERBRAKING,
P_PRNDL,
P_RPM,
@@ -90,7 +92,6 @@ enum Parameter {
P_EMERGENCYEVENT,
P_ECALLINFO,
P_ABS_STATE,
- P_TURN_SIGNAL,
P_FUEL_RANGE,
P_TIRE_PRESSURE_VALUE,
P_TPMS,
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 1b1419365d..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
@@ -104,11 +104,9 @@ typedef Array<Enum<RequestType>, 0, 255> RequestsTypeArray;
typedef Strings RequestSubTypes;
-#ifdef SDL_REMOTE_CONTROL
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;
@@ -178,9 +176,7 @@ struct ApplicationParams : PolicyBase {
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();
@@ -200,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 577f15c3f5..7979a0f2ba 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,6 +26,7 @@
<element name="speed" />
<element name="engineTorque" />
<element name="externalTemperature" />
+ <element name="turnSignal" />
<element name="fuelLevel" />
<element name="fuelLevel_State" />
<element name="headLampStatus" />
@@ -37,6 +38,7 @@
<element name="vin" />
<element name="accPedalPosition" />
<element name="beltStatus" />
+ <element name="electronicParkBrakeStatus" />
<element name="driverBraking" />
<element name="prndl" />
<element name="rpm" />
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 c32e3205ef..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;
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 56de26af64..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;
@@ -792,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);
@@ -1790,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>();
}
}
@@ -1938,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");
@@ -2044,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 881ae8cbf9..12ee0326de 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:
@@ -140,6 +142,8 @@ bool IsValidEnum(Parameter val) {
return true;
case P_BELTSTATUS:
return true;
+ case P_ELECTRONICPARKBRAKESTATUS:
+ return true;
case P_DRIVERBRAKING:
return true;
case P_PRNDL:
@@ -166,8 +170,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:
@@ -211,6 +213,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:
@@ -233,6 +237,8 @@ const char* EnumToJsonString(Parameter val) {
return "accPedalPosition";
case P_BELTSTATUS:
return "beltStatus";
+ case P_ELECTRONICPARKBRAKESTATUS:
+ return "electronicParkBrakeStatus";
case P_DRIVERBRAKING:
return "driverBraking";
case P_PRNDL:
@@ -259,8 +265,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:
@@ -307,6 +311,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;
@@ -340,6 +347,9 @@ bool EnumFromJsonString(const std::string& literal, Parameter* result) {
} else if ("beltStatus" == literal) {
*result = P_BELTSTATUS;
return true;
+ } else if ("electronicParkBrakeStatus" == literal) {
+ *result = P_ELECTRONICPARKBRAKESTATUS;
+ return true;
} else if ("driverBraking" == literal) {
*result = P_DRIVERBRAKING;
return true;
@@ -379,9 +389,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;
@@ -758,7 +765,6 @@ bool EnumFromJsonString(const std::string& literal, RequestType* result) {
}
}
-#ifdef SDL_REMOTE_CONTROL
bool IsValidEnum(ModuleType val) {
switch (val) {
case MT_CLIMATE:
@@ -791,7 +797,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 6d0bc9d697..8c4f454dfa 100644
--- a/src/components/policy/policy_external/src/policy_table/types.cc
+++ b/src/components/policy/policy_external/src/policy_table/types.cc
@@ -241,11 +241,7 @@ ApplicationParams::ApplicationParams(const Json::Value* value__)
, 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());
@@ -256,9 +252,7 @@ Json::Value ApplicationParams::ToJsonValue() const {
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__;
}
@@ -280,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();
}
@@ -314,11 +306,9 @@ bool ApplicationParams::struct_empty() const {
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;
}
@@ -364,12 +354,9 @@ 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) {
@@ -379,9 +366,7 @@ void ApplicationParams::SetPolicyTableType(PolicyTableType 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 6936948c84..9b227615d8 100644
--- a/src/components/policy/policy_external/src/policy_table/validation.cc
+++ b/src/components/policy/policy_external/src/policy_table/validation.cc
@@ -164,7 +164,6 @@ bool ApplicationPoliciesSection::Validate() const {
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();
@@ -194,7 +193,6 @@ bool ApplicationParams::ValidateModuleTypes() const {
}
return true;
}
-#endif // SDL_REMOTE_CONTROL
bool ApplicationParams::Validate() const {
if (is_initialized()) {
@@ -206,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_representation.cc b/src/components/policy/policy_external/src/sql_pt_representation.cc
index b05716dc3f..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;
@@ -1051,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;
@@ -1714,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_);
@@ -1905,7 +1898,6 @@ bool SQLPTRepresentation::GatherRemoteRpc(
}
return true;
}
-#endif // SDL_REMOTE_CONTROL
bool SQLPTRepresentation::SaveApplicationCustomData(const std::string& app_id,
bool is_revoked,
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 c231340f44..4cd71d6004 100644
--- a/src/components/policy/policy_external/test/json/PTU.json
+++ b/src/components/policy/policy_external/test/json/PTU.json
@@ -403,6 +403,7 @@
"parameters": [
"accPedalPosition",
"beltStatus",
+ "electronicParkBrakeStatus",
"driverBraking",
"myKey",
"prndl",
@@ -419,6 +420,7 @@
"parameters": [
"accPedalPosition",
"beltStatus",
+ "electronicParkBrakeStatus",
"driverBraking",
"myKey",
"prndl",
@@ -435,6 +437,7 @@
"parameters": [
"accPedalPosition",
"beltStatus",
+ "electronicParkBrakeStatus",
"driverBraking",
"myKey",
"prndl",
@@ -451,6 +454,7 @@
"parameters": [
"accPedalPosition",
"beltStatus",
+ "electronicParkBrakeStatus",
"driverBraking",
"myKey",
"prndl",
@@ -475,6 +479,7 @@
"engineOilLife",
"engineTorque",
"externalTemperature",
+ "turnSignal",
"fuelLevel",
"fuelLevel_State",
"headLampStatus",
@@ -498,6 +503,7 @@
"engineOilLife",
"engineTorque",
"externalTemperature",
+ "turnSignal",
"fuelLevel",
"fuelLevel_State",
"headLampStatus",
@@ -521,6 +527,7 @@
"engineOilLife",
"engineTorque",
"externalTemperature",
+ "turnSignal",
"fuelLevel",
"fuelLevel_State",
"headLampStatus",
@@ -543,6 +550,7 @@
"engineOilLife",
"engineTorque",
"externalTemperature",
+ "turnSignal",
"fuelLevel",
"fuelLevel_State",
"headLampStatus",
diff --git a/src/components/policy/policy_external/test/json/PTU2.json b/src/components/policy/policy_external/test/json/PTU2.json
index 4970c40e60..9c9436144e 100644
--- a/src/components/policy/policy_external/test/json/PTU2.json
+++ b/src/components/policy/policy_external/test/json/PTU2.json
@@ -403,6 +403,7 @@
"parameters": [
"accPedalPosition",
"beltStatus",
+ "electronicParkBrakeStatus",
"driverBraking",
"myKey",
"prndl",
@@ -419,6 +420,7 @@
"parameters": [
"accPedalPosition",
"beltStatus",
+ "electronicParkBrakeStatus",
"driverBraking",
"myKey",
"prndl",
@@ -435,6 +437,7 @@
"parameters": [
"accPedalPosition",
"beltStatus",
+ "electronicParkBrakeStatus",
"driverBraking",
"myKey",
"prndl",
@@ -451,6 +454,7 @@
"parameters": [
"accPedalPosition",
"beltStatus",
+ "electronicParkBrakeStatus",
"driverBraking",
"myKey",
"prndl",
@@ -475,6 +479,7 @@
"engineOilLife",
"engineTorque",
"externalTemperature",
+ "turnSignal",
"fuelLevel",
"fuelLevel_State",
"headLampStatus",
@@ -498,6 +503,7 @@
"engineOilLife",
"engineTorque",
"externalTemperature",
+ "turnSignal",
"fuelLevel",
"fuelLevel_State",
"headLampStatus",
@@ -521,6 +527,7 @@
"engineOilLife",
"engineTorque",
"externalTemperature",
+ "turnSignal",
"fuelLevel",
"fuelLevel_State",
"headLampStatus",
@@ -543,6 +550,7 @@
"engineOilLife",
"engineTorque",
"externalTemperature",
+ "turnSignal",
"fuelLevel",
"fuelLevel_State",
"headLampStatus",
diff --git a/src/components/policy/policy_external/test/json/PTU3.json b/src/components/policy/policy_external/test/json/PTU3.json
index 98037cf594..279051e7bf 100644
--- a/src/components/policy/policy_external/test/json/PTU3.json
+++ b/src/components/policy/policy_external/test/json/PTU3.json
@@ -403,6 +403,7 @@
"parameters": [
"accPedalPosition",
"beltStatus",
+ "electronicParkBrakeStatus",
"driverBraking",
"myKey",
"prndl",
@@ -419,6 +420,7 @@
"parameters": [
"accPedalPosition",
"beltStatus",
+ "electronicParkBrakeStatus",
"driverBraking",
"myKey",
"prndl",
@@ -435,6 +437,7 @@
"parameters": [
"accPedalPosition",
"beltStatus",
+ "electronicParkBrakeStatus",
"driverBraking",
"myKey",
"prndl",
@@ -451,6 +454,7 @@
"parameters": [
"accPedalPosition",
"beltStatus",
+ "electronicParkBrakeStatus",
"driverBraking",
"myKey",
"prndl",
@@ -475,6 +479,7 @@
"engineOilLife",
"engineTorque",
"externalTemperature",
+ "turnSignal",
"fuelLevel",
"fuelLevel_State",
"headLampStatus",
@@ -498,6 +503,7 @@
"engineOilLife",
"engineTorque",
"externalTemperature",
+ "turnSignal",
"fuelLevel",
"fuelLevel_State",
"headLampStatus",
@@ -521,6 +527,7 @@
"engineOilLife",
"engineTorque",
"externalTemperature",
+ "turnSignal",
"fuelLevel",
"fuelLevel_State",
"headLampStatus",
@@ -543,6 +550,7 @@
"engineOilLife",
"engineTorque",
"externalTemperature",
+ "turnSignal",
"fuelLevel",
"fuelLevel_State",
"headLampStatus",
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 f232d8fec7..08027f2786 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
@@ -1438,6 +1438,7 @@
"parameters" : [
"accPedalPosition",
"beltStatus",
+ "electronicParkBrakeStatus",
"driverBraking",
"myKey",
"prndl",
@@ -1450,6 +1451,7 @@
"parameters" : [
"accPedalPosition",
"beltStatus",
+ "electronicParkBrakeStatus",
"driverBraking",
"myKey",
"prndl",
@@ -1462,6 +1464,7 @@
"parameters" : [
"accPedalPosition",
"beltStatus",
+ "electronicParkBrakeStatus",
"driverBraking",
"myKey",
"prndl",
@@ -1474,6 +1477,7 @@
"parameters" : [
"accPedalPosition",
"beltStatus",
+ "electronicParkBrakeStatus",
"driverBraking",
"myKey",
"prndl",
@@ -1595,6 +1599,7 @@
"engineOilLife",
"engineTorque",
"externalTemperature",
+ "turnSignal",
"fuelLevel",
"fuelLevel_State",
"headLampStatus",
@@ -1612,6 +1617,7 @@
"engineOilLife",
"engineTorque",
"externalTemperature",
+ "turnSignal",
"fuelLevel",
"fuelLevel_State",
"headLampStatus",
@@ -1629,6 +1635,7 @@
"engineOilLife",
"engineTorque",
"externalTemperature",
+ "turnSignal",
"fuelLevel",
"fuelLevel_State",
"headLampStatus",
@@ -1645,6 +1652,7 @@
"engineOilLife",
"engineTorque",
"externalTemperature",
+ "turnSignal",
"fuelLevel",
"fuelLevel_State",
"headLampStatus",
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 942c862d4f..a88bcfbd08 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
@@ -1441,6 +1441,7 @@
"parameters" : [
"accPedalPosition",
"beltStatus",
+ "electronicParkBrakeStatus",
"driverBraking",
"myKey",
"prndl",
@@ -1453,6 +1454,7 @@
"parameters" : [
"accPedalPosition",
"beltStatus",
+ "electronicParkBrakeStatus",
"driverBraking",
"myKey",
"prndl",
@@ -1465,6 +1467,7 @@
"parameters" : [
"accPedalPosition",
"beltStatus",
+ "electronicParkBrakeStatus",
"driverBraking",
"myKey",
"prndl",
@@ -1477,6 +1480,7 @@
"parameters" : [
"accPedalPosition",
"beltStatus",
+ "electronicParkBrakeStatus",
"driverBraking",
"myKey",
"prndl",
@@ -1598,6 +1602,7 @@
"engineOilLife",
"engineTorque",
"externalTemperature",
+ "turnSignal",
"fuelLevel",
"fuelLevel_State",
"headLampStatus",
@@ -1615,6 +1620,7 @@
"engineOilLife",
"engineTorque",
"externalTemperature",
+ "turnSignal",
"fuelLevel",
"fuelLevel_State",
"headLampStatus",
@@ -1632,6 +1638,7 @@
"engineOilLife",
"engineTorque",
"externalTemperature",
+ "turnSignal",
"fuelLevel",
"fuelLevel_State",
"headLampStatus",
@@ -1648,6 +1655,7 @@
"engineOilLife",
"engineTorque",
"externalTemperature",
+ "turnSignal",
"fuelLevel",
"fuelLevel_State",
"headLampStatus",
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 c72fdbe6cb..250bfb21f2 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
@@ -1438,6 +1438,7 @@
"parameters" : [
"accPedalPosition",
"beltStatus",
+ "electronicParkBrakeStatus",
"driverBraking",
"myKey",
"prndl",
@@ -1450,6 +1451,7 @@
"parameters" : [
"accPedalPosition",
"beltStatus",
+ "electronicParkBrakeStatus",
"driverBraking",
"myKey",
"prndl",
@@ -1462,6 +1464,7 @@
"parameters" : [
"accPedalPosition",
"beltStatus",
+ "electronicParkBrakeStatus",
"driverBraking",
"myKey",
"prndl",
@@ -1474,6 +1477,7 @@
"parameters" : [
"accPedalPosition",
"beltStatus",
+ "electronicParkBrakeStatus",
"driverBraking",
"myKey",
"prndl",
@@ -1595,6 +1599,7 @@
"engineOilLife",
"engineTorque",
"externalTemperature",
+ "turnSignal",
"fuelLevel",
"fuelLevel_State",
"headLampStatus",
@@ -1612,6 +1617,7 @@
"engineOilLife",
"engineTorque",
"externalTemperature",
+ "turnSignal",
"fuelLevel",
"fuelLevel_State",
"headLampStatus",
@@ -1629,6 +1635,7 @@
"engineOilLife",
"engineTorque",
"externalTemperature",
+ "turnSignal",
"fuelLevel",
"fuelLevel_State",
"headLampStatus",
@@ -1645,6 +1652,7 @@
"engineOilLife",
"engineTorque",
"externalTemperature",
+ "turnSignal",
"fuelLevel",
"fuelLevel_State",
"headLampStatus",
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 b783ac0cc2..85910c098c 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
@@ -1437,6 +1437,7 @@
"parameters" : [
"accPedalPosition",
"beltStatus",
+ "electronicParkBrakeStatus",
"driverBraking",
"myKey",
"prndl",
@@ -1449,6 +1450,7 @@
"parameters" : [
"accPedalPosition",
"beltStatus",
+ "electronicParkBrakeStatus",
"driverBraking",
"myKey",
"prndl",
@@ -1461,6 +1463,7 @@
"parameters" : [
"accPedalPosition",
"beltStatus",
+ "electronicParkBrakeStatus",
"driverBraking",
"myKey",
"prndl",
@@ -1473,6 +1476,7 @@
"parameters" : [
"accPedalPosition",
"beltStatus",
+ "electronicParkBrakeStatus",
"driverBraking",
"myKey",
"prndl",
@@ -1594,6 +1598,7 @@
"engineOilLife",
"engineTorque",
"externalTemperature",
+ "turnSignal",
"fuelLevel",
"fuelLevel_State",
"headLampStatus",
@@ -1611,6 +1616,7 @@
"engineOilLife",
"engineTorque",
"externalTemperature",
+ "turnSignal",
"fuelLevel",
"fuelLevel_State",
"headLampStatus",
@@ -1628,6 +1634,7 @@
"engineOilLife",
"engineTorque",
"externalTemperature",
+ "turnSignal",
"fuelLevel",
"fuelLevel_State",
"headLampStatus",
@@ -1644,6 +1651,7 @@
"engineOilLife",
"engineTorque",
"externalTemperature",
+ "turnSignal",
"fuelLevel",
"fuelLevel_State",
"headLampStatus",
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 fdf730917f..1c1b04ca2b 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
@@ -296,6 +296,7 @@
"LIMITED"],
"parameters": ["accPedalPosition",
"beltStatus",
+ "electronicParkBrakeStatus",
"driverBraking",
"myKey",
"prndl",
@@ -308,6 +309,7 @@
"LIMITED"],
"parameters": ["accPedalPosition",
"beltStatus",
+ "electronicParkBrakeStatus",
"driverBraking",
"myKey",
"prndl",
@@ -320,6 +322,7 @@
"LIMITED"],
"parameters": ["accPedalPosition",
"beltStatus",
+ "electronicParkBrakeStatus",
"driverBraking",
"myKey",
"prndl",
@@ -332,6 +335,7 @@
"LIMITED"],
"parameters": ["accPedalPosition",
"beltStatus",
+ "electronicParkBrakeStatus",
"driverBraking",
"myKey",
"prndl",
@@ -352,6 +356,7 @@
"engineOilLife",
"engineTorque",
"externalTemperature",
+ "turnSignal",
"fuelLevel",
"fuelLevel_State",
"headLampStatus",
@@ -371,6 +376,7 @@
"engineOilLife",
"engineTorque",
"externalTemperature",
+ "turnSignal",
"fuelLevel",
"fuelLevel_State",
"headLampStatus",
@@ -390,6 +396,7 @@
"engineOilLife",
"engineTorque",
"externalTemperature",
+ "turnSignal",
"fuelLevel",
"fuelLevel_State",
"headLampStatus",
@@ -408,6 +415,7 @@
"engineOilLife",
"engineTorque",
"externalTemperature",
+ "turnSignal",
"fuelLevel",
"fuelLevel_State",
"headLampStatus",
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 82b6f762ca..51690d7b8e 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
@@ -296,6 +296,7 @@
"LIMITED"],
"parameters": ["accPedalPosition",
"beltStatus",
+ "electronicParkBrakeStatus",
"driverBraking",
"myKey",
"prndl",
@@ -308,6 +309,7 @@
"LIMITED"],
"parameters": ["accPedalPosition",
"beltStatus",
+ "electronicParkBrakeStatus",
"driverBraking",
"myKey",
"prndl",
@@ -320,6 +322,7 @@
"LIMITED"],
"parameters": ["accPedalPosition",
"beltStatus",
+ "electronicParkBrakeStatus",
"driverBraking",
"myKey",
"prndl",
@@ -332,6 +335,7 @@
"LIMITED"],
"parameters": ["accPedalPosition",
"beltStatus",
+ "electronicParkBrakeStatus",
"driverBraking",
"myKey",
"prndl",
@@ -352,6 +356,7 @@
"engineOilLife",
"engineTorque",
"externalTemperature",
+ "turnSignal",
"fuelLevel",
"fuelLevel_State",
"headLampStatus",
@@ -371,6 +376,7 @@
"engineOilLife",
"engineTorque",
"externalTemperature",
+ "turnSignal",
"fuelLevel",
"fuelLevel_State",
"headLampStatus",
@@ -390,6 +396,7 @@
"engineOilLife",
"engineTorque",
"externalTemperature",
+ "turnSignal",
"fuelLevel",
"fuelLevel_State",
"headLampStatus",
@@ -408,6 +415,7 @@
"engineOilLife",
"engineTorque",
"externalTemperature",
+ "turnSignal",
"fuelLevel",
"fuelLevel_State",
"headLampStatus",
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 713d057f1a..cfa6c4010c 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
@@ -296,6 +296,7 @@
"LIMITED"],
"parameters": ["accPedalPosition",
"beltStatus",
+ "electronicParkBrakeStatus",
"driverBraking",
"myKey",
"prndl",
@@ -308,6 +309,7 @@
"LIMITED"],
"parameters": ["accPedalPosition",
"beltStatus",
+ "electronicParkBrakeStatus",
"driverBraking",
"myKey",
"prndl",
@@ -320,6 +322,7 @@
"LIMITED"],
"parameters": ["accPedalPosition",
"beltStatus",
+ "electronicParkBrakeStatus",
"driverBraking",
"myKey",
"prndl",
@@ -332,6 +335,7 @@
"LIMITED"],
"parameters": ["accPedalPosition",
"beltStatus",
+ "electronicParkBrakeStatus",
"driverBraking",
"myKey",
"prndl",
@@ -352,6 +356,7 @@
"engineOilLife",
"engineTorque",
"externalTemperature",
+ "turnSignal",
"fuelLevel",
"fuelLevel_State",
"headLampStatus",
@@ -371,6 +376,7 @@
"engineOilLife",
"engineTorque",
"externalTemperature",
+ "turnSignal",
"fuelLevel",
"fuelLevel_State",
"headLampStatus",
@@ -390,6 +396,7 @@
"engineOilLife",
"engineTorque",
"externalTemperature",
+ "turnSignal",
"fuelLevel",
"fuelLevel_State",
"headLampStatus",
@@ -408,6 +415,7 @@
"engineOilLife",
"engineTorque",
"externalTemperature",
+ "turnSignal",
"fuelLevel",
"fuelLevel_State",
"headLampStatus",
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 4765da0771..d7177f2251 100644
--- a/src/components/policy/policy_external/test/json/ptu2_requestType.json
+++ b/src/components/policy/policy_external/test/json/ptu2_requestType.json
@@ -415,6 +415,7 @@
"parameters": [
"accPedalPosition",
"beltStatus",
+ "electronicParkBrakeStatus",
"driverBraking",
"myKey",
"prndl",
@@ -431,6 +432,7 @@
"parameters": [
"accPedalPosition",
"beltStatus",
+ "electronicParkBrakeStatus",
"driverBraking",
"myKey",
"prndl",
@@ -447,6 +449,7 @@
"parameters": [
"accPedalPosition",
"beltStatus",
+ "electronicParkBrakeStatus",
"driverBraking",
"myKey",
"prndl",
@@ -463,6 +466,7 @@
"parameters": [
"accPedalPosition",
"beltStatus",
+ "electronicParkBrakeStatus",
"driverBraking",
"myKey",
"prndl",
@@ -487,6 +491,7 @@
"engineOilLife",
"engineTorque",
"externalTemperature",
+ "turnSignal",
"fuelLevel",
"fuelLevel_State",
"headLampStatus",
@@ -510,6 +515,7 @@
"engineOilLife",
"engineTorque",
"externalTemperature",
+ "turnSignal",
"fuelLevel",
"fuelLevel_State",
"headLampStatus",
@@ -533,6 +539,7 @@
"engineOilLife",
"engineTorque",
"externalTemperature",
+ "turnSignal",
"fuelLevel",
"fuelLevel_State",
"headLampStatus",
@@ -555,6 +562,7 @@
"engineOilLife",
"engineTorque",
"externalTemperature",
+ "turnSignal",
"fuelLevel",
"fuelLevel_State",
"headLampStatus",
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 5e34c00a81..6a531dd2ad 100644
--- a/src/components/policy/policy_external/test/json/ptu_requestType.json
+++ b/src/components/policy/policy_external/test/json/ptu_requestType.json
@@ -414,6 +414,7 @@
"parameters": [
"accPedalPosition",
"beltStatus",
+ "electronicParkBrakeStatus",
"driverBraking",
"myKey",
"prndl",
@@ -430,6 +431,7 @@
"parameters": [
"accPedalPosition",
"beltStatus",
+ "electronicParkBrakeStatus",
"driverBraking",
"myKey",
"prndl",
@@ -446,6 +448,7 @@
"parameters": [
"accPedalPosition",
"beltStatus",
+ "electronicParkBrakeStatus",
"driverBraking",
"myKey",
"prndl",
@@ -462,6 +465,7 @@
"parameters": [
"accPedalPosition",
"beltStatus",
+ "electronicParkBrakeStatus",
"driverBraking",
"myKey",
"prndl",
@@ -486,6 +490,7 @@
"engineOilLife",
"engineTorque",
"externalTemperature",
+ "turnSignal",
"fuelLevel",
"fuelLevel_State",
"headLampStatus",
@@ -509,6 +514,7 @@
"engineOilLife",
"engineTorque",
"externalTemperature",
+ "turnSignal",
"fuelLevel",
"fuelLevel_State",
"headLampStatus",
@@ -532,6 +538,7 @@
"engineOilLife",
"engineTorque",
"externalTemperature",
+ "turnSignal",
"fuelLevel",
"fuelLevel_State",
"headLampStatus",
@@ -554,6 +561,7 @@
"engineOilLife",
"engineTorque",
"externalTemperature",
+ "turnSignal",
"fuelLevel",
"fuelLevel_State",
"headLampStatus",
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 ced0a9d603..59e3f947c3 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
@@ -297,6 +297,7 @@
"LIMITED"],
"parameters": ["accPedalPosition",
"beltStatus",
+ "electronicParkBrakeStatus",
"driverBraking",
"myKey",
"prndl",
@@ -309,6 +310,7 @@
"LIMITED"],
"parameters": ["accPedalPosition",
"beltStatus",
+ "electronicParkBrakeStatus",
"driverBraking",
"myKey",
"prndl",
@@ -321,6 +323,7 @@
"LIMITED"],
"parameters": ["accPedalPosition",
"beltStatus",
+ "electronicParkBrakeStatus",
"driverBraking",
"myKey",
"prndl",
@@ -333,6 +336,7 @@
"LIMITED"],
"parameters": ["accPedalPosition",
"beltStatus",
+ "electronicParkBrakeStatus",
"driverBraking",
"myKey",
"prndl",
@@ -353,6 +357,7 @@
"engineOilLife",
"engineTorque",
"externalTemperature",
+ "turnSignal",
"fuelLevel",
"fuelLevel_State",
"headLampStatus",
@@ -372,6 +377,7 @@
"engineOilLife",
"engineTorque",
"externalTemperature",
+ "turnSignal",
"fuelLevel",
"fuelLevel_State",
"headLampStatus",
@@ -391,6 +397,7 @@
"engineOilLife",
"engineTorque",
"externalTemperature",
+ "turnSignal",
"fuelLevel",
"fuelLevel_State",
"headLampStatus",
@@ -409,6 +416,7 @@
"engineOilLife",
"engineTorque",
"externalTemperature",
+ "turnSignal",
"fuelLevel",
"fuelLevel_State",
"headLampStatus",
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 5974b22b8e..a4491fd449 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
@@ -2051,6 +2051,7 @@
[
"accPedalPosition",
"beltStatus",
+ "electronicParkBrakeStatus",
"driverBraking",
"myKey",
"prndl",
@@ -2065,6 +2066,7 @@
[
"accPedalPosition",
"beltStatus",
+ "electronicParkBrakeStatus",
"driverBraking",
"myKey",
"prndl",
@@ -2079,6 +2081,7 @@
[
"accPedalPosition",
"beltStatus",
+ "electronicParkBrakeStatus",
"driverBraking",
"myKey",
"prndl",
@@ -2093,6 +2096,7 @@
[
"accPedalPosition",
"beltStatus",
+ "electronicParkBrakeStatus",
"driverBraking",
"myKey",
"prndl",
@@ -2311,6 +2315,7 @@
"engineOilLife",
"engineTorque",
"externalTemperature",
+ "turnSignal",
"fuelLevel",
"fuelLevel_State",
"headLampStatus",
@@ -2332,6 +2337,7 @@
"engineOilLife",
"engineTorque",
"externalTemperature",
+ "turnSignal",
"fuelLevel",
"fuelLevel_State",
"headLampStatus",
@@ -2353,6 +2359,7 @@
"engineOilLife",
"engineTorque",
"externalTemperature",
+ "turnSignal",
"fuelLevel",
"fuelLevel_State",
"headLampStatus",
@@ -2373,6 +2380,7 @@
"engineOilLife",
"engineTorque",
"externalTemperature",
+ "turnSignal",
"fuelLevel",
"fuelLevel_State",
"headLampStatus",
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 8da6906e8b..83c4ccf15c 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
@@ -415,6 +415,7 @@
"parameters": [
"accPedalPosition",
"beltStatus",
+ "electronicParkBrakeStatus",
"driverBraking",
"myKey",
"prndl",
@@ -431,6 +432,7 @@
"parameters": [
"accPedalPosition",
"beltStatus",
+ "electronicParkBrakeStatus",
"driverBraking",
"myKey",
"prndl",
@@ -447,6 +449,7 @@
"parameters": [
"accPedalPosition",
"beltStatus",
+ "electronicParkBrakeStatus",
"driverBraking",
"myKey",
"prndl",
@@ -463,6 +466,7 @@
"parameters": [
"accPedalPosition",
"beltStatus",
+ "electronicParkBrakeStatus",
"driverBraking",
"myKey",
"prndl",
@@ -487,6 +491,7 @@
"engineOilLife",
"engineTorque",
"externalTemperature",
+ "turnSignal",
"fuelLevel",
"fuelLevel_State",
"headLampStatus",
@@ -510,6 +515,7 @@
"engineOilLife",
"engineTorque",
"externalTemperature",
+ "turnSignal",
"fuelLevel",
"fuelLevel_State",
"headLampStatus",
@@ -533,6 +539,7 @@
"engineOilLife",
"engineTorque",
"externalTemperature",
+ "turnSignal",
"fuelLevel",
"fuelLevel_State",
"headLampStatus",
@@ -555,6 +562,7 @@
"engineOilLife",
"engineTorque",
"externalTemperature",
+ "turnSignal",
"fuelLevel",
"fuelLevel_State",
"headLampStatus",
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 f8be46d2b5..7b882c6ceb 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
@@ -1431,6 +1431,7 @@
"parameters" : [
"accPedalPosition",
"beltStatus",
+ "electronicParkBrakeStatus",
"driverBraking",
"myKey",
"prndl",
@@ -1443,6 +1444,7 @@
"parameters" : [
"accPedalPosition",
"beltStatus",
+ "electronicParkBrakeStatus",
"driverBraking",
"myKey",
"prndl",
@@ -1455,6 +1457,7 @@
"parameters" : [
"accPedalPosition",
"beltStatus",
+ "electronicParkBrakeStatus",
"driverBraking",
"myKey",
"prndl",
@@ -1467,6 +1470,7 @@
"parameters" : [
"accPedalPosition",
"beltStatus",
+ "electronicParkBrakeStatus",
"driverBraking",
"myKey",
"prndl",
@@ -1612,6 +1616,7 @@
"engineOilLife",
"engineTorque",
"externalTemperature",
+ "turnSignal",
"fuelLevel",
"fuelLevel_State",
"headLampStatus",
@@ -1629,6 +1634,7 @@
"engineOilLife",
"engineTorque",
"externalTemperature",
+ "turnSignal",
"fuelLevel",
"fuelLevel_State",
"headLampStatus",
@@ -1646,6 +1652,7 @@
"engineOilLife",
"engineTorque",
"externalTemperature",
+ "turnSignal",
"fuelLevel",
"fuelLevel_State",
"headLampStatus",
@@ -1662,6 +1669,7 @@
"engineOilLife",
"engineTorque",
"externalTemperature",
+ "turnSignal",
"fuelLevel",
"fuelLevel_State",
"headLampStatus",
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 fe7b036f94..7d90275328 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
@@ -1431,6 +1431,7 @@
"parameters" : [
"accPedalPosition",
"beltStatus",
+ "electronicParkBrakeStatus",
"driverBraking",
"myKey",
"prndl",
@@ -1443,6 +1444,7 @@
"parameters" : [
"accPedalPosition",
"beltStatus",
+ "electronicParkBrakeStatus",
"driverBraking",
"myKey",
"prndl",
@@ -1455,6 +1457,7 @@
"parameters" : [
"accPedalPosition",
"beltStatus",
+ "electronicParkBrakeStatus",
"driverBraking",
"myKey",
"prndl",
@@ -1467,6 +1470,7 @@
"parameters" : [
"accPedalPosition",
"beltStatus",
+ "electronicParkBrakeStatus",
"driverBraking",
"myKey",
"prndl",
@@ -1612,6 +1616,7 @@
"engineOilLife",
"engineTorque",
"externalTemperature",
+ "turnSignal",
"fuelLevel",
"fuelLevel_State",
"headLampStatus",
@@ -1629,6 +1634,7 @@
"engineOilLife",
"engineTorque",
"externalTemperature",
+ "turnSignal",
"fuelLevel",
"fuelLevel_State",
"headLampStatus",
@@ -1646,6 +1652,7 @@
"engineOilLife",
"engineTorque",
"externalTemperature",
+ "turnSignal",
"fuelLevel",
"fuelLevel_State",
"headLampStatus",
@@ -1662,6 +1669,7 @@
"engineOilLife",
"engineTorque",
"externalTemperature",
+ "turnSignal",
"fuelLevel",
"fuelLevel_State",
"headLampStatus",
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 c79fd26873..807b0eb312 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
@@ -1431,6 +1431,7 @@
"parameters" : [
"accPedalPosition",
"beltStatus",
+ "electronicParkBrakeStatus",
"driverBraking",
"myKey",
"prndl",
@@ -1443,6 +1444,7 @@
"parameters" : [
"accPedalPosition",
"beltStatus",
+ "electronicParkBrakeStatus",
"driverBraking",
"myKey",
"prndl",
@@ -1455,6 +1457,7 @@
"parameters" : [
"accPedalPosition",
"beltStatus",
+ "electronicParkBrakeStatus",
"driverBraking",
"myKey",
"prndl",
@@ -1467,6 +1470,7 @@
"parameters" : [
"accPedalPosition",
"beltStatus",
+ "electronicParkBrakeStatus",
"driverBraking",
"myKey",
"prndl",
@@ -1596,6 +1600,7 @@
"engineOilLife",
"engineTorque",
"externalTemperature",
+ "turnSignal",
"fuelLevel",
"fuelLevel_State",
"headLampStatus",
@@ -1613,6 +1618,7 @@
"engineOilLife",
"engineTorque",
"externalTemperature",
+ "turnSignal",
"fuelLevel",
"fuelLevel_State",
"headLampStatus",
@@ -1630,6 +1636,7 @@
"engineOilLife",
"engineTorque",
"externalTemperature",
+ "turnSignal",
"fuelLevel",
"fuelLevel_State",
"headLampStatus",
@@ -1646,6 +1653,7 @@
"engineOilLife",
"engineTorque",
"externalTemperature",
+ "turnSignal",
"fuelLevel",
"fuelLevel_State",
"headLampStatus",
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 234f57f2db..3d0a004dbe 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
@@ -414,6 +414,7 @@
"parameters": [
"accPedalPosition",
"beltStatus",
+ "electronicParkBrakeStatus",
"driverBraking",
"myKey",
"prndl",
@@ -430,6 +431,7 @@
"parameters": [
"accPedalPosition",
"beltStatus",
+ "electronicParkBrakeStatus",
"driverBraking",
"myKey",
"prndl",
@@ -446,6 +448,7 @@
"parameters": [
"accPedalPosition",
"beltStatus",
+ "electronicParkBrakeStatus",
"driverBraking",
"myKey",
"prndl",
@@ -462,6 +465,7 @@
"parameters": [
"accPedalPosition",
"beltStatus",
+ "electronicParkBrakeStatus",
"driverBraking",
"myKey",
"prndl",
@@ -486,6 +490,7 @@
"engineOilLife",
"engineTorque",
"externalTemperature",
+ "turnSignal",
"fuelLevel",
"fuelLevel_State",
"headLampStatus",
@@ -509,6 +514,7 @@
"engineOilLife",
"engineTorque",
"externalTemperature",
+ "turnSignal",
"fuelLevel",
"fuelLevel_State",
"headLampStatus",
@@ -532,6 +538,7 @@
"engineOilLife",
"engineTorque",
"externalTemperature",
+ "turnSignal",
"fuelLevel",
"fuelLevel_State",
"headLampStatus",
@@ -554,6 +561,7 @@
"engineOilLife",
"engineTorque",
"externalTemperature",
+ "turnSignal",
"fuelLevel",
"fuelLevel_State",
"headLampStatus",
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 d309d58674..6a36f1f9c5 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
@@ -414,6 +414,7 @@
"parameters": [
"accPedalPosition",
"beltStatus",
+ "electronicParkBrakeStatus",
"driverBraking",
"myKey",
"prndl",
@@ -430,6 +431,7 @@
"parameters": [
"accPedalPosition",
"beltStatus",
+ "electronicParkBrakeStatus",
"driverBraking",
"myKey",
"prndl",
@@ -446,6 +448,7 @@
"parameters": [
"accPedalPosition",
"beltStatus",
+ "electronicParkBrakeStatus",
"driverBraking",
"myKey",
"prndl",
@@ -462,6 +465,7 @@
"parameters": [
"accPedalPosition",
"beltStatus",
+ "electronicParkBrakeStatus",
"driverBraking",
"myKey",
"prndl",
@@ -486,6 +490,7 @@
"engineOilLife",
"engineTorque",
"externalTemperature",
+ "turnSignal",
"fuelLevel",
"fuelLevel_State",
"headLampStatus",
@@ -509,6 +514,7 @@
"engineOilLife",
"engineTorque",
"externalTemperature",
+ "turnSignal",
"fuelLevel",
"fuelLevel_State",
"headLampStatus",
@@ -532,6 +538,7 @@
"engineOilLife",
"engineTorque",
"externalTemperature",
+ "turnSignal",
"fuelLevel",
"fuelLevel_State",
"headLampStatus",
@@ -554,6 +561,7 @@
"engineOilLife",
"engineTorque",
"externalTemperature",
+ "turnSignal",
"fuelLevel",
"fuelLevel_State",
"headLampStatus",
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 be38e7d706..3303d56844 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
@@ -414,6 +414,7 @@
"parameters": [
"accPedalPosition",
"beltStatus",
+ "electronicParkBrakeStatus",
"driverBraking",
"myKey",
"prndl",
@@ -430,6 +431,7 @@
"parameters": [
"accPedalPosition",
"beltStatus",
+ "electronicParkBrakeStatus",
"driverBraking",
"myKey",
"prndl",
@@ -446,6 +448,7 @@
"parameters": [
"accPedalPosition",
"beltStatus",
+ "electronicParkBrakeStatus",
"driverBraking",
"myKey",
"prndl",
@@ -462,6 +465,7 @@
"parameters": [
"accPedalPosition",
"beltStatus",
+ "electronicParkBrakeStatus",
"driverBraking",
"myKey",
"prndl",
@@ -486,6 +490,7 @@
"engineOilLife",
"engineTorque",
"externalTemperature",
+ "turnSignal",
"fuelLevel",
"fuelLevel_State",
"headLampStatus",
@@ -509,6 +514,7 @@
"engineOilLife",
"engineTorque",
"externalTemperature",
+ "turnSignal",
"fuelLevel",
"fuelLevel_State",
"headLampStatus",
@@ -532,6 +538,7 @@
"engineOilLife",
"engineTorque",
"externalTemperature",
+ "turnSignal",
"fuelLevel",
"fuelLevel_State",
"headLampStatus",
@@ -554,6 +561,7 @@
"engineOilLife",
"engineTorque",
"externalTemperature",
+ "turnSignal",
"fuelLevel",
"fuelLevel_State",
"headLampStatus",
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 8686f20f0e..e7a33ba2c0 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
@@ -414,6 +414,7 @@
"parameters": [
"accPedalPosition",
"beltStatus",
+ "electronicParkBrakeStatus",
"driverBraking",
"myKey",
"prndl",
@@ -430,6 +431,7 @@
"parameters": [
"accPedalPosition",
"beltStatus",
+ "electronicParkBrakeStatus",
"driverBraking",
"myKey",
"prndl",
@@ -446,6 +448,7 @@
"parameters": [
"accPedalPosition",
"beltStatus",
+ "electronicParkBrakeStatus",
"driverBraking",
"myKey",
"prndl",
@@ -462,6 +465,7 @@
"parameters": [
"accPedalPosition",
"beltStatus",
+ "electronicParkBrakeStatus",
"driverBraking",
"myKey",
"prndl",
@@ -486,6 +490,7 @@
"engineOilLife",
"engineTorque",
"externalTemperature",
+ "turnSignal",
"fuelLevel",
"fuelLevel_State",
"headLampStatus",
@@ -509,6 +514,7 @@
"engineOilLife",
"engineTorque",
"externalTemperature",
+ "turnSignal",
"fuelLevel",
"fuelLevel_State",
"headLampStatus",
@@ -532,6 +538,7 @@
"engineOilLife",
"engineTorque",
"externalTemperature",
+ "turnSignal",
"fuelLevel",
"fuelLevel_State",
"headLampStatus",
@@ -554,6 +561,7 @@
"engineOilLife",
"engineTorque",
"externalTemperature",
+ "turnSignal",
"fuelLevel",
"fuelLevel_State",
"headLampStatus",
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 b9b693ed5b..08739f9d6a 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
@@ -414,6 +414,7 @@
"parameters": [
"accPedalPosition",
"beltStatus",
+ "electronicParkBrakeStatus",
"driverBraking",
"myKey",
"prndl",
@@ -430,6 +431,7 @@
"parameters": [
"accPedalPosition",
"beltStatus",
+ "electronicParkBrakeStatus",
"driverBraking",
"myKey",
"prndl",
@@ -446,6 +448,7 @@
"parameters": [
"accPedalPosition",
"beltStatus",
+ "electronicParkBrakeStatus",
"driverBraking",
"myKey",
"prndl",
@@ -462,6 +465,7 @@
"parameters": [
"accPedalPosition",
"beltStatus",
+ "electronicParkBrakeStatus",
"driverBraking",
"myKey",
"prndl",
@@ -486,6 +490,7 @@
"engineOilLife",
"engineTorque",
"externalTemperature",
+ "turnSignal",
"fuelLevel",
"fuelLevel_State",
"headLampStatus",
@@ -509,6 +514,7 @@
"engineOilLife",
"engineTorque",
"externalTemperature",
+ "turnSignal",
"fuelLevel",
"fuelLevel_State",
"headLampStatus",
@@ -532,6 +538,7 @@
"engineOilLife",
"engineTorque",
"externalTemperature",
+ "turnSignal",
"fuelLevel",
"fuelLevel_State",
"headLampStatus",
@@ -554,6 +561,7 @@
"engineOilLife",
"engineTorque",
"externalTemperature",
+ "turnSignal",
"fuelLevel",
"fuelLevel_State",
"headLampStatus",
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 8bbf7ea421..21396b8cac 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
@@ -414,6 +414,7 @@
"parameters": [
"accPedalPosition",
"beltStatus",
+ "electronicParkBrakeStatus",
"driverBraking",
"myKey",
"prndl",
@@ -430,6 +431,7 @@
"parameters": [
"accPedalPosition",
"beltStatus",
+ "electronicParkBrakeStatus",
"driverBraking",
"myKey",
"prndl",
@@ -446,6 +448,7 @@
"parameters": [
"accPedalPosition",
"beltStatus",
+ "electronicParkBrakeStatus",
"driverBraking",
"myKey",
"prndl",
@@ -462,6 +465,7 @@
"parameters": [
"accPedalPosition",
"beltStatus",
+ "electronicParkBrakeStatus",
"driverBraking",
"myKey",
"prndl",
@@ -486,6 +490,7 @@
"engineOilLife",
"engineTorque",
"externalTemperature",
+ "turnSignal",
"fuelLevel",
"fuelLevel_State",
"headLampStatus",
@@ -509,6 +514,7 @@
"engineOilLife",
"engineTorque",
"externalTemperature",
+ "turnSignal",
"fuelLevel",
"fuelLevel_State",
"headLampStatus",
@@ -532,6 +538,7 @@
"engineOilLife",
"engineTorque",
"externalTemperature",
+ "turnSignal",
"fuelLevel",
"fuelLevel_State",
"headLampStatus",
@@ -554,6 +561,7 @@
"engineOilLife",
"engineTorque",
"externalTemperature",
+ "turnSignal",
"fuelLevel",
"fuelLevel_State",
"headLampStatus",
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 146adaf7a7..5aa467a23c 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
@@ -414,6 +414,7 @@
"parameters": [
"accPedalPosition",
"beltStatus",
+ "electronicParkBrakeStatus",
"driverBraking",
"myKey",
"prndl",
@@ -430,6 +431,7 @@
"parameters": [
"accPedalPosition",
"beltStatus",
+ "electronicParkBrakeStatus",
"driverBraking",
"myKey",
"prndl",
@@ -446,6 +448,7 @@
"parameters": [
"accPedalPosition",
"beltStatus",
+ "electronicParkBrakeStatus",
"driverBraking",
"myKey",
"prndl",
@@ -462,6 +465,7 @@
"parameters": [
"accPedalPosition",
"beltStatus",
+ "electronicParkBrakeStatus",
"driverBraking",
"myKey",
"prndl",
@@ -486,6 +490,7 @@
"engineOilLife",
"engineTorque",
"externalTemperature",
+ "turnSignal",
"fuelLevel",
"fuelLevel_State",
"headLampStatus",
@@ -509,6 +514,7 @@
"engineOilLife",
"engineTorque",
"externalTemperature",
+ "turnSignal",
"fuelLevel",
"fuelLevel_State",
"headLampStatus",
@@ -532,6 +538,7 @@
"engineOilLife",
"engineTorque",
"externalTemperature",
+ "turnSignal",
"fuelLevel",
"fuelLevel_State",
"headLampStatus",
@@ -554,6 +561,7 @@
"engineOilLife",
"engineTorque",
"externalTemperature",
+ "turnSignal",
"fuelLevel",
"fuelLevel_State",
"headLampStatus",
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 bc8d95302c..5827ab287a 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
@@ -1431,6 +1431,7 @@
"parameters" : [
"accPedalPosition",
"beltStatus",
+ "electronicParkBrakeStatus",
"driverBraking",
"myKey",
"prndl",
@@ -1443,6 +1444,7 @@
"parameters" : [
"accPedalPosition",
"beltStatus",
+ "electronicParkBrakeStatus",
"driverBraking",
"myKey",
"prndl",
@@ -1455,6 +1457,7 @@
"parameters" : [
"accPedalPosition",
"beltStatus",
+ "electronicParkBrakeStatus",
"driverBraking",
"myKey",
"prndl",
@@ -1467,6 +1470,7 @@
"parameters" : [
"accPedalPosition",
"beltStatus",
+ "electronicParkBrakeStatus",
"driverBraking",
"myKey",
"prndl",
@@ -1588,6 +1592,7 @@
"engineOilLife",
"engineTorque",
"externalTemperature",
+ "turnSignal",
"fuelLevel",
"fuelLevel_State",
"headLampStatus",
@@ -1605,6 +1610,7 @@
"engineOilLife",
"engineTorque",
"externalTemperature",
+ "turnSignal",
"fuelLevel",
"fuelLevel_State",
"headLampStatus",
@@ -1622,6 +1628,7 @@
"engineOilLife",
"engineTorque",
"externalTemperature",
+ "turnSignal",
"fuelLevel",
"fuelLevel_State",
"headLampStatus",
@@ -1638,6 +1645,7 @@
"engineOilLife",
"engineTorque",
"externalTemperature",
+ "turnSignal",
"fuelLevel",
"fuelLevel_State",
"headLampStatus",
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/policy_manager_impl.h b/src/components/policy/policy_regular/include/policy/policy_manager_impl.h
index 8379cf4d82..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
@@ -816,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
@@ -853,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_;
/**
@@ -868,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 dbe00d0f9c..9c5fa2691e 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,6 +66,7 @@ enum Parameter {
P_SPEED,
P_ENGINETORQUE,
P_EXTERNALTEMPERATURE,
+ P_TURNSIGNAL,
P_FUELLEVEL,
P_FUELLEVEL_STATE,
P_HEADLAMPSTATUS,
@@ -77,6 +78,7 @@ enum Parameter {
P_VIN,
P_ACCPEDALPOSITION,
P_BELTSTATUS,
+ P_ELECTRONICPARKBRAKESTATUS,
P_DRIVERBRAKING,
P_PRNDL,
P_RPM,
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 8197247907..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
@@ -98,11 +98,9 @@ typedef Array<Enum<RequestType>, 0, 255> RequestTypes;
typedef Strings RequestSubTypes;
-#ifdef SDL_REMOTE_CONTROL
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;
@@ -145,9 +143,7 @@ struct ApplicationParams : PolicyBase {
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();
@@ -163,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/sql_pt_representation.h b/src/components/policy/policy_regular/include/policy/sql_pt_representation.h
index e39e0d5873..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;
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 93edce3e3a..393a419139 100644
--- a/src/components/policy/policy_regular/policy_table_interface_ext.xml
+++ b/src/components/policy/policy_regular/policy_table_interface_ext.xml
@@ -27,6 +27,7 @@
<element name="speed" />
<element name="engineTorque" />
<element name="externalTemperature" />
+ <element name="turnSignal" />
<element name="fuelLevel" />
<element name="fuelLevel_State" />
<element name="headLampStatus" />
@@ -38,6 +39,7 @@
<element name="vin" />
<element name="accPedalPosition" />
<element name="beltStatus" />
+ <element name="electronicParkBrakeStatus" />
<element name="driverBraking" />
<element name="prndl" />
<element name="rpm" />
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 a48a9a1ba0..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);
@@ -425,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)) {
@@ -486,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);
@@ -730,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_,
@@ -1075,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>();
}
}
@@ -1159,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;
}
@@ -1193,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");
@@ -1299,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 1dae9c5f96..6768fc50e2 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:
@@ -141,6 +143,8 @@ bool IsValidEnum(Parameter val) {
return true;
case P_BELTSTATUS:
return true;
+ case P_ELECTRONICPARKBRAKESTATUS:
+ return true;
case P_DRIVERBRAKING:
return true;
case P_PRNDL:
@@ -181,6 +185,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:
@@ -203,6 +209,8 @@ const char* EnumToJsonString(Parameter val) {
return "accPedalPosition";
case P_BELTSTATUS:
return "beltStatus";
+ case P_ELECTRONICPARKBRAKESTATUS:
+ return "electronicParkBrakeStatus";
case P_DRIVERBRAKING:
return "driverBraking";
case P_PRNDL:
@@ -247,6 +255,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;
@@ -280,6 +291,9 @@ bool EnumFromJsonString(const std::string& literal, Parameter* result) {
} else if ("beltStatus" == literal) {
*result = P_BELTSTATUS;
return true;
+ } else if ("electronicParkBrakeStatus" == literal) {
+ *result = P_ELECTRONICPARKBRAKESTATUS;
+ return true;
} else if ("driverBraking" == literal) {
*result = P_DRIVERBRAKING;
return true;
@@ -621,7 +635,6 @@ bool EnumFromJsonString(const std::string& literal, RequestType* result) {
}
}
-#ifdef SDL_REMOTE_CONTROL
bool IsValidEnum(ModuleType val) {
switch (val) {
case MT_CLIMATE:
@@ -654,7 +667,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 c4846c0d40..c983e4f12b 100644
--- a/src/components/policy/policy_regular/src/policy_table/types.cc
+++ b/src/components/policy/policy_regular/src/policy_table/types.cc
@@ -168,11 +168,7 @@ ApplicationParams::ApplicationParams(const Json::Value* value__)
, 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());
@@ -184,9 +180,7 @@ Json::Value ApplicationParams::ToJsonValue() const {
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__;
}
@@ -215,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();
}
@@ -255,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;
}
@@ -295,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) {
@@ -311,9 +299,7 @@ void ApplicationParams::SetPolicyTableType(PolicyTableType 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 e760293ea6..714dfaae5a 100644
--- a/src/components/policy/policy_regular/src/policy_table/validation.cc
+++ b/src/components/policy/policy_regular/src/policy_table/validation.cc
@@ -147,7 +147,6 @@ bool ApplicationPoliciesSection::Validate() const {
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();
@@ -181,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_representation.cc b/src/components/policy/policy_regular/src/sql_pt_representation.cc
index a57230aeb1..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;
}
@@ -905,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;
@@ -998,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;
}
@@ -1671,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_);
@@ -1862,7 +1854,6 @@ bool SQLPTRepresentation::GatherRemoteRpc(
}
return true;
}
-#endif // SDL_REMOTE_CONTROL
bool SQLPTRepresentation::SaveApplicationCustomData(const std::string& app_id,
bool is_revoked,
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 7d6837f94e..2f4735dd66 100644
--- a/src/components/policy/policy_regular/test/PTU.json
+++ b/src/components/policy/policy_regular/test/PTU.json
@@ -296,6 +296,7 @@
"LIMITED"],
"parameters": ["accPedalPosition",
"beltStatus",
+ "electronicParkBrakeStatus",
"driverBraking",
"myKey",
"prndl",
@@ -308,6 +309,7 @@
"LIMITED"],
"parameters": ["accPedalPosition",
"beltStatus",
+ "electronicParkBrakeStatus",
"driverBraking",
"myKey",
"prndl",
@@ -320,6 +322,7 @@
"LIMITED"],
"parameters": ["accPedalPosition",
"beltStatus",
+ "electronicParkBrakeStatus",
"driverBraking",
"myKey",
"prndl",
@@ -332,6 +335,7 @@
"LIMITED"],
"parameters": ["accPedalPosition",
"beltStatus",
+ "electronicParkBrakeStatus",
"driverBraking",
"myKey",
"prndl",
@@ -352,6 +356,7 @@
"engineOilLife",
"engineTorque",
"externalTemperature",
+ "turnSignal",
"fuelLevel",
"fuelLevel_State",
"headLampStatus",
@@ -371,6 +376,7 @@
"engineOilLife",
"engineTorque",
"externalTemperature",
+ "turnSignal",
"fuelLevel",
"fuelLevel_State",
"headLampStatus",
@@ -390,6 +396,7 @@
"engineOilLife",
"engineTorque",
"externalTemperature",
+ "turnSignal",
"fuelLevel",
"fuelLevel_State",
"headLampStatus",
@@ -408,6 +415,7 @@
"engineOilLife",
"engineTorque",
"externalTemperature",
+ "turnSignal",
"fuelLevel",
"fuelLevel_State",
"headLampStatus",
diff --git a/src/components/policy/policy_regular/test/PTU2.json b/src/components/policy/policy_regular/test/PTU2.json
index 7a5c29410c..806ab8bcc0 100644
--- a/src/components/policy/policy_regular/test/PTU2.json
+++ b/src/components/policy/policy_regular/test/PTU2.json
@@ -296,6 +296,7 @@
"LIMITED"],
"parameters": ["accPedalPosition",
"beltStatus",
+ "electronicParkBrakeStatus",
"driverBraking",
"myKey",
"prndl",
@@ -308,6 +309,7 @@
"LIMITED"],
"parameters": ["accPedalPosition",
"beltStatus",
+ "electronicParkBrakeStatus",
"driverBraking",
"myKey",
"prndl",
@@ -320,6 +322,7 @@
"LIMITED"],
"parameters": ["accPedalPosition",
"beltStatus",
+ "electronicParkBrakeStatus",
"driverBraking",
"myKey",
"prndl",
@@ -332,6 +335,7 @@
"LIMITED"],
"parameters": ["accPedalPosition",
"beltStatus",
+ "electronicParkBrakeStatus",
"driverBraking",
"myKey",
"prndl",
@@ -352,6 +356,7 @@
"engineOilLife",
"engineTorque",
"externalTemperature",
+ "turnSignal",
"fuelLevel",
"fuelLevel_State",
"headLampStatus",
@@ -371,6 +376,7 @@
"engineOilLife",
"engineTorque",
"externalTemperature",
+ "turnSignal",
"fuelLevel",
"fuelLevel_State",
"headLampStatus",
@@ -390,6 +396,7 @@
"engineOilLife",
"engineTorque",
"externalTemperature",
+ "turnSignal",
"fuelLevel",
"fuelLevel_State",
"headLampStatus",
@@ -408,6 +415,7 @@
"engineOilLife",
"engineTorque",
"externalTemperature",
+ "turnSignal",
"fuelLevel",
"fuelLevel_State",
"headLampStatus",
diff --git a/src/components/policy/policy_regular/test/PTU3.json b/src/components/policy/policy_regular/test/PTU3.json
index 1b3340ec8c..28396be29a 100644
--- a/src/components/policy/policy_regular/test/PTU3.json
+++ b/src/components/policy/policy_regular/test/PTU3.json
@@ -296,6 +296,7 @@
"LIMITED"],
"parameters": ["accPedalPosition",
"beltStatus",
+ "electronicParkBrakeStatus",
"driverBraking",
"myKey",
"prndl",
@@ -308,6 +309,7 @@
"LIMITED"],
"parameters": ["accPedalPosition",
"beltStatus",
+ "electronicParkBrakeStatus",
"driverBraking",
"myKey",
"prndl",
@@ -320,6 +322,7 @@
"LIMITED"],
"parameters": ["accPedalPosition",
"beltStatus",
+ "electronicParkBrakeStatus",
"driverBraking",
"myKey",
"prndl",
@@ -332,6 +335,7 @@
"LIMITED"],
"parameters": ["accPedalPosition",
"beltStatus",
+ "electronicParkBrakeStatus",
"driverBraking",
"myKey",
"prndl",
@@ -352,6 +356,7 @@
"engineOilLife",
"engineTorque",
"externalTemperature",
+ "turnSignal",
"fuelLevel",
"fuelLevel_State",
"headLampStatus",
@@ -371,6 +376,7 @@
"engineOilLife",
"engineTorque",
"externalTemperature",
+ "turnSignal",
"fuelLevel",
"fuelLevel_State",
"headLampStatus",
@@ -390,6 +396,7 @@
"engineOilLife",
"engineTorque",
"externalTemperature",
+ "turnSignal",
"fuelLevel",
"fuelLevel_State",
"headLampStatus",
@@ -408,6 +415,7 @@
"engineOilLife",
"engineTorque",
"externalTemperature",
+ "turnSignal",
"fuelLevel",
"fuelLevel_State",
"headLampStatus",
diff --git a/src/components/policy/policy_regular/test/PTU4.json b/src/components/policy/policy_regular/test/PTU4.json
index 9aa04dd8ba..4592e228df 100644
--- a/src/components/policy/policy_regular/test/PTU4.json
+++ b/src/components/policy/policy_regular/test/PTU4.json
@@ -296,6 +296,7 @@
"LIMITED"],
"parameters": ["accPedalPosition",
"beltStatus",
+ "electronicParkBrakeStatus",
"driverBraking",
"myKey",
"prndl",
@@ -308,6 +309,7 @@
"LIMITED"],
"parameters": ["accPedalPosition",
"beltStatus",
+ "electronicParkBrakeStatus",
"driverBraking",
"myKey",
"prndl",
@@ -320,6 +322,7 @@
"LIMITED"],
"parameters": ["accPedalPosition",
"beltStatus",
+ "electronicParkBrakeStatus",
"driverBraking",
"myKey",
"prndl",
@@ -332,6 +335,7 @@
"LIMITED"],
"parameters": ["accPedalPosition",
"beltStatus",
+ "electronicParkBrakeStatus",
"driverBraking",
"myKey",
"prndl",
@@ -352,6 +356,7 @@
"engineOilLife",
"engineTorque",
"externalTemperature",
+ "turnSignal",
"fuelLevel",
"fuelLevel_State",
"headLampStatus",
@@ -371,6 +376,7 @@
"engineOilLife",
"engineTorque",
"externalTemperature",
+ "turnSignal",
"fuelLevel",
"fuelLevel_State",
"headLampStatus",
@@ -390,6 +396,7 @@
"engineOilLife",
"engineTorque",
"externalTemperature",
+ "turnSignal",
"fuelLevel",
"fuelLevel_State",
"headLampStatus",
@@ -408,6 +415,7 @@
"engineOilLife",
"engineTorque",
"externalTemperature",
+ "turnSignal",
"fuelLevel",
"fuelLevel_State",
"headLampStatus",
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 e127b2fad6..2a05a94f8b 100644
--- a/src/components/policy/policy_regular/test/ptu2_requestType.json
+++ b/src/components/policy/policy_regular/test/ptu2_requestType.json
@@ -416,6 +416,7 @@
"parameters": [
"accPedalPosition",
"beltStatus",
+ "electronicParkBrakeStatus",
"driverBraking",
"myKey",
"prndl",
@@ -432,6 +433,7 @@
"parameters": [
"accPedalPosition",
"beltStatus",
+ "electronicParkBrakeStatus",
"driverBraking",
"myKey",
"prndl",
@@ -448,6 +450,7 @@
"parameters": [
"accPedalPosition",
"beltStatus",
+ "electronicParkBrakeStatus",
"driverBraking",
"myKey",
"prndl",
@@ -464,6 +467,7 @@
"parameters": [
"accPedalPosition",
"beltStatus",
+ "electronicParkBrakeStatus",
"driverBraking",
"myKey",
"prndl",
@@ -488,6 +492,7 @@
"engineOilLife",
"engineTorque",
"externalTemperature",
+ "turnSignal",
"fuelLevel",
"fuelLevel_State",
"headLampStatus",
@@ -511,6 +516,7 @@
"engineOilLife",
"engineTorque",
"externalTemperature",
+ "turnSignal",
"fuelLevel",
"fuelLevel_State",
"headLampStatus",
@@ -534,6 +540,7 @@
"engineOilLife",
"engineTorque",
"externalTemperature",
+ "turnSignal",
"fuelLevel",
"fuelLevel_State",
"headLampStatus",
@@ -556,6 +563,7 @@
"engineOilLife",
"engineTorque",
"externalTemperature",
+ "turnSignal",
"fuelLevel",
"fuelLevel_State",
"headLampStatus",
diff --git a/src/components/policy/policy_regular/test/ptu_requestType.json b/src/components/policy/policy_regular/test/ptu_requestType.json
index bd6a86dac3..b0d9117568 100644
--- a/src/components/policy/policy_regular/test/ptu_requestType.json
+++ b/src/components/policy/policy_regular/test/ptu_requestType.json
@@ -416,6 +416,7 @@
"parameters": [
"accPedalPosition",
"beltStatus",
+ "electronicParkBrakeStatus",
"driverBraking",
"myKey",
"prndl",
@@ -432,6 +433,7 @@
"parameters": [
"accPedalPosition",
"beltStatus",
+ "electronicParkBrakeStatus",
"driverBraking",
"myKey",
"prndl",
@@ -448,6 +450,7 @@
"parameters": [
"accPedalPosition",
"beltStatus",
+ "electronicParkBrakeStatus",
"driverBraking",
"myKey",
"prndl",
@@ -464,6 +467,7 @@
"parameters": [
"accPedalPosition",
"beltStatus",
+ "electronicParkBrakeStatus",
"driverBraking",
"myKey",
"prndl",
@@ -488,6 +492,7 @@
"engineOilLife",
"engineTorque",
"externalTemperature",
+ "turnSignal",
"fuelLevel",
"fuelLevel_State",
"headLampStatus",
@@ -511,6 +516,7 @@
"engineOilLife",
"engineTorque",
"externalTemperature",
+ "turnSignal",
"fuelLevel",
"fuelLevel_State",
"headLampStatus",
@@ -534,6 +540,7 @@
"engineOilLife",
"engineTorque",
"externalTemperature",
+ "turnSignal",
"fuelLevel",
"fuelLevel_State",
"headLampStatus",
@@ -556,6 +563,7 @@
"engineOilLife",
"engineTorque",
"externalTemperature",
+ "turnSignal",
"fuelLevel",
"fuelLevel_State",
"headLampStatus",
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 ced0a9d603..59e3f947c3 100644
--- a/src/components/policy/policy_regular/test/sdl_preloaded_pt.json
+++ b/src/components/policy/policy_regular/test/sdl_preloaded_pt.json
@@ -297,6 +297,7 @@
"LIMITED"],
"parameters": ["accPedalPosition",
"beltStatus",
+ "electronicParkBrakeStatus",
"driverBraking",
"myKey",
"prndl",
@@ -309,6 +310,7 @@
"LIMITED"],
"parameters": ["accPedalPosition",
"beltStatus",
+ "electronicParkBrakeStatus",
"driverBraking",
"myKey",
"prndl",
@@ -321,6 +323,7 @@
"LIMITED"],
"parameters": ["accPedalPosition",
"beltStatus",
+ "electronicParkBrakeStatus",
"driverBraking",
"myKey",
"prndl",
@@ -333,6 +336,7 @@
"LIMITED"],
"parameters": ["accPedalPosition",
"beltStatus",
+ "electronicParkBrakeStatus",
"driverBraking",
"myKey",
"prndl",
@@ -353,6 +357,7 @@
"engineOilLife",
"engineTorque",
"externalTemperature",
+ "turnSignal",
"fuelLevel",
"fuelLevel_State",
"headLampStatus",
@@ -372,6 +377,7 @@
"engineOilLife",
"engineTorque",
"externalTemperature",
+ "turnSignal",
"fuelLevel",
"fuelLevel_State",
"headLampStatus",
@@ -391,6 +397,7 @@
"engineOilLife",
"engineTorque",
"externalTemperature",
+ "turnSignal",
"fuelLevel",
"fuelLevel_State",
"headLampStatus",
@@ -409,6 +416,7 @@
"engineOilLife",
"engineTorque",
"externalTemperature",
+ "turnSignal",
"fuelLevel",
"fuelLevel_State",
"headLampStatus",
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 f8be46d2b5..7b882c6ceb 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
@@ -1431,6 +1431,7 @@
"parameters" : [
"accPedalPosition",
"beltStatus",
+ "electronicParkBrakeStatus",
"driverBraking",
"myKey",
"prndl",
@@ -1443,6 +1444,7 @@
"parameters" : [
"accPedalPosition",
"beltStatus",
+ "electronicParkBrakeStatus",
"driverBraking",
"myKey",
"prndl",
@@ -1455,6 +1457,7 @@
"parameters" : [
"accPedalPosition",
"beltStatus",
+ "electronicParkBrakeStatus",
"driverBraking",
"myKey",
"prndl",
@@ -1467,6 +1470,7 @@
"parameters" : [
"accPedalPosition",
"beltStatus",
+ "electronicParkBrakeStatus",
"driverBraking",
"myKey",
"prndl",
@@ -1612,6 +1616,7 @@
"engineOilLife",
"engineTorque",
"externalTemperature",
+ "turnSignal",
"fuelLevel",
"fuelLevel_State",
"headLampStatus",
@@ -1629,6 +1634,7 @@
"engineOilLife",
"engineTorque",
"externalTemperature",
+ "turnSignal",
"fuelLevel",
"fuelLevel_State",
"headLampStatus",
@@ -1646,6 +1652,7 @@
"engineOilLife",
"engineTorque",
"externalTemperature",
+ "turnSignal",
"fuelLevel",
"fuelLevel_State",
"headLampStatus",
@@ -1662,6 +1669,7 @@
"engineOilLife",
"engineTorque",
"externalTemperature",
+ "turnSignal",
"fuelLevel",
"fuelLevel_State",
"headLampStatus",
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 fe7b036f94..7d90275328 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
@@ -1431,6 +1431,7 @@
"parameters" : [
"accPedalPosition",
"beltStatus",
+ "electronicParkBrakeStatus",
"driverBraking",
"myKey",
"prndl",
@@ -1443,6 +1444,7 @@
"parameters" : [
"accPedalPosition",
"beltStatus",
+ "electronicParkBrakeStatus",
"driverBraking",
"myKey",
"prndl",
@@ -1455,6 +1457,7 @@
"parameters" : [
"accPedalPosition",
"beltStatus",
+ "electronicParkBrakeStatus",
"driverBraking",
"myKey",
"prndl",
@@ -1467,6 +1470,7 @@
"parameters" : [
"accPedalPosition",
"beltStatus",
+ "electronicParkBrakeStatus",
"driverBraking",
"myKey",
"prndl",
@@ -1612,6 +1616,7 @@
"engineOilLife",
"engineTorque",
"externalTemperature",
+ "turnSignal",
"fuelLevel",
"fuelLevel_State",
"headLampStatus",
@@ -1629,6 +1634,7 @@
"engineOilLife",
"engineTorque",
"externalTemperature",
+ "turnSignal",
"fuelLevel",
"fuelLevel_State",
"headLampStatus",
@@ -1646,6 +1652,7 @@
"engineOilLife",
"engineTorque",
"externalTemperature",
+ "turnSignal",
"fuelLevel",
"fuelLevel_State",
"headLampStatus",
@@ -1662,6 +1669,7 @@
"engineOilLife",
"engineTorque",
"externalTemperature",
+ "turnSignal",
"fuelLevel",
"fuelLevel_State",
"headLampStatus",
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 e013243760..909e4d5238 100644
--- a/src/components/policy/policy_regular/test/sdl_pt_update.json
+++ b/src/components/policy/policy_regular/test/sdl_pt_update.json
@@ -1433,6 +1433,7 @@
"parameters" : [
"accPedalPosition",
"beltStatus",
+ "electronicParkBrakeStatus",
"driverBraking",
"myKey",
"prndl",
@@ -1445,6 +1446,7 @@
"parameters" : [
"accPedalPosition",
"beltStatus",
+ "electronicParkBrakeStatus",
"driverBraking",
"myKey",
"prndl",
@@ -1457,6 +1459,7 @@
"parameters" : [
"accPedalPosition",
"beltStatus",
+ "electronicParkBrakeStatus",
"driverBraking",
"myKey",
"prndl",
@@ -1469,6 +1472,7 @@
"parameters" : [
"accPedalPosition",
"beltStatus",
+ "electronicParkBrakeStatus",
"driverBraking",
"myKey",
"prndl",
@@ -1590,6 +1594,7 @@
"engineOilLife",
"engineTorque",
"externalTemperature",
+ "turnSignal",
"fuelLevel",
"fuelLevel_State",
"headLampStatus",
@@ -1607,6 +1612,7 @@
"engineOilLife",
"engineTorque",
"externalTemperature",
+ "turnSignal",
"fuelLevel",
"fuelLevel_State",
"headLampStatus",
@@ -1624,6 +1630,7 @@
"engineOilLife",
"engineTorque",
"externalTemperature",
+ "turnSignal",
"fuelLevel",
"fuelLevel_State",
"headLampStatus",
@@ -1640,6 +1647,7 @@
"engineOilLife",
"engineTorque",
"externalTemperature",
+ "turnSignal",
"fuelLevel",
"fuelLevel_State",
"headLampStatus",
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 bc8d95302c..5827ab287a 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
@@ -1431,6 +1431,7 @@
"parameters" : [
"accPedalPosition",
"beltStatus",
+ "electronicParkBrakeStatus",
"driverBraking",
"myKey",
"prndl",
@@ -1443,6 +1444,7 @@
"parameters" : [
"accPedalPosition",
"beltStatus",
+ "electronicParkBrakeStatus",
"driverBraking",
"myKey",
"prndl",
@@ -1455,6 +1457,7 @@
"parameters" : [
"accPedalPosition",
"beltStatus",
+ "electronicParkBrakeStatus",
"driverBraking",
"myKey",
"prndl",
@@ -1467,6 +1470,7 @@
"parameters" : [
"accPedalPosition",
"beltStatus",
+ "electronicParkBrakeStatus",
"driverBraking",
"myKey",
"prndl",
@@ -1588,6 +1592,7 @@
"engineOilLife",
"engineTorque",
"externalTemperature",
+ "turnSignal",
"fuelLevel",
"fuelLevel_State",
"headLampStatus",
@@ -1605,6 +1610,7 @@
"engineOilLife",
"engineTorque",
"externalTemperature",
+ "turnSignal",
"fuelLevel",
"fuelLevel_State",
"headLampStatus",
@@ -1622,6 +1628,7 @@
"engineOilLife",
"engineTorque",
"externalTemperature",
+ "turnSignal",
"fuelLevel",
"fuelLevel_State",
"headLampStatus",
@@ -1638,6 +1645,7 @@
"engineOilLife",
"engineTorque",
"externalTemperature",
+ "turnSignal",
"fuelLevel",
"fuelLevel_State",
"headLampStatus",
diff --git a/src/components/protocol/src/bson_object_keys.cc b/src/components/protocol/src/bson_object_keys.cc
index fb225b1461..11160d7082 100644
--- a/src/components/protocol/src/bson_object_keys.cc
+++ b/src/components/protocol/src/bson_object_keys.cc
@@ -12,6 +12,12 @@ const char* height = "height";
const char* width = "width";
const char* video_protocol = "videoProtocol";
const char* video_codec = "videoCodec";
+const char* secondary_transports = "secondaryTransports";
+const char* audio_service_transports = "audioServiceTransports";
+const char* video_service_transports = "videoServiceTransports";
+const char* tcp_ip_address = "tcpIpAddress";
+const char* tcp_port = "tcpPort";
+const char* reason = "reason";
} // namespace strings
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..fb685f33d3 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
@@ -44,6 +44,7 @@
#include "utils/threads/message_loop_thread.h"
#include "utils/shared_ptr.h"
#include "utils/messagemeter.h"
+#include "utils/custom_string.h"
#include "protocol_handler/protocol_handler.h"
#include "protocol_handler/protocol_packet.h"
@@ -55,6 +56,7 @@
#include "transport_manager/common.h"
#include "transport_manager/transport_manager.h"
#include "transport_manager/transport_manager_listener_empty.h"
+#include "transport_manager/transport_adapter/transport_adapter.h"
#include "connection_handler/connection_handler.h"
#include "application_manager/policies/policy_handler_observer.h"
@@ -131,6 +133,30 @@ typedef threads::MessageLoopThread<
utils::PrioritizedQueue<RawFordMessageFromMobile> > FromMobileQueue;
typedef threads::MessageLoopThread<
utils::PrioritizedQueue<RawFordMessageToMobile> > ToMobileQueue;
+
+// Type to allow easy mapping between a device type and transport
+// characteristics
+typedef enum {
+ TT_NONE = -1,
+ TT_USB = 0,
+ TT_BLUETOOTH = 1,
+ TT_WIFI = 2
+} TransportType;
+
+struct TransportDescription {
+ TransportDescription(const TransportType transport_type,
+ const bool ios_transport,
+ const bool android_transport)
+ : transport_type_(transport_type)
+ , ios_transport_(ios_transport)
+ , android_transport_(android_transport) {}
+
+ TransportType transport_type_;
+ bool ios_transport_;
+ bool android_transport_;
+};
+
+typedef std::map<std::string, TransportDescription> TransportTypes;
} // namespace impl
/**
@@ -231,10 +257,20 @@ class ProtocolHandlerImpl
*/
void SendEndSession(int32_t connection_id, uint8_t session_id);
- void SendEndService(int32_t connection_id,
+ /**
+ * \brief Sends ending session to mobile application
+ * \param primary_connection_id Identifier of connection within which
+ * service exists
+ * \param connection_id Identifier of the actual transport for the service
+ * \param session_id ID of session to be ended
+ */
+ void SendEndService(int32_t primary_connection_id,
+ int32_t connection_id,
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
@@ -420,10 +456,19 @@ class ProtocolHandlerImpl
const impl::ToMobileQueue& get_to_mobile_queue() const {
return raw_ford_messages_to_mobile_;
}
+
+ void set_tcp_config(bool tcp_enabled,
+ std::string tcp_address,
+ std::string tcp_port) {
+ tcp_enabled_ = tcp_enabled;
+ tcp_ip_address_ = tcp_address;
+ tcp_port_ = tcp_port;
+ }
#endif
private:
- void SendEndServicePrivate(int32_t connection_id,
+ void SendEndServicePrivate(int32_t primary_connection_id,
+ int32_t connection_id,
uint8_t session_id,
uint8_t service_type);
@@ -434,6 +479,28 @@ class ProtocolHandlerImpl
uint8_t session_id,
uint32_t message_id);
+ /*
+ * Prepare and send TransportUpdateEvent message
+ */
+ void SendTransportUpdateEvent(ConnectionID connection_id, uint8_t session_id);
+
+ /*
+ * Prepare and send RegisterSecondaryTransportAck message
+ */
+ RESULT_CODE SendRegisterSecondaryTransportAck(
+ ConnectionID connection_id,
+ ConnectionID primary_transport_connection_id,
+ uint8_t session_id);
+
+ /*
+ * Prepare and send RegisterSecondaryTransportNAck message
+ */
+ RESULT_CODE SendRegisterSecondaryTransportNAck(
+ ConnectionID connection_id,
+ ConnectionID primary_transport_connection_id,
+ uint8_t session_id,
+ BsonObject* reason = NULL);
+
/**
* @brief Notifies about receiving message from TM.
*
@@ -472,13 +539,18 @@ class ProtocolHandlerImpl
void OnConnectionClosed(
const transport_manager::ConnectionUID connection_id) OVERRIDE;
+ void OnUnexpectedDisconnect(
+ const transport_manager::ConnectionUID connection_id,
+ const transport_manager::CommunicationError& error) OVERRIDE;
+
/**
- * @brief OnPTUFinished the callback which signals PTU has finished
+ * @brief Notifies that configuration of a transport has been updated.
*
- * @param ptu_result the result from the PTU - true if successful,
- * otherwise false.
+ * @param configs pairs of key and value that represent configuration.
*/
- void OnPTUFinished(const bool ptu_result) OVERRIDE;
+ void OnTransportConfigUpdated(
+ const transport_manager::transport_adapter::TransportConfig& configs)
+ OVERRIDE;
/**
* @brief Notifies subscribers about message
@@ -581,6 +653,9 @@ class ProtocolHandlerImpl
RESULT_CODE HandleControlMessageStartSession(const ProtocolFramePtr packet);
+ RESULT_CODE HandleControlMessageRegisterSecondaryTransport(
+ const ProtocolFramePtr packet);
+
RESULT_CODE HandleControlMessageHeartBeat(const ProtocolPacket& packet);
void PopValideAndExpirateMultiframes();
@@ -609,6 +684,32 @@ class ProtocolHandlerImpl
*/
uint8_t SupportedSDLProtocolVersion() const;
+ const impl::TransportDescription GetTransportTypeFromConnectionType(
+ const std::string& device_type) const;
+
+ const bool ParseSecondaryTransportConfiguration(
+ const ConnectionID connection_id,
+ std::vector<std::string>& secondaryTransports,
+ std::vector<int32_t>& audioServiceTransports,
+ std::vector<int32_t>& videoServiceTransports) const;
+
+ void GenerateSecondaryTransportsForStartSessionAck(
+ const std::vector<std::string>& secondary_transport_types,
+ bool device_is_ios,
+ bool device_is_android,
+ std::vector<std::string>& secondaryTransports) const;
+
+ void GenerateServiceTransportsForStartSessionAck(
+ bool secondary_enabled,
+ const std::vector<std::string>& service_transports,
+ const std::string& primary_connection_type,
+ const impl::TransportType primary_transport_type,
+ const std::vector<std::string>& secondary_transport_types,
+ std::vector<int32_t>& serviceTransports) const;
+
+ const std::string TransportTypeFromTransport(
+ const utils::custom_string::CustomString& transport) const;
+
const ProtocolHandlerSettings& settings_;
/**
@@ -683,10 +784,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.
@@ -699,6 +796,10 @@ class ProtocolHandlerImpl
sync_primitives::Lock start_session_frame_map_lock_;
StartSessionFrameMap start_session_frame_map_;
+ bool tcp_enabled_;
+ std::string tcp_port_;
+ std::string tcp_ip_address_;
+
#ifdef TELEMETRY_MONITOR
PHTelemetryObserver* metric_observer_;
#endif // TELEMETRY_MONITOR
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..d3e3ec5809 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;
@@ -326,6 +332,11 @@ class ProtocolPacket {
ConnectionID connection_id() const;
/**
+ * \brief Setter of Connection Identifier
+ */
+ void set_connection_id(ConnectionID connection_id);
+
+ /**
* \brief Getter for data payload size
*/
uint32_t payload_size() 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..6548f86c6a 100644
--- a/src/components/protocol_handler/src/protocol_handler_impl.cc
+++ b/src/components/protocol_handler/src/protocol_handler_impl.cc
@@ -31,6 +31,7 @@
*/
#include "protocol_handler/protocol_handler_impl.h"
+#include <arpa/inet.h> // for INET6_ADDRSTRLEN
#include <memory.h>
#include <algorithm> // std::find
#include <bson_object.h>
@@ -39,6 +40,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
@@ -59,7 +61,8 @@ std::string ConvertPacketDataToString(const uint8_t* data,
const size_t kStackSize = 65536;
-ProtocolPacket::ProtocolVersion defaultProtocolVersion(5, 0, 0);
+ProtocolPacket::ProtocolVersion defaultProtocolVersion(5, 1, 0);
+ProtocolPacket::ProtocolVersion minMultipleTransportsVersion(5, 1, 0);
ProtocolHandlerImpl::ProtocolHandlerImpl(
const ProtocolHandlerSettings& settings,
@@ -75,7 +78,6 @@ ProtocolHandlerImpl::ProtocolHandlerImpl(
,
#ifdef ENABLE_SECURITY
security_manager_(NULL)
- , is_ptu_triggered_(false)
,
#endif // ENABLE_SECURITY
raw_ford_messages_from_mobile_(
@@ -84,6 +86,7 @@ ProtocolHandlerImpl::ProtocolHandlerImpl(
"PH ToMobile", this, threads::ThreadOptions(kStackSize))
, start_session_frame_map_lock_()
, start_session_frame_map_()
+ , tcp_enabled_(false)
#ifdef TELEMETRY_MONITOR
, metric_observer_(NULL)
#endif // TELEMETRY_MONITOR
@@ -242,6 +245,8 @@ void ProtocolHandlerImpl::SendStartSessionAck(
BsonObject& params) {
LOG4CXX_AUTO_TRACE(logger_);
+ bool send_transport_update_event = false;
+
uint8_t ack_protocol_version = SupportedSDLProtocolVersion();
const bool proxy_supports_v5_protocol =
@@ -279,16 +284,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 +314,99 @@ 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));
+
+ LOG4CXX_INFO(logger_,
+ "Protocol Version String " << protocolVersionString);
+
+ std::vector<std::string> secondaryTransports;
+ std::vector<int32_t> audioServiceTransports;
+ std::vector<int32_t> videoServiceTransports;
+ if (*minVersion >= minMultipleTransportsVersion) {
+ if (ParseSecondaryTransportConfiguration(connection_id,
+ secondaryTransports,
+ audioServiceTransports,
+ videoServiceTransports)) {
+ LOG4CXX_DEBUG(logger_, "Multiple transports are enabled.");
+ BsonArray secondaryTransportsArr;
+ bson_array_initialize(&secondaryTransportsArr,
+ secondaryTransports.size());
+ for (unsigned int i = 0; i < secondaryTransports.size(); i++) {
+ char secondaryTransport[255];
+ strncpy(secondaryTransport,
+ secondaryTransports[i].c_str(),
+ sizeof(secondaryTransport));
+ secondaryTransport[sizeof(secondaryTransport) - 1] = '\0';
+ LOG4CXX_DEBUG(
+ logger_,
+ "Adding "
+ << secondaryTransport
+ << " to secondaryTransports parameter of StartSessionAck");
+ bson_array_add_string(&secondaryTransportsArr, secondaryTransport);
+ }
+ bson_object_put_array(
+ &params, strings::secondary_transports, &secondaryTransportsArr);
+
+ BsonArray audioServiceTransportsArr;
+ bson_array_initialize(&audioServiceTransportsArr,
+ audioServiceTransports.size());
+ for (unsigned int i = 0; i < audioServiceTransports.size(); i++) {
+ LOG4CXX_DEBUG(logger_,
+ "Adding " << audioServiceTransports[i]
+ << " to audioServiceTransports parameter "
+ "of StartSessionAck");
+ bson_array_add_int32(&audioServiceTransportsArr,
+ audioServiceTransports[i]);
+ }
+ bson_object_put_array(&params,
+ strings::audio_service_transports,
+ &audioServiceTransportsArr);
+
+ BsonArray videoServiceTransportsArr;
+ bson_array_initialize(&videoServiceTransportsArr,
+ videoServiceTransports.size());
+ for (unsigned int i = 0; i < videoServiceTransports.size(); i++) {
+ LOG4CXX_DEBUG(logger_,
+ "Adding " << videoServiceTransports[i]
+ << " to videoServiceTransports parameter "
+ "of StartSessionAck");
+ bson_array_add_int32(&videoServiceTransportsArr,
+ videoServiceTransports[i]);
+ }
+ bson_object_put_array(&params,
+ strings::video_service_transports,
+ &videoServiceTransportsArr);
+
+ if (settings_.multiple_transports_enabled()) {
+ send_transport_update_event = true;
+ } else {
+ LOG4CXX_DEBUG(
+ logger_,
+ "Multiple transports feature is disabled by configuration");
+ // In this case, we must remember that this session will never have
+ // a secondary transport.
+ connection_handler_.SetSecondaryTransportID(session_id,
+ kDisabledSecondary);
+ }
+ } else {
+ LOG4CXX_WARN(
+ logger_,
+ "Failed to set up secondary transport and service type params");
+ connection_handler_.SetSecondaryTransportID(session_id,
+ kDisabledSecondary);
+ }
+ } else {
+ LOG4CXX_INFO(logger_, "Older protocol version. No multiple transports");
+ connection_handler_.SetSecondaryTransportID(session_id,
+ kDisabledSecondary);
+ }
}
uint8_t* payloadBytes = bson_object_to_bytes(&params);
ptr->set_data(payloadBytes, bson_object_size(&params));
@@ -316,6 +424,16 @@ void ProtocolHandlerImpl::SendStartSessionAck(
<< static_cast<int32_t>(service_type) << " session_id "
<< static_cast<int32_t>(session_id) << " protection "
<< (protection ? "ON" : "OFF"));
+
+ if (send_transport_update_event) {
+ // Wait until the StartService ACK has been processed for sending.
+ // The TransportUpdateEvent has a higher priority, being that it's
+ // a SERVICE_TYPE_CONTROL message. (The ACK is SERVICE_TYPE_RPC.)
+ LOG4CXX_DEBUG(logger_, "Waiting for the MessageToMobile queue to be empty");
+ raw_ford_messages_to_mobile_.WaitDumpQueue();
+ LOG4CXX_DEBUG(logger_, "Sending the TransportUpdate event");
+ SendTransportUpdateEvent(connection_id, session_id);
+ }
}
void ProtocolHandlerImpl::SendStartSessionNAck(ConnectionID connection_id,
@@ -473,14 +591,18 @@ void ProtocolHandlerImpl::SendEndSessionAck(ConnectionID connection_id,
<< static_cast<int32_t>(session_id));
}
-void ProtocolHandlerImpl::SendEndServicePrivate(int32_t connection_id,
+void ProtocolHandlerImpl::SendEndServicePrivate(int32_t primary_connection_id,
+ int32_t connection_id,
uint8_t session_id,
uint8_t service_type) {
LOG4CXX_AUTO_TRACE(logger_);
uint8_t protocol_version;
if (session_observer_.ProtocolVersionUsed(
- connection_id, session_id, protocol_version)) {
+ primary_connection_id, session_id, protocol_version)) {
+ LOG4CXX_TRACE(logger_,
+ "SendEndServicePrivate using protocol version "
+ << static_cast<int32_t>(protocol_version));
ProtocolFramePtr ptr(
new protocol_handler::ProtocolPacket(connection_id,
protocol_version,
@@ -495,25 +617,31 @@ void ProtocolHandlerImpl::SendEndServicePrivate(int32_t connection_id,
raw_ford_messages_to_mobile_.PostMessage(
impl::RawFordMessageToMobile(ptr, false));
LOG4CXX_DEBUG(logger_,
- "SendEndSession() for connection "
- << connection_id << " for service_type " << service_type
+ "SendEndServicePrivate() for connection "
+ << primary_connection_id << " for service_type "
+ << static_cast<int>(service_type)
+ << " service connection " << connection_id
<< " session_id " << static_cast<int32_t>(session_id));
} else {
LOG4CXX_WARN(
logger_,
- "SendEndSession is failed connection or session does not exist");
+ "SendEndServicePrivate is failed connection or session does not exist");
}
}
void ProtocolHandlerImpl::SendEndSession(int32_t connection_id,
uint8_t session_id) {
- SendEndServicePrivate(connection_id, session_id, SERVICE_TYPE_RPC);
+ // A session is always associated with a primary connection ID
+ SendEndServicePrivate(
+ connection_id, connection_id, session_id, SERVICE_TYPE_RPC);
}
-void ProtocolHandlerImpl::SendEndService(int32_t connection_id,
+void ProtocolHandlerImpl::SendEndService(int32_t primary_connection_id,
+ int32_t connection_id,
uint8_t session_id,
uint8_t service_type) {
- SendEndServicePrivate(connection_id, session_id, service_type);
+ SendEndServicePrivate(
+ primary_connection_id, connection_id, session_id, service_type);
}
RESULT_CODE ProtocolHandlerImpl::SendHeartBeatAck(ConnectionID connection_id,
@@ -545,6 +673,139 @@ RESULT_CODE ProtocolHandlerImpl::SendHeartBeatAck(ConnectionID connection_id,
return RESULT_FAIL;
}
+void ProtocolHandlerImpl::SendTransportUpdateEvent(ConnectionID connection_id,
+ uint8_t session_id) {
+ LOG4CXX_AUTO_TRACE(logger_);
+
+ uint8_t protocol_version;
+ if (session_observer_.ProtocolVersionUsed(
+ connection_id, session_id, protocol_version)) {
+ ProtocolFramePtr ptr(
+ new protocol_handler::ProtocolPacket(connection_id,
+ protocol_version,
+ PROTECTION_OFF,
+ FRAME_TYPE_CONTROL,
+ SERVICE_TYPE_CONTROL,
+ FRAME_DATA_TRANSPORT_EVENT_UPDATE,
+ session_id,
+ 0,
+ message_counters_[session_id]++));
+
+ BsonObject payload_obj;
+ bson_object_initialize_default(&payload_obj);
+
+ int32_t tcp_port = atoi(tcp_port_.c_str());
+ char tcp_ip_address[INET6_ADDRSTRLEN + 1];
+ if (tcp_enabled_ && (tcp_port != 0)) {
+ strncpy(tcp_ip_address, tcp_ip_address_.c_str(), INET6_ADDRSTRLEN);
+ tcp_ip_address[INET6_ADDRSTRLEN] = '\0';
+ bson_object_put_string(
+ &payload_obj, strings::tcp_ip_address, tcp_ip_address);
+ bson_object_put_int32(&payload_obj, strings::tcp_port, tcp_port);
+ } else {
+ tcp_ip_address[0] = '\0';
+ bson_object_put_string(
+ &payload_obj, strings::tcp_ip_address, tcp_ip_address);
+ // omit TCP port number
+ }
+ LOG4CXX_INFO(logger_,
+ "SendTransportUpdateEvent IP address: "
+ << tcp_ip_address << " Port: " << tcp_port);
+
+ uint8_t* payloadBytes = bson_object_to_bytes(&payload_obj);
+ ptr->set_data(payloadBytes, bson_object_size(&payload_obj));
+ free(payloadBytes);
+ bson_object_deinitialize(&payload_obj);
+
+ raw_ford_messages_to_mobile_.PostMessage(
+ impl::RawFordMessageToMobile(ptr, false));
+
+ LOG4CXX_DEBUG(logger_,
+ "SendTransportUpdateEvent() for connection "
+ << connection_id << " for session "
+ << static_cast<int32_t>(session_id));
+ } else {
+ LOG4CXX_WARN(logger_,
+ "SendTransportUpdateEvent is failed connection or session "
+ "does not exist");
+ }
+}
+
+RESULT_CODE ProtocolHandlerImpl::SendRegisterSecondaryTransportAck(
+ ConnectionID connection_id,
+ ConnectionID primary_transport_connection_id,
+ uint8_t session_id) {
+ LOG4CXX_AUTO_TRACE(logger_);
+
+ // acquire the protocol version from primary transport
+ uint8_t protocol_version;
+ if (session_observer_.ProtocolVersionUsed(
+ primary_transport_connection_id, session_id, protocol_version)) {
+ ProtocolFramePtr ptr(new protocol_handler::ProtocolPacket(
+ connection_id,
+ protocol_version,
+ PROTECTION_OFF,
+ FRAME_TYPE_CONTROL,
+ SERVICE_TYPE_CONTROL,
+ FRAME_DATA_REGISTER_SECONDARY_TRANSPORT_ACK,
+ session_id,
+ 0u,
+ 2));
+
+ raw_ford_messages_to_mobile_.PostMessage(
+ impl::RawFordMessageToMobile(ptr, false));
+ return RESULT_OK;
+ }
+ LOG4CXX_WARN(logger_,
+ "RegisterSecondaryTransportAck is failed connection or session "
+ "does not exist");
+ return RESULT_FAIL;
+}
+
+RESULT_CODE ProtocolHandlerImpl::SendRegisterSecondaryTransportNAck(
+ ConnectionID connection_id,
+ ConnectionID primary_transport_connection_id,
+ uint8_t session_id,
+ BsonObject* reason) {
+ LOG4CXX_AUTO_TRACE(logger_);
+
+ // If mobile sends an invalid session ID and we cannot find out the Connection
+ // ID of primary transport, then we use version 5. (The multiple-transports
+ // feature is added in 5.1.0.)
+ uint8_t protocol_version = PROTOCOL_VERSION_5;
+ if (primary_transport_connection_id > 0) {
+ // acquire the protocol version from primary transport
+ if (!session_observer_.ProtocolVersionUsed(
+ primary_transport_connection_id, session_id, protocol_version)) {
+ LOG4CXX_WARN(logger_,
+ "Failed to acquire protocol version for "
+ "RegisterSecondaryTransportNAck");
+ return RESULT_FAIL;
+ }
+ }
+
+ ProtocolFramePtr ptr(new protocol_handler::ProtocolPacket(
+ connection_id,
+ protocol_version,
+ PROTECTION_OFF,
+ FRAME_TYPE_CONTROL,
+ SERVICE_TYPE_CONTROL,
+ FRAME_DATA_REGISTER_SECONDARY_TRANSPORT_NACK,
+ session_id,
+ 0u,
+ 2));
+
+ if (reason) {
+ uint8_t* payloadBytes = bson_object_to_bytes(reason);
+ ptr->set_data(payloadBytes, bson_object_size(reason));
+ free(payloadBytes);
+ }
+
+ raw_ford_messages_to_mobile_.PostMessage(
+ impl::RawFordMessageToMobile(ptr, false));
+ return RESULT_OK;
+}
+
void ProtocolHandlerImpl::SendHeartBeat(int32_t connection_id,
uint8_t session_id) {
LOG4CXX_AUTO_TRACE(logger_);
@@ -839,57 +1100,83 @@ void ProtocolHandlerImpl::OnConnectionClosed(
multiframe_builder_.RemoveConnection(connection_id);
}
-void ProtocolHandlerImpl::OnPTUFinished(const bool ptu_result) {
- LOG4CXX_AUTO_TRACE(logger_);
+void ProtocolHandlerImpl::OnUnexpectedDisconnect(
+ const transport_manager::ConnectionUID connection_id,
+ const transport_manager::CommunicationError& error) {
+ OnConnectionClosed(connection_id);
+}
+void ProtocolHandlerImpl::NotifyOnFailedHandshake() {
+ LOG4CXX_AUTO_TRACE(logger_);
#ifdef ENABLE_SECURITY
- sync_primitives::AutoLock lock(ptu_handlers_lock_);
+ security_manager_->NotifyListenersOnHandshakeFailed();
+#endif // ENABLE_SECURITY
+}
- if (!is_ptu_triggered_) {
- LOG4CXX_ERROR(logger_,
- "PTU was not triggered by service starting. Ignored");
+void ProtocolHandlerImpl::OnTransportConfigUpdated(
+ const transport_manager::transport_adapter::TransportConfig& configs) {
+ LOG4CXX_AUTO_TRACE(logger_);
+
+ transport_manager::transport_adapter::TransportConfig::const_iterator it =
+ configs.find(transport_manager::transport_adapter::tc_enabled);
+ if (configs.end() == it) {
+ LOG4CXX_WARN(logger_, "No enabled field in OnTransportConfigUpdated");
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);
+ bool tcp_enabled = (0 == strcmp("true", it->second.c_str()));
+ std::string tcp_port;
- continue;
+ if (tcp_enabled) {
+ it = configs.find(transport_manager::transport_adapter::tc_tcp_port);
+ if (configs.end() == it) {
+ LOG4CXX_WARN(logger_, "No port field in OnTransportConfigUpdated");
+ return;
}
+ tcp_port = it->second;
- 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());
- }
+ it = configs.find(transport_manager::transport_adapter::tc_tcp_ip_address);
+ if (configs.end() == it) {
+ LOG4CXX_WARN(logger_, "No IP address field in OnTransportConfigUpdated");
+ return;
}
+ tcp_enabled_ = true;
+ tcp_port_ = tcp_port;
+ tcp_ip_address_ = it->second;
+ } else {
+ tcp_enabled_ = false;
+ tcp_port_.clear();
+ tcp_ip_address_.clear();
+ }
+
+ LOG4CXX_INFO(logger_,
+ "OnTransportConfigUpdated: new config enabled is "
+ << tcp_enabled_ << ". Port is " << tcp_port_
+ << ". IP Address is " << tcp_ip_address_);
+
+ // Walk the SessionConnection map and find all sessions that need a
+ // TransportUpdate Event. Sessions flagged with kDisabledSecondary in their
+ // secondary transport are ineligible for secondary transport, and
+ // therefore don't get this event.
+ DataAccessor<connection_handler::SessionConnectionMap>
+ session_connection_map_accessor =
+ connection_handler_.session_connection_map();
+ const connection_handler::SessionConnectionMap& session_connection_map =
+ session_connection_map_accessor.GetData();
+ connection_handler::SessionConnectionMap::const_iterator itr =
+ session_connection_map.begin();
+ while (itr != session_connection_map.end()) {
+ const connection_handler::SessionTransports st = itr->second;
+ LOG4CXX_INFO(logger_,
+ "OnTransportConfigUpdated found session "
+ << itr->first << " with primary connection "
+ << st.primary_transport << " and secondary connection "
+ << st.secondary_transport);
+ if (st.secondary_transport != kDisabledSecondary) {
+ SendTransportUpdateEvent(st.primary_transport, itr->first);
+ }
+ itr++;
}
-
- LOG4CXX_DEBUG(logger_, "Handshake handlers were notified");
- ptu_pending_handlers_.clear();
- is_ptu_triggered_ = false;
-#endif // ENABLE_SECURITY
}
RESULT_CODE ProtocolHandlerImpl::SendFrame(const ProtocolFramePtr packet) {
@@ -1076,6 +1363,13 @@ RESULT_CODE ProtocolHandlerImpl::HandleSingleFrameMessage(
<< packet->data_size() << "; message "
<< ConvertPacketDataToString(packet->data(), packet->data_size()));
+ // Replace a potential secondary transport ID in the packet with the primary
+ // transport ID
+ const connection_handler::SessionTransports st =
+ connection_handler_.GetSessionTransports(packet->session_id());
+ if (st.primary_transport != 0) {
+ packet->set_connection_id(st.primary_transport);
+ }
const uint32_t connection_key = session_observer_.KeyFromPair(
packet->connection_id(), packet->session_id());
@@ -1108,6 +1402,14 @@ RESULT_CODE ProtocolHandlerImpl::HandleMultiFrameMessage(
const ProtocolFramePtr packet) {
LOG4CXX_AUTO_TRACE(logger_);
+ // Replace a potential secondary transport ID in the packet with the primary
+ // transport ID
+ const connection_handler::SessionTransports st =
+ connection_handler_.GetSessionTransports(packet->session_id());
+ if (st.primary_transport != 0) {
+ packet->set_connection_id(st.primary_transport);
+ }
+
if (multiframe_builder_.AddFrame(packet) != RESULT_OK) {
LOG4CXX_WARN(logger_, "Frame assembling issue");
}
@@ -1145,6 +1447,10 @@ RESULT_CODE ProtocolHandlerImpl::HandleControlMessage(
<< packet->connection_id());
return RESULT_OK;
}
+ case FRAME_DATA_REGISTER_SECONDARY_TRANSPORT: {
+ LOG4CXX_TRACE(logger_, "FrameData: RegisterSecondaryTransport");
+ return HandleControlMessageRegisterSecondaryTransport(packet);
+ }
default:
LOG4CXX_WARN(logger_,
"Control message of type "
@@ -1286,7 +1592,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 +1723,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
@@ -1428,6 +1735,11 @@ RESULT_CODE ProtocolHandlerImpl::HandleControlMessageStartSession(
const ConnectionID connection_id = packet->connection_id();
const uint8_t session_id = packet->session_id();
+ LOG4CXX_INFO(logger_,
+ "StartSession ID " << static_cast<int>(session_id)
+ << " and Connection ID "
+ << static_cast<int>(connection_id));
+
{
sync_primitives::AutoLock auto_lock(start_session_frame_map_lock_);
start_session_frame_map_[std::make_pair(connection_id, session_id)] =
@@ -1441,6 +1753,50 @@ RESULT_CODE ProtocolHandlerImpl::HandleControlMessageStartSession(
return RESULT_OK;
}
+RESULT_CODE ProtocolHandlerImpl::HandleControlMessageRegisterSecondaryTransport(
+ const ProtocolFramePtr packet) {
+ LOG4CXX_AUTO_TRACE(logger_);
+ const uint8_t session_id = packet->session_id();
+ const ConnectionID connection_id = packet->connection_id();
+ ConnectionID primary_connection_id = 0;
+
+ LOG4CXX_INFO(logger_,
+ "RegisterSecondaryTransport ID "
+ << static_cast<int>(session_id) << " and Connection ID "
+ << static_cast<int>(connection_id));
+
+ if (connection_handler_.OnSecondaryTransportStarted(
+ primary_connection_id, connection_id, session_id)) {
+ SendRegisterSecondaryTransportAck(
+ connection_id, primary_connection_id, session_id);
+ } else {
+ char reason[256];
+ BsonObject registerSecondaryTransportNackObj;
+ bson_object_initialize_default(&registerSecondaryTransportNackObj);
+ if (0 == session_id) {
+ strncpy(reason,
+ "RegisterSecondaryTransport MUST include a non-zero session ID",
+ 255);
+ } else if (primary_connection_id == 0) {
+ strncpy(reason, "RegisterSecondaryTransport session ID not found", 255);
+ } else {
+ strncpy(
+ reason,
+ "RegisterSecondaryTransport session ID has already been registered",
+ 255);
+ }
+ bson_object_put_string(
+ &registerSecondaryTransportNackObj, strings::reason, reason);
+ SendRegisterSecondaryTransportNAck(connection_id,
+ primary_connection_id,
+ session_id,
+ &registerSecondaryTransportNackObj);
+ bson_object_deinitialize(&registerSecondaryTransportNackObj);
+ }
+
+ return RESULT_OK;
+}
+
void ProtocolHandlerImpl::NotifySessionStartedResult(
int32_t connection_id,
uint8_t session_id,
@@ -1450,6 +1806,7 @@ void ProtocolHandlerImpl::NotifySessionStartedResult(
std::vector<std::string>& rejected_params) {
LOG4CXX_AUTO_TRACE(logger_);
protocol_handler::SessionContext context(connection_id,
+ connection_id,
session_id,
generated_session_id,
ServiceType::kInvalidServiceType,
@@ -1552,51 +1909,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 +1955,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 +2028,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 +2186,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 +2231,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 +2295,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;
}
@@ -2007,4 +2373,241 @@ uint8_t ProtocolHandlerImpl::SupportedSDLProtocolVersion() const {
LOG4CXX_AUTO_TRACE(logger_);
return get_settings().max_supported_protocol_version();
}
+
+const impl::TransportTypes transportTypes = {
+ std::make_pair(
+ std::string("AOA_USB"),
+ impl::TransportDescription(impl::TransportType::TT_USB, false, true)),
+ std::make_pair(std::string("SPP_BLUETOOTH"),
+ impl::TransportDescription(
+ impl::TransportType::TT_BLUETOOTH, false, true)),
+ std::make_pair(std::string("IAP_BLUETOOTH"),
+ impl::TransportDescription(
+ impl::TransportType::TT_BLUETOOTH, true, false)),
+ std::make_pair(
+ std::string("IAP_USB"),
+ impl::TransportDescription(impl::TransportType::TT_USB, true, false)),
+ std::make_pair(
+ std::string("TCP_WIFI"),
+ impl::TransportDescription(impl::TransportType::TT_WIFI, true, true)),
+ std::make_pair(
+ std::string("IAP_USB_HOST_MODE"),
+ impl::TransportDescription(impl::TransportType::TT_USB, true, false)),
+ std::make_pair(
+ std::string("IAP_USB_DEVICE_MODE"),
+ impl::TransportDescription(impl::TransportType::TT_USB, true, false)),
+ std::make_pair(
+ std::string("IAP_CARPLAY"),
+ impl::TransportDescription(impl::TransportType::TT_WIFI, true, false))};
+
+const impl::TransportDescription
+ProtocolHandlerImpl::GetTransportTypeFromConnectionType(
+ const std::string& connection_type) const {
+ impl::TransportDescription result =
+ impl::TransportDescription(impl::TransportType::TT_NONE, false, false);
+ impl::TransportTypes::const_iterator it =
+ transportTypes.find(connection_type);
+ if (it != transportTypes.end()) {
+ result = it->second;
+ } else {
+ LOG4CXX_ERROR(logger_, "Unknown connection type " << connection_type);
+ }
+
+ return result;
+}
+
+const bool ProtocolHandlerImpl::ParseSecondaryTransportConfiguration(
+ const ConnectionID connection_id,
+ std::vector<std::string>& secondaryTransports,
+ std::vector<int32_t>& audioServiceTransports,
+ std::vector<int32_t>& videoServiceTransports) const {
+ LOG4CXX_AUTO_TRACE(logger_);
+ std::vector<std::string> secondary_transport_types;
+
+ // First discover what the connection type of the primary transport is
+ // and look up the allowed secondary transports for that primary transport
+ const std::string connection_type =
+ session_observer_.TransportTypeProfileStringFromConnHandle(connection_id);
+ const impl::TransportDescription td =
+ GetTransportTypeFromConnectionType(connection_type);
+ if (settings_.multiple_transports_enabled()) {
+ if (td.transport_type_ == impl::TransportType::TT_USB) {
+ secondary_transport_types = settings_.secondary_transports_for_usb();
+ } else if (td.transport_type_ == impl::TransportType::TT_BLUETOOTH) {
+ secondary_transport_types =
+ settings_.secondary_transports_for_bluetooth();
+ } else if (td.transport_type_ == impl::TransportType::TT_WIFI) {
+ secondary_transport_types = settings_.secondary_transports_for_wifi();
+ } else {
+ LOG4CXX_ERROR(
+ logger_,
+ "Bad or unknown device type in ParseSecondaryTransportConfiguration");
+ return false;
+ }
+ }
+ // note: even if settings_.multiple_transports_enabled() is false, we still
+ // send out an empty "secondaryTransports" parameter, along with
+ // "videoServiceTransports" and "audioServiceTransports" params which are
+ // useful without secondary transport.
+
+ // Then, generate the "secondaryTransports" array for the StartSession ACK
+ GenerateSecondaryTransportsForStartSessionAck(secondary_transport_types,
+ td.ios_transport_,
+ td.android_transport_,
+ secondaryTransports);
+
+ // Next, figure out which connections audio or video services are allowed on
+ GenerateServiceTransportsForStartSessionAck(
+ settings_.multiple_transports_enabled(),
+ settings_.audio_service_transports(),
+ connection_type,
+ td.transport_type_,
+ secondary_transport_types,
+ audioServiceTransports);
+
+ GenerateServiceTransportsForStartSessionAck(
+ settings_.multiple_transports_enabled(),
+ settings_.video_service_transports(),
+ connection_type,
+ td.transport_type_,
+ secondary_transport_types,
+ videoServiceTransports);
+
+ return true;
+}
+
+void ProtocolHandlerImpl::GenerateSecondaryTransportsForStartSessionAck(
+ const std::vector<std::string>& secondary_transport_types,
+ bool device_is_ios,
+ bool device_is_android,
+ std::vector<std::string>& secondaryTransports) const {
+ LOG4CXX_AUTO_TRACE(logger_);
+
+ // Parse the "secondary_transport_types" vector (which comes from
+ // smartDeviceLink.ini). For each entry in the vector, add an
+ // appropriate string to the secondaryTransports
+ std::vector<std::string>::const_iterator it =
+ secondary_transport_types.begin();
+ while (it != secondary_transport_types.end()) {
+ const utils::custom_string::CustomString transport_type(*it);
+ if (transport_type.CompareIgnoreCase("USB")) {
+ if (device_is_ios) {
+ LOG4CXX_TRACE(
+ logger_,
+ "Adding IAP_USB to secondaryTransports for StartSessionAck");
+ secondaryTransports.push_back("IAP_USB");
+ }
+ if (device_is_android) {
+ LOG4CXX_TRACE(
+ logger_,
+ "Adding AOA_USB to secondaryTransports for StartSessionAck");
+ secondaryTransports.push_back("AOA_USB");
+ }
+ } else if (transport_type.CompareIgnoreCase("Bluetooth")) {
+ if (device_is_ios) {
+ LOG4CXX_TRACE(
+ logger_,
+ "Adding IAP_BLUETOOTH to secondaryTransports for StartSessionAck");
+ secondaryTransports.push_back("IAP_BLUETOOTH");
+ }
+ if (device_is_android) {
+ LOG4CXX_TRACE(
+ logger_,
+ "Adding SPP_BLUETOOTH to secondaryTransports for StartSessionAck");
+ secondaryTransports.push_back("SPP_BLUETOOTH");
+ }
+ }
+ if (transport_type.CompareIgnoreCase("WiFi")) {
+ LOG4CXX_TRACE(
+ logger_,
+ "Adding TCP_WIFI to secondaryTransports for StartSessionAck");
+ secondaryTransports.push_back("TCP_WIFI");
+ }
+
+ it++;
+ }
+}
+
+void ProtocolHandlerImpl::GenerateServiceTransportsForStartSessionAck(
+ bool secondary_enabled,
+ const std::vector<std::string>& service_transports,
+ const std::string& primary_connection_type,
+ const impl::TransportType primary_transport_type,
+ const std::vector<std::string>& secondary_transport_types,
+ std::vector<int32_t>& serviceTransports) const {
+ LOG4CXX_AUTO_TRACE(logger_);
+
+ if (service_transports.size() == 0) {
+ if (secondary_enabled && !secondary_transport_types.empty()) {
+ LOG4CXX_TRACE(logger_,
+ "Empty Service Transports. Allowing service to run on both "
+ "connections");
+ serviceTransports.push_back(1);
+ serviceTransports.push_back(2);
+ } else {
+ serviceTransports.push_back(1);
+ }
+ } else {
+ bool fPrimaryAdded = false;
+ bool fSecondaryAdded = false;
+ std::vector<std::string>::const_iterator it = service_transports.begin();
+ for (; it != service_transports.end(); it++) {
+ const utils::custom_string::CustomString transport(*it);
+ LOG4CXX_TRACE(logger_,
+ "Service Allowed to run on " << transport.c_str()
+ << " transport");
+
+ if (!fPrimaryAdded &&
+ (transport.CompareIgnoreCase(primary_connection_type.c_str()) ||
+ (transport.CompareIgnoreCase("IAP_USB") &&
+ primary_transport_type == impl::TransportType::TT_USB))) {
+ LOG4CXX_TRACE(logger_, "Service allowed on primary transport");
+ serviceTransports.push_back(1);
+ fPrimaryAdded = true;
+ }
+
+ if (!fSecondaryAdded) {
+ const utils::custom_string::CustomString transport_type(
+ TransportTypeFromTransport(transport));
+ std::vector<std::string>::const_iterator found =
+ std::find_if(secondary_transport_types.begin(),
+ secondary_transport_types.end(),
+ [&](const std::string& secondary_transport_type) {
+ return transport_type.CompareIgnoreCase(
+ secondary_transport_type.c_str());
+ });
+ if (found != secondary_transport_types.end()) {
+ LOG4CXX_TRACE(logger_, "Service allowed on secondary transport");
+ serviceTransports.push_back(2);
+ fSecondaryAdded = true;
+ }
+ }
+
+ if (fPrimaryAdded && fSecondaryAdded) {
+ break;
+ }
+ }
+ }
+}
+
+const std::string ProtocolHandlerImpl::TransportTypeFromTransport(
+ const utils::custom_string::CustomString& transport) const {
+ std::string transport_type;
+
+ if (transport.CompareIgnoreCase("IAP_BLUETOOTH") ||
+ transport.CompareIgnoreCase("SPP_BLUETOOTH")) {
+ transport_type = "Bluetooth";
+ } else if (transport.CompareIgnoreCase("IAP_USB") ||
+ transport.CompareIgnoreCase("AOA_USB") ||
+ transport.CompareIgnoreCase("IAP_USB_HOST_MODE") ||
+ transport.CompareIgnoreCase("IAP_USB_DEVICE_MODE")) {
+ transport_type = "USB";
+ } else if (transport.CompareIgnoreCase("TCP_WIFI") ||
+ transport.CompareIgnoreCase("IAP_CARPLAY")) {
+ transport_type = "WiFi";
+ }
+
+ return transport_type;
+}
+
} // namespace protocol_handler
diff --git a/src/components/protocol_handler/src/protocol_packet.cc b/src/components/protocol_handler/src/protocol_packet.cc
index ae52849de6..3cd9e7f781 100644
--- a/src/components/protocol_handler/src/protocol_packet.cc
+++ b/src/components/protocol_handler/src/protocol_packet.cc
@@ -304,8 +304,8 @@ RESULT_CODE ProtocolPacket::ProtocolHeaderValidator::validate(
// Check frame info for each frame type
// Frame type shall be 0x00 (Control), 0x01 (Single), 0x02 (First), 0x03
// (Consecutive)
- // For Control frames Frame info value shall be from 0x00 to 0x06 or 0xFE(Data
- // Ack), 0xFF(HB Ack)
+ // For Control frames Frame info value shall be from 0x00 to 0x09 or
+ // 0xFD(Transport Event Update), 0xFE(Data Ack), 0xFF(HB Ack)
// For Single and First frames Frame info value shall be equal 0x00
switch (header.frameType) {
case FRAME_TYPE_CONTROL: {
@@ -317,6 +317,10 @@ RESULT_CODE ProtocolPacket::ProtocolHeaderValidator::validate(
case FRAME_DATA_END_SERVICE:
case FRAME_DATA_END_SERVICE_ACK:
case FRAME_DATA_END_SERVICE_NACK:
+ case FRAME_DATA_REGISTER_SECONDARY_TRANSPORT:
+ case FRAME_DATA_REGISTER_SECONDARY_TRANSPORT_ACK:
+ case FRAME_DATA_REGISTER_SECONDARY_TRANSPORT_NACK:
+ case FRAME_DATA_TRANSPORT_EVENT_UPDATE:
case FRAME_DATA_SERVICE_DATA_ACK:
case FRAME_DATA_HEART_BEAT_ACK:
break;
@@ -520,6 +524,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 +547,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 +614,8 @@ uint8_t* ProtocolPacket::data() const {
}
void ProtocolPacket::set_total_data_bytes(size_t dataBytes) {
+ LOG4CXX_AUTO_TRACE(logger_);
+ LOG4CXX_DEBUG(logger_, "Data bytes : " << dataBytes);
if (dataBytes) {
delete[] packet_data_.data;
packet_data_.data = new (std::nothrow) uint8_t[dataBytes];
@@ -632,6 +646,10 @@ ConnectionID ProtocolPacket::connection_id() const {
return connection_id_;
}
+void ProtocolPacket::set_connection_id(ConnectionID connection_id) {
+ connection_id_ = connection_id;
+}
+
uint32_t ProtocolPacket::payload_size() const {
return payload_size_;
}
diff --git a/src/components/protocol_handler/test/incoming_data_handler_test.cc b/src/components/protocol_handler/test/incoming_data_handler_test.cc
index d0a311583c..393579927c 100644
--- a/src/components/protocol_handler/test/incoming_data_handler_test.cc
+++ b/src/components/protocol_handler/test/incoming_data_handler_test.cc
@@ -393,13 +393,13 @@ TEST_F(IncomingDataHandlerTest, MalformedPacket_FrameType) {
}
}
-// For Control frames Frame info value shall be from 0x00 to 0x06 or 0xFE(Data
-// Ack), 0xFF(HB Ack)
+// For Control frames Frame info value shall be from 0x00 to 0x09 or 0xFD
+// (Transport Update Event), 0xFE(Data Ack), 0xFF(HB Ack)
TEST_F(IncomingDataHandlerTest, MalformedPacket_ControlFrame) {
FrameList malformed_packets;
std::vector<uint8_t> malformed_frame_data;
- for (uint8_t frame_type = FRAME_DATA_END_SERVICE_NACK + 1;
- frame_type < FRAME_DATA_SERVICE_DATA_ACK;
+ for (uint8_t frame_type = FRAME_DATA_REGISTER_SECONDARY_TRANSPORT_NACK + 1;
+ frame_type < FRAME_DATA_TRANSPORT_EVENT_UPDATE;
++frame_type) {
malformed_frame_data.push_back(frame_type);
}
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 8525b1c5b9..2e06cd702e 100644
--- a/src/components/protocol_handler/test/protocol_handler_tm_test.cc
+++ b/src/components/protocol_handler/test/protocol_handler_tm_test.cc
@@ -41,15 +41,26 @@
#include "protocol_handler/mock_protocol_handler_settings.h"
#include "protocol_handler/mock_session_observer.h"
#include "connection_handler/mock_connection_handler.h"
+#include "connection_handler/connection_handler_impl.h"
#ifdef ENABLE_SECURITY
#include "security_manager/mock_security_manager.h"
#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>
+namespace transport_manager {
+namespace transport_adapter {
+// taken from transport_adapter_impl.cc
+const char* tc_enabled = "enabled";
+const char* tc_tcp_port = "tcp_port";
+const char* tc_tcp_ip_address = "tcp_ip_address";
+}
+}
+
namespace test {
namespace components {
namespace protocol_handler_test {
@@ -87,6 +98,10 @@ using protocol_handler::FRAME_DATA_SERVICE_DATA_ACK;
using protocol_handler::FRAME_DATA_SINGLE;
using protocol_handler::FRAME_DATA_FIRST;
using protocol_handler::FRAME_DATA_LAST_CONSECUTIVE;
+using protocol_handler::FRAME_DATA_REGISTER_SECONDARY_TRANSPORT;
+using protocol_handler::FRAME_DATA_REGISTER_SECONDARY_TRANSPORT_ACK;
+using protocol_handler::FRAME_DATA_REGISTER_SECONDARY_TRANSPORT_NACK;
+using protocol_handler::FRAME_DATA_TRANSPORT_EVENT_UPDATE;
using protocol_handler::kRpc;
using protocol_handler::kControl;
using protocol_handler::kAudio;
@@ -95,16 +110,24 @@ 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
using ::testing::Return;
+using ::testing::ReturnRef;
using ::testing::ReturnRefOfCopy;
using ::testing::ReturnNull;
using ::testing::An;
using ::testing::AnyOf;
+using ::testing::AtLeast;
using ::testing::ByRef;
using ::testing::DoAll;
using ::testing::SaveArg;
@@ -183,6 +206,9 @@ class ProtocolHandlerImplTest : public ::testing::Test {
.
// Return false to avoid call KeepConnectionAlive
WillRepeatedly(Return(false));
+
+ session_connection_map_lock_ptr_ =
+ std::make_shared<sync_primitives::Lock>();
}
void TearDown() OVERRIDE {
@@ -209,6 +235,7 @@ class ProtocolHandlerImplTest : public ::testing::Test {
const uint32_t hash_id,
const bool protection_flag) {
return protocol_handler::SessionContext(connection_id,
+ connection_id,
initial_session_id,
new_session_id,
service_type,
@@ -313,10 +340,11 @@ class ProtocolHandlerImplTest : public ::testing::Test {
uint8_t service_type,
uint8_t sessionId,
uint32_t frame_data,
+ uint8_t protocol_version = PROTOCOL_VERSION_3,
uint32_t dataSize = 0u,
const uint8_t* data = NULL) {
SendTMMessage(connection_id,
- PROTOCOL_VERSION_3,
+ protocol_version,
protection,
FRAME_TYPE_CONTROL,
service_type,
@@ -327,6 +355,18 @@ class ProtocolHandlerImplTest : public ::testing::Test {
data);
}
+ void VerifySecondaryTransportParamsInStartSessionAck(
+ bool config_multiple_transports_enabled,
+ const std::vector<std::string>& config_secondary_transports_for_usb,
+ const std::vector<std::string>& config_secondary_transports_for_bluetooth,
+ const std::vector<std::string>& config_secondary_transports_for_wifi,
+ const std::vector<std::string>& config_audio_service_transports,
+ const std::vector<std::string>& config_video_service_transports,
+ const std::string& connection_type_string,
+ const std::vector<std::string>& expected_transport_strings,
+ const std::vector<int32_t>& expected_audio_service_transports,
+ const std::vector<int32_t>& expected_video_service_transports);
+
testing::NiceMock<MockProtocolHandlerSettings> protocol_handler_settings_mock;
::utils::SharedPtr<ProtocolHandlerImpl> protocol_handler_impl;
TransportManagerListener* tm_listener;
@@ -353,6 +393,10 @@ class ProtocolHandlerImplTest : public ::testing::Test {
std::vector<int> force_unprotected_services;
#endif // ENABLE_SECURITY
std::vector<std::string> empty_rejected_param_;
+ // Used by OnTransportConfigUpdated() tests. The lifetime of these objects
+ // should be longer than that of a test case.
+ connection_handler::SessionConnectionMap session_connection_map_;
+ std::shared_ptr<sync_primitives::Lock> session_connection_map_lock_ptr_;
};
#ifdef ENABLE_SECURITY
@@ -618,6 +662,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 +1043,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 +1101,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 +1178,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 +1257,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 +1355,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 +1451,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 +1482,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(
@@ -1450,6 +1522,1131 @@ TEST_F(ProtocolHandlerImplTest,
}
#endif // ENABLE_SECURITY
+void ProtocolHandlerImplTest::VerifySecondaryTransportParamsInStartSessionAck(
+ bool config_multiple_transports_enabled,
+ const std::vector<std::string>& config_secondary_transports_for_usb,
+ const std::vector<std::string>& config_secondary_transports_for_bluetooth,
+ const std::vector<std::string>& config_secondary_transports_for_wifi,
+ const std::vector<std::string>& config_audio_service_transports,
+ const std::vector<std::string>& config_video_service_transports,
+ const std::string& connection_type_string,
+ const std::vector<std::string>& expected_transport_strings,
+ const std::vector<int32_t>& expected_audio_service_transports,
+ const std::vector<int32_t>& expected_video_service_transports) {
+ const size_t maximum_rpc_payload_size = 1500;
+ EXPECT_CALL(protocol_handler_settings_mock, maximum_rpc_payload_size())
+ .WillRepeatedly(Return(maximum_rpc_payload_size));
+ InitProtocolHandlerImpl(0u, 0u);
+
+ TestAsyncWaiter waiter;
+ uint32_t times = 0;
+
+ const uint8_t input_protocol_version = 5;
+ const uint32_t hash_id = 123456;
+ ProtocolPacket::ProtocolVersion full_version(5, 1, 0);
+ char full_version_string[] = "5.1.0";
+
+ // configuration setup
+ EXPECT_CALL(protocol_handler_settings_mock, max_supported_protocol_version())
+ .WillRepeatedly(Return(PROTOCOL_VERSION_5));
+ EXPECT_CALL(protocol_handler_settings_mock, multiple_transports_enabled())
+ .WillRepeatedly(Return(config_multiple_transports_enabled));
+ EXPECT_CALL(protocol_handler_settings_mock, secondary_transports_for_usb())
+ .Times(AtLeast(0))
+ .WillRepeatedly(ReturnRef(config_secondary_transports_for_usb));
+ EXPECT_CALL(protocol_handler_settings_mock,
+ secondary_transports_for_bluetooth())
+ .Times(AtLeast(0))
+ .WillRepeatedly(ReturnRef(config_secondary_transports_for_bluetooth));
+ EXPECT_CALL(protocol_handler_settings_mock, secondary_transports_for_wifi())
+ .Times(AtLeast(0))
+ .WillRepeatedly(ReturnRef(config_secondary_transports_for_wifi));
+ EXPECT_CALL(protocol_handler_settings_mock, audio_service_transports())
+ .WillOnce(ReturnRef(config_audio_service_transports));
+ EXPECT_CALL(protocol_handler_settings_mock, video_service_transports())
+ .WillOnce(ReturnRef(config_video_service_transports));
+
+ EXPECT_CALL(session_observer_mock,
+ TransportTypeProfileStringFromConnHandle(connection_id))
+ .WillRepeatedly(Return(connection_type_string));
+
+ // Prepare expected BSON parameters. When we add another param in Start
+ // Service ACK frame in future, it should be also added here.
+ BsonObject expected_obj;
+ bson_object_initialize_default(&expected_obj);
+ // mtu
+ bson_object_put_int64(&expected_obj,
+ protocol_handler::strings::mtu,
+ static_cast<int64_t>(maximum_rpc_payload_size));
+ // hashId
+ bson_object_put_int32(&expected_obj,
+ protocol_handler::strings::hash_id,
+ static_cast<int32_t>(hash_id));
+ // protocolVersion
+ bson_object_put_string(&expected_obj,
+ protocol_handler::strings::protocol_version,
+ full_version_string);
+ // secondaryTransports
+ BsonArray secondary_transports;
+ bson_array_initialize(&secondary_transports,
+ expected_transport_strings.size());
+ for (std::vector<std::string>::const_iterator it =
+ expected_transport_strings.begin();
+ it != expected_transport_strings.end();
+ ++it) {
+ // note: if there is no transport allowed, we can either make the array
+ // empty, or completely omit the array. (The spec allows both cases.) In
+ // this test case we make the array empty.
+ bson_array_add_string(&secondary_transports,
+ const_cast<char*>(it->c_str()));
+ }
+ bson_object_put_array(&expected_obj,
+ protocol_handler::strings::secondary_transports,
+ &secondary_transports);
+ // audioServiceTransports
+ BsonArray audio_service_transports;
+ if (expected_audio_service_transports.size() > 0) {
+ bson_array_initialize(&audio_service_transports,
+ expected_audio_service_transports.size());
+ for (std::vector<int32_t>::const_iterator it =
+ expected_audio_service_transports.begin();
+ it != expected_audio_service_transports.end();
+ ++it) {
+ bson_array_add_int32(&audio_service_transports, *it);
+ }
+ bson_object_put_array(&expected_obj,
+ protocol_handler::strings::audio_service_transports,
+ &audio_service_transports);
+ }
+ // videoServiceTransports
+ BsonArray video_service_transports;
+ if (expected_video_service_transports.size() > 0) {
+ bson_array_initialize(&video_service_transports,
+ expected_video_service_transports.size());
+ for (std::vector<int32_t>::const_iterator it =
+ expected_video_service_transports.begin();
+ it != expected_video_service_transports.end();
+ ++it) {
+ bson_array_add_int32(&video_service_transports, *it);
+ }
+ bson_object_put_array(&expected_obj,
+ protocol_handler::strings::video_service_transports,
+ &video_service_transports);
+ }
+
+ std::vector<uint8_t> expected_param =
+ CreateVectorFromBsonObject(&expected_obj);
+
+ bson_object_deinitialize(&expected_obj);
+
+ EXPECT_CALL(transport_manager_mock,
+ SendMessageToDevice(ControlMessage(FRAME_DATA_START_SERVICE_ACK,
+ PROTECTION_OFF,
+ connection_id,
+ Eq(expected_param))))
+ .WillOnce(DoAll(NotifyTestAsyncWaiter(&waiter), Return(E_SUCCESS)));
+ times++;
+
+#ifdef ENABLE_SECURITY
+ AddSecurityManager();
+
+ EXPECT_CALL(session_observer_mock, KeyFromPair(connection_id, session_id))
+ .WillOnce(Return(connection_key));
+
+ EXPECT_CALL(session_observer_mock, GetSSLContext(connection_key, kRpc))
+ .WillOnce(ReturnNull());
+#endif // ENABLE_SECURITY
+
+ protocol_handler_impl->SendStartSessionAck(connection_id,
+ session_id,
+ input_protocol_version,
+ hash_id,
+ protocol_handler::SERVICE_TYPE_RPC,
+ false /* protection */,
+ full_version);
+
+ EXPECT_TRUE(waiter.WaitFor(times, kAsyncExpectationsTimeout));
+}
+
+TEST_F(ProtocolHandlerImplTest,
+ StartSessionAck_SecondaryTransportParams_Enabled) {
+ // config allows secondary transport only when connected through Bluetooth,
+ // and the secondary is Wi-Fi
+ std::vector<std::string> secondary_transports_for_usb; // empty
+ std::vector<std::string> secondary_transports_for_bluetooth;
+ secondary_transports_for_bluetooth.push_back("WiFi");
+ std::vector<std::string> secondary_transports_for_wifi; // empty
+ // config allows video and audio services to run on all transports except
+ // Bluetooth
+ std::vector<std::string> audio_service_transports;
+ audio_service_transports.push_back("IAP_USB");
+ audio_service_transports.push_back("IAP_USB_HOST_MODE");
+ audio_service_transports.push_back("IAP_USB_DEVICE_MODE");
+ audio_service_transports.push_back("IAP_CARPLAY");
+ audio_service_transports.push_back("AOA_USB");
+ audio_service_transports.push_back("TCP_WIFI");
+ std::vector<std::string> video_service_transports;
+ video_service_transports.push_back("IAP_USB");
+ video_service_transports.push_back("IAP_USB_HOST_MODE");
+ video_service_transports.push_back("IAP_USB_DEVICE_MODE");
+ video_service_transports.push_back("IAP_CARPLAY");
+ video_service_transports.push_back("AOA_USB");
+ video_service_transports.push_back("TCP_WIFI");
+
+ // assume the device is Android and is connected through Bluetooth SPP
+ std::string connection_type_string("SPP_BLUETOOTH");
+
+ // Core should specify WiFi for secondary transport, and should allow video
+ // and audio services only on secondary transport
+ std::vector<std::string> expected_transport_strings;
+ expected_transport_strings.push_back("TCP_WIFI");
+ std::vector<int32_t> expected_audio_service_transports;
+ expected_audio_service_transports.push_back(2);
+ std::vector<int32_t> expected_video_service_transports;
+ expected_video_service_transports.push_back(2);
+
+ // A TransportUpdateEvent is also issued after Start Service ACK. We don't
+ // check it in this test case.
+ EXPECT_CALL(session_observer_mock, ProtocolVersionUsed(_, _, _))
+ .WillRepeatedly(Return(false));
+
+ VerifySecondaryTransportParamsInStartSessionAck(
+ true,
+ secondary_transports_for_usb,
+ secondary_transports_for_bluetooth,
+ secondary_transports_for_wifi,
+ audio_service_transports,
+ video_service_transports,
+ connection_type_string,
+ expected_transport_strings,
+ expected_audio_service_transports,
+ expected_video_service_transports);
+}
+
+TEST_F(ProtocolHandlerImplTest,
+ StartSessionAck_SecondaryTransportParams_NoSecondaryTransport) {
+ // config allows secondary transport only when connected through Bluetooth,
+ // and the secondary is Wi-Fi
+ std::vector<std::string> secondary_transports_for_usb; // empty
+ std::vector<std::string> secondary_transports_for_bluetooth;
+ secondary_transports_for_bluetooth.push_back("WiFi");
+ std::vector<std::string> secondary_transports_for_wifi; // empty
+ // config allows video and audio services to run on all transports except
+ // Bluetooth
+ std::vector<std::string> audio_service_transports;
+ audio_service_transports.push_back("IAP_USB");
+ audio_service_transports.push_back("IAP_USB_HOST_MODE");
+ audio_service_transports.push_back("IAP_USB_DEVICE_MODE");
+ audio_service_transports.push_back("IAP_CARPLAY");
+ audio_service_transports.push_back("AOA_USB");
+ audio_service_transports.push_back("TCP_WIFI");
+ std::vector<std::string> video_service_transports;
+ video_service_transports.push_back("IAP_USB");
+ video_service_transports.push_back("IAP_USB_HOST_MODE");
+ video_service_transports.push_back("IAP_USB_DEVICE_MODE");
+ video_service_transports.push_back("IAP_CARPLAY");
+ video_service_transports.push_back("AOA_USB");
+ video_service_transports.push_back("TCP_WIFI");
+
+ // assume the device is iOS and is connected through iAP over USB
+ std::string connection_type_string("IAP_USB");
+
+ // Core should not offer any secondary transport. It will allow both video
+ // and audio services on primary transport.
+ std::vector<std::string> expected_transport_strings; // empty
+ std::vector<int32_t> expected_audio_service_transports;
+ expected_audio_service_transports.push_back(1);
+ std::vector<int32_t> expected_video_service_transports;
+ expected_video_service_transports.push_back(1);
+
+ EXPECT_CALL(session_observer_mock, ProtocolVersionUsed(_, _, _))
+ .WillRepeatedly(Return(false));
+
+ VerifySecondaryTransportParamsInStartSessionAck(
+ true,
+ secondary_transports_for_usb,
+ secondary_transports_for_bluetooth,
+ secondary_transports_for_wifi,
+ audio_service_transports,
+ video_service_transports,
+ connection_type_string,
+ expected_transport_strings,
+ expected_audio_service_transports,
+ expected_video_service_transports);
+}
+
+TEST_F(ProtocolHandlerImplTest,
+ StartSessionAck_SecondaryTransportParams_MultipleSecondaryTransports) {
+ // config allows secondary transport only when connected through Bluetooth,
+ // and the secondary is Wi-Fi and USB
+ std::vector<std::string> secondary_transports_for_usb; // empty
+ std::vector<std::string> secondary_transports_for_bluetooth;
+ secondary_transports_for_bluetooth.push_back("WiFi");
+ secondary_transports_for_bluetooth.push_back("USB");
+ std::vector<std::string> secondary_transports_for_wifi; // empty
+ // config allows video and audio services to run on all transports except
+ // Bluetooth
+ std::vector<std::string> audio_service_transports;
+ audio_service_transports.push_back("IAP_USB");
+ audio_service_transports.push_back("IAP_USB_HOST_MODE");
+ audio_service_transports.push_back("IAP_USB_DEVICE_MODE");
+ audio_service_transports.push_back("IAP_CARPLAY");
+ audio_service_transports.push_back("AOA_USB");
+ audio_service_transports.push_back("TCP_WIFI");
+ std::vector<std::string> video_service_transports;
+ video_service_transports.push_back("IAP_USB");
+ video_service_transports.push_back("IAP_USB_HOST_MODE");
+ video_service_transports.push_back("IAP_USB_DEVICE_MODE");
+ video_service_transports.push_back("IAP_CARPLAY");
+ video_service_transports.push_back("AOA_USB");
+ video_service_transports.push_back("TCP_WIFI");
+
+ // assume the device is iOS and is connected through iAP over Bluetooth
+ std::string connection_type_string("IAP_BLUETOOTH");
+
+ // Core should offer both Wi-Fi and USB for secondary transport. Since the
+ // device is iOS, Core should specify "IAP_USB".
+ std::vector<std::string> expected_transport_strings;
+ expected_transport_strings.push_back("TCP_WIFI");
+ expected_transport_strings.push_back("IAP_USB");
+ std::vector<int32_t> expected_audio_service_transports;
+ expected_audio_service_transports.push_back(2);
+ std::vector<int32_t> expected_video_service_transports;
+ expected_video_service_transports.push_back(2);
+
+ EXPECT_CALL(session_observer_mock, ProtocolVersionUsed(_, _, _))
+ .WillRepeatedly(Return(false));
+
+ VerifySecondaryTransportParamsInStartSessionAck(
+ true,
+ secondary_transports_for_usb,
+ secondary_transports_for_bluetooth,
+ secondary_transports_for_wifi,
+ audio_service_transports,
+ video_service_transports,
+ connection_type_string,
+ expected_transport_strings,
+ expected_audio_service_transports,
+ expected_video_service_transports);
+}
+
+TEST_F(
+ ProtocolHandlerImplTest,
+ StartSessionAck_SecondaryTransportParams_ServiceAllowedOnBothTransports) {
+ std::vector<std::string> secondary_transports_for_usb;
+ secondary_transports_for_usb.push_back("WiFi");
+ std::vector<std::string> secondary_transports_for_bluetooth;
+ secondary_transports_for_bluetooth.push_back("USB");
+ std::vector<std::string> secondary_transports_for_wifi; // empty
+ // config allows video service to run on Wi-Fi transports only, and audio
+ // service to run on all transports
+ std::vector<std::string> audio_service_transports;
+ audio_service_transports.push_back("IAP_BLUETOOTH");
+ audio_service_transports.push_back("IAP_USB");
+ audio_service_transports.push_back("IAP_USB_HOST_MODE");
+ audio_service_transports.push_back("IAP_USB_DEVICE_MODE");
+ audio_service_transports.push_back("IAP_CARPLAY");
+ audio_service_transports.push_back("SPP_BLUETOOTH");
+ audio_service_transports.push_back("AOA_USB");
+ audio_service_transports.push_back("TCP_WIFI");
+ std::vector<std::string> video_service_transports;
+ video_service_transports.push_back("IAP_CARPLAY");
+ video_service_transports.push_back("TCP_WIFI");
+
+ // assume the device is Android and is connected through AOA
+ std::string connection_type_string("AOA_USB");
+
+ // Core should offer Wi-Fi for secondary transport. It should allow audio
+ // service to run on both primary and secondary, while video service to run
+ // on secondary only. Since the list specifies AOA_USB then TCP_WIFI, the
+ // priority is primary > secondary.
+ std::vector<std::string> expected_transport_strings;
+ expected_transport_strings.push_back("TCP_WIFI");
+ std::vector<int32_t> expected_audio_service_transports;
+ expected_audio_service_transports.push_back(1); // primary preferred
+ expected_audio_service_transports.push_back(2);
+ std::vector<int32_t> expected_video_service_transports;
+ expected_video_service_transports.push_back(2);
+
+ EXPECT_CALL(session_observer_mock, ProtocolVersionUsed(_, _, _))
+ .WillRepeatedly(Return(false));
+
+ VerifySecondaryTransportParamsInStartSessionAck(
+ true,
+ secondary_transports_for_usb,
+ secondary_transports_for_bluetooth,
+ secondary_transports_for_wifi,
+ audio_service_transports,
+ video_service_transports,
+ connection_type_string,
+ expected_transport_strings,
+ expected_audio_service_transports,
+ expected_video_service_transports);
+}
+
+TEST_F(ProtocolHandlerImplTest,
+ StartSessionAck_SecondaryTransportParams_SecondaryDisabled) {
+ std::vector<std::string> secondary_transports_for_usb; // empty
+ std::vector<std::string> secondary_transports_for_bluetooth; // empty
+ std::vector<std::string> secondary_transports_for_wifi; // empty
+ // config allows video and audio services to run on all transports
+ std::vector<std::string> audio_service_transports;
+ audio_service_transports.push_back("IAP_BLUETOOTH");
+ audio_service_transports.push_back("IAP_USB");
+ audio_service_transports.push_back("IAP_USB_HOST_MODE");
+ audio_service_transports.push_back("IAP_USB_DEVICE_MODE");
+ audio_service_transports.push_back("IAP_CARPLAY");
+ audio_service_transports.push_back("SPP_BLUETOOTH");
+ audio_service_transports.push_back("AOA_USB");
+ audio_service_transports.push_back("TCP_WIFI");
+ std::vector<std::string> video_service_transports;
+ video_service_transports.push_back("IAP_BLUETOOTH");
+ video_service_transports.push_back("IAP_USB");
+ video_service_transports.push_back("IAP_USB_HOST_MODE");
+ video_service_transports.push_back("IAP_USB_DEVICE_MODE");
+ video_service_transports.push_back("IAP_CARPLAY");
+ video_service_transports.push_back("SPP_BLUETOOTH");
+ video_service_transports.push_back("AOA_USB");
+ video_service_transports.push_back("TCP_WIFI");
+
+ // assume the device is iOS and is connected through iAP over Bluetooth
+ std::string connection_type_string("IAP_BLUETOOTH");
+
+ // Core should not offer any secondary transport. It should still send
+ // the video/audio service transport lists.
+ std::vector<std::string> expected_transport_strings; // empty
+ std::vector<int32_t> expected_audio_service_transports;
+ expected_audio_service_transports.push_back(1);
+ std::vector<int32_t> expected_video_service_transports;
+ expected_video_service_transports.push_back(1);
+
+ connection_handler::SessionTransports dummy_st = {0, 0};
+ EXPECT_CALL(connection_handler_mock,
+ SetSecondaryTransportID(_, kDisabledSecondary))
+ .WillOnce(Return(dummy_st));
+
+ EXPECT_CALL(session_observer_mock, ProtocolVersionUsed(_, _, _))
+ .WillRepeatedly(Return(false));
+
+ VerifySecondaryTransportParamsInStartSessionAck(
+ false, /* disabled */
+ secondary_transports_for_usb,
+ secondary_transports_for_bluetooth,
+ secondary_transports_for_wifi,
+ audio_service_transports,
+ video_service_transports,
+ connection_type_string,
+ expected_transport_strings,
+ expected_audio_service_transports,
+ expected_video_service_transports);
+}
+
+TEST_F(ProtocolHandlerImplTest,
+ StartSessionAck_SecondaryTransportParams_ServicesMapEmpty) {
+ std::vector<std::string> secondary_transports_for_usb; // empty
+ std::vector<std::string> secondary_transports_for_bluetooth;
+ secondary_transports_for_bluetooth.push_back("USB");
+ std::vector<std::string> secondary_transports_for_wifi;
+ secondary_transports_for_wifi.push_back("USB");
+ // config does not specify video and audio services
+ std::vector<std::string> audio_service_transports; // empty
+ std::vector<std::string> video_service_transports; // empty
+
+ // assume the device is connected through Wi-Fi (so not sure if it's iOS or
+ // Android)
+ std::string connection_type_string("TCP_WIFI");
+
+ // Core should offer USB transport for secondary transport. (Since the OS type
+ // is unknown, it will offer both IAP_USB and AOA_USB.) Also, it should allow
+ // video/audio services on all transports.
+ std::vector<std::string> expected_transport_strings;
+ expected_transport_strings.push_back("IAP_USB");
+ expected_transport_strings.push_back("AOA_USB");
+ std::vector<int32_t> expected_audio_service_transports;
+ expected_audio_service_transports.push_back(1);
+ expected_audio_service_transports.push_back(2);
+ std::vector<int32_t> expected_video_service_transports;
+ expected_video_service_transports.push_back(1);
+ expected_video_service_transports.push_back(2);
+
+ EXPECT_CALL(session_observer_mock, ProtocolVersionUsed(_, _, _))
+ .WillRepeatedly(Return(false));
+
+ VerifySecondaryTransportParamsInStartSessionAck(
+ true,
+ secondary_transports_for_usb,
+ secondary_transports_for_bluetooth,
+ secondary_transports_for_wifi,
+ audio_service_transports,
+ video_service_transports,
+ connection_type_string,
+ expected_transport_strings,
+ expected_audio_service_transports,
+ expected_video_service_transports);
+}
+
+TEST_F(
+ ProtocolHandlerImplTest,
+ StartSessionAck_SecondaryTransportParams_SecondaryDisabled_ServicesMapEmpty) {
+ std::vector<std::string> secondary_transports_for_usb; // empty
+ std::vector<std::string> secondary_transports_for_bluetooth; // empty
+ std::vector<std::string> secondary_transports_for_wifi; // empty
+ // config does not specify video and audio services
+ std::vector<std::string> audio_service_transports; // empty
+ std::vector<std::string> video_service_transports; // empty
+
+ std::string connection_type_string("IAP_BLUETOOTH");
+
+ // Core should not offer any secondary transport. It should still send
+ // the video/audio service transport lists.
+ std::vector<std::string> expected_transport_strings; // empty
+ std::vector<int32_t> expected_audio_service_transports;
+ expected_audio_service_transports.push_back(1);
+ std::vector<int32_t> expected_video_service_transports;
+ expected_video_service_transports.push_back(1);
+
+ connection_handler::SessionTransports dummy_st = {0, 0};
+ EXPECT_CALL(connection_handler_mock,
+ SetSecondaryTransportID(_, kDisabledSecondary))
+ .WillOnce(Return(dummy_st));
+
+ EXPECT_CALL(session_observer_mock, ProtocolVersionUsed(_, _, _))
+ .WillRepeatedly(Return(false));
+
+ VerifySecondaryTransportParamsInStartSessionAck(
+ false, /* disabled */
+ secondary_transports_for_usb,
+ secondary_transports_for_bluetooth,
+ secondary_transports_for_wifi,
+ audio_service_transports,
+ video_service_transports,
+ connection_type_string,
+ expected_transport_strings,
+ expected_audio_service_transports,
+ expected_video_service_transports);
+}
+
+// Secondary transport param should not be included for apps with v5.0.0
+TEST_F(ProtocolHandlerImplTest,
+ StartSessionAck_Unprotected_NoSecondaryTransportParamsForV5) {
+ TestAsyncWaiter waiter;
+ uint32_t times = 0;
+
+ const uint8_t input_protocol_version = 5;
+ const uint32_t hash_id = 123456;
+ ProtocolPacket::ProtocolVersion full_version(5, 0, 0);
+ char full_version_string[] = "5.0.0";
+
+ const size_t maximum_rpc_payload_size = 1500;
+ EXPECT_CALL(protocol_handler_settings_mock, maximum_rpc_payload_size())
+ .WillRepeatedly(Return(maximum_rpc_payload_size));
+ InitProtocolHandlerImpl(0u, 0u);
+
+ // configuration
+ std::vector<std::string> config_secondary_transports_for_usb; // empty
+ std::vector<std::string> config_secondary_transports_for_bluetooth;
+ config_secondary_transports_for_bluetooth.push_back("USB");
+ std::vector<std::string> config_secondary_transports_for_wifi;
+ config_secondary_transports_for_wifi.push_back("USB");
+
+ // assume the device is iOS and is connected through iAP over Bluetooth
+ std::string connection_type_string("IAP_BLUETOOTH");
+
+ // configuration setup
+ EXPECT_CALL(protocol_handler_settings_mock, max_supported_protocol_version())
+ .WillRepeatedly(Return(PROTOCOL_VERSION_5));
+ EXPECT_CALL(protocol_handler_settings_mock, multiple_transports_enabled())
+ .WillRepeatedly(Return(true));
+ EXPECT_CALL(protocol_handler_settings_mock, secondary_transports_for_usb())
+ .Times(AtLeast(0))
+ .WillRepeatedly(ReturnRef(config_secondary_transports_for_usb));
+ EXPECT_CALL(protocol_handler_settings_mock,
+ secondary_transports_for_bluetooth())
+ .Times(AtLeast(0))
+ .WillRepeatedly(ReturnRef(config_secondary_transports_for_bluetooth));
+ EXPECT_CALL(protocol_handler_settings_mock, secondary_transports_for_wifi())
+ .Times(AtLeast(0))
+ .WillRepeatedly(ReturnRef(config_secondary_transports_for_wifi));
+
+ EXPECT_CALL(session_observer_mock,
+ TransportTypeProfileStringFromConnHandle(connection_id))
+ .WillRepeatedly(Return(connection_type_string));
+
+ // BSON params should not include any of "secondaryTransports",
+ // "audioServiceTransports" and "videoServiceTransports" since v5.0.0 app
+ // does not understand them
+ BsonObject expected_obj;
+ bson_object_initialize_default(&expected_obj);
+ // mtu
+ bson_object_put_int64(&expected_obj,
+ protocol_handler::strings::mtu,
+ static_cast<int64_t>(maximum_rpc_payload_size));
+ // hashId
+ bson_object_put_int32(&expected_obj,
+ protocol_handler::strings::hash_id,
+ static_cast<int32_t>(hash_id));
+ // protocolVersion
+ bson_object_put_string(&expected_obj,
+ protocol_handler::strings::protocol_version,
+ full_version_string);
+
+ std::vector<uint8_t> expected_param =
+ CreateVectorFromBsonObject(&expected_obj);
+
+ bson_object_deinitialize(&expected_obj);
+
+ EXPECT_CALL(transport_manager_mock,
+ SendMessageToDevice(ControlMessage(FRAME_DATA_START_SERVICE_ACK,
+ PROTECTION_OFF,
+ connection_id,
+ Eq(expected_param))))
+ .WillOnce(DoAll(NotifyTestAsyncWaiter(&waiter), Return(E_SUCCESS)));
+ times++;
+
+ connection_handler::SessionTransports dummy_st = {0, 0};
+ EXPECT_CALL(connection_handler_mock,
+ SetSecondaryTransportID(_, kDisabledSecondary))
+ .WillOnce(Return(dummy_st));
+
+ // Since the protocol version is less than 5.1.0, Core should not issue
+ // TransportEventUpdate frame. Enable ProtocolVersionUsed() call and verify
+ // that transport_manager_mock will NOT receive another SendMessageToDevice()
+ // call.
+ ON_CALL(session_observer_mock, ProtocolVersionUsed(_, _, _))
+ .WillByDefault(Return(true));
+
+#ifdef ENABLE_SECURITY
+ AddSecurityManager();
+
+ EXPECT_CALL(session_observer_mock, KeyFromPair(connection_id, session_id))
+ .WillOnce(Return(connection_key));
+
+ EXPECT_CALL(session_observer_mock, GetSSLContext(connection_key, kRpc))
+ .WillOnce(ReturnNull());
+#endif // ENABLE_SECURITY
+
+ protocol_handler_impl->SendStartSessionAck(connection_id,
+ session_id,
+ input_protocol_version,
+ hash_id,
+ protocol_handler::SERVICE_TYPE_RPC,
+ false /* protection */,
+ full_version);
+
+ EXPECT_TRUE(waiter.WaitFor(times, kAsyncExpectationsTimeout));
+}
+
+TEST_F(ProtocolHandlerImplTest, StartSessionAck_PrimaryTransportUSBHostMode) {
+ // config allows secondary transport only when connected through Bluetooth,
+ // and the secondary is Wi-Fi
+ std::vector<std::string> secondary_transports_for_usb;
+ secondary_transports_for_usb.push_back("WiFi");
+ std::vector<std::string> secondary_transports_for_bluetooth; // empty
+ std::vector<std::string> secondary_transports_for_wifi; // empty
+ // config allows video and audio services to run on all transports except
+ // Bluetooth
+ std::vector<std::string> audio_service_transports;
+ audio_service_transports.push_back("IAP_USB_DEVICE_MODE");
+ audio_service_transports.push_back("IAP_CARPLAY");
+ audio_service_transports.push_back("AOA_USB");
+ audio_service_transports.push_back("TCP_WIFI");
+ std::vector<std::string> video_service_transports;
+ video_service_transports.push_back("IAP_USB");
+ video_service_transports.push_back("IAP_CARPLAY");
+ video_service_transports.push_back("AOA_USB");
+ video_service_transports.push_back("TCP_WIFI");
+
+ // assume the device is IOS and is connected through USB Host Mode
+ std::string connection_type_string("IAP_USB_HOST_MODE");
+
+ // Core should specify WiFi for secondary transport, and should allow video
+ // services on both transports, and audio only on secondary transport
+ std::vector<std::string> expected_transport_strings;
+ expected_transport_strings.push_back("TCP_WIFI");
+ std::vector<int32_t> expected_audio_service_transports;
+ expected_audio_service_transports.push_back(2);
+ std::vector<int32_t> expected_video_service_transports;
+ expected_video_service_transports.push_back(1);
+ expected_video_service_transports.push_back(2);
+
+ // A TransportUpdateEvent is also issued after Start Service ACK. We don't
+ // check it in this test case.
+ EXPECT_CALL(session_observer_mock, ProtocolVersionUsed(_, _, _))
+ .WillRepeatedly(Return(false));
+
+ VerifySecondaryTransportParamsInStartSessionAck(
+ true,
+ secondary_transports_for_usb,
+ secondary_transports_for_bluetooth,
+ secondary_transports_for_wifi,
+ audio_service_transports,
+ video_service_transports,
+ connection_type_string,
+ expected_transport_strings,
+ expected_audio_service_transports,
+ expected_video_service_transports);
+}
+
+TEST_F(ProtocolHandlerImplTest,
+ TransportEventUpdate_afterVersionNegotiation_TCPEnabled) {
+ TestAsyncWaiter waiter;
+ uint32_t times = 0;
+
+ const uint8_t input_protocol_version = 5;
+ const uint32_t hash_id = 123456;
+ ProtocolPacket::ProtocolVersion full_version(5, 1, 0);
+
+ const size_t maximum_rpc_payload_size = 1500;
+ EXPECT_CALL(protocol_handler_settings_mock, maximum_rpc_payload_size())
+ .WillRepeatedly(Return(maximum_rpc_payload_size));
+ InitProtocolHandlerImpl(0u, 0u);
+
+ // TCP configuration setup
+ bool tcp_enabled = true;
+ char tcp_address[] = "192.168.1.1";
+ int32_t tcp_port = 12345;
+ std::string tcp_port_str = "12345";
+ protocol_handler_impl->set_tcp_config(
+ tcp_enabled, std::string(tcp_address), tcp_port_str);
+
+ // configuration setup
+ std::vector<std::string> config_secondary_transports_for_usb; // empty
+ std::vector<std::string> config_secondary_transports_for_bluetooth;
+ config_secondary_transports_for_bluetooth.push_back("WiFi");
+ std::vector<std::string> config_secondary_transports_for_wifi; // empty
+ std::vector<std::string> config_audio_service_transports;
+ config_audio_service_transports.push_back("IAP_USB");
+ config_audio_service_transports.push_back("IAP_USB_HOST_MODE");
+ config_audio_service_transports.push_back("IAP_USB_DEVICE_MODE");
+ config_audio_service_transports.push_back("IAP_CARPLAY");
+ config_audio_service_transports.push_back("AOA_USB");
+ config_audio_service_transports.push_back("TCP_WIFI");
+ std::vector<std::string> config_video_service_transports;
+ config_video_service_transports.push_back("IAP_USB");
+ config_video_service_transports.push_back("IAP_USB_HOST_MODE");
+ config_video_service_transports.push_back("IAP_USB_DEVICE_MODE");
+ config_video_service_transports.push_back("IAP_CARPLAY");
+ config_video_service_transports.push_back("AOA_USB");
+ config_video_service_transports.push_back("TCP_WIFI");
+
+ EXPECT_CALL(protocol_handler_settings_mock, max_supported_protocol_version())
+ .WillRepeatedly(Return(PROTOCOL_VERSION_5));
+ EXPECT_CALL(protocol_handler_settings_mock, multiple_transports_enabled())
+ .WillRepeatedly(Return(true));
+ EXPECT_CALL(protocol_handler_settings_mock, secondary_transports_for_usb())
+ .Times(AtLeast(0))
+ .WillRepeatedly(ReturnRef(config_secondary_transports_for_usb));
+ EXPECT_CALL(protocol_handler_settings_mock,
+ secondary_transports_for_bluetooth())
+ .Times(AtLeast(0))
+ .WillRepeatedly(ReturnRef(config_secondary_transports_for_bluetooth));
+ EXPECT_CALL(protocol_handler_settings_mock, secondary_transports_for_wifi())
+ .Times(AtLeast(0))
+ .WillRepeatedly(ReturnRef(config_secondary_transports_for_wifi));
+ EXPECT_CALL(protocol_handler_settings_mock, audio_service_transports())
+ .WillOnce(ReturnRef(config_audio_service_transports));
+ EXPECT_CALL(protocol_handler_settings_mock, video_service_transports())
+ .WillOnce(ReturnRef(config_video_service_transports));
+
+ // assume the device is iOS and is connected through iAP over Bluetooth
+ std::string connection_type_string("IAP_BLUETOOTH");
+
+ EXPECT_CALL(session_observer_mock,
+ TransportTypeProfileStringFromConnHandle(connection_id))
+ .WillRepeatedly(Return(connection_type_string));
+
+ EXPECT_CALL(
+ transport_manager_mock,
+ SendMessageToDevice(ControlMessage(
+ FRAME_DATA_START_SERVICE_ACK, PROTECTION_OFF, connection_id, _)))
+ .WillOnce(DoAll(NotifyTestAsyncWaiter(&waiter), Return(E_SUCCESS)));
+ times++;
+
+ EXPECT_CALL(session_observer_mock, ProtocolVersionUsed(_, _, _))
+ .WillRepeatedly(
+ DoAll(SetArgReferee<2>(PROTOCOL_VERSION_5), Return(true)));
+
+ BsonObject expected_obj;
+ bson_object_initialize_default(&expected_obj);
+ // IP address
+ bson_object_put_string(
+ &expected_obj, protocol_handler::strings::tcp_ip_address, tcp_address);
+ // TCP port number
+ bson_object_put_int32(
+ &expected_obj, protocol_handler::strings::tcp_port, tcp_port);
+
+ std::vector<uint8_t> expected_param =
+ CreateVectorFromBsonObject(&expected_obj);
+
+ bson_object_deinitialize(&expected_obj);
+
+ EXPECT_CALL(
+ transport_manager_mock,
+ SendMessageToDevice(ControlMessage(FRAME_DATA_TRANSPORT_EVENT_UPDATE,
+ PROTECTION_OFF,
+ connection_id,
+ Eq(expected_param))))
+ .WillOnce(DoAll(NotifyTestAsyncWaiter(&waiter), Return(E_SUCCESS)));
+ times++;
+
+#ifdef ENABLE_SECURITY
+ AddSecurityManager();
+
+ EXPECT_CALL(session_observer_mock, KeyFromPair(connection_id, session_id))
+ .WillOnce(Return(connection_key));
+
+ EXPECT_CALL(session_observer_mock, GetSSLContext(connection_key, kRpc))
+ .WillOnce(ReturnNull());
+#endif // ENABLE_SECURITY
+
+ protocol_handler_impl->SendStartSessionAck(connection_id,
+ session_id,
+ input_protocol_version,
+ hash_id,
+ protocol_handler::SERVICE_TYPE_RPC,
+ false /* protection */,
+ full_version);
+
+ EXPECT_TRUE(waiter.WaitFor(times, kAsyncExpectationsTimeout));
+}
+
+TEST_F(ProtocolHandlerImplTest,
+ TransportEventUpdate_afterVersionNegotiation_TCPDisabled) {
+ TestAsyncWaiter waiter;
+ uint32_t times = 0;
+
+ const uint8_t input_protocol_version = 5;
+ const uint32_t hash_id = 123456;
+ ProtocolPacket::ProtocolVersion full_version(5, 1, 0);
+
+ const size_t maximum_rpc_payload_size = 1500;
+ EXPECT_CALL(protocol_handler_settings_mock, maximum_rpc_payload_size())
+ .WillRepeatedly(Return(maximum_rpc_payload_size));
+ InitProtocolHandlerImpl(0u, 0u);
+
+ // TCP configuration setup
+ bool tcp_enabled = false;
+ char tcp_address[] = "192.168.2.3";
+ std::string tcp_port_str = "12345";
+ protocol_handler_impl->set_tcp_config(
+ tcp_enabled, std::string(tcp_address), tcp_port_str);
+
+ std::vector<std::string> config_secondary_transports_for_usb; // empty
+ std::vector<std::string> config_secondary_transports_for_bluetooth;
+ config_secondary_transports_for_bluetooth.push_back("WiFi");
+ std::vector<std::string> config_secondary_transports_for_wifi; // empty
+ std::vector<std::string> config_audio_service_transports;
+ config_audio_service_transports.push_back("IAP_USB");
+ config_audio_service_transports.push_back("IAP_USB_HOST_MODE");
+ config_audio_service_transports.push_back("IAP_USB_DEVICE_MODE");
+ config_audio_service_transports.push_back("IAP_CARPLAY");
+ config_audio_service_transports.push_back("AOA_USB");
+ config_audio_service_transports.push_back("TCP_WIFI");
+ std::vector<std::string> config_video_service_transports;
+ config_video_service_transports.push_back("IAP_USB");
+ config_video_service_transports.push_back("IAP_USB_HOST_MODE");
+ config_video_service_transports.push_back("IAP_USB_DEVICE_MODE");
+ config_video_service_transports.push_back("IAP_CARPLAY");
+ config_video_service_transports.push_back("AOA_USB");
+ config_video_service_transports.push_back("TCP_WIFI");
+
+ EXPECT_CALL(protocol_handler_settings_mock, max_supported_protocol_version())
+ .WillRepeatedly(Return(PROTOCOL_VERSION_5));
+ EXPECT_CALL(protocol_handler_settings_mock, multiple_transports_enabled())
+ .WillRepeatedly(Return(true));
+ EXPECT_CALL(protocol_handler_settings_mock, secondary_transports_for_usb())
+ .Times(AtLeast(0))
+ .WillRepeatedly(ReturnRef(config_secondary_transports_for_usb));
+ EXPECT_CALL(protocol_handler_settings_mock,
+ secondary_transports_for_bluetooth())
+ .Times(AtLeast(0))
+ .WillRepeatedly(ReturnRef(config_secondary_transports_for_bluetooth));
+ EXPECT_CALL(protocol_handler_settings_mock, secondary_transports_for_wifi())
+ .Times(AtLeast(0))
+ .WillRepeatedly(ReturnRef(config_secondary_transports_for_wifi));
+ EXPECT_CALL(protocol_handler_settings_mock, audio_service_transports())
+ .WillOnce(ReturnRef(config_audio_service_transports));
+ EXPECT_CALL(protocol_handler_settings_mock, video_service_transports())
+ .WillOnce(ReturnRef(config_video_service_transports));
+
+ // assume the device is iOS and is connected through iAP over Bluetooth
+ std::string connection_type_string("IAP_BLUETOOTH");
+
+ EXPECT_CALL(session_observer_mock,
+ TransportTypeProfileStringFromConnHandle(connection_id))
+ .WillRepeatedly(Return(connection_type_string));
+
+ EXPECT_CALL(
+ transport_manager_mock,
+ SendMessageToDevice(ControlMessage(
+ FRAME_DATA_START_SERVICE_ACK, PROTECTION_OFF, connection_id, _)))
+ .WillOnce(DoAll(NotifyTestAsyncWaiter(&waiter), Return(E_SUCCESS)));
+ times++;
+
+ EXPECT_CALL(session_observer_mock, ProtocolVersionUsed(_, _, _))
+ .WillRepeatedly(
+ DoAll(SetArgReferee<2>(PROTOCOL_VERSION_5), Return(true)));
+
+ BsonObject expected_obj;
+ bson_object_initialize_default(&expected_obj);
+ // IP address
+ char empty_ip_address[] = "";
+ bson_object_put_string(&expected_obj,
+ protocol_handler::strings::tcp_ip_address,
+ empty_ip_address);
+ // TCP port number should be omitted
+
+ std::vector<uint8_t> expected_param =
+ CreateVectorFromBsonObject(&expected_obj);
+
+ bson_object_deinitialize(&expected_obj);
+
+ EXPECT_CALL(
+ transport_manager_mock,
+ SendMessageToDevice(ControlMessage(FRAME_DATA_TRANSPORT_EVENT_UPDATE,
+ PROTECTION_OFF,
+ connection_id,
+ Eq(expected_param))))
+ .WillOnce(DoAll(NotifyTestAsyncWaiter(&waiter), Return(E_SUCCESS)));
+ times++;
+
+#ifdef ENABLE_SECURITY
+ AddSecurityManager();
+
+ EXPECT_CALL(session_observer_mock, KeyFromPair(connection_id, session_id))
+ .WillOnce(Return(connection_key));
+
+ EXPECT_CALL(session_observer_mock, GetSSLContext(connection_key, kRpc))
+ .WillOnce(ReturnNull());
+#endif // ENABLE_SECURITY
+
+ protocol_handler_impl->SendStartSessionAck(connection_id,
+ session_id,
+ input_protocol_version,
+ hash_id,
+ protocol_handler::SERVICE_TYPE_RPC,
+ false /* protection */,
+ full_version);
+
+ EXPECT_TRUE(waiter.WaitFor(times, kAsyncExpectationsTimeout));
+}
+
+TEST_F(ProtocolHandlerImplTest,
+ OnTransportConfigUpdated_TransportEventUpdate_TCPEnabled) {
+ using connection_handler::SessionConnectionMap;
+ using connection_handler::SessionTransports;
+
+ TestAsyncWaiter waiter;
+ uint32_t times = 0;
+
+ char tcp_address[] = "172.16.2.3";
+ int32_t tcp_port = 23456;
+ std::string tcp_port_str = "23456";
+
+ transport_manager::transport_adapter::TransportConfig configs;
+ configs[transport_manager::transport_adapter::tc_enabled] =
+ std::string("true");
+ configs[transport_manager::transport_adapter::tc_tcp_port] = tcp_port_str;
+ configs[transport_manager::transport_adapter::tc_tcp_ip_address] =
+ std::string(tcp_address);
+
+ transport_manager::ConnectionUID device1_primary_connection_id = 100;
+ transport_manager::ConnectionUID device2_primary_connection_id = 101;
+ transport_manager::ConnectionUID device2_secondary_connection_id = 150;
+
+ SessionTransports st1 = {device1_primary_connection_id, kDisabledSecondary};
+ SessionTransports st2 = {device2_primary_connection_id,
+ device2_secondary_connection_id};
+ session_connection_map_[0x11] = st1;
+ session_connection_map_[0x22] = st2;
+
+ EXPECT_CALL(connection_handler_mock, session_connection_map())
+ .WillOnce(Return(DataAccessor<SessionConnectionMap>(
+ session_connection_map_, session_connection_map_lock_ptr_)));
+
+ EXPECT_CALL(session_observer_mock, ProtocolVersionUsed(_, _, _))
+ .WillRepeatedly(
+ DoAll(SetArgReferee<2>(PROTOCOL_VERSION_5), Return(true)));
+
+ BsonObject expected_obj;
+ bson_object_initialize_default(&expected_obj);
+ // IP address
+ bson_object_put_string(
+ &expected_obj, protocol_handler::strings::tcp_ip_address, tcp_address);
+ // TCP port number
+ bson_object_put_int32(
+ &expected_obj, protocol_handler::strings::tcp_port, tcp_port);
+
+ std::vector<uint8_t> expected_param =
+ CreateVectorFromBsonObject(&expected_obj);
+
+ bson_object_deinitialize(&expected_obj);
+
+ // since device 1 doesn't support secondary transport feature,
+ // TransportEvetUpdate should be delivered only to device 2
+ EXPECT_CALL(
+ transport_manager_mock,
+ SendMessageToDevice(ControlMessage(FRAME_DATA_TRANSPORT_EVENT_UPDATE,
+ PROTECTION_OFF,
+ device2_primary_connection_id,
+ Eq(expected_param))))
+ .WillOnce(DoAll(NotifyTestAsyncWaiter(&waiter), Return(E_SUCCESS)));
+ times++;
+
+ tm_listener->OnTransportConfigUpdated(configs);
+
+ EXPECT_TRUE(waiter.WaitFor(times, kAsyncExpectationsTimeout));
+}
+
+TEST_F(ProtocolHandlerImplTest,
+ OnTransportConfigUpdated_TransportEventUpdate_TCPDisabled) {
+ using connection_handler::SessionConnectionMap;
+ using connection_handler::SessionTransports;
+
+ TestAsyncWaiter waiter;
+ uint32_t times = 0;
+
+ char tcp_address[] = "172.16.2.3";
+ std::string tcp_port_str = "23456";
+
+ transport_manager::transport_adapter::TransportConfig configs;
+ configs[transport_manager::transport_adapter::tc_enabled] =
+ std::string("false");
+ configs[transport_manager::transport_adapter::tc_tcp_port] = tcp_port_str;
+ configs[transport_manager::transport_adapter::tc_tcp_ip_address] =
+ std::string(tcp_address);
+
+ transport_manager::ConnectionUID device1_primary_connection_id = 100;
+ transport_manager::ConnectionUID device1_secondary_connection_id = 150;
+ transport_manager::ConnectionUID device2_primary_connection_id = 101;
+ transport_manager::ConnectionUID device3_primary_connection_id = 102;
+ transport_manager::ConnectionUID device3_secondary_connection_id = 151;
+
+ SessionTransports st1 = {device1_primary_connection_id,
+ device1_secondary_connection_id};
+ SessionTransports st2 = {device2_primary_connection_id, kDisabledSecondary};
+ SessionTransports st3 = {device3_primary_connection_id,
+ device3_secondary_connection_id};
+ session_connection_map_[0x11] = st1;
+ session_connection_map_[0x22] = st2;
+ session_connection_map_[0x33] = st3;
+
+ EXPECT_CALL(connection_handler_mock, session_connection_map())
+ .WillOnce(Return(DataAccessor<SessionConnectionMap>(
+ session_connection_map_, session_connection_map_lock_ptr_)));
+
+ EXPECT_CALL(session_observer_mock, ProtocolVersionUsed(_, _, _))
+ .WillRepeatedly(
+ DoAll(SetArgReferee<2>(PROTOCOL_VERSION_5), Return(true)));
+
+ BsonObject expected_obj;
+ bson_object_initialize_default(&expected_obj);
+ // IP address
+ char empty_ip_address[] = "";
+ bson_object_put_string(&expected_obj,
+ protocol_handler::strings::tcp_ip_address,
+ empty_ip_address);
+ // TCP port number should be omitted
+
+ std::vector<uint8_t> expected_param =
+ CreateVectorFromBsonObject(&expected_obj);
+
+ bson_object_deinitialize(&expected_obj);
+
+ // both device 1 and device 3 should receive TransportEventUpdate frames
+ EXPECT_CALL(
+ transport_manager_mock,
+ SendMessageToDevice(ControlMessage(FRAME_DATA_TRANSPORT_EVENT_UPDATE,
+ PROTECTION_OFF,
+ device1_primary_connection_id,
+ Eq(expected_param))))
+ .WillOnce(DoAll(NotifyTestAsyncWaiter(&waiter), Return(E_SUCCESS)));
+ times++;
+ EXPECT_CALL(
+ transport_manager_mock,
+ SendMessageToDevice(ControlMessage(FRAME_DATA_TRANSPORT_EVENT_UPDATE,
+ PROTECTION_OFF,
+ device3_primary_connection_id,
+ Eq(expected_param))))
+ .WillOnce(DoAll(NotifyTestAsyncWaiter(&waiter), Return(E_SUCCESS)));
+ times++;
+
+ tm_listener->OnTransportConfigUpdated(configs);
+
+ EXPECT_TRUE(waiter.WaitFor(times, kAsyncExpectationsTimeout));
+}
+
+TEST_F(ProtocolHandlerImplTest, RegisterSecondaryTransport_SUCCESS) {
+ AddConnection();
+
+ TestAsyncWaiter waiter;
+ uint32_t times = 0;
+
+ transport_manager::ConnectionUID primary_connection_id = 123;
+
+ EXPECT_CALL(session_observer_mock,
+ ProtocolVersionUsed(primary_connection_id, _, _))
+ .WillRepeatedly(
+ DoAll(SetArgReferee<2>(PROTOCOL_VERSION_5), Return(true)));
+
+ EXPECT_CALL(connection_handler_mock,
+ OnSecondaryTransportStarted(_, connection_id, session_id))
+ .WillOnce(DoAll(SetArgReferee<0>(primary_connection_id), Return(true)));
+
+ EXPECT_CALL(transport_manager_mock,
+ SendMessageToDevice(
+ ControlMessage(FRAME_DATA_REGISTER_SECONDARY_TRANSPORT_ACK,
+ PROTECTION_OFF,
+ connection_id,
+ _)))
+ .WillOnce(DoAll(NotifyTestAsyncWaiter(&waiter), Return(E_SUCCESS)));
+ times++;
+
+ SendControlMessage(PROTECTION_OFF,
+ kControl,
+ session_id,
+ FRAME_DATA_REGISTER_SECONDARY_TRANSPORT,
+ PROTOCOL_VERSION_5);
+
+ EXPECT_TRUE(waiter.WaitFor(times, kAsyncExpectationsTimeout));
+}
+
+TEST_F(ProtocolHandlerImplTest, RegisterSecondaryTransport_FAILURE) {
+ AddConnection();
+
+ TestAsyncWaiter waiter;
+ uint32_t times = 0;
+
+ transport_manager::ConnectionUID primary_connection_id = 123;
+
+ EXPECT_CALL(session_observer_mock,
+ ProtocolVersionUsed(primary_connection_id, _, _))
+ .WillRepeatedly(
+ DoAll(SetArgReferee<2>(PROTOCOL_VERSION_5), Return(true)));
+
+ // check the behavior when OnSecondaryTransportStarted() returns false
+ EXPECT_CALL(connection_handler_mock,
+ OnSecondaryTransportStarted(_, connection_id, session_id))
+ .WillOnce(DoAll(SetArgReferee<0>(primary_connection_id), Return(false)));
+
+ EXPECT_CALL(transport_manager_mock,
+ SendMessageToDevice(
+ ControlMessage(FRAME_DATA_REGISTER_SECONDARY_TRANSPORT_NACK,
+ PROTECTION_OFF,
+ connection_id,
+ _)))
+ .WillOnce(DoAll(NotifyTestAsyncWaiter(&waiter), Return(E_SUCCESS)));
+ times++;
+
+ SendControlMessage(PROTECTION_OFF,
+ kControl,
+ session_id,
+ FRAME_DATA_REGISTER_SECONDARY_TRANSPORT,
+ PROTOCOL_VERSION_5);
+
+ EXPECT_TRUE(waiter.WaitFor(times, kAsyncExpectationsTimeout));
+}
+
TEST_F(ProtocolHandlerImplTest, DISABLED_FloodVerification) {
const size_t period_msec = 10000;
const size_t max_messages = 1000;
@@ -1955,7 +3152,8 @@ TEST_F(ProtocolHandlerImplTest,
times++;
// Act
- protocol_handler_impl->SendEndService(connection_id, session_id, kControl);
+ protocol_handler_impl->SendEndService(
+ connection_id, connection_id, session_id, kControl);
EXPECT_TRUE(waiter->WaitFor(times, kAsyncExpectationsTimeout));
}
diff --git a/src/components/protocol_handler/test/protocol_header_validator_test.cc b/src/components/protocol_handler/test/protocol_header_validator_test.cc
index e42ba96251..5554bfd280 100644
--- a/src/components/protocol_handler/test/protocol_header_validator_test.cc
+++ b/src/components/protocol_handler/test/protocol_header_validator_test.cc
@@ -230,12 +230,12 @@ TEST_F(ProtocolHeaderValidatorTest, Malformed_FrameType) {
}
}
-// For Control frames Frame info value shall be from 0x00 to 0x06 or 0xFE(Data
-// Ack), 0xFF(HB Ack)
+// For Control frames Frame info value shall be from 0x00 to 0x09 or 0xFD
+// (Transport Update Event), 0xFE(Data Ack), 0xFF(HB Ack)
TEST_F(ProtocolHeaderValidatorTest, Malformed_ControlFrame) {
std::vector<uint8_t> malformed_frame_data;
- for (uint8_t frame_type = FRAME_DATA_END_SERVICE_NACK + 1;
- frame_type < FRAME_DATA_SERVICE_DATA_ACK;
+ for (uint8_t frame_type = FRAME_DATA_REGISTER_SECONDARY_TRANSPORT_NACK + 1;
+ frame_type < FRAME_DATA_TRANSPORT_EVENT_UPDATE;
++frame_type) {
malformed_frame_data.push_back(frame_type);
}
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 33f596f7d4..0000000000
--- a/src/components/remote_control/test/include/mock_application.h
+++ /dev/null
@@ -1,355 +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(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());
- 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_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_CONST_METHOD0(IsVideoApplication, 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_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,
- 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_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));
- 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/rpc_base/include/rpc_base/rpc_base.h b/src/components/rpc_base/include/rpc_base/rpc_base.h
index 6792f47732..10b494465c 100644
--- a/src/components/rpc_base/include/rpc_base/rpc_base.h
+++ b/src/components/rpc_base/include/rpc_base/rpc_base.h
@@ -42,11 +42,6 @@ namespace Json {
class Value;
} // namespace Json
-namespace dbus {
-class MessageReader;
-class MessageWriter;
-} // namespace dbus
-
namespace rpc {
class ValidationReport;
@@ -173,12 +168,10 @@ class Boolean : public PrimitiveType {
Boolean();
explicit Boolean(bool value);
explicit Boolean(const Json::Value* value);
- explicit Boolean(dbus::MessageReader* reader);
Boolean(const Json::Value* value, bool def_value);
Boolean& operator=(bool new_val);
operator bool() const;
Json::Value ToJsonValue() const;
- void ToDbusWriter(dbus::MessageWriter* writer) const;
private:
// Fields
@@ -197,7 +190,6 @@ class Integer : public PrimitiveType {
explicit Integer(IntType value);
Integer(const Integer& value);
explicit Integer(const Json::Value* value);
- explicit Integer(dbus::MessageReader* reader);
Integer(const Json::Value* value, IntType def_value);
Integer& operator=(IntType new_val);
Integer& operator=(const Integer& new_val);
@@ -205,7 +197,6 @@ class Integer : public PrimitiveType {
Integer& operator+=(int value);
operator IntType() const;
Json::Value ToJsonValue() const;
- void ToDbusWriter(dbus::MessageWriter* writer) const;
private:
IntType value_;
@@ -219,12 +210,10 @@ class Float : public PrimitiveType {
Float();
explicit Float(double value);
explicit Float(const Json::Value* value);
- explicit Float(dbus::MessageReader* reader);
Float(const Json::Value* value, double def_value);
Float& operator=(double new_val);
operator double() const;
Json::Value ToJsonValue() const;
- void ToDbusWriter(dbus::MessageWriter* writer) const;
private:
double value_;
@@ -239,7 +228,6 @@ class String : public PrimitiveType {
explicit String(const std::string& value);
explicit String(const char* value);
explicit String(const Json::Value* value);
- explicit String(dbus::MessageReader* reader);
String(const Json::Value* value, const std::string& def_value);
bool operator<(const String& new_val) const;
String& operator=(const std::string& new_val);
@@ -247,7 +235,6 @@ class String : public PrimitiveType {
bool operator==(const String& rhs) const;
operator const std::string&() const;
Json::Value ToJsonValue() const;
- void ToDbusWriter(dbus::MessageWriter* writer) const;
private:
std::string value_;
@@ -265,12 +252,10 @@ class Enum : public PrimitiveType {
Enum();
explicit Enum(EnumType value);
explicit Enum(const Json::Value* value);
- explicit Enum(dbus::MessageReader* reader);
Enum(const Json::Value* value, EnumType def_value);
Enum& operator=(const EnumType& new_val);
operator EnumType() const;
Json::Value ToJsonValue() const;
- void ToDbusWriter(dbus::MessageWriter* writer) const;
private:
// Fields
@@ -289,7 +274,6 @@ class Array : public std::vector<T>, public CompositeType {
// Need const and non-const versions to beat all-type accepting constructor
explicit Array(Json::Value* value);
explicit Array(const Json::Value* value);
- explicit Array(dbus::MessageReader* reader);
template <typename U>
explicit Array(const U& value);
template <typename U>
@@ -298,7 +282,6 @@ class Array : public std::vector<T>, public CompositeType {
template <typename U>
void push_back(const U& value);
Json::Value ToJsonValue() const;
- void ToDbusWriter(dbus::MessageWriter* writer) const;
virtual bool is_valid() const;
bool is_initialized() const;
@@ -320,7 +303,6 @@ class Map : public std::map<std::string, T>, public CompositeType {
// Need const and non-const versions to beat all-type accepting constructor
explicit Map(Json::Value* value);
explicit Map(const Json::Value* value);
- explicit Map(dbus::MessageReader* reader);
template <typename U>
explicit Map(const U& value);
template <typename U>
@@ -329,7 +311,6 @@ class Map : public std::map<std::string, T>, public CompositeType {
template <typename U>
void insert(const std::pair<std::string, U>& value);
Json::Value ToJsonValue() const;
- void ToDbusWriter(dbus::MessageWriter* writer) const;
bool is_valid() const;
bool is_initialized() const;
@@ -343,7 +324,6 @@ class Nullable : public T {
public:
// Methods
Nullable();
- explicit Nullable(dbus::MessageReader* reader);
// Need const and non-const versions to beat all-type accepting constructor
explicit Nullable(Json::Value* value);
explicit Nullable(const Json::Value* value);
@@ -370,7 +350,6 @@ class Stringifyable : public T {
public:
// Methods
Stringifyable();
- explicit Stringifyable(dbus::MessageReader* reader);
// Need const and non-const versions to beat all-type accepting constructor
explicit Stringifyable(Json::Value* value);
explicit Stringifyable(const Json::Value* value);
@@ -398,15 +377,12 @@ class Optional {
public:
// Methods
Optional();
- explicit Optional(dbus::MessageReader* reader);
template <typename U>
explicit Optional(const U& value);
template <typename U>
Optional(const Json::Value* value, const U& def_value);
Json::Value ToJsonValue() const;
- void ToDbusWriter(dbus::MessageWriter* writer) const;
-
// Pointer semantics
T& operator*();
const T& operator*() const;
diff --git a/src/components/rpc_base/include/rpc_base/rpc_base_dbus_inl.h b/src/components/rpc_base/include/rpc_base/rpc_base_dbus_inl.h
deleted file mode 100644
index aae1a34ac2..0000000000
--- a/src/components/rpc_base/include/rpc_base/rpc_base_dbus_inl.h
+++ /dev/null
@@ -1,501 +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_RPC_BASE_INCLUDE_RPC_BASE_RPC_BASE_DBUS_INL_H_
-#define SRC_COMPONENTS_RPC_BASE_INCLUDE_RPC_BASE_RPC_BASE_DBUS_INL_H_
-
-#include "dbus/dbus_message.h"
-#include "json/value.h"
-#include "rpc_base/rpc_base.h"
-
-namespace rpc {
-
-// static
-inline PrimitiveType::ValueState PrimitiveType::InitHelper(bool is_next) {
- return is_next ? kValid : kInvalid;
-}
-
-// static
-inline CompositeType::InitializationState CompositeType::InitHelper(
- bool is_next) {
- return is_next ? kInitialized : kUninitialized;
-}
-
-namespace impl {
-
-// Helper functions to statically map int types to appropriate
-// MessageReader functions
-
-// Non-specialized versions doesn't have implementation
-
-// Tells if next element of reader is of type T
-template <typename T>
-inline bool NextIs(const dbus::MessageReader& reader);
-// Takes next element of type T from reader
-template <typename T>
-inline T Take(dbus::MessageReader* reader);
-
-template <>
-inline bool NextIs<int8_t>(const dbus::MessageReader& reader) {
- return reader.NextIsByte();
-}
-
-template <>
-inline int8_t Take<int8_t>(dbus::MessageReader* reader) {
- return static_cast<int8_t>(reader->TakeByte());
-}
-
-inline void Put(int8_t val, dbus::MessageWriter* writer) {
- writer->PutByte(static_cast<uint8_t>(val));
-}
-
-template <>
-inline bool NextIs<uint8_t>(const dbus::MessageReader& reader) {
- return reader.NextIsByte();
-}
-
-template <>
-inline uint8_t Take<uint8_t>(dbus::MessageReader* reader) {
- return reader->TakeByte();
-}
-
-inline void Put(uint8_t val, dbus::MessageWriter* writer) {
- writer->PutByte(val);
-}
-
-template <>
-inline bool NextIs<int16_t>(const dbus::MessageReader& reader) {
- return reader.NextIsInt16();
-}
-
-template <>
-inline int16_t Take<int16_t>(dbus::MessageReader* reader) {
- return reader->TakeInt16();
-}
-
-inline void Put(int16_t val, dbus::MessageWriter* writer) {
- writer->PutInt16(val);
-}
-
-template <>
-inline bool NextIs<uint16_t>(const dbus::MessageReader& reader) {
- return reader.NextIsUint16();
-}
-
-template <>
-inline uint16_t Take<uint16_t>(dbus::MessageReader* reader) {
- return reader->TakeUint16();
-}
-
-inline void Put(uint16_t val, dbus::MessageWriter* writer) {
- writer->PutUint16(val);
-}
-
-template <>
-inline bool NextIs<int32_t>(const dbus::MessageReader& reader) {
- return reader.NextIsInt32();
-}
-
-template <>
-inline int32_t Take<int32_t>(dbus::MessageReader* reader) {
- return reader->TakeInt32();
-}
-
-inline void Put(int32_t val, dbus::MessageWriter* writer) {
- writer->PutInt32(val);
-}
-
-template <>
-inline bool NextIs<uint32_t>(const dbus::MessageReader& reader) {
- return reader.NextIsUint32();
-}
-
-template <>
-inline uint32_t Take<uint32_t>(dbus::MessageReader* reader) {
- return reader->TakeUint32();
-}
-
-inline void Put(uint32_t val, dbus::MessageWriter* writer) {
- writer->PutUint32(val);
-}
-
-template <>
-inline bool NextIs<int64_t>(const dbus::MessageReader& reader) {
- return reader.NextIsInt64();
-}
-
-template <>
-inline int64_t Take<int64_t>(dbus::MessageReader* reader) {
- return reader->TakeInt64();
-}
-
-inline void Put(int64_t val, dbus::MessageWriter* writer) {
- writer->PutInt64(val);
-}
-
-template <>
-inline bool NextIs<uint64_t>(const dbus::MessageReader& reader) {
- return reader.NextIsUint64();
-}
-
-template <>
-inline uint64_t Take<uint64_t>(dbus::MessageReader* reader) {
- return reader->TakeUint64();
-}
-
-inline void Put(uint64_t val, dbus::MessageWriter* writer) {
- writer->PutUint64(val);
-}
-
-template <>
-inline std::string Take<std::string>(dbus::MessageReader* reader) {
- return reader->TakeString();
-}
-
-inline void Put(const std::string val, dbus::MessageWriter* writer) {
- writer->PutString(val);
-}
-
-// Type to DBus type id mappers
-template <typename T>
-char DbusTypeCode();
-template <>
-inline char DbusTypeCode<bool>() {
- return DBUS_TYPE_BOOLEAN;
-}
-// There is no dbus type for signed byte, map to unsigned
-template <>
-inline char DbusTypeCode<int8_t>() {
- return DBUS_TYPE_BYTE;
-}
-template <>
-inline char DbusTypeCode<uint8_t>() {
- return DBUS_TYPE_BYTE;
-}
-template <>
-inline char DbusTypeCode<int16_t>() {
- return DBUS_TYPE_INT16;
-}
-template <>
-inline char DbusTypeCode<uint16_t>() {
- return DBUS_TYPE_UINT16;
-}
-template <>
-inline char DbusTypeCode<int32_t>() {
- return DBUS_TYPE_INT32;
-}
-template <>
-inline char DbusTypeCode<uint32_t>() {
- return DBUS_TYPE_UINT32;
-}
-template <>
-inline char DbusTypeCode<int64_t>() {
- return DBUS_TYPE_INT64;
-}
-template <>
-inline char DbusTypeCode<uint64_t>() {
- return DBUS_TYPE_UINT64;
-}
-template <>
-inline char DbusTypeCode<double>() {
- return DBUS_TYPE_DOUBLE;
-}
-template <>
-inline char DbusTypeCode<std::string>() {
- return DBUS_TYPE_STRING;
-}
-template <>
-inline char DbusTypeCode<const std::string>() {
- return DBUS_TYPE_STRING;
-}
-
-// Non-specialized template supposes there is static
-// void GetDbusSignature(std::string*) method in T
-template <typename T>
-struct DbusSignatureHelper {
- static void DbusSignature(std::string* signature) {
- T::GetDbusSignature(signature);
- }
-};
-
-template <>
-struct DbusSignatureHelper<Boolean> {
- static void DbusSignature(std::string* signature) {
- (*signature) += rpc::impl::DbusTypeCode<bool>();
- }
-};
-
-template <typename T, T minval, T maxval>
-struct DbusSignatureHelper<Integer<T, minval, maxval> > {
- static void DbusSignature(std::string* signature) {
- (*signature) += rpc::impl::DbusTypeCode<T>();
- }
-};
-
-template <int64_t minnum, int64_t maxnum, int64_t minden, int64_t maxden>
-struct DbusSignatureHelper<Float<minnum, maxnum, minden, maxden> > {
- static void DbusSignature(std::string* signature) {
- (*signature) += rpc::impl::DbusTypeCode<double>();
- }
-};
-
-template <typename T>
-struct DbusSignatureHelper<Enum<T> > {
- static void DbusSignature(std::string* signature) {
- (*signature) += rpc::impl::DbusTypeCode<int32_t>();
- }
-};
-
-template <size_t minlen, size_t maxlen>
-struct DbusSignatureHelper<String<minlen, maxlen> > {
- static void DbusSignature(std::string* signature) {
- (*signature) += rpc::impl::DbusTypeCode<std::string>();
- }
-};
-
-template <typename K, typename V>
-struct DbusSignatureHelper<std::pair<K, V> > {
- static void DbusSignature(std::string* signature) {
- (*signature) += DBUS_DICT_ENTRY_BEGIN_CHAR;
- (*signature) += rpc::impl::DbusTypeCode<K>();
- rpc::impl::DbusSignatureHelper<V>::DbusSignature(signature);
- (*signature) += DBUS_DICT_ENTRY_END_CHAR;
- }
-};
-
-template <typename T, size_t minsize, size_t maxsize>
-struct DbusSignatureHelper<Array<T, minsize, maxsize> > {
- static void DbusSignature(std::string* signature) {
- (*signature) += DBUS_TYPE_ARRAY;
- rpc::impl::DbusSignatureHelper<T>::DbusSignature(signature);
- }
-};
-
-template <typename T, size_t minsize, size_t maxsize>
-struct DbusSignatureHelper<Map<T, minsize, maxsize> > {
- static void DbusSignature(std::string* signature) {
- (*signature) += DBUS_TYPE_ARRAY;
- rpc::impl::DbusSignatureHelper<typename Map<T, minsize, maxsize>::
- value_type>::DbusSignature(signature);
- }
-};
-
-template <typename T>
-struct DbusSignatureHelper<Optional<T> > {
- static void DbusSignature(std::string* signature) {
- (*signature) += DBUS_STRUCT_BEGIN_CHAR;
- (*signature) += rpc::impl::DbusTypeCode<bool>();
- rpc::impl::DbusSignatureHelper<T>::DbusSignature(signature);
- (*signature) += DBUS_STRUCT_END_CHAR;
- }
-};
-
-template <typename T>
-struct DbusSignatureHelper<Nullable<T> > {
- static void DbusSignature(std::string* signature) {
- (*signature) += DBUS_STRUCT_BEGIN_CHAR;
- (*signature) += rpc::impl::DbusTypeCode<bool>();
- rpc::impl::DbusSignatureHelper<T>::DbusSignature(signature);
- (*signature) += DBUS_STRUCT_END_CHAR;
- }
-};
-
-// Helper Optional type initialization functipon
-template <typename T>
-T TakeOptional(dbus::MessageReader* reader) {
- dbus::MessageReader struct_reader = reader->TakeStructReader();
- bool available = struct_reader.TakeBool();
- T value(&struct_reader);
- return available ? value : T();
-}
-
-// Helper Nullable type initialization functipon
-template <typename T>
-bool TakeNullable(dbus::MessageReader* reader) {
- dbus::MessageReader struct_reader = reader->TakeStructReader();
- bool is_null = struct_reader.TakeBool();
- return is_null;
-}
-
-} // namespace impl
-
-// Helper function that outputs dbus signature for type T
-template <typename T>
-void DbusSignature(std::string* signature) {
- impl::DbusSignatureHelper<T>::DbusSignature(signature);
-}
-
-// Type constructors
-inline Boolean::Boolean(dbus::MessageReader* reader)
- : PrimitiveType(InitHelper(reader->NextIsBool()))
- , value_(reader->TakeBool()) {}
-
-template <typename T, T minval, T maxval>
-inline Integer<T, minval, maxval>::Integer(dbus::MessageReader* reader)
- : PrimitiveType(InitHelper(impl::NextIs<IntType>(*reader)))
- , value_(impl::Take<IntType>(reader)) {
- if (is_valid()) {
- value_state_ = range_.Includes(value_) ? kValid : kInvalid;
- }
-}
-
-template <int64_t minnum, int64_t maxnum, int64_t minden, int64_t maxden>
-inline Float<minnum, maxnum, minden, maxden>::Float(dbus::MessageReader* reader)
- : PrimitiveType(InitHelper(reader->NextIsDouble()))
- , value_(reader->TakeDouble()) {
- if (is_valid()) {
- value_state_ = range_.Includes(value_) ? kValid : kInvalid;
- }
-}
-
-template <size_t minlen, size_t maxlen>
-inline String<minlen, maxlen>::String(dbus::MessageReader* reader)
- : PrimitiveType(InitHelper(reader->NextIsString()))
- , value_(reader->TakeString()) {
- if (is_valid()) {
- value_state_ = length_range_.Includes(value_.length()) ? kValid : kInvalid;
- }
-}
-
-template <typename T>
-inline Enum<T>::Enum(dbus::MessageReader* reader)
- : PrimitiveType(InitHelper(reader->NextIsInt32()))
- , value_(EnumType(reader->TakeInt32())) {
- if (is_valid()) {
- value_state_ = IsValidEnum(value_) ? kValid : kInvalid;
- }
-}
-
-template <typename T, size_t minsize, size_t maxsize>
-inline Array<T, minsize, maxsize>::Array(dbus::MessageReader* reader)
- : CompositeType(InitHelper(reader->NextIsArray())) {
- dbus::MessageReader array_reader = reader->TakeArrayReader();
- if (array_reader.has_failed()) {
- push_back(T());
- } else {
- while (array_reader.HasNext()) {
- push_back(T(&array_reader));
- }
- }
-}
-
-template <typename T, size_t minsize, size_t maxsize>
-inline Map<T, minsize, maxsize>::Map(dbus::MessageReader* reader)
- : CompositeType(InitHelper(reader->NextIsStruct())) {
- // Map key-value pairs are serialized into array
- dbus::MessageReader array_reader = reader->TakeArrayReader();
- if (array_reader.has_failed()) {
- this->insert(typename MapType::value_type("", T()));
- } else {
- while (array_reader.HasNext()) {
- dbus::MessageReader dictvalue_reader = array_reader.TakeDictEntryReader();
- typename MapType::key_type key =
- impl::Take<typename MapType::key_type>(&dictvalue_reader);
- this->insert(typename MapType::value_type(key, T(&dictvalue_reader)));
- }
- }
-}
-
-template <typename T>
-inline Nullable<T>::Nullable(dbus::MessageReader* reader)
- : T(reader), marked_null_(impl::TakeNullable<T>(reader)) {}
-
-template <typename T>
-inline Optional<T>::Optional(dbus::MessageReader* reader)
- : value_(impl::TakeOptional<T>(reader)) {}
-
-// MessageWriter serializers
-inline void Boolean::ToDbusWriter(dbus::MessageWriter* writer) const {
- writer->PutBool(value_);
-}
-
-template <typename T, T minval, T maxval>
-inline void Integer<T, minval, maxval>::ToDbusWriter(
- dbus::MessageWriter* writer) const {
- impl::Put(value_, writer);
-}
-
-template <int64_t minnum, int64_t maxnum, int64_t minden, int64_t maxden>
-inline void Float<minnum, maxnum, minden, maxden>::ToDbusWriter(
- dbus::MessageWriter* writer) const {
- writer->PutDouble(value_);
-}
-
-template <size_t minlen, size_t maxlen>
-inline void String<minlen, maxlen>::ToDbusWriter(
- dbus::MessageWriter* writer) const {
- writer->PutString(value_);
-}
-
-template <typename T>
-inline void Enum<T>::ToDbusWriter(dbus::MessageWriter* writer) const {
- writer->PutInt32(static_cast<int32_t>(value_));
-}
-
-template <typename T, size_t minsize, size_t maxsize>
-inline void Array<T, minsize, maxsize>::ToDbusWriter(
- dbus::MessageWriter* writer) const {
- std::string array_signature;
- DbusSignature<typename ArrayType::value_type>(&array_signature);
- dbus::MessageWriter array_writer(
- writer, dbus::kArray, array_signature.c_str());
- for (typename ArrayType::const_iterator i = this->begin(); i != this->end();
- ++i) {
- i->ToDbusWriter(&array_writer);
- }
-}
-
-template <typename T, size_t minsize, size_t maxsize>
-inline void Map<T, minsize, maxsize>::ToDbusWriter(
- dbus::MessageWriter* writer) const {
- std::string array_signature;
- DbusSignature<typename MapType::value_type>(&array_signature);
- dbus::MessageWriter array_writer(
- writer, dbus::kArray, array_signature.c_str());
- for (typename MapType::const_iterator i = this->begin(); i != this->end();
- ++i) {
- dbus::MessageWriter dictentry_writer(&array_writer, dbus::kDictEntry, NULL);
- impl::Put(i->first, &dictentry_writer);
- i->second.ToDbusWriter(&dictentry_writer);
- }
-}
-
-template <typename T>
-inline void Optional<T>::ToDbusWriter(dbus::MessageWriter* writer) const {
- dbus::MessageWriter struct_writer(writer, dbus::kStruct, NULL);
- struct_writer.PutBool(value_.is_initialized());
- value_.ToDbusWriter(&struct_writer);
-}
-
-} // namespace rpc
-
-#endif // SRC_COMPONENTS_RPC_BASE_INCLUDE_RPC_BASE_RPC_BASE_DBUS_INL_H_
diff --git a/src/components/rpc_base/test/CMakeLists.txt b/src/components/rpc_base/test/CMakeLists.txt
index ca4f41fe76..ae87bb71b7 100644
--- a/src/components/rpc_base/test/CMakeLists.txt
+++ b/src/components/rpc_base/test/CMakeLists.txt
@@ -31,8 +31,6 @@
include(${CMAKE_SOURCE_DIR}/tools/cmake/helpers/sources.cmake)
include_directories(
- ${COMPONENTS_DIR}/dbus/include
- ${COMPONENTS_DIR}/dbus/src
${COMPONENTS_DIR}/rpc_base/include
${GMOCK_INCLUDE_DIRECTORY}
${JSONCPP_INCLUDE_DIRECTORY}
@@ -43,16 +41,5 @@ set(LIBRARIES
jsoncpp
)
-if(${HMI_DBUS_API})
- include_directories(${DBUS_INCLUDE_DIRS})
- list(APPEND LIBRARIES
- DBus
- )
-else()
- set(EXCLUDE_PATHS
- rpc_base_dbus_test.cc
- )
-endif()
-
collect_sources(SOURCES "${CMAKE_CURRENT_SOURCE_DIR}" "${EXCLUDE_PATHS}")
create_test(rpc_base_test "${SOURCES}" "${LIBRARIES}")
diff --git a/src/components/rpc_base/test/rpc_base_dbus_test.cc b/src/components/rpc_base/test/rpc_base_dbus_test.cc
deleted file mode 100644
index 4a22e111a3..0000000000
--- a/src/components/rpc_base/test/rpc_base_dbus_test.cc
+++ /dev/null
@@ -1,682 +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 "gtest/gtest.h"
-#include "dbus/dbus_message.h"
-#include "rpc_base/rpc_base.h"
-#include "rpc_base/rpc_base_dbus_inl.h"
-
-namespace test {
-namespace components {
-namespace rpc_base_test {
-
-using namespace rpc;
-using namespace dbus;
-
-enum TestEnum { kValue0, kValue1, kInvalidValue };
-
-bool IsValidEnum(TestEnum val) {
- return val == kValue0 || val == kValue1;
-}
-
-bool EnumFromJsonString(const std::string& value, TestEnum* enm) {
- if (value == "kValue0") {
- *enm = kValue0;
- return true;
- } else if (value == "kValue1") {
- *enm = kValue1;
- return true;
- } else {
- return false;
- }
-}
-
-const char* EnumToJsonString(TestEnum enm) {
- switch (enm) {
- case kValue0:
- return "kValue0";
- case kValue1:
- return "kValue1";
- default:
- return "UNKNOWN";
- }
-}
-
-struct DbusDeserialization : public testing::Test {
- dbus::MessageRef msgref;
- DbusDeserialization()
- : msgref(dbus_message_new(DBUS_MESSAGE_TYPE_METHOD_CALL)) {}
-};
-
-TEST_F(DbusDeserialization, DeserializeBool) {
- {
- dbus::MessageWriter writer(msgref);
- writer.PutBool(true);
- }
- {
- dbus::MessageReader reader(msgref);
- Boolean booln(&reader);
- ASSERT_TRUE(booln);
- }
-}
-
-TEST_F(DbusDeserialization, DeserializeByte) {
- {
- dbus::MessageWriter writer(msgref);
- writer.PutByte(200);
- }
- {
- dbus::MessageReader reader(msgref);
- Integer<uint8_t, 1, 220> byte(&reader);
- ASSERT_TRUE(byte.is_initialized());
- ASSERT_TRUE(byte.is_valid());
- ASSERT_EQ(byte, 200);
- ASSERT_FALSE(reader.has_failed());
- ASSERT_FALSE(reader.HasNext());
- }
-}
-
-TEST_F(DbusDeserialization, DeserializeInt64) {
- {
- dbus::MessageWriter writer(msgref);
- writer.PutInt64(-1);
- }
- {
- dbus::MessageReader reader(msgref);
- Integer<int64_t, -5, 220> int64(&reader);
- ASSERT_TRUE(int64.is_initialized());
- ASSERT_TRUE(int64.is_valid());
- ASSERT_EQ(int64, -1);
- ASSERT_FALSE(reader.has_failed());
- ASSERT_FALSE(reader.HasNext());
- }
-}
-
-TEST_F(DbusDeserialization, DeserializeFloat) {
- {
- dbus::MessageWriter writer(msgref);
- writer.PutDouble(3.14);
- }
- {
- dbus::MessageReader reader(msgref);
- Float<3, 4> pi(&reader);
- ASSERT_TRUE(pi.is_initialized());
- ASSERT_TRUE(pi.is_valid());
- ASSERT_DOUBLE_EQ(pi, 3.14);
- ASSERT_FALSE(reader.has_failed());
- ASSERT_FALSE(reader.HasNext());
- }
-}
-
-TEST_F(DbusDeserialization, DeserializeString) {
- {
- dbus::MessageWriter writer(msgref);
- writer.PutString("Hello");
- }
- {
- dbus::MessageReader reader(msgref);
- String<3, 10> hello(&reader);
- ASSERT_TRUE(hello.is_initialized());
- ASSERT_TRUE(hello.is_valid());
- ASSERT_EQ(std::string(hello), "Hello");
- ASSERT_FALSE(reader.has_failed());
- ASSERT_FALSE(reader.HasNext());
- }
-}
-
-TEST_F(DbusDeserialization, DeserializeEnum) {
- {
- dbus::MessageWriter writer(msgref);
- writer.PutInt32(kValue1);
- }
- {
- dbus::MessageReader reader(msgref);
- Enum<TestEnum> enm(&reader);
- ASSERT_TRUE(enm.is_initialized());
- ASSERT_TRUE(enm.is_valid());
- ASSERT_EQ(enm, kValue1);
- ASSERT_FALSE(reader.has_failed());
- ASSERT_FALSE(reader.HasNext());
- }
-}
-
-TEST_F(DbusDeserialization, DeserializeArray) {
- {
- dbus::MessageWriter writer(msgref);
- std::string array_signature;
- rpc::DbusSignature<Integer<int32_t, 1, 50> >(&array_signature);
- dbus::MessageWriter array_writer(
- &writer, dbus::kArray, array_signature.c_str());
- array_writer.PutInt32(5);
- array_writer.PutInt32(33);
- }
- {
- dbus::MessageReader reader(msgref);
- Array<Integer<int32_t, 1, 50>, 1, 100> array(&reader);
- ASSERT_TRUE(array.is_initialized());
- ASSERT_TRUE(array.is_valid());
- ASSERT_FALSE(reader.has_failed());
- ASSERT_FALSE(reader.HasNext());
- ASSERT_EQ(array.size(), 2u);
- ASSERT_EQ(array[0], 5);
- ASSERT_EQ(array[1], 33);
- }
-}
-
-TEST_F(DbusDeserialization, DeserializeArrayOfArrays) {
- {
- dbus::MessageWriter writer(msgref);
- std::string array_signature;
- rpc::DbusSignature<Array<Integer<int32_t, 1, 50>, 1, 5> >(&array_signature);
- dbus::MessageWriter array_writer(
- &writer, dbus::kArray, array_signature.c_str());
- int val = 5;
- for (int i = 0; i < 2; ++i) {
- std::string subarray_signature;
- rpc::DbusSignature<Integer<int32_t, 1, 50> >(&subarray_signature);
- dbus::MessageWriter subarray_wirter(
- &array_writer, dbus::kArray, subarray_signature.c_str());
-
- subarray_wirter.PutInt32(val++);
- subarray_wirter.PutInt32(val++);
- }
- }
- {
- dbus::MessageReader reader(msgref);
- Array<Array<Integer<int32_t, 1, 50>, 1, 5>, 1, 5> array(&reader);
- ASSERT_TRUE(array.is_initialized());
- ASSERT_TRUE(array.is_valid());
- ASSERT_FALSE(reader.has_failed());
- ASSERT_FALSE(reader.HasNext());
- ASSERT_EQ(array.size(), 2u);
- ASSERT_EQ(array[0].size(), 2u);
- ASSERT_EQ(array[1].size(), 2u);
- ASSERT_EQ(array[0][0], 5);
- ASSERT_EQ(array[0][1], 6);
- ASSERT_EQ(array[1][0], 7);
- ASSERT_EQ(array[1][1], 8);
- }
-}
-
-TEST_F(DbusDeserialization, DeserializeMap) {
- {
- dbus::MessageWriter writer(msgref);
- std::string dict_signature;
- rpc::DbusSignature<Map<Enum<TestEnum>, 1, 5>::value_type>(&dict_signature);
- dbus::MessageWriter array_writer(
- &writer, dbus::kArray, dict_signature.c_str());
- const char* keys[] = {"Hello", "World"};
- int val = 0;
- for (int i = 0; i < 2; ++i) {
- dbus::MessageWriter dictval_wirter(&array_writer, dbus::kDictEntry, NULL);
- dictval_wirter.PutString(keys[val]);
- dictval_wirter.PutInt32(val++);
- }
- }
- {
- dbus::MessageReader reader(msgref);
- Map<Enum<TestEnum>, 1, 5> amap(&reader);
- ASSERT_TRUE(amap.is_initialized());
- ASSERT_TRUE(amap.is_valid());
- ASSERT_FALSE(reader.has_failed());
- ASSERT_FALSE(reader.HasNext());
- ASSERT_EQ(amap.size(), 2u);
- ASSERT_EQ(amap["Hello"], kValue0);
- ASSERT_EQ(amap["World"], kValue1);
- }
-}
-
-TEST_F(DbusDeserialization, InconsistentTypesTest) {
- {
- dbus::MessageWriter writer(msgref);
- writer.PutString("Hello");
- }
- {
- dbus::MessageReader reader(msgref);
- Boolean badbool(&reader);
- ASSERT_TRUE(badbool.is_initialized());
- ASSERT_FALSE(badbool.is_valid());
- ASSERT_TRUE(reader.has_failed());
- ASSERT_FALSE(reader.HasNext());
- }
-}
-
-TEST_F(DbusDeserialization, DeserializeOptionalString) {
- {
- dbus::MessageWriter writer(msgref);
- dbus::MessageWriter optwriter(&writer, dbus::kStruct, NULL);
- optwriter.PutBool(true);
- optwriter.PutString("Hello dear");
- }
- {
- dbus::MessageReader reader(msgref);
- Optional<String<1, 100> > readback(&reader);
- ASSERT_TRUE(readback.is_initialized());
- ASSERT_TRUE(readback.is_valid());
- ASSERT_EQ(std::string(*readback), "Hello dear");
- ASSERT_FALSE(reader.has_failed());
- ASSERT_FALSE(reader.HasNext());
- }
-}
-
-TEST_F(DbusDeserialization, DeserializeOptionalInt) {
- {
- dbus::MessageWriter writer(msgref);
- dbus::MessageWriter optwriter(&writer, dbus::kStruct, NULL);
- optwriter.PutBool(false);
- optwriter.PutInt32(42);
- }
- {
- dbus::MessageReader reader(msgref);
- Optional<Integer<int32_t, 1, 90> > readback(&reader);
- ASSERT_FALSE(readback.is_initialized());
- ASSERT_TRUE(readback.is_valid());
- ASSERT_FALSE(reader.has_failed());
- ASSERT_FALSE(reader.HasNext());
- }
-}
-
-TEST_F(DbusDeserialization, SerializeDeserializeBool) {
- {
- Boolean true_bool(true);
- dbus::MessageWriter writer(msgref);
- true_bool.ToDbusWriter(&writer);
- }
- {
- dbus::MessageReader reader(msgref);
- Boolean readback(&reader);
- ASSERT_TRUE(readback.is_initialized());
- ASSERT_TRUE(readback.is_valid());
- ASSERT_EQ(readback, true);
- ASSERT_FALSE(reader.has_failed());
- ASSERT_FALSE(reader.HasNext());
- }
-}
-
-TEST_F(DbusDeserialization, SerializeDeserializeInt8t) {
- {
- Integer<int8_t, 1, 100> int8(42);
- dbus::MessageWriter writer(msgref);
- int8.ToDbusWriter(&writer);
- }
- {
- dbus::MessageReader reader(msgref);
- Integer<int8_t, 1, 100> readback(&reader);
- ASSERT_TRUE(readback.is_initialized());
- ASSERT_TRUE(readback.is_valid());
- ASSERT_EQ(readback, 42);
- ASSERT_FALSE(reader.has_failed());
- ASSERT_FALSE(reader.HasNext());
- }
-}
-
-TEST_F(DbusDeserialization, BadSerializeDeserializeInt8t) {
- {
- Integer<int8_t, 1, 12> int8(42);
- dbus::MessageWriter writer(msgref);
- int8.ToDbusWriter(&writer);
- }
- {
- dbus::MessageReader reader(msgref);
- Integer<int8_t, 1, 12> readback(&reader);
- ASSERT_TRUE(readback.is_initialized());
- ASSERT_FALSE(readback.is_valid());
- ASSERT_FALSE(reader.has_failed());
- ASSERT_FALSE(reader.HasNext());
- }
-}
-
-TEST_F(DbusDeserialization, SerializeDeserializeInt64t) {
- {
- Integer<int64_t, 1, 0xFFFFFFFFFF> int64(0xFFFFFFFFF1);
- dbus::MessageWriter writer(msgref);
- int64.ToDbusWriter(&writer);
- }
- {
- dbus::MessageReader reader(msgref);
- Integer<int64_t, 1, 0xFFFFFFFFFF> readback(&reader);
- ASSERT_TRUE(readback.is_initialized());
- ASSERT_TRUE(readback.is_valid());
- ASSERT_EQ(readback, 0xFFFFFFFFF1);
- ASSERT_FALSE(reader.has_failed());
- ASSERT_FALSE(reader.HasNext());
- }
-}
-
-TEST_F(DbusDeserialization, SerializeDeserializeDouble) {
- {
- Float<1, 5> flt(3.14);
- dbus::MessageWriter writer(msgref);
- flt.ToDbusWriter(&writer);
- }
- {
- dbus::MessageReader reader(msgref);
- Float<1, 5> readback(&reader);
- ASSERT_TRUE(readback.is_initialized());
- ASSERT_TRUE(readback.is_valid());
- ASSERT_DOUBLE_EQ(readback, 3.14);
- ASSERT_FALSE(reader.has_failed());
- ASSERT_FALSE(reader.HasNext());
- }
-}
-
-TEST_F(DbusDeserialization, SerializeDeserializeString) {
- {
- String<1, 12> hello("Hello");
- dbus::MessageWriter writer(msgref);
- hello.ToDbusWriter(&writer);
- }
- {
- dbus::MessageReader reader(msgref);
- String<1, 12> readback(&reader);
- ASSERT_TRUE(readback.is_initialized());
- ASSERT_TRUE(readback.is_valid());
- ASSERT_EQ(std::string(readback), "Hello");
- ASSERT_FALSE(reader.has_failed());
- ASSERT_FALSE(reader.HasNext());
- }
-}
-
-TEST_F(DbusDeserialization, SerializeDeserializeEnum) {
- {
- Enum<TestEnum> te(kValue1);
- dbus::MessageWriter writer(msgref);
- te.ToDbusWriter(&writer);
- }
- {
- dbus::MessageReader reader(msgref);
- Enum<TestEnum> readback(&reader);
- ASSERT_TRUE(readback.is_initialized());
- ASSERT_TRUE(readback.is_valid());
- ASSERT_EQ(readback, kValue1);
- ASSERT_FALSE(reader.has_failed());
- ASSERT_FALSE(reader.HasNext());
- }
-}
-
-TEST_F(DbusDeserialization, SerializeDeserializeArray) {
- {
- Array<Integer<int32_t, 1, 100>, 1, 90> ints;
- ints.push_back(42);
- ints.push_back(17);
- dbus::MessageWriter writer(msgref);
- ints.ToDbusWriter(&writer);
- }
- {
- dbus::MessageReader reader(msgref);
- Array<Integer<int32_t, 1, 100>, 1, 90> readback(&reader);
- ASSERT_TRUE(readback.is_initialized());
- ASSERT_TRUE(readback.is_valid());
- ASSERT_EQ(readback[0], 42);
- ASSERT_EQ(readback[1], 17);
- ASSERT_FALSE(reader.has_failed());
- ASSERT_FALSE(reader.HasNext());
- }
-}
-
-TEST_F(DbusDeserialization, SerializeDeserializeMap) {
- {
- Map<Integer<int32_t, 1, 100>, 1, 90> ints;
- ints["first"] = 42;
- ints["second"] = 17;
- dbus::MessageWriter writer(msgref);
- ints.ToDbusWriter(&writer);
- }
- {
- dbus::MessageReader reader(msgref);
- Map<Integer<int32_t, 1, 100>, 1, 90> readback(&reader);
- ASSERT_TRUE(readback.is_initialized());
- ASSERT_TRUE(readback.is_valid());
- ASSERT_EQ(readback["first"], 42);
- ASSERT_EQ(readback["second"], 17);
- ASSERT_FALSE(reader.has_failed());
- ASSERT_FALSE(reader.HasNext());
- }
-}
-
-TEST_F(DbusDeserialization, SerializeDeserializeMapOfArrays) {
- {
- Map<Array<Integer<int32_t, 1, 100>, 1, 5>, 1, 90> ints;
- ints["first"].push_back(1);
- ints["first"].push_back(42);
- ints["second"].push_back(17);
- ints["second"].push_back(3);
- dbus::MessageWriter writer(msgref);
- ints.ToDbusWriter(&writer);
- }
- {
- dbus::MessageReader reader(msgref);
- Map<Array<Integer<int32_t, 1, 100>, 1, 5>, 1, 90> readback(&reader);
- ASSERT_TRUE(readback.is_initialized());
- ASSERT_TRUE(readback.is_valid());
- ASSERT_EQ(readback.size(), 2u);
- ASSERT_EQ(readback["first"].size(), 2u);
- ASSERT_EQ(readback["second"].size(), 2u);
- ASSERT_EQ(readback["first"][0], 1);
- ASSERT_EQ(readback["first"][1], 42);
- ASSERT_EQ(readback["second"][0], 17);
- ASSERT_EQ(readback["second"][1], 3);
- ASSERT_FALSE(reader.has_failed());
- ASSERT_FALSE(reader.HasNext());
- }
-}
-
-TEST(ValidatedTypes, TestBooleanDbusSignature) {
- std::string sign;
- DbusSignature<Boolean>(&sign);
- ASSERT_EQ(sign, "b");
-}
-
-TEST(ValidatedTypes, TestIntDbusSignature) {
- std::string sign;
- DbusSignature<Integer<int32_t, 1, 2> >(&sign);
- ASSERT_EQ(sign, "i");
-}
-
-TEST(ValidatedTypes, TestFloatDbusSignature) {
- std::string sign;
- DbusSignature<Float<1, 2> >(&sign);
- ASSERT_EQ(sign, "d");
-}
-
-TEST(ValidatedTypes, TestStringDbusSignature) {
- std::string sign;
- DbusSignature<String<1, 2> >(&sign);
- ASSERT_EQ(sign, "s");
-}
-
-TEST(ValidatedTypes, TestEnumDbusSignature) {
- std::string sign;
- DbusSignature<Enum<TestEnum> >(&sign);
- ASSERT_EQ(sign, "i");
-}
-
-TEST(ValidatedTypes, TestIntArrayDbusSignature) {
- std::string sign;
- DbusSignature<Array<Integer<int32_t, 1, 2>, 1, 3> >(&sign);
- ASSERT_EQ(sign, "ai");
-}
-
-TEST(ValidatedTypes, TestIntArrayArrayDbusSignature) {
- std::string sign;
- DbusSignature<Array<Array<Integer<int32_t, 1, 2>, 1, 3>, 4, 5> >(&sign);
- ASSERT_EQ(sign, "aai");
-}
-
-TEST(ValidatedTypes, TestMapDbusSignature) {
- std::string sign;
- DbusSignature<Map<Integer<int32_t, 1, 2>, 3, 4> >(&sign);
- ASSERT_EQ(sign, "a{si}");
-}
-
-TEST(ValidatedTypes, TestMandatoryEnumDbusSignature) {
- std::string sign;
- DbusSignature<Enum<TestEnum> >(&sign);
- ASSERT_EQ(sign, "i");
-}
-
-TEST(ValidatedTypes, TestOptionalEnumDbusSignature) {
- std::string sign;
- DbusSignature<Optional<Enum<TestEnum> > >(&sign);
- ASSERT_EQ(sign, "(bi)");
-}
-
-TEST(ValidatedTypes, TestOptionalFloatArrayDbusSignature) {
- std::string sign;
- DbusSignature<Optional<Array<Float<1, 2>, 3, 4> > >(&sign);
- ASSERT_EQ(sign, "(bad)");
-}
-
-TEST(DbusMessageConstructionTest, DbusMessageConstruction) {
- DBusMessage* rawmsg = dbus_message_new(DBUS_MESSAGE_TYPE_METHOD_CALL);
- dbus::MessageRef msgref(rawmsg);
-}
-
-class DbusTest : public testing::Test {
- public:
- dbus::MessageRef msgref;
- DbusTest() : msgref(dbus_message_new(DBUS_MESSAGE_TYPE_METHOD_CALL)) {}
-};
-
-TEST_F(DbusTest, DbusWriterConstructionTest) {
- dbus::MessageWriter writer(msgref);
-}
-
-TEST_F(DbusTest, DbusEmptyMessageReaderTest) {
- dbus::MessageReader reader(msgref);
- ASSERT_TRUE(reader.has_failed());
-}
-
-TEST_F(DbusTest, DbusMessageWriterBoolWriteRead) {
- dbus::MessageWriter writer(msgref);
- writer.PutBool(true);
- dbus::MessageReader reader(msgref);
- bool redback_value = reader.TakeBool();
- ASSERT_FALSE(reader.has_failed());
- ASSERT_TRUE(redback_value);
-}
-
-TEST_F(DbusTest, DbusMessageWriterInt32WriteRead) {
- dbus::MessageWriter writer(msgref);
- writer.PutInt32(42);
- dbus::MessageReader reader(msgref);
- int32_t readback_value = reader.TakeInt32();
- ASSERT_FALSE(reader.has_failed());
- ASSERT_EQ(readback_value, 42);
-}
-
-TEST_F(DbusTest, DbusMessageWriterStringWriteRead) {
- dbus::MessageWriter writer(msgref);
- writer.PutString("Hello DBus!");
- dbus::MessageReader reader(msgref);
- std::string readback_value = reader.TakeString();
- ASSERT_FALSE(reader.has_failed());
- ASSERT_EQ(readback_value, "Hello DBus!");
-}
-
-TEST_F(DbusTest, DbusMultipleParamsReadWrite) {
- {
- dbus::MessageWriter writer(msgref);
- writer.PutString("Hello DBus!");
- writer.PutInt16(42);
- writer.PutDouble(3.14);
- }
- {
- dbus::MessageReader reader(msgref);
- std::string readback_string = reader.TakeString();
- ASSERT_FALSE(reader.has_failed());
- ASSERT_EQ(readback_string, "Hello DBus!");
- int16_t readback_int = reader.TakeInt16();
- ASSERT_FALSE(reader.has_failed());
- ASSERT_EQ(readback_int, 42);
- double readback_double = reader.TakeDouble();
- ASSERT_FALSE(reader.has_failed());
- ASSERT_DOUBLE_EQ(readback_double, 3.14);
- ASSERT_FALSE(reader.HasNext());
- }
-}
-
-TEST_F(DbusTest, DbusArrayTest) {
- {
- dbus::MessageWriter writer(msgref);
- dbus::MessageWriter array_writer(
- &writer, dbus::kArray, DBUS_TYPE_INT16_AS_STRING);
- array_writer.PutInt16(3);
- array_writer.PutInt16(4);
- array_writer.PutInt16(5);
- }
- {
- dbus::MessageReader reader(msgref);
- dbus::MessageReader array_reader = reader.TakeArrayReader();
- int16_t readback_val = array_reader.TakeInt16();
- ASSERT_FALSE(reader.has_failed());
- ASSERT_EQ(readback_val, 3);
- readback_val = array_reader.TakeInt16();
- ASSERT_FALSE(reader.has_failed());
- ASSERT_EQ(readback_val, 4);
- readback_val = array_reader.TakeInt16();
- ASSERT_FALSE(reader.has_failed());
- ASSERT_EQ(readback_val, 5);
- ASSERT_FALSE(array_reader.HasNext());
- }
-}
-
-class DbusFailuresTest : public testing::Test {
- public:
- dbus::MessageRef int_msg;
- DbusFailuresTest()
- : int_msg(dbus_message_new(DBUS_MESSAGE_TYPE_METHOD_CALL)) {
- dbus::MessageWriter writer(int_msg);
- writer.PutInt64(42);
- }
-};
-
-TEST_F(DbusFailuresTest, DbusInconsistentTypeReadFailureTest) {
- dbus::MessageReader reader(int_msg);
- std::string str = reader.TakeString();
- ASSERT_EQ(str, std::string(""));
- ASSERT_TRUE(reader.has_failed());
-}
-
-TEST_F(DbusFailuresTest, DbusNonExistentArrayReadTest) {
- dbus::MessageReader reader(int_msg);
- ASSERT_FALSE(reader.has_failed());
- dbus::MessageReader array_reader = reader.TakeArrayReader();
- ASSERT_TRUE(array_reader.has_failed());
- ASSERT_TRUE(reader.has_failed());
- int64_t val = array_reader.TakeInt64();
- ASSERT_TRUE(array_reader.has_failed());
- ASSERT_EQ(val, 0);
-}
-
-} // namespace rpc_base_test
-} // namespace components
-} // namespace test
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/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/transport_manager/CMakeLists.txt b/src/components/transport_manager/CMakeLists.txt
index 4fa224393d..2f734b3a05 100644
--- a/src/components/transport_manager/CMakeLists.txt
+++ b/src/components/transport_manager/CMakeLists.txt
@@ -43,6 +43,12 @@ include_directories (
${LOG4CXX_INCLUDE_DIRECTORY}
)
+if (CMAKE_SYSTEM_NAME STREQUAL "QNX")
+ include_directories ("${CMAKE_CURRENT_SOURCE_DIR}/include/transport_manager/tcp/platform_specific/qnx")
+elseif (CMAKE_SYSTEM_NAME STREQUAL "Linux")
+ include_directories ("${CMAKE_CURRENT_SOURCE_DIR}/include/transport_manager/tcp/platform_specific/linux")
+endif ()
+
set(PATHS
${CMAKE_CURRENT_SOURCE_DIR}/include
${CMAKE_CURRENT_SOURCE_DIR}/src
@@ -96,8 +102,23 @@ if(NOT BUILD_TESTS)
)
endif()
+# exclude platform-dependent files before running collect_sources
+list(APPEND EXCLUDE_PATHS
+ ${COMPONENTS_DIR}/transport_manager/include/transport_manager/tcp/platform_specific
+ ${COMPONENTS_DIR}/transport_manager/src/tcp/platform_specific
+)
+
collect_sources(SOURCES "${PATHS}" "${EXCLUDE_PATHS}")
+# then add platform-dependent files later
+set(PLATFORM_DEPENDENT_SOURCES)
+if (CMAKE_SYSTEM_NAME STREQUAL "QNX")
+ collect_sources(PLATFORM_DEPENDENT_SOURCES "${COMPONENTS_DIR}/transport_manager/src/tcp/platform_specific/qnx")
+elseif (CMAKE_SYSTEM_NAME STREQUAL "Linux")
+ collect_sources(PLATFORM_DEPENDENT_SOURCES "${COMPONENTS_DIR}/transport_manager/src/tcp/platform_specific/linux")
+endif ()
+list(APPEND SOURCES ${PLATFORM_DEPENDENT_SOURCES})
+
add_library("TransportManager" ${SOURCES})
target_link_libraries("TransportManager" ${LIBRARIES})
diff --git a/src/components/transport_manager/include/transport_manager/tcp/network_interface_listener.h b/src/components/transport_manager/include/transport_manager/tcp/network_interface_listener.h
new file mode 100644
index 0000000000..91ddb3839c
--- /dev/null
+++ b/src/components/transport_manager/include/transport_manager/tcp/network_interface_listener.h
@@ -0,0 +1,73 @@
+/*
+ * Copyright (c) 2018 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_TRANSPORT_MANAGER_INCLUDE_TRANSPORT_MANAGER_TCP_NETWORK_INTERFACE_LISTENER_H_
+#define SRC_COMPONENTS_TRANSPORT_MANAGER_INCLUDE_TRANSPORT_MANAGER_TCP_NETWORK_INTERFACE_LISTENER_H_
+
+namespace transport_manager {
+namespace transport_adapter {
+
+/**
+ * @brief Listener to detect various events on network interfaces
+ */
+class NetworkInterfaceListener {
+ public:
+ /**
+ * @brief Destructor
+ */
+ virtual ~NetworkInterfaceListener() {}
+
+ /**
+ * @brief Initialize this listener
+ */
+ virtual bool Init() = 0;
+
+ /**
+ * @brief Deinitialize this listener
+ */
+ virtual void Deinit() = 0;
+
+ /**
+ * @brief Start this listener
+ */
+ virtual bool Start() = 0;
+
+ /**
+ * @brief Stop this listener
+ */
+ virtual bool Stop() = 0;
+};
+
+} // namespace transport_adapter
+} // namespace transport_manager
+
+#endif // SRC_COMPONENTS_TRANSPORT_MANAGER_INCLUDE_TRANSPORT_MANAGER_TCP_NETWORK_INTERFACE_LISTENER_H_
diff --git a/src/components/transport_manager/include/transport_manager/tcp/network_interface_listener_impl.h b/src/components/transport_manager/include/transport_manager/tcp/network_interface_listener_impl.h
new file mode 100644
index 0000000000..11a9be05ed
--- /dev/null
+++ b/src/components/transport_manager/include/transport_manager/tcp/network_interface_listener_impl.h
@@ -0,0 +1,95 @@
+/*
+ * Copyright (c) 2018 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_TRANSPORT_MANAGER_INCLUDE_TRANSPORT_MANAGER_TCP_NETWORK_INTERFACE_LISTENER_IMPL_H_
+#define SRC_COMPONENTS_TRANSPORT_MANAGER_INCLUDE_TRANSPORT_MANAGER_TCP_NETWORK_INTERFACE_LISTENER_IMPL_H_
+
+#include <string>
+#include <memory>
+
+#include "utils/macro.h"
+#include "transport_manager/tcp/network_interface_listener.h"
+
+namespace transport_manager {
+namespace transport_adapter {
+
+class TcpClientListener;
+
+/**
+ * @brief Listener to detect various events on network interfaces
+ */
+class NetworkInterfaceListenerImpl : public NetworkInterfaceListener {
+ public:
+ /**
+ * @brief Constructor
+ *
+ * @param tcp_client_listener an instance of TcpClientListener which receives
+ * status updates
+ * @param designated_interface if we want to listen only on a specific
+ * network interface, specify its name
+ */
+ NetworkInterfaceListenerImpl(TcpClientListener* tcp_client_listener,
+ const std::string designated_interface);
+
+ /**
+ * @brief Destructor
+ */
+ virtual ~NetworkInterfaceListenerImpl();
+
+ /**
+ * @brief Initialize this listener
+ */
+ bool Init() OVERRIDE;
+
+ /**
+ * @brief Deinitialize this listener
+ */
+ void Deinit() OVERRIDE;
+
+ /**
+ * @brief Start this listener
+ */
+ bool Start() OVERRIDE;
+
+ /**
+ * @brief Stop this listener
+ */
+ bool Stop() OVERRIDE;
+
+ private:
+ std::unique_ptr<NetworkInterfaceListener> platform_specific_impl_;
+};
+
+} // namespace transport_adapter
+} // namespace transport_manager
+
+#endif // SRC_COMPONENTS_TRANSPORT_MANAGER_INCLUDE_TRANSPORT_MANAGER_TCP_NETWORK_INTERFACE_LISTENER_IMPL_H_
diff --git a/src/components/transport_manager/include/transport_manager/tcp/platform_specific/linux/platform_specific_network_interface_listener_impl.h b/src/components/transport_manager/include/transport_manager/tcp/platform_specific/linux/platform_specific_network_interface_listener_impl.h
new file mode 100644
index 0000000000..8a2279003a
--- /dev/null
+++ b/src/components/transport_manager/include/transport_manager/tcp/platform_specific/linux/platform_specific_network_interface_listener_impl.h
@@ -0,0 +1,228 @@
+/*
+ * Copyright (c) 2018 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_TRANSPORT_MANAGER_INCLUDE_TRANSPORT_MANAGER_TCP_PLATFORM_SPECIFIC_LINUX_PLATFORM_SPECIFIC_NETWORK_INTERFACE_LISTENER_H_
+#define SRC_COMPONENTS_TRANSPORT_MANAGER_INCLUDE_TRANSPORT_MANAGER_TCP_PLATFORM_SPECIFIC_LINUX_PLATFORM_SPECIFIC_NETWORK_INTERFACE_LISTENER_H_
+
+#include <map>
+#include <string>
+#include <vector>
+
+#include <netinet/in.h>
+#include "transport_manager/tcp/network_interface_listener.h"
+#include "utils/macro.h"
+#include "utils/threads/thread_delegate.h"
+
+struct ifaddrmsg;
+
+namespace transport_manager {
+namespace transport_adapter {
+
+class TcpClientListener;
+
+/**
+ * @brief Struct to keep network interface's status flags and IP addresses
+ */
+class InterfaceStatus {
+ public:
+ InterfaceStatus() : flags_(0), has_ipv4_(false), has_ipv6_(false) {}
+ ~InterfaceStatus() {}
+
+ bool IsAvailable() const;
+ bool IsLoopback() const;
+ // only for debugging output
+ unsigned int GetFlags() const {
+ return flags_;
+ }
+
+ bool HasIPAddress() const;
+ std::string GetIPv4Address() const;
+ std::string GetIPv6Address() const;
+
+ void SetFlags(unsigned int flags) {
+ flags_ = flags;
+ }
+
+ // specify NULL to remove existing address
+ void SetIPv4Address(struct in_addr* addr);
+ void SetIPv6Address(struct in6_addr* addr);
+
+ private:
+ unsigned int flags_;
+ bool has_ipv4_;
+ bool has_ipv6_;
+ struct in_addr ipv4_address_;
+ struct in6_addr ipv6_address_;
+};
+
+typedef std::map<std::string, InterfaceStatus> InterfaceStatusTable;
+
+/**
+ * @brief Listener to detect various events on network interfaces
+ */
+class PlatformSpecificNetworkInterfaceListener
+ : public NetworkInterfaceListener {
+ public:
+ /**
+ * @brief Constructor
+ *
+ * @param tcp_client_listener an instance of TcpClientListener which receives
+ * status updates
+ * @param designated_interface if we want to listen only on a specific
+ * network interface, specify its name
+ */
+ PlatformSpecificNetworkInterfaceListener(
+ TcpClientListener* tcp_client_listener,
+ const std::string designated_interface = "");
+
+ /**
+ * @brief Destructor
+ */
+ virtual ~PlatformSpecificNetworkInterfaceListener();
+
+ /**
+ * @brief Initialize this listener
+ */
+ bool Init() OVERRIDE;
+
+ /**
+ * @brief Deinitialize this listener
+ */
+ void Deinit() OVERRIDE;
+
+ /**
+ * @brief Start this listener
+ */
+ bool Start() OVERRIDE;
+
+ /**
+ * @brief Stop this listener
+ */
+ bool Stop() OVERRIDE;
+
+#ifdef BUILD_TESTS
+ void SetTesting(bool enabled) {
+ testing_ = enabled;
+ }
+
+ int GetSocket() const {
+ return socket_;
+ }
+
+ threads::Thread* GetThread() const {
+ return thread_;
+ }
+
+ void OverwriteStatusTable(const InterfaceStatusTable dummy_table) {
+ status_table_ = dummy_table;
+ }
+
+ void testCallNotifyIPAddresses() {
+ NotifyIPAddresses();
+ }
+
+ const std::string& GetSelectedInterfaceName() const {
+ return selected_interface_;
+ }
+#endif // BUILD_TESTS
+
+ private:
+ // Struct to hold an event on a network interface.
+ // The event can be either an update on flags or an update on IP address.
+ struct EventParam {
+ unsigned int if_index;
+ unsigned int flags;
+ struct sockaddr_storage address;
+
+ EventParam(int interface_index, unsigned int interface_flags = 0)
+ : if_index(interface_index), flags(interface_flags) {}
+ };
+
+ // parent class which we will notify the events to
+ TcpClientListener* tcp_client_listener_;
+ // if configured, NetworkInterfaceListener will always look into the IP
+ // addresses of this interface
+ const std::string designated_interface_;
+
+ // a map to store status of each interface
+ InterfaceStatusTable status_table_;
+ // this is the name of the interface we are currently focusing on
+ std::string selected_interface_;
+ // previous IP addresses that we have notified
+ std::string notified_ipv4_addr_;
+ std::string notified_ipv6_addr_;
+
+ int socket_;
+ int pipe_fds_[2];
+ threads::Thread* thread_;
+
+#ifdef BUILD_TESTS
+ bool testing_;
+#endif
+
+ void Loop();
+ bool StopLoop();
+
+ // reset status_table_ by fetching current status of each interface
+ bool InitializeStatus();
+ // update status_table_ by applying the events
+ bool UpdateStatus(uint16_t type, std::vector<EventParam>& params);
+ // update notified_ipv4_addr_ and notified_ipv6_addr_ then notify the parent
+ // class of the change if necessary
+ void NotifyIPAddresses();
+ // Select an appropriate network interface that we will get IP addresses. Also
+ // update selected_interface_.
+ const std::string SelectInterface();
+ // convert ifaddrmsg to a list of EventParam structs
+ std::vector<EventParam> ParseIFAddrMessage(struct ifaddrmsg* message,
+ unsigned int size);
+ // for debugging
+ void DumpTable() const;
+
+ class ListenerThreadDelegate : public threads::ThreadDelegate {
+ public:
+ explicit ListenerThreadDelegate(
+ PlatformSpecificNetworkInterfaceListener* parent);
+ virtual void threadMain();
+ void exitThreadMain();
+
+ private:
+ PlatformSpecificNetworkInterfaceListener* parent_;
+ };
+
+ DISALLOW_COPY_AND_ASSIGN(PlatformSpecificNetworkInterfaceListener);
+};
+
+} // namespace transport_adapter
+} // namespace transport_manager
+
+#endif // SRC_COMPONENTS_TRANSPORT_MANAGER_INCLUDE_TRANSPORT_MANAGER_TCP_PLATFORM_SPECIFIC_LINUX_PLATFORM_SPECIFIC_NETWORK_INTERFACE_LISTENER_H_
diff --git a/src/components/transport_manager/include/transport_manager/tcp/platform_specific/qnx/platform_specific_network_interface_listener_impl.h b/src/components/transport_manager/include/transport_manager/tcp/platform_specific/qnx/platform_specific_network_interface_listener_impl.h
new file mode 100644
index 0000000000..c5982853dc
--- /dev/null
+++ b/src/components/transport_manager/include/transport_manager/tcp/platform_specific/qnx/platform_specific_network_interface_listener_impl.h
@@ -0,0 +1,102 @@
+/*
+ * Copyright (c) 2018 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_TRANSPORT_MANAGER_INCLUDE_TRANSPORT_MANAGER_TCP_PLATFORM_SPECIFIC_QNX_PLATFORM_SPECIFIC_NETWORK_INTERFACE_LISTENER_H_
+#define SRC_COMPONENTS_TRANSPORT_MANAGER_INCLUDE_TRANSPORT_MANAGER_TCP_PLATFORM_SPECIFIC_QNX_PLATFORM_SPECIFIC_NETWORK_INTERFACE_LISTENER_H_
+
+#include <map>
+#include <string>
+#include <vector>
+
+#include <netinet/in.h>
+#include "transport_manager/tcp/network_interface_listener.h"
+#include "utils/macro.h"
+#include "utils/threads/thread_delegate.h"
+
+class Thread;
+struct ifaddrmsg;
+
+namespace transport_manager {
+namespace transport_adapter {
+
+class TcpClientListener;
+
+/**
+ * @brief Listener to detect various events on network interfaces
+ */
+class PlatformSpecificNetworkInterfaceListener
+ : public NetworkInterfaceListener {
+ public:
+ /**
+ * @brief Constructor
+ *
+ * @param tcp_client_listener an instance of TcpClientListener which receives
+ * status updates
+ * @param designated_interface if we want to listen only on a specific
+ * network interface, specify its name
+ */
+ PlatformSpecificNetworkInterfaceListener(
+ TcpClientListener* tcp_client_listener,
+ const std::string designated_interface = "");
+
+ /**
+ * @brief Destructor
+ */
+ virtual ~PlatformSpecificNetworkInterfaceListener();
+
+ /**
+ * @brief Initialize this listener
+ */
+ bool Init() OVERRIDE;
+
+ /**
+ * @brief Deinitialize this listener
+ */
+ void Deinit() OVERRIDE;
+
+ /**
+ * @brief Start this listener
+ */
+ bool Start() OVERRIDE;
+
+ /**
+ * @brief Stop this listener
+ */
+ bool Stop() OVERRIDE;
+
+ private:
+};
+
+} // namespace transport_adapter
+} // namespace transport_manager
+
+#endif // SRC_COMPONENTS_TRANSPORT_MANAGER_INCLUDE_TRANSPORT_MANAGER_TCP_PLATFORM_SPECIFIC_QNX_PLATFORM_SPECIFIC_NETWORK_INTERFACE_LISTENER_H_
diff --git a/src/components/transport_manager/include/transport_manager/tcp/tcp_client_listener.h b/src/components/transport_manager/include/transport_manager/tcp/tcp_client_listener.h
index 2640049ecc..dae66cd30e 100644
--- a/src/components/transport_manager/include/transport_manager/tcp/tcp_client_listener.h
+++ b/src/components/transport_manager/include/transport_manager/tcp/tcp_client_listener.h
@@ -5,6 +5,9 @@
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
+ * Copyright (c) 2018 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:
*
@@ -16,7 +19,7 @@
* disclaimer in the documentation and/or other materials provided with the
* distribution.
*
- * Neither the name of the Ford Motor Company nor the names of its contributors
+ * Neither the name 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.
*
@@ -36,15 +39,18 @@
#ifndef SRC_COMPONENTS_TRANSPORT_MANAGER_INCLUDE_TRANSPORT_MANAGER_TCP_TCP_CLIENT_LISTENER_H_
#define SRC_COMPONENTS_TRANSPORT_MANAGER_INCLUDE_TRANSPORT_MANAGER_TCP_TCP_CLIENT_LISTENER_H_
+#include "utils/lock.h"
#include "utils/threads/thread_delegate.h"
#include "transport_manager/transport_adapter/client_connection_listener.h"
class Thread;
+struct in_addr;
namespace transport_manager {
namespace transport_adapter {
class TransportAdapterController;
+class NetworkInterfaceListener;
/**
* @brief Listener of device adapter that use TCP transport.
@@ -57,11 +63,15 @@ class TcpClientListener : public ClientConnectionListener {
* @param controller Pointer to the device adapter controller.
* @param port Port No.
* @param enable_keepalive If true enables TCP keepalive on accepted
+ * @param designated_interface Specify the name of the network interface to
+ *listen on. If empty, then this process will listen on all network
+ *interfaces.
*connections
*/
TcpClientListener(TransportAdapterController* controller,
uint16_t port,
- bool enable_keepalive);
+ bool enable_keepalive,
+ const std::string designated_interface = "");
/**
* @brief Destructor.
@@ -101,7 +111,18 @@ class TcpClientListener : public ClientConnectionListener {
*/
virtual TransportAdapter::Error StopListening();
+ /**
+ * @brief Called from NetworkInterfaceListener when IP address of the network
+ * interface is changed.
+ */
+ virtual void OnIPAddressUpdated(const std::string ipv4_addr,
+ const std::string ipv6_addr);
+
#ifdef BUILD_TESTS
+ void set_network_interface_listener(NetworkInterfaceListener* listener) {
+ interface_listener_ = listener;
+ }
+
uint16_t port() const {
return port_;
}
@@ -113,19 +134,47 @@ class TcpClientListener : public ClientConnectionListener {
threads::Thread* thread() const {
return thread_;
}
+
+ static void set_testing(bool enabled) {
+ testing_ = enabled;
+ }
#endif // BUILD_TESTS
private:
const uint16_t port_;
const bool enable_keepalive_;
TransportAdapterController* controller_;
+ bool initialized_;
+ bool started_;
threads::Thread* thread_;
int socket_;
bool thread_stop_requested_;
+ int pipe_fds_[2];
+ NetworkInterfaceListener* interface_listener_;
+ const std::string designated_interface_;
+ std::string current_ip_address_;
+ sync_primitives::Lock start_stop_lock_;
+
+#ifdef BUILD_TESTS
+ static bool testing_;
+#endif // BUILD_TESTS
void Loop();
void StopLoop();
+ TransportAdapter::Error StartListeningThread();
+ TransportAdapter::Error StopListeningThread();
+
+ bool StartOnNetworkInterface();
+ bool StopOnNetworkInterface();
+ bool IsListeningOnSpecificInterface() const;
+
+ static int CreateIPv4ServerSocket(uint16_t port,
+ const std::string interface_name = "");
+ static void DestroyServerSocket(int sock);
+ static bool GetIPv4Address(const std::string interface_name,
+ struct in_addr* ip_address);
+
class ListeningThreadDelegate : public threads::ThreadDelegate {
public:
explicit ListeningThreadDelegate(TcpClientListener* parent);
diff --git a/src/components/transport_manager/include/transport_manager/tcp/tcp_transport_adapter.h b/src/components/transport_manager/include/transport_manager/tcp/tcp_transport_adapter.h
index 5431b4455d..647e14dbfa 100644
--- a/src/components/transport_manager/include/transport_manager/tcp/tcp_transport_adapter.h
+++ b/src/components/transport_manager/include/transport_manager/tcp/tcp_transport_adapter.h
@@ -5,6 +5,9 @@
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
+ * Copyright (c) 2018 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:
*
@@ -16,7 +19,7 @@
* disclaimer in the documentation and/or other materials provided with the
* distribution.
*
- * Neither the name of the Ford Motor Company nor the names of its contributors
+ * Neither the name 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.
*
@@ -58,6 +61,18 @@ class TcpTransportAdapter : public TransportAdapterImpl {
*/
virtual ~TcpTransportAdapter();
+ /**
+ * @brief Notification that transport's configuration is updated
+ *
+ * @param new_config The new configuration of the transport
+ */
+ void TransportConfigUpdated(const TransportConfig& new_config) OVERRIDE;
+
+ /**
+ * @brief Returns the transport's configuration information
+ */
+ virtual TransportConfig GetTransportConfiguration() const OVERRIDE;
+
protected:
/**
* @brief Return type of device.
@@ -77,6 +92,19 @@ class TcpTransportAdapter : public TransportAdapterImpl {
* @return True on success false otherwise
*/
virtual bool Restore();
+
+ private:
+ /**
+ * @brief Keeps transport specific configuration
+ *
+ * TCP transport uses following information:
+ * - "enabled": whether the transport is currently enabled or not. Value can
+ * be "true" or "false".
+ * - "tcp_ip_address": string representation of IP address (either IPv4 or
+ * IPv6)
+ * - "tcp_port": string representation of TCP port number (e.g. "12345")
+ */
+ TransportConfig transport_config_;
};
} // namespace transport_adapter
diff --git a/src/components/transport_manager/include/transport_manager/transport_adapter/transport_adapter_controller.h b/src/components/transport_manager/include/transport_manager/transport_adapter/transport_adapter_controller.h
index 0b38f82637..a5a5eb4bdf 100644
--- a/src/components/transport_manager/include/transport_manager/transport_adapter/transport_adapter_controller.h
+++ b/src/components/transport_manager/include/transport_manager/transport_adapter/transport_adapter_controller.h
@@ -2,6 +2,9 @@
* Copyright (c) 2014, Ford Motor Company
* All rights reserved.
*
+ * Copyright (c) 2018 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:
*
@@ -13,7 +16,7 @@
* disclaimer in the documentation and/or other materials provided with the
* distribution.
*
- * Neither the name of the Ford Motor Company nor the names of its contributors
+ * Neither the name 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.
*
@@ -204,6 +207,13 @@ class TransportAdapterController {
const ApplicationHandle& app_handle,
::protocol_handler::RawMessagePtr message,
const DataSendError&) = 0;
+
+ /**
+ * @brief Notification that transport's configuration is updated
+ *
+ * @param new_config The new configuration of the transport
+ */
+ virtual void TransportConfigUpdated(const TransportConfig& new_config) = 0;
};
} // namespace transport_adapter
diff --git a/src/components/transport_manager/include/transport_manager/transport_adapter/transport_adapter_impl.h b/src/components/transport_manager/include/transport_manager/transport_adapter/transport_adapter_impl.h
index 2b1ada79ad..b503e609f1 100644
--- a/src/components/transport_manager/include/transport_manager/transport_adapter/transport_adapter_impl.h
+++ b/src/components/transport_manager/include/transport_manager/transport_adapter/transport_adapter_impl.h
@@ -2,6 +2,9 @@
* Copyright (c) 2016, Ford Motor Company
* All rights reserved.
*
+ * Copyright (c) 2018 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:
*
@@ -13,7 +16,7 @@
* disclaimer in the documentation and/or other materials provided with the
* distribution.
*
- * Neither the name of the Ford Motor Company nor the names of its contributors
+ * Neither the name 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.
*
@@ -400,6 +403,13 @@ class TransportAdapterImpl : public TransportAdapter,
const DataSendError& error) OVERRIDE;
/**
+ * @brief Notification that transport's configuration is updated
+ *
+ * @param new_config The new configuration of the transport
+ */
+ void TransportConfigUpdated(const TransportConfig& new_config) OVERRIDE;
+
+ /**
* @brief DoTransportSwitch notifies listeners of transport adapter events
* that transport switching is requested by system
*/
@@ -420,6 +430,14 @@ class TransportAdapterImpl : public TransportAdapter,
SwitchableDevices GetSwitchableDevices() const OVERRIDE;
/**
+ * @brief Returns the transport's configuration information
+ */
+ virtual TransportConfig GetTransportConfiguration() const OVERRIDE {
+ // default is empty
+ return TransportConfig();
+ }
+
+ /**
* @brief Return name of device.
*
* @param device_id Device unique identifier.
diff --git a/src/components/transport_manager/include/transport_manager/transport_adapter/transport_adapter_listener.h b/src/components/transport_manager/include/transport_manager/transport_adapter/transport_adapter_listener.h
index 424fa53dea..07938224d6 100644
--- a/src/components/transport_manager/include/transport_manager/transport_adapter/transport_adapter_listener.h
+++ b/src/components/transport_manager/include/transport_manager/transport_adapter/transport_adapter_listener.h
@@ -2,6 +2,9 @@
* Copyright (c) 2014, Ford Motor Company
* All rights reserved.
*
+ * Copyright (c) 2018 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:
*
@@ -13,7 +16,7 @@
* disclaimer in the documentation and/or other materials provided with the
* distribution.
*
- * Neither the name of the Ford Motor Company nor the names of its contributors
+ * Neither the name 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.
*
@@ -277,6 +280,15 @@ class TransportAdapterListener {
*/
virtual void OnTransportSwitchRequested(
const TransportAdapter* transport_adapter) = 0;
+
+ /**
+ * @brief Notification that the transport's specific configuration has been
+ * updated.
+ *
+ * @param transport_adapter pointer to the transport adapter
+ */
+ virtual void OnTransportConfigUpdated(
+ const TransportAdapter* transport_adapter) = 0;
};
} // transport_adapter namespace
diff --git a/src/components/transport_manager/include/transport_manager/transport_adapter/transport_adapter_listener_impl.h b/src/components/transport_manager/include/transport_manager/transport_adapter/transport_adapter_listener_impl.h
index 8a8031c3cf..f1576d1dc3 100644
--- a/src/components/transport_manager/include/transport_manager/transport_adapter/transport_adapter_listener_impl.h
+++ b/src/components/transport_manager/include/transport_manager/transport_adapter/transport_adapter_listener_impl.h
@@ -2,6 +2,9 @@
* Copyright (c) 2014, Ford Motor Company
* All rights reserved.
*
+ * Copyright (c) 2018 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:
*
@@ -13,7 +16,7 @@
* disclaimer in the documentation and/or other materials provided with the
* distribution.
*
- * Neither the name of the Ford Motor Company nor the names of its contributors
+ * Neither the name 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.
*
@@ -272,6 +275,15 @@ class TransportAdapterListenerImpl
*/
void OnTransportSwitchRequested(const TransportAdapter* adapter) OVERRIDE;
+ /**
+ * @brief Notification that the transport's specific configuration has been
+ * updated.
+ *
+ * @param transport_adapter pointer to the transport adapter
+ */
+ void OnTransportConfigUpdated(
+ const transport_adapter::TransportAdapter* adapter) OVERRIDE;
+
private:
TransportManager* transport_manager_;
TransportAdapter* transport_adapter_;
diff --git a/src/components/transport_manager/src/tcp/network_interface_listener_impl.cc b/src/components/transport_manager/src/tcp/network_interface_listener_impl.cc
new file mode 100644
index 0000000000..e362ee8a73
--- /dev/null
+++ b/src/components/transport_manager/src/tcp/network_interface_listener_impl.cc
@@ -0,0 +1,74 @@
+/*
+ * Copyright (c) 2018 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 "transport_manager/tcp/network_interface_listener_impl.h"
+#include "platform_specific_network_interface_listener_impl.h"
+
+namespace transport_manager {
+namespace transport_adapter {
+
+CREATE_LOGGERPTR_GLOBAL(logger_, "TransportManager")
+
+NetworkInterfaceListenerImpl::NetworkInterfaceListenerImpl(
+ TcpClientListener* tcp_client_listener,
+ const std::string designated_interface)
+ : platform_specific_impl_(new PlatformSpecificNetworkInterfaceListener(
+ tcp_client_listener, designated_interface)) {
+ LOG4CXX_AUTO_TRACE(logger_);
+}
+
+NetworkInterfaceListenerImpl::~NetworkInterfaceListenerImpl() {
+ LOG4CXX_AUTO_TRACE(logger_);
+}
+
+bool NetworkInterfaceListenerImpl::Init() {
+ LOG4CXX_AUTO_TRACE(logger_);
+ return platform_specific_impl_->Init();
+}
+
+void NetworkInterfaceListenerImpl::Deinit() {
+ LOG4CXX_AUTO_TRACE(logger_);
+ platform_specific_impl_->Deinit();
+}
+
+bool NetworkInterfaceListenerImpl::Start() {
+ LOG4CXX_AUTO_TRACE(logger_);
+ return platform_specific_impl_->Start();
+}
+
+bool NetworkInterfaceListenerImpl::Stop() {
+ LOG4CXX_AUTO_TRACE(logger_);
+ return platform_specific_impl_->Stop();
+}
+
+} // namespace transport_adapter
+} // namespace transport_manager
diff --git a/src/components/transport_manager/src/tcp/platform_specific/linux/platform_specific_network_interface_listener.cc b/src/components/transport_manager/src/tcp/platform_specific/linux/platform_specific_network_interface_listener.cc
new file mode 100644
index 0000000000..29e55b97dd
--- /dev/null
+++ b/src/components/transport_manager/src/tcp/platform_specific/linux/platform_specific_network_interface_listener.cc
@@ -0,0 +1,704 @@
+/*
+ * Copyright (c) 2018 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 "transport_manager/tcp/platform_specific/linux/platform_specific_network_interface_listener_impl.h"
+
+#include <arpa/inet.h>
+#include <asm/types.h>
+#include <errno.h>
+#include <fcntl.h>
+#include <ifaddrs.h>
+#include <unistd.h>
+#include <net/if.h>
+#include <sys/types.h>
+#include <sys/select.h>
+#include <sys/socket.h>
+
+#include <linux/netlink.h>
+#include <linux/rtnetlink.h>
+
+#include "transport_manager/tcp/tcp_client_listener.h"
+#include "utils/logger.h"
+#include "utils/threads/thread.h"
+
+namespace transport_manager {
+namespace transport_adapter {
+
+CREATE_LOGGERPTR_GLOBAL(logger_, "TransportManager")
+
+static std::string GetInterfaceName(unsigned int if_index);
+static bool SetNonblocking(int s);
+
+bool InterfaceStatus::IsAvailable() const {
+ // check if the interface is UP and RUNNING
+ return ((flags_ & IFF_UP) > 0) && ((flags_ & IFF_RUNNING) > 0);
+}
+
+bool InterfaceStatus::IsLoopback() const {
+ return flags_ & IFF_LOOPBACK;
+}
+
+bool InterfaceStatus::HasIPAddress() const {
+ return has_ipv4_ || has_ipv6_;
+}
+
+std::string InterfaceStatus::GetIPv4Address() const {
+ char buf[INET_ADDRSTRLEN] = "";
+ if (has_ipv4_ && IsAvailable()) {
+ inet_ntop(AF_INET, &ipv4_address_, buf, sizeof(buf));
+ }
+ return std::string(buf);
+}
+
+std::string InterfaceStatus::GetIPv6Address() const {
+ char buf[INET6_ADDRSTRLEN] = "";
+ if (has_ipv6_ && IsAvailable()) {
+ inet_ntop(AF_INET6, &ipv6_address_, buf, sizeof(buf));
+ }
+ return std::string(buf);
+}
+
+void InterfaceStatus::SetIPv4Address(struct in_addr* addr) {
+ if (addr == NULL) {
+ has_ipv4_ = false;
+ } else {
+ ipv4_address_ = *addr;
+ has_ipv4_ = true;
+ }
+}
+
+void InterfaceStatus::SetIPv6Address(struct in6_addr* addr) {
+ if (addr == NULL) {
+ has_ipv6_ = false;
+ } else {
+ ipv6_address_ = *addr;
+ has_ipv6_ = true;
+ }
+}
+
+PlatformSpecificNetworkInterfaceListener::
+ PlatformSpecificNetworkInterfaceListener(
+ TcpClientListener* tcp_client_listener,
+ const std::string designated_interface)
+ : tcp_client_listener_(tcp_client_listener)
+ , designated_interface_(designated_interface)
+ , selected_interface_("")
+ , notified_ipv4_addr_("")
+ , notified_ipv6_addr_("")
+ , socket_(-1)
+#ifdef BUILD_TESTS
+ , testing_(false)
+#endif // BUILD_TESTS
+{
+ pipe_fds_[0] = pipe_fds_[1] = -1;
+ thread_ = threads::CreateThread("PlatformSpecificNetworkInterfaceListener",
+ new ListenerThreadDelegate(this));
+}
+
+PlatformSpecificNetworkInterfaceListener::
+ ~PlatformSpecificNetworkInterfaceListener() {
+ LOG4CXX_AUTO_TRACE(logger_);
+
+ Stop();
+ Deinit();
+
+ delete thread_->delegate();
+ threads::DeleteThread(thread_);
+}
+
+bool PlatformSpecificNetworkInterfaceListener::Init() {
+ LOG4CXX_AUTO_TRACE(logger_);
+
+ if (socket_ >= 0) {
+ LOG4CXX_WARN(logger_, "Network interface listener is already initialized");
+ return false;
+ }
+
+ socket_ = socket(PF_NETLINK, SOCK_RAW, NETLINK_ROUTE);
+ if (socket_ == -1) {
+ LOG4CXX_ERROR_WITH_ERRNO(logger_, "Failed to create netlink socket");
+ return false;
+ }
+
+ if (!SetNonblocking(socket_)) {
+ LOG4CXX_WARN(logger_, "Failed to configure netlink socket to non-blocking");
+ }
+
+ struct sockaddr_nl addr;
+ memset(&addr, 0, sizeof(addr));
+ addr.nl_family = AF_NETLINK;
+ addr.nl_pad = 0;
+ addr.nl_pid = 0;
+ addr.nl_groups = RTMGRP_LINK | RTMGRP_IPV4_IFADDR | RTMGRP_IPV6_IFADDR;
+
+ if (bind(socket_, reinterpret_cast<sockaddr*>(&addr), sizeof(addr)) != 0) {
+ LOG4CXX_ERROR_WITH_ERRNO(logger_, "Failed to bind netlink socket");
+ close(socket_);
+ socket_ = -1;
+ return false;
+ }
+
+ if (pipe(pipe_fds_) != 0) {
+ LOG4CXX_ERROR_WITH_ERRNO(logger_, "Failed to create internal pipe");
+ close(socket_);
+ socket_ = -1;
+ return false;
+ }
+
+ if (!SetNonblocking(pipe_fds_[0])) {
+ LOG4CXX_WARN(logger_, "Failed to configure pipe to non-blocking");
+ }
+
+ return true;
+}
+
+void PlatformSpecificNetworkInterfaceListener::Deinit() {
+ LOG4CXX_AUTO_TRACE(logger_);
+
+ if (socket_ >= 0) {
+ close(socket_);
+ socket_ = -1;
+ }
+ if (pipe_fds_[1] >= 0) {
+ close(pipe_fds_[1]);
+ pipe_fds_[1] = -1;
+ }
+ if (pipe_fds_[0] >= 0) {
+ close(pipe_fds_[0]);
+ pipe_fds_[0] = -1;
+ }
+}
+
+bool PlatformSpecificNetworkInterfaceListener::Start() {
+ LOG4CXX_AUTO_TRACE(logger_);
+
+ if (socket_ < 0) {
+ LOG4CXX_WARN(logger_, "Interface listener is not initialized");
+ return false;
+ }
+
+ if (thread_->is_running()) {
+ LOG4CXX_WARN(logger_, "Interface listener is already started");
+ return false;
+ }
+
+ if (!thread_->start()) {
+ LOG4CXX_ERROR(logger_, "Failed to start interface listener");
+ return false;
+ }
+
+ LOG4CXX_INFO(logger_, "Network interface listener started");
+ return true;
+}
+
+bool PlatformSpecificNetworkInterfaceListener::Stop() {
+ LOG4CXX_AUTO_TRACE(logger_);
+
+ if (!thread_->is_running()) {
+ LOG4CXX_DEBUG(logger_, "interface listener is not running");
+ return false;
+ }
+
+ thread_->join();
+
+ LOG4CXX_INFO(logger_, "Network interface listener stopped");
+ return true;
+}
+
+void PlatformSpecificNetworkInterfaceListener::Loop() {
+ LOG4CXX_AUTO_TRACE(logger_);
+
+ // Initialize status_table_ by acquiring a list of interfaces and their
+ // current statuses. Also we will notify an event to the listener if IP
+ // address is already available.
+ InitializeStatus();
+ NotifyIPAddresses();
+
+ // I am not sure required buffer size for netlink data structures. Most of
+ // implementation I found online uses 4096 so I followed them.
+ char buf[4096];
+ fd_set rfds;
+
+ while (1) {
+ FD_ZERO(&rfds);
+ FD_SET(socket_, &rfds);
+ FD_SET(pipe_fds_[0], &rfds);
+ int nfds = socket_ > pipe_fds_[0] ? socket_ : pipe_fds_[0];
+
+ // wait for some data from netlink socket (socket_) and our internal pipe
+ int ret = select(nfds + 1, &rfds, NULL, NULL, NULL);
+ if (ret < 0) {
+ if (errno == EINTR) {
+ continue;
+ } else {
+ LOG4CXX_WARN(logger_,
+ "select failed for netlink. Aborting interface listener.");
+ break;
+ }
+ }
+
+ // Received data from internal pipe, indicating StopLoop() is called.
+ // We'll break the while() loop and eventually exit this thread.
+ if (FD_ISSET(pipe_fds_[0], &rfds)) {
+ ret = read(pipe_fds_[0], buf, sizeof(buf));
+ if (ret < 0) {
+ if (errno != EINTR && errno != EAGAIN && errno != EWOULDBLOCK) {
+ LOG4CXX_WARN(
+ logger_,
+ "Failed to read from pipe. Aborting interface listener.");
+ break;
+ }
+ } else if (ret == 0) {
+ LOG4CXX_WARN(logger_,
+ "Pipe disconnected. Aborting interface listener.");
+ break;
+ } else {
+ LOG4CXX_DEBUG(logger_, "received terminating event through pipe");
+ break;
+ }
+ }
+
+#ifdef BUILD_TESTS
+ if (testing_) { // don't enable events from network interface while testing
+ continue;
+ }
+#endif // BUILD_TESTS
+
+ // received data from netlink socket
+ if (FD_ISSET(socket_, &rfds)) {
+ ret = recv(socket_, buf, sizeof(buf), 0);
+ if (ret < 0) {
+ if (errno != EINTR && errno != EAGAIN && errno != EWOULDBLOCK) {
+ LOG4CXX_WARN(logger_,
+ "Failed to read from netlink socket. Aborting interface "
+ "listener.");
+ break;
+ }
+ } else if (ret == 0) {
+ LOG4CXX_WARN(
+ logger_,
+ "Netlink socket disconnected. Aborting interface listener.");
+ break;
+ } else {
+ struct nlmsghdr* header = reinterpret_cast<struct nlmsghdr*>(buf);
+ int len = ret;
+
+ // Parse the stream. We may receive multiple (header + data) pairs at a
+ // time so we use for-loop to go through.
+ for (; NLMSG_OK(header, len); header = NLMSG_NEXT(header, len)) {
+ if (header->nlmsg_type == NLMSG_ERROR) {
+ LOG4CXX_WARN(logger_, "received error event from netlink");
+ break;
+ }
+
+ std::vector<EventParam> params;
+
+ if (header->nlmsg_type == RTM_NEWLINK ||
+ header->nlmsg_type == RTM_DELLINK) {
+ // For these events, data part contains an ifinfomsg struct and a
+ // series of rtattr structures. See rtnetlink(7).
+ // We are only interested in interface index and flags.
+ struct ifinfomsg* ifinfo_msg =
+ reinterpret_cast<struct ifinfomsg*>(NLMSG_DATA(header));
+ EventParam param(ifinfo_msg->ifi_index, ifinfo_msg->ifi_flags);
+ params.push_back(param);
+
+ } else if (header->nlmsg_type == RTM_NEWADDR ||
+ header->nlmsg_type == RTM_DELADDR) {
+ // For these events, data part contains an ifaddrmsg struct and
+ // optionally some rtattr structures. We'll extract IP address(es)
+ // from them.
+ struct ifaddrmsg* ifaddr_msg =
+ reinterpret_cast<struct ifaddrmsg*>(NLMSG_DATA(header));
+ unsigned int size = IFA_PAYLOAD(header);
+ params = ParseIFAddrMessage(ifaddr_msg, size);
+
+ } else {
+ continue;
+ }
+
+ // update status_table_ based on received data
+ UpdateStatus(header->nlmsg_type, params);
+ }
+ }
+
+ // notify the listener if necessary
+ NotifyIPAddresses();
+ }
+ }
+}
+
+bool PlatformSpecificNetworkInterfaceListener::StopLoop() {
+ LOG4CXX_AUTO_TRACE(logger_);
+
+ LOG4CXX_INFO(logger_, "Stopping network interface listener");
+
+ if (pipe_fds_[1] < 0) {
+ LOG4CXX_WARN(logger_, "StopLoop called in invalid state");
+ return false;
+ }
+
+ char dummy[1] = {0};
+ int ret = write(pipe_fds_[1], dummy, sizeof(dummy));
+ if (ret <= 0) {
+ LOG4CXX_WARN_WITH_ERRNO(
+ logger_, "Failed to send stop message to interface listener");
+ return false;
+ }
+
+ return true;
+}
+
+bool PlatformSpecificNetworkInterfaceListener::InitializeStatus() {
+ LOG4CXX_AUTO_TRACE(logger_);
+
+#ifdef BUILD_TESTS
+ if (testing_) {
+ // don't actually call getifaddrs()
+ return true;
+ }
+#endif // BUILD_TESTS
+
+ struct ifaddrs* if_list, *interface;
+ if (getifaddrs(&if_list) != 0) {
+ LOG4CXX_WARN(logger_,
+ "getifaddr failed, interface status won't be available until "
+ "a change occurs");
+ return false;
+ }
+
+ // clear existing table
+ status_table_.clear();
+
+ for (interface = if_list; interface != NULL;
+ interface = interface->ifa_next) {
+ if (interface->ifa_name == NULL || interface->ifa_name[0] == '\0') {
+ continue;
+ }
+ if (interface->ifa_addr == NULL) {
+ continue;
+ }
+
+ std::string ifname(interface->ifa_name);
+ InterfaceStatus& status = status_table_[ifname];
+
+ switch (interface->ifa_addr->sa_family) {
+ case AF_INET: {
+ struct sockaddr_in* addr =
+ reinterpret_cast<struct sockaddr_in*>(interface->ifa_addr);
+ status.SetIPv4Address(&addr->sin_addr);
+ break;
+ }
+ case AF_INET6: {
+ struct sockaddr_in6* addr =
+ reinterpret_cast<struct sockaddr_in6*>(interface->ifa_addr);
+ status.SetIPv6Address(&addr->sin6_addr);
+ break;
+ }
+ default:
+ continue;
+ }
+ status.SetFlags(interface->ifa_flags);
+ }
+
+ freeifaddrs(if_list);
+
+ LOG4CXX_DEBUG(logger_, "Successfully acquired network interface status");
+ DumpTable();
+ return true;
+}
+
+bool PlatformSpecificNetworkInterfaceListener::UpdateStatus(
+ uint16_t type, std::vector<EventParam>& params) {
+ LOG4CXX_AUTO_TRACE(logger_);
+
+ for (std::vector<EventParam>::iterator it = params.begin();
+ it != params.end();
+ ++it) {
+ std::string ifname = GetInterfaceName(it->if_index);
+ if (ifname.empty()) {
+ continue;
+ }
+
+ InterfaceStatus& status = status_table_[ifname];
+
+ switch (type) {
+ case RTM_NEWLINK: {
+ LOG4CXX_DEBUG(logger_,
+ "netlink event: interface " << ifname
+ << " created or updated");
+ status.SetFlags(it->flags);
+ break;
+ }
+ case RTM_DELLINK:
+ LOG4CXX_DEBUG(logger_,
+ "netlink event: interface " << ifname << " removed");
+ status_table_.erase(ifname);
+ break;
+ case RTM_NEWADDR: {
+ sockaddr* addr = reinterpret_cast<sockaddr*>(&it->address);
+ if (addr->sa_family == AF_INET) {
+ sockaddr_in* addr_in = reinterpret_cast<sockaddr_in*>(addr);
+ status.SetIPv4Address(&addr_in->sin_addr);
+ LOG4CXX_DEBUG(logger_,
+ "netlink event: IPv4 address of interface "
+ << ifname << " updated to "
+ << status.GetIPv4Address());
+ } else if (addr->sa_family == AF_INET6) {
+ sockaddr_in6* addr_in6 = reinterpret_cast<sockaddr_in6*>(addr);
+ status.SetIPv6Address(&addr_in6->sin6_addr);
+ LOG4CXX_DEBUG(logger_,
+ "netlink event: IPv6 address of interface "
+ << ifname << " updated to "
+ << status.GetIPv6Address());
+ }
+ break;
+ }
+ case RTM_DELADDR: {
+ sockaddr* addr = reinterpret_cast<sockaddr*>(&it->address);
+ if (addr->sa_family == AF_INET) {
+ LOG4CXX_DEBUG(logger_,
+ "netlink event: IPv4 address of interface "
+ << ifname << " removed");
+ status.SetIPv4Address(NULL);
+ } else if (addr->sa_family == AF_INET6) {
+ LOG4CXX_DEBUG(logger_,
+ "netlink event: IPv6 address of interface "
+ << ifname << " removed");
+ status.SetIPv6Address(NULL);
+ }
+ break;
+ }
+ default:
+ LOG4CXX_WARN(logger_, "Unsupported netlink event (" << type << ")");
+ break;
+ }
+ }
+ return true;
+}
+
+void PlatformSpecificNetworkInterfaceListener::NotifyIPAddresses() {
+ LOG4CXX_AUTO_TRACE(logger_);
+
+ std::string ipv4_addr;
+ std::string ipv6_addr;
+ const std::string interface_name = SelectInterface();
+
+ // note that if interface_name is empty (i.e. no interface is selected),
+ // the IP addresses will be empty
+ if (!interface_name.empty()) {
+ InterfaceStatusTable::iterator it = status_table_.find(interface_name);
+ if (status_table_.end() != it) {
+ InterfaceStatus& status = it->second;
+ ipv4_addr = status.GetIPv4Address();
+ ipv6_addr = status.GetIPv6Address();
+ }
+ }
+
+ if (notified_ipv4_addr_ != ipv4_addr || notified_ipv6_addr_ != ipv6_addr) {
+ LOG4CXX_INFO(logger_,
+ "IP address updated: \"" << notified_ipv4_addr_ << "\" -> \""
+ << ipv4_addr << "\", \""
+ << notified_ipv6_addr_ << "\" -> \""
+ << ipv6_addr << "\"");
+
+ notified_ipv4_addr_ = ipv4_addr;
+ notified_ipv6_addr_ = ipv6_addr;
+
+ tcp_client_listener_->OnIPAddressUpdated(notified_ipv4_addr_,
+ notified_ipv6_addr_);
+ }
+}
+
+const std::string PlatformSpecificNetworkInterfaceListener::SelectInterface() {
+ LOG4CXX_AUTO_TRACE(logger_);
+
+ if (!designated_interface_.empty()) {
+ return designated_interface_;
+ }
+
+ InterfaceStatusTable::iterator it;
+
+ if (!selected_interface_.empty()) {
+ // if current network interface is still available and has IP address, then
+ // we use it
+ it = status_table_.find(selected_interface_);
+ if (it != status_table_.end()) {
+ InterfaceStatus& status = it->second;
+ if (status.IsAvailable() && status.HasIPAddress()) {
+ return selected_interface_;
+ }
+ }
+ }
+
+ // pick a network interface that has IP address
+ for (it = status_table_.begin(); it != status_table_.end(); ++it) {
+ InterfaceStatus& status = it->second;
+ // ignore loopback interfaces
+ if (status.IsLoopback()) {
+ continue;
+ }
+ // if the interface has to be UP and RUNNING, and must have an IP address
+ if (!(status.IsAvailable() && status.HasIPAddress())) {
+ continue;
+ }
+
+ selected_interface_ = it->first;
+ LOG4CXX_DEBUG(logger_,
+ "selecting network interface: " << selected_interface_);
+ return selected_interface_;
+ }
+
+ selected_interface_ = "";
+ return selected_interface_;
+}
+
+std::vector<PlatformSpecificNetworkInterfaceListener::EventParam>
+PlatformSpecificNetworkInterfaceListener::ParseIFAddrMessage(
+ struct ifaddrmsg* message, unsigned int size) {
+ LOG4CXX_AUTO_TRACE(logger_);
+
+ std::vector<EventParam> params;
+
+ // Iterate through rtattr structs. (The first one can be acquired through
+ // IFA_RTA() macro)
+ for (struct rtattr* attr = IFA_RTA(message); RTA_OK(attr, size);
+ attr = RTA_NEXT(attr, size)) {
+ if (!(attr->rta_type == IFA_LOCAL || attr->rta_type == IFA_ADDRESS)) {
+ continue;
+ }
+
+ EventParam param(message->ifa_index);
+
+ if (message->ifa_family == AF_INET) {
+ // make sure the size of data is >= 4 bytes
+ if (RTA_PAYLOAD(attr) < sizeof(struct in_addr)) {
+ LOG4CXX_DEBUG(logger_,
+ "Invalid netlink event: insufficient IPv4 address data");
+ continue;
+ }
+
+ // Data part of rtattr contains IPv4 address. Copy it to param.address
+ struct in_addr* ipv4_addr =
+ reinterpret_cast<struct in_addr*>(RTA_DATA(attr));
+
+ struct sockaddr_in* sockaddr =
+ reinterpret_cast<struct sockaddr_in*>(&param.address);
+ sockaddr->sin_family = AF_INET;
+ sockaddr->sin_addr = *ipv4_addr;
+
+ } else if (message->ifa_family == AF_INET6) {
+ // make sure the size of data is >= 16 bytes
+ if (RTA_PAYLOAD(attr) < sizeof(struct in6_addr)) {
+ LOG4CXX_DEBUG(logger_,
+ "Invalid netlink event: insufficient IPv6 address data");
+ continue;
+ }
+
+ // Data part of rtattr contains IPv6 address. Copy it to param.address
+ struct in6_addr* ipv6_addr =
+ reinterpret_cast<struct in6_addr*>(RTA_DATA(attr));
+
+ struct sockaddr_in6* sockaddr =
+ reinterpret_cast<struct sockaddr_in6*>(&param.address);
+ sockaddr->sin6_family = AF_INET6;
+ sockaddr->sin6_addr = *ipv6_addr;
+
+ } else {
+ LOG4CXX_WARN(logger_,
+ "Unsupported family (" << message->ifa_family << ")");
+ continue;
+ }
+
+ params.push_back(param);
+ }
+
+ return params;
+}
+
+void PlatformSpecificNetworkInterfaceListener::DumpTable() const {
+ LOG4CXX_DEBUG(logger_,
+ "Number of network interfaces: " << status_table_.size());
+
+ for (auto it = status_table_.begin(); it != status_table_.end(); ++it) {
+ const std::string ifname = it->first;
+ const InterfaceStatus& status = it->second;
+
+ LOG4CXX_DEBUG(
+ logger_,
+ " " << ifname << " : flags=" << status.GetFlags()
+ << " : available: " << (status.IsAvailable() ? "yes" : "no")
+ << " IPv4: " << status.GetIPv4Address()
+ << " IPv6: " << status.GetIPv6Address()
+ << (status.IsLoopback() ? " (loopback)" : ""));
+ }
+}
+
+PlatformSpecificNetworkInterfaceListener::ListenerThreadDelegate::
+ ListenerThreadDelegate(PlatformSpecificNetworkInterfaceListener* parent)
+ : parent_(parent) {}
+
+void PlatformSpecificNetworkInterfaceListener::ListenerThreadDelegate::
+ threadMain() {
+ parent_->Loop();
+}
+
+void PlatformSpecificNetworkInterfaceListener::ListenerThreadDelegate::
+ exitThreadMain() {
+ parent_->StopLoop();
+}
+
+static std::string GetInterfaceName(unsigned int if_index) {
+ char buf[IFNAMSIZ + 1] = "";
+ if_indextoname(if_index, buf);
+ return std::string(buf);
+}
+
+static bool SetNonblocking(int s) {
+ int prev_flag = fcntl(s, F_GETFL, 0);
+ if (prev_flag == -1) {
+ LOG4CXX_ERROR_WITH_ERRNO(logger_, "Failed to acquire socket flag");
+ return false;
+ }
+
+ int ret = fcntl(s, F_SETFL, prev_flag | O_NONBLOCK);
+ if (ret == -1) {
+ LOG4CXX_ERROR_WITH_ERRNO(logger_,
+ "Failed to configure socket to non-blocking");
+ return false;
+ }
+
+ return true;
+}
+
+} // namespace transport_adapter
+} // namespace transport_manager
diff --git a/src/components/transport_manager/src/tcp/platform_specific/qnx/platform_specific_network_interface_listener.cc b/src/components/transport_manager/src/tcp/platform_specific/qnx/platform_specific_network_interface_listener.cc
new file mode 100644
index 0000000000..9ca7890278
--- /dev/null
+++ b/src/components/transport_manager/src/tcp/platform_specific/qnx/platform_specific_network_interface_listener.cc
@@ -0,0 +1,69 @@
+/*
+ * Copyright (c) 2018 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 "transport_manager/tcp/platform_specific/qnx/platform_specific_network_interface_listener_impl.h"
+
+namespace transport_manager {
+namespace transport_adapter {
+
+CREATE_LOGGERPTR_GLOBAL(logger_, "TransportManager")
+
+PlatformSpecificNetworkInterfaceListener::
+ PlatformSpecificNetworkInterfaceListener(
+ TcpClientListener* tcp_client_listener,
+ const std::string designated_interface) {}
+
+PlatformSpecificNetworkInterfaceListener::
+ ~PlatformSpecificNetworkInterfaceListener() {
+ LOG4CXX_AUTO_TRACE(logger_);
+}
+
+bool PlatformSpecificNetworkInterfaceListener::Init() {
+ LOG4CXX_AUTO_TRACE(logger_);
+ return true;
+}
+
+void PlatformSpecificNetworkInterfaceListener::Deinit() {
+ LOG4CXX_AUTO_TRACE(logger_);
+}
+
+bool PlatformSpecificNetworkInterfaceListener::Start() {
+ LOG4CXX_AUTO_TRACE(logger_);
+ return true;
+}
+
+bool PlatformSpecificNetworkInterfaceListener::Stop() {
+ LOG4CXX_AUTO_TRACE(logger_);
+ return true;
+}
+
+} // namespace transport_adapter
+} // namespace transport_manager
diff --git a/src/components/transport_manager/src/tcp/tcp_client_listener.cc b/src/components/transport_manager/src/tcp/tcp_client_listener.cc
index 207149eb8c..4b590318e6 100644
--- a/src/components/transport_manager/src/tcp/tcp_client_listener.cc
+++ b/src/components/transport_manager/src/tcp/tcp_client_listener.cc
@@ -3,6 +3,9 @@
* Copyright (c) 2017, Ford Motor Company
* All rights reserved.
*
+ * Copyright (c) 2018 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:
*
@@ -14,7 +17,7 @@
* disclaimer in the documentation and/or other materials provided with the
* distribution.
*
- * Neither the name of the Ford Motor Company nor the names of its contributors
+ * Neither the name 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.
*
@@ -36,11 +39,14 @@
#include <memory.h>
#include <signal.h>
#include <errno.h>
+#include <fcntl.h>
#include <arpa/inet.h>
#include <unistd.h>
#include <sys/types.h>
+#include <sys/select.h>
#include <sys/sysctl.h>
#include <sys/socket.h>
+#include <ifaddrs.h>
#ifdef __linux__
#include <linux/tcp.h>
#else // __linux__
@@ -56,6 +62,7 @@
#include "utils/make_shared.h"
#include "utils/threads/thread.h"
#include "transport_manager/transport_adapter/transport_adapter_controller.h"
+#include "transport_manager/tcp/network_interface_listener_impl.h"
#include "transport_manager/tcp/tcp_device.h"
#include "transport_manager/tcp/tcp_socket_connection.h"
@@ -64,72 +71,88 @@ namespace transport_adapter {
CREATE_LOGGERPTR_GLOBAL(logger_, "TransportManager")
+static bool SetNonblocking(int s);
+
+#ifdef BUILD_TESTS
+bool TcpClientListener::testing_ = false;
+#endif // BUILD_TESTS
+
TcpClientListener::TcpClientListener(TransportAdapterController* controller,
const uint16_t port,
- const bool enable_keepalive)
+ const bool enable_keepalive,
+ const std::string designated_interface)
: port_(port)
, enable_keepalive_(enable_keepalive)
, controller_(controller)
+ , initialized_(false)
+ , started_(false)
, thread_(0)
, socket_(-1)
- , thread_stop_requested_(false) {
+ , thread_stop_requested_(false)
+ , designated_interface_(designated_interface) {
+ pipe_fds_[0] = pipe_fds_[1] = -1;
thread_ = threads::CreateThread("TcpClientListener",
new ListeningThreadDelegate(this));
+ interface_listener_ =
+ new NetworkInterfaceListenerImpl(this, designated_interface);
}
TransportAdapter::Error TcpClientListener::Init() {
LOG4CXX_AUTO_TRACE(logger_);
thread_stop_requested_ = false;
- socket_ = socket(AF_INET, SOCK_STREAM, 0);
- if (-1 == socket_) {
- LOG4CXX_ERROR_WITH_ERRNO(logger_, "Failed to create socket");
- return TransportAdapter::FAIL;
- }
-
- sockaddr_in server_address = {0};
- server_address.sin_family = AF_INET;
- server_address.sin_port = htons(port_);
- server_address.sin_addr.s_addr = INADDR_ANY;
-
- int optval = 1;
- if (0 !=
- setsockopt(socket_, SOL_SOCKET, SO_REUSEADDR, &optval, sizeof(optval))) {
- LOG4CXX_WARN_WITH_ERRNO(logger_, "setsockopt SO_REUSEADDR failed");
+ if (!IsListeningOnSpecificInterface()) {
+ // Network interface is not specified. We will listen on all interfaces
+ // using INADDR_ANY. If socket creation fails, we will treat it an error.
+ socket_ = CreateIPv4ServerSocket(port_);
+ if (-1 == socket_) {
+ LOG4CXX_ERROR(logger_, "Failed to create TCP socket");
+ return TransportAdapter::FAIL;
+ }
+ } else {
+ // Network interface is specified and we wiill listen only on the interface.
+ // In this case, the server socket will be created once
+ // NetworkInterfaceListener notifies the interface's IP address.
+ LOG4CXX_INFO(logger_,
+ "TCP server socket will listen on "
+ << designated_interface_
+ << " once it has an IPv4 address.");
}
- if (bind(socket_,
- reinterpret_cast<sockaddr*>(&server_address),
- sizeof(server_address)) != 0) {
- LOG4CXX_ERROR_WITH_ERRNO(logger_, "bind() failed");
+ if (!interface_listener_->Init()) {
+ if (socket_ >= 0) {
+ close(socket_);
+ socket_ = -1;
+ }
return TransportAdapter::FAIL;
}
- const int kBacklog = 128;
- if (0 != listen(socket_, kBacklog)) {
- LOG4CXX_ERROR_WITH_ERRNO(logger_, "listen() failed");
- return TransportAdapter::FAIL;
- }
+ initialized_ = true;
return TransportAdapter::OK;
}
void TcpClientListener::Terminate() {
LOG4CXX_AUTO_TRACE(logger_);
- if (socket_ == -1) {
- LOG4CXX_WARN(logger_, "Socket has been closed");
+
+ if (!initialized_) {
return;
}
- if (shutdown(socket_, SHUT_RDWR) != 0) {
- LOG4CXX_ERROR_WITH_ERRNO(logger_, "Failed to shutdown socket");
- }
- if (close(socket_) != 0) {
- LOG4CXX_ERROR_WITH_ERRNO(logger_, "Failed to close socket");
+
+ if (!IsListeningOnSpecificInterface()) {
+ DestroyServerSocket(socket_);
+ socket_ = -1;
+ } else {
+ sync_primitives::AutoLock auto_lock(start_stop_lock_);
+ DestroyServerSocket(socket_);
+ socket_ = -1;
}
- socket_ = -1;
+
+ interface_listener_->Deinit();
+ initialized_ = false;
}
bool TcpClientListener::IsInitialised() const {
- return thread_;
+ return initialized_;
}
TcpClientListener::~TcpClientListener() {
@@ -138,6 +161,7 @@ TcpClientListener::~TcpClientListener() {
delete thread_->delegate();
threads::DeleteThread(thread_);
Terminate();
+ delete interface_listener_;
}
void SetKeepaliveOptions(const int fd) {
@@ -203,104 +227,151 @@ void SetKeepaliveOptions(const int fd) {
void TcpClientListener::Loop() {
LOG4CXX_AUTO_TRACE(logger_);
- while (!thread_stop_requested_) {
- sockaddr_in client_address;
- socklen_t client_address_size = sizeof(client_address);
- const int connection_fd = accept(
- socket_, (struct sockaddr*)&client_address, &client_address_size);
- if (thread_stop_requested_) {
- LOG4CXX_DEBUG(logger_, "thread_stop_requested_");
- close(connection_fd);
- break;
- }
+ fd_set rfds;
+ char dummy[16];
- if (connection_fd < 0) {
- LOG4CXX_ERROR_WITH_ERRNO(logger_, "accept() failed");
- continue;
- }
-
- if (AF_INET != client_address.sin_family) {
- LOG4CXX_DEBUG(logger_, "Address of connected client is invalid");
- close(connection_fd);
- continue;
+ while (!thread_stop_requested_) {
+ FD_ZERO(&rfds);
+ FD_SET(socket_, &rfds);
+ FD_SET(pipe_fds_[0], &rfds);
+ int nfds = socket_ > pipe_fds_[0] ? socket_ : pipe_fds_[0];
+
+ int ret = select(nfds + 1, &rfds, NULL, NULL, NULL);
+ if (ret < 0) {
+ if (errno == EINTR) {
+ continue;
+ } else {
+ LOG4CXX_WARN(logger_, "select failed for TCP server socket");
+ break;
+ }
}
- char device_name[32];
- strncpy(device_name,
- inet_ntoa(client_address.sin_addr),
- sizeof(device_name) / sizeof(device_name[0]));
- LOG4CXX_INFO(logger_, "Connected client " << device_name);
- LOG4CXX_INFO(logger_, "Port is: " << port_);
-
- if (enable_keepalive_) {
- SetKeepaliveOptions(connection_fd);
+ if (FD_ISSET(pipe_fds_[0], &rfds)) {
+ ret = read(pipe_fds_[0], dummy, sizeof(dummy));
+ if (ret < 0) {
+ if (errno != EINTR && errno != EAGAIN && errno != EWOULDBLOCK) {
+ LOG4CXX_WARN(
+ logger_,
+ "Failed to read from pipe, aborting TCP server socket loop.");
+ break;
+ }
+ } else if (ret == 0) {
+ LOG4CXX_WARN(logger_,
+ "Pipe disconnected, aborting TCP server socket loop.");
+ break;
+ } else {
+ LOG4CXX_DEBUG(logger_,
+ "received stop command of TCP server socket loop");
+ break;
+ }
}
- const auto device_uid =
- device_name + std::string(":") + std::to_string(port_);
+ if (FD_ISSET(socket_, &rfds)) {
+ sockaddr_in client_address;
+ socklen_t client_address_size = sizeof(client_address);
+ const int connection_fd = accept(
+ socket_, (struct sockaddr*)&client_address, &client_address_size);
+ if (thread_stop_requested_) {
+ LOG4CXX_DEBUG(logger_, "thread_stop_requested_");
+ close(connection_fd);
+ break;
+ }
+
+ if (connection_fd < 0) {
+ LOG4CXX_ERROR_WITH_ERRNO(logger_, "accept() failed");
+ continue;
+ }
+
+ if (AF_INET != client_address.sin_family) {
+ LOG4CXX_DEBUG(logger_, "Address of connected client is invalid");
+ close(connection_fd);
+ continue;
+ }
+
+ char device_name[32];
+ strncpy(device_name,
+ inet_ntoa(client_address.sin_addr),
+ sizeof(device_name) / sizeof(device_name[0]));
+ LOG4CXX_INFO(logger_, "Connected client " << device_name);
+ LOG4CXX_INFO(logger_, "Port is: " << port_);
+
+ if (enable_keepalive_) {
+ SetKeepaliveOptions(connection_fd);
+ }
+
+ const auto device_uid =
+ device_name + std::string(":") + std::to_string(port_);
#if defined(BUILD_TESTS)
- TcpDevice* tcp_device =
- new TcpDevice(client_address.sin_addr.s_addr, device_uid, device_name);
+ TcpDevice* tcp_device = new TcpDevice(
+ client_address.sin_addr.s_addr, device_uid, device_name);
#else
- TcpDevice* tcp_device =
- new TcpDevice(client_address.sin_addr.s_addr, device_uid);
+ TcpDevice* tcp_device =
+ new TcpDevice(client_address.sin_addr.s_addr, device_uid);
#endif // BUILD_TESTS
- DeviceSptr device = controller_->AddDevice(tcp_device);
- tcp_device = static_cast<TcpDevice*>(device.get());
- const ApplicationHandle app_handle =
- tcp_device->AddIncomingApplication(connection_fd);
-
- utils::SharedPtr<TcpSocketConnection> connection =
- utils::MakeShared<TcpSocketConnection>(
- device->unique_device_id(), app_handle, controller_);
- controller_->ConnectionCreated(
- connection, device->unique_device_id(), app_handle);
- connection->set_socket(connection_fd);
- const TransportAdapter::Error error = connection->Start();
- if (TransportAdapter::OK != error) {
- LOG4CXX_ERROR(logger_,
- "TCP connection::Start() failed with error: " << error);
+ DeviceSptr device = controller_->AddDevice(tcp_device);
+ tcp_device = static_cast<TcpDevice*>(device.get());
+ const ApplicationHandle app_handle =
+ tcp_device->AddIncomingApplication(connection_fd);
+
+ utils::SharedPtr<TcpSocketConnection> connection =
+ utils::MakeShared<TcpSocketConnection>(
+ device->unique_device_id(), app_handle, controller_);
+ controller_->ConnectionCreated(
+ connection, device->unique_device_id(), app_handle);
+ connection->set_socket(connection_fd);
+ const TransportAdapter::Error error = connection->Start();
+ if (TransportAdapter::OK != error) {
+ LOG4CXX_ERROR(logger_,
+ "TCP connection::Start() failed with error: " << error);
+ }
}
}
+
+ LOG4CXX_INFO(logger_, "TCP server socket loop is terminated.");
}
void TcpClientListener::StopLoop() {
LOG4CXX_AUTO_TRACE(logger_);
+ if (pipe_fds_[1] < 0) {
+ LOG4CXX_WARN(logger_, "StopLoop called in invalid state");
+ return;
+ }
+
thread_stop_requested_ = true;
- // We need to connect to the listening socket to unblock accept() call
- int byesocket = socket(AF_INET, SOCK_STREAM, 0);
- sockaddr_in server_address = {0};
- server_address.sin_family = AF_INET;
- server_address.sin_port = htons(port_);
- server_address.sin_addr.s_addr = INADDR_ANY;
- if (0 != connect(byesocket,
- reinterpret_cast<sockaddr*>(&server_address),
- sizeof(server_address))) {
- LOG4CXX_WARN_WITH_ERRNO(logger_, "Failed to connect byesocket");
- } else {
- // Can only shutdown socket if connected
- if (0 != shutdown(byesocket, SHUT_RDWR)) {
- LOG4CXX_WARN_WITH_ERRNO(logger_, "Failed to shutdown byesocket");
- }
+
+ char dummy[1] = {0};
+ int ret = write(pipe_fds_[1], dummy, sizeof(dummy));
+ if (ret <= 0) {
+ LOG4CXX_WARN_WITH_ERRNO(
+ logger_, "Failed to send stop message to TCP server socket loop");
}
- close(byesocket);
}
TransportAdapter::Error TcpClientListener::StartListening() {
LOG4CXX_AUTO_TRACE(logger_);
- if (thread_->is_running()) {
+ if (started_) {
LOG4CXX_WARN(
logger_,
"TransportAdapter::BAD_STATE. Listener has already been started");
return TransportAdapter::BAD_STATE;
}
- if (!thread_->start()) {
- LOG4CXX_ERROR(logger_, "Tcp client listener thread start failed");
+ if (!interface_listener_->Start()) {
return TransportAdapter::FAIL;
}
+
+ if (!IsListeningOnSpecificInterface()) {
+ TransportAdapter::Error ret = StartListeningThread();
+ if (TransportAdapter::OK != ret) {
+ LOG4CXX_ERROR(logger_, "Tcp client listener thread start failed");
+ interface_listener_->Stop();
+ return ret;
+ }
+ }
+
+ started_ = true;
LOG4CXX_INFO(logger_, "Tcp client listener has started successfully");
return TransportAdapter::OK;
}
@@ -319,16 +390,286 @@ TcpClientListener::ListeningThreadDelegate::ListeningThreadDelegate(
TransportAdapter::Error TcpClientListener::StopListening() {
LOG4CXX_AUTO_TRACE(logger_);
- if (!thread_->is_running()) {
+ if (!started_) {
LOG4CXX_DEBUG(logger_, "TcpClientListener is not running now");
return TransportAdapter::BAD_STATE;
}
- thread_->join();
+ interface_listener_->Stop();
+
+ StopListeningThread();
+ started_ = false;
LOG4CXX_INFO(logger_, "Tcp client listener has stopped successfully");
return TransportAdapter::OK;
}
+TransportAdapter::Error TcpClientListener::StartListeningThread() {
+ LOG4CXX_AUTO_TRACE(logger_);
+
+ // StartListening() can be called from multiple threads
+ sync_primitives::AutoLock auto_lock(start_stop_lock_);
+
+ if (pipe_fds_[0] < 0 || pipe_fds_[1] < 0) {
+ // recreate the pipe every time, so that the thread loop will not get
+ // leftover
+ // data inside pipe after it is started
+ if (pipe(pipe_fds_) != 0) {
+ LOG4CXX_ERROR_WITH_ERRNO(logger_, "Failed to create internal pipe");
+ return TransportAdapter::FAIL;
+ }
+ if (!SetNonblocking(pipe_fds_[0])) {
+ LOG4CXX_WARN(logger_, "Failed to configure pipe to non-blocking");
+ }
+ }
+
+ thread_stop_requested_ = false;
+
+ if (!thread_->start()) {
+ return TransportAdapter::FAIL;
+ }
+ return TransportAdapter::OK;
+}
+
+TransportAdapter::Error TcpClientListener::StopListeningThread() {
+ LOG4CXX_AUTO_TRACE(logger_);
+
+ // StopListening() can be called from multiple threads
+ sync_primitives::AutoLock auto_lock(start_stop_lock_);
+
+ thread_->join();
+
+ close(pipe_fds_[1]);
+ pipe_fds_[1] = -1;
+ close(pipe_fds_[0]);
+ pipe_fds_[0] = -1;
+
+ return TransportAdapter::OK;
+}
+
+void TcpClientListener::OnIPAddressUpdated(const std::string ipv4_addr,
+ const std::string ipv6_addr) {
+ LOG4CXX_AUTO_TRACE(logger_);
+
+ // Since we only create a TCP socket with IPv4 option (AF_INET), currently we
+ // do not use IPv6 address.
+ if (ipv4_addr != current_ip_address_) {
+ if (IsListeningOnSpecificInterface()) {
+ if (!current_ip_address_.empty()) {
+ // the server socket is running, terminate it
+ LOG4CXX_DEBUG(logger_,
+ "Stopping current TCP server socket on "
+ << designated_interface_);
+ StopOnNetworkInterface();
+ }
+ if (!ipv4_addr.empty()) {
+ // start (or restart) server socket with the new IP address
+ LOG4CXX_DEBUG(
+ logger_, "Starting TCP server socket on " << designated_interface_);
+ StartOnNetworkInterface();
+ }
+ }
+
+ current_ip_address_ = ipv4_addr;
+
+ std::string enabled = !current_ip_address_.empty() ? "true" : "false";
+ std::ostringstream oss;
+ oss << port_;
+
+ TransportConfig config;
+ config.insert(std::make_pair(tc_enabled, enabled));
+ config.insert(std::make_pair(tc_tcp_ip_address, current_ip_address_));
+ config.insert(std::make_pair(tc_tcp_port, oss.str()));
+
+ controller_->TransportConfigUpdated(config);
+ }
+}
+
+bool TcpClientListener::StartOnNetworkInterface() {
+ LOG4CXX_AUTO_TRACE(logger_);
+
+ // this method is only for the case that network interface is specified
+ if (IsListeningOnSpecificInterface()) {
+ {
+ // make sure that two threads will not update socket_ at the same time
+ sync_primitives::AutoLock auto_lock(start_stop_lock_);
+ if (socket_ < 0) {
+ socket_ = CreateIPv4ServerSocket(port_, designated_interface_);
+ if (-1 == socket_) {
+ LOG4CXX_WARN(logger_, "Failed to create TCP socket");
+ return false;
+ }
+ }
+ }
+
+ if (TransportAdapter::OK != StartListeningThread()) {
+ LOG4CXX_WARN(logger_, "Failed to start TCP client listener");
+ return false;
+ }
+ LOG4CXX_INFO(logger_,
+ "TCP server socket started on " << designated_interface_);
+ }
+ return true;
+}
+
+bool TcpClientListener::StopOnNetworkInterface() {
+ LOG4CXX_AUTO_TRACE(logger_);
+
+ if (IsListeningOnSpecificInterface()) {
+ if (TransportAdapter::OK != StopListeningThread()) {
+ LOG4CXX_WARN(logger_, "Failed to stop TCP client listener");
+ return false;
+ }
+
+ {
+ sync_primitives::AutoLock auto_lock(start_stop_lock_);
+ DestroyServerSocket(socket_);
+ socket_ = -1;
+ }
+
+ LOG4CXX_INFO(logger_,
+ "TCP server socket on " << designated_interface_
+ << " stopped");
+ }
+ return true;
+}
+
+bool TcpClientListener::IsListeningOnSpecificInterface() const {
+ return !designated_interface_.empty();
+}
+
+int TcpClientListener::CreateIPv4ServerSocket(
+ uint16_t port, const std::string interface_name) {
+ LOG4CXX_AUTO_TRACE(logger_);
+
+ struct in_addr ipv4_address;
+ memset(&ipv4_address, 0, sizeof(ipv4_address));
+ if (interface_name.empty()) {
+ ipv4_address.s_addr = htonl(INADDR_ANY);
+ } else if (!GetIPv4Address(interface_name, &ipv4_address)) {
+ return -1;
+ }
+
+ int sock = socket(AF_INET, SOCK_STREAM, 0);
+ if (-1 == sock) {
+ LOG4CXX_ERROR_WITH_ERRNO(logger_, "Failed to create socket");
+ return -1;
+ }
+
+ sockaddr_in server_address = {0};
+ server_address.sin_family = AF_INET;
+ server_address.sin_port = htons(port);
+ server_address.sin_addr = ipv4_address;
+
+ int optval = 1;
+ if (0 !=
+ setsockopt(sock, SOL_SOCKET, SO_REUSEADDR, &optval, sizeof(optval))) {
+ LOG4CXX_WARN_WITH_ERRNO(logger_, "setsockopt SO_REUSEADDR failed");
+ }
+
+ if (bind(sock,
+ reinterpret_cast<sockaddr*>(&server_address),
+ sizeof(server_address)) != 0) {
+ LOG4CXX_ERROR_WITH_ERRNO(logger_, "bind() failed");
+ close(sock);
+ return -1;
+ }
+
+ const int kBacklog = 128;
+ if (0 != listen(sock, kBacklog)) {
+ LOG4CXX_ERROR_WITH_ERRNO(logger_, "listen() failed");
+ close(sock);
+ return -1;
+ }
+
+ return sock;
+}
+
+void TcpClientListener::DestroyServerSocket(int sock) {
+ LOG4CXX_AUTO_TRACE(logger_);
+ if (sock >= 0) {
+ if (shutdown(sock, SHUT_RDWR) != 0) {
+ LOG4CXX_ERROR_WITH_ERRNO(logger_, "Failed to shutdown socket");
+ }
+ if (close(sock) != 0) {
+ LOG4CXX_ERROR_WITH_ERRNO(logger_, "Failed to close socket");
+ }
+ }
+}
+
+bool TcpClientListener::GetIPv4Address(const std::string interface_name,
+ struct in_addr* ip_address) {
+ LOG4CXX_AUTO_TRACE(logger_);
+
+#ifdef BUILD_TESTS
+ if (testing_) {
+ // don't actually call getifaddrs(), instead return a dummy address of
+ // INADDR_LOOPBACK
+ struct in_addr dummy_addr;
+ dummy_addr.s_addr = htonl(INADDR_LOOPBACK);
+
+ if (ip_address != NULL) {
+ *ip_address = dummy_addr;
+ }
+ return true;
+ }
+#endif // BUILD_TESTS
+
+ struct ifaddrs* if_list;
+ if (getifaddrs(&if_list) != 0) {
+ LOG4CXX_WARN(logger_, "getifaddrs failed");
+ return false;
+ }
+
+ struct ifaddrs* interface;
+ bool found = false;
+
+ for (interface = if_list; interface != NULL;
+ interface = interface->ifa_next) {
+ if (interface->ifa_name == NULL) {
+ continue;
+ }
+ if (interface_name == interface->ifa_name) {
+ if (interface->ifa_addr == NULL) {
+ continue;
+ }
+ switch (interface->ifa_addr->sa_family) {
+ case AF_INET: {
+ struct sockaddr_in* addr =
+ reinterpret_cast<struct sockaddr_in*>(interface->ifa_addr);
+ if (ip_address != NULL) {
+ *ip_address = addr->sin_addr;
+ }
+ found = true;
+ break;
+ }
+ default:
+ break;
+ }
+ }
+ }
+
+ freeifaddrs(if_list);
+
+ return found;
+}
+
+static bool SetNonblocking(int s) {
+ int prev_flag = fcntl(s, F_GETFL, 0);
+ if (prev_flag == -1) {
+ LOG4CXX_ERROR_WITH_ERRNO(logger_, "Failed to acquire socket flag");
+ return false;
+ }
+
+ int ret = fcntl(s, F_SETFL, prev_flag | O_NONBLOCK);
+ if (ret == -1) {
+ LOG4CXX_ERROR_WITH_ERRNO(logger_,
+ "Failed to configure socket to non-blocking");
+ return false;
+ }
+
+ return true;
+}
+
} // namespace transport_adapter
} // namespace transport_manager
diff --git a/src/components/transport_manager/src/tcp/tcp_transport_adapter.cc b/src/components/transport_manager/src/tcp/tcp_transport_adapter.cc
index 0e9e63263b..f475912401 100644
--- a/src/components/transport_manager/src/tcp/tcp_transport_adapter.cc
+++ b/src/components/transport_manager/src/tcp/tcp_transport_adapter.cc
@@ -2,6 +2,9 @@
* Copyright (c) 2017, Ford Motor Company
* All rights reserved.
*
+ * Copyright (c) 2018 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:
*
@@ -13,7 +16,7 @@
* disclaimer in the documentation and/or other materials provided with the
* distribution.
*
- * Neither the name of the Ford Motor Company nor the names of its contributors
+ * Neither the name 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.
*
@@ -55,14 +58,35 @@ TcpTransportAdapter::TcpTransportAdapter(
const uint16_t port,
resumption::LastState& last_state,
const TransportManagerSettings& settings)
- : TransportAdapterImpl(NULL,
- new TcpConnectionFactory(this),
- new TcpClientListener(this, port, true),
- last_state,
- settings) {}
+ : TransportAdapterImpl(
+ NULL,
+ new TcpConnectionFactory(this),
+ new TcpClientListener(
+ this,
+ port,
+ true,
+ settings.transport_manager_tcp_adapter_network_interface()),
+ last_state,
+ settings) {}
TcpTransportAdapter::~TcpTransportAdapter() {}
+void TcpTransportAdapter::TransportConfigUpdated(
+ const TransportConfig& new_config) {
+ LOG4CXX_AUTO_TRACE(logger_);
+
+ transport_config_ = new_config;
+
+ // call the method of parent class to trigger OnTransportConfigUpdated() for
+ // the listeners
+ TransportAdapterImpl::TransportConfigUpdated(new_config);
+}
+
+TransportConfig TcpTransportAdapter::GetTransportConfiguration() const {
+ LOG4CXX_AUTO_TRACE(logger_);
+ return transport_config_;
+}
+
DeviceType TcpTransportAdapter::GetDeviceType() const {
return TCP;
}
diff --git a/src/components/transport_manager/src/transport_adapter/transport_adapter_impl.cc b/src/components/transport_manager/src/transport_adapter/transport_adapter_impl.cc
index bdacd68006..89459b8ebb 100644
--- a/src/components/transport_manager/src/transport_adapter/transport_adapter_impl.cc
+++ b/src/components/transport_manager/src/transport_adapter/transport_adapter_impl.cc
@@ -2,6 +2,9 @@
* Copyright (c) 2017, Ford Motor Company
* All rights reserved.
*
+ * Copyright (c) 2018 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:
*
@@ -13,7 +16,7 @@
* disclaimer in the documentation and/or other materials provided with the
* distribution.
*
- * Neither the name of the Ford Motor Company nor the names of its contributors
+ * Neither the name 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.
*
@@ -43,6 +46,10 @@
namespace transport_manager {
namespace transport_adapter {
+const char* tc_enabled = "enabled";
+const char* tc_tcp_port = "tcp_port";
+const char* tc_tcp_ip_address = "tcp_ip_address";
+
CREATE_LOGGERPTR_GLOBAL(logger_, "TransportManager")
namespace {
// @deprecated DeviceTypes: PASA_AOA, PASA_BLUETOOTH, MME
@@ -54,7 +61,13 @@ DeviceTypes devicesType = {
std::make_pair(DeviceType::MME, std::string("USB_IOS")),
std::make_pair(DeviceType::IOS_BT, std::string("BLUETOOTH_IOS")),
std::make_pair(DeviceType::IOS_USB, std::string("USB_IOS")),
- std::make_pair(DeviceType::TCP, std::string("WIFI"))};
+ std::make_pair(DeviceType::TCP, std::string("WIFI")),
+ std::make_pair(DeviceType::IOS_USB_HOST_MODE,
+ std::string("USB_IOS_HOST_MODE")),
+ std::make_pair(DeviceType::IOS_USB_DEVICE_MODE,
+ std::string("USB_IOS_DEVICE_MODE")),
+ std::make_pair(DeviceType::IOS_CARPLAY_WIRELESS,
+ std::string("CARPLAY_WIRELESS_IOS"))};
}
TransportAdapterImpl::TransportAdapterImpl(
@@ -695,6 +708,16 @@ void TransportAdapterImpl::DataSendFailed(
LOG4CXX_TRACE(logger_, "exit");
}
+void TransportAdapterImpl::TransportConfigUpdated(
+ const TransportConfig& new_config) {
+ LOG4CXX_AUTO_TRACE(logger_);
+ for (TransportAdapterListenerList::iterator it = listeners_.begin();
+ it != listeners_.end();
+ ++it) {
+ (*it)->OnTransportConfigUpdated(this);
+ }
+}
+
void TransportAdapterImpl::DoTransportSwitch() const {
LOG4CXX_AUTO_TRACE(logger_);
std::for_each(
diff --git a/src/components/transport_manager/src/transport_adapter/transport_adapter_listener_impl.cc b/src/components/transport_manager/src/transport_adapter/transport_adapter_listener_impl.cc
index f1181ce921..b0ec3c8f8e 100644
--- a/src/components/transport_manager/src/transport_adapter/transport_adapter_listener_impl.cc
+++ b/src/components/transport_manager/src/transport_adapter/transport_adapter_listener_impl.cc
@@ -2,6 +2,9 @@
* Copyright (c) 2014, Ford Motor Company
* All rights reserved.
*
+ * Copyright (c) 2018 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:
*
@@ -13,7 +16,7 @@
* disclaimer in the documentation and/or other materials provided with the
* distribution.
*
- * Neither the name of the Ford Motor Company nor the names of its contributors
+ * Neither the name 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.
*
@@ -376,4 +379,23 @@ void TransportAdapterListenerImpl::OnTransportSwitchRequested(
LOG4CXX_WARN(logger_, "Failed to receive event from device");
}
}
+
+void TransportAdapterListenerImpl::OnTransportConfigUpdated(
+ const transport_adapter::TransportAdapter* adapter) {
+ LOG4CXX_AUTO_TRACE(logger_);
+
+ const TransportAdapterEvent event(EventTypeEnum::ON_TRANSPORT_CONFIG_UPDATED,
+ transport_adapter_,
+ "",
+ 0,
+ ::protocol_handler::RawMessagePtr(),
+ BaseErrorPtr());
+
+ if (transport_manager_ != NULL &&
+ transport_manager::E_SUCCESS !=
+ transport_manager_->ReceiveEventFromDevice(event)) {
+ LOG4CXX_WARN(logger_, "Failed to receive event from device");
+ }
+}
+
} // namespace transport_manager
diff --git a/src/components/transport_manager/src/transport_manager_impl.cc b/src/components/transport_manager/src/transport_manager_impl.cc
index a364220a64..764accf7fe 100644
--- a/src/components/transport_manager/src/transport_manager_impl.cc
+++ b/src/components/transport_manager/src/transport_manager_impl.cc
@@ -2,6 +2,9 @@
* Copyright (c) 2017, Ford Motor Company
* All rights reserved.
*
+ * Copyright (c) 2018 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:
*
@@ -13,7 +16,7 @@
* disclaimer in the documentation and/or other materials provided with the
* distribution.
*
- * Neither the name of the Ford Motor Company nor the names of its contributors
+ * Neither the name 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.
*
@@ -1144,6 +1147,13 @@ void TransportManagerImpl::Handle(TransportAdapterEvent event) {
LOG4CXX_DEBUG(logger_, "eevent_type = ON_UNEXPECTED_DISCONNECT");
break;
}
+ case EventTypeEnum::ON_TRANSPORT_CONFIG_UPDATED: {
+ LOG4CXX_DEBUG(logger_, "event_type = ON_TRANSPORT_CONFIG_UPDATED");
+ transport_adapter::TransportConfig config =
+ event.transport_adapter->GetTransportConfiguration();
+ RaiseEvent(&TransportManagerListener::OnTransportConfigUpdated, config);
+ break;
+ }
} // switch
LOG4CXX_TRACE(logger_, "exit");
}
diff --git a/src/components/transport_manager/test/CMakeLists.txt b/src/components/transport_manager/test/CMakeLists.txt
index 41aae296ac..240784436b 100644
--- a/src/components/transport_manager/test/CMakeLists.txt
+++ b/src/components/transport_manager/test/CMakeLists.txt
@@ -42,11 +42,18 @@ include_directories(
)
set(EXCLUDE_PATHS
+ platform_specific
raw_message_matcher.cc
)
collect_sources(SOURCES "${CMAKE_CURRENT_SOURCE_DIR}" "${EXCLUDE_PATHS}")
+set(PLATFORM_DEPENDENT_SOURCES)
+if (CMAKE_SYSTEM_NAME STREQUAL "Linux")
+ collect_sources(PLATFORM_DEPENDENT_SOURCES platform_specific/linux)
+endif()
+list(APPEND SOURCES ${PLATFORM_DEPENDENT_SOURCES})
+
set(LIBRARIES
gmock
ConfigProfile
diff --git a/src/components/transport_manager/test/include/transport_manager/tcp/mock_tcp_client_listener.h b/src/components/transport_manager/test/include/transport_manager/tcp/mock_tcp_client_listener.h
new file mode 100644
index 0000000000..b7db7c7e64
--- /dev/null
+++ b/src/components/transport_manager/test/include/transport_manager/tcp/mock_tcp_client_listener.h
@@ -0,0 +1,66 @@
+/*
+ * Copyright (c) 2018 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 its contributors
+ * may be used to endorse or promote products derived from this software
+ * without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+ * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef SRC_COMPONENTS_TRANSPORT_MANAGER_TEST_INCLUDE_TRANSPORT_MANAGER_TCP_MOCK_TCP_CLIENT_LISTENER_H_
+#define SRC_COMPONENTS_TRANSPORT_MANAGER_TEST_INCLUDE_TRANSPORT_MANAGER_TCP_MOCK_TCP_CLIENT_LISTENER_H_
+
+#include "gmock/gmock.h"
+#include "transport_manager/tcp/tcp_client_listener.h"
+
+namespace test {
+namespace components {
+namespace transport_manager_test {
+
+using namespace ::transport_manager::transport_adapter;
+
+class MockTcpClientListener : public TcpClientListener {
+ public:
+ MockTcpClientListener(TransportAdapterController* controller,
+ uint16_t port,
+ bool enable_keepalive,
+ const std::string designated_interface = "")
+ : TcpClientListener(
+ controller, port, enable_keepalive, designated_interface) {}
+ MOCK_METHOD0(Init, TransportAdapter::Error());
+ MOCK_METHOD0(Terminate, void());
+ MOCK_CONST_METHOD0(IsInitialised, bool());
+ MOCK_METHOD0(StartListening, TransportAdapter::Error());
+ MOCK_METHOD0(StopListening, TransportAdapter::Error());
+ MOCK_METHOD2(OnIPAddressUpdated,
+ void(const std::string ipv4_addr, const std::string ipv6_addr));
+};
+
+} // namespace transport_manager_test
+} // namespace components
+} // namespace test
+
+#endif // SRC_COMPONENTS_TRANSPORT_MANAGER_TEST_INCLUDE_TRANSPORT_MANAGER_TCP_MOCK_TCP_CLIENT_LISTENER_H_
diff --git a/src/components/transport_manager/test/include/transport_manager/transport_adapter/mock_transport_adapter_listener.h b/src/components/transport_manager/test/include/transport_manager/transport_adapter/mock_transport_adapter_listener.h
index 03e7630e8b..dce23189c8 100644
--- a/src/components/transport_manager/test/include/transport_manager/transport_adapter/mock_transport_adapter_listener.h
+++ b/src/components/transport_manager/test/include/transport_manager/transport_adapter/mock_transport_adapter_listener.h
@@ -122,6 +122,8 @@ class MockTransportAdapterListener : public TransportAdapterListener {
const ApplicationHandle&));
MOCK_METHOD1(OnTransportSwitchRequested,
void(const TransportAdapter* transport_adapter));
+ MOCK_METHOD1(OnTransportConfigUpdated,
+ void(const TransportAdapter* transport_adapter));
};
} // namespace transport_manager_test
diff --git a/src/components/transport_manager/test/network_interface_listener_test.cc b/src/components/transport_manager/test/network_interface_listener_test.cc
new file mode 100644
index 0000000000..7a5b0315ab
--- /dev/null
+++ b/src/components/transport_manager/test/network_interface_listener_test.cc
@@ -0,0 +1,89 @@
+/*
+ * Copyright (c) 2018 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 its contributors
+ * may be used to endorse or promote products derived from this software
+ * without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+ * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include <arpa/inet.h>
+#include <net/if.h>
+#include <time.h>
+
+#include "gtest/gtest.h"
+#include "transport_manager/tcp/network_interface_listener_impl.h"
+#include "transport_manager/tcp/mock_tcp_client_listener.h"
+#include "utils/test_async_waiter.h"
+#include "utils/threads/thread.h"
+
+namespace test {
+namespace components {
+namespace transport_manager_test {
+
+namespace {
+const long kThreadStartWaitMsec = 10;
+const uint32_t kStartNotificationTimeoutMsec = 500;
+}
+
+using ::testing::_;
+using ::testing::AtLeast;
+using ::testing::SaveArg;
+
+class NetworkInterfaceListenerTest : public ::testing::Test {
+ public:
+ NetworkInterfaceListenerTest()
+ : interface_listener_impl_(NULL)
+ , mock_tcp_client_listener_(NULL, 0, false, "") {}
+
+ virtual ~NetworkInterfaceListenerTest() {}
+
+ protected:
+ struct InterfaceEntry {
+ const char* name;
+ const char* ipv4_address;
+ const char* ipv6_address;
+ unsigned int flags;
+ };
+
+ void Deinit() {
+ delete interface_listener_impl_;
+ }
+
+ void SleepFor(long msec) const {
+ if (msec > 0) {
+ struct timespec ts = {0, msec * 1000 * 1000};
+ nanosleep(&ts, NULL);
+ }
+ }
+
+ NetworkInterfaceListenerImpl* interface_listener_impl_;
+ MockTcpClientListener mock_tcp_client_listener_;
+};
+
+} // namespace transport_manager_test
+} // namespace components
+} // namespace test
diff --git a/src/components/transport_manager/test/platform_specific/linux/linux_network_interface_listener_test.cc b/src/components/transport_manager/test/platform_specific/linux/linux_network_interface_listener_test.cc
new file mode 100644
index 0000000000..864cb9d657
--- /dev/null
+++ b/src/components/transport_manager/test/platform_specific/linux/linux_network_interface_listener_test.cc
@@ -0,0 +1,599 @@
+/*
+ * Copyright (c) 2018 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 its contributors
+ * may be used to endorse or promote products derived from this software
+ * without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+ * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include <arpa/inet.h>
+#include <net/if.h>
+#include <time.h>
+
+#include "gtest/gtest.h"
+#include "platform_specific_network_interface_listener_impl.h"
+#include "transport_manager/tcp/mock_tcp_client_listener.h"
+#include "utils/test_async_waiter.h"
+#include "utils/threads/thread.h"
+
+namespace test {
+namespace components {
+namespace transport_manager_test {
+
+namespace {
+const long kThreadStartWaitMsec = 10;
+const uint32_t kStartNotificationTimeoutMsec = 500;
+}
+
+using ::testing::_;
+using ::testing::AtLeast;
+using ::testing::SaveArg;
+
+class NetworkInterfaceListenerTest : public ::testing::Test {
+ public:
+ NetworkInterfaceListenerTest()
+ : interface_listener_impl_(NULL)
+ , mock_tcp_client_listener_(NULL, 0, false, "") {}
+
+ virtual ~NetworkInterfaceListenerTest() {}
+
+ protected:
+ struct InterfaceEntry {
+ const char* name;
+ const char* ipv4_address;
+ const char* ipv6_address;
+ unsigned int flags;
+ };
+
+ void Init(const std::string interface_name) {
+ interface_listener_impl_ = new PlatformSpecificNetworkInterfaceListener(
+ &mock_tcp_client_listener_, interface_name);
+ // disable events from actual network interfaces
+ interface_listener_impl_->SetTesting(true);
+ }
+
+ void Deinit() {
+ delete interface_listener_impl_;
+ }
+
+ void SetDummyInterfaceTable(struct InterfaceEntry* entries) {
+ InterfaceStatusTable dummy_table;
+
+ while (entries->name != NULL) {
+ InterfaceStatus status;
+ if (entries->ipv4_address != NULL) {
+ struct in_addr addr;
+ ASSERT_EQ(1, inet_pton(AF_INET, entries->ipv4_address, &addr));
+ status.SetIPv4Address(&addr);
+ }
+ if (entries->ipv6_address != NULL) {
+ struct in6_addr addr6;
+ ASSERT_EQ(1, inet_pton(AF_INET6, entries->ipv6_address, &addr6));
+ status.SetIPv6Address(&addr6);
+ }
+ status.SetFlags(entries->flags);
+
+ dummy_table.insert(std::make_pair(entries->name, status));
+ entries++;
+ }
+
+ interface_listener_impl_->OverwriteStatusTable(dummy_table);
+ }
+
+ void SleepFor(long msec) const {
+ if (msec > 0) {
+ struct timespec ts = {0, msec * 1000 * 1000};
+ nanosleep(&ts, NULL);
+ }
+ }
+
+ PlatformSpecificNetworkInterfaceListener* interface_listener_impl_;
+ MockTcpClientListener mock_tcp_client_listener_;
+};
+
+TEST_F(NetworkInterfaceListenerTest, Init) {
+ Init("");
+
+ EXPECT_TRUE(interface_listener_impl_->Init());
+ EXPECT_TRUE(0 <= interface_listener_impl_->GetSocket());
+
+ Deinit();
+}
+
+TEST_F(NetworkInterfaceListenerTest, Deinit) {
+ Init("");
+ EXPECT_TRUE(interface_listener_impl_->Init());
+
+ interface_listener_impl_->Deinit();
+
+ EXPECT_EQ(-1, interface_listener_impl_->GetSocket());
+
+ Deinit();
+}
+
+TEST_F(NetworkInterfaceListenerTest, Start_success) {
+ Init("");
+ EXPECT_TRUE(interface_listener_impl_->Init());
+
+ struct InterfaceEntry entries[] = {
+ {"dummy_int0", "1.2.3.4", NULL, IFF_UP | IFF_RUNNING},
+ {NULL, NULL, NULL, 0}};
+ SetDummyInterfaceTable(entries);
+
+ // after stated, it is expected that the listener notifies current IP address
+ // (if it's available)
+ TestAsyncWaiter waiter;
+ EXPECT_CALL(mock_tcp_client_listener_,
+ OnIPAddressUpdated(entries[0].ipv4_address, ""))
+ .WillOnce(NotifyTestAsyncWaiter(&waiter));
+
+ EXPECT_TRUE(interface_listener_impl_->Start());
+
+ // the "isThreadRunning_" flag of the thread will be update slightly later
+ SleepFor(kThreadStartWaitMsec);
+
+ EXPECT_TRUE(interface_listener_impl_->GetThread()->is_running());
+
+ EXPECT_TRUE(waiter.WaitFor(1, kStartNotificationTimeoutMsec));
+
+ Deinit();
+}
+
+TEST_F(NetworkInterfaceListenerTest, Start_twice) {
+ Init("");
+ EXPECT_TRUE(interface_listener_impl_->Init());
+
+ // ignore OnIPAddressUpdated call
+ EXPECT_CALL(mock_tcp_client_listener_, OnIPAddressUpdated(_, _))
+ .Times(AtLeast(0));
+
+ EXPECT_TRUE(interface_listener_impl_->Start());
+ SleepFor(kThreadStartWaitMsec);
+
+ EXPECT_FALSE(interface_listener_impl_->Start());
+
+ Deinit();
+}
+
+TEST_F(NetworkInterfaceListenerTest, Stop_success) {
+ Init("");
+ EXPECT_TRUE(interface_listener_impl_->Init());
+
+ // ignore OnIPAddressUpdated call
+ EXPECT_CALL(mock_tcp_client_listener_, OnIPAddressUpdated(_, _))
+ .Times(AtLeast(0));
+
+ EXPECT_TRUE(interface_listener_impl_->Start());
+ SleepFor(kThreadStartWaitMsec);
+
+ EXPECT_TRUE(interface_listener_impl_->Stop());
+ SleepFor(kThreadStartWaitMsec);
+
+ EXPECT_FALSE(interface_listener_impl_->GetThread()->is_running());
+
+ Deinit();
+}
+
+TEST_F(NetworkInterfaceListenerTest, Stop_twice) {
+ Init("");
+ EXPECT_TRUE(interface_listener_impl_->Init());
+
+ // ignore OnIPAddressUpdated call
+ EXPECT_CALL(mock_tcp_client_listener_, OnIPAddressUpdated(_, _))
+ .Times(AtLeast(0));
+
+ EXPECT_TRUE(interface_listener_impl_->Start());
+ SleepFor(kThreadStartWaitMsec);
+
+ EXPECT_TRUE(interface_listener_impl_->Stop());
+
+ EXPECT_FALSE(interface_listener_impl_->Stop());
+
+ Deinit();
+}
+
+TEST_F(NetworkInterfaceListenerTest, Stop_without_Start) {
+ Init("");
+ EXPECT_TRUE(interface_listener_impl_->Init());
+
+ EXPECT_FALSE(interface_listener_impl_->Stop());
+
+ Deinit();
+}
+
+TEST_F(NetworkInterfaceListenerTest, DesignatedInterface_IPAddressChanged) {
+ Init("dummy_int0");
+ EXPECT_TRUE(interface_listener_impl_->Init());
+
+ struct InterfaceEntry entries1[] = {
+ {"dummy_int0", "1.2.3.4", NULL, IFF_UP | IFF_RUNNING},
+ {NULL, NULL, NULL, 0}};
+ struct InterfaceEntry entries2[] = {
+ {"dummy_int0", "5.6.7.8", NULL, IFF_UP | IFF_RUNNING},
+ {NULL, NULL, NULL, 0}};
+
+ SetDummyInterfaceTable(entries1);
+
+ EXPECT_CALL(mock_tcp_client_listener_,
+ OnIPAddressUpdated(entries1[0].ipv4_address, "")).Times(1);
+
+ // this test case doesn't call Start() - we only check the behavior of
+ // NotifyIPAddresses()
+ interface_listener_impl_->testCallNotifyIPAddresses();
+
+ SetDummyInterfaceTable(entries2);
+
+ EXPECT_CALL(mock_tcp_client_listener_,
+ OnIPAddressUpdated(entries2[0].ipv4_address, "")).Times(1);
+
+ interface_listener_impl_->testCallNotifyIPAddresses();
+
+ Deinit();
+}
+
+TEST_F(NetworkInterfaceListenerTest, DesignatedInterface_IPAddressNotChanged) {
+ Init("dummy_int0");
+ EXPECT_TRUE(interface_listener_impl_->Init());
+
+ struct InterfaceEntry entries1[] = {
+ {"dummy_int0", "1.2.3.4", NULL, IFF_UP | IFF_RUNNING},
+ {"dummy_int1", "10.10.10.12", NULL, IFF_UP | IFF_RUNNING},
+ {NULL, NULL, NULL, 0}};
+ struct InterfaceEntry entries2[] = {
+ {"dummy_int0", "1.2.3.4", NULL, IFF_UP | IFF_RUNNING},
+ {"dummy_int1", "172.16.23.30", NULL, IFF_UP | IFF_RUNNING},
+ {NULL, NULL, NULL, 0}};
+
+ SetDummyInterfaceTable(entries1);
+
+ EXPECT_CALL(mock_tcp_client_listener_,
+ OnIPAddressUpdated(entries1[0].ipv4_address, "")).Times(1);
+
+ interface_listener_impl_->testCallNotifyIPAddresses();
+
+ SetDummyInterfaceTable(entries2);
+
+ // OnIPAddressUpdated() shouldn't be notified
+ EXPECT_CALL(mock_tcp_client_listener_, OnIPAddressUpdated(_, _)).Times(0);
+
+ interface_listener_impl_->testCallNotifyIPAddresses();
+
+ Deinit();
+}
+
+TEST_F(NetworkInterfaceListenerTest, DesignatedInterface_GoesUnavailable) {
+ Init("dummy_int0");
+ EXPECT_TRUE(interface_listener_impl_->Init());
+
+ struct InterfaceEntry entries1[] = {
+ {"dummy_int0", "1.2.3.4", "fdc2:12af:327a::1", IFF_UP | IFF_RUNNING},
+ {"dummy_int1", "10.10.10.12", NULL, IFF_UP | IFF_RUNNING},
+ {NULL, NULL, NULL, 0}};
+ struct InterfaceEntry entries2[] = {
+ {"dummy_int0", "1.2.3.4", "fdc2:12af:327a::1", IFF_UP},
+ {"dummy_int1", "10.10.10.12", NULL, IFF_UP | IFF_RUNNING},
+ {NULL, NULL, NULL, 0}};
+
+ SetDummyInterfaceTable(entries1);
+
+ EXPECT_CALL(mock_tcp_client_listener_,
+ OnIPAddressUpdated(entries1[0].ipv4_address,
+ entries1[0].ipv6_address)).Times(1);
+
+ interface_listener_impl_->testCallNotifyIPAddresses();
+
+ SetDummyInterfaceTable(entries2);
+
+ EXPECT_CALL(mock_tcp_client_listener_, OnIPAddressUpdated("", "")).Times(1);
+
+ interface_listener_impl_->testCallNotifyIPAddresses();
+
+ Deinit();
+}
+
+TEST_F(NetworkInterfaceListenerTest, DesignatedInterface_Removed) {
+ Init("dummy_int0");
+ EXPECT_TRUE(interface_listener_impl_->Init());
+
+ struct InterfaceEntry entries1[] = {
+ {"dummy_int0", "1.2.3.4", "fdc2:12af:327a::1", IFF_UP | IFF_RUNNING},
+ {"dummy_int1", "10.10.10.12", NULL, IFF_UP | IFF_RUNNING},
+ {NULL, NULL, NULL, 0}};
+ struct InterfaceEntry entries2[] = {
+ {"dummy_int1", "10.10.10.12", NULL, IFF_UP | IFF_RUNNING},
+ {NULL, NULL, NULL, 0}};
+
+ SetDummyInterfaceTable(entries1);
+
+ EXPECT_CALL(mock_tcp_client_listener_,
+ OnIPAddressUpdated(entries1[0].ipv4_address,
+ entries1[0].ipv6_address)).Times(1);
+
+ interface_listener_impl_->testCallNotifyIPAddresses();
+
+ SetDummyInterfaceTable(entries2);
+
+ EXPECT_CALL(mock_tcp_client_listener_, OnIPAddressUpdated("", "")).Times(1);
+
+ interface_listener_impl_->testCallNotifyIPAddresses();
+
+ Deinit();
+}
+
+TEST_F(NetworkInterfaceListenerTest, DesignatedInterface_Added) {
+ Init("dummy_int0");
+ EXPECT_TRUE(interface_listener_impl_->Init());
+
+ struct InterfaceEntry entries1[] = {
+ {"dummy_int1", "10.10.10.12", NULL, IFF_UP | IFF_RUNNING},
+ {NULL, NULL, NULL, 0}};
+ struct InterfaceEntry entries2[] = {
+ {"dummy_int1", "10.10.10.12", NULL, IFF_UP | IFF_RUNNING},
+ {"dummy_int0", "1.2.3.4", NULL, IFF_UP | IFF_RUNNING},
+ {NULL, NULL, NULL, 0}};
+
+ SetDummyInterfaceTable(entries1);
+
+ interface_listener_impl_->testCallNotifyIPAddresses();
+
+ SetDummyInterfaceTable(entries2);
+
+ EXPECT_CALL(mock_tcp_client_listener_,
+ OnIPAddressUpdated(entries2[1].ipv4_address, "")).Times(1);
+
+ interface_listener_impl_->testCallNotifyIPAddresses();
+
+ Deinit();
+}
+
+TEST_F(NetworkInterfaceListenerTest, AutoSelectInterface_SelectInterface) {
+ // automatically select network interface
+ Init("");
+ EXPECT_TRUE(interface_listener_impl_->Init());
+
+ struct InterfaceEntry entries[] = {
+ {"dummy_int1", "10.10.10.12", NULL, IFF_UP | IFF_RUNNING},
+ {"net_dummy2", "192.168.2.3", "fdc2:12af:327a::22", IFF_UP | IFF_RUNNING},
+ {NULL, NULL, NULL, 0}};
+
+ SetDummyInterfaceTable(entries);
+
+ std::string output_ipv4_address;
+ std::string output_ipv6_address;
+ EXPECT_CALL(mock_tcp_client_listener_, OnIPAddressUpdated(_, _))
+ .WillOnce(DoAll(SaveArg<0>(&output_ipv4_address),
+ SaveArg<1>(&output_ipv6_address)));
+
+ interface_listener_impl_->testCallNotifyIPAddresses();
+
+ std::string selected_interface =
+ interface_listener_impl_->GetSelectedInterfaceName();
+
+ // the interface listener should pick one of the interfaces
+ EXPECT_TRUE((selected_interface == entries[0].name &&
+ output_ipv4_address == entries[0].ipv4_address &&
+ output_ipv6_address == "") ||
+ (selected_interface == entries[1].name &&
+ output_ipv4_address == entries[1].ipv4_address &&
+ output_ipv6_address == entries[1].ipv6_address));
+
+ Deinit();
+}
+
+TEST_F(NetworkInterfaceListenerTest,
+ AutoSelectInterface_SkipUnavailableInterface) {
+ Init("");
+ EXPECT_TRUE(interface_listener_impl_->Init());
+
+ struct InterfaceEntry entries[] = {
+ {"dummy_int1", "10.10.10.12", NULL, IFF_UP},
+ {"net_dummy2", "192.168.2.3", "fdc2:12af:327a::22", IFF_UP | IFF_RUNNING},
+ {NULL, NULL, NULL, 0}};
+
+ SetDummyInterfaceTable(entries);
+
+ // dummy_int1 should not be selected
+ struct InterfaceEntry* expected = &entries[1];
+ EXPECT_CALL(mock_tcp_client_listener_,
+ OnIPAddressUpdated(expected->ipv4_address,
+ expected->ipv6_address)).Times(1);
+
+ interface_listener_impl_->testCallNotifyIPAddresses();
+
+ EXPECT_EQ(expected->name,
+ interface_listener_impl_->GetSelectedInterfaceName());
+
+ Deinit();
+}
+
+TEST_F(NetworkInterfaceListenerTest, AutoSelectInterface_SkipEmptyInterface) {
+ Init("");
+ EXPECT_TRUE(interface_listener_impl_->Init());
+
+ struct InterfaceEntry entries[] = {
+ {"dummy_int1", "10.10.10.12", NULL, IFF_UP | IFF_RUNNING},
+ {"net_dummy2", NULL, NULL, IFF_UP | IFF_RUNNING},
+ {NULL, NULL, NULL, 0}};
+
+ SetDummyInterfaceTable(entries);
+
+ // net_dummy2 should not be selected
+ struct InterfaceEntry* expected = &entries[0];
+ EXPECT_CALL(mock_tcp_client_listener_,
+ OnIPAddressUpdated(expected->ipv4_address, "")).Times(1);
+
+ interface_listener_impl_->testCallNotifyIPAddresses();
+
+ EXPECT_EQ(expected->name,
+ interface_listener_impl_->GetSelectedInterfaceName());
+
+ Deinit();
+}
+
+TEST_F(NetworkInterfaceListenerTest,
+ AutoSelectInterface_SkipLoopbackInterface) {
+ Init("");
+ EXPECT_TRUE(interface_listener_impl_->Init());
+
+ struct InterfaceEntry entries[] = {
+ {"dummy_int1", "10.10.10.12", NULL, IFF_UP | IFF_RUNNING | IFF_LOOPBACK},
+ {"net_dummy2", "192.168.2.3", "fdc2:12af:327a::22", IFF_UP | IFF_RUNNING},
+ {NULL, NULL, NULL, 0}};
+
+ // dummy_int1 should not be selected
+ struct InterfaceEntry* expected = &entries[1];
+ EXPECT_CALL(mock_tcp_client_listener_,
+ OnIPAddressUpdated(expected->ipv4_address,
+ expected->ipv6_address)).Times(1);
+
+ SetDummyInterfaceTable(entries);
+
+ interface_listener_impl_->testCallNotifyIPAddresses();
+
+ EXPECT_EQ(expected->name,
+ interface_listener_impl_->GetSelectedInterfaceName());
+
+ Deinit();
+}
+
+TEST_F(NetworkInterfaceListenerTest, AutoSelectInterface_DisableInterface) {
+ Init("");
+ EXPECT_TRUE(interface_listener_impl_->Init());
+
+ struct InterfaceEntry entries[] = {
+ {"net_dummy0", "192.168.2.3", "fdc2:12af:327a::22", IFF_UP | IFF_RUNNING},
+ {NULL, NULL, NULL, 0}};
+
+ EXPECT_CALL(mock_tcp_client_listener_, OnIPAddressUpdated(_, _)).Times(1);
+ SetDummyInterfaceTable(entries);
+
+ interface_listener_impl_->testCallNotifyIPAddresses();
+
+ // make the interface "not running"
+ entries[0].flags &= ~IFF_RUNNING;
+ SetDummyInterfaceTable(entries);
+
+ EXPECT_CALL(mock_tcp_client_listener_, OnIPAddressUpdated("", "")).Times(1);
+
+ interface_listener_impl_->testCallNotifyIPAddresses();
+
+ EXPECT_EQ("", interface_listener_impl_->GetSelectedInterfaceName());
+
+ Deinit();
+}
+
+TEST_F(NetworkInterfaceListenerTest, AutoSelectInterface_EnableInterface) {
+ Init("");
+ EXPECT_TRUE(interface_listener_impl_->Init());
+
+ struct InterfaceEntry entries[] = {
+ {"net_dummy0", "192.168.2.3", "fdc2:12af:327a::22", IFF_UP | IFF_RUNNING},
+ {NULL, NULL, NULL, 0}};
+
+ EXPECT_CALL(mock_tcp_client_listener_, OnIPAddressUpdated(_, _)).Times(1);
+ SetDummyInterfaceTable(entries);
+
+ interface_listener_impl_->testCallNotifyIPAddresses();
+
+ // make the interface "not running"
+ entries[0].flags &= ~IFF_RUNNING;
+ SetDummyInterfaceTable(entries);
+
+ EXPECT_CALL(mock_tcp_client_listener_, OnIPAddressUpdated(_, _)).Times(1);
+
+ interface_listener_impl_->testCallNotifyIPAddresses();
+
+ // make it running again
+ entries[0].flags |= IFF_RUNNING;
+ SetDummyInterfaceTable(entries);
+
+ EXPECT_CALL(mock_tcp_client_listener_,
+ OnIPAddressUpdated(entries[0].ipv4_address,
+ entries[0].ipv6_address)).Times(1);
+
+ interface_listener_impl_->testCallNotifyIPAddresses();
+
+ EXPECT_EQ(entries[0].name,
+ interface_listener_impl_->GetSelectedInterfaceName());
+
+ Deinit();
+}
+
+TEST_F(NetworkInterfaceListenerTest, AutoSelectInterface_SwitchInterface) {
+ Init("");
+ EXPECT_TRUE(interface_listener_impl_->Init());
+
+ struct InterfaceEntry entries[] = {
+ {"dummy_int1",
+ "10.10.10.12",
+ "fd53:ba79:241d:30c1::78",
+ IFF_UP | IFF_RUNNING},
+ {"net_dummy2", "192.168.2.3", "fdc2:12af:327a::22", IFF_UP | IFF_RUNNING},
+ {NULL, NULL, NULL, 0}};
+
+ EXPECT_CALL(mock_tcp_client_listener_, OnIPAddressUpdated(_, _)).Times(1);
+ SetDummyInterfaceTable(entries);
+
+ interface_listener_impl_->testCallNotifyIPAddresses();
+
+ const std::string selected_interface =
+ interface_listener_impl_->GetSelectedInterfaceName();
+ struct InterfaceEntry* selected = &entries[0];
+ while (selected->name != NULL) {
+ if (selected->name == selected_interface) {
+ break;
+ }
+ selected++;
+ }
+ ASSERT_TRUE(selected->name != NULL);
+
+ // make the interface "not running"
+ selected->flags &= ~IFF_RUNNING;
+ SetDummyInterfaceTable(entries);
+
+ struct InterfaceEntry* switched;
+ if (selected == &entries[0]) {
+ switched = &entries[1];
+ } else {
+ switched = &entries[0];
+ }
+
+ EXPECT_CALL(mock_tcp_client_listener_,
+ OnIPAddressUpdated(switched->ipv4_address,
+ switched->ipv6_address)).Times(1);
+
+ interface_listener_impl_->testCallNotifyIPAddresses();
+
+ EXPECT_EQ(switched->name,
+ interface_listener_impl_->GetSelectedInterfaceName());
+
+ Deinit();
+}
+
+} // namespace transport_manager_test
+} // namespace components
+} // namespace test
diff --git a/src/components/transport_manager/test/tcp_client_listener_test.cc b/src/components/transport_manager/test/tcp_client_listener_test.cc
index b179f63ece..7ab53915fe 100644
--- a/src/components/transport_manager/test/tcp_client_listener_test.cc
+++ b/src/components/transport_manager/test/tcp_client_listener_test.cc
@@ -2,6 +2,9 @@
* Copyright (c) 2015, Ford Motor Company
* All rights reserved.
*
+ * Copyright (c) 2018 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:
*
@@ -13,7 +16,7 @@
* disclaimer in the documentation and/or other materials provided with the
* distribution.
*
- * Neither the name of the Ford Motor Company nor the names of its contributors
+ * Neither the name 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.
*
@@ -30,21 +33,38 @@
* POSSIBILITY OF SUCH DAMAGE.
*/
+#include <netinet/in.h>
+#include <sys/socket.h>
+#include <sys/types.h>
+#include <unistd.h>
+#include <time.h>
+
#include "gtest/gtest.h"
#include "transport_manager/transport_adapter/mock_transport_adapter.h"
#include "transport_manager/tcp/tcp_client_listener.h"
+#include "transport_manager/tcp/network_interface_listener.h"
#include "transport_manager/mock_transport_manager.h"
#include "transport_manager/transport_adapter/transport_adapter_controller.h"
-#include "transport_manager/transport_adapter/device.h"
+#include "transport_manager/transport_adapter/mock_device.h"
+#include "utils/make_shared.h"
+#include "utils/test_async_waiter.h"
+#include "utils/threads/thread.h"
namespace test {
namespace components {
namespace transport_manager_test {
+using ::testing::_;
+using ::testing::AtLeast;
using ::testing::Return;
using namespace ::transport_manager;
using namespace ::transport_manager::transport_adapter;
+namespace {
+const long kThreadStartWaitMsec = 10;
+const uint32_t kConnectionCreatedTimeoutMsec = 200;
+}
+
class MockTransportAdapterController : public TransportAdapterController {
public:
MOCK_METHOD1(AddDevice, DeviceSptr(DeviceSptr device));
@@ -95,37 +115,491 @@ class MockTransportAdapterController : public TransportAdapterController {
MOCK_METHOD2(DeviceDisconnected,
void(const DeviceUID& device_handle,
const DisconnectDeviceError& error));
+ MOCK_METHOD1(TransportConfigUpdated,
+ void(const transport_manager::transport_adapter::TransportConfig&
+ new_config));
+};
+
+class MockNetworkInterfaceListener : public NetworkInterfaceListener {
+ public:
+ MOCK_METHOD0(Init, bool());
+ MOCK_METHOD0(Deinit, void());
+ MOCK_METHOD0(Start, bool());
+ MOCK_METHOD0(Stop, bool());
};
-class TcpClientListenerTest : public ::testing::Test {
+class TcpClientListenerTest : public ::testing::TestWithParam<std::string> {
public:
TcpClientListenerTest()
- : port_(0)
+ : port_(0) /* On Linux, binding to port 0 lets the system choose an
+ available port */
, enable_keep_alive_(false)
- , tcp_client_listener_(
- &adapter_controller_mock_, port_, enable_keep_alive_) {}
+ , interface_listener_mock_(NULL)
+ , tcp_client_listener_(NULL) {}
+ virtual ~TcpClientListenerTest() {
+ delete tcp_client_listener_;
+ }
protected:
+ void SetUp() OVERRIDE {
+ tcp_client_listener_ = new TcpClientListener(
+ &adapter_controller_mock_, port_, enable_keep_alive_, GetParam());
+ interface_listener_mock_ = new MockNetworkInterfaceListener();
+ tcp_client_listener_->set_testing(true);
+ tcp_client_listener_->set_network_interface_listener(
+ interface_listener_mock_);
+ }
+
+ bool InterfaceNameSpecified() const {
+ return "" != GetParam();
+ }
+
+ void SleepFor(long msec) const {
+ if (msec > 0) {
+ struct timespec ts = {0, msec * 1000 * 1000};
+ nanosleep(&ts, NULL);
+ }
+ }
+
uint16_t port_;
bool enable_keep_alive_;
MockTransportAdapterController adapter_controller_mock_;
- TcpClientListener tcp_client_listener_;
+ MockNetworkInterfaceListener* interface_listener_mock_;
+ TcpClientListener* tcp_client_listener_;
};
-TEST_F(TcpClientListenerTest, Ctor_test) {
- EXPECT_EQ(0, tcp_client_listener_.port());
- EXPECT_TRUE(NULL != tcp_client_listener_.thread());
- EXPECT_EQ(-1, tcp_client_listener_.get_socket());
+TEST_P(TcpClientListenerTest, Ctor_test) {
+ EXPECT_EQ(0, tcp_client_listener_->port());
+ EXPECT_TRUE(NULL != tcp_client_listener_->thread());
+ EXPECT_EQ(-1, tcp_client_listener_->get_socket());
+}
+
+TEST_P(TcpClientListenerTest, IsInitialised) {
+ // should return false until Init() is called
+ EXPECT_FALSE(tcp_client_listener_->IsInitialised());
+}
+
+TEST_P(TcpClientListenerTest, Init) {
+ EXPECT_CALL(*interface_listener_mock_, Init()).WillOnce(Return(true));
+
+ EXPECT_EQ(TransportAdapter::OK, tcp_client_listener_->Init());
+
+ if (InterfaceNameSpecified()) {
+ // TcpClientListener will create socket once IP address of the network is
+ // notified.
+ EXPECT_EQ(-1, tcp_client_listener_->get_socket());
+ } else {
+ // Interface name is not designated. In this case, TcpClientListener will
+ // create socket with Init().
+ EXPECT_TRUE(0 <= tcp_client_listener_->get_socket());
+ }
+
+ EXPECT_TRUE(tcp_client_listener_->IsInitialised());
+
+ // Deinit() will be called during destructor
+ EXPECT_CALL(*interface_listener_mock_, Deinit()).Times(1);
+}
+
+TEST_P(TcpClientListenerTest, Terminate) {
+ EXPECT_CALL(*interface_listener_mock_, Init()).WillOnce(Return(true));
+ EXPECT_EQ(TransportAdapter::OK, tcp_client_listener_->Init());
+
+ EXPECT_CALL(*interface_listener_mock_, Deinit()).Times(1);
+
+ tcp_client_listener_->Terminate();
+
+ EXPECT_EQ(-1, tcp_client_listener_->get_socket());
+}
+
+TEST_P(TcpClientListenerTest, StartListening) {
+ EXPECT_CALL(*interface_listener_mock_, Init()).WillOnce(Return(true));
+ EXPECT_EQ(TransportAdapter::OK, tcp_client_listener_->Init());
+
+ EXPECT_CALL(*interface_listener_mock_, Start()).WillOnce(Return(true));
+
+ EXPECT_EQ(TransportAdapter::OK, tcp_client_listener_->StartListening());
+
+ // the "isThreadRunning_" flag of the thread will be update slightly later
+ SleepFor(kThreadStartWaitMsec);
+
+ if (InterfaceNameSpecified()) {
+ EXPECT_FALSE(tcp_client_listener_->thread()->is_running());
+ } else {
+ EXPECT_TRUE(tcp_client_listener_->thread()->is_running());
+ }
+
+ // Stop() and Deinit() will be called during destructor
+ EXPECT_CALL(*interface_listener_mock_, Stop()).WillOnce(Return(true));
+ EXPECT_CALL(*interface_listener_mock_, Deinit()).Times(1);
+}
+
+TEST_P(TcpClientListenerTest, StartListening_twice) {
+ EXPECT_CALL(*interface_listener_mock_, Init()).WillOnce(Return(true));
+ EXPECT_EQ(TransportAdapter::OK, tcp_client_listener_->Init());
+ EXPECT_CALL(*interface_listener_mock_, Start()).WillOnce(Return(true));
+ EXPECT_EQ(TransportAdapter::OK, tcp_client_listener_->StartListening());
+
+ // call again
+ EXPECT_EQ(TransportAdapter::BAD_STATE,
+ tcp_client_listener_->StartListening());
+
+ // Stop() and Deinit() will be called during destructor
+ EXPECT_CALL(*interface_listener_mock_, Stop()).WillOnce(Return(true));
+ EXPECT_CALL(*interface_listener_mock_, Deinit()).Times(1);
+}
+
+TEST_P(TcpClientListenerTest, StopListening) {
+ EXPECT_CALL(*interface_listener_mock_, Init()).WillOnce(Return(true));
+ EXPECT_EQ(TransportAdapter::OK, tcp_client_listener_->Init());
+ EXPECT_CALL(*interface_listener_mock_, Start()).WillOnce(Return(true));
+ EXPECT_EQ(TransportAdapter::OK, tcp_client_listener_->StartListening());
+
+ EXPECT_CALL(*interface_listener_mock_, Stop()).WillOnce(Return(true));
+
+ EXPECT_EQ(TransportAdapter::OK, tcp_client_listener_->StopListening());
+ EXPECT_FALSE(tcp_client_listener_->thread()->is_running());
+
+ EXPECT_CALL(*interface_listener_mock_, Deinit()).Times(1);
+}
+
+TEST_P(TcpClientListenerTest, StopListening_twice) {
+ EXPECT_CALL(*interface_listener_mock_, Init()).WillOnce(Return(true));
+ EXPECT_EQ(TransportAdapter::OK, tcp_client_listener_->Init());
+ EXPECT_CALL(*interface_listener_mock_, Start()).WillOnce(Return(true));
+ EXPECT_EQ(TransportAdapter::OK, tcp_client_listener_->StartListening());
+ EXPECT_CALL(*interface_listener_mock_, Stop()).WillOnce(Return(true));
+ EXPECT_EQ(TransportAdapter::OK, tcp_client_listener_->StopListening());
+
+ // call again
+ EXPECT_EQ(TransportAdapter::BAD_STATE, tcp_client_listener_->StopListening());
+
+ EXPECT_CALL(*interface_listener_mock_, Deinit()).Times(1);
+}
+
+TEST_P(TcpClientListenerTest, ClientConnection) {
+ EXPECT_CALL(*interface_listener_mock_, Init()).WillOnce(Return(true));
+ EXPECT_EQ(TransportAdapter::OK, tcp_client_listener_->Init());
+ EXPECT_CALL(*interface_listener_mock_, Start()).WillOnce(Return(true));
+ EXPECT_EQ(TransportAdapter::OK, tcp_client_listener_->StartListening());
+
+ if (InterfaceNameSpecified()) {
+ // set up a server socket by notifying a dummy IP address
+ EXPECT_CALL(adapter_controller_mock_, TransportConfigUpdated(_)).Times(1);
+ tcp_client_listener_->OnIPAddressUpdated(std::string("192.168.1.1"),
+ std::string(""));
+ }
+
+ // get the port number (assigned by system) that the socket is listening on
+ struct sockaddr_in server_addr;
+ socklen_t server_addr_len = sizeof(server_addr);
+ EXPECT_EQ(0,
+ getsockname(tcp_client_listener_->get_socket(),
+ reinterpret_cast<struct sockaddr*>(&server_addr),
+ &server_addr_len));
+
+ // try connecting to the socket
+ struct sockaddr_in client_addr;
+ client_addr.sin_family = AF_INET;
+ client_addr.sin_addr.s_addr = htonl(INADDR_LOOPBACK);
+ client_addr.sin_port = server_addr.sin_port;
+ socklen_t client_addr_len = sizeof(client_addr);
+
+ int s = socket(AF_INET, SOCK_STREAM, 0);
+ EXPECT_TRUE(0 <= s);
+
+ TestAsyncWaiter waiter;
+
+ // controller should be notified of AddDevice event
+ DeviceSptr mock_device = utils::MakeShared<MockTCPDevice>(
+ htonl(INADDR_LOOPBACK), "dummy_tcp_device");
+ EXPECT_CALL(adapter_controller_mock_, AddDevice(_))
+ .WillOnce(Return(mock_device));
+ EXPECT_CALL(adapter_controller_mock_, ConnectionCreated(_, _, _))
+ .WillOnce(NotifyTestAsyncWaiter(&waiter));
+
+ // adapter_controller_mock_ may also receive ConnectDone() and
+ // ConnectionFinished() from ThreadedSocketConnection. Ignore them as hey are
+ // not part ly client listener's tests.
+ EXPECT_CALL(adapter_controller_mock_, ConnectDone(_, _)).Times(AtLeast(0));
+ EXPECT_CALL(adapter_controller_mock_, ConnectionFinished(_, _))
+ .Times(AtLeast(0));
+
+ EXPECT_EQ(0,
+ connect(s,
+ reinterpret_cast<struct sockaddr*>(&client_addr),
+ client_addr_len));
+
+ // since the connection is handled on another thread, wait for some time
+ EXPECT_TRUE(waiter.WaitFor(1, kConnectionCreatedTimeoutMsec));
+
+ close(s);
+
+ EXPECT_CALL(*interface_listener_mock_, Stop()).WillOnce(Return(true));
+ EXPECT_CALL(*interface_listener_mock_, Deinit()).Times(1);
+}
+
+TEST_P(TcpClientListenerTest, OnIPAddressUpdated_ValidIPv4Address) {
+ EXPECT_CALL(*interface_listener_mock_, Init()).WillOnce(Return(true));
+ EXPECT_EQ(TransportAdapter::OK, tcp_client_listener_->Init());
+ EXPECT_CALL(*interface_listener_mock_, Start()).WillOnce(Return(true));
+ EXPECT_EQ(TransportAdapter::OK, tcp_client_listener_->StartListening());
+
+ const std::string test_ipv4_addr = "192.168.1.1";
+ const std::string test_ipv6_addr = "";
+ char buf[16];
+ snprintf(buf, sizeof(buf), "%u", port_);
+ const std::string test_port(buf);
+
+ TransportConfig expected_config;
+ expected_config.insert(std::make_pair(tc_enabled, "true"));
+ expected_config.insert(std::make_pair(tc_tcp_ip_address, test_ipv4_addr));
+ expected_config.insert(std::make_pair(tc_tcp_port, test_port));
+
+ EXPECT_CALL(adapter_controller_mock_, TransportConfigUpdated(expected_config))
+ .Times(1);
+
+ tcp_client_listener_->OnIPAddressUpdated(test_ipv4_addr, test_ipv6_addr);
+
+ if (InterfaceNameSpecified()) {
+ // when the client listener runs with designated interface name, it should
+ // start the thread here
+ EXPECT_TRUE(0 <= tcp_client_listener_->get_socket());
+
+ SleepFor(kThreadStartWaitMsec);
+
+ EXPECT_TRUE(tcp_client_listener_->thread()->is_running());
+ }
+
+ EXPECT_CALL(*interface_listener_mock_, Stop()).WillOnce(Return(true));
+ EXPECT_CALL(*interface_listener_mock_, Deinit()).Times(1);
+}
+
+TEST_P(TcpClientListenerTest, OnIPAddressUpdated_IPv4Address_changed) {
+ EXPECT_CALL(*interface_listener_mock_, Init()).WillOnce(Return(true));
+ EXPECT_EQ(TransportAdapter::OK, tcp_client_listener_->Init());
+ EXPECT_CALL(*interface_listener_mock_, Start()).WillOnce(Return(true));
+ EXPECT_EQ(TransportAdapter::OK, tcp_client_listener_->StartListening());
+
+ const std::string test_ipv4_addr_1 = "192.168.1.1";
+ const std::string test_ipv6_addr = "";
+ char buf[16];
+ snprintf(buf, sizeof(buf), "%u", port_);
+ const std::string test_port(buf);
+
+ TransportConfig expected_config_1;
+ expected_config_1.insert(std::make_pair(tc_enabled, "true"));
+ expected_config_1.insert(std::make_pair(tc_tcp_ip_address, test_ipv4_addr_1));
+ expected_config_1.insert(std::make_pair(tc_tcp_port, test_port));
+
+ EXPECT_CALL(adapter_controller_mock_,
+ TransportConfigUpdated(expected_config_1)).Times(1);
+
+ tcp_client_listener_->OnIPAddressUpdated(test_ipv4_addr_1, test_ipv6_addr);
+
+ const std::string test_ipv4_addr_2 = "172.16.2.3";
+ TransportConfig expected_config_2;
+ expected_config_2.insert(std::make_pair(tc_enabled, "true"));
+ expected_config_2.insert(std::make_pair(tc_tcp_ip_address, test_ipv4_addr_2));
+ expected_config_2.insert(std::make_pair(tc_tcp_port, test_port));
+
+ EXPECT_CALL(adapter_controller_mock_,
+ TransportConfigUpdated(expected_config_2)).Times(1);
+
+ tcp_client_listener_->OnIPAddressUpdated(test_ipv4_addr_2, test_ipv6_addr);
+
+ if (InterfaceNameSpecified()) {
+ EXPECT_TRUE(0 <= tcp_client_listener_->get_socket());
+
+ SleepFor(kThreadStartWaitMsec);
+
+ EXPECT_TRUE(tcp_client_listener_->thread()->is_running());
+ }
+
+ EXPECT_CALL(*interface_listener_mock_, Stop()).WillOnce(Return(true));
+ EXPECT_CALL(*interface_listener_mock_, Deinit()).Times(1);
+}
+
+TEST_P(TcpClientListenerTest, OnIPAddressUpdated_IPv4Address_same) {
+ EXPECT_CALL(*interface_listener_mock_, Init()).WillOnce(Return(true));
+ EXPECT_EQ(TransportAdapter::OK, tcp_client_listener_->Init());
+ EXPECT_CALL(*interface_listener_mock_, Start()).WillOnce(Return(true));
+ EXPECT_EQ(TransportAdapter::OK, tcp_client_listener_->StartListening());
+
+ const std::string test_ipv4_addr_1 = "192.168.1.1";
+ const std::string test_ipv6_addr = "";
+ char buf[16];
+ snprintf(buf, sizeof(buf), "%u", port_);
+ const std::string test_port(buf);
+
+ TransportConfig expected_config_1;
+ expected_config_1.insert(std::make_pair(tc_enabled, "true"));
+ expected_config_1.insert(std::make_pair(tc_tcp_ip_address, test_ipv4_addr_1));
+ expected_config_1.insert(std::make_pair(tc_tcp_port, test_port));
+
+ EXPECT_CALL(adapter_controller_mock_,
+ TransportConfigUpdated(expected_config_1)).Times(1);
+
+ tcp_client_listener_->OnIPAddressUpdated(test_ipv4_addr_1, test_ipv6_addr);
+
+ const std::string test_ipv4_addr_2 = "192.168.1.1"; // same as before
+ TransportConfig expected_config_2;
+ expected_config_2.insert(std::make_pair(tc_enabled, "true"));
+ expected_config_2.insert(std::make_pair(tc_tcp_ip_address, test_ipv4_addr_2));
+ expected_config_2.insert(std::make_pair(tc_tcp_port, test_port));
+
+ // client listener should not generate TransportConfigUpdated event
+ EXPECT_CALL(adapter_controller_mock_, TransportConfigUpdated(_)).Times(0);
+
+ tcp_client_listener_->OnIPAddressUpdated(test_ipv4_addr_2, test_ipv6_addr);
+
+ if (InterfaceNameSpecified()) {
+ EXPECT_TRUE(0 <= tcp_client_listener_->get_socket());
+
+ SleepFor(kThreadStartWaitMsec);
+
+ EXPECT_TRUE(tcp_client_listener_->thread()->is_running());
+ }
+
+ EXPECT_CALL(*interface_listener_mock_, Stop()).WillOnce(Return(true));
+ EXPECT_CALL(*interface_listener_mock_, Deinit()).Times(1);
+}
+
+TEST_P(TcpClientListenerTest, OnIPAddressUpdated_IPv4Address_disabled) {
+ EXPECT_CALL(*interface_listener_mock_, Init()).WillOnce(Return(true));
+ EXPECT_EQ(TransportAdapter::OK, tcp_client_listener_->Init());
+ EXPECT_CALL(*interface_listener_mock_, Start()).WillOnce(Return(true));
+ EXPECT_EQ(TransportAdapter::OK, tcp_client_listener_->StartListening());
+
+ const std::string test_ipv4_addr_1 = "192.168.1.1";
+ const std::string test_ipv6_addr = "";
+ char buf[16];
+ snprintf(buf, sizeof(buf), "%u", port_);
+ const std::string test_port(buf);
+
+ TransportConfig expected_config_1;
+ expected_config_1.insert(std::make_pair(tc_enabled, "true"));
+ expected_config_1.insert(std::make_pair(tc_tcp_ip_address, test_ipv4_addr_1));
+ expected_config_1.insert(std::make_pair(tc_tcp_port, test_port));
+
+ EXPECT_CALL(adapter_controller_mock_,
+ TransportConfigUpdated(expected_config_1)).Times(1);
+
+ tcp_client_listener_->OnIPAddressUpdated(test_ipv4_addr_1, test_ipv6_addr);
+
+ const std::string test_ipv4_addr_2 = "";
+ TransportConfig expected_config_2;
+ expected_config_2.insert(std::make_pair(tc_enabled, "false"));
+ expected_config_2.insert(std::make_pair(tc_tcp_ip_address, test_ipv4_addr_2));
+ expected_config_2.insert(std::make_pair(tc_tcp_port, test_port));
+
+ EXPECT_CALL(adapter_controller_mock_,
+ TransportConfigUpdated(expected_config_2)).Times(1);
+
+ tcp_client_listener_->OnIPAddressUpdated(test_ipv4_addr_2, test_ipv6_addr);
+
+ if (InterfaceNameSpecified()) {
+ EXPECT_EQ(-1, tcp_client_listener_->get_socket());
+
+ SleepFor(kThreadStartWaitMsec);
+
+ EXPECT_FALSE(tcp_client_listener_->thread()->is_running());
+ }
+
+ EXPECT_CALL(*interface_listener_mock_, Stop()).WillOnce(Return(true));
+ EXPECT_CALL(*interface_listener_mock_, Deinit()).Times(1);
}
-TEST_F(TcpClientListenerTest, IsInitialised) {
- EXPECT_TRUE(tcp_client_listener_.IsInitialised());
+TEST_P(TcpClientListenerTest, OnIPAddressUpdated_IPv4Address_reenabled) {
+ EXPECT_CALL(*interface_listener_mock_, Init()).WillOnce(Return(true));
+ EXPECT_EQ(TransportAdapter::OK, tcp_client_listener_->Init());
+ EXPECT_CALL(*interface_listener_mock_, Start()).WillOnce(Return(true));
+ EXPECT_EQ(TransportAdapter::OK, tcp_client_listener_->StartListening());
+
+ const std::string test_ipv4_addr_1 = "192.168.1.1";
+ const std::string test_ipv6_addr = "";
+ char buf[16];
+ snprintf(buf, sizeof(buf), "%u", port_);
+ const std::string test_port(buf);
+
+ TransportConfig expected_config_1;
+ expected_config_1.insert(std::make_pair(tc_enabled, "true"));
+ expected_config_1.insert(std::make_pair(tc_tcp_ip_address, test_ipv4_addr_1));
+ expected_config_1.insert(std::make_pair(tc_tcp_port, test_port));
+
+ EXPECT_CALL(adapter_controller_mock_,
+ TransportConfigUpdated(expected_config_1)).Times(1);
+
+ tcp_client_listener_->OnIPAddressUpdated(test_ipv4_addr_1, test_ipv6_addr);
+
+ const std::string test_ipv4_addr_2 = "";
+ TransportConfig expected_config_2;
+ expected_config_2.insert(std::make_pair(tc_enabled, "false"));
+ expected_config_2.insert(std::make_pair(tc_tcp_ip_address, test_ipv4_addr_2));
+ expected_config_2.insert(std::make_pair(tc_tcp_port, test_port));
+
+ EXPECT_CALL(adapter_controller_mock_,
+ TransportConfigUpdated(expected_config_2)).Times(1);
+
+ tcp_client_listener_->OnIPAddressUpdated(test_ipv4_addr_2, test_ipv6_addr);
+
+ const std::string test_ipv4_addr_3 = "192.168.1.1";
+ TransportConfig expected_config_3;
+ expected_config_3.insert(std::make_pair(tc_enabled, "true"));
+ expected_config_3.insert(std::make_pair(tc_tcp_ip_address, test_ipv4_addr_3));
+ expected_config_3.insert(std::make_pair(tc_tcp_port, test_port));
+
+ EXPECT_CALL(adapter_controller_mock_,
+ TransportConfigUpdated(expected_config_3)).Times(1);
+
+ tcp_client_listener_->OnIPAddressUpdated(test_ipv4_addr_3, test_ipv6_addr);
+
+ if (InterfaceNameSpecified()) {
+ EXPECT_TRUE(0 <= tcp_client_listener_->get_socket());
+
+ SleepFor(kThreadStartWaitMsec);
+
+ EXPECT_TRUE(tcp_client_listener_->thread()->is_running());
+ }
+
+ EXPECT_CALL(*interface_listener_mock_, Stop()).WillOnce(Return(true));
+ EXPECT_CALL(*interface_listener_mock_, Deinit()).Times(1);
}
-TEST_F(TcpClientListenerTest, Init) {
- EXPECT_EQ(TransportAdapter::OK, tcp_client_listener_.Init());
+TEST_P(TcpClientListenerTest, OnIPAddressUpdated_EmptyIPv4Address) {
+ EXPECT_CALL(*interface_listener_mock_, Init()).WillOnce(Return(true));
+ EXPECT_EQ(TransportAdapter::OK, tcp_client_listener_->Init());
+ EXPECT_CALL(*interface_listener_mock_, Start()).WillOnce(Return(true));
+ EXPECT_EQ(TransportAdapter::OK, tcp_client_listener_->StartListening());
+
+ const std::string test_ipv4_addr = "";
+ const std::string test_ipv6_addr = "";
+ char buf[16];
+ snprintf(buf, sizeof(buf), "%u", port_);
+ const std::string test_port(buf);
+
+ // if the client listener receives an empty IP address after started, it
+ // should ignore it
+ EXPECT_CALL(adapter_controller_mock_, TransportConfigUpdated(_)).Times(0);
+
+ tcp_client_listener_->OnIPAddressUpdated(test_ipv4_addr, test_ipv6_addr);
+
+ if (InterfaceNameSpecified()) {
+ EXPECT_EQ(-1, tcp_client_listener_->get_socket());
+
+ SleepFor(kThreadStartWaitMsec);
+
+ EXPECT_FALSE(tcp_client_listener_->thread()->is_running());
+ }
+
+ EXPECT_CALL(*interface_listener_mock_, Stop()).WillOnce(Return(true));
+ EXPECT_CALL(*interface_listener_mock_, Deinit()).Times(1);
}
+INSTANTIATE_TEST_CASE_P(NetworkInterfaceName,
+ TcpClientListenerTest,
+ ::testing::Values(std::string(""),
+ std::string("dummy_interface0")));
+
} // namespace transport_manager_test
} // namespace components
} // namespace test
diff --git a/src/components/transport_manager/test/tcp_transport_adapter_test.cc b/src/components/transport_manager/test/tcp_transport_adapter_test.cc
index dd587569d3..a6896dc48a 100644
--- a/src/components/transport_manager/test/tcp_transport_adapter_test.cc
+++ b/src/components/transport_manager/test/tcp_transport_adapter_test.cc
@@ -48,6 +48,7 @@ namespace components {
namespace transport_manager_test {
using ::testing::Return;
+using ::testing::ReturnRef;
using ::testing::_;
using namespace ::protocol_handler;
@@ -61,6 +62,13 @@ class TcpAdapterTest : public ::testing::Test {
resumption::LastStateImpl last_state_;
const uint32_t port = 12345;
const std::string string_port = "12345";
+ std::string network_interface = "";
+
+ void SetUp() OVERRIDE {
+ EXPECT_CALL(transport_manager_settings,
+ transport_manager_tcp_adapter_network_interface())
+ .WillRepeatedly(ReturnRef(network_interface));
+ }
};
TEST_F(TcpAdapterTest, StoreDataWithOneDeviceAndOneApplication) {
@@ -339,6 +347,37 @@ TEST_F(TcpAdapterTest, StoreDataWithSeveralDevices_RestoreData) {
}
}
+TEST_F(TcpAdapterTest, NotifyTransportConfigUpdated) {
+ MockTransportAdapterListener mock_adapter_listener;
+
+ MockTCPTransportAdapter transport_adapter(
+ port, last_state_, transport_manager_settings);
+ transport_adapter.AddListener(&mock_adapter_listener);
+
+ TransportConfig config;
+ config[tc_enabled] = std::string("true");
+ config[tc_tcp_ip_address] = std::string("192.168.1.1");
+ config[tc_tcp_port] = std::string("12345");
+
+ EXPECT_CALL(mock_adapter_listener, OnTransportConfigUpdated(_)).Times(1);
+
+ transport_adapter.TransportConfigUpdated(config);
+}
+
+TEST_F(TcpAdapterTest, GetTransportConfiguration) {
+ MockTCPTransportAdapter transport_adapter(
+ port, last_state_, transport_manager_settings);
+
+ TransportConfig config;
+ config[tc_enabled] = std::string("true");
+ config[tc_tcp_ip_address] = std::string("192.168.1.1");
+ config[tc_tcp_port] = std::string("12345");
+
+ transport_adapter.TransportConfigUpdated(config);
+
+ EXPECT_EQ(config, transport_adapter.GetTransportConfiguration());
+}
+
} // namespace transport_manager_test
} // namespace components
} // namespace test
diff --git a/src/components/transport_manager/test/transport_adapter_listener_test.cc b/src/components/transport_manager/test/transport_adapter_listener_test.cc
index 14b8850b49..1494844519 100644
--- a/src/components/transport_manager/test/transport_adapter_listener_test.cc
+++ b/src/components/transport_manager/test/transport_adapter_listener_test.cc
@@ -230,6 +230,15 @@ TEST_F(TransportAdapterListenerTest, OnUnexpectedDisconnect) {
&adapter_mock, dev_id, app_handle, err);
}
+TEST_F(TransportAdapterListenerTest, OnTransportConfigUpdated) {
+ EXPECT_CALL(
+ tr_mock,
+ ReceiveEventFromDevice(IsEvent(
+ EventTypeEnum::ON_TRANSPORT_CONFIG_UPDATED, &adapter_mock, "", 0)))
+ .WillOnce(Return(E_SUCCESS));
+ transport_listener.OnTransportConfigUpdated(&adapter_mock);
+}
+
} // namespace transport_manager_test
} // namespace components
} // namespace test
diff --git a/src/components/transport_manager/test/transport_adapter_test.cc b/src/components/transport_manager/test/transport_adapter_test.cc
index 6d709e0c17..68758f418f 100644
--- a/src/components/transport_manager/test/transport_adapter_test.cc
+++ b/src/components/transport_manager/test/transport_adapter_test.cc
@@ -809,6 +809,35 @@ TEST_F(TransportAdapterTest, StopDevice) {
transport_adapter.StopDevice(uniq_id);
}
+TEST_F(TransportAdapterTest, TransportConfigUpdated) {
+ MockTransportAdapterImpl transport_adapter(
+ NULL, NULL, NULL, last_state_, transport_manager_settings);
+ EXPECT_CALL(transport_adapter, Restore()).WillOnce(Return(true));
+ transport_adapter.Init();
+
+ MockTransportAdapterListener mock_listener;
+ transport_adapter.AddListener(&mock_listener);
+
+ TransportConfig config;
+ config[tc_enabled] = std::string("true");
+ config[tc_tcp_ip_address] = std::string("192.168.1.1");
+ config[tc_tcp_port] = std::string("12345");
+
+ EXPECT_CALL(mock_listener, OnTransportConfigUpdated(_));
+ transport_adapter.TransportConfigUpdated(config);
+}
+
+TEST_F(TransportAdapterTest, GetTransportConfigration) {
+ MockTransportAdapterImpl transport_adapter(
+ NULL, NULL, NULL, last_state_, transport_manager_settings);
+ EXPECT_CALL(transport_adapter, Restore()).WillOnce(Return(true));
+ transport_adapter.Init();
+
+ TransportConfig empty_config;
+
+ EXPECT_EQ(empty_config, transport_adapter.GetTransportConfiguration());
+}
+
} // namespace transport_manager_test
} // namespace components
} // namespace test
diff --git a/src/components/transport_manager/test/transport_manager_default_test.cc b/src/components/transport_manager/test/transport_manager_default_test.cc
index d095a51cb6..8e8a964228 100644
--- a/src/components/transport_manager/test/transport_manager_default_test.cc
+++ b/src/components/transport_manager/test/transport_manager_default_test.cc
@@ -74,6 +74,10 @@ TEST(TestTransportManagerDefault, Init_LastStateNotUsed) {
.WillRepeatedly(Return(false));
EXPECT_CALL(transport_manager_settings, transport_manager_tcp_adapter_port())
.WillRepeatedly(Return(12345u));
+ std::string network_interface = "";
+ EXPECT_CALL(transport_manager_settings,
+ transport_manager_tcp_adapter_network_interface())
+ .WillRepeatedly(ReturnRef(network_interface));
transport_manager.Init(mock_last_state);
transport_manager.Stop();
@@ -106,6 +110,10 @@ TEST(TestTransportManagerDefault, Init_LastStateUsed) {
.WillRepeatedly(Return(true));
EXPECT_CALL(transport_manager_settings, transport_manager_tcp_adapter_port())
.WillRepeatedly(Return(12345u));
+ std::string network_interface = "";
+ EXPECT_CALL(transport_manager_settings,
+ transport_manager_tcp_adapter_network_interface())
+ .WillRepeatedly(ReturnRef(network_interface));
transport_manager.Init(mock_last_state);
transport_manager.Stop();
}
@@ -137,6 +145,10 @@ TEST(TestTransportManagerDefault, Init_LastStateUsed_InvalidPort) {
.WillRepeatedly(Return(true));
EXPECT_CALL(transport_manager_settings, transport_manager_tcp_adapter_port())
.WillRepeatedly(Return(1u));
+ std::string network_interface = "";
+ EXPECT_CALL(transport_manager_settings,
+ transport_manager_tcp_adapter_network_interface())
+ .WillRepeatedly(ReturnRef(network_interface));
transport_manager.Init(mock_last_state);
transport_manager.Stop();
}
diff --git a/src/components/transport_manager/test/transport_manager_impl_test.cc b/src/components/transport_manager/test/transport_manager_impl_test.cc
index eebb247908..9ba95ea99a 100644
--- a/src/components/transport_manager/test/transport_manager_impl_test.cc
+++ b/src/components/transport_manager/test/transport_manager_impl_test.cc
@@ -1323,6 +1323,29 @@ TEST_F(TransportManagerImplTest,
tm_.OnDeviceListUpdated(mock_adapter_);
}
+TEST_F(TransportManagerImplTest, OnTransportConfigUpdated) {
+ TransportAdapterEvent test_event(EventTypeEnum::ON_TRANSPORT_CONFIG_UPDATED,
+ mock_adapter_,
+ "",
+ 0,
+ test_message_,
+ error_);
+
+ transport_adapter::TransportConfig config;
+ config[transport_manager::transport_adapter::tc_enabled] =
+ std::string("true");
+ config[transport_manager::transport_adapter::tc_tcp_ip_address] =
+ std::string("192.168.1.1");
+ config[transport_manager::transport_adapter::tc_tcp_port] =
+ std::string("12345");
+
+ EXPECT_CALL(*mock_adapter_, GetTransportConfiguration())
+ .WillOnce(Return(config));
+
+ EXPECT_CALL(*tm_listener_, OnTransportConfigUpdated(config));
+ tm_.TestHandle(test_event);
+}
+
} // namespace transport_manager_test
} // namespace components
} // namespace test
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/cmake/modules/FindDBus.cmake b/tools/cmake/modules/FindDBus.cmake
deleted file mode 100644
index 1d0f29dd75..0000000000
--- a/tools/cmake/modules/FindDBus.cmake
+++ /dev/null
@@ -1,59 +0,0 @@
-# - Try to find DBus
-# Once done, this will define
-#
-# DBUS_FOUND - system has DBus
-# DBUS_INCLUDE_DIRS - the DBus include directories
-# DBUS_LIBRARIES - link these to use DBus
-#
-# Copyright (C) 2012 Raphael Kubo da Costa <rakuco@webkit.org>
-#
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions
-# are met:
-# 1. Redistributions of source code must retain the above copyright
-# notice, this list of conditions and the following disclaimer.
-# 2. Redistributions in binary form must reproduce the above copyright
-# notice, this list of conditions and the following disclaimer in the
-# documentation and/or other materials provided with the distribution.
-#
-# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER AND ITS CONTRIBUTORS ``AS
-# IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
-# THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
-# PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR ITS
-# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
-# EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
-# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
-# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
-# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
-# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
-# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-FIND_PACKAGE(PkgConfig)
-PKG_CHECK_MODULES(PC_DBUS QUIET dbus-1)
-
-FIND_LIBRARY(DBUS_LIBRARIES
- NAMES dbus-1
- HINTS ${PC_DBUS_LIBDIR}
- ${PC_DBUS_LIBRARY_DIRS}
-)
-
-FIND_PATH(DBUS_INCLUDE_DIR
- NAMES dbus/dbus.h
- HINTS ${PC_DBUS_INCLUDEDIR}
- ${PC_DBUS_INCLUDE_DIRS}
-)
-
-GET_FILENAME_COMPONENT(_DBUS_LIBRARY_DIR ${DBUS_LIBRARIES} PATH)
-FIND_PATH(DBUS_ARCH_INCLUDE_DIR
- NAMES dbus/dbus-arch-deps.h
- HINTS ${PC_DBUS_INCLUDEDIR}
- ${PC_DBUS_INCLUDE_DIRS}
- ${_DBUS_LIBRARY_DIR}
- ${DBUS_INCLUDE_DIR}
- PATH_SUFFIXES include
-)
-
-SET(DBUS_INCLUDE_DIRS ${DBUS_INCLUDE_DIR} ${DBUS_ARCH_INCLUDE_DIR})
-
-INCLUDE(FindPackageHandleStandardArgs)
-FIND_PACKAGE_HANDLE_STANDARD_ARGS(DBUS REQUIRED_VARS DBUS_INCLUDE_DIRS DBUS_LIBRARIES) \ No newline at end of file
diff --git a/tools/cmake/modules/FindQt5DBus.cmake b/tools/cmake/modules/FindQt5DBus.cmake
deleted file mode 100644
index d850010e97..0000000000
--- a/tools/cmake/modules/FindQt5DBus.cmake
+++ /dev/null
@@ -1,10 +0,0 @@
-execute_process(
- COMMAND ${CMAKE_SOURCE_DIR}/FindQt.sh -v ${qt_version} Qt5DBusConfig.cmake
- OUTPUT_VARIABLE config_file
-)
-
-if(config_file STREQUAL "")
- message(FATAL_ERROR "Qt5 DBus module not found")
-endif(config_file STREQUAL "")
-
-include(${config_file})
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
+
diff --git a/tools/intergen/GenerateInterfaceLibrary.cmake b/tools/intergen/GenerateInterfaceLibrary.cmake
index bec35e1e3a..31b06880c6 100644
--- a/tools/intergen/GenerateInterfaceLibrary.cmake
+++ b/tools/intergen/GenerateInterfaceLibrary.cmake
@@ -11,20 +11,14 @@ set(GENERATED_LIB_HEADER_DEPENDENCIES
# |generated_interface_names| should contain list of generated interfaces
# if |AUTO_FUNC_IDS| is added to argument list, intergen is called with "-a"
# flag telling intergen to generate function ids automatically
-# if |DBUS_SUPPORT| is added to argument list, intergen is called with "-d"
-# flag that enables DBus serialization code generation
# from xml_file (intergen creates separate directory for every interface).
# Their names are written lowercase_underscored_style.
function (GenerateInterfaceLibrary xml_file_name generated_interface_names)
- set(options AUTO_FUNC_IDS DBUS_SUPPORT)
+ set(options AUTO_FUNC_IDS)
cmake_parse_arguments(GenerateInterfaceLibrary "${options}" "" "" ${ARGN})
if (GenerateInterfaceLibrary_AUTO_FUNC_IDS)
set(AUTOID "-a")
endif()
- if (GenerateInterfaceLibrary_DBUS_SUPPORT)
- set(NEED_DBUS "-d")
- list(APPEND GENERATED_LIB_HEADER_DEPENDENCIES ${DBUS_INCLUDE_DIRS})
- endif()
foreach(interface_name ${generated_interface_names})
set(HEADERS
@@ -41,7 +35,7 @@ function (GenerateInterfaceLibrary xml_file_name generated_interface_names)
${interface_name}/interface.cc
)
add_custom_command( OUTPUT ${HEADERS} ${SOURCES}
- COMMAND ${INTERGEN_CMD} -f ${CMAKE_CURRENT_SOURCE_DIR}/${xml_file_name} -j ${AUTOID} ${NEED_DBUS} -i ${interface_name}
+ COMMAND ${INTERGEN_CMD} -f ${CMAKE_CURRENT_SOURCE_DIR}/${xml_file_name} -j ${AUTOID} -i ${interface_name}
DEPENDS ${INTERGEN_CMD} ${xml_file_name}
COMMENT "Generating interface ${interface_name} from ${xml_file_name}"
VERBATIM
diff --git a/tools/intergen/cppgen/CMakeLists.txt b/tools/intergen/cppgen/CMakeLists.txt
index c6e052a2ae..d20f3d9ab3 100644
--- a/tools/intergen/cppgen/CMakeLists.txt
+++ b/tools/intergen/cppgen/CMakeLists.txt
@@ -27,7 +27,6 @@ set (SOURCES
src/cppgen/namespace.cc
src/cppgen/naming_convention.cc
src/cppgen/struct_type_constructor.cc
- src/cppgen/struct_type_dbus_serializer.cc
src/cppgen/struct_type_from_json_method.cc
src/cppgen/struct_type_is_initialized_method.cc
src/cppgen/struct_type_is_valid_method.cc
@@ -58,7 +57,6 @@ set (HEADERS
include/cppgen/namespace.h
include/cppgen/naming_convention.h
include/cppgen/struct_type_constructor.h
- include/cppgen/struct_type_dbus_serializer.h
include/cppgen/struct_type_from_json_method.h
include/cppgen/struct_type_is_initialized_method.h
include/cppgen/struct_type_is_valid_method.h
diff --git a/tools/intergen/cppgen/include/cppgen/generator_preferences.h b/tools/intergen/cppgen/include/cppgen/generator_preferences.h
index 5278a24417..d0a58950e2 100644
--- a/tools/intergen/cppgen/include/cppgen/generator_preferences.h
+++ b/tools/intergen/cppgen/include/cppgen/generator_preferences.h
@@ -43,18 +43,15 @@ struct TypePreferences {
int minimum_interger_size;
bool avoid_unsigned;
bool generate_json;
- bool generate_dbus;
TypePreferences(int minimum_interger_size,
bool avoid_unsigned,
- bool generate_json,
- bool generate_dbus);
+ bool generate_json);
};
struct Preferences {
Preferences(int minimum_interger_size,
bool avoid_unsigned,
bool generate_json,
- bool generate_dbus,
const std::set<std::string>& requested_interfaces);
TypePreferences type_preferences;
std::set<std::string> requested_interfaces;
diff --git a/tools/intergen/cppgen/include/cppgen/message_factory_function.h b/tools/intergen/cppgen/include/cppgen/message_factory_function.h
index da63b4453a..aa8a0ab6c4 100644
--- a/tools/intergen/cppgen/include/cppgen/message_factory_function.h
+++ b/tools/intergen/cppgen/include/cppgen/message_factory_function.h
@@ -46,8 +46,7 @@ class Interface;
class MessageFactoryFunction: public CppFunction {
public:
enum SerializationType {
- kJson,
- kDbus
+ kJson
};
// Methods
diff --git a/tools/intergen/cppgen/include/cppgen/struct_type_dbus_serializer.h b/tools/intergen/cppgen/include/cppgen/struct_type_dbus_serializer.h
deleted file mode 100644
index 64872f3265..0000000000
--- a/tools/intergen/cppgen/include/cppgen/struct_type_dbus_serializer.h
+++ /dev/null
@@ -1,88 +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 CPPGEN_STRUCT_TYPE_DBUS_SERIALIZER_H
-#define CPPGEN_STRUCT_TYPE_DBUS_SERIALIZER_H
-
-#include "cppgen/cpp_function.h"
-
-namespace codegen {
-class Interface;
-class Struct;
-class TypePreferences;
-
-class StructTypeDbusMessageSignatureMethod: public CppFunction {
- public:
- StructTypeDbusMessageSignatureMethod(const TypePreferences* preferences,
- const Struct* strct,
- bool substructure);
- ~StructTypeDbusMessageSignatureMethod();
- private:
- // CppFunction interface
- void DefineBody(std::ostream* os) const;
- private:
- const TypePreferences* preferences_;
- bool substructure_;
- const Struct* strct_;
-};
-
-class StructTypeFromDbusReaderConstructor : public CppStructConstructor {
- public:
- StructTypeFromDbusReaderConstructor(const TypePreferences* preferences,
- const Struct* strct,
- bool substructure,
- const std::string& base_class_name);
- ~StructTypeFromDbusReaderConstructor();
- private:
- // CppFunction interface
- void DefineBody(std::ostream* os) const;
- private:
- const TypePreferences* preferences_;
- bool substructure_;
- const Struct* strct_;
-};
-
-class StructTypeToDbusWriterMethod : public CppFunction {
- public:
- StructTypeToDbusWriterMethod(const Struct* strct,
- bool substructure);
- ~StructTypeToDbusWriterMethod();
- private:
- // CppFunction interface
- void DefineBody(std::ostream* os) const;
- private:
- bool substructure_;
- const Struct* strct_;
-};
-
-} // namespace codegen
-
-#endif // CPPGEN_STRUCT_TYPE_DBUS_SERIALIZER_H
diff --git a/tools/intergen/cppgen/src/cppgen/cpp_interface_code_generator.cc b/tools/intergen/cppgen/src/cppgen/cpp_interface_code_generator.cc
index 49bd758b6e..519e6a06e2 100644
--- a/tools/intergen/cppgen/src/cppgen/cpp_interface_code_generator.cc
+++ b/tools/intergen/cppgen/src/cppgen/cpp_interface_code_generator.cc
@@ -183,9 +183,6 @@ void CppInterfaceCodeGenerator::GenerateMessageFactories() {
if (preferences_->generate_json) {
ser_types[ser_types_count++] = MessageFactoryFunction::kJson;
}
- if (preferences_->generate_dbus) {
- ser_types[ser_types_count++] = MessageFactoryFunction::kDbus;
- }
for (size_t i = 0; i < ser_types_count; ++i) {
MessageFactoryFunction request_factory(interface_,
diff --git a/tools/intergen/cppgen/src/cppgen/declaration_generator.cc b/tools/intergen/cppgen/src/cppgen/declaration_generator.cc
index 46e459198e..649ffd8c68 100644
--- a/tools/intergen/cppgen/src/cppgen/declaration_generator.cc
+++ b/tools/intergen/cppgen/src/cppgen/declaration_generator.cc
@@ -47,7 +47,6 @@
#include "cppgen/module_manager.h"
#include "cppgen/naming_convention.h"
#include "cppgen/struct_type_constructor.h"
-#include "cppgen/struct_type_dbus_serializer.h"
#include "cppgen/struct_type_from_json_method.h"
#include "cppgen/struct_type_is_initialized_method.h"
#include "cppgen/struct_type_is_valid_method.h"
@@ -98,14 +97,6 @@ void DeclareExternalTypes(const TypePreferences& prefs, Namespace* ns) {
Namespace::ForwardDeclaration(
Namespace::ForwardDeclaration::kClass, "Value"));
}
- if (prefs.generate_dbus) {
- ns->nested("dbus").ForwardDeclare(
- Namespace::ForwardDeclaration(
- Namespace::ForwardDeclaration::kClass, "MessageReader"));
- ns->nested("dbus").ForwardDeclare(
- Namespace::ForwardDeclaration(
- Namespace::ForwardDeclaration::kClass, "MessageWriter"));
- }
}
}
@@ -172,13 +163,6 @@ void DeclarationGenerator::GenerateCodeForStruct(const Struct* strct) {
StructTypeFromJsonConstructor(strct, base_class_name).Declare(&o , true);
StructTypeToJsonMethod(strct).Declare(&o , true);
}
- if (preferences_->generate_dbus) {
- StructTypeFromDbusReaderConstructor(
- preferences_, strct, true, base_class_name).Declare(&o, true);
- StructTypeToDbusWriterMethod(strct, true).Declare(&o , true);
- StructTypeDbusMessageSignatureMethod(preferences_,
- strct, true).Declare(&o, true);
- }
StructTypeIsValidMethod(strct).Declare(&o, true);
StructTypeIsInitializedMethod(strct).Declare(&o, true);
StructTypeStructEmptyMethod(strct).Declare(&o, true);
@@ -284,13 +268,6 @@ void DeclarationGenerator::GenerateCodeForRequest(const Request& request,
StructTypeFromJsonConstructor(&request, base_class_name).Declare(&o , true);
StructTypeToJsonMethod(&request).Declare(&o , true);
}
- if (preferences_->generate_dbus) {
- StructTypeFromDbusReaderConstructor(preferences_, &request, false,
- base_class_name).Declare(&o, true);
- StructTypeToDbusWriterMethod(&request, false).Declare(&o , true);
- StructTypeDbusMessageSignatureMethod(preferences_,
- &request, false).Declare(&o, true);
- }
StructTypeIsValidMethod(&request).Declare(&o, true);
StructTypeIsInitializedMethod(&request).Declare(&o, true);
StructTypeStructEmptyMethod(&request).Declare(&o, true);
@@ -336,14 +313,6 @@ void DeclarationGenerator::GenerateCodeForResponse(const Response& response) {
StructTypeToJsonMethod(&response).Declare(&o , true);
}
- if (preferences_->generate_dbus) {
- StructTypeFromDbusReaderConstructor(preferences_, &response, false,
- base_class_name).Declare(&o, true);
- StructTypeToDbusWriterMethod(&response, false).Declare(&o , true);
-
- StructTypeDbusMessageSignatureMethod(preferences_,
- &response, false).Declare(&o, true);
- }
StructTypeIsValidMethod(&response).Declare(&o, true);
StructTypeIsInitializedMethod(&response).Declare(&o, true);
StructTypeStructEmptyMethod(&response).Declare(&o, true);
@@ -389,13 +358,6 @@ void DeclarationGenerator::GenerateCodeForNotification(
StructTypeFromJsonConstructor(&notification, base_class_name).Declare(&o , true);
StructTypeToJsonMethod(&notification).Declare(&o , true);
}
- if (preferences_->generate_dbus) {
- StructTypeFromDbusReaderConstructor(preferences_, &notification, false,
- base_class_name).Declare(&o , true);
- StructTypeToDbusWriterMethod(&notification, false).Declare(&o , true);
- StructTypeDbusMessageSignatureMethod(preferences_,
- &notification, false).Declare(&o, true);
- }
StructTypeIsValidMethod(&notification).Declare(&o, true);
StructTypeIsInitializedMethod(&notification).Declare(&o, true);
StructTypeStructEmptyMethod(&notification).Declare(&o, true);
diff --git a/tools/intergen/cppgen/src/cppgen/definition_generator.cc b/tools/intergen/cppgen/src/cppgen/definition_generator.cc
index e2ad0ded04..b5e404fa71 100644
--- a/tools/intergen/cppgen/src/cppgen/definition_generator.cc
+++ b/tools/intergen/cppgen/src/cppgen/definition_generator.cc
@@ -40,7 +40,6 @@
#include "cppgen/message_handle_with_method.h"
#include "cppgen/module_manager.h"
#include "cppgen/struct_type_constructor.h"
-#include "cppgen/struct_type_dbus_serializer.h"
#include "cppgen/struct_type_from_json_method.h"
#include "cppgen/struct_type_is_initialized_method.h"
#include "cppgen/struct_type_is_valid_method.h"
@@ -97,13 +96,6 @@ void DefinitionGenerator::GenerateCodeForStruct(const Struct* strct) {
StructTypeFromJsonConstructor(strct, base_class_name).Define(&o , false);
StructTypeToJsonMethod(strct).Define(&o , false);
}
- if (preferences_->generate_dbus) {
- StructTypeFromDbusReaderConstructor(preferences_, strct, true,
- base_class_name).Define(&o , false);
- StructTypeToDbusWriterMethod(strct, true).Define(&o , false);
- StructTypeDbusMessageSignatureMethod(preferences_,
- strct, true).Define(&o, false);
- }
StructTypeIsValidMethod(strct).Define(&o, false);
StructTypeIsInitializedMethod(strct).Define(&o, false);
StructTypeStructEmptyMethod(strct).Define(&o, false);
@@ -137,13 +129,6 @@ void DefinitionGenerator::GenerateCodeForResponse(const Response& response) {
StructTypeFromJsonConstructor(&response, base_class_name).Define(&o , false);
StructTypeToJsonMethod(&response).Define(&o , false);
}
- if (preferences_->generate_dbus) {
- StructTypeFromDbusReaderConstructor(preferences_, &response, false,
- base_class_name).Define(&o , false);
- StructTypeToDbusWriterMethod(&response, false).Define(&o , false);
- StructTypeDbusMessageSignatureMethod(preferences_,
- &response, false).Define(&o, false);
- }
MessageHandleWithMethod(response.name()).Define(&o, false);
StructTypeIsValidMethod(&response).Define(&o, false);
StructTypeIsInitializedMethod(&response).Define(&o, false);
@@ -173,13 +158,6 @@ void DefinitionGenerator::GenerateCodeForNotification(
StructTypeFromJsonConstructor(&notification, base_class_name).Define(&o , false);
StructTypeToJsonMethod(&notification).Define(&o , false);
}
- if (preferences_->generate_dbus) {
- StructTypeFromDbusReaderConstructor(preferences_, &notification, false,
- base_class_name).Define(&o, false);
- StructTypeToDbusWriterMethod(&notification, false).Define(&o , false);
- StructTypeDbusMessageSignatureMethod(preferences_,
- &notification, false).Define(&o, false);
- }
MessageHandleWithMethod(notification.name()).Define(&o, false);
StructTypeIsValidMethod(&notification).Define(&o, false);
StructTypeIsInitializedMethod(&notification).Define(&o, false);
@@ -209,13 +187,6 @@ void DefinitionGenerator::GenerateCodeForRequest(const Request& request,
StructTypeFromJsonConstructor(&request, base_class_name).Define(&o , false);
StructTypeToJsonMethod(&request).Define(&o , false);
}
- if (preferences_->generate_dbus) {
- StructTypeFromDbusReaderConstructor(preferences_, &request, false,
- base_class_name).Define(&o , false);
- StructTypeToDbusWriterMethod(&request, false).Define(&o , false);
- StructTypeDbusMessageSignatureMethod(preferences_,
- &request, false).Define(&o, false);
- }
StructTypeIsValidMethod(&request).Define(&o, false);
StructTypeIsInitializedMethod(&request).Define(&o, false);
StructTypeStructEmptyMethod(&request).Define(&o, false);
diff --git a/tools/intergen/cppgen/src/cppgen/generator_preferences.cc b/tools/intergen/cppgen/src/cppgen/generator_preferences.cc
index ca5b12e2d9..cc3bbe0819 100644
--- a/tools/intergen/cppgen/src/cppgen/generator_preferences.cc
+++ b/tools/intergen/cppgen/src/cppgen/generator_preferences.cc
@@ -44,21 +44,18 @@ namespace codegen {
TypePreferences::TypePreferences(int minimum_interger_size,
bool avoid_unsigned,
- bool generate_json,
- bool generate_dbus)
+ bool generate_json)
: minimum_interger_size(minimum_interger_size),
avoid_unsigned(avoid_unsigned),
- generate_json(generate_json),
- generate_dbus(generate_dbus) {
+ generate_json(generate_json) {
}
Preferences::Preferences(int minimum_interger_size,
bool avoid_unsigned,
bool generate_json,
- bool generate_dbus,
const std::set<std::string>& requested_interfaces)
: type_preferences(minimum_interger_size, avoid_unsigned,
- generate_json, generate_dbus),
+ generate_json),
requested_interfaces(requested_interfaces) {
}
diff --git a/tools/intergen/cppgen/src/cppgen/message_factory_function.cc b/tools/intergen/cppgen/src/cppgen/message_factory_function.cc
index 2cfc3ea0cd..bce7ef50b2 100644
--- a/tools/intergen/cppgen/src/cppgen/message_factory_function.cc
+++ b/tools/intergen/cppgen/src/cppgen/message_factory_function.cc
@@ -47,15 +47,15 @@ MessageFactoryFunction::MessageFactoryFunction(
SerializationType serialization_type,
FunctionMessage::MessageType factory_type)
: CppFunction("",
- serialization_type == kJson ? "NewFromJson" : "NewFromDbus",
+ "NewFromJson",
Capitalize(
FunctionMessage::MessageTypeToString(
factory_type)) + "*"),
interface_(interface),
factory_type_(factory_type) {
Add(MessageFactoryFunction::Parameter(
- serialization_type == kJson ? "json" : "reader",
- serialization_type == kJson ? "const Json::Value*": "dbus::MessageReader*"));
+ "json",
+ "const Json::Value*"));
Add(MessageFactoryFunction::Parameter("function_id", "FunctionID"));
}
diff --git a/tools/intergen/cppgen/src/cppgen/module_manager.cc b/tools/intergen/cppgen/src/cppgen/module_manager.cc
index 494e279e5c..104e3fa856 100644
--- a/tools/intergen/cppgen/src/cppgen/module_manager.cc
+++ b/tools/intergen/cppgen/src/cppgen/module_manager.cc
@@ -105,12 +105,6 @@ ModuleManager::ModuleManager(const std::string& name,
functions_source_.Include(
CppFile::Header("rpc_base/rpc_base_json_inl.h", true));
}
- if (prefs.generate_dbus) {
- structs_source_.Include(
- CppFile::Header("rpc_base/rpc_base_dbus_inl.h", true));
- functions_source_.Include(
- CppFile::Header("rpc_base/rpc_base_dbus_inl.h", true));
- }
}
ModuleManager::~ModuleManager() {
diff --git a/tools/intergen/cppgen/src/cppgen/struct_type_dbus_serializer.cc b/tools/intergen/cppgen/src/cppgen/struct_type_dbus_serializer.cc
deleted file mode 100644
index 5040652e43..0000000000
--- a/tools/intergen/cppgen/src/cppgen/struct_type_dbus_serializer.cc
+++ /dev/null
@@ -1,177 +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 "cppgen/struct_type_dbus_serializer.h"
-
-#include "cppgen/naming_convention.h"
-#include "cppgen/type_name_code_generator.h"
-#include "model/composite_type.h"
-#include "utils/safeformat.h"
-
-using typesafe_format::strmfmt;
-
-namespace codegen {
-
-StructTypeDbusMessageSignatureMethod::StructTypeDbusMessageSignatureMethod(
- const TypePreferences* preferences,
- const Struct* strct,
- bool substructure)
- : CppFunction(strct->name(), "GetDbusSignature", "void", kStatic),
- preferences_(preferences),
- substructure_(substructure),
- strct_(strct) {
- Add(Parameter("signature", "std::string*"));
-}
-
-StructTypeDbusMessageSignatureMethod::~StructTypeDbusMessageSignatureMethod() {
-}
-
-void StructTypeDbusMessageSignatureMethod::DefineBody(std::ostream* os) const {
- const Struct::FieldsList& fields = strct_->fields();
- if (!fields.empty()) {
- if (substructure_) {
- *os << "(*signature) += DBUS_STRUCT_BEGIN_CHAR;\n";
- }
- for (Struct::FieldsList::const_iterator i = fields.begin(),
- end = fields.end(); i != end; ++i) {
- // Field is considered optional if it has mandatory=false attribute and
- // if it does NOT have default values. Fields that have default values are
- // always available no mater if they present in input or not
- bool field_is_optional = false;
- if (!i->is_mandatory()) {
- if (i->default_value() == NULL) {
- field_is_optional = true;
- }
- }
- std::string field_type = RpcTypeNameGenerator(&strct_->interface(),
- preferences_,
- i->type(),
- field_is_optional).result();
- strmfmt(*os, "rpc::DbusSignature< {0} >({1});\n",
- field_type, parameters_[0].name);
-
- }
- if (substructure_) {
- *os << "(*signature) += DBUS_STRUCT_END_CHAR;\n";
- }
- }
-}
-
-StructTypeFromDbusReaderConstructor::StructTypeFromDbusReaderConstructor(
- const TypePreferences* preferences,
- const Struct* strct,
- bool substructure,
- const std::string& base_class_name)
- : CppStructConstructor(strct->name()),
- preferences_(preferences),
- strct_(strct),
- substructure_(substructure) {
- Add(Parameter("reader__", "dbus::MessageReader*"));
- std::string base_initializer = "reader__";
- if (!strct->frankenstruct()) {
- base_initializer = "InitHelper(true)";
- }
- Add(Initializer(base_class_name, base_initializer));
- // In case of non-substructure use initializer list to initialize fields
- // From MessageReader passed in
- if (!substructure_) {
- const Struct::FieldsList& fields = strct->fields();
- for (Struct::FieldsList::const_iterator i = fields.begin(), end = fields.end();
- i != end; ++i) {
- Add(Initializer(AvoidKeywords(i->name()),
- "reader__"));
- }
- }
-}
-
-StructTypeFromDbusReaderConstructor::~StructTypeFromDbusReaderConstructor() {
-}
-
-void StructTypeFromDbusReaderConstructor::DefineBody(std::ostream* os) const {
- const Struct::FieldsList& fields = strct_->fields();
- // If initializing substructure (a structure that is used as
- // a field of other structure) additional structure reading iterator
- // should be created
- if (substructure_ && !fields.empty()) {
- *os << "dbus::MessageReader subreader__ = reader__->TakeStructReader();\n";
- for (Struct::FieldsList::const_iterator i = fields.begin(), end = fields.end();
- i != end; ++i) {
- // Field is considered optional if it has mandatory=false attribute and
- // if it does NOT have default values. Fields that have default values are
- // always available no mater if they present in input or not
- bool field_is_optional = false;
- if (!i->is_mandatory()) {
- if (i->default_value() == NULL) {
- field_is_optional = true;
- }
- }
- std::string field_type = RpcTypeNameGenerator(&strct_->interface(),
- preferences_,
- i->type(),
- field_is_optional).result();
- strmfmt(*os, "{0} = {1}(&subreader__);\n", i->name(), field_type);
- }
- }
-}
-
-StructTypeToDbusWriterMethod::StructTypeToDbusWriterMethod(
- const Struct* strct,
- bool substructure)
- : CppFunction(strct->name(), "ToDbusWriter", "void", kConst),
- substructure_(substructure),
- strct_(strct) {
- Add(Parameter("writer__", "dbus::MessageWriter*"));
-}
-
-StructTypeToDbusWriterMethod::~StructTypeToDbusWriterMethod() {
-
-}
-
-void StructTypeToDbusWriterMethod::DefineBody(std::ostream* os) const {
- const Struct::FieldsList& fields = strct_->fields();
- if (!fields.empty()) {
- std::string writer_ptr_name = parameters_[0].name;
- if (substructure_) {
- strmfmt(*os, "dbus::MessageWriter subwriter__({0}, dbus::kStruct, NULL);\n",
- writer_ptr_name);
- writer_ptr_name = "&subwriter__";
- }
- for (Struct::FieldsList::const_iterator i = fields.begin(), end = fields.end();
- i != end; ++i) {
- strmfmt(*os, "{0}.ToDbusWriter({1});\n",
- i->name(),
- writer_ptr_name);
- }
- }
-}
-
-
-} // namespace codegen
diff --git a/tools/intergen/test/CMakeLists.txt b/tools/intergen/test/CMakeLists.txt
index f2973dd71c..7695ec419c 100644
--- a/tools/intergen/test/CMakeLists.txt
+++ b/tools/intergen/test/CMakeLists.txt
@@ -30,11 +30,7 @@
if(BUILD_TESTS)
include(${CMAKE_SOURCE_DIR}/tools/intergen/GenerateInterfaceLibrary.cmake)
-if (${HMI_DBUS_API})
- GenerateInterfaceLibrary("test_interface.xml" test_rpc_interface DBUS_SUPPORT)
-else()
- GenerateInterfaceLibrary("test_interface.xml" test_rpc_interface)
-endif()
+GenerateInterfaceLibrary("test_interface.xml" test_rpc_interface)
set (TEST_HMI_INTERFACES
common
@@ -45,11 +41,7 @@ set (TEST_HMI_INTERFACES
ui
)
-if (${HMI_DBUS_API})
- GenerateInterfaceLibrary("test_hmi_interface.xml" "${TEST_HMI_INTERFACES}" AUTO_FUNC_IDS DBUS_SUPPORT)
-else()
- GenerateInterfaceLibrary("test_hmi_interface.xml" "${TEST_HMI_INTERFACES}" AUTO_FUNC_IDS)
-endif()
+GenerateInterfaceLibrary("test_hmi_interface.xml" "${TEST_HMI_INTERFACES}" AUTO_FUNC_IDS)
include_directories (
${CMAKE_SOURCE_DIR}/src/components/rpc_base/include
@@ -70,16 +62,5 @@ set (SOURCES
generated_interface_json_tests.cc
)
-if (${HMI_DBUS_API})
- # Build dbus tests
- include_directories(
- ${CMAKE_SOURCE_DIR}/src/components/dbus/include
- ${DBUS_INCLUDE_DIRS}
- )
- set (LIBRARIES ${LIBRARIES} DBus)
- set (SOURCES ${SOURCES} generated_interface_dbus_tests.cc)
-endif ()
-
-
create_test(test_generated_interface "${SOURCES}" "${LIBRARIES}")
endif()
diff --git a/tools/intergen/test/generated_interface_dbus_tests.cc b/tools/intergen/test/generated_interface_dbus_tests.cc
deleted file mode 100644
index a510ccd77a..0000000000
--- a/tools/intergen/test/generated_interface_dbus_tests.cc
+++ /dev/null
@@ -1,127 +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 "gmock/gmock.h"
-
-#include <test_rpc_interface/interface.h>
-#include <test_rpc_interface/functions.h>
-
-#include "dbus/dbus_message.h"
-
-namespace test {
-using namespace rpc::test_rpc_interface;
-
-TEST(GeneratedInterfaceDbusTests, TestFailedDbusDeserialization) {
- dbus::MessageRef msg(dbus_message_new(DBUS_MESSAGE_TYPE_METHOD_CALL));
- {
- dbus::MessageWriter writer(msg);
- }
- {
- dbus::MessageReader reader(msg);
- request::DiagnosticMessage dm(&reader);
- ASSERT_TRUE(reader.has_failed());
- ASSERT_TRUE(dm.is_initialized());
- ASSERT_FALSE(dm.is_valid());
- }
-}
-
-TEST(GeneratedInterfaceDbusTests, TestDbusDeserialization) {
- dbus::MessageRef msg(dbus_message_new(DBUS_MESSAGE_TYPE_METHOD_CALL));
- {
- dbus::MessageWriter writer(msg);
- writer.PutUint16(22);
- writer.PutUint16(42);
- dbus::MessageWriter array_writer(&writer, dbus::kArray, DBUS_TYPE_BYTE_AS_STRING);
- array_writer.PutByte(11);
- }
- {
- dbus::MessageReader reader(msg);
- request::DiagnosticMessage dm(&reader);
- ASSERT_FALSE(reader.has_failed());
- ASSERT_FALSE(reader.HasNext());
- ASSERT_TRUE(dm.is_initialized());
- ASSERT_TRUE(dm.is_valid());
- ASSERT_EQ(dm.targetID, 22);
- ASSERT_EQ(dm.messageLength, 42);
- ASSERT_EQ(dm.messageData.size(), 1u);
- }
-}
-
-TEST(GeneratedInterfaceDbusTests, TestDbusSerializationDeserialization) {
- dbus::MessageRef msg(dbus_message_new(DBUS_MESSAGE_TYPE_METHOD_CALL));
- {
- dbus::MessageWriter writer(msg);
- request::DiagnosticMessage dm;
- dm.targetID = 70;
- dm.messageLength = 1;
- dm.messageData.push_back(42);
- dm.ToDbusWriter(&writer);
- }
- {
- dbus::MessageReader reader(msg);
- request::DiagnosticMessage dm(&reader);
- ASSERT_FALSE(reader.has_failed());
- ASSERT_FALSE(reader.HasNext());
- ASSERT_TRUE(dm.is_initialized());
- ASSERT_TRUE(dm.is_valid());
- ASSERT_EQ(dm.targetID, 70);
- ASSERT_EQ(dm.messageLength, 1);
- ASSERT_EQ(dm.messageData.size(), 1u);
- ASSERT_EQ(dm.messageData[0], 42u);
- }
-}
-
-TEST(GeneratedInterfaceDbusTests, TestDbusAddSubMenuSerializatioDeserialization) {
- dbus::MessageRef msg(dbus_message_new(DBUS_MESSAGE_TYPE_METHOD_CALL));
- {
- dbus::MessageWriter writer(msg);
- notification::DummyNotification dn;
- TdStruct tds;
- tds.resArrMap["Hello"].push_back(R_SUCCESS);
- (*tds.optionalResArrMap)["World"].push_back(R_INVALID_DATA);
- dn.tds.push_back(tds);
- ASSERT_TRUE(dn.is_valid());
- dn.ToDbusWriter(&writer);
- }
- {
- dbus::MessageReader reader(msg);
- notification::DummyNotification dn(&reader);
- ASSERT_TRUE(dn.is_initialized());
- ASSERT_TRUE(dn.is_valid());
- ASSERT_FALSE(reader.has_failed());
- ASSERT_FALSE(reader.HasNext());
- ASSERT_EQ(dn.tds[0].resArrMap["Hello"][0], R_SUCCESS);
- ASSERT_EQ((*dn.tds[0].optionalResArrMap)["World"][0], R_INVALID_DATA);
- }
-}
-
-} // namespace test
diff --git a/tools/intergen/test/test_hmi_interface.xml b/tools/intergen/test/test_hmi_interface.xml
index 16f2892327..c8d0a789e0 100644
--- a/tools/intergen/test/test_hmi_interface.xml
+++ b/tools/intergen/test/test_hmi_interface.xml
@@ -2777,938 +2777,573 @@
</description>
</param>
</function>
-
-<!--Qt HMI version of GetVehicleData-->
- <function name="GetGpsData" messagetype="request">
- <param name="appID" type="Integer" mandatory="true">
- <description>ID of application requested this RPC.</description>
- </param>
- </function>
- <function name="GetGpsData" messagetype="response">
- <param name="gps" type="Common.GPSData" mandatory="true">
+ <function name="SubscribeVehicleData" messagetype="request">
+ <description>
+ Subscribes for specific published data items.
+ The data will be only sent if it has changed.
+ The application will be notified by the onVehicleData notification whenever new data is available.
+ To unsubscribe the notifications, use unsubscribe with the same subscriptionType.
+ </description>
+ <param name="gps" type="Boolean" mandatory="false">
<description>See GPSData</description>
</param>
- </function>
-
- <function name="GetSpeed" messagetype="request">
- <param name="appID" type="Integer" mandatory="true">
- <description>ID of application requested this RPC.</description>
- </param>
- </function>
- <function name="GetSpeed" messagetype="response">
- <param name="speed" type="Float" minvalue="0" maxvalue="700" mandatory="true">
+ <param name="speed" type="Boolean" mandatory="false">
<description>The vehicle speed in kilometers per hour</description>
</param>
- </function>
-
- <function name="GetRpm" messagetype="request">
- <param name="appID" type="Integer" mandatory="true">
- <description>ID of application requested this RPC.</description>
- </param>
- </function>
- <function name="GetRpm" messagetype="response">
- <param name="rpm" type="Integer" minvalue="0" maxvalue="20000" mandatory="true">
+ <param name="rpm" type="Boolean" mandatory="false">
<description>The number of revolutions per minute of the engine</description>
</param>
- </function>
-
- <function name="GetFuelLevel" messagetype="request">
- <param name="appID" type="Integer" mandatory="true">
- <description>ID of application requested this RPC.</description>
- </param>
- </function>
- <function name="GetFuelLevel" messagetype="response">
- <param name="fuelLevel" type="Float" minvalue="-6" maxvalue="106" mandatory="true">
+ <param name="fuelLevel" type="Boolean" mandatory="false">
<description>The fuel level in the tank (percentage)</description>
</param>
- </function>
-
- <function name="GetFuelLevelState" messagetype="request">
- <param name="appID" type="Integer" mandatory="true">
- <description>ID of application requested this RPC.</description>
- </param>
- </function>
- <function name="GetFuelLevelState" messagetype="response">
- <param name="fuelLevel_State" type="Common.ComponentVolumeStatus" mandatory="true">
+ <param name="fuelLevel_State" type="Boolean" mandatory="false">
<description>The fuel level state</description>
</param>
- </function>
-
- <function name="GetInstantFuelConsumption" messagetype="request">
- <param name="appID" type="Integer" mandatory="true">
- <description>ID of application requested this RPC.</description>
- </param>
- </function>
- <function name="GetInstantFuelConsumption" messagetype="response">
- <param name="instantFuelConsumption" type="Float" minvalue="0" maxvalue="25575" mandatory="true">
+ <param name="instantFuelConsumption" type="Boolean" mandatory="false">
<description>The instantaneous fuel consumption in microlitres</description>
</param>
- </function>
-
- <function name="GetExternalTemperature" messagetype="request">
- <param name="appID" type="Integer" mandatory="true">
- <description>ID of application requested this RPC.</description>
- </param>
- </function>
- <function name="GetExternalTemperature" messagetype="response">
- <param name="externalTemperature" type="Float" minvalue="-40" maxvalue="100" mandatory="true">
+ <param name="externalTemperature" type="Boolean" mandatory="false">
<description>The external temperature in degrees celsius</description>
</param>
- </function>
-
- <function name="GetVin" messagetype="request">
- <param name="appID" type="Integer" mandatory="true">
- <description>ID of application requested this RPC.</description>
- </param>
- </function>
- <function name="GetVin" messagetype="response">
- <param name="vin" type="String" maxlength="17" mandatory="true">
- <description>Vehicle identification number</description>
- </param>
- </function>
-
- <function name="GetPrndl" messagetype="request">
- <param name="appID" type="Integer" mandatory="true">
- <description>ID of application requested this RPC.</description>
- </param>
- </function>
- <function name="GetPrndl" messagetype="response">
- <param name="prndl" type="Common.PRNDL" mandatory="true">
+ <param name="prndl" type="Boolean" mandatory="false">
<description>See PRNDL</description>
</param>
- </function>
-
- <function name="GetTirePressure" messagetype="request">
- <param name="appID" type="Integer" mandatory="true">
- <description>ID of application requested this RPC.</description>
- </param>
- </function>
- <function name="GetTirePressure" messagetype="response">
- <param name="tirePressure" type="Common.TireStatus" mandatory="true">
+ <param name="tirePressure" type="Boolean" mandatory="false">
<description>See TireStatus</description>
</param>
- </function>
-
- <function name="GetOdometer" messagetype="request">
- <param name="appID" type="Integer" mandatory="true">
- <description>ID of application requested this RPC.</description>
- </param>
- </function>
- <function name="GetOdometer" messagetype="response">
- <param name="odometer" type="Integer" minvalue="0" maxvalue="17000000" mandatory="true">
+ <param name="odometer" type="Boolean" mandatory="false">
<description>Odometer in km</description>
</param>
- </function>
-
- <function name="GetBeltStatus" messagetype="request">
- <param name="appID" type="Integer" mandatory="true">
- <description>ID of application requested this RPC.</description>
- </param>
- </function>
- <function name="GetBeltStatus" messagetype="response">
- <param name="beltStatus" type="Common.BeltStatus" mandatory="true">
+ <param name="beltStatus" type="Boolean" mandatory="false">
<description>The status of the seat belts</description>
</param>
- </function>
-
- <function name="GetBodyInformation" messagetype="request">
- <param name="appID" type="Integer" mandatory="true">
- <description>ID of application requested this RPC.</description>
- </param>
- </function>
- <function name="GetBodyInformation" messagetype="response">
- <param name="bodyInformation" type="Common.BodyInformation" mandatory="true">
+ <param name="bodyInformation" type="Boolean" mandatory="false">
<description>The body information including power modes</description>
</param>
- </function>
-
- <function name="GetDeviceStatus" messagetype="request">
- <param name="appID" type="Integer" mandatory="true">
- <description>ID of application requested this RPC.</description>
- </param>
- </function>
- <function name="GetDeviceStatus" messagetype="response">
- <param name="deviceStatus" type="Common.DeviceStatus" mandatory="true">
+ <param name="deviceStatus" type="Boolean" mandatory="false">
<description>The device status including signal and battery strength</description>
</param>
- </function>
-
- <function name="GetDriverBraking" messagetype="request">
- <param name="appID" type="Integer" mandatory="true">
- <description>ID of application requested this RPC.</description>
- </param>
- </function>
- <function name="GetDriverBraking" messagetype="response">
- <param name="driverBraking" type="Common.VehicleDataEventStatus" mandatory="true">
+ <param name="driverBraking" type="Boolean" mandatory="false">
<description>The status of the brake pedal</description>
</param>
- </function>
-
- <function name="GetWiperStatus" messagetype="request">
- <param name="appID" type="Integer" mandatory="true">
- <description>ID of application requested this RPC.</description>
- </param>
- </function>
- <function name="GetWiperStatus" messagetype="response">
- <param name="wiperStatus" type="Common.WiperStatus" mandatory="true">
+ <param name="wiperStatus" type="Boolean" mandatory="false">
<description>The status of the wipers</description>
</param>
- </function>
-
- <function name="GetHeadLampStatus" messagetype="request">
- <param name="appID" type="Integer" mandatory="true">
- <description>ID of application requested this RPC.</description>
- </param>
- </function>
- <function name="GetHeadLampStatus" messagetype="response">
- <param name="headLampStatus" type="Common.HeadLampStatus" mandatory="true">
+ <param name="headLampStatus" type="Boolean" mandatory="false">
<description>Status of the head lamps</description>
</param>
- </function>
-
- <function name="GetEngineTorque" messagetype="request">
- <param name="appID" type="Integer" mandatory="true">
- <description>ID of application requested this RPC.</description>
- </param>
- </function>
- <function name="GetEngineTorque" messagetype="response">
- <param name="engineTorque" type="Float" minvalue="-1000" maxvalue="2000" mandatory="true">
+ <param name="engineTorque" type="Boolean" mandatory="false">
<description>Torque value for engine (in Nm) on non-diesel variants</description>
</param>
- </function>
-
- <function name="GetAccPedalPosition" messagetype="request">
- <param name="appID" type="Integer" mandatory="true">
- <description>ID of application requested this RPC.</description>
- </param>
- </function>
- <function name="GetAccPedalPosition" messagetype="response">
- <param name="accPedalPosition" type="Float" minvalue="0" maxvalue="100" mandatory="true">
+ <param name="accPedalPosition" type="Boolean" mandatory="false">
<description>Accelerator pedal position (percentage depressed)</description>
</param>
- </function>
-
- <function name="GetSteeringWheelAngle" messagetype="request">
- <param name="appID" type="Integer" mandatory="true">
- <description>ID of application requested this RPC.</description>
- </param>
- </function>
- <function name="GetSteeringWheelAngle" messagetype="response">
- <param name="steeringWheelAngle" type="Float" minvalue="-2000" maxvalue="2000" mandatory="true">
+ <param name="steeringWheelAngle" type="Boolean" mandatory="false">
<description>Current angle of the steering wheel (in deg)</description>
</param>
- </function>
-
- <function name="GetECallInfo" messagetype="request">
- <param name="appID" type="Integer" mandatory="true">
- <description>ID of application requested this RPC.</description>
+ <param name="engineOilLife" type="Boolean" mandatory="false">
+ <description>The estimated percentage of remaining oil life of the engine.</description>
</param>
- </function>
- <function name="GetECallInfo" messagetype="response">
- <param name="eCallInfo" type="Common.ECallInfo" mandatory="true">
+ <!-- Ford Specific Data Items -->
+ <param name="eCallInfo" type="Boolean" mandatory="false">
<description>Emergency Call notification and confirmation data</description>
</param>
- </function>
-
- <function name="GetAirbagStatus" messagetype="request">
- <param name="appID" type="Integer" mandatory="true">
- <description>ID of application requested this RPC.</description>
- </param>
- </function>
- <function name="GetAirbagStatus" messagetype="response">
- <param name="airbagStatus" type="Common.AirbagStatus" mandatory="true">
+ <param name="airbagStatus" type="Boolean" mandatory="false">
<description>The status of the air bags</description>
</param>
- </function>
-
- <function name="GetEmergencyEvent" messagetype="request">
- <param name="appID" type="Integer" mandatory="true">
- <description>ID of application requested this RPC.</description>
- </param>
- </function>
- <function name="GetEmergencyEvent" messagetype="response">
- <param name="emergencyEvent" type="Common.EmergencyEvent" mandatory="true">
+ <param name="emergencyEvent" type="Boolean" mandatory="false">
<description>Information related to an emergency event (and if it occurred)</description>
</param>
- </function>
-
- <function name="GetClusterModeStatus" messagetype="request">
- <param name="appID" type="Integer" mandatory="true">
- <description>ID of application requested this RPC.</description>
- </param>
- </function>
- <function name="GetClusterModeStatus" messagetype="response">
- <param name="clusterModeStatus" type="Common.ClusterModeStatus" mandatory="true">
+ <param name="clusterModeStatus" type="Boolean" mandatory="false">
<description>The status modes of the cluster</description>
</param>
- </function>
-
- <function name="GetMyKey" messagetype="request">
- <param name="appID" type="Integer" mandatory="true">
- <description>ID of application requested this RPC.</description>
- </param>
- </function>
- <function name="GetMyKey" messagetype="response">
- <param name="myKey" type="Common.MyKey" mandatory="true">
+ <param name="myKey" type="Boolean" mandatory="false">
<description>Information related to the MyKey feature</description>
</param>
+ <!-- / Ford Specific Data Items -->
</function>
-<!--end Qt HMI version of GetVehicleData-->
-
-<!--Qt HMI version of OnVehicleData-->
- <function name="OnGpsData" messagetype="notification">
- <param name="gps" type="Common.GPSData" mandatory="true">
+ <function name="SubscribeVehicleData" messagetype="response">
+ <param name="gps" type="Common.VehicleDataResult" mandatory="false">
<description>See GPSData</description>
</param>
- </function>
-
- <function name="OnSpeed" messagetype="notification">
- <param name="speed" type="Float" minvalue="0" maxvalue="700" mandatory="true">
+ <param name="speed" type="Common.VehicleDataResult" mandatory="false">
<description>The vehicle speed in kilometers per hour</description>
</param>
- </function>
-
- <function name="OnRpm" messagetype="notification">
- <param name="rpm" type="Integer" minvalue="0" maxvalue="20000" mandatory="true">
+ <param name="rpm" type="Common.VehicleDataResult" mandatory="false">
<description>The number of revolutions per minute of the engine</description>
</param>
- </function>
-
- <function name="OnFuelLevel" messagetype="notification">
- <param name="fuelLevel" type="Float" minvalue="-6" maxvalue="106" mandatory="true">
+ <param name="fuelLevel" type="Common.VehicleDataResult" mandatory="false">
<description>The fuel level in the tank (percentage)</description>
</param>
- </function>
-
- <function name="OnFuelLevelState" messagetype="notification">
- <param name="fuelLevel_State" type="Common.ComponentVolumeStatus" mandatory="true">
+ <param name="fuelLevel_State" type="Common.VehicleDataResult" mandatory="false">
<description>The fuel level state</description>
</param>
- </function>
-
- <function name="OnInstantFuelConsumption" messagetype="notification">
- <param name="instantFuelConsumption" type="Float" minvalue="0" maxvalue="25575" mandatory="true">
+ <param name="instantFuelConsumption" type="Common.VehicleDataResult" mandatory="false">
<description>The instantaneous fuel consumption in microlitres</description>
</param>
- </function>
-
- <function name="OnExternalTemperature" messagetype="notification">
- <param name="externalTemperature" type="Float" minvalue="-40" maxvalue="100" mandatory="true">
- <description>The external temperature in degrees celsius</description>
- </param>
- </function>
-
- <function name="OnVin" messagetype="notification">
- <param name="vin" type="String" maxlength="17" mandatory="true">
- <description>Vehicle identification number.</description>
+ <param name="externalTemperature" type="Common.VehicleDataResult" mandatory="false">
+ <description>The external temperature in degrees celsius.</description>
</param>
- </function>
-
- <function name="OnPrndl" messagetype="notification">
- <param name="prndl" type="Common.PRNDL" mandatory="true">
+ <param name="prndl" type="Common.VehicleDataResult" mandatory="false">
<description>See PRNDL</description>
</param>
- </function>
-
- <function name="OnTirePressure" messagetype="notification">
- <param name="tirePressure" type="Common.TireStatus" mandatory="true">
+ <param name="tirePressure" type="Common.VehicleDataResult" mandatory="false">
<description>See TireStatus</description>
</param>
- </function>
-
- <function name="OnOdometer" messagetype="notification">
- <param name="odometer" type="Integer" minvalue="0" maxvalue="2000000" mandatory="true">
+ <param name="odometer" type="Common.VehicleDataResult" mandatory="false">
<description>Odometer in km</description>
</param>
- </function>
-
- <function name="OnBeltStatus" messagetype="notification">
- <param name="beltStatus" type="Common.BeltStatus" mandatory="true">
+ <param name="beltStatus" type="Common.VehicleDataResult" mandatory="false">
<description>The status of the seat belts</description>
</param>
- </function>
-
- <function name="OnBodyInformation" messagetype="notification">
- <param name="bodyInformation" type="Common.BodyInformation" mandatory="true">
+ <param name="bodyInformation" type="Common.VehicleDataResult" mandatory="false">
<description>The body information including power modes</description>
</param>
- </function>
-
- <function name="OnDeviceStatus" messagetype="notification">
- <param name="deviceStatus" type="Common.DeviceStatus" mandatory="true">
+ <param name="deviceStatus" type="Common.VehicleDataResult" mandatory="false">
<description>The device status including signal and battery strength</description>
</param>
- </function>
-
- <function name="OnDriverBraking" messagetype="notification">
- <param name="driverBraking" type="Common.VehicleDataEventStatus" mandatory="true">
+ <param name="driverBraking" type="Common.VehicleDataResult" mandatory="false">
<description>The status of the brake pedal</description>
</param>
- </function>
-
- <function name="OnWiperStatus" messagetype="notification">
- <param name="wiperStatus" type="Common.WiperStatus" mandatory="true">
+ <param name="wiperStatus" type="Common.VehicleDataResult" mandatory="false">
<description>The status of the wipers</description>
</param>
- </function>
-
- <function name="OnHeadLampStatus" messagetype="notification">
- <param name="headLampStatus" type="Common.HeadLampStatus" mandatory="true">
+ <param name="headLampStatus" type="Common.VehicleDataResult" mandatory="false">
<description>Status of the head lamps</description>
</param>
- </function>
-
- <function name="OnEngineTorque" messagetype="notification">
- <param name="engineTorque" type="Float" minvalue="-1000" maxvalue="2000" mandatory="true">
+ <param name="engineTorque" type="Common.VehicleDataResult" mandatory="false">
<description>Torque value for engine (in Nm) on non-diesel variants</description>
</param>
- </function>
-
- <function name="OnAccPedalPosition" messagetype="notification">
- <param name="accPedalPosition" type="Float" minvalue="0" maxvalue="100" mandatory="true">
+ <param name="accPedalPosition" type="Common.VehicleDataResult" mandatory="false">
<description>Accelerator pedal position (percentage depressed)</description>
</param>
- </function>
-
- <function name="OnSteeringWheelAngle" messagetype="notification">
- <param name="steeringWheelAngle" type="Float" minvalue="-2000" maxvalue="2000" mandatory="true">
+ <param name="steeringWheelAngle" type="Common.VehicleDataResult" mandatory="false">
<description>Current angle of the steering wheel (in deg)</description>
</param>
- </function>
-
- <function name="OnMyKey" messagetype="notification">
- <param name="myKey" type="Common.MyKey" mandatory="true">
+ <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>
+ </param>
+ <param name="airbagStatus" type="Common.VehicleDataResult" mandatory="false">
+ <description>The status of the air bags</description>
+ </param>
+ <param name="emergencyEvent" type="Common.VehicleDataResult" mandatory="false">
+ <description>Information related to an emergency event (and if it occurred)</description>
+ </param>
+ <param name="clusterModes" type="Common.VehicleDataResult" mandatory="false">
+ <description>The status modes of the cluster</description>
+ </param>
+ <param name="myKey" type="Common.VehicleDataResult" mandatory="false">
<description>Information related to the MyKey feature</description>
</param>
+ <!-- / Ford Specific Data Items -->
</function>
-<!--end Qt HMI version of OnVehicleData-->
-
-<!--Qt HMI version of SubscribeVehicleData/UnsubscribeVehicleData-->
- <function name="SubscribeGps" messagetype="request">
+ <function name="UnsubscribeVehicleData" messagetype="request">
+ <description>
+ This function is used to unsubscribe the notifications from the subscribeVehicleData function.
+ </description>
<param name="appID" type="Integer" mandatory="true">
- <description>ID of application requested this RPC.</description>
+ <description>ID of application that requested this RPC.</description>
</param>
- </function>
- <function name="SubscribeGps" messagetype="response">
- <param name="gps" type="Common.VehicleDataResult" mandatory="true">
+ <param name="gps" type="Boolean" mandatory="false">
<description>See GPSData</description>
</param>
- </function>
- <function name="UnsubscribeGps" messagetype="request">
- <param name="appID" type="Integer" mandatory="true">
- <description>ID of application requested this RPC.</description>
+ <param name="speed" type="Boolean" mandatory="false">
+ <description>The vehicle speed in kilometers per hour</description>
</param>
- </function>
- <function name="UnsubscribeGps" messagetype="response">
- <param name="gps" type="Common.VehicleDataResult" mandatory="true">
- <description>See GPSData</description>
+ <param name="rpm" type="Boolean" mandatory="false">
+ <description>The number of revolutions per minute of the engine</description>
</param>
- </function>
-
- <function name="SubscribeSpeed" messagetype="request">
- <param name="appID" type="Integer" mandatory="true">
- <description>ID of application requested this RPC.</description>
+ <param name="fuelLevel" type="Boolean" mandatory="false">
+ <description>The fuel level in the tank (percentage)</description>
</param>
- </function>
- <function name="SubscribeSpeed" messagetype="response">
- <param name="speed" type="Common.VehicleDataResult" mandatory="true">
- <description>The vehicle speed in kilometers per hour</description>
+ <param name="fuelLevel_State" type="Boolean" mandatory="false">
+ <description>The fuel level state</description>
</param>
- </function>
- <function name="UnsubscribeSpeed" messagetype="request">
- <param name="appID" type="Integer" mandatory="true">
- <description>ID of application requested this RPC.</description>
+ <param name="instantFuelConsumption" type="Boolean" mandatory="false">
+ <description>The instantaneous fuel consumption in microlitres</description>
</param>
- </function>
- <function name="UnsubscribeSpeed" messagetype="response">
- <param name="speed" type="Common.VehicleDataResult" mandatory="true">
- <description>The vehicle speed in kilometers per hour</description>
+ <param name="externalTemperature" type="Boolean" mandatory="false">
+ <description>The external temperature in degrees celsius.</description>
</param>
- </function>
-
- <function name="SubscribeRpm" messagetype="request">
- <param name="appID" type="Integer" mandatory="true">
- <description>ID of application requested this RPC.</description>
+ <param name="prndl" type="Boolean" mandatory="false">
+ <description>See PRNDL</description>
</param>
- </function>
- <function name="SubscribeRpm" messagetype="response">
- <param name="rpm" type="Common.VehicleDataResult" mandatory="true">
- <description>The number of revolutions per minute of the engine</description>
+ <param name="tirePressure" type="Boolean" mandatory="false">
+ <description>See TireStatus</description>
</param>
- </function>
- <function name="UnsubscribeRpm" messagetype="request">
- <param name="appID" type="Integer" mandatory="true">
- <description>ID of application requested this RPC.</description>
+ <param name="odometer" type="Boolean" mandatory="false">
+ <description>Odometer in km</description>
</param>
- </function>
- <function name="UnsubscribeRpm" messagetype="response">
- <param name="rpm" type="Common.VehicleDataResult" mandatory="true">
- <description>The number of revolutions per minute of the engine</description>
+ <param name="beltStatus" type="Boolean" mandatory="false">
+ <description>The status of the seat belts</description>
</param>
- </function>
-
- <function name="SubscribeFuelLevel" messagetype="request">
- <param name="appID" type="Integer" mandatory="true">
- <description>ID of application requested this RPC.</description>
+ <param name="bodyInformation" type="Boolean" mandatory="false">
+ <description>The body information including power modes</description>
</param>
- </function>
- <function name="SubscribeFuelLevel" messagetype="response">
- <param name="fuelLevel" type="Common.VehicleDataResult" mandatory="true">
- <description>The fuel level in the tank (percentage)</description>
+ <param name="deviceStatus" type="Boolean" mandatory="false">
+ <description>The device status including signal and battery strength</description>
</param>
- </function>
- <function name="UnsubscribeFuelLevel" messagetype="request">
- <param name="appID" type="Integer" mandatory="true">
- <description>ID of application requested this RPC.</description>
+ <param name="driverBraking" type="Boolean" mandatory="false">
+ <description>The status of the brake pedal</description>
</param>
- </function>
- <function name="UnsubscribeFuelLevel" messagetype="response">
- <param name="fuelLevel" type="Common.VehicleDataResult" mandatory="true">
- <description>The fuel level in the tank (percentage)</description>
+ <param name="wiperStatus" type="Boolean" mandatory="false">
+ <description>The status of the wipers</description>
</param>
- </function>
-
- <function name="SubscribeFuelLevel_State" messagetype="request">
- <param name="appID" type="Integer" mandatory="true">
- <description>ID of application requested this RPC.</description>
+ <param name="headLampStatus" type="Boolean" mandatory="false">
+ <description>Status of the head lamps</description>
</param>
- </function>
- <function name="SubscribeFuelLevel_State" messagetype="response">
- <param name="fuelLevel_State" type="Common.VehicleDataResult" mandatory="true">
- <description>The fuel level state</description>
+ <param name="engineTorque" type="Boolean" mandatory="false">
+ <description>Torque value for engine (in Nm) on non-diesel variants</description>
</param>
- </function>
- <function name="UnsubscribeFuelLevel_State" messagetype="request">
- <param name="appID" type="Integer" mandatory="true">
- <description>ID of application requested this RPC.</description>
+ <param name="accPedalPosition" type="Boolean" mandatory="false">
+ <description>Accelerator pedal position (percentage depressed)</description>
</param>
- </function>
- <function name="UnsubscribeFuelLevel_State" messagetype="response">
- <param name="fuelLevel_State" type="Common.VehicleDataResult" mandatory="true">
- <description>The fuel level state</description>
+ <param name="steeringWheelAngle" type="Boolean" mandatory="false">
+ <description>Current angle of the steering wheel (in deg)</description>
</param>
- </function>
-
- <function name="SubscribeInstantFuelConsumption" messagetype="request">
- <param name="appID" type="Integer" mandatory="true">
- <description>ID of application requested this RPC.</description>
+ <param name="engineOilLife" type="Boolean" mandatory="false">
+ <description>The estimated percentage of remaining oil life of the engine.</description>
</param>
- </function>
- <function name="SubscribeInstantFuelConsumption" messagetype="response">
- <param name="instantFuelConsumption" type="Common.VehicleDataResult" mandatory="true">
- <description>The instantaneous fuel consumption in microlitres</description>
+ <!-- Ford Specific Data Items -->
+ <param name="eCallInfo" type="Boolean" mandatory="false">
+ <description>Emergency Call notification and confirmation data</description>
</param>
- </function>
- <function name="UnsubscribeInstantFuelConsumption" messagetype="request">
- <param name="appID" type="Integer" mandatory="true">
- <description>ID of application requested this RPC.</description>
+ <param name="airbagStatus" type="Boolean" mandatory="false">
+ <description>The status of the air bags</description>
</param>
- </function>
- <function name="UnsubscribeInstantFuelConsumption" messagetype="response">
- <param name="instantFuelConsumption" type="Common.VehicleDataResult" mandatory="true">
- <description>The instantaneous fuel consumption in microlitres</description>
+ <param name="emergencyEvent" type="Boolean" mandatory="false">
+ <description>Information related to an emergency event (and if it occurred)</description>
</param>
- </function>
-
- <function name="SubscribeExternalTemperature" messagetype="request">
- <param name="appID" type="Integer" mandatory="true">
- <description>ID of application requested this RPC.</description>
+ <param name="clusterModeStatus" type="Boolean" mandatory="false">
+ <description>The status modes of the cluster</description>
</param>
- </function>
- <function name="SubscribeExternalTemperature" messagetype="response">
- <param name="externalTemperature" type="Common.VehicleDataResult" mandatory="true">
- <description>The external temperature in degrees celsius</description>
+ <param name="myKey" type="Boolean" mandatory="false">
+ <description>Information related to the MyKey feature</description>
</param>
+ <!-- / Ford Specific Data Items -->
</function>
- <function name="UnsubscribeExternalTemperature" messagetype="request">
- <param name="appID" type="Integer" mandatory="true">
- <description>ID of application requested this RPC.</description>
+ <function name="UnsubscribeVehicleData" messagetype="response">
+ <param name="gps" type="Common.VehicleDataResult" mandatory="false">
+ <description>See GPSData</description>
</param>
- </function>
- <function name="UnsubscribeExternalTemperature" messagetype="response">
- <param name="externalTemperature" type="Common.VehicleDataResult" mandatory="true">
- <description>The external temperature in degrees celsius</description>
+ <param name="speed" type="Common.VehicleDataResult" mandatory="false">
+ <description>The vehicle speed in kilometers per hour</description>
</param>
- </function>
-
- <function name="SubscribePrndl" messagetype="request">
- <param name="appID" type="Integer" mandatory="true">
- <description>ID of application requested this RPC.</description>
+ <param name="rpm" type="Common.VehicleDataResult" mandatory="false">
+ <description>The number of revolutions per minute of the engine</description>
</param>
- </function>
- <function name="SubscribePrndl" messagetype="response">
- <param name="prndl" type="Common.VehicleDataResult" mandatory="true">
- <description>See PRNDL</description>
+ <param name="fuelLevel" type="Common.VehicleDataResult" mandatory="false">
+ <description>The fuel level in the tank (percentage)</description>
</param>
- </function>
- <function name="UnsubscribePrndl" messagetype="request">
- <param name="appID" type="Integer" mandatory="true">
- <description>ID of application requested this RPC.</description>
+ <param name="fuelLevel_State" type="Common.VehicleDataResult" mandatory="false">
+ <description>The fuel level state</description>
</param>
- </function>
- <function name="UnsubscribePrndl" messagetype="response">
- <param name="prndl" type="Common.VehicleDataResult" mandatory="true">
+ <param name="instantFuelConsumption" type="Common.VehicleDataResult" mandatory="false">
+ <description>The instantaneous fuel consumption in microlitres</description>
+ </param>
+ <param name="externalTemperature" type="Common.VehicleDataResult" mandatory="false">
+ <description>The external temperature in degrees celsius</description>
+ </param>
+ <param name="prndl" type="Common.VehicleDataResult" mandatory="false">
<description>See PRNDL</description>
</param>
- </function>
-
- <function name="SubscribeVin" messagetype="request">
- <param name="appID" type="Integer" mandatory="true">
- <description>ID of application requested this RPC.</description>
+ <param name="tirePressure" type="Common.VehicleDataResult" mandatory="false">
+ <description>See TireStatus</description>
</param>
- </function>
- <function name="SubscribeVin" messagetype="response">
- <param name="vin" type="String" maxlength="17" mandatory="true">
- <description>Vehicle identification number</description>
+ <param name="odometer" type="Common.VehicleDataResult" mandatory="false">
+ <description>Odometer in km</description>
</param>
- </function>
- <function name="UnsubscribeVin" messagetype="request">
- <param name="appID" type="Integer" mandatory="true">
- <description>ID of application requested this RPC.</description>
+ <param name="beltStatus" type="Common.VehicleDataResult" mandatory="false">
+ <description>The status of the seat belts</description>
</param>
- </function>
- <function name="UnsubscribeVin" messagetype="response">
- <param name="vin" type="String" maxlength="17" mandatory="true">
- <description>Vehicle identification number</description>
+ <param name="bodyInformation" type="Common.VehicleDataResult" mandatory="false">
+ <description>The body information including power modes</description>
</param>
- </function>
-
- <function name="SubscribeTirePressure" messagetype="request">
- <param name="appID" type="Integer" mandatory="true">
- <description>ID of application requested this RPC.</description>
+ <param name="deviceStatus" type="Common.VehicleDataResult" mandatory="false">
+ <description>The device status including signal and battery strength</description>
</param>
- </function>
- <function name="SubscribeTirePressure" messagetype="response">
- <param name="tirePressure" type="Common.VehicleDataResult" mandatory="true">
- <description>See TireStatus</description>
+ <param name="driverBraking" type="Common.VehicleDataResult" mandatory="false">
+ <description>The status of the brake pedal</description>
</param>
- </function>
- <function name="UnsubscribeTirePressure" messagetype="request">
- <param name="appID" type="Integer" mandatory="true">
- <description>ID of application requested this RPC.</description>
+ <param name="wiperStatus" type="Common.VehicleDataResult" mandatory="false">
+ <description>The status of the wipers</description>
</param>
- </function>
- <function name="UnsubscribeTirePressure" messagetype="response">
- <param name="tirePressure" type="Common.VehicleDataResult" mandatory="true">
- <description>See TireStatus</description>
+ <param name="headLampStatus" type="Common.VehicleDataResult" mandatory="false">
+ <description>Status of the head lamps</description>
</param>
- </function>
-
- <function name="SubscribeOdometer" messagetype="request">
- <param name="appID" type="Integer" mandatory="true">
- <description>ID of application requested this RPC.</description>
+ <param name="engineTorque" type="Common.VehicleDataResult" mandatory="false">
+ <description>Torque value for engine (in Nm) on non-diesel variants</description>
</param>
- </function>
- <function name="SubscribeOdometer" messagetype="response">
- <param name="odometer" type="Common.VehicleDataResult" mandatory="true">
- <description>Odometer in km</description>
+ <param name="accPedalPosition" type="Common.VehicleDataResult" mandatory="false">
+ <description>Accelerator pedal position (percentage depressed)</description>
</param>
- </function>
- <function name="UnsubscribeOdometer" messagetype="request">
- <param name="appID" type="Integer" mandatory="true">
- <description>ID of application requested this RPC.</description>
+ <param name="steeringWheelAngle" type="Common.VehicleDataResult" mandatory="false">
+ <description>Current angle of the steering wheel (in deg)</description>
</param>
- </function>
- <function name="UnsubscribeOdometer" messagetype="response">
- <param name="odometer" type="Common.VehicleDataResult" mandatory="true">
- <description>Odometer in km</description>
+ <param name="engineOilLife" type="Common.VehicleDataResult" mandatory="false">
+ <description>The estimated percentage of remaining oil life of the engine.</description>
</param>
- </function>
-
- <function name="SubscribeBeltStatus" messagetype="request">
- <param name="appID" type="Integer" mandatory="true">
- <description>ID of application requested this RPC.</description>
+ <!-- Ford Specific Data Items -->
+ <param name="eCallInfo" type="Common.VehicleDataResult" mandatory="false">
+ <description>Emergency Call notification and confirmation data</description>
</param>
- </function>
- <function name="SubscribeBeltStatus" messagetype="response">
- <param name="beltStatus" type="Common.VehicleDataResult" mandatory="true">
- <description>The status of the seat belts</description>
+ <param name="airbagStatus" type="Common.VehicleDataResult" mandatory="false">
+ <description>The status of the air bags</description>
</param>
- </function>
- <function name="UnsubscribeBeltStatus" messagetype="request">
- <param name="appID" type="Integer" mandatory="true">
- <description>ID of application requested this RPC.</description>
+ <param name="emergencyEvent" type="Common.VehicleDataResult" mandatory="false">
+ <description>Information related to an emergency event (and if it occurred)</description>
</param>
- </function>
- <function name="UnsubscribeBeltStatus" messagetype="response">
- <param name="beltStatus" type="Common.VehicleDataResult" mandatory="true">
- <description>The status of the seat belts</description>
+ <param name="clusterModes" type="Common.VehicleDataResult" mandatory="false">
+ <description>The status modes of the cluster</description>
</param>
- </function>
-
- <function name="SubscribeBodyInformation" messagetype="request">
- <param name="appID" type="Integer" mandatory="true">
- <description>ID of application requested this RPC.</description>
+ <param name="myKey" type="Common.VehicleDataResult" mandatory="false">
+ <description>Information related to the MyKey feature</description>
</param>
+ <!-- / Ford Specific Data Items -->
</function>
- <function name="SubscribeBodyInformation" messagetype="response">
- <param name="bodyInformation" type="Common.VehicleDataResult" mandatory="true">
- <description>The body information including power modes</description>
+ <function name="GetVehicleData" messagetype="request">
+ <description>Non periodic vehicle data read request.</description>
+ <param name="gps" type="Boolean" mandatory="false">
+ <description>See GPSData</description>
</param>
- </function>
- <function name="UnsubscribeBodyInformation" messagetype="request">
- <param name="appID" type="Integer" mandatory="true">
- <description>ID of application requested this RPC.</description>
+ <param name="speed" type="Boolean" mandatory="false">
+ <description>The vehicle speed in kilometers per hour</description>
</param>
- </function>
- <function name="UnsubscribeBodyInformation" messagetype="response">
- <param name="bodyInformation" type="Common.VehicleDataResult" mandatory="true">
- <description>The body information including power modes</description>
+ <param name="rpm" type="Boolean" mandatory="false">
+ <description>The number of revolutions per minute of the engine</description>
</param>
- </function>
-
- <function name="SubscribeDeviceStatus" messagetype="request">
- <param name="appID" type="Integer" mandatory="true">
- <description>ID of application requested this RPC.</description>
+ <param name="fuelLevel" type="Boolean" mandatory="false">
+ <description>The fuel level in the tank (percentage)</description>
</param>
- </function>
- <function name="SubscribeDeviceStatus" messagetype="response">
- <param name="deviceStatus" type="Common.VehicleDataResult" mandatory="true">
- <description>The device status including signal and battery strength</description>
+ <param name="fuelLevel_State" type="Boolean" mandatory="false">
+ <description>The fuel level state</description>
</param>
- </function>
- <function name="UnsubscribeDeviceStatus" messagetype="request">
- <param name="appID" type="Integer" mandatory="true">
- <description>ID of application requested this RPC.</description>
+ <param name="instantFuelConsumption" type="Boolean" mandatory="false">
+ <description>The instantaneous fuel consumption in microlitres</description>
</param>
- </function>
- <function name="UnsubscribeDeviceStatus" messagetype="response">
- <param name="deviceStatus" type="Common.VehicleDataResult" mandatory="true">
- <description>The device status including signal and battery strength</description>
+ <param name="externalTemperature" type="Boolean" mandatory="false">
+ <description>The external temperature in degrees celsius</description>
</param>
- </function>
-
- <function name="SubscribeDriverBraking" messagetype="request">
- <param name="appID" type="Integer" mandatory="true">
- <description>ID of application requested this RPC.</description>
+ <param name="vin" type="Boolean" mandatory="false">
+ <description>Vehicle identification number</description>
</param>
- </function>
- <function name="SubscribeDriverBraking" messagetype="response">
- <param name="driverBraking" type="Common.VehicleDataResult" mandatory="true">
- <description>The status of the brake pedal</description>
+ <param name="prndl" type="Boolean" mandatory="false">
+ <description>See PRNDL</description>
</param>
- </function>
- <function name="UnsubscribeDriverBraking" messagetype="request">
- <param name="appID" type="Integer" mandatory="true">
- <description>ID of application requested this RPC.</description>
+ <param name="tirePressure" type="Boolean" mandatory="false">
+ <description>See TireStatus</description>
</param>
- </function>
- <function name="UnsubscribeDriverBraking" messagetype="response">
- <param name="driverBraking" type="Common.VehicleDataResult" mandatory="true">
- <description>The status of the brake pedal</description>
+ <param name="odometer" type="Boolean" mandatory="false">
+ <description>Odometer in km</description>
</param>
- </function>
-
- <function name="SubscribeWiperStatus" messagetype="request">
- <param name="appID" type="Integer" mandatory="true">
- <description>ID of application requested this RPC.</description>
+ <param name="beltStatus" type="Boolean" mandatory="false">
+ <description>The status of the seat belts</description>
</param>
- </function>
- <function name="SubscribeWiperStatus" messagetype="response">
- <param name="wiperStatus" type="Common.VehicleDataResult" mandatory="true">
- <description>The status of the wipers</description>
+ <param name="bodyInformation" type="Boolean" mandatory="false">
+ <description>The body information including ignition status and internal temp</description>
</param>
- </function>
- <function name="UnsubscribeWiperStatus" messagetype="request">
- <param name="appID" type="Integer" mandatory="true">
- <description>ID of application requested this RPC.</description>
+ <param name="deviceStatus" type="Boolean" mandatory="false">
+ <description>The device status including signal and battery strength</description>
</param>
- </function>
- <function name="UnsubscribeWiperStatus" messagetype="response">
- <param name="wiperStatus" type="Common.VehicleDataResult" mandatory="true">
- <description>The status of the wipers</description>
+ <param name="driverBraking" type="Boolean" mandatory="false">
+ <description>The status of the brake pedal</description>
</param>
- </function>
-
- <function name="SubscribeHeadLampStatus" messagetype="request">
- <param name="appID" type="Integer" mandatory="true">
- <description>ID of application requested this RPC.</description>
+ <param name="wiperStatus" type="Boolean" mandatory="false">
+ <description>The status of the wipers</description>
</param>
- </function>
- <function name="SubscribeHeadLampStatus" messagetype="response">
- <param name="headLampStatus" type="Common.VehicleDataResult" mandatory="true">
+ <param name="headLampStatus" type="Boolean" mandatory="false">
<description>Status of the head lamps</description>
</param>
- </function>
- <function name="UnsubscribeHeadLampStatus" messagetype="request">
- <param name="appID" type="Integer" mandatory="true">
- <description>ID of application requested this RPC.</description>
+ <param name="engineTorque" type="Boolean" mandatory="false">
+ <description>Torque value for engine (in Nm) on non-diesel variants</description>
</param>
- </function>
- <function name="UnsubscribeHeadLampStatus" messagetype="response">
- <param name="headLampStatus" type="Common.VehicleDataResult" mandatory="true">
- <description>Status of the head lamps</description>
+ <param name="accPedalPosition" type="Boolean" mandatory="false">
+ <description>Accelerator pedal position (percentage depressed)</description>
</param>
- </function>
-
- <function name="SubscribeEngineTorque" messagetype="request">
- <param name="appID" type="Integer" mandatory="true">
- <description>ID of application requested this RPC.</description>
+ <param name="steeringWheelAngle" type="Boolean" mandatory="false">
+ <description>Current angle of the steering wheel (in deg)</description>
</param>
- </function>
- <function name="SubscribeEngineTorque" messagetype="response">
- <param name="engineTorque" type="Common.VehicleDataResult" mandatory="true">
- <description>Torque value for engine (in Nm) on non-diesel variants</description>
+ <param name="engineOilLife" type="Boolean" mandatory="false">
+ <description>The estimated percentage of remaining oil life of the engine.</description>
</param>
- </function>
- <function name="UnsubscribeEngineTorque" messagetype="request">
- <param name="appID" type="Integer" mandatory="true">
- <description>ID of application requested this RPC.</description>
+ <param name="eCallInfo" type="Boolean" mandatory="false">
+ <description>Emergency Call notification and confirmation data</description>
</param>
- </function>
- <function name="UnsubscribeEngineTorque" messagetype="response">
- <param name="engineTorque" type="Common.VehicleDataResult" mandatory="true">
- <description>Torque value for engine (in Nm) on non-diesel variants</description>
+ <param name="airbagStatus" type="Boolean" mandatory="false">
+ <description>The status of the air bags</description>
</param>
- </function>
-
- <function name="SubscribeAccPedalPosition" messagetype="request">
- <param name="appID" type="Integer" mandatory="true">
- <description>ID of application requested this RPC.</description>
+ <param name="emergencyEvent" type="Boolean" mandatory="false">
+ <description>Information related to an emergency event (and if it occurred)</description>
</param>
- </function>
- <function name="SubscribeAccPedalPosition" messagetype="response">
- <param name="accPedalPosition" type="Common.VehicleDataResult" mandatory="true">
- <description>Accelerator pedal position (percentage depressed)</description>
+ <param name="clusterModeStatus" type="Boolean" mandatory="false">
+ <description>The status modes of the cluster</description>
</param>
- </function>
- <function name="UnsubscribeAccPedalPosition" messagetype="request">
- <param name="appID" type="Integer" mandatory="true">
- <description>ID of application requested this RPC.</description>
+ <param name="myKey" type="Boolean" mandatory="false">
+ <description>Information related to the MyKey feature</description>
</param>
</function>
- <function name="UnsubscribeAccPedalPosition" messagetype="response">
- <param name="accPedalPosition" type="Common.VehicleDataResult" mandatory="true">
- <description>Accelerator pedal position (percentage depressed)</description>
+ <function name="GetVehicleData" messagetype="response">
+ <param name="gps" type="Common.GPSData" mandatory="false">
+ <description>See GPSData</description>
</param>
- </function>
-
- <function name="SubscribeSteeringWheelAngle" messagetype="request">
- <param name="appID" type="Integer" mandatory="true">
- <description>ID of application requested this RPC.</description>
+ <param name="speed" type="Float" minvalue="0" maxvalue="700" mandatory="false">
+ <description>The vehicle speed in kilometers per hour</description>
</param>
- </function>
- <function name="SubscribeSteeringWheelAngle" messagetype="response">
- <param name="steeringWheelAngle" type="Common.VehicleDataResult" mandatory="true">
- <description>Current angle of the steering wheel (in deg)</description>
+ <param name="rpm" type="Integer" minvalue="0" maxvalue="20000" mandatory="false">
+ <description>The number of revolutions per minute of the engine</description>
</param>
- </function>
- <function name="UnsubscribeSteeringWheelAngle" messagetype="request">
- <param name="appID" type="Integer" mandatory="true">
- <description>ID of application requested this RPC.</description>
+ <param name="fuelLevel" type="Float" minvalue="-6" maxvalue="106" mandatory="false">
+ <description>The fuel level in the tank (percentage)</description>
</param>
- </function>
- <function name="UnsubscribeSteeringWheelAngle" messagetype="response">
- <param name="steeringWheelAngle" type="Common.VehicleDataResult" mandatory="true">
+ <param name="fuelLevel_State" type="Common.ComponentVolumeStatus" mandatory="false">
+ <description>The fuel level state</description>
+ </param>
+ <param name="instantFuelConsumption" type="Float" minvalue="0" maxvalue="25575" mandatory="false">
+ <description>The instantaneous fuel consumption in microlitres</description>
+ </param>
+ <param name="externalTemperature" type="Float" minvalue="-40" maxvalue="100" mandatory="false">
+ <description>The external temperature in degrees celsius</description>
+ </param>
+ <param name="vin" type="String" maxlength="17" mandatory="false">
+ <description>Vehicle identification number</description>
+ </param>
+ <param name="prndl" type="Common.PRNDL" mandatory="false">
+ <description>See PRNDL</description>
+ </param>
+ <param name="tirePressure" type="Common.TireStatus" mandatory="false">
+ <description>See TireStatus</description>
+ </param>
+ <param name="odometer" type="Integer" minvalue="0" maxvalue="17000000" mandatory="false">
+ <description>Odometer in km</description>
+ </param>
+ <param name="beltStatus" type="Common.BeltStatus" mandatory="false">
+ <description>The status of the seat belts</description>
+ </param>
+ <param name="bodyInformation" type="Common.BodyInformation" mandatory="false">
+ <description>The body information including power modes</description>
+ </param>
+ <param name="deviceStatus" type="Common.DeviceStatus" mandatory="false">
+ <description>The device status including signal and battery strength</description>
+ </param>
+ <param name="driverBraking" type="Common.VehicleDataEventStatus" mandatory="false">
+ <description>The status of the brake pedal</description>
+ </param>
+ <param name="wiperStatus" type="Common.WiperStatus" mandatory="false">
+ <description>The status of the wipers</description>
+ </param>
+ <param name="headLampStatus" type="Common.HeadLampStatus" mandatory="false">
+ <description>Status of the head lamps</description>
+ </param>
+ <param name="engineTorque" type="Float" minvalue="-1000" maxvalue="2000" mandatory="false">
+ <description>Torque value for engine (in Nm) on non-diesel variants</description>
+ </param>
+ <param name="accPedalPosition" type="Float" minvalue="0" maxvalue="100" mandatory="false">
+ <description>Accelerator pedal position (percentage depressed)</description>
+ </param>
+ <param name="steeringWheelAngle" type="Float" minvalue="-2000" maxvalue="2000" mandatory="false">
<description>Current angle of the steering wheel (in deg)</description>
</param>
- </function>
-
- <function name="SubscribeECallInfo" messagetype="request">
- <param name="appID" type="Integer" mandatory="true">
- <description>ID of application requested this RPC.</description>
+ <param name="engineOilLife" type="Float" minvalue="0" maxvalue="100" mandatory="false">
+ <description>The estimated percentage of remaining oil life of the engine.</description>
</param>
- </function>
- <function name="SubscribeECallInfo" messagetype="response">
- <param name="eCallInfo" type="Common.VehicleDataResult" mandatory="true">
+ <param name="eCallInfo" type="Common.ECallInfo" mandatory="false">
<description>Emergency Call notification and confirmation data</description>
</param>
- </function>
- <function name="UnsubscribeECallInfo" messagetype="request">
- <param name="appID" type="Integer" mandatory="true">
- <description>ID of application requested this RPC.</description>
+ <param name="airbagStatus" type="Common.AirbagStatus" mandatory="false">
+ <description>The status of the air bags</description>
</param>
- </function>
- <function name="UnsubscribeECallInfo" messagetype="response">
- <param name="eCallInfo" type="Common.VehicleDataResult" mandatory="true">
- <description>Emergency Call notification and confirmation data</description>
+ <param name="emergencyEvent" type="Common.EmergencyEvent" mandatory="false">
+ <description>Information related to an emergency event (and if it occurred)</description>
</param>
- </function>
-
- <function name="SubscribeAirbagStatus" messagetype="request">
- <param name="appID" type="Integer" mandatory="true">
- <description>ID of application requested this RPC.</description>
+ <param name="clusterModeStatus" type="Common.ClusterModeStatus" mandatory="false">
+ <description>The status modes of the cluster</description>
</param>
- </function>
- <function name="SubscribeAirbagStatus" messagetype="response">
- <param name="airbagStatus" type="Common.VehicleDataResult" mandatory="true">
- <description>The status of the air bags</description>
+ <param name="myKey" type="Common.MyKey" mandatory="false">
+ <description>Information related to the MyKey feature</description>
</param>
</function>
- <function name="UnsubscribeAirbagStatus" messagetype="request">
- <param name="appID" type="Integer" mandatory="true">
- <description>ID of application requested this RPC.</description>
+ <function name="OnVehicleData" messagetype="notification">
+ <description>Callback for the periodic and non periodic vehicle data read function.</description>
+ <param name="gps" type="Common.GPSData" mandatory="false">
+ <description>See GPSData</description>
</param>
- </function>
- <function name="UnsubscribeAirbagStatus" messagetype="response">
- <param name="airbagStatus" type="Common.VehicleDataResult" mandatory="true">
- <description>The status of the air bags</description>
+ <param name="speed" type="Float" minvalue="0" maxvalue="700" mandatory="false">
+ <description>The vehicle speed in kilometers per hour</description>
</param>
- </function>
-
- <function name="SubscribeEmergencyEvent" messagetype="request">
- <param name="appID" type="Integer" mandatory="true">
- <description>ID of application requested this RPC.</description>
+ <param name="rpm" type="Integer" minvalue="0" maxvalue="20000" mandatory="false">
+ <description>The number of revolutions per minute of the engine</description>
</param>
- </function>
- <function name="SubscribeEmergencyEvent" messagetype="response">
- <param name="emergencyEvent" type="Common.VehicleDataResult" mandatory="true">
- <description>Information related to an emergency event (and if it occurred)</description>
+ <param name="fuelLevel" type="Float" minvalue="-6" maxvalue="106" mandatory="false">
+ <description>The fuel level in the tank (percentage)</description>
</param>
- </function>
- <function name="UnsubscribeEmergencyEvent" messagetype="request">
- <param name="appID" type="Integer" mandatory="true">
- <description>ID of application requested this RPC.</description>
+ <param name="fuelLevel_State" type="Common.ComponentVolumeStatus" mandatory="false">
+ <description>The fuel level state</description>
</param>
- </function>
- <function name="UnsubscribeEmergencyEvent" messagetype="response">
- <param name="emergencyEvent" type="Common.VehicleDataResult" mandatory="true">
- <description>Information related to an emergency event (and if it occurred)</description>
+ <param name="instantFuelConsumption" type="Float" minvalue="0" maxvalue="25575" mandatory="false">
+ <description>The instantaneous fuel consumption in microlitres</description>
</param>
- </function>
-
- <function name="SubscribeClusterModeStatus" messagetype="request">
- <param name="appID" type="Integer" mandatory="true">
- <description>ID of application requested this RPC.</description>
+ <param name="externalTemperature" type="Float" minvalue="-40" maxvalue="100" mandatory="false">
+ <description>The external temperature in degrees celsius</description>
</param>
- </function>
- <function name="SubscribeClusterModeStatus" messagetype="response">
- <param name="clusterModeStatus" type="Common.VehicleDataResult" mandatory="true">
- <description>The status modes of the cluster</description>
+ <param name="vin" type="String" maxlength="17" mandatory="false">
+ <description>Vehicle identification number.</description>
</param>
- </function>
- <function name="UnsubscribeClusterModeStatus" messagetype="request">
- <param name="appID" type="Integer" mandatory="true">
- <description>ID of application requested this RPC.</description>
+ <param name="prndl" type="Common.PRNDL" mandatory="false">
+ <description>See PRNDL</description>
</param>
- </function>
- <function name="UnsubscribeClusterModeStatus" messagetype="response">
- <param name="clusterModeStatus" type="Common.VehicleDataResult" mandatory="true">
- <description>The status modes of the cluster</description>
+ <param name="tirePressure" type="Common.TireStatus" mandatory="false">
+ <description>See TireStatus</description>
</param>
- </function>
-
- <function name="SubscribeMyKey" messagetype="request">
- <param name="appID" type="Integer" mandatory="true">
- <description>ID of application requested this RPC.</description>
+ <param name="odometer" type="Integer" minvalue="0" maxvalue="17000000" mandatory="false">
+ <description>Odometer in km</description>
</param>
- </function>
- <function name="SubscribeMyKey" messagetype="response">
- <param name="myKey" type="Common.VehicleDataResult" mandatory="true">
- <description>Information related to the MyKey feature</description>
+ <param name="beltStatus" type="Common.BeltStatus" mandatory="false">
+ <description>The status of the seat belts</description>
</param>
- </function>
- <function name="UnsubscribeMyKey" messagetype="request">
- <param name="appID" type="Integer" mandatory="true">
- <description>ID of application requested this RPC.</description>
+ <param name="bodyInformation" type="Common.BodyInformation" mandatory="false">
+ <description>The body information including power modes</description>
</param>
- </function>
- <function name="UnsubscribeMyKey" messagetype="response">
- <param name="myKey" type="Common.VehicleDataResult" mandatory="true">
+ <param name="deviceStatus" type="Common.DeviceStatus" mandatory="false">
+ <description>The device status including signal and battery strength</description>
+ </param>
+ <param name="driverBraking" type="Common.VehicleDataEventStatus" mandatory="false">
+ <description>The status of the brake pedal</description>
+ </param>
+ <param name="wiperStatus" type="Common.WiperStatus" mandatory="false">
+ <description>The status of the wipers</description>
+ </param>
+ <param name="headLampStatus" type="Common.HeadLampStatus" mandatory="false">
+ <description>Status of the head lamps</description>
+ </param>
+ <param name="engineTorque" type="Float" minvalue="-1000" maxvalue="2000" mandatory="false">
+ <description>Torque value for engine (in Nm) on non-diesel variants</description>
+ </param>
+ <param name="accPedalPosition" type="Float" minvalue="0" maxvalue="100" mandatory="false">
+ <description>Accelerator pedal position (percentage depressed)</description>
+ </param>
+ <param name="steeringWheelAngle" type="Float" minvalue="-2000" maxvalue="2000" mandatory="false">
+ <description>Current angle of the steering wheel (in deg)</description>
+ </param>
+ <param name="eCallInfo" type="Common.ECallInfo" mandatory="false">
+ <description>Emergency Call notification and confirmation data</description>
+ </param>
+ <param name="airbagStatus" type="Common.AirbagStatus" mandatory="false">
+ <description>The status of the air bags</description>
+ </param>
+ <param name="emergencyEvent" type="Common.EmergencyEvent" mandatory="false">
+ <description>Information related to an emergency event (and if it occurred)</description>
+ </param>
+ <param name="clusterModeStatus" type="Common.ClusterModeStatus" mandatory="false">
+ <description>The status modes of the cluster</description>
+ </param>
+ <param name="myKey" type="Common.MyKey" mandatory="false">
<description>Information related to the MyKey feature</description>
</param>
</function>
-<!--end Qt HMI version of SubscribeVehicleData/UnsubscribeVehicleData-->
</interface>
</interfaces>
diff --git a/tools/intergen/tool/intergen.cc b/tools/intergen/tool/intergen.cc
index bad87b178b..8fc8302dcc 100644
--- a/tools/intergen/tool/intergen.cc
+++ b/tools/intergen/tool/intergen.cc
@@ -54,7 +54,6 @@ struct Options {
char* interface_xml;
bool auto_generate_function_ids;
bool generate_json_code;
- bool generate_dbus_code;
std::set<std::string> requested_interfaces;
std::set<std::string> excluded_scopes;
bool avoid_unsigned;
@@ -63,7 +62,6 @@ struct Options {
: interface_xml(NULL),
auto_generate_function_ids(false),
generate_json_code(false),
- generate_dbus_code(false),
avoid_unsigned(false),
minimum_word_size(8) {
}
@@ -138,10 +136,6 @@ int main(int argc, char* argv[]) {
options.generate_json_code = true;
break;
}
- case 'd': {
- options.generate_dbus_code = true;
- break;
- }
default: {
cerr << "Invalid option: '" << opt << "'" << '\n';
return EXIT_FAILURE;
@@ -165,7 +159,6 @@ int main(int argc, char* argv[]) {
codegen::Preferences(options.minimum_word_size,
options.avoid_unsigned,
options.generate_json_code,
- options.generate_dbus_code,
options.requested_interfaces));
if (bad.empty()) {
return EXIT_SUCCESS;