summaryrefslogtreecommitdiff
path: root/src/components/application_manager/src
diff options
context:
space:
mode:
Diffstat (limited to 'src/components/application_manager/src')
-rw-r--r--src/components/application_manager/src/application_data_impl.cc155
-rw-r--r--src/components/application_manager/src/application_impl.cc75
-rw-r--r--src/components/application_manager/src/application_manager_impl.cc234
-rw-r--r--src/components/application_manager/src/commands/command_impl.cc18
-rw-r--r--src/components/application_manager/src/commands/command_notification_from_mobile_impl.cc12
-rw-r--r--src/components/application_manager/src/commands/command_notification_impl.cc6
-rw-r--r--src/components/application_manager/src/commands/command_request_impl.cc95
-rw-r--r--src/components/application_manager/src/commands/command_response_impl.cc10
-rw-r--r--src/components/application_manager/src/commands/hmi/activate_app_request.cc48
-rw-r--r--src/components/application_manager/src/commands/hmi/activate_app_response.cc10
-rw-r--r--src/components/application_manager/src/commands/hmi/add_statistics_info_notification.cc9
-rw-r--r--src/components/application_manager/src/commands/hmi/allow_all_apps_request.cc10
-rw-r--r--src/components/application_manager/src/commands/hmi/allow_all_apps_response.cc10
-rw-r--r--src/components/application_manager/src/commands/hmi/allow_app_request.cc10
-rw-r--r--src/components/application_manager/src/commands/hmi/allow_app_response.cc17
-rw-r--r--src/components/application_manager/src/commands/hmi/basic_communication_system_request.cc9
-rw-r--r--src/components/application_manager/src/commands/hmi/basic_communication_system_response.cc10
-rw-r--r--src/components/application_manager/src/commands/hmi/button_get_capabilities_request.cc7
-rw-r--r--src/components/application_manager/src/commands/hmi/button_get_capabilities_response.cc9
-rw-r--r--src/components/application_manager/src/commands/hmi/close_popup_request.cc10
-rw-r--r--src/components/application_manager/src/commands/hmi/close_popup_response.cc9
-rw-r--r--src/components/application_manager/src/commands/hmi/dial_number_request.cc12
-rw-r--r--src/components/application_manager/src/commands/hmi/dial_number_response.cc15
-rw-r--r--src/components/application_manager/src/commands/hmi/get_system_info_request.cc10
-rw-r--r--src/components/application_manager/src/commands/hmi/get_system_info_response.cc7
-rw-r--r--src/components/application_manager/src/commands/hmi/get_urls.cc21
-rw-r--r--src/components/application_manager/src/commands/hmi/get_urls_response.cc10
-rw-r--r--src/components/application_manager/src/commands/hmi/mixing_audio_supported_request.cc8
-rw-r--r--src/components/application_manager/src/commands/hmi/mixing_audio_supported_response.cc16
-rw-r--r--src/components/application_manager/src/commands/hmi/navi_alert_maneuver_request.cc8
-rw-r--r--src/components/application_manager/src/commands/hmi/navi_alert_maneuver_response.cc7
-rw-r--r--src/components/application_manager/src/commands/hmi/navi_audio_start_stream_request.cc67
-rw-r--r--src/components/application_manager/src/commands/hmi/navi_audio_start_stream_response.cc10
-rw-r--r--src/components/application_manager/src/commands/hmi/navi_audio_stop_stream_request.cc6
-rw-r--r--src/components/application_manager/src/commands/hmi/navi_audio_stop_stream_response.cc10
-rw-r--r--src/components/application_manager/src/commands/hmi/navi_get_way_points_response.cc5
-rw-r--r--src/components/application_manager/src/commands/hmi/navi_is_ready_request.cc10
-rw-r--r--src/components/application_manager/src/commands/hmi/navi_is_ready_response.cc13
-rw-r--r--src/components/application_manager/src/commands/hmi/navi_send_location_request.cc10
-rw-r--r--src/components/application_manager/src/commands/hmi/navi_send_location_response.cc10
-rw-r--r--src/components/application_manager/src/commands/hmi/navi_show_constant_tbt_request.cc8
-rw-r--r--src/components/application_manager/src/commands/hmi/navi_show_constant_tbt_response.cc7
-rw-r--r--src/components/application_manager/src/commands/hmi/navi_start_stream_request.cc65
-rw-r--r--src/components/application_manager/src/commands/hmi/navi_start_stream_response.cc10
-rw-r--r--src/components/application_manager/src/commands/hmi/navi_stop_stream_request.cc6
-rw-r--r--src/components/application_manager/src/commands/hmi/navi_stop_stream_response.cc10
-rw-r--r--src/components/application_manager/src/commands/hmi/navi_subscribe_way_points_response.cc2
-rw-r--r--src/components/application_manager/src/commands/hmi/navi_unsubscribe_way_points_response.cc2
-rw-r--r--src/components/application_manager/src/commands/hmi/navi_update_turn_list_request.cc8
-rw-r--r--src/components/application_manager/src/commands/hmi/navi_update_turn_list_response.cc7
-rw-r--r--src/components/application_manager/src/commands/hmi/notification_from_hmi.cc11
-rw-r--r--src/components/application_manager/src/commands/hmi/notification_to_hmi.cc6
-rw-r--r--src/components/application_manager/src/commands/hmi/on_allow_sdl_functionality_notification.cc6
-rw-r--r--src/components/application_manager/src/commands/hmi/on_app_activated_notification.cc10
-rw-r--r--src/components/application_manager/src/commands/hmi/on_app_deactivated_notification.cc9
-rw-r--r--src/components/application_manager/src/commands/hmi/on_app_permission_changed_notification.cc6
-rw-r--r--src/components/application_manager/src/commands/hmi/on_app_permission_consent_notification.cc16
-rw-r--r--src/components/application_manager/src/commands/hmi/on_app_registered_notification.cc12
-rw-r--r--src/components/application_manager/src/commands/hmi/on_app_unregistered_notification.cc13
-rw-r--r--src/components/application_manager/src/commands/hmi/on_audio_data_streaming_notification.cc7
-rw-r--r--src/components/application_manager/src/commands/hmi/on_button_event_notification.cc5
-rw-r--r--src/components/application_manager/src/commands/hmi/on_button_press_notification.cc5
-rw-r--r--src/components/application_manager/src/commands/hmi/on_button_subscription_notification.cc8
-rw-r--r--src/components/application_manager/src/commands/hmi/on_device_chosen_notification.cc8
-rw-r--r--src/components/application_manager/src/commands/hmi/on_device_state_changed_notification.cc5
-rw-r--r--src/components/application_manager/src/commands/hmi/on_driver_distraction_notification.cc13
-rw-r--r--src/components/application_manager/src/commands/hmi/on_event_changed_notification.cc11
-rw-r--r--src/components/application_manager/src/commands/hmi/on_exit_all_applications_notification.cc18
-rw-r--r--src/components/application_manager/src/commands/hmi/on_exit_application_notification.cc23
-rw-r--r--src/components/application_manager/src/commands/hmi/on_file_removed_notification.cc9
-rw-r--r--src/components/application_manager/src/commands/hmi/on_find_applications.cc10
-rw-r--r--src/components/application_manager/src/commands/hmi/on_ignition_cycle_over_notification.cc7
-rw-r--r--src/components/application_manager/src/commands/hmi/on_navi_tbt_client_state_notification.cc7
-rw-r--r--src/components/application_manager/src/commands/hmi/on_navi_way_point_change_notification.cc6
-rw-r--r--src/components/application_manager/src/commands/hmi/on_policy_update.cc9
-rw-r--r--src/components/application_manager/src/commands/hmi/on_put_file_notification.cc7
-rw-r--r--src/components/application_manager/src/commands/hmi/on_ready_notification.cc11
-rw-r--r--src/components/application_manager/src/commands/hmi/on_received_policy_update.cc12
-rw-r--r--src/components/application_manager/src/commands/hmi/on_record_start_notification.cc9
-rw-r--r--src/components/application_manager/src/commands/hmi/on_resume_audio_source_notification.cc7
-rw-r--r--src/components/application_manager/src/commands/hmi/on_sdl_close_notification.cc8
-rw-r--r--src/components/application_manager/src/commands/hmi/on_sdl_consent_needed_notification.cc7
-rw-r--r--src/components/application_manager/src/commands/hmi/on_sdl_persistence_complete_notification.cc6
-rw-r--r--src/components/application_manager/src/commands/hmi/on_start_device_discovery.cc11
-rw-r--r--src/components/application_manager/src/commands/hmi/on_status_update_notification.cc7
-rw-r--r--src/components/application_manager/src/commands/hmi/on_system_context_notification.cc18
-rw-r--r--src/components/application_manager/src/commands/hmi/on_system_error_notification.cc11
-rw-r--r--src/components/application_manager/src/commands/hmi/on_system_info_changed_notification.cc10
-rw-r--r--src/components/application_manager/src/commands/hmi/on_system_request_notification.cc27
-rw-r--r--src/components/application_manager/src/commands/hmi/on_tts_language_change_notification.cc24
-rw-r--r--src/components/application_manager/src/commands/hmi/on_tts_reset_timeout_notification.cc8
-rw-r--r--src/components/application_manager/src/commands/hmi/on_tts_started_notification.cc8
-rw-r--r--src/components/application_manager/src/commands/hmi/on_tts_stopped_notification.cc7
-rw-r--r--src/components/application_manager/src/commands/hmi/on_ui_command_notification.cc7
-rw-r--r--src/components/application_manager/src/commands/hmi/on_ui_keyboard_input_notification.cc12
-rw-r--r--src/components/application_manager/src/commands/hmi/on_ui_language_change_notification.cc24
-rw-r--r--src/components/application_manager/src/commands/hmi/on_ui_reset_timeout_notification.cc8
-rw-r--r--src/components/application_manager/src/commands/hmi/on_ui_touch_event_notification.cc12
-rw-r--r--src/components/application_manager/src/commands/hmi/on_update_device_list.cc11
-rw-r--r--src/components/application_manager/src/commands/hmi/on_vi_acc_pedal_position_notification.cc7
-rw-r--r--src/components/application_manager/src/commands/hmi/on_vi_belt_status_notification.cc7
-rw-r--r--src/components/application_manager/src/commands/hmi/on_vi_body_information_notification.cc7
-rw-r--r--src/components/application_manager/src/commands/hmi/on_vi_device_status_notification.cc7
-rw-r--r--src/components/application_manager/src/commands/hmi/on_vi_driver_braking_notification.cc7
-rw-r--r--src/components/application_manager/src/commands/hmi/on_vi_engine_torque_notification.cc7
-rw-r--r--src/components/application_manager/src/commands/hmi/on_vi_external_temperature_notification.cc7
-rw-r--r--src/components/application_manager/src/commands/hmi/on_vi_fuel_level_notification.cc7
-rw-r--r--src/components/application_manager/src/commands/hmi/on_vi_fuel_level_state_notification.cc7
-rw-r--r--src/components/application_manager/src/commands/hmi/on_vi_gps_data_notification.cc7
-rw-r--r--src/components/application_manager/src/commands/hmi/on_vi_head_lamp_status_notification.cc7
-rw-r--r--src/components/application_manager/src/commands/hmi/on_vi_instant_fuel_consumption_notification.cc8
-rw-r--r--src/components/application_manager/src/commands/hmi/on_vi_my_key_notification.cc7
-rw-r--r--src/components/application_manager/src/commands/hmi/on_vi_odometer_notification.cc7
-rw-r--r--src/components/application_manager/src/commands/hmi/on_vi_prndl_notification.cc7
-rw-r--r--src/components/application_manager/src/commands/hmi/on_vi_rpm_notification.cc7
-rw-r--r--src/components/application_manager/src/commands/hmi/on_vi_speed_notification.cc7
-rw-r--r--src/components/application_manager/src/commands/hmi/on_vi_steering_wheel_angle_notification.cc7
-rw-r--r--src/components/application_manager/src/commands/hmi/on_vi_tire_pressure_notification.cc7
-rw-r--r--src/components/application_manager/src/commands/hmi/on_vi_vehicle_data_notification.cc7
-rw-r--r--src/components/application_manager/src/commands/hmi/on_vi_vin_notification.cc7
-rw-r--r--src/components/application_manager/src/commands/hmi/on_vi_wiper_status_notification.cc7
-rw-r--r--src/components/application_manager/src/commands/hmi/on_video_data_streaming_notification.cc6
-rw-r--r--src/components/application_manager/src/commands/hmi/on_vr_command_notification.cc15
-rw-r--r--src/components/application_manager/src/commands/hmi/on_vr_language_change_notification.cc29
-rw-r--r--src/components/application_manager/src/commands/hmi/on_vr_started_notification.cc8
-rw-r--r--src/components/application_manager/src/commands/hmi/on_vr_stopped_notification.cc8
-rw-r--r--src/components/application_manager/src/commands/hmi/request_from_hmi.cc47
-rw-r--r--src/components/application_manager/src/commands/hmi/request_to_hmi.cc8
-rw-r--r--src/components/application_manager/src/commands/hmi/response_from_hmi.cc13
-rw-r--r--src/components/application_manager/src/commands/hmi/response_to_hmi.cc4
-rw-r--r--src/components/application_manager/src/commands/hmi/sdl_activate_app_request.cc39
-rw-r--r--src/components/application_manager/src/commands/hmi/sdl_activate_app_response.cc10
-rw-r--r--src/components/application_manager/src/commands/hmi/sdl_get_list_of_permissions_request.cc12
-rw-r--r--src/components/application_manager/src/commands/hmi/sdl_get_list_of_permissions_response.cc10
-rw-r--r--src/components/application_manager/src/commands/hmi/sdl_get_status_update_request.cc13
-rw-r--r--src/components/application_manager/src/commands/hmi/sdl_get_status_update_response.cc11
-rw-r--r--src/components/application_manager/src/commands/hmi/sdl_get_user_friendly_message_request.cc26
-rw-r--r--src/components/application_manager/src/commands/hmi/sdl_get_user_friendly_message_response.cc10
-rw-r--r--src/components/application_manager/src/commands/hmi/sdl_policy_update.cc9
-rw-r--r--src/components/application_manager/src/commands/hmi/sdl_policy_update_response.cc7
-rw-r--r--src/components/application_manager/src/commands/hmi/tts_change_registration_request.cc7
-rw-r--r--src/components/application_manager/src/commands/hmi/tts_change_registration_response.cc6
-rw-r--r--src/components/application_manager/src/commands/hmi/tts_get_capabilities_request.cc7
-rw-r--r--src/components/application_manager/src/commands/hmi/tts_get_capabilities_response.cc20
-rw-r--r--src/components/application_manager/src/commands/hmi/tts_get_language_request.cc10
-rw-r--r--src/components/application_manager/src/commands/hmi/tts_get_language_response.cc22
-rw-r--r--src/components/application_manager/src/commands/hmi/tts_get_supported_languages_request.cc7
-rw-r--r--src/components/application_manager/src/commands/hmi/tts_get_supported_languages_response.cc9
-rw-r--r--src/components/application_manager/src/commands/hmi/tts_is_ready_request.cc10
-rw-r--r--src/components/application_manager/src/commands/hmi/tts_is_ready_response.cc13
-rw-r--r--src/components/application_manager/src/commands/hmi/tts_set_global_properties_request.cc7
-rw-r--r--src/components/application_manager/src/commands/hmi/tts_set_global_properties_response.cc6
-rw-r--r--src/components/application_manager/src/commands/hmi/tts_speak_request.cc10
-rw-r--r--src/components/application_manager/src/commands/hmi/tts_speak_response.cc9
-rw-r--r--src/components/application_manager/src/commands/hmi/tts_stop_speaking_request.cc10
-rw-r--r--src/components/application_manager/src/commands/hmi/tts_stop_speaking_response.cc6
-rw-r--r--src/components/application_manager/src/commands/hmi/ui_add_command_request.cc10
-rw-r--r--src/components/application_manager/src/commands/hmi/ui_add_command_response.cc9
-rw-r--r--src/components/application_manager/src/commands/hmi/ui_add_submenu_request.cc10
-rw-r--r--src/components/application_manager/src/commands/hmi/ui_add_submenu_response.cc9
-rw-r--r--src/components/application_manager/src/commands/hmi/ui_alert_request.cc10
-rw-r--r--src/components/application_manager/src/commands/hmi/ui_alert_response.cc9
-rw-r--r--src/components/application_manager/src/commands/hmi/ui_change_registration_request.cc7
-rw-r--r--src/components/application_manager/src/commands/hmi/ui_change_registration_response.cc6
-rw-r--r--src/components/application_manager/src/commands/hmi/ui_delete_command_request.cc10
-rw-r--r--src/components/application_manager/src/commands/hmi/ui_delete_command_response.cc6
-rw-r--r--src/components/application_manager/src/commands/hmi/ui_delete_submenu_request.cc10
-rw-r--r--src/components/application_manager/src/commands/hmi/ui_delete_submenu_response.cc6
-rw-r--r--src/components/application_manager/src/commands/hmi/ui_end_audio_pass_thru_request.cc7
-rw-r--r--src/components/application_manager/src/commands/hmi/ui_end_audio_pass_thru_response.cc6
-rw-r--r--src/components/application_manager/src/commands/hmi/ui_get_capabilities_request.cc7
-rw-r--r--src/components/application_manager/src/commands/hmi/ui_get_capabilities_response.cc11
-rw-r--r--src/components/application_manager/src/commands/hmi/ui_get_language_request.cc10
-rw-r--r--src/components/application_manager/src/commands/hmi/ui_get_language_response.cc22
-rw-r--r--src/components/application_manager/src/commands/hmi/ui_get_supported_languages_request.cc7
-rw-r--r--src/components/application_manager/src/commands/hmi/ui_get_supported_languages_response.cc9
-rw-r--r--src/components/application_manager/src/commands/hmi/ui_is_ready_request.cc10
-rw-r--r--src/components/application_manager/src/commands/hmi/ui_is_ready_response.cc13
-rw-r--r--src/components/application_manager/src/commands/hmi/ui_perform_audio_pass_thru_request.cc7
-rw-r--r--src/components/application_manager/src/commands/hmi/ui_perform_audio_pass_thru_response.cc6
-rw-r--r--src/components/application_manager/src/commands/hmi/ui_perform_interaction_request.cc7
-rw-r--r--src/components/application_manager/src/commands/hmi/ui_perform_interaction_response.cc6
-rw-r--r--src/components/application_manager/src/commands/hmi/ui_scrollable_message_request.cc7
-rw-r--r--src/components/application_manager/src/commands/hmi/ui_scrollable_message_response.cc6
-rw-r--r--src/components/application_manager/src/commands/hmi/ui_set_app_icon_request.cc10
-rw-r--r--src/components/application_manager/src/commands/hmi/ui_set_app_icon_response.cc9
-rw-r--r--src/components/application_manager/src/commands/hmi/ui_set_display_layout_request.cc8
-rw-r--r--src/components/application_manager/src/commands/hmi/ui_set_display_layout_response.cc7
-rw-r--r--src/components/application_manager/src/commands/hmi/ui_set_global_properties_request.cc7
-rw-r--r--src/components/application_manager/src/commands/hmi/ui_set_global_properties_response.cc6
-rw-r--r--src/components/application_manager/src/commands/hmi/ui_set_media_clock_timer_request.cc7
-rw-r--r--src/components/application_manager/src/commands/hmi/ui_set_media_clock_timer_response.cc6
-rw-r--r--src/components/application_manager/src/commands/hmi/ui_show_request.cc10
-rw-r--r--src/components/application_manager/src/commands/hmi/ui_show_response.cc9
-rw-r--r--src/components/application_manager/src/commands/hmi/ui_slider_request.cc10
-rw-r--r--src/components/application_manager/src/commands/hmi/ui_slider_response.cc9
-rw-r--r--src/components/application_manager/src/commands/hmi/update_app_list_request.cc11
-rw-r--r--src/components/application_manager/src/commands/hmi/update_app_list_response.cc11
-rw-r--r--src/components/application_manager/src/commands/hmi/update_device_list_request.cc12
-rw-r--r--src/components/application_manager/src/commands/hmi/update_device_list_response.cc6
-rw-r--r--src/components/application_manager/src/commands/hmi/update_sdl_request.cc10
-rw-r--r--src/components/application_manager/src/commands/hmi/update_sdl_response.cc10
-rw-r--r--src/components/application_manager/src/commands/hmi/vi_diagnostic_message_request.cc10
-rw-r--r--src/components/application_manager/src/commands/hmi/vi_diagnostic_message_response.cc12
-rw-r--r--src/components/application_manager/src/commands/hmi/vi_get_dtcs_request.cc10
-rw-r--r--src/components/application_manager/src/commands/hmi/vi_get_dtcs_response.cc9
-rw-r--r--src/components/application_manager/src/commands/hmi/vi_get_vehicle_data_request.cc7
-rw-r--r--src/components/application_manager/src/commands/hmi/vi_get_vehicle_data_response.cc10
-rw-r--r--src/components/application_manager/src/commands/hmi/vi_get_vehicle_type_request.cc7
-rw-r--r--src/components/application_manager/src/commands/hmi/vi_get_vehicle_type_response.cc10
-rw-r--r--src/components/application_manager/src/commands/hmi/vi_is_ready_request.cc10
-rw-r--r--src/components/application_manager/src/commands/hmi/vi_is_ready_response.cc12
-rw-r--r--src/components/application_manager/src/commands/hmi/vi_read_did_request.cc10
-rw-r--r--src/components/application_manager/src/commands/hmi/vi_read_did_response.cc11
-rw-r--r--src/components/application_manager/src/commands/hmi/vi_subscribe_vehicle_data_request.cc7
-rw-r--r--src/components/application_manager/src/commands/hmi/vi_subscribe_vehicle_data_response.cc9
-rw-r--r--src/components/application_manager/src/commands/hmi/vi_unsubscribe_vehicle_data_request.cc7
-rw-r--r--src/components/application_manager/src/commands/hmi/vi_unsubscribe_vehicle_data_response.cc9
-rw-r--r--src/components/application_manager/src/commands/hmi/vr_add_command_request.cc10
-rw-r--r--src/components/application_manager/src/commands/hmi/vr_add_command_response.cc9
-rw-r--r--src/components/application_manager/src/commands/hmi/vr_change_registration_request.cc7
-rw-r--r--src/components/application_manager/src/commands/hmi/vr_change_registration_response.cc6
-rw-r--r--src/components/application_manager/src/commands/hmi/vr_delete_command_request.cc10
-rw-r--r--src/components/application_manager/src/commands/hmi/vr_delete_command_response.cc6
-rw-r--r--src/components/application_manager/src/commands/hmi/vr_get_capabilities_request.cc9
-rw-r--r--src/components/application_manager/src/commands/hmi/vr_get_capabilities_response.cc14
-rw-r--r--src/components/application_manager/src/commands/hmi/vr_get_language_request.cc10
-rw-r--r--src/components/application_manager/src/commands/hmi/vr_get_language_response.cc22
-rw-r--r--src/components/application_manager/src/commands/hmi/vr_get_supported_languages_request.cc7
-rw-r--r--src/components/application_manager/src/commands/hmi/vr_get_supported_languages_response.cc9
-rw-r--r--src/components/application_manager/src/commands/hmi/vr_is_ready_request.cc10
-rw-r--r--src/components/application_manager/src/commands/hmi/vr_is_ready_response.cc13
-rw-r--r--src/components/application_manager/src/commands/hmi/vr_perform_interaction_request.cc7
-rw-r--r--src/components/application_manager/src/commands/hmi/vr_perform_interaction_response.cc6
-rw-r--r--src/components/application_manager/src/commands/mobile/add_command_request.cc232
-rw-r--r--src/components/application_manager/src/commands/mobile/add_command_response.cc10
-rw-r--r--src/components/application_manager/src/commands/mobile/add_sub_menu_request.cc39
-rw-r--r--src/components/application_manager/src/commands/mobile/add_sub_menu_response.cc9
-rw-r--r--src/components/application_manager/src/commands/mobile/alert_maneuver_request.cc88
-rw-r--r--src/components/application_manager/src/commands/mobile/alert_maneuver_response.cc9
-rw-r--r--src/components/application_manager/src/commands/mobile/alert_request.cc162
-rw-r--r--src/components/application_manager/src/commands/mobile/alert_response.cc9
-rw-r--r--src/components/application_manager/src/commands/mobile/change_registration_request.cc115
-rw-r--r--src/components/application_manager/src/commands/mobile/change_registration_response.cc7
-rw-r--r--src/components/application_manager/src/commands/mobile/create_interaction_choice_set_request.cc157
-rw-r--r--src/components/application_manager/src/commands/mobile/create_interaction_choice_set_response.cc6
-rw-r--r--src/components/application_manager/src/commands/mobile/delete_command_request.cc76
-rw-r--r--src/components/application_manager/src/commands/mobile/delete_command_response.cc10
-rw-r--r--src/components/application_manager/src/commands/mobile/delete_file_request.cc37
-rw-r--r--src/components/application_manager/src/commands/mobile/delete_file_response.cc16
-rw-r--r--src/components/application_manager/src/commands/mobile/delete_interaction_choice_set_request.cc50
-rw-r--r--src/components/application_manager/src/commands/mobile/delete_interaction_choice_set_response.cc6
-rw-r--r--src/components/application_manager/src/commands/mobile/delete_sub_menu_request.cc49
-rw-r--r--src/components/application_manager/src/commands/mobile/delete_sub_menu_response.cc10
-rw-r--r--src/components/application_manager/src/commands/mobile/diagnostic_message_request.cc24
-rw-r--r--src/components/application_manager/src/commands/mobile/diagnostic_message_response.cc10
-rw-r--r--src/components/application_manager/src/commands/mobile/dial_number_request.cc25
-rw-r--r--src/components/application_manager/src/commands/mobile/dial_number_response.cc10
-rw-r--r--src/components/application_manager/src/commands/mobile/end_audio_pass_thru_request.cc15
-rw-r--r--src/components/application_manager/src/commands/mobile/end_audio_pass_thru_response.cc7
-rw-r--r--src/components/application_manager/src/commands/mobile/generic_response.cc2
-rw-r--r--src/components/application_manager/src/commands/mobile/get_dtcs_request.cc13
-rw-r--r--src/components/application_manager/src/commands/mobile/get_dtcs_response.cc10
-rw-r--r--src/components/application_manager/src/commands/mobile/get_vehicle_data_request.cc112
-rw-r--r--src/components/application_manager/src/commands/mobile/get_vehicle_data_response.cc9
-rw-r--r--src/components/application_manager/src/commands/mobile/get_way_points_request.cc36
-rw-r--r--src/components/application_manager/src/commands/mobile/get_way_points_response.cc8
-rw-r--r--src/components/application_manager/src/commands/mobile/list_files_request.cc35
-rw-r--r--src/components/application_manager/src/commands/mobile/list_files_response.cc9
-rw-r--r--src/components/application_manager/src/commands/mobile/on_app_interface_unregistered_notification.cc7
-rw-r--r--src/components/application_manager/src/commands/mobile/on_audio_pass_thru_notification.cc6
-rw-r--r--src/components/application_manager/src/commands/mobile/on_button_event_notification.cc41
-rw-r--r--src/components/application_manager/src/commands/mobile/on_button_press_notification.cc41
-rw-r--r--src/components/application_manager/src/commands/mobile/on_command_notification.cc16
-rw-r--r--src/components/application_manager/src/commands/mobile/on_driver_distraction_notification.cc6
-rw-r--r--src/components/application_manager/src/commands/mobile/on_hash_change_notification.cc12
-rw-r--r--src/components/application_manager/src/commands/mobile/on_hmi_status_notification.cc21
-rw-r--r--src/components/application_manager/src/commands/mobile/on_hmi_status_notification_from_mobile.cc17
-rw-r--r--src/components/application_manager/src/commands/mobile/on_language_change_notification.cc6
-rw-r--r--src/components/application_manager/src/commands/mobile/on_permissions_change_notification.cc6
-rw-r--r--src/components/application_manager/src/commands/mobile/on_system_request_notification.cc28
-rw-r--r--src/components/application_manager/src/commands/mobile/on_tbt_client_state_notification.cc6
-rw-r--r--src/components/application_manager/src/commands/mobile/on_touch_event_notification.cc6
-rw-r--r--src/components/application_manager/src/commands/mobile/on_vehicle_data_notification.cc44
-rw-r--r--src/components/application_manager/src/commands/mobile/on_way_point_change_notification.cc3
-rw-r--r--src/components/application_manager/src/commands/mobile/perform_audio_pass_thru_request.cc128
-rw-r--r--src/components/application_manager/src/commands/mobile/perform_audio_pass_thru_response.cc10
-rw-r--r--src/components/application_manager/src/commands/mobile/perform_interaction_request.cc218
-rw-r--r--src/components/application_manager/src/commands/mobile/perform_interaction_response.cc7
-rw-r--r--src/components/application_manager/src/commands/mobile/put_file_request.cc120
-rw-r--r--src/components/application_manager/src/commands/mobile/put_file_response.cc15
-rw-r--r--src/components/application_manager/src/commands/mobile/read_did_request.cc31
-rw-r--r--src/components/application_manager/src/commands/mobile/read_did_response.cc10
-rw-r--r--src/components/application_manager/src/commands/mobile/register_app_interface_request.cc40
-rw-r--r--src/components/application_manager/src/commands/mobile/register_app_interface_response.cc14
-rw-r--r--src/components/application_manager/src/commands/mobile/reset_global_properties_request.cc164
-rw-r--r--src/components/application_manager/src/commands/mobile/reset_global_properties_response.cc7
-rw-r--r--src/components/application_manager/src/commands/mobile/scrollable_message_request.cc42
-rw-r--r--src/components/application_manager/src/commands/mobile/scrollable_message_response.cc15
-rw-r--r--src/components/application_manager/src/commands/mobile/send_location_request.cc72
-rw-r--r--src/components/application_manager/src/commands/mobile/send_location_response.cc9
-rw-r--r--src/components/application_manager/src/commands/mobile/set_app_icon_request.cc39
-rw-r--r--src/components/application_manager/src/commands/mobile/set_app_icon_response.cc10
-rw-r--r--src/components/application_manager/src/commands/mobile/set_display_layout_request.cc27
-rw-r--r--src/components/application_manager/src/commands/mobile/set_display_layout_response.cc8
-rw-r--r--src/components/application_manager/src/commands/mobile/set_global_properties_request.cc219
-rw-r--r--src/components/application_manager/src/commands/mobile/set_global_properties_response.cc8
-rw-r--r--src/components/application_manager/src/commands/mobile/set_icon_request.cc34
-rw-r--r--src/components/application_manager/src/commands/mobile/set_icon_response.cc6
-rw-r--r--src/components/application_manager/src/commands/mobile/set_media_clock_timer_request.cc25
-rw-r--r--src/components/application_manager/src/commands/mobile/set_media_clock_timer_response.cc9
-rw-r--r--src/components/application_manager/src/commands/mobile/show_constant_tbt_request.cc86
-rw-r--r--src/components/application_manager/src/commands/mobile/show_constant_tbt_response.cc6
-rw-r--r--src/components/application_manager/src/commands/mobile/show_request.cc100
-rw-r--r--src/components/application_manager/src/commands/mobile/show_response.cc9
-rw-r--r--src/components/application_manager/src/commands/mobile/slider_request.cc54
-rw-r--r--src/components/application_manager/src/commands/mobile/slider_response.cc10
-rw-r--r--src/components/application_manager/src/commands/mobile/speak_request.cc45
-rw-r--r--src/components/application_manager/src/commands/mobile/speak_response.cc9
-rw-r--r--src/components/application_manager/src/commands/mobile/subscribe_button_request.cc31
-rw-r--r--src/components/application_manager/src/commands/mobile/subscribe_button_response.cc6
-rw-r--r--src/components/application_manager/src/commands/mobile/subscribe_vehicle_data_request.cc247
-rw-r--r--src/components/application_manager/src/commands/mobile/subscribe_vehicle_data_response.cc6
-rw-r--r--src/components/application_manager/src/commands/mobile/subscribe_way_points_request.cc23
-rw-r--r--src/components/application_manager/src/commands/mobile/subscribe_way_points_response.cc8
-rw-r--r--src/components/application_manager/src/commands/mobile/system_request.cc33
-rw-r--r--src/components/application_manager/src/commands/mobile/system_response.cc10
-rw-r--r--src/components/application_manager/src/commands/mobile/unregister_app_interface_request.cc10
-rw-r--r--src/components/application_manager/src/commands/mobile/unsubscribe_button_request.cc15
-rw-r--r--src/components/application_manager/src/commands/mobile/unsubscribe_button_response.cc7
-rw-r--r--src/components/application_manager/src/commands/mobile/unsubscribe_vehicle_data_request.cc226
-rw-r--r--src/components/application_manager/src/commands/mobile/unsubscribe_vehicle_data_response.cc6
-rw-r--r--src/components/application_manager/src/commands/mobile/unsubscribe_way_points_request.cc21
-rw-r--r--src/components/application_manager/src/commands/mobile/unsubscribe_way_points_response.cc2
-rw-r--r--src/components/application_manager/src/commands/mobile/update_turn_list_request.cc16
-rw-r--r--src/components/application_manager/src/commands/mobile/update_turn_list_response.cc9
-rw-r--r--src/components/application_manager/src/event_engine/event_dispatcher_impl.cc10
-rw-r--r--src/components/application_manager/src/event_engine/event_observer.cc7
-rw-r--r--src/components/application_manager/src/hmi_capabilities.cc117
-rw-r--r--src/components/application_manager/src/hmi_command_factory.cc1669
-rw-r--r--src/components/application_manager/src/hmi_language_handler.cc55
-rw-r--r--src/components/application_manager/src/hmi_state.cc8
-rw-r--r--src/components/application_manager/src/message_helper/message_helper.cc242
-rw-r--r--src/components/application_manager/src/mobile_command_factory.cc461
-rw-r--r--src/components/application_manager/src/policies/delegates/app_permission_delegate.cc21
-rw-r--r--src/components/application_manager/src/policies/policy_event_observer.cc27
-rw-r--r--src/components/application_manager/src/policies/policy_handler.cc214
-rw-r--r--src/components/application_manager/src/policies/pt_exchange_handler_ext.cc22
-rw-r--r--src/components/application_manager/src/request_controller.cc252
-rw-r--r--src/components/application_manager/src/resumption/resume_ctrl.cc137
-rw-r--r--src/components/application_manager/src/resumption/resumption_data.cc45
-rw-r--r--src/components/application_manager/src/resumption/resumption_data_db.cc79
-rw-r--r--src/components/application_manager/src/resumption/resumption_data_json.cc40
-rw-r--r--src/components/application_manager/src/state_controller_impl.cc94
354 files changed, 5059 insertions, 5381 deletions
diff --git a/src/components/application_manager/src/application_data_impl.cc b/src/components/application_manager/src/application_data_impl.cc
index d9aab44b31..a81540708c 100644
--- a/src/components/application_manager/src/application_data_impl.cc
+++ b/src/components/application_manager/src/application_data_impl.cc
@@ -40,13 +40,12 @@ namespace application_manager {
CREATE_LOGGERPTR_GLOBAL(logger_, "ApplicationManager")
InitialApplicationDataImpl::InitialApplicationDataImpl()
- : app_types_(NULL),
- vr_synonyms_(NULL),
- tts_name_(NULL),
- ngn_media_screen_name_(NULL),
- language_(mobile_api::Language::INVALID_ENUM),
- ui_language_(mobile_api::Language::INVALID_ENUM) {
-}
+ : app_types_(NULL)
+ , vr_synonyms_(NULL)
+ , tts_name_(NULL)
+ , ngn_media_screen_name_(NULL)
+ , language_(mobile_api::Language::INVALID_ENUM)
+ , ui_language_(mobile_api::Language::INVALID_ENUM) {}
InitialApplicationDataImpl::~InitialApplicationDataImpl() {
if (app_types_) {
@@ -70,13 +69,13 @@ InitialApplicationDataImpl::~InitialApplicationDataImpl() {
}
}
-const smart_objects::SmartObject*
-InitialApplicationDataImpl::app_types() const {
+const smart_objects::SmartObject* InitialApplicationDataImpl::app_types()
+ const {
return app_types_;
}
-const smart_objects::SmartObject*
-InitialApplicationDataImpl::vr_synonyms() const {
+const smart_objects::SmartObject* InitialApplicationDataImpl::vr_synonyms()
+ const {
return vr_synonyms_;
}
@@ -93,13 +92,13 @@ InitialApplicationDataImpl::ngn_media_screen_name() const {
return ngn_media_screen_name_;
}
-const mobile_api::Language::eType&
-InitialApplicationDataImpl::language() const {
+const mobile_api::Language::eType& InitialApplicationDataImpl::language()
+ const {
return language_;
}
-const mobile_api::Language::eType&
-InitialApplicationDataImpl::ui_language() const {
+const mobile_api::Language::eType& InitialApplicationDataImpl::ui_language()
+ const {
return ui_language_;
}
@@ -153,35 +152,36 @@ void InitialApplicationDataImpl::set_ui_language(
ui_language_ = ui_language;
}
-void InitialApplicationDataImpl::set_perform_interaction_layout(mobile_apis::LayoutMode::eType layout) {
+void InitialApplicationDataImpl::set_perform_interaction_layout(
+ mobile_apis::LayoutMode::eType layout) {
perform_interaction_layout_ = layout;
}
-mobile_apis::LayoutMode::eType InitialApplicationDataImpl::perform_interaction_layout() const {
+mobile_apis::LayoutMode::eType
+InitialApplicationDataImpl::perform_interaction_layout() const {
return perform_interaction_layout_;
}
DynamicApplicationDataImpl::DynamicApplicationDataImpl()
- : help_prompt_(NULL),
- timeout_prompt_(NULL),
- vr_help_title_(NULL),
- vr_help_(NULL),
- tbt_state_(mobile_api::TBTState::INVALID_ENUM),
- show_command_(NULL),
- keyboard_props_(NULL),
- menu_title_(NULL),
- menu_icon_(NULL),
- tbt_show_command_(NULL),
- commands_(),
- commands_lock_(true),
- sub_menu_(),
- choice_set_map_(),
- performinteraction_choice_set_map_(),
- performinteraction_choice_set_lock_(true),
- is_perform_interaction_active_(false),
- is_reset_global_properties_active_(false),
- perform_interaction_mode_(-1) {
-}
+ : help_prompt_(NULL)
+ , timeout_prompt_(NULL)
+ , vr_help_title_(NULL)
+ , vr_help_(NULL)
+ , tbt_state_(mobile_api::TBTState::INVALID_ENUM)
+ , show_command_(NULL)
+ , keyboard_props_(NULL)
+ , menu_title_(NULL)
+ , menu_icon_(NULL)
+ , tbt_show_command_(NULL)
+ , commands_()
+ , commands_lock_(true)
+ , sub_menu_()
+ , choice_set_map_()
+ , performinteraction_choice_set_map_()
+ , performinteraction_choice_set_lock_(true)
+ , is_perform_interaction_active_(false)
+ , is_reset_global_properties_active_(false)
+ , perform_interaction_mode_(-1) {}
DynamicApplicationDataImpl::~DynamicApplicationDataImpl() {
if (help_prompt_) {
@@ -215,82 +215,88 @@ DynamicApplicationDataImpl::~DynamicApplicationDataImpl() {
}
for (CommandsMap::iterator command_it = commands_.begin();
- commands_.end() != command_it; ++command_it) {
+ commands_.end() != command_it;
+ ++command_it) {
delete command_it->second;
}
commands_.clear();
for (SubMenuMap::iterator sub_menu_it = sub_menu_.begin();
- sub_menu_.end() != sub_menu_it; ++sub_menu_it) {
+ sub_menu_.end() != sub_menu_it;
+ ++sub_menu_it) {
delete sub_menu_it->second;
}
sub_menu_.clear();
PerformChoiceSetMap::iterator it = performinteraction_choice_set_map_.begin();
for (; performinteraction_choice_set_map_.end() != it; ++it) {
- PerformChoice::iterator choice_it = performinteraction_choice_set_map_[it->first].begin();
- for (; performinteraction_choice_set_map_[it->first].end() != choice_it; ++choice_it) {
- delete choice_it->second;
+ PerformChoice::iterator choice_it =
+ performinteraction_choice_set_map_[it->first].begin();
+ for (; performinteraction_choice_set_map_[it->first].end() != choice_it;
+ ++choice_it) {
+ delete choice_it->second;
}
performinteraction_choice_set_map_[it->first].clear();
}
performinteraction_choice_set_map_.clear();
}
-const smart_objects::SmartObject*
-DynamicApplicationDataImpl::help_prompt() const {
+const smart_objects::SmartObject* DynamicApplicationDataImpl::help_prompt()
+ const {
return help_prompt_;
}
-const smart_objects::SmartObject*
-DynamicApplicationDataImpl::timeout_prompt() const {
+const smart_objects::SmartObject* DynamicApplicationDataImpl::timeout_prompt()
+ const {
return timeout_prompt_;
}
-const smart_objects::SmartObject*
-DynamicApplicationDataImpl::vr_help_title() const {
+const smart_objects::SmartObject* DynamicApplicationDataImpl::vr_help_title()
+ const {
return vr_help_title_;
}
-const smart_objects::SmartObject*
-DynamicApplicationDataImpl::vr_help() const {
+const smart_objects::SmartObject* DynamicApplicationDataImpl::vr_help() const {
return vr_help_;
}
-const mobile_api::TBTState::eType&
-DynamicApplicationDataImpl::tbt_state() const {
+const mobile_api::TBTState::eType& DynamicApplicationDataImpl::tbt_state()
+ const {
return tbt_state_;
}
-const smart_objects::SmartObject*
-DynamicApplicationDataImpl::show_command() const {
+const smart_objects::SmartObject* DynamicApplicationDataImpl::show_command()
+ const {
return show_command_;
}
-const smart_objects::SmartObject*
-DynamicApplicationDataImpl::tbt_show_command() const {
+const smart_objects::SmartObject* DynamicApplicationDataImpl::tbt_show_command()
+ const {
return tbt_show_command_;
}
-const smart_objects::SmartObject* DynamicApplicationDataImpl::keyboard_props() const {
+const smart_objects::SmartObject* DynamicApplicationDataImpl::keyboard_props()
+ const {
return keyboard_props_;
}
-const smart_objects::SmartObject* DynamicApplicationDataImpl::menu_title() const {
+const smart_objects::SmartObject* DynamicApplicationDataImpl::menu_title()
+ const {
return menu_title_;
}
-const smart_objects::SmartObject* DynamicApplicationDataImpl::menu_icon() const {
+const smart_objects::SmartObject* DynamicApplicationDataImpl::menu_icon()
+ const {
return menu_icon_;
}
void DynamicApplicationDataImpl::load_global_properties(
const smart_objects::SmartObject& properties_so) {
SetGlobalProperties(properties_so.getElement(strings::vr_help_title),
- &DynamicApplicationData::set_vr_help_title);
+ &DynamicApplicationData::set_vr_help_title);
SetGlobalProperties(properties_so.getElement(strings::vr_help),
- &DynamicApplicationData::set_vr_help);
+ &DynamicApplicationData::set_vr_help);
SetGlobalProperties(properties_so.getElement(strings::timeout_prompt),
&DynamicApplicationData::set_timeout_prompt);
@@ -396,16 +402,15 @@ void DynamicApplicationDataImpl::set_menu_icon(
if (menu_icon_) {
delete menu_icon_;
}
- menu_icon_= new smart_objects::SmartObject(menu_icon);
+ menu_icon_ = new smart_objects::SmartObject(menu_icon);
}
void DynamicApplicationDataImpl::SetGlobalProperties(
const smart_objects::SmartObject& param,
void (DynamicApplicationData::*callback)(
- const NsSmartDeviceLink::NsSmartObjects::SmartObject&)) {
-
+ const NsSmartDeviceLink::NsSmartObjects::SmartObject&)) {
smart_objects::SmartType so_type = param.getType();
- if (so_type != smart_objects::SmartType::SmartType_Invalid &&
+ if (so_type != smart_objects::SmartType::SmartType_Invalid &&
so_type != smart_objects::SmartType::SmartType_Null) {
if (callback) {
(this->*callback)(param);
@@ -416,7 +421,7 @@ void DynamicApplicationDataImpl::SetGlobalProperties(
}
void DynamicApplicationDataImpl::AddCommand(
- uint32_t cmd_id, const smart_objects::SmartObject& command) {
+ uint32_t cmd_id, const smart_objects::SmartObject& command) {
sync_primitives::AutoLock lock(commands_lock_);
CommandsMap::const_iterator it = commands_.find(cmd_id);
if (commands_.end() == it) {
@@ -446,7 +451,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) {
+ uint32_t menu_id, const smart_objects::SmartObject& menu) {
sync_primitives::AutoLock lock(sub_menu_lock_);
SubMenuMap::const_iterator it = sub_menu_.find(menu_id);
if (sub_menu_.end() == it) {
@@ -478,8 +483,7 @@ smart_objects::SmartObject* DynamicApplicationDataImpl::FindSubMenu(
bool DynamicApplicationDataImpl::IsSubMenuNameAlreadyExist(
const std::string& name) {
sync_primitives::AutoLock lock(sub_menu_lock_);
- for (SubMenuMap::iterator it = sub_menu_.begin();
- sub_menu_.end() != it;
+ for (SubMenuMap::iterator it = sub_menu_.begin(); sub_menu_.end() != it;
++it) {
smart_objects::SmartObject* menu = it->second;
if ((*menu)[strings::menu_name] == name) {
@@ -490,7 +494,7 @@ bool DynamicApplicationDataImpl::IsSubMenuNameAlreadyExist(
}
void DynamicApplicationDataImpl::AddChoiceSet(
- uint32_t choice_set_id, const smart_objects::SmartObject& choice_set) {
+ uint32_t choice_set_id, const smart_objects::SmartObject& choice_set) {
sync_primitives::AutoLock lock(choice_set_map_lock_);
ChoiceSetMap::const_iterator it = choice_set_map_.find(choice_set_id);
if (choice_set_map_.end() == it) {
@@ -520,15 +524,16 @@ smart_objects::SmartObject* DynamicApplicationDataImpl::FindChoiceSet(
}
void DynamicApplicationDataImpl::AddPerformInteractionChoiceSet(
- uint32_t correlation_id, uint32_t choice_set_id,
- const smart_objects::SmartObject& vr_commands) {
+ uint32_t correlation_id,
+ uint32_t choice_set_id,
+ const smart_objects::SmartObject& vr_commands) {
sync_primitives::AutoLock lock(performinteraction_choice_set_lock_);
- performinteraction_choice_set_map_[correlation_id].insert(
- std::make_pair(choice_set_id, new smart_objects::SmartObject(vr_commands)));
+ 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) {
+ uint32_t correlation_id) {
sync_primitives::AutoLock lock(performinteraction_choice_set_lock_);
PerformChoice::iterator it =
performinteraction_choice_set_map_[correlation_id].begin();
diff --git a/src/components/application_manager/src/application_impl.cc b/src/components/application_manager/src/application_impl.cc
index 4fb8a0e5a5..159a13cf9f 100644
--- a/src/components/application_manager/src/application_impl.cc
+++ b/src/components/application_manager/src/application_impl.cc
@@ -119,7 +119,6 @@ ApplicationImpl::ApplicationImpl(
new ::timer::TimerTaskImpl<ApplicationImpl>(
this, &ApplicationImpl::OnAudioStreamSuspend))
, application_manager_(application_manager) {
-
cmd_number_to_time_limits_[mobile_apis::FunctionID::ReadDIDID] = {
date_time::DateTime::getCurrentTime(), 0};
cmd_number_to_time_limits_[mobile_apis::FunctionID::GetVehicleDataID] = {
@@ -134,15 +133,16 @@ ApplicationImpl::ApplicationImpl(
// load persistent files
LoadPersistentFiles();
HmiStatePtr initial_state = application_manager_.CreateRegularState(
- app_id(),
- mobile_apis::HMILevel::INVALID_ENUM,
- mobile_apis::AudioStreamingState::INVALID_ENUM,
- mobile_api::SystemContext::SYSCTXT_MAIN);
+ app_id(),
+ mobile_apis::HMILevel::INVALID_ENUM,
+ mobile_apis::AudioStreamingState::INVALID_ENUM,
+ mobile_api::SystemContext::SYSCTXT_MAIN);
state_.InitState(initial_state);
- video_stream_suspend_timeout_ = application_manager_.get_settings().video_data_stopped_timeout();
+ video_stream_suspend_timeout_ =
+ application_manager_.get_settings().video_data_stopped_timeout();
audio_stream_suspend_timeout_ =
- application_manager_.get_settings().audio_data_stopped_timeout();
+ application_manager_.get_settings().audio_data_stopped_timeout();
}
ApplicationImpl::~ApplicationImpl() {
@@ -268,8 +268,7 @@ const custom_str::CustomString& ApplicationImpl::name() const {
return app_name_;
}
-void ApplicationImpl::set_folder_name(
- const std::string& folder_name) {
+void ApplicationImpl::set_folder_name(const std::string& folder_name) {
folder_name_ = folder_name;
}
@@ -433,8 +432,7 @@ void ApplicationImpl::StopStreaming(
SuspendStreaming(service_type);
- if (service_type == ServiceType::kMobileNav &&
- video_streaming_approved()) {
+ if (service_type == ServiceType::kMobileNav && video_streaming_approved()) {
StopNaviStreaming();
} else if (service_type == ServiceType::kAudio &&
audio_streaming_approved()) {
@@ -451,7 +449,7 @@ void ApplicationImpl::StopNaviStreaming() {
}
void ApplicationImpl::StopAudioStreaming() {
- LOG4CXX_AUTO_TRACE(logger_);
+ LOG4CXX_AUTO_TRACE(logger_);
audio_stream_suspend_timer_.Stop();
MessageHelper::SendAudioStopStream(app_id(), application_manager_);
set_audio_streaming_approved(false);
@@ -465,14 +463,12 @@ void ApplicationImpl::SuspendStreaming(
if (ServiceType::kMobileNav == service_type) {
video_stream_suspend_timer_.Stop();
- application_manager_.OnAppStreaming(
- app_id(), service_type, false);
+ application_manager_.OnAppStreaming(app_id(), service_type, false);
sync_primitives::AutoLock lock(video_streaming_suspended_lock_);
video_streaming_suspended_ = true;
} else if (ServiceType::kAudio == service_type) {
audio_stream_suspend_timer_.Stop();
- application_manager_.OnAppStreaming(
- app_id(), service_type, false);
+ application_manager_.OnAppStreaming(app_id(), service_type, false);
sync_primitives::AutoLock lock(audio_streaming_suspended_lock_);
audio_streaming_suspended_ = true;
}
@@ -487,18 +483,18 @@ void ApplicationImpl::WakeUpStreaming(
if (ServiceType::kMobileNav == service_type) {
sync_primitives::AutoLock lock(video_streaming_suspended_lock_);
if (video_streaming_suspended_) {
- application_manager_.OnAppStreaming(
- app_id(), service_type, true);
- MessageHelper::SendOnDataStreaming(ServiceType::kMobileNav, true, application_manager_);
+ application_manager_.OnAppStreaming(app_id(), service_type, true);
+ MessageHelper::SendOnDataStreaming(
+ ServiceType::kMobileNav, true, application_manager_);
video_streaming_suspended_ = false;
}
video_stream_suspend_timer_.Start(video_stream_suspend_timeout_, false);
} else if (ServiceType::kAudio == service_type) {
sync_primitives::AutoLock lock(audio_streaming_suspended_lock_);
if (audio_streaming_suspended_) {
- application_manager_.OnAppStreaming(
- app_id(), service_type, true);
- MessageHelper::SendOnDataStreaming(ServiceType::kAudio, true, application_manager_);
+ application_manager_.OnAppStreaming(app_id(), service_type, true);
+ MessageHelper::SendOnDataStreaming(
+ ServiceType::kAudio, true, application_manager_);
audio_streaming_suspended_ = false;
}
audio_stream_suspend_timer_.Start(audio_stream_suspend_timeout_, false);
@@ -713,11 +709,11 @@ bool ApplicationImpl::IsCommandLimitsExceeded(
if (mobile_apis::FunctionID::ReadDIDID == cmd_id) {
frequency_restrictions =
- application_manager_.get_settings().read_did_frequency();
+ application_manager_.get_settings().read_did_frequency();
} else if (mobile_apis::FunctionID::GetVehicleDataID == cmd_id) {
frequency_restrictions =
- application_manager_.get_settings().get_vehicle_data_frequency();
+ application_manager_.get_settings().get_vehicle_data_frequency();
} else {
LOG4CXX_INFO(logger_, "No restrictions for request");
return false;
@@ -725,18 +721,12 @@ bool ApplicationImpl::IsCommandLimitsExceeded(
LOG4CXX_INFO(logger_,
"Time Info: "
- << "\n Current: "
- << current.tv_sec
- << "\n Limit: ("
- << limit.first.tv_sec
- << ","
- << limit.second
+ << "\n Current: " << current.tv_sec << "\n Limit: ("
+ << limit.first.tv_sec << "," << limit.second
<< ")"
"\n frequency_restrictions: ("
- << frequency_restrictions.first
- << ","
- << frequency_restrictions.second
- << ")");
+ << frequency_restrictions.first << ","
+ << frequency_restrictions.second << ")");
if (current.tv_sec < limit.first.tv_sec + frequency_restrictions.second) {
if (limit.second < frequency_restrictions.first) {
++limit.second;
@@ -822,7 +812,8 @@ void ApplicationImpl::set_is_application_data_changed(
void ApplicationImpl::UpdateHash() {
LOG4CXX_AUTO_TRACE(logger_);
- hash_val_ = utils::gen_hash( application_manager_.get_settings().hash_string_size());
+ hash_val_ =
+ utils::gen_hash(application_manager_.get_settings().hash_string_size());
set_is_application_data_changed(true);
MessageHelper::SendHashUpdateNotification(app_id(), application_manager_);
@@ -830,7 +821,7 @@ void ApplicationImpl::UpdateHash() {
void ApplicationImpl::CleanupFiles() {
std::string directory_name =
- application_manager_.get_settings().app_storage_folder();
+ application_manager_.get_settings().app_storage_folder();
directory_name += "/" + folder_name();
if (file_system::DirectoryExists(directory_name)) {
@@ -860,7 +851,7 @@ void ApplicationImpl::LoadPersistentFiles() {
if (kWaitingForRegistration == app_state_) {
const std::string app_icon_dir(
- application_manager_.get_settings().app_icons_folder());
+ application_manager_.get_settings().app_icons_folder());
const std::string full_icon_path(app_icon_dir + "/" + mobile_app_id_);
if (file_system::FileExists(full_icon_path)) {
AppFile file;
@@ -898,18 +889,18 @@ void ApplicationImpl::LoadPersistentFiles() {
}
LOG4CXX_INFO(logger_,
- "Loaded persistent file " << file.file_name
- << " File type is "
- << file.file_type);
+ "Loaded persistent file "
+ << file.file_name << " File type is " << file.file_type);
AddFile(file);
}
}
}
uint32_t ApplicationImpl::GetAvailableDiskSpace() {
- const uint32_t app_quota = application_manager_.get_settings().app_dir_quota();
+ const uint32_t app_quota =
+ application_manager_.get_settings().app_dir_quota();
std::string app_storage_path =
- application_manager_.get_settings().app_storage_folder();
+ application_manager_.get_settings().app_storage_folder();
app_storage_path += "/";
app_storage_path += folder_name();
diff --git a/src/components/application_manager/src/application_manager_impl.cc b/src/components/application_manager/src/application_manager_impl.cc
index c021203304..49d7eece3c 100644
--- a/src/components/application_manager/src/application_manager_impl.cc
+++ b/src/components/application_manager/src/application_manager_impl.cc
@@ -128,8 +128,7 @@ ApplicationManagerImpl::ApplicationManagerImpl(
, application_list_update_timer_(
"AM ListUpdater",
new TimerTaskImpl<ApplicationManagerImpl>(
- this,
- &ApplicationManagerImpl::OnApplicationListUpdateTimer))
+ this, &ApplicationManagerImpl::OnApplicationListUpdateTimer))
, tts_global_properties_timer_(
"AM TTSGLPRTimer",
new TimerTaskImpl<ApplicationManagerImpl>(
@@ -145,10 +144,9 @@ ApplicationManagerImpl::ApplicationManagerImpl(
sync_primitives::AutoLock lock(timer_pool_lock_);
TimerSPtr clearing_timer(utils::MakeShared<timer::Timer>(
- "ClearTimerPoolTimer",
- new TimerTaskImpl<ApplicationManagerImpl>(
- this,
- &ApplicationManagerImpl::ClearTimerPool)));
+ "ClearTimerPoolTimer",
+ new TimerTaskImpl<ApplicationManagerImpl>(
+ this, &ApplicationManagerImpl::ClearTimerPool)));
const uint32_t timeout_ms = 10000u;
clearing_timer->Start(timeout_ms, false);
timer_pool_.push_back(clearing_timer);
@@ -184,15 +182,15 @@ ApplicationManagerImpl::~ApplicationManagerImpl() {
template <class UnaryPredicate>
ApplicationSharedPtr FindApp(DataAccessor<ApplicationSet> accessor,
UnaryPredicate finder) {
- ApplicationSet::iterator it = std::find_if(
- accessor.GetData().begin(), accessor.GetData().end(), finder);
- if (accessor.GetData().end() == it) {
- LOG4CXX_DEBUG(logger_, "Unable to find application");
- return ApplicationSharedPtr();
- }
- ApplicationSharedPtr app = *it;
- LOG4CXX_DEBUG(logger_," Found Application app_id = " << app->app_id());
- return app;
+ ApplicationSet::iterator it = std::find_if(
+ accessor.GetData().begin(), accessor.GetData().end(), finder);
+ if (accessor.GetData().end() == it) {
+ LOG4CXX_DEBUG(logger_, "Unable to find application");
+ return ApplicationSharedPtr();
+ }
+ ApplicationSharedPtr app = *it;
+ LOG4CXX_DEBUG(logger_, " Found Application app_id = " << app->app_id());
+ return app;
}
template <class UnaryPredicate>
@@ -220,7 +218,6 @@ ApplicationSharedPtr ApplicationManagerImpl::application(
return FindApp(accessor, finder);
}
-
ApplicationSharedPtr ApplicationManagerImpl::application_by_hmi_app(
uint32_t hmi_app_id) const {
HmiAppIdPredicate finder(hmi_app_id);
@@ -428,8 +425,7 @@ ApplicationSharedPtr ApplicationManagerImpl::RegisterApplication(
LOG4CXX_DEBUG(logger_, "Restarting application list update timer");
GetPolicyHandler().OnAppsSearchStarted();
- uint32_t timeout =
- get_settings().application_list_update_timeout();
+ uint32_t timeout = get_settings().application_list_update_timeout();
application_list_update_timer_.Start(timeout, false);
if (!is_all_apps_allowed_) {
@@ -555,8 +551,7 @@ ApplicationSharedPtr ApplicationManagerImpl::RegisterApplication(
applications_.insert(application);
applications_list_lock_.Release();
- GetPolicyHandler().AddApplication(
- application->policy_app_id());
+ GetPolicyHandler().AddApplication(application->policy_app_id());
return application;
}
@@ -638,15 +633,18 @@ void ApplicationManagerImpl::OnHMIStartedCooperation() {
MessageHelper::SendGetSystemInfoRequest(*this);
utils::SharedPtr<smart_objects::SmartObject> is_vr_ready(
- MessageHelper::CreateModuleInfoSO(hmi_apis::FunctionID::VR_IsReady, *this));
+ MessageHelper::CreateModuleInfoSO(hmi_apis::FunctionID::VR_IsReady,
+ *this));
ManageHMICommand(is_vr_ready);
utils::SharedPtr<smart_objects::SmartObject> is_tts_ready(
- MessageHelper::CreateModuleInfoSO(hmi_apis::FunctionID::TTS_IsReady, *this));
+ MessageHelper::CreateModuleInfoSO(hmi_apis::FunctionID::TTS_IsReady,
+ *this));
ManageHMICommand(is_tts_ready);
utils::SharedPtr<smart_objects::SmartObject> is_ui_ready(
- MessageHelper::CreateModuleInfoSO(hmi_apis::FunctionID::UI_IsReady, *this));
+ MessageHelper::CreateModuleInfoSO(hmi_apis::FunctionID::UI_IsReady,
+ *this));
ManageHMICommand(is_ui_ready);
utils::SharedPtr<smart_objects::SmartObject> is_navi_ready(
@@ -666,7 +664,8 @@ void ApplicationManagerImpl::OnHMIStartedCooperation() {
utils::SharedPtr<smart_objects::SmartObject> mixing_audio_supported_request(
MessageHelper::CreateModuleInfoSO(
- hmi_apis::FunctionID::BasicCommunication_MixingAudioSupported, *this));
+ hmi_apis::FunctionID::BasicCommunication_MixingAudioSupported,
+ *this));
ManageHMICommand(mixing_audio_supported_request);
resume_controller().ResetLaunchTime();
}
@@ -741,9 +740,7 @@ void ApplicationManagerImpl::StartAudioPassThruThread(int32_t session_key,
LOG4CXX_INFO(logger_, "START MICROPHONE RECORDER");
DCHECK_OR_RETURN_VOID(media_manager_);
media_manager_->StartMicrophoneRecording(
- session_key,
- get_settings().recording_file_name(),
- max_duration);
+ session_key, get_settings().recording_file_name(), max_duration);
}
void ApplicationManagerImpl::SendAudioPassThroughNotification(
@@ -893,7 +890,7 @@ void ApplicationManagerImpl::OnDeviceListUpdated(
device_info.AdoptDeviceType(dev_params.device_connection_type);
GetPolicyHandler().AddDevice(dev_params.device_mac_address,
- device_info.connection_type);
+ device_info.connection_type);
}
smart_objects::SmartObjectSPtr msg_params =
@@ -919,8 +916,7 @@ void ApplicationManagerImpl::OnDeviceListUpdated(
void ApplicationManagerImpl::OnFindNewApplicationsRequest() {
connection_handler().ConnectToAllDevices();
LOG4CXX_DEBUG(logger_, "Starting application list update timer");
- uint32_t timeout =
- get_settings().application_list_update_timeout();
+ uint32_t timeout = get_settings().application_list_update_timeout();
application_list_update_timer_.Start(timeout, false);
GetPolicyHandler().OnAppsSearchStarted();
}
@@ -960,8 +956,7 @@ mobile_apis::HMILevel::eType ApplicationManagerImpl::GetDefaultHmiLevel(
if (policy_handler_.PolicyEnabled()) {
const std::string policy_app_id = application->policy_app_id();
std::string default_hmi_string = "";
- if (policy_handler_.GetDefaultHmi(policy_app_id,
- &default_hmi_string)) {
+ if (policy_handler_.GetDefaultHmi(policy_app_id, &default_hmi_string)) {
if ("BACKGROUND" == default_hmi_string) {
default_hmi = HMILevel::HMI_BACKGROUND;
} else if ("FULL" == default_hmi_string) {
@@ -1005,13 +1000,12 @@ void ApplicationManagerImpl::ReplaceMobileByHMIAppId(
smart_objects::SmartObject& message) {
MessageHelper::PrintSmartObject(message);
if (message.keyExists(strings::app_id)) {
- ApplicationSharedPtr application_ptr = application(
- message[strings::app_id].asUInt());
+ ApplicationSharedPtr application_ptr =
+ application(message[strings::app_id].asUInt());
if (application_ptr.valid()) {
LOG4CXX_DEBUG(logger_,
"ReplaceMobileByHMIAppId from "
- << message[strings::app_id].asInt()
- << " to "
+ << message[strings::app_id].asInt() << " to "
<< application_ptr->hmi_app_id());
message[strings::app_id] = application_ptr->hmi_app_id();
}
@@ -1042,14 +1036,13 @@ void ApplicationManagerImpl::ReplaceMobileByHMIAppId(
void ApplicationManagerImpl::ReplaceHMIByMobileAppId(
smart_objects::SmartObject& message) {
if (message.keyExists(strings::app_id)) {
- ApplicationSharedPtr application = application_by_hmi_app(
- message[strings::app_id].asUInt());
+ ApplicationSharedPtr application =
+ application_by_hmi_app(message[strings::app_id].asUInt());
if (application.valid()) {
LOG4CXX_DEBUG(logger_,
"ReplaceHMIByMobileAppId from "
- << message[strings::app_id].asInt()
- << " to "
+ << message[strings::app_id].asInt() << " to "
<< application->app_id());
message[strings::app_id] = application->app_id();
}
@@ -1201,8 +1194,10 @@ void ApplicationManagerImpl::OnServiceEndedCallback(
is_resuming = true;
is_unexpected_disconnect = false;
- ManageMobileCommand(MessageHelper::GetOnAppInterfaceUnregisteredNotificationToMobile(
- session_key, AppInterfaceUnregisteredReason::TOO_MANY_REQUESTS), commands::Command::ORIGIN_SDL);
+ ManageMobileCommand(
+ MessageHelper::GetOnAppInterfaceUnregisteredNotificationToMobile(
+ session_key, AppInterfaceUnregisteredReason::TOO_MANY_REQUESTS),
+ commands::Command::ORIGIN_SDL);
break;
}
case CloseSessionReason::kMalformed: {
@@ -1289,7 +1284,8 @@ ApplicationManagerImpl::connection_handler() const {
return *connection_handler_;
}
-protocol_handler::ProtocolHandler& ApplicationManagerImpl::protocol_handler() const {
+protocol_handler::ProtocolHandler& ApplicationManagerImpl::protocol_handler()
+ const {
return *protocol_handler_;
}
@@ -1540,9 +1536,11 @@ bool ApplicationManagerImpl::ManageMobileCommand(
"RET Unable to perform request: "
<< "TOO_MANY_REQUESTS");
- ManageMobileCommand(MessageHelper::GetOnAppInterfaceUnregisteredNotificationToMobile(
- connection_key,
- mobile_api::AppInterfaceUnregisteredReason::TOO_MANY_REQUESTS), commands::Command::ORIGIN_SDL);
+ 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,
@@ -1558,10 +1556,12 @@ bool ApplicationManagerImpl::ManageMobileCommand(
"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);
+ 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) {
@@ -1667,8 +1667,7 @@ bool ApplicationManagerImpl::ManageHMICommand(
bool ApplicationManagerImpl::Init(resumption::LastState& last_state,
media_manager::MediaManager* media_manager) {
LOG4CXX_TRACE(logger_, "Init application manager");
- const std::string app_storage_folder =
- get_settings().app_storage_folder();
+ const std::string app_storage_folder = get_settings().app_storage_folder();
if (!InitDirectory(app_storage_folder, TYPE_STORAGE) ||
!IsReadWriteAllowed(app_storage_folder, TYPE_STORAGE)) {
return false;
@@ -1686,14 +1685,12 @@ bool ApplicationManagerImpl::Init(resumption::LastState& last_state,
return false;
}
- const std::string system_files_path =
- get_settings().system_files_path();
+ const std::string system_files_path = get_settings().system_files_path();
if (!InitDirectory(system_files_path, TYPE_SYSTEM) ||
!IsReadWriteAllowed(system_files_path, TYPE_SYSTEM)) {
return false;
}
- const std::string app_icons_folder =
- get_settings().app_icons_folder();
+ const std::string app_icons_folder = get_settings().app_icons_folder();
if (!InitDirectory(app_icons_folder, TYPE_ICONS)) {
return false;
}
@@ -2118,11 +2115,12 @@ void ApplicationManagerImpl::PullLanguagesInfo(const SmartObject& app_data,
}
const HMICapabilities& hmi_cap = hmi_capabilities();
- std::string cur_vr_lang(MessageHelper::CommonLanguageToString
- (hmi_cap.active_vr_language()));
+ std::string cur_vr_lang(
+ MessageHelper::CommonLanguageToString(hmi_cap.active_vr_language()));
const SmartObject& languages = app_data[json::languages];
- std::transform(cur_vr_lang.begin(), cur_vr_lang.end(), cur_vr_lang.begin(), ::toupper);
+ std::transform(
+ cur_vr_lang.begin(), cur_vr_lang.end(), cur_vr_lang.begin(), ::toupper);
ssize_t default_idx = -1;
ssize_t specific_idx = -1;
@@ -2130,15 +2128,15 @@ void ApplicationManagerImpl::PullLanguagesInfo(const SmartObject& app_data,
const size_t size = languages.length();
for (size_t idx = 0; idx < size; ++idx) {
if (languages[idx].keyExists(cur_vr_lang)) {
- LOG4CXX_DEBUG(logger_, "Found active HMI language " << cur_vr_lang);
- specific_idx = idx;
+ LOG4CXX_DEBUG(logger_, "Found active HMI language " << cur_vr_lang);
+ specific_idx = idx;
} else if (languages[idx].keyExists(json::default_)) {
- LOG4CXX_DEBUG(logger_, "Found default language");
- default_idx = idx;
- }
+ LOG4CXX_DEBUG(logger_, "Found default language");
+ default_idx = idx;
+ }
}
- if ( (-1 == specific_idx) && (-1 == default_idx) ) {
+ if ((-1 == specific_idx) && (-1 == default_idx)) {
LOG4CXX_DEBUG(logger_, "No suitable language found");
return;
}
@@ -2180,13 +2178,12 @@ void ApplicationManagerImpl::CreateApplications(SmartArray& obj_array,
}
const std::string policy_app_id(app_data[json::appId].asString());
- ApplicationSharedPtr registered_app = application_by_policy_id(
- policy_app_id);
+ ApplicationSharedPtr registered_app =
+ application_by_policy_id(policy_app_id);
if (registered_app) {
- LOG4CXX_DEBUG(
- logger_,
- "Application with the same id: " << policy_app_id
- << " is registered already.");
+ LOG4CXX_DEBUG(logger_,
+ "Application with the same id: "
+ << policy_app_id << " is registered already.");
continue;
}
@@ -2196,7 +2193,8 @@ void ApplicationManagerImpl::CreateApplications(SmartArray& obj_array,
SmartObject vrSynonym;
SmartObject ttsName;
- const custom_str::CustomString appName(app_data[json::name].asCustomString());
+ const custom_str::CustomString appName(
+ app_data[json::name].asCustomString());
if (app_data.keyExists(json::ios)) {
os_type = json::ios;
@@ -2222,7 +2220,8 @@ void ApplicationManagerImpl::CreateApplications(SmartArray& obj_array,
uint32_t device_id = 0;
- if (-1 == connection_handler().GetDataOnSessionKey(
+ if (-1 ==
+ connection_handler().GetDataOnSessionKey(
connection_key, NULL, NULL, &device_id)) {
LOG4CXX_ERROR(logger_,
"Failed to create application: no connection info.");
@@ -2230,11 +2229,8 @@ void ApplicationManagerImpl::CreateApplications(SmartArray& obj_array,
}
std::string device_mac;
- connection_handler().get_session_observer().GetDataOnDeviceID(device_id,
- NULL,
- NULL,
- &device_mac,
- NULL);
+ connection_handler().get_session_observer().GetDataOnDeviceID(
+ device_id, NULL, NULL, &device_mac, NULL);
const uint32_t hmi_app_id =
resume_ctrl_.IsApplicationSaved(policy_app_id, device_mac)
@@ -2289,7 +2285,8 @@ void ApplicationManagerImpl::ProcessQueryApp(
for (; it != apps_to_register_.end(); ++it) {
const std::string full_icon_path((*it)->app_icon_path());
if (file_system::FileExists(full_icon_path)) {
- MessageHelper::SendSetAppIcon((*it)->hmi_app_id(), full_icon_path, *this);
+ MessageHelper::SendSetAppIcon(
+ (*it)->hmi_app_id(), full_icon_path, *this);
}
}
}
@@ -2325,8 +2322,7 @@ void ApplicationManagerImpl::updateRequestTimeout(
connection_key, mobile_correlation_id, new_timeout_value);
}
-uint32_t ApplicationManagerImpl::application_id(
- const int32_t correlation_id) {
+uint32_t ApplicationManagerImpl::application_id(const int32_t correlation_id) {
// ykazakov: there is no erase for const iterator for QNX
std::map<const int32_t, const uint32_t>::iterator it =
appID_list_.find(correlation_id);
@@ -2461,8 +2457,10 @@ void ApplicationManagerImpl::UnregisterAllApplications() {
ApplicationSetConstIt it = accessor.GetData().begin();
while (it != accessor.GetData().end()) {
ApplicationSharedPtr app_to_remove = *it;
- ManageMobileCommand(MessageHelper::GetOnAppInterfaceUnregisteredNotificationToMobile(
- app_to_remove->app_id(), unregister_reason_), commands::Command::ORIGIN_SDL);
+ ManageMobileCommand(
+ MessageHelper::GetOnAppInterfaceUnregisteredNotificationToMobile(
+ app_to_remove->app_id(), unregister_reason_),
+ commands::Command::ORIGIN_SDL);
UnregisterApplication(app_to_remove->app_id(),
mobile_apis::Result::INVALID_ENUM,
is_ignition_off,
@@ -2487,7 +2485,8 @@ void ApplicationManagerImpl::RemoveAppsWaitingForRegistration(
while (apps_to_register_.end() != it_app) {
LOG4CXX_DEBUG(logger_,
- "Waiting app: " << (*it_app)->name().c_str() << " is removed.");
+ "Waiting app: " << (*it_app)->name().c_str()
+ << " is removed.");
apps_to_register_.erase(it_app);
it_app = std::find_if(
apps_to_register_.begin(), apps_to_register_.end(), device_finder);
@@ -2512,7 +2511,7 @@ void ApplicationManagerImpl::UnregisterApplication(
{
sync_primitives::AutoLock lock(subscribed_way_points_apps_lock_);
subscribed_for_way_points_app_count =
- subscribed_way_points_apps_list_.size();
+ subscribed_way_points_apps_list_.size();
}
if (1 == subscribed_for_way_points_app_count) {
LOG4CXX_ERROR(logger_, "Send UnsubscribeWayPoints");
@@ -2581,7 +2580,7 @@ void ApplicationManagerImpl::UnregisterApplication(
}
applications_.erase(app_to_remove);
AppV4DevicePredicate finder(handle);
- ApplicationSharedPtr app = FindApp(accessor,finder);
+ ApplicationSharedPtr app = FindApp(accessor, finder);
if (!app) {
LOG4CXX_DEBUG(
logger_, "There is no more SDL4 apps with device handle: " << handle);
@@ -2592,7 +2591,7 @@ void ApplicationManagerImpl::UnregisterApplication(
}
if (is_resuming) {
- resume_ctrl_.SaveApplication(app_to_remove);
+ resume_ctrl_.SaveApplication(app_to_remove);
} else {
resume_ctrl_.RemoveApplicationFromSaved(app_to_remove);
}
@@ -2604,8 +2603,8 @@ void ApplicationManagerImpl::UnregisterApplication(
MessageHelper::SendStopAudioPathThru(*this);
}
- MessageHelper::SendOnAppUnregNotificationToHMI(app_to_remove,
- is_unexpected_disconnect, *this);
+ MessageHelper::SendOnAppUnregNotificationToHMI(
+ app_to_remove, is_unexpected_disconnect, *this);
request_ctrl_.terminateAppRequests(app_id);
return;
}
@@ -2748,10 +2747,10 @@ mobile_apis::Result::eType ApplicationManagerImpl::CheckPolicyPermissions(
<< stringified_functionID);
policy::CheckPermissionResult result;
GetPolicyHandler().CheckPermissions(policy_app_id,
- stringified_hmi_level,
- stringified_functionID,
- rpc_params,
- result);
+ stringified_hmi_level,
+ stringified_functionID,
+ rpc_params,
+ result);
if (NULL != params_permissions) {
params_permissions->allowed_params = result.list_of_allowed_params;
@@ -2882,8 +2881,10 @@ void ApplicationManagerImpl::ForbidStreaming(uint32_t app_id) {
NaviServiceStatusMap::iterator it = navi_service_status_.find(app_id);
if (navi_service_status_.end() == it ||
(!it->second.first && !it->second.second)) {
- ManageMobileCommand(MessageHelper::GetOnAppInterfaceUnregisteredNotificationToMobile(
- app_id, PROTOCOL_VIOLATION), commands::Command::ORIGIN_SDL);
+ ManageMobileCommand(
+ MessageHelper::GetOnAppInterfaceUnregisteredNotificationToMobile(
+ app_id, PROTOCOL_VIOLATION),
+ commands::Command::ORIGIN_SDL);
UnregisterApplication(app_id, ABORTED);
return;
}
@@ -2943,10 +2944,9 @@ void ApplicationManagerImpl::EndNaviServices(uint32_t app_id) {
navi_app_to_stop_.push_back(app_id);
TimerSPtr close_timer(utils::MakeShared<timer::Timer>(
- "CloseNaviAppTimer",
- new TimerTaskImpl<ApplicationManagerImpl>(
- this,
- &ApplicationManagerImpl::CloseNaviApp)));
+ "CloseNaviAppTimer",
+ new TimerTaskImpl<ApplicationManagerImpl>(
+ this, &ApplicationManagerImpl::CloseNaviApp)));
close_timer->Start(navi_close_app_timeout_, true);
sync_primitives::AutoLock lock(timer_pool_lock_);
@@ -2985,11 +2985,9 @@ void ApplicationManagerImpl::OnHMILevelChanged(
LOG4CXX_TRACE(logger_, "HMILevel from FULL or LIMITED");
navi_app_to_end_stream_.push_back(app_id);
TimerSPtr end_stream_timer(utils::MakeShared<timer::Timer>(
- "AppShouldFinishStreaming",
- new TimerTaskImpl<ApplicationManagerImpl>(
- this,
- &ApplicationManagerImpl::EndNaviStreaming)
- ));
+ "AppShouldFinishStreaming",
+ new TimerTaskImpl<ApplicationManagerImpl>(
+ this, &ApplicationManagerImpl::EndNaviStreaming)));
end_stream_timer->Start(navi_end_stream_timeout_, true);
sync_primitives::AutoLock lock(timer_pool_lock_);
@@ -3063,8 +3061,10 @@ void ApplicationManagerImpl::CloseNaviApp() {
if (it->second.first || it->second.second) {
LOG4CXX_INFO(logger_,
"App haven't answered for EndService. Unregister it.");
- ManageMobileCommand(MessageHelper::GetOnAppInterfaceUnregisteredNotificationToMobile(
- app_id, PROTOCOL_VIOLATION), commands::Command::ORIGIN_SDL);
+ ManageMobileCommand(
+ MessageHelper::GetOnAppInterfaceUnregisteredNotificationToMobile(
+ app_id, PROTOCOL_VIOLATION),
+ commands::Command::ORIGIN_SDL);
UnregisterApplication(app_id, ABORTED);
}
}
@@ -3133,8 +3133,8 @@ bool ApplicationManagerImpl::IsApplicationForbidden(
}
policy::DeviceConsent ApplicationManagerImpl::GetUserConsentForDevice(
- const std::string& device_id) const {
- return policy_handler_.GetUserConsentForDevice(device_id);
+ const std::string& device_id) const {
+ return policy_handler_.GetUserConsentForDevice(device_id);
}
void ApplicationManagerImpl::OnWakeUp() {
@@ -3250,7 +3250,8 @@ void ApplicationManagerImpl::OnTimerSendTTSGlobalProperties() {
for (uint32_t i = 0; i < app_list.size(); ++i) {
LOG4CXX_INFO(logger_,
"Send TTS GlobalProperties to HMI with default helpPrompt");
- MessageHelper::SendTTSGlobalProperties(application(app_list[i]), true, *this);
+ MessageHelper::SendTTSGlobalProperties(
+ application(app_list[i]), true, *this);
RemoveAppFromTTSGlobalPropertiesList(app_list[i]);
}
}
@@ -3259,8 +3260,7 @@ void ApplicationManagerImpl::OnTimerSendTTSGlobalProperties() {
void ApplicationManagerImpl::AddAppToTTSGlobalPropertiesList(
const uint32_t app_id) {
LOG4CXX_AUTO_TRACE(logger_);
- uint16_t timeout =
- get_settings().tts_global_properties_timeout();
+ uint16_t timeout = get_settings().tts_global_properties_timeout();
TimevalStruct current_time = date_time::DateTime::getCurrentTime();
current_time.tv_sec += timeout;
// please avoid AutoLock usage to avoid deadlock
@@ -3362,7 +3362,9 @@ void ApplicationManagerImpl::OnUpdateHMIAppType(
smart_objects::SmartType_Array);
bool flag_diffirence_app_hmi_type = false;
DataAccessor<ApplicationSet> accessor(applications());
- for (ApplicationSetIt it = accessor.GetData().begin(); it != accessor.GetData().end(); ++it) {
+ for (ApplicationSetIt it = accessor.GetData().begin();
+ it != accessor.GetData().end();
+ ++it) {
it_app_hmi_types_from_policy = app_hmi_types.find(((*it)->policy_app_id()));
if (it_app_hmi_types_from_policy != app_hmi_types.end() &&
@@ -3401,7 +3403,8 @@ void ApplicationManagerImpl::OnUpdateHMIAppType(
} else if (((*it)->hmi_level() == mobile_api::HMILevel::HMI_FULL) ||
((*it)->hmi_level() == mobile_api::HMILevel::HMI_LIMITED)) {
MessageHelper::SendUIChangeRegistrationRequestToHMI(*it, *this);
- state_controller().SetRegularState(*it, mobile_apis::HMILevel::HMI_BACKGROUND, true);
+ state_controller().SetRegularState(
+ *it, mobile_apis::HMILevel::HMI_BACKGROUND, true);
}
}
}
@@ -3410,7 +3413,7 @@ void ApplicationManagerImpl::OnUpdateHMIAppType(
ProtocolVersion ApplicationManagerImpl::SupportedSDLVersion() const {
LOG4CXX_AUTO_TRACE(logger_);
- bool heart_beat_support = get_settings().heart_beat_timeout();
+ bool heart_beat_support = get_settings().heart_beat_timeout();
bool sdl4_support = protocol_handler_->get_settings().enable_protocol_4();
if (sdl4_support) {
@@ -3500,7 +3503,8 @@ void ApplicationManagerImpl::SubscribeAppForWayPoints(const uint32_t app_id) {
subscribed_way_points_apps_list_.insert(app_id);
}
-void ApplicationManagerImpl::UnsubscribeAppFromWayPoints(const uint32_t app_id) {
+void ApplicationManagerImpl::UnsubscribeAppFromWayPoints(
+ const uint32_t app_id) {
LOG4CXX_AUTO_TRACE(logger_);
sync_primitives::AutoLock lock(subscribed_way_points_apps_lock_);
subscribed_way_points_apps_list_.erase(app_id);
diff --git a/src/components/application_manager/src/commands/command_impl.cc b/src/components/application_manager/src/commands/command_impl.cc
index 651432752e..0a3e65a790 100644
--- a/src/components/application_manager/src/commands/command_impl.cc
+++ b/src/components/application_manager/src/commands/command_impl.cc
@@ -34,7 +34,6 @@
#include "application_manager/application_impl.h"
#include "application_manager/application_manager.h"
-
namespace application_manager {
namespace commands {
@@ -55,7 +54,7 @@ CommandImpl::~CommandImpl() {
CleanUp();
}
-bool CommandImpl::CheckPermissions(){
+bool CommandImpl::CheckPermissions() {
return true;
}
@@ -67,8 +66,7 @@ bool CommandImpl::CleanUp() {
return true;
}
-void CommandImpl::Run() {
-}
+void CommandImpl::Run() {}
uint32_t CommandImpl::default_timeout() const {
return default_timeout_;
@@ -86,23 +84,21 @@ uint32_t CommandImpl::connection_key() const {
return (*message_)[strings::params][strings::connection_key].asUInt();
}
-void CommandImpl::onTimeOut() {
-
-}
+void CommandImpl::onTimeOut() {}
bool CommandImpl::AllowedToTerminate() {
- return allowed_to_terminate_;
+ return allowed_to_terminate_;
}
void CommandImpl::SetAllowedToTerminate(const bool allowed) {
- allowed_to_terminate_ = allowed;
+ allowed_to_terminate_ = allowed;
}
void CommandImpl::ReplaceMobileByHMIAppId(
NsSmartDeviceLink::NsSmartObjects::SmartObject& message) {
if (message.keyExists(strings::app_id)) {
- ApplicationSharedPtr application = application_manager_.application(
- message[strings::app_id].asUInt());
+ ApplicationSharedPtr application =
+ application_manager_.application(message[strings::app_id].asUInt());
if (application.valid()) {
LOG4CXX_DEBUG(logger_,
"ReplaceMobileByHMIAppId from "
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 bbb04e4c18..5b44abeec9 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
@@ -38,12 +38,11 @@ namespace application_manager {
namespace commands {
-CommandNotificationFromMobileImpl::CommandNotificationFromMobileImpl(const MessageSharedPtr& message, ApplicationManager &application_manager)
- : CommandImpl(message, application_manager) {
-}
+CommandNotificationFromMobileImpl::CommandNotificationFromMobileImpl(
+ const MessageSharedPtr& message, ApplicationManager& application_manager)
+ : CommandImpl(message, application_manager) {}
-CommandNotificationFromMobileImpl::~CommandNotificationFromMobileImpl() {
-}
+CommandNotificationFromMobileImpl::~CommandNotificationFromMobileImpl() {}
bool CommandNotificationFromMobileImpl::Init() {
return true;
@@ -53,8 +52,7 @@ bool CommandNotificationFromMobileImpl::CleanUp() {
return true;
}
-void CommandNotificationFromMobileImpl::Run() {
-}
+void CommandNotificationFromMobileImpl::Run() {}
void CommandNotificationFromMobileImpl::SendNotification() {
(*message_)[strings::params][strings::protocol_type] = mobile_protocol_type_;
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 0f2a2bde24..b6b0e7d500 100644
--- a/src/components/application_manager/src/commands/command_notification_impl.cc
+++ b/src/components/application_manager/src/commands/command_notification_impl.cc
@@ -42,8 +42,7 @@ CommandNotificationImpl::CommandNotificationImpl(
const MessageSharedPtr& message, ApplicationManager& application_manager)
: CommandImpl(message, application_manager) {}
-CommandNotificationImpl::~CommandNotificationImpl() {
-}
+CommandNotificationImpl::~CommandNotificationImpl() {}
bool CommandNotificationImpl::Init() {
return true;
@@ -53,8 +52,7 @@ bool CommandNotificationImpl::CleanUp() {
return true;
}
-void CommandNotificationImpl::Run() {
-}
+void CommandNotificationImpl::Run() {}
void CommandNotificationImpl::SendNotification() {
(*message_)[strings::params][strings::protocol_type] = mobile_protocol_type_;
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 36627be735..86e3547676 100644
--- a/src/components/application_manager/src/commands/command_request_impl.cc
+++ b/src/components/application_manager/src/commands/command_request_impl.cc
@@ -44,9 +44,7 @@ namespace commands {
struct DisallowedParamsInserter {
DisallowedParamsInserter(smart_objects::SmartObject& response,
mobile_apis::VehicleDataResultCode::eType code)
- : response_(response),
- code_(code) {
- }
+ : response_(response), code_(code) {}
bool operator()(const std::string& param) {
const VehicleData& vehicle_data =
@@ -62,7 +60,8 @@ struct DisallowedParamsInserter {
}
return false;
}
-private:
+
+ private:
smart_objects::SmartObject& response_;
mobile_apis::VehicleDataResultCode::eType code_;
};
@@ -73,8 +72,7 @@ CommandRequestImpl::CommandRequestImpl(const MessageSharedPtr& message,
, EventObserver(application_manager.event_dispatcher())
, current_state_(kAwaitingHMIResponse) {}
-CommandRequestImpl::~CommandRequestImpl() {
-}
+CommandRequestImpl::~CommandRequestImpl() {}
bool CommandRequestImpl::Init() {
return true;
@@ -88,8 +86,7 @@ bool CommandRequestImpl::CleanUp() {
return true;
}
-void CommandRequestImpl::Run() {
-}
+void CommandRequestImpl::Run() {}
void CommandRequestImpl::onTimeOut() {
LOG4CXX_AUTO_TRACE(logger_);
@@ -108,14 +105,15 @@ void CommandRequestImpl::onTimeOut() {
}
smart_objects::SmartObjectSPtr response =
- MessageHelper::CreateNegativeResponse(connection_key(), function_id(),
- correlation_id(), mobile_api::Result::GENERIC_ERROR);
+ MessageHelper::CreateNegativeResponse(connection_key(),
+ function_id(),
+ correlation_id(),
+ mobile_api::Result::GENERIC_ERROR);
application_manager_.ManageMobileCommand(response, ORIGIN_SDL);
}
-void CommandRequestImpl::on_event(const event_engine::Event& event) {
-}
+void CommandRequestImpl::on_event(const event_engine::Event& event) {}
void CommandRequestImpl::SendResponse(
const bool success,
@@ -156,12 +154,13 @@ void CommandRequestImpl::SendResponse(
response[strings::msg_params][strings::info] = std::string(info);
}
- // Add disallowed parameters and info from request back to response with appropriate
+ // Add disallowed parameters and info from request back to response with
+ // appropriate
// reasons (VehicleData result codes)
if (result_code != mobile_apis::Result::APPLICATION_NOT_REGISTERED) {
const mobile_apis::FunctionID::eType& id =
static_cast<mobile_apis::FunctionID::eType>(function_id());
- if ((id == mobile_apis::FunctionID::SubscribeVehicleDataID) ||
+ if ((id == mobile_apis::FunctionID::SubscribeVehicleDataID) ||
(id == mobile_apis::FunctionID::UnsubscribeVehicleDataID)) {
AddDisallowedParameters(response);
AddDisallowedParametersToInfo(response);
@@ -176,7 +175,8 @@ void CommandRequestImpl::SendResponse(
application_manager_.ManageMobileCommand(result, ORIGIN_SDL);
}
-bool CommandRequestImpl::CheckSyntax(const std::string& str, bool allow_empty_line) {
+bool CommandRequestImpl::CheckSyntax(const std::string& str,
+ bool allow_empty_line) {
if (std::string::npos != str.find_first_of("\t\n")) {
LOG4CXX_ERROR(logger_, "CheckSyntax failed! :" << str);
return false;
@@ -196,14 +196,16 @@ bool CommandRequestImpl::CheckSyntax(const std::string& str, bool allow_empty_li
uint32_t CommandRequestImpl::SendHMIRequest(
const hmi_apis::FunctionID::eType& function_id,
- const smart_objects::SmartObject* msg_params, bool use_events) {
-
+ const smart_objects::SmartObject* msg_params,
+ bool use_events) {
smart_objects::SmartObjectSPtr result = new smart_objects::SmartObject;
const uint32_t hmi_correlation_id =
- application_manager_.GetNextHMICorrelationID();
+ application_manager_.GetNextHMICorrelationID();
if (use_events) {
- LOG4CXX_DEBUG(logger_, "subscribe_on_event " << function_id << " " << hmi_correlation_id);
+ LOG4CXX_DEBUG(logger_,
+ "subscribe_on_event " << function_id << " "
+ << hmi_correlation_id);
subscribe_on_event(function_id, hmi_correlation_id);
}
@@ -381,7 +383,8 @@ bool CommandRequestImpl::CheckAllowedParameters() {
if (connection_key() == (*it_app_list).get()->app_id()) {
RPCParams params;
- const smart_objects::SmartObject& s_map = (*message_)[strings::msg_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();
@@ -396,13 +399,12 @@ bool CommandRequestImpl::CheckAllowedParameters() {
CommandParametersPermissions params_permissions;
mobile_apis::Result::eType check_result =
- application_manager_.
- CheckPolicyPermissions(
- (*it_app_list).get()->policy_app_id(),
- (*it_app_list).get()->hmi_level(),
- static_cast<mobile_api::FunctionID::eType>(function_id()),
- params,
- &params_permissions);
+ application_manager_.CheckPolicyPermissions(
+ (*it_app_list).get()->policy_app_id(),
+ (*it_app_list).get()->hmi_level(),
+ static_cast<mobile_api::FunctionID::eType>(function_id()),
+ params,
+ &params_permissions);
// Check, if RPC is allowed by policy
if (mobile_apis::Result::SUCCESS != check_result) {
@@ -442,13 +444,13 @@ void CommandRequestImpl::RemoveDisallowedParameters(
params_permissions.disallowed_params.begin();
std::vector<std::string>::const_iterator it_disallowed_end =
params_permissions.disallowed_params.end();
- for (;it_disallowed != it_disallowed_end; ++it_disallowed) {
+ for (; it_disallowed != it_disallowed_end; ++it_disallowed) {
if (params.keyExists(*it_disallowed)) {
params.erase(*it_disallowed);
- parameters_permissions_.disallowed_params.push_back(
- *it_disallowed);
- LOG4CXX_INFO(logger_, "Following parameter is disallowed by user: "
- << *it_disallowed);
+ parameters_permissions_.disallowed_params.push_back(*it_disallowed);
+ LOG4CXX_INFO(
+ logger_,
+ "Following parameter is disallowed by user: " << *it_disallowed);
}
}
@@ -457,13 +459,13 @@ void CommandRequestImpl::RemoveDisallowedParameters(
params_permissions.undefined_params.begin();
std::vector<std::string>::const_iterator it_undefined_end =
params_permissions.undefined_params.end();
- for (;it_undefined != it_undefined_end; ++it_undefined) {
+ for (; it_undefined != it_undefined_end; ++it_undefined) {
if (params.keyExists(*it_undefined)) {
params.erase(*it_undefined);
- parameters_permissions_.undefined_params.push_back(
- *it_undefined);
- LOG4CXX_INFO(logger_, "Following parameter is disallowed by policy: "
- << *it_undefined);
+ parameters_permissions_.undefined_params.push_back(*it_undefined);
+ LOG4CXX_INFO(
+ logger_,
+ "Following parameter is disallowed by policy: " << *it_undefined);
}
}
@@ -473,19 +475,18 @@ void CommandRequestImpl::RemoveDisallowedParameters(
VehicleData::const_iterator it_vehicle_data = vehicle_data.begin();
VehicleData::const_iterator it_vehicle_data_end = vehicle_data.end();
- for (;it_vehicle_data != it_vehicle_data_end; ++it_vehicle_data) {
+ for (; it_vehicle_data != it_vehicle_data_end; ++it_vehicle_data) {
const std::string key = it_vehicle_data->first;
if (params.keyExists(key) &&
params_permissions.allowed_params.end() ==
- std::find(params_permissions.allowed_params.begin(),
- params_permissions.allowed_params.end(),
- key)) {
+ std::find(params_permissions.allowed_params.begin(),
+ params_permissions.allowed_params.end(),
+ key)) {
params.erase(key);
parameters_permissions_.undefined_params.push_back(key);
LOG4CXX_INFO(logger_,
"Following parameter is not found among allowed parameters '"
- << key
- << "' and will be treated as disallowed.");
+ << key << "' and will be treated as disallowed.");
}
}
}
@@ -531,15 +532,13 @@ void CommandRequestImpl::AddDisallowedParametersToInfo(
void CommandRequestImpl::AddDisallowedParameters(
smart_objects::SmartObject& response) {
DisallowedParamsInserter disallowed_inserter(
- response,
- mobile_apis::VehicleDataResultCode::VDRC_USER_DISALLOWED);
+ response, mobile_apis::VehicleDataResultCode::VDRC_USER_DISALLOWED);
std::for_each(parameters_permissions_.disallowed_params.begin(),
parameters_permissions_.disallowed_params.end(),
disallowed_inserter);
DisallowedParamsInserter undefined_inserter(
- response,
- mobile_apis::VehicleDataResultCode::VDRC_DISALLOWED);
+ response, mobile_apis::VehicleDataResultCode::VDRC_DISALLOWED);
std::for_each(parameters_permissions_.undefined_params.begin(),
parameters_permissions_.undefined_params.end(),
undefined_inserter);
@@ -547,7 +546,7 @@ void CommandRequestImpl::AddDisallowedParameters(
bool CommandRequestImpl::HasDisallowedParams() const {
return ((!parameters_permissions_.disallowed_params.empty()) ||
- (!parameters_permissions_.undefined_params.empty()));
+ (!parameters_permissions_.undefined_params.empty()));
}
} // namespace commands
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 ab027083fc..c3265230a8 100644
--- a/src/components/application_manager/src/commands/command_response_impl.cc
+++ b/src/components/application_manager/src/commands/command_response_impl.cc
@@ -41,8 +41,7 @@ CommandResponseImpl::CommandResponseImpl(
const MessageSharedPtr& message, ApplicationManager& application_manager)
: CommandImpl(message, application_manager) {}
-CommandResponseImpl::~CommandResponseImpl() {
-}
+CommandResponseImpl::~CommandResponseImpl() {}
bool CommandResponseImpl::Init() {
return true;
@@ -52,11 +51,12 @@ bool CommandResponseImpl::CleanUp() {
return true;
}
-void CommandResponseImpl::Run() {
-}
+void CommandResponseImpl::Run() {}
void CommandResponseImpl::SendResponse(
- bool success, const mobile_apis::Result::eType& result_code, bool final_message) {
+ bool success,
+ const mobile_apis::Result::eType& result_code,
+ bool final_message) {
LOG4CXX_INFO(logger_, "Trying to send response");
(*message_)[strings::params][strings::protocol_type] = mobile_protocol_type_;
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
index 09d4ae9002..ea36cd2b0a 100644
--- a/src/components/application_manager/src/commands/hmi/activate_app_request.cc
+++ b/src/components/application_manager/src/commands/hmi/activate_app_request.cc
@@ -36,36 +36,34 @@
namespace application_manager {
- namespace commands {
+namespace commands {
- ActivateAppRequest::ActivateAppRequest(
- const MessageSharedPtr& message, ApplicationManager& application_manager): RequestToHMI(message, application_manager) {
- }
+ActivateAppRequest::ActivateAppRequest(const MessageSharedPtr& message,
+ ApplicationManager& application_manager)
+ : RequestToHMI(message, application_manager) {}
+ActivateAppRequest::~ActivateAppRequest() {
+ LOG4CXX_TRACE(logger_, "~ActivateAppRequest");
+}
- 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);
+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);
- }
+ 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");
- }
+ SendRequest();
+ LOG4CXX_TRACE(logger_, "exit");
+}
- } // namespace commands
+} // 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
index a667c20190..55e704b6c4 100644
--- a/src/components/application_manager/src/commands/hmi/activate_app_response.cc
+++ b/src/components/application_manager/src/commands/hmi/activate_app_response.cc
@@ -38,15 +38,15 @@ namespace application_manager {
namespace commands {
ActivateAppResponse::ActivateAppResponse(
- const MessageSharedPtr& message, ApplicationManager& application_manager): ResponseFromHMI(message, application_manager) {
-}
+ const MessageSharedPtr& message, ApplicationManager& application_manager)
+ : ResponseFromHMI(message, application_manager) {}
-ActivateAppResponse::~ActivateAppResponse() {
-}
+ActivateAppResponse::~ActivateAppResponse() {}
void ActivateAppResponse::Run() {
LOG4CXX_TRACE(logger_, "enter");
- event_engine::Event event(hmi_apis::FunctionID::BasicCommunication_ActivateApp);
+ event_engine::Event event(
+ hmi_apis::FunctionID::BasicCommunication_ActivateApp);
event.set_smart_object(*message_);
event.raise(application_manager_.event_dispatcher());
LOG4CXX_TRACE(logger_, "exit");
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
index 9d0cd89212..ef75eba1e2 100644
--- 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
@@ -40,17 +40,15 @@ namespace commands {
AddStatisticsInfoNotification::AddStatisticsInfoNotification(
const MessageSharedPtr& message, ApplicationManager& application_manager)
- : NotificationFromHMI(message, application_manager) {
-}
+ : NotificationFromHMI(message, application_manager) {}
-AddStatisticsInfoNotification::~AddStatisticsInfoNotification() {
-}
+AddStatisticsInfoNotification::~AddStatisticsInfoNotification() {}
void AddStatisticsInfoNotification::Run() {
LOG4CXX_AUTO_TRACE(logger_);
int type = (*message_)[strings::msg_params][hmi_notification::statistic_type]
- .asInt();
+ .asInt();
application_manager_.GetPolicyHandler().AddStatisticsInfo(type);
}
@@ -58,4 +56,3 @@ void AddStatisticsInfoNotification::Run() {
} // 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
index 768c8b7653..4e096a2cda 100644
--- 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
@@ -36,12 +36,11 @@ namespace application_manager {
namespace commands {
-AllowAllAppsRequest::AllowAllAppsRequest(const MessageSharedPtr& message, ApplicationManager& application_manager)
- : RequestToHMI(message, application_manager) {
-}
+AllowAllAppsRequest::AllowAllAppsRequest(
+ const MessageSharedPtr& message, ApplicationManager& application_manager)
+ : RequestToHMI(message, application_manager) {}
-AllowAllAppsRequest::~AllowAllAppsRequest() {
-}
+AllowAllAppsRequest::~AllowAllAppsRequest() {}
void AllowAllAppsRequest::Run() {
LOG4CXX_AUTO_TRACE(logger_);
@@ -52,4 +51,3 @@ void AllowAllAppsRequest::Run() {
} // 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
index cc8248483a..ed05c3ba83 100644
--- 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
@@ -31,17 +31,15 @@
*/
#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(
+ const MessageSharedPtr& message, ApplicationManager& application_manager)
+ : ResponseFromHMI(message, application_manager) {}
-AllowAllAppsResponse::~AllowAllAppsResponse() {
-}
+AllowAllAppsResponse::~AllowAllAppsResponse() {}
void AllowAllAppsResponse::Run() {
LOG4CXX_AUTO_TRACE(logger_);
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
index 5a66e697a9..5176b3b4fe 100644
--- a/src/components/application_manager/src/commands/hmi/allow_app_request.cc
+++ b/src/components/application_manager/src/commands/hmi/allow_app_request.cc
@@ -36,12 +36,11 @@ namespace application_manager {
namespace commands {
-AllowAppRequest::AllowAppRequest(const MessageSharedPtr& message, ApplicationManager& application_manager)
- : RequestToHMI(message, application_manager) {
-}
+AllowAppRequest::AllowAppRequest(const MessageSharedPtr& message,
+ ApplicationManager& application_manager)
+ : RequestToHMI(message, application_manager) {}
-AllowAppRequest::~AllowAppRequest() {
-}
+AllowAppRequest::~AllowAppRequest() {}
void AllowAppRequest::Run() {
LOG4CXX_AUTO_TRACE(logger_);
@@ -52,4 +51,3 @@ void AllowAppRequest::Run() {
} // 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
index a2c7d8fc78..5fd9c702b4 100644
--- a/src/components/application_manager/src/commands/hmi/allow_app_response.cc
+++ b/src/components/application_manager/src/commands/hmi/allow_app_response.cc
@@ -37,27 +37,26 @@ namespace application_manager {
namespace commands {
-AllowAppResponse::AllowAppResponse(
- const MessageSharedPtr& message, ApplicationManager& application_manager): ResponseFromHMI(message, application_manager) {
-}
+AllowAppResponse::AllowAppResponse(const MessageSharedPtr& message,
+ ApplicationManager& application_manager)
+ : ResponseFromHMI(message, application_manager) {}
-AllowAppResponse::~AllowAppResponse() {
-}
+AllowAppResponse::~AllowAppResponse() {}
void AllowAppResponse::Run() {
LOG4CXX_AUTO_TRACE(logger_);
uint32_t connection_key =
- (*message_)[strings::params][strings::connection_key].asInt();
+ (*message_)[strings::params][strings::connection_key].asInt();
- ApplicationSharedPtr app = application_manager_.
- application(connection_key);
+ 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());
+ app->set_app_allowed(
+ (*message_)[strings::msg_params][hmi_response::allowed].asBool());
}
} // namespace commands
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
index 1e27e01487..2499c21680 100644
--- 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
@@ -32,17 +32,15 @@
#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) {
-}
+ const MessageSharedPtr& message, ApplicationManager& application_manager)
+ : RequestToHMI(message, application_manager) {}
-BasicCommunicationSystemRequest::~BasicCommunicationSystemRequest() {
-}
+BasicCommunicationSystemRequest::~BasicCommunicationSystemRequest() {}
void BasicCommunicationSystemRequest::Run() {
LOG4CXX_AUTO_TRACE(logger_);
@@ -52,4 +50,3 @@ void BasicCommunicationSystemRequest::Run() {
} // 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
index b33f607310..16afce92e0 100644
--- 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
@@ -39,15 +39,15 @@ namespace application_manager {
namespace commands {
BasicCommunicationSystemResponse::BasicCommunicationSystemResponse(
- const MessageSharedPtr& message, ApplicationManager& application_manager): ResponseFromHMI(message, application_manager) {
-}
+ const MessageSharedPtr& message, ApplicationManager& application_manager)
+ : ResponseFromHMI(message, application_manager) {}
-BasicCommunicationSystemResponse::~BasicCommunicationSystemResponse() {
-}
+BasicCommunicationSystemResponse::~BasicCommunicationSystemResponse() {}
void BasicCommunicationSystemResponse::Run() {
LOG4CXX_AUTO_TRACE(logger_);
- event_engine::Event event(hmi_apis::FunctionID::BasicCommunication_SystemRequest);
+ event_engine::Event event(
+ hmi_apis::FunctionID::BasicCommunication_SystemRequest);
event.set_smart_object(*message_);
event.raise(application_manager_.event_dispatcher());
}
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
index 622323a6e9..e6b73879e5 100644
--- 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
@@ -39,11 +39,9 @@ namespace commands {
ButtonGetCapabilitiesRequest::ButtonGetCapabilitiesRequest(
const MessageSharedPtr& message, ApplicationManager& application_manager)
- : RequestToHMI(message, application_manager) {
-}
+ : RequestToHMI(message, application_manager) {}
-ButtonGetCapabilitiesRequest::~ButtonGetCapabilitiesRequest() {
-}
+ButtonGetCapabilitiesRequest::~ButtonGetCapabilitiesRequest() {}
void ButtonGetCapabilitiesRequest::Run() {
LOG4CXX_AUTO_TRACE(logger_);
@@ -54,4 +52,3 @@ void ButtonGetCapabilitiesRequest::Run() {
} // 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
index 711040ff60..a947fb7ba9 100644
--- 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
@@ -39,11 +39,9 @@ namespace commands {
ButtonGetCapabilitiesResponse::ButtonGetCapabilitiesResponse(
const MessageSharedPtr& message, ApplicationManager& application_manager)
- : ResponseFromHMI(message, application_manager) {
-}
+ : ResponseFromHMI(message, application_manager) {}
-ButtonGetCapabilitiesResponse::~ButtonGetCapabilitiesResponse() {
-}
+ButtonGetCapabilitiesResponse::~ButtonGetCapabilitiesResponse() {}
void ButtonGetCapabilitiesResponse::Run() {
LOG4CXX_AUTO_TRACE(logger_);
@@ -56,8 +54,7 @@ void ButtonGetCapabilitiesResponse::Run() {
return;
}
- HMICapabilities& hmi_capabilities =
- application_manager_.hmi_capabilities();
+ HMICapabilities& hmi_capabilities = application_manager_.hmi_capabilities();
hmi_capabilities.set_button_capabilities(
(*message_)[strings::msg_params][hmi_response::capabilities]);
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
index d366aa408b..b0ab48dd96 100644
--- a/src/components/application_manager/src/commands/hmi/close_popup_request.cc
+++ b/src/components/application_manager/src/commands/hmi/close_popup_request.cc
@@ -36,12 +36,11 @@ namespace application_manager {
namespace commands {
-ClosePopupRequest::ClosePopupRequest(const MessageSharedPtr& message, ApplicationManager& application_manager)
- : RequestToHMI(message, application_manager) {
-}
+ClosePopupRequest::ClosePopupRequest(const MessageSharedPtr& message,
+ ApplicationManager& application_manager)
+ : RequestToHMI(message, application_manager) {}
-ClosePopupRequest::~ClosePopupRequest() {
-}
+ClosePopupRequest::~ClosePopupRequest() {}
void ClosePopupRequest::Run() {
LOG4CXX_AUTO_TRACE(logger_);
@@ -52,4 +51,3 @@ void ClosePopupRequest::Run() {
} // 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
index f3dd63becd..15adb2ee32 100644
--- a/src/components/application_manager/src/commands/hmi/close_popup_response.cc
+++ b/src/components/application_manager/src/commands/hmi/close_popup_response.cc
@@ -35,12 +35,11 @@ namespace application_manager {
namespace commands {
-ClosePopupResponse::ClosePopupResponse(const MessageSharedPtr& message, ApplicationManager& application_manager)
- : ResponseFromHMI(message, application_manager) {
-}
+ClosePopupResponse::ClosePopupResponse(const MessageSharedPtr& message,
+ ApplicationManager& application_manager)
+ : ResponseFromHMI(message, application_manager) {}
-ClosePopupResponse::~ClosePopupResponse() {
-}
+ClosePopupResponse::~ClosePopupResponse() {}
void ClosePopupResponse::Run() {
LOG4CXX_AUTO_TRACE(logger_);
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
index 8297e56a71..b26541cb01 100644
--- a/src/components/application_manager/src/commands/hmi/dial_number_request.cc
+++ b/src/components/application_manager/src/commands/hmi/dial_number_request.cc
@@ -38,20 +38,18 @@ namespace commands {
namespace hmi {
-DialNumberRequest::DialNumberRequest(const MessageSharedPtr& message, ApplicationManager& application_manager)
- : RequestToHMI(message, application_manager) {
-}
+DialNumberRequest::DialNumberRequest(const MessageSharedPtr& message,
+ ApplicationManager& application_manager)
+ : RequestToHMI(message, application_manager) {}
-DialNumberRequest::~DialNumberRequest() {
-}
+DialNumberRequest::~DialNumberRequest() {}
void DialNumberRequest::Run() {
SendRequest();
}
-} // namespace hmi
+} // 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
index ab54651552..5511fa98f8 100644
--- a/src/components/application_manager/src/commands/hmi/dial_number_response.cc
+++ b/src/components/application_manager/src/commands/hmi/dial_number_response.cc
@@ -31,27 +31,26 @@
*/
#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(const MessageSharedPtr& message,
+ ApplicationManager& application_manager)
+ : ResponseFromHMI(message, application_manager) {}
-DialNumberResponse::~DialNumberResponse() {
-}
+DialNumberResponse::~DialNumberResponse() {}
void DialNumberResponse::Run() {
- event_engine::Event event(hmi_apis::FunctionID::BasicCommunication_DialNumber);
+ event_engine::Event event(
+ hmi_apis::FunctionID::BasicCommunication_DialNumber);
event.set_smart_object(*message_);
event.raise(application_manager_.event_dispatcher());
}
-} // namespace hmi
+} // namespace hmi
} // namespace commands
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
index c7004ec436..379027c43a 100644
--- 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
@@ -32,17 +32,15 @@
#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) {
-}
+ const MessageSharedPtr& message, ApplicationManager& application_manager)
+ : RequestToHMI(message, application_manager) {}
-GetSystemInfoRequest::~GetSystemInfoRequest() {
-}
+GetSystemInfoRequest::~GetSystemInfoRequest() {}
void GetSystemInfoRequest::Run() {
LOG4CXX_AUTO_TRACE(logger_);
@@ -55,5 +53,3 @@ void GetSystemInfoRequest::Run() {
} // 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
index 93b108e04d..be6dabb292 100644
--- 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
@@ -36,8 +36,8 @@ namespace application_manager {
namespace commands {
GetSystemInfoResponse::GetSystemInfoResponse(
- const MessageSharedPtr& message, ApplicationManager& application_manager): ResponseFromHMI(message, application_manager) {
-}
+ const MessageSharedPtr& message, ApplicationManager& application_manager)
+ : ResponseFromHMI(message, application_manager) {}
GetSystemInfoResponse::~GetSystemInfoResponse() {}
@@ -69,7 +69,8 @@ const SystemInfo GetSystemInfoResponse::GetSystemInfo(
info.wers_country_code =
(*message_)[strings::msg_params]["wersCountryCode"].asString();
- const uint32_t lang_code = (*message_)[strings::msg_params]["language"].asUInt();
+ 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));
diff --git a/src/components/application_manager/src/commands/hmi/get_urls.cc b/src/components/application_manager/src/commands/hmi/get_urls.cc
index ee831104ce..1b11cdb040 100644
--- a/src/components/application_manager/src/commands/hmi/get_urls.cc
+++ b/src/components/application_manager/src/commands/hmi/get_urls.cc
@@ -38,12 +38,11 @@
namespace application_manager {
namespace commands {
-GetUrls::GetUrls(const MessageSharedPtr& message, ApplicationManager& application_manager)
- : RequestFromHMI(message, application_manager) {
-}
+GetUrls::GetUrls(const MessageSharedPtr& message,
+ ApplicationManager& application_manager)
+ : RequestFromHMI(message, application_manager) {}
-GetUrls::~GetUrls() {
-}
+GetUrls::~GetUrls() {}
void GetUrls::Run() {
LOG4CXX_AUTO_TRACE(logger_);
@@ -52,12 +51,13 @@ void GetUrls::Run() {
if (application_manager_.GetPolicyHandler().PolicyEnabled()) {
policy::EndpointUrls endpoints;
application_manager_.GetPolicyHandler().GetServiceUrls(
- object[strings::msg_params][hmi_request::service].asString(), endpoints);
+ object[strings::msg_params][hmi_request::service].asString(),
+ endpoints);
if (!endpoints.empty()) {
object[strings::msg_params].erase(hmi_request::service);
object[strings::msg_params][hmi_response::urls] =
- smart_objects::SmartObject(smart_objects::SmartType_Array);
+ smart_objects::SmartObject(smart_objects::SmartType_Array);
smart_objects::SmartObject& urls =
object[strings::msg_params][hmi_response::urls];
@@ -68,14 +68,13 @@ void GetUrls::Run() {
for (size_t k = 0; k < endpoints[i].url.size(); ++k, ++index) {
const std::string url = endpoints[i].url[k];
- urls[index] = smart_objects::SmartObject(
- smart_objects::SmartType_Map);
+ urls[index] =
+ smart_objects::SmartObject(smart_objects::SmartType_Map);
smart_objects::SmartObject& service_info = urls[index];
service_info[strings::url] = url;
if (policy::kDefaultId != endpoints[i].app_id) {
- service_info[hmi_response::policy_app_id] =
- endpoints[i].app_id;
+ service_info[hmi_response::policy_app_id] = endpoints[i].app_id;
}
}
}
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
index 4b8ebde050..dd9686fbce 100644
--- a/src/components/application_manager/src/commands/hmi/get_urls_response.cc
+++ b/src/components/application_manager/src/commands/hmi/get_urls_response.cc
@@ -32,16 +32,14 @@
#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(const MessageSharedPtr& message,
+ ApplicationManager& application_manager)
+ : ResponseToHMI(message, application_manager) {}
-GetUrlsResponse::~GetUrlsResponse() {
-}
+GetUrlsResponse::~GetUrlsResponse() {}
void GetUrlsResponse::Run() {
LOG4CXX_AUTO_TRACE(logger_);
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
index 194b6e9d28..e38d1fc088 100644
--- 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
@@ -37,11 +37,10 @@ namespace application_manager {
namespace commands {
MixingAudioSupportedRequest::MixingAudioSupportedRequest(
- const MessageSharedPtr& message, ApplicationManager& application_manager) : RequestToHMI(message, application_manager) {
-}
+ const MessageSharedPtr& message, ApplicationManager& application_manager)
+ : RequestToHMI(message, application_manager) {}
-MixingAudioSupportedRequest::~MixingAudioSupportedRequest() {
-}
+MixingAudioSupportedRequest::~MixingAudioSupportedRequest() {}
void MixingAudioSupportedRequest::Run() {
LOG4CXX_AUTO_TRACE(logger_);
@@ -52,4 +51,3 @@ void MixingAudioSupportedRequest::Run() {
} // 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
index a9da74170c..f8b58e6f35 100644
--- 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
@@ -31,25 +31,23 @@
*/
#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) {
-}
+ const MessageSharedPtr& message, ApplicationManager& application_manager)
+ : ResponseFromHMI(message, application_manager) {}
-MixingAudioSupportedResponse::~MixingAudioSupportedResponse() {
-}
+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());
+ HMICapabilities& hmi_capabilities = application_manager_.hmi_capabilities();
+ hmi_capabilities.set_attenuated_supported(
+ (*message_)[strings::msg_params][hmi_response::attenuated_supported]
+ .asBool());
}
} // namespace commands
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
index e431cb6376..582caaa8f3 100644
--- 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
@@ -37,11 +37,10 @@ namespace application_manager {
namespace commands {
NaviAlertManeuverRequest::NaviAlertManeuverRequest(
- const MessageSharedPtr& message, ApplicationManager& application_manager) : RequestToHMI(message, application_manager) {
-}
+ const MessageSharedPtr& message, ApplicationManager& application_manager)
+ : RequestToHMI(message, application_manager) {}
-NaviAlertManeuverRequest::~NaviAlertManeuverRequest() {
-}
+NaviAlertManeuverRequest::~NaviAlertManeuverRequest() {}
void NaviAlertManeuverRequest::Run() {
LOG4CXX_AUTO_TRACE(logger_);
@@ -52,4 +51,3 @@ void NaviAlertManeuverRequest::Run() {
} // 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
index d8e3807eb9..5f0422bf6a 100644
--- 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
@@ -39,11 +39,10 @@ namespace application_manager {
namespace commands {
NaviAlertManeuverResponse::NaviAlertManeuverResponse(
- const MessageSharedPtr& message, ApplicationManager& application_manager) : ResponseFromHMI(message, application_manager) {
-}
+ const MessageSharedPtr& message, ApplicationManager& application_manager)
+ : ResponseFromHMI(message, application_manager) {}
-NaviAlertManeuverResponse::~NaviAlertManeuverResponse() {
-}
+NaviAlertManeuverResponse::~NaviAlertManeuverResponse() {}
void NaviAlertManeuverResponse::Run() {
LOG4CXX_AUTO_TRACE(logger_);
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
index 25ef2a24d1..920c6fbdf9 100644
--- 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
@@ -35,27 +35,26 @@
#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) {
+ : 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_);
+ LOG4CXX_DEBUG(logger_,
+ "default_timeout_ = " << default_timeout_
+ << "; retry_number_ = " << retry_number_);
}
-AudioStartStreamRequest::~AudioStartStreamRequest() {
-}
+AudioStartStreamRequest::~AudioStartStreamRequest() {}
void AudioStartStreamRequest::Run() {
LOG4CXX_AUTO_TRACE(logger_);
@@ -64,14 +63,15 @@ void AudioStartStreamRequest::Run() {
subscribe_on_event(hmi_apis::FunctionID::Navigation_StartAudioStream,
correlation_id());
- ApplicationSharedPtr app = application_manager_.
- application_by_hmi_app(application_id());
+ ApplicationSharedPtr app =
+ application_manager_.application_by_hmi_app(application_id());
if (app) {
app->set_audio_streaming_allowed(true);
SendRequest();
} else {
- LOG4CXX_ERROR(logger_, "Applcation with hmi_app_id "
- << application_id() << " does not exist");
+ LOG4CXX_ERROR(logger_,
+ "Applcation with hmi_app_id " << application_id()
+ << " does not exist");
}
}
@@ -79,11 +79,11 @@ 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());
+ ApplicationSharedPtr app =
+ application_manager_.application_by_hmi_app(application_id());
if (!app) {
LOG4CXX_ERROR(logger_,
- "StartAudioStreamRequest aborted. Application not found");
+ "StartAudioStreamRequest aborted. Application not found");
return;
}
@@ -98,12 +98,13 @@ void AudioStartStreamRequest::on_event(const event_engine::Event& event) {
if (hmi_apis::Common_Result::SUCCESS == code) {
LOG4CXX_INFO(logger_, "StartAudioStream response SUCCESS");
- if (application_manager_.
- HMILevelAllowsStreaming(app->app_id(), ServiceType::kAudio)) {
+ 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");
+ LOG4CXX_WARN(
+ logger_,
+ "StartAudioStreamRequest aborted. Application can not stream");
}
break;
}
@@ -114,7 +115,7 @@ void AudioStartStreamRequest::on_event(const event_engine::Event& event) {
}
}
default: {
- LOG4CXX_ERROR(logger_,"Received unknown event" << event.id());
+ LOG4CXX_ERROR(logger_, "Received unknown event" << event.id());
return;
}
}
@@ -123,18 +124,17 @@ void AudioStartStreamRequest::on_event(const event_engine::Event& event) {
void AudioStartStreamRequest::onTimeOut() {
RetryStartSession();
- application_manager_.TerminateRequest(
- connection_key(), correlation_id());
+ application_manager_.TerminateRequest(connection_key(), correlation_id());
}
void AudioStartStreamRequest::RetryStartSession() {
LOG4CXX_AUTO_TRACE(logger_);
- ApplicationSharedPtr app = application_manager_.
- application_by_hmi_app(application_id());
+ ApplicationSharedPtr app =
+ application_manager_.application_by_hmi_app(application_id());
if (!app) {
LOG4CXX_ERROR(logger_,
- "StartAudioStreamRequest aborted. Application not found");
+ "StartAudioStreamRequest aborted. Application not found");
return;
}
@@ -144,21 +144,24 @@ void AudioStartStreamRequest::RetryStartSession() {
}
if (app->audio_streaming_approved()) {
- LOG4CXX_INFO(logger_, "AudioStartStream retry sequence stopped. "
- << "SUCCESS received");
+ 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();
+ uint32_t curr_retry_number = app->audio_stream_retry_number();
if (curr_retry_number < retry_number_ - 1) {
- LOG4CXX_DEBUG(logger_, "Send AudioStartStream retry. retry_number = "
- << curr_retry_number);
+ LOG4CXX_DEBUG(
+ logger_,
+ "Send AudioStartStream retry. retry_number = " << curr_retry_number);
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.");
+ LOG4CXX_DEBUG(logger_,
+ "Audio start stream retry sequence stopped. "
+ << "Attempts expired.");
application_manager_.EndNaviServices(app->app_id());
}
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
index 5e3098d1c4..c7fc7365e7 100644
--- 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
@@ -31,17 +31,15 @@
*/
#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(
+ const MessageSharedPtr& message, ApplicationManager& application_manager)
+ : ResponseFromHMI(message, application_manager) {}
-AudioStartStreamResponse::~AudioStartStreamResponse() {
-}
+AudioStartStreamResponse::~AudioStartStreamResponse() {}
void AudioStartStreamResponse::Run() {
LOG4CXX_AUTO_TRACE(logger_);
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
index fac42d66f0..d0f1a96282 100644
--- 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
@@ -37,11 +37,9 @@ namespace commands {
AudioStopStreamRequest::AudioStopStreamRequest(
const MessageSharedPtr& message, ApplicationManager& application_manager)
- : RequestToHMI(message, application_manager) {
-}
+ : RequestToHMI(message, application_manager) {}
-AudioStopStreamRequest::~AudioStopStreamRequest() {
-}
+AudioStopStreamRequest::~AudioStopStreamRequest() {}
void AudioStopStreamRequest::Run() {
LOG4CXX_AUTO_TRACE(logger_);
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
index 7f7d3cbfa3..c669d399f9 100644
--- 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
@@ -35,16 +35,14 @@ namespace application_manager {
namespace commands {
-AudioStopStreamResponse::AudioStopStreamResponse(const MessageSharedPtr& message, ApplicationManager& application_manager)
- : ResponseFromHMI(message, application_manager) {
-}
+AudioStopStreamResponse::AudioStopStreamResponse(
+ const MessageSharedPtr& message, ApplicationManager& application_manager)
+ : ResponseFromHMI(message, application_manager) {}
-AudioStopStreamResponse::~AudioStopStreamResponse() {
-}
+AudioStopStreamResponse::~AudioStopStreamResponse() {}
void AudioStopStreamResponse::Run() {
LOG4CXX_AUTO_TRACE(logger_);
-
}
} // namespace commands
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
index 0b449d9ac5..f295845b24 100644
--- 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
@@ -39,7 +39,7 @@ namespace application_manager {
namespace commands {
NaviGetWayPointsResponse::NaviGetWayPointsResponse(
- const MessageSharedPtr &message, ApplicationManager& application_manager)
+ const MessageSharedPtr& message, ApplicationManager& application_manager)
: ResponseFromHMI(message, application_manager) {}
NaviGetWayPointsResponse::~NaviGetWayPointsResponse() {}
@@ -47,8 +47,7 @@ NaviGetWayPointsResponse::~NaviGetWayPointsResponse() {}
void NaviGetWayPointsResponse::Run() {
LOG4CXX_AUTO_TRACE(logger_);
- event_engine::Event event(
- hmi_apis::FunctionID::Navigation_GetWayPoints);
+ event_engine::Event event(hmi_apis::FunctionID::Navigation_GetWayPoints);
event.set_smart_object(*message_);
event.raise(application_manager_.event_dispatcher());
}
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
index d48a204008..92e972e8f4 100644
--- 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
@@ -36,12 +36,11 @@ namespace application_manager {
namespace commands {
-NaviIsReadyRequest::NaviIsReadyRequest(const MessageSharedPtr& message, ApplicationManager& application_manager)
- : RequestToHMI(message, application_manager) {
-}
+NaviIsReadyRequest::NaviIsReadyRequest(const MessageSharedPtr& message,
+ ApplicationManager& application_manager)
+ : RequestToHMI(message, application_manager) {}
-NaviIsReadyRequest::~NaviIsReadyRequest() {
-}
+NaviIsReadyRequest::~NaviIsReadyRequest() {}
void NaviIsReadyRequest::Run() {
LOG4CXX_AUTO_TRACE(logger_);
@@ -52,4 +51,3 @@ void NaviIsReadyRequest::Run() {
} // 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
index 2b4a838ebe..129900c60f 100644
--- 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
@@ -31,17 +31,15 @@
*/
#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(
+ const MessageSharedPtr& message, ApplicationManager& application_manager)
+ : ResponseFromHMI(message, application_manager) {}
-NaviIsReadyResponse::~NaviIsReadyResponse() {
-}
+NaviIsReadyResponse::~NaviIsReadyResponse() {}
void NaviIsReadyResponse::Run() {
LOG4CXX_AUTO_TRACE(logger_);
@@ -52,8 +50,7 @@ void NaviIsReadyResponse::Run() {
is_available = object[strings::msg_params][strings::available].asBool();
}
- HMICapabilities& hmi_capabilities =
- application_manager_.hmi_capabilities();
+ HMICapabilities& hmi_capabilities = application_manager_.hmi_capabilities();
hmi_capabilities.set_is_navi_cooperating(is_available);
}
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
index 2b9ffe1bcf..ad878033ca 100644
--- 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
@@ -36,12 +36,11 @@ namespace application_manager {
namespace commands {
-NaviSendLocationRequest::NaviSendLocationRequest(const MessageSharedPtr& message, ApplicationManager& application_manager)
- : RequestToHMI(message, application_manager) {
-}
+NaviSendLocationRequest::NaviSendLocationRequest(
+ const MessageSharedPtr& message, ApplicationManager& application_manager)
+ : RequestToHMI(message, application_manager) {}
-NaviSendLocationRequest::~NaviSendLocationRequest() {
-}
+NaviSendLocationRequest::~NaviSendLocationRequest() {}
void NaviSendLocationRequest::Run() {
LOG4CXX_AUTO_TRACE(logger_);
@@ -52,4 +51,3 @@ void NaviSendLocationRequest::Run() {
} // 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
index 2126dd5a99..a3d9f4c9e5 100644
--- 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
@@ -32,17 +32,15 @@
#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(
+ const MessageSharedPtr& message, ApplicationManager& application_manager)
+ : ResponseFromHMI(message, application_manager) {}
-NaviSendLocationResponse::~NaviSendLocationResponse() {
-}
+NaviSendLocationResponse::~NaviSendLocationResponse() {}
void NaviSendLocationResponse::Run() {
LOG4CXX_AUTO_TRACE(logger_);
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
index 551220a832..a92ef07d12 100644
--- 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
@@ -37,11 +37,10 @@ namespace application_manager {
namespace commands {
NaviShowConstantTBTRequest::NaviShowConstantTBTRequest(
- const MessageSharedPtr& message, ApplicationManager& application_manager) : RequestToHMI(message, application_manager) {
-}
+ const MessageSharedPtr& message, ApplicationManager& application_manager)
+ : RequestToHMI(message, application_manager) {}
-NaviShowConstantTBTRequest::~NaviShowConstantTBTRequest() {
-}
+NaviShowConstantTBTRequest::~NaviShowConstantTBTRequest() {}
void NaviShowConstantTBTRequest::Run() {
LOG4CXX_AUTO_TRACE(logger_);
@@ -52,4 +51,3 @@ void NaviShowConstantTBTRequest::Run() {
} // 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
index 221403bf6c..ede3272e8e 100644
--- 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
@@ -39,11 +39,10 @@ namespace application_manager {
namespace commands {
NaviShowConstantTBTResponse::NaviShowConstantTBTResponse(
- const MessageSharedPtr& message, ApplicationManager& application_manager) : ResponseFromHMI(message, application_manager) {
-}
+ const MessageSharedPtr& message, ApplicationManager& application_manager)
+ : ResponseFromHMI(message, application_manager) {}
-NaviShowConstantTBTResponse::~NaviShowConstantTBTResponse() {
-}
+NaviShowConstantTBTResponse::~NaviShowConstantTBTResponse() {}
void NaviShowConstantTBTResponse::Run() {
LOG4CXX_AUTO_TRACE(logger_);
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
index 71a129c2d7..f0104cbaee 100644
--- 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
@@ -35,27 +35,26 @@
#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) {
+ : 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_);
+ LOG4CXX_DEBUG(logger_,
+ "default_timeout_ = " << default_timeout_
+ << "; retry_number_ = " << retry_number_);
}
-NaviStartStreamRequest::~NaviStartStreamRequest() {
-}
+NaviStartStreamRequest::~NaviStartStreamRequest() {}
void NaviStartStreamRequest::Run() {
LOG4CXX_AUTO_TRACE(logger_);
@@ -64,14 +63,15 @@ void NaviStartStreamRequest::Run() {
subscribe_on_event(hmi_apis::FunctionID::Navigation_StartStream,
correlation_id());
- ApplicationSharedPtr app = application_manager_.
- application_by_hmi_app(application_id());
+ ApplicationSharedPtr app =
+ application_manager_.application_by_hmi_app(application_id());
if (app) {
app->set_video_streaming_allowed(true);
SendRequest();
} else {
- LOG4CXX_ERROR(logger_, "Applcation with hmi_app_id "
- << application_id() << "does not exist");
+ LOG4CXX_ERROR(logger_,
+ "Applcation with hmi_app_id " << application_id()
+ << "does not exist");
}
}
@@ -79,11 +79,11 @@ 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());
+ ApplicationSharedPtr app =
+ application_manager_.application_by_hmi_app(application_id());
if (!app) {
LOG4CXX_ERROR(logger_,
- "NaviStartStreamRequest aborted. Application not found");
+ "NaviStartStreamRequest aborted. Application not found");
return;
}
@@ -98,12 +98,13 @@ void NaviStartStreamRequest::on_event(const event_engine::Event& event) {
if (hmi_apis::Common_Result::SUCCESS == code) {
LOG4CXX_INFO(logger_, "NaviStartStreamResponse SUCCESS");
- if (application_manager_.
- HMILevelAllowsStreaming(app->app_id(), ServiceType::kMobileNav)) {
+ 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");
+ LOG4CXX_DEBUG(
+ logger_,
+ "NaviStartStreamRequest aborted. Application can not stream");
}
break;
}
@@ -114,7 +115,7 @@ void NaviStartStreamRequest::on_event(const event_engine::Event& event) {
}
}
default: {
- LOG4CXX_ERROR(logger_,"Received unknown event" << event.id());
+ LOG4CXX_ERROR(logger_, "Received unknown event" << event.id());
return;
}
}
@@ -123,18 +124,17 @@ void NaviStartStreamRequest::on_event(const event_engine::Event& event) {
void NaviStartStreamRequest::onTimeOut() {
RetryStartSession();
- application_manager_.TerminateRequest(
- connection_key(), correlation_id());
+ application_manager_.TerminateRequest(connection_key(), correlation_id());
}
void NaviStartStreamRequest::RetryStartSession() {
LOG4CXX_AUTO_TRACE(logger_);
- ApplicationSharedPtr app = application_manager_.
- application_by_hmi_app(application_id());
+ ApplicationSharedPtr app =
+ application_manager_.application_by_hmi_app(application_id());
if (!app) {
LOG4CXX_ERROR(logger_,
- "NaviStartStreamRequest aborted. Application not found");
+ "NaviStartStreamRequest aborted. Application not found");
return;
}
@@ -144,21 +144,24 @@ void NaviStartStreamRequest::RetryStartSession() {
}
if (app->video_streaming_approved()) {
- LOG4CXX_INFO(logger_, "NaviStartStream retry sequence stopped. "
- << "SUCCESS received");
+ 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();
if (curr_retry_number < retry_number_ - 1) {
- LOG4CXX_DEBUG(logger_, "Send NaviStartStream retry. retry_number = "
- << curr_retry_number);
+ LOG4CXX_DEBUG(
+ logger_,
+ "Send NaviStartStream retry. retry_number = " << curr_retry_number);
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");
+ LOG4CXX_DEBUG(logger_,
+ "NaviStartStream retry sequence stopped. "
+ << "Attempts expired");
application_manager_.EndNaviServices(app->app_id());
}
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
index 02efc77e1e..b0b9e672c3 100644
--- 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
@@ -31,17 +31,15 @@
*/
#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(
+ const MessageSharedPtr& message, ApplicationManager& application_manager)
+ : ResponseFromHMI(message, application_manager) {}
-NaviStartStreamResponse::~NaviStartStreamResponse() {
-}
+NaviStartStreamResponse::~NaviStartStreamResponse() {}
void NaviStartStreamResponse::Run() {
LOG4CXX_AUTO_TRACE(logger_);
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
index 0c72f24845..4b72ff28b4 100644
--- 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
@@ -6,11 +6,9 @@ namespace commands {
NaviStopStreamRequest::NaviStopStreamRequest(
const MessageSharedPtr& message, ApplicationManager& application_manager)
- : RequestToHMI(message, application_manager) {
-}
+ : RequestToHMI(message, application_manager) {}
-NaviStopStreamRequest::~NaviStopStreamRequest() {
-}
+NaviStopStreamRequest::~NaviStopStreamRequest() {}
void NaviStopStreamRequest::Run() {
LOG4CXX_AUTO_TRACE(logger_);
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
index a10eb5d325..3a7fc75260 100644
--- 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
@@ -35,16 +35,14 @@ namespace application_manager {
namespace commands {
-NaviStopStreamResponse::NaviStopStreamResponse(const MessageSharedPtr& message, ApplicationManager& application_manager)
- : ResponseFromHMI(message, application_manager) {
-}
+NaviStopStreamResponse::NaviStopStreamResponse(
+ const MessageSharedPtr& message, ApplicationManager& application_manager)
+ : ResponseFromHMI(message, application_manager) {}
-NaviStopStreamResponse::~NaviStopStreamResponse() {
-}
+NaviStopStreamResponse::~NaviStopStreamResponse() {}
void NaviStopStreamResponse::Run() {
LOG4CXX_AUTO_TRACE(logger_);
-
}
} // namespace commands
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
index 0f5ebfb1a2..f641051560 100644
--- 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
@@ -39,7 +39,7 @@ namespace application_manager {
namespace commands {
NaviSubscribeWayPointsResponse::NaviSubscribeWayPointsResponse(
- const MessageSharedPtr &message, ApplicationManager& application_manager)
+ const MessageSharedPtr& message, ApplicationManager& application_manager)
: ResponseFromHMI(message, application_manager) {}
NaviSubscribeWayPointsResponse::~NaviSubscribeWayPointsResponse() {}
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
index a0c82135d9..61216321e8 100644
--- 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
@@ -40,7 +40,7 @@ namespace application_manager {
namespace commands {
NaviUnsubscribeWayPointsResponse::NaviUnsubscribeWayPointsResponse(
- const MessageSharedPtr &message, ApplicationManager& application_manager)
+ const MessageSharedPtr& message, ApplicationManager& application_manager)
: ResponseFromHMI(message, application_manager) {}
NaviUnsubscribeWayPointsResponse::~NaviUnsubscribeWayPointsResponse() {}
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
index dd0e8a78f4..c37c3d12f9 100644
--- 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
@@ -37,11 +37,10 @@ namespace application_manager {
namespace commands {
NaviUpdateTurnListRequest::NaviUpdateTurnListRequest(
- const MessageSharedPtr& message, ApplicationManager& application_manager) : RequestToHMI(message, application_manager) {
-}
+ const MessageSharedPtr& message, ApplicationManager& application_manager)
+ : RequestToHMI(message, application_manager) {}
-NaviUpdateTurnListRequest::~NaviUpdateTurnListRequest() {
-}
+NaviUpdateTurnListRequest::~NaviUpdateTurnListRequest() {}
void NaviUpdateTurnListRequest::Run() {
LOG4CXX_AUTO_TRACE(logger_);
@@ -52,4 +51,3 @@ void NaviUpdateTurnListRequest::Run() {
} // 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
index c932e6756d..faf5719d05 100644
--- 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
@@ -39,11 +39,10 @@ namespace application_manager {
namespace commands {
NaviUpdateTurnListResponse::NaviUpdateTurnListResponse(
- const MessageSharedPtr& message, ApplicationManager& application_manager) : ResponseFromHMI(message, application_manager) {
-}
+ const MessageSharedPtr& message, ApplicationManager& application_manager)
+ : ResponseFromHMI(message, application_manager) {}
-NaviUpdateTurnListResponse::~NaviUpdateTurnListResponse() {
-}
+NaviUpdateTurnListResponse::~NaviUpdateTurnListResponse() {}
void NaviUpdateTurnListResponse::Run() {
LOG4CXX_AUTO_TRACE(logger_);
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
index 831d0dcc89..64eb63fde8 100644
--- a/src/components/application_manager/src/commands/hmi/notification_from_hmi.cc
+++ b/src/components/application_manager/src/commands/hmi/notification_from_hmi.cc
@@ -45,8 +45,7 @@ NotificationFromHMI::NotificationFromHMI(
ReplaceHMIByMobileAppId(*message);
}
-NotificationFromHMI::~NotificationFromHMI() {
-}
+NotificationFromHMI::~NotificationFromHMI() {}
bool NotificationFromHMI::Init() {
return true;
@@ -56,12 +55,10 @@ bool NotificationFromHMI::CleanUp() {
return true;
}
-void NotificationFromHMI::Run() {
-}
+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);
@@ -70,7 +67,6 @@ void NotificationFromHMI::SendNotificationToMobile(
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.");
@@ -78,7 +74,8 @@ void NotificationFromHMI::CreateHMIRequest(
}
// get hmi correlation id for chaining further request from this object
- const uint32_t hmi_correlation_id_ = application_manager_.GetNextHMICorrelationID();
+ const uint32_t hmi_correlation_id_ =
+ application_manager_.GetNextHMICorrelationID();
NsSmartDeviceLink::NsSmartObjects::SmartObject& request = *result;
request[strings::params][strings::message_type] =
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
index 635b0c8ac0..f1e933b7ef 100644
--- a/src/components/application_manager/src/commands/hmi/notification_to_hmi.cc
+++ b/src/components/application_manager/src/commands/hmi/notification_to_hmi.cc
@@ -44,8 +44,7 @@ NotificationToHMI::NotificationToHMI(const MessageSharedPtr& message,
ReplaceMobileByHMIAppId(*(message.get()));
}
-NotificationToHMI::~NotificationToHMI() {
-}
+NotificationToHMI::~NotificationToHMI() {}
bool NotificationToHMI::Init() {
return true;
@@ -55,8 +54,7 @@ bool NotificationToHMI::CleanUp() {
return true;
}
-void NotificationToHMI::Run() {
-}
+void NotificationToHMI::Run() {}
void NotificationToHMI::SendNotification() {
(*message_)[strings::params][strings::protocol_type] = hmi_protocol_type_;
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
index 28e185d9da..70e5e7cefd 100644
--- 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
@@ -40,8 +40,7 @@ namespace commands {
OnAllowSDLFunctionalityNotification::OnAllowSDLFunctionalityNotification(
const MessageSharedPtr& message, ApplicationManager& application_manager)
- : NotificationFromHMI(message, application_manager) {
-}
+ : NotificationFromHMI(message, application_manager) {}
OnAllowSDLFunctionalityNotification::~OnAllowSDLFunctionalityNotification() {}
@@ -49,8 +48,7 @@ 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();
+ device_id = (*message_)[strings::msg_params]["device"]["id"].asString();
}
application_manager_.GetPolicyHandler().OnAllowSDLFunctionalityNotification(
(*message_)[strings::msg_params][hmi_response::allowed].asBool(),
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
index fdbb6169ca..76252a50fd 100644
--- 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
@@ -41,15 +41,14 @@ namespace commands {
OnAppActivatedNotification::OnAppActivatedNotification(
const MessageSharedPtr& message, ApplicationManager& application_manager)
- : NotificationFromHMI(message, application_manager) {
-}
+ : NotificationFromHMI(message, application_manager) {}
-OnAppActivatedNotification::~OnAppActivatedNotification() {
-}
+OnAppActivatedNotification::~OnAppActivatedNotification() {}
void OnAppActivatedNotification::Run() {
LOG4CXX_AUTO_TRACE(logger_);
- event_engine::Event event(hmi_apis::FunctionID::BasicCommunication_OnAppActivated);
+ event_engine::Event event(
+ hmi_apis::FunctionID::BasicCommunication_OnAppActivated);
event.set_smart_object(*message_);
event.raise(application_manager_.event_dispatcher());
}
@@ -57,4 +56,3 @@ void OnAppActivatedNotification::Run() {
} // 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
index e3ee21c77e..86ce6a830c 100644
--- 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
@@ -43,15 +43,14 @@ namespace commands {
OnAppDeactivatedNotification::OnAppDeactivatedNotification(
const MessageSharedPtr& message, ApplicationManager& application_manager)
- : NotificationFromHMI(message, application_manager) {
-}
+ : NotificationFromHMI(message, application_manager) {}
-OnAppDeactivatedNotification::~OnAppDeactivatedNotification() {
-}
+OnAppDeactivatedNotification::~OnAppDeactivatedNotification() {}
void OnAppDeactivatedNotification::Run() {
LOG4CXX_AUTO_TRACE(logger_);
- event_engine::Event event(hmi_apis::FunctionID::BasicCommunication_OnAppDeactivated);
+ event_engine::Event event(
+ hmi_apis::FunctionID::BasicCommunication_OnAppDeactivated);
event.set_smart_object(*message_);
event.raise(application_manager_.event_dispatcher());
}
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
index a5f4ced9a5..fa7293513a 100644
--- 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
@@ -38,11 +38,9 @@ namespace commands {
OnAppPermissionChangedNotification::OnAppPermissionChangedNotification(
const MessageSharedPtr& message, ApplicationManager& application_manager)
- : NotificationToHMI(message, application_manager) {
-}
+ : NotificationToHMI(message, application_manager) {}
-OnAppPermissionChangedNotification::~OnAppPermissionChangedNotification() {
-}
+OnAppPermissionChangedNotification::~OnAppPermissionChangedNotification() {}
void OnAppPermissionChangedNotification::Run() {
LOG4CXX_AUTO_TRACE(logger_);
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
index 7cc5133ba2..0efc1aee8a 100644
--- 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
@@ -40,12 +40,11 @@ namespace application_manager {
namespace commands {
-OnAppPermissionConsentNotification::OnAppPermissionConsentNotification(const MessageSharedPtr& message, ApplicationManager& application_manager)
- : NotificationFromHMI(message, application_manager) {
-}
+OnAppPermissionConsentNotification::OnAppPermissionConsentNotification(
+ const MessageSharedPtr& message, ApplicationManager& application_manager)
+ : NotificationFromHMI(message, application_manager) {}
-OnAppPermissionConsentNotification::~OnAppPermissionConsentNotification() {
-}
+OnAppPermissionConsentNotification::~OnAppPermissionConsentNotification() {}
void OnAppPermissionConsentNotification::Run() {
LOG4CXX_AUTO_TRACE(logger_);
@@ -81,11 +80,10 @@ void OnAppPermissionConsentNotification::Run() {
permission_consent.group_permissions.push_back(permissions);
}
- permission_consent.consent_source =
- msg_params["source"].asString();
+ permission_consent.consent_source = msg_params["source"].asString();
- application_manager_.GetPolicyHandler().OnAppPermissionConsent(connection_key,
- permission_consent);
+ application_manager_.GetPolicyHandler().OnAppPermissionConsent(
+ connection_key, permission_consent);
}
}
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
index 944917d90b..a97e19b556 100644
--- 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
@@ -32,24 +32,23 @@
#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) {
-}
+ const MessageSharedPtr& message, ApplicationManager& application_manager)
+ : NotificationToHMI(message, application_manager) {}
-OnAppRegisteredNotification::~OnAppRegisteredNotification() {
-}
+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_engine::Event event(
+ hmi_apis::FunctionID::BasicCommunication_OnAppRegistered);
event.set_smart_object(*message_);
event.raise(application_manager_.event_dispatcher());
}
@@ -57,4 +56,3 @@ void OnAppRegisteredNotification::Run() {
} // 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
index 1b22a3ec38..10ea1ea303 100644
--- 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
@@ -39,17 +39,17 @@ namespace application_manager {
namespace commands {
OnAppUnregisteredNotification::OnAppUnregisteredNotification(
- const MessageSharedPtr& message, ApplicationManager& application_manager) : NotificationToHMI(message, application_manager) {
-}
+ const MessageSharedPtr& message, ApplicationManager& application_manager)
+ : NotificationToHMI(message, application_manager) {}
-OnAppUnregisteredNotification::~OnAppUnregisteredNotification() {
-}
+OnAppUnregisteredNotification::~OnAppUnregisteredNotification() {}
void OnAppUnregisteredNotification::Run() {
LOG4CXX_AUTO_TRACE(logger_);
- //sending event for delete VRCommand on PerformInteraction
- event_engine::Event event(hmi_apis::FunctionID::BasicCommunication_OnAppUnregistered);
+ // 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());
@@ -59,4 +59,3 @@ void OnAppUnregisteredNotification::Run() {
} // 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
index 76cf3c9199..c3e81bdc30 100644
--- 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
@@ -38,11 +38,9 @@ namespace commands {
OnAudioDataStreamingNotification::OnAudioDataStreamingNotification(
const MessageSharedPtr& message, ApplicationManager& application_manager)
- : NotificationToHMI(message, application_manager) {
-}
+ : NotificationToHMI(message, application_manager) {}
-OnAudioDataStreamingNotification::~OnAudioDataStreamingNotification() {
-}
+OnAudioDataStreamingNotification::~OnAudioDataStreamingNotification() {}
void OnAudioDataStreamingNotification::Run() {
LOG4CXX_AUTO_TRACE(logger_);
@@ -52,4 +50,3 @@ void OnAudioDataStreamingNotification::Run() {
} // 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
index c82529b0b8..fc8d5989a1 100644
--- 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
@@ -42,8 +42,8 @@ namespace commands {
namespace hmi {
OnButtonEventNotification::OnButtonEventNotification(
- const MessageSharedPtr& message, ApplicationManager& application_manager) : NotificationFromHMI(message, application_manager) {
-}
+ const MessageSharedPtr& message, ApplicationManager& application_manager)
+ : NotificationFromHMI(message, application_manager) {}
void OnButtonEventNotification::Run() {
LOG4CXX_AUTO_TRACE(logger_);
@@ -59,4 +59,3 @@ void OnButtonEventNotification::Run() {
} // 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
index 567b243638..abff87c962 100644
--- 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
@@ -43,8 +43,8 @@ namespace commands {
namespace hmi {
OnButtonPressNotification::OnButtonPressNotification(
- const MessageSharedPtr& message, ApplicationManager& application_manager) : NotificationFromHMI(message, application_manager) {
-}
+ const MessageSharedPtr& message, ApplicationManager& application_manager)
+ : NotificationFromHMI(message, application_manager) {}
void OnButtonPressNotification::Run() {
LOG4CXX_AUTO_TRACE(logger_);
@@ -61,4 +61,3 @@ void OnButtonPressNotification::Run() {
} // 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
index a8e8968e20..aae994ea34 100644
--- 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
@@ -39,11 +39,10 @@ namespace commands {
namespace hmi {
OnButtonSubscriptionNotification::OnButtonSubscriptionNotification(
- const MessageSharedPtr& message, ApplicationManager& application_manager) : NotificationToHMI(message, application_manager) {
-}
+ const MessageSharedPtr& message, ApplicationManager& application_manager)
+ : NotificationToHMI(message, application_manager) {}
-OnButtonSubscriptionNotification::~OnButtonSubscriptionNotification() {
-}
+OnButtonSubscriptionNotification::~OnButtonSubscriptionNotification() {}
void OnButtonSubscriptionNotification::Run() {
LOG4CXX_AUTO_TRACE(logger_);
@@ -56,4 +55,3 @@ void OnButtonSubscriptionNotification::Run() {
} // 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
index d541360148..83ec785a9d 100644
--- 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
@@ -32,17 +32,15 @@
#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) {
-}
+ const MessageSharedPtr& message, ApplicationManager& application_manager)
+ : NotificationFromHMI(message, application_manager) {}
-OnDeviceChosenNotification::~OnDeviceChosenNotification() {
-}
+OnDeviceChosenNotification::~OnDeviceChosenNotification() {}
void OnDeviceChosenNotification::Run() {
LOG4CXX_AUTO_TRACE(logger_);
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
index 5247c0686e..346c05032b 100644
--- 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
@@ -79,9 +79,8 @@ namespace application_manager {
namespace commands {
OnDeviceStateChangedNotification::OnDeviceStateChangedNotification(
- const MessageSharedPtr& message, ApplicationManager& application_manager)
- : NotificationFromHMI(message, application_manager) {
-}
+ const MessageSharedPtr& message, ApplicationManager& application_manager)
+ : NotificationFromHMI(message, application_manager) {}
OnDeviceStateChangedNotification::~OnDeviceStateChangedNotification() {}
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
index c5bf69afae..4c322c456f 100644
--- 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
@@ -45,19 +45,16 @@ namespace hmi {
OnDriverDistractionNotification::OnDriverDistractionNotification(
const MessageSharedPtr& message, ApplicationManager& application_manager)
- : NotificationFromHMI(message, application_manager) {
-}
+ : NotificationFromHMI(message, application_manager) {}
-OnDriverDistractionNotification::~OnDriverDistractionNotification() {
-}
+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());
+ (*message_)[strings::msg_params][hmi_notification::state].asInt());
application_manager_.set_driver_distraction(state);
smart_objects::SmartObjectSPtr on_driver_distraction =
@@ -81,8 +78,8 @@ void OnDriverDistractionNotification::Run() {
for (; applications.end() != it; ++it) {
const ApplicationSharedPtr app = *it;
if (app) {
- (*on_driver_distraction)[strings::params]
- [strings::connection_key] = app->app_id();
+ (*on_driver_distraction)[strings::params][strings::connection_key] =
+ app->app_id();
SendNotificationToMobile(on_driver_distraction);
}
}
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
index 02fe73bf4f..c211ffde50 100644
--- 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
@@ -32,22 +32,20 @@
#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) {
-}
+ : NotificationFromHMI(message, application_manager) {}
-OnEventChangedNotification::~OnEventChangedNotification() {
-}
+OnEventChangedNotification::~OnEventChangedNotification() {}
void OnEventChangedNotification::Run() {
LOG4CXX_AUTO_TRACE(logger_);
- event_engine::Event event(hmi_apis::FunctionID::BasicCommunication_OnEventChanged);
+ event_engine::Event event(
+ hmi_apis::FunctionID::BasicCommunication_OnEventChanged);
event.set_smart_object(*message_);
event.raise(application_manager_.event_dispatcher());
}
@@ -55,4 +53,3 @@ void OnEventChangedNotification::Run() {
} // 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
index 62ddbc573e..682093cef9 100644
--- 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
@@ -40,18 +40,15 @@
#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) {
-}
+ : NotificationFromHMI(message, application_manager) {}
-OnExitAllApplicationsNotification::~OnExitAllApplicationsNotification() {
-}
+OnExitAllApplicationsNotification::~OnExitAllApplicationsNotification() {}
void OnExitAllApplicationsNotification::Run() {
LOG4CXX_AUTO_TRACE(logger_);
@@ -81,7 +78,7 @@ void OnExitAllApplicationsNotification::Run() {
SendOnSDLPersistenceComplete();
return;
}
- default : {
+ default: {
LOG4CXX_ERROR(logger_, "Unknown Application close reason" << reason);
return;
}
@@ -90,7 +87,8 @@ void OnExitAllApplicationsNotification::Run() {
application_manager_.SetUnregisterAllApplicationsReason(mob_reason);
if (mobile_api::AppInterfaceUnregisteredReason::MASTER_RESET == mob_reason ||
- mobile_api::AppInterfaceUnregisteredReason::FACTORY_DEFAULTS == mob_reason) {
+ mobile_api::AppInterfaceUnregisteredReason::FACTORY_DEFAULTS ==
+ mob_reason) {
application_manager_.HeadUnitReset(mob_reason);
}
kill(getpid(), SIGINT);
@@ -103,14 +101,14 @@ void OnExitAllApplicationsNotification::SendOnSDLPersistenceComplete() {
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::message_type] =
+ MessageType::kNotification;
(*message)[strings::params][strings::correlation_id] =
application_manager_.GetNextHMICorrelationID();
- application_manager_.ManageHMICommand(message);
+ 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
index 4186036b02..a7b6b9a2cd 100644
--- 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
@@ -43,11 +43,10 @@ namespace application_manager {
namespace commands {
OnExitApplicationNotification::OnExitApplicationNotification(
- const MessageSharedPtr& message, ApplicationManager& application_manager) : NotificationFromHMI(message, application_manager) {
-}
+ const MessageSharedPtr& message, ApplicationManager& application_manager)
+ : NotificationFromHMI(message, application_manager) {}
-OnExitApplicationNotification::~OnExitApplicationNotification() {
-}
+OnExitApplicationNotification::~OnExitApplicationNotification() {}
void OnExitApplicationNotification::Run() {
LOG4CXX_AUTO_TRACE(logger_);
@@ -64,8 +63,8 @@ void OnExitApplicationNotification::Run() {
}
Common_ApplicationExitReason::eType reason;
- reason = static_cast<Common_ApplicationExitReason::eType>
- ((*message_)[strings::msg_params][strings::reason].asInt());
+ reason = static_cast<Common_ApplicationExitReason::eType>(
+ (*message_)[strings::msg_params][strings::reason].asInt());
switch (reason) {
case Common_ApplicationExitReason::DRIVER_DISTRACTION_VIOLATION: {
@@ -80,15 +79,19 @@ void OnExitApplicationNotification::Run() {
break;
}
case Common_ApplicationExitReason::UNAUTHORIZED_TRANSPORT_REGISTRATION: {
- application_manager_.ManageMobileCommand(MessageHelper::GetOnAppInterfaceUnregisteredNotificationToMobile(
- app_id, AppInterfaceUnregisteredReason::APP_UNAUTHORIZED), commands::Command::ORIGIN_SDL);
+ 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_.ManageMobileCommand(
+ MessageHelper::GetOnAppInterfaceUnregisteredNotificationToMobile(
+ app_id, AppInterfaceUnregisteredReason::UNSUPPORTED_HMI_RESOURCE),
+ commands::Command::ORIGIN_SDL);
application_manager_.UnregisterApplication(app_id, Result::SUCCESS);
return;
}
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
index 9977da6df1..e69d111d2c 100644
--- 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
@@ -32,17 +32,15 @@
#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) {
-}
+ const MessageSharedPtr& message, ApplicationManager& application_manager)
+ : NotificationToHMI(message, application_manager) {}
-OnFileRemovedNotification::~OnFileRemovedNotification() {
-}
+OnFileRemovedNotification::~OnFileRemovedNotification() {}
void OnFileRemovedNotification::Run() {
LOG4CXX_AUTO_TRACE(logger_);
@@ -53,4 +51,3 @@ void OnFileRemovedNotification::Run() {
} // 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
index e572e7bd2f..9d3633ba6d 100644
--- a/src/components/application_manager/src/commands/hmi/on_find_applications.cc
+++ b/src/components/application_manager/src/commands/hmi/on_find_applications.cc
@@ -36,12 +36,11 @@ namespace application_manager {
namespace commands {
-OnFindApplications::OnFindApplications(const MessageSharedPtr& message, ApplicationManager& application_manager)
- : NotificationFromHMI(message, application_manager) {
-}
+OnFindApplications::OnFindApplications(const MessageSharedPtr& message,
+ ApplicationManager& application_manager)
+ : NotificationFromHMI(message, application_manager) {}
-OnFindApplications::~OnFindApplications() {
-}
+OnFindApplications::~OnFindApplications() {}
void OnFindApplications::Run() {
LOG4CXX_AUTO_TRACE(logger_);
@@ -52,4 +51,3 @@ void OnFindApplications::Run() {
} // 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
index 126869a2ec..8c772d6dcd 100644
--- 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
@@ -39,11 +39,9 @@ namespace commands {
OnIgnitionCycleOverNotification::OnIgnitionCycleOverNotification(
const MessageSharedPtr& message, ApplicationManager& application_manager)
- : NotificationFromHMI(message, application_manager) {
-}
+ : NotificationFromHMI(message, application_manager) {}
-OnIgnitionCycleOverNotification::~OnIgnitionCycleOverNotification() {
-}
+OnIgnitionCycleOverNotification::~OnIgnitionCycleOverNotification() {}
void OnIgnitionCycleOverNotification::Run() {
LOG4CXX_AUTO_TRACE(logger_);
@@ -53,4 +51,3 @@ void OnIgnitionCycleOverNotification::Run() {
} // 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
index 36c63002b6..e25de1f3a9 100644
--- 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
@@ -39,11 +39,9 @@ namespace commands {
OnNaviTBTClientStateNotification::OnNaviTBTClientStateNotification(
const MessageSharedPtr& message, ApplicationManager& application_manager)
- : NotificationFromHMI(message, application_manager) {
-}
+ : NotificationFromHMI(message, application_manager) {}
-OnNaviTBTClientStateNotification::~OnNaviTBTClientStateNotification() {
-}
+OnNaviTBTClientStateNotification::~OnNaviTBTClientStateNotification() {}
void OnNaviTBTClientStateNotification::Run() {
LOG4CXX_AUTO_TRACE(logger_);
@@ -58,4 +56,3 @@ void OnNaviTBTClientStateNotification::Run() {
} // 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
index 2a28775c5b..17d1b420be 100644
--- 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
@@ -38,11 +38,9 @@ namespace commands {
OnNaviWayPointChangeNotification::OnNaviWayPointChangeNotification(
const MessageSharedPtr& message, ApplicationManager& app_man)
- : NotificationFromHMI(message, app_man) {
-}
+ : NotificationFromHMI(message, app_man) {}
-OnNaviWayPointChangeNotification::~OnNaviWayPointChangeNotification() {
-}
+OnNaviWayPointChangeNotification::~OnNaviWayPointChangeNotification() {}
void OnNaviWayPointChangeNotification::Run() {
LOG4CXX_AUTO_TRACE(logger_);
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
index 34010cbd61..39b179f967 100644
--- a/src/components/application_manager/src/commands/hmi/on_policy_update.cc
+++ b/src/components/application_manager/src/commands/hmi/on_policy_update.cc
@@ -36,12 +36,11 @@
namespace application_manager {
namespace commands {
-OnPolicyUpdate::OnPolicyUpdate(const MessageSharedPtr& message, ApplicationManager& application_manager)
- : NotificationFromHMI(message, application_manager) {
-}
+OnPolicyUpdate::OnPolicyUpdate(const MessageSharedPtr& message,
+ ApplicationManager& application_manager)
+ : NotificationFromHMI(message, application_manager) {}
-OnPolicyUpdate::~OnPolicyUpdate() {
-}
+OnPolicyUpdate::~OnPolicyUpdate() {}
void OnPolicyUpdate::Run() {
LOG4CXX_AUTO_TRACE(logger_);
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
index 24970510c7..596b7d4549 100644
--- 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
@@ -39,11 +39,9 @@ namespace commands {
OnPutFileNotification::OnPutFileNotification(
const MessageSharedPtr& message, ApplicationManager& application_manager)
- : NotificationToHMI(message, application_manager) {
-}
+ : NotificationToHMI(message, application_manager) {}
-OnPutFileNotification::~OnPutFileNotification() {
-}
+OnPutFileNotification::~OnPutFileNotification() {}
void OnPutFileNotification::Run() {
LOG4CXX_AUTO_TRACE(logger_);
@@ -53,4 +51,3 @@ void OnPutFileNotification::Run() {
} // 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
index 0f3798a065..3a45e0f934 100644
--- a/src/components/application_manager/src/commands/hmi/on_ready_notification.cc
+++ b/src/components/application_manager/src/commands/hmi/on_ready_notification.cc
@@ -32,17 +32,15 @@
#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(
+ const MessageSharedPtr& message, ApplicationManager& application_manager)
+ : NotificationFromHMI(message, application_manager) {}
-OnReadyNotification::~OnReadyNotification() {
-}
+OnReadyNotification::~OnReadyNotification() {}
void OnReadyNotification::Run() {
LOG4CXX_AUTO_TRACE(logger_);
@@ -56,4 +54,3 @@ void OnReadyNotification::Run() {
} // 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
index a40843c3bf..ee7da70ede 100644
--- 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
@@ -39,12 +39,11 @@ namespace application_manager {
namespace commands {
-OnReceivedPolicyUpdate::OnReceivedPolicyUpdate(const MessageSharedPtr& message, ApplicationManager& application_manager)
- : NotificationFromHMI(message, application_manager) {
-}
+OnReceivedPolicyUpdate::OnReceivedPolicyUpdate(
+ const MessageSharedPtr& message, ApplicationManager& application_manager)
+ : NotificationFromHMI(message, application_manager) {}
-OnReceivedPolicyUpdate::~OnReceivedPolicyUpdate() {
-}
+OnReceivedPolicyUpdate::~OnReceivedPolicyUpdate() {}
void OnReceivedPolicyUpdate::Run() {
LOG4CXX_AUTO_TRACE(logger_);
@@ -55,7 +54,8 @@ void OnReceivedPolicyUpdate::Run() {
LOG4CXX_ERROR(logger_, "Failed to read Update file.");
return;
}
- application_manager_.GetPolicyHandler().ReceiveMessageFromSDK(file_path, file_content);
+ application_manager_.GetPolicyHandler().ReceiveMessageFromSDK(file_path,
+ file_content);
}
} // namespace commands
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
index 45cb9f543b..4d126ac67d 100644
--- 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
@@ -32,17 +32,15 @@
#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) {
-}
+ const MessageSharedPtr& message, ApplicationManager& application_manager)
+ : NotificationToHMI(message, application_manager) {}
-OnRecordStartdNotification::~OnRecordStartdNotification() {
-}
+OnRecordStartdNotification::~OnRecordStartdNotification() {}
void OnRecordStartdNotification::Run() {
LOG4CXX_AUTO_TRACE(logger_);
@@ -53,4 +51,3 @@ void OnRecordStartdNotification::Run() {
} // 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
index 2e88575866..ce3c371cf8 100644
--- 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
@@ -39,11 +39,9 @@ namespace commands {
OnResumeAudioSourceNotification::OnResumeAudioSourceNotification(
const MessageSharedPtr& message, ApplicationManager& application_manager)
- : NotificationToHMI(message, application_manager) {
-}
+ : NotificationToHMI(message, application_manager) {}
-OnResumeAudioSourceNotification::~OnResumeAudioSourceNotification() {
-}
+OnResumeAudioSourceNotification::~OnResumeAudioSourceNotification() {}
void OnResumeAudioSourceNotification::Run() {
LOG4CXX_AUTO_TRACE(logger_);
@@ -53,4 +51,3 @@ void OnResumeAudioSourceNotification::Run() {
} // 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
index 35baa40707..0517ea8d24 100644
--- 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
@@ -37,11 +37,10 @@ namespace application_manager {
namespace commands {
OnSDLCloseNotification::OnSDLCloseNotification(
- const MessageSharedPtr& message, ApplicationManager& application_manager) : NotificationToHMI(message, application_manager) {
-}
+ const MessageSharedPtr& message, ApplicationManager& application_manager)
+ : NotificationToHMI(message, application_manager) {}
-OnSDLCloseNotification::~OnSDLCloseNotification() {
-}
+OnSDLCloseNotification::~OnSDLCloseNotification() {}
void OnSDLCloseNotification::Run() {
LOG4CXX_AUTO_TRACE(logger_);
@@ -52,4 +51,3 @@ void OnSDLCloseNotification::Run() {
} // 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
index b7e363798d..a9c36813f6 100644
--- 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
@@ -39,11 +39,9 @@ namespace commands {
OnSDLConsentNeededNotification::OnSDLConsentNeededNotification(
const MessageSharedPtr& message, ApplicationManager& application_manager)
- : NotificationToHMI(message, application_manager) {
-}
+ : NotificationToHMI(message, application_manager) {}
-OnSDLConsentNeededNotification::~OnSDLConsentNeededNotification() {
-}
+OnSDLConsentNeededNotification::~OnSDLConsentNeededNotification() {}
void OnSDLConsentNeededNotification::Run() {
LOG4CXX_AUTO_TRACE(logger_);
@@ -53,4 +51,3 @@ void OnSDLConsentNeededNotification::Run() {
} // 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
index 6fa7250be2..e30a0fb902 100644
--- 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
@@ -38,11 +38,9 @@ namespace commands {
OnSDLPersistenceCompleteNotification::OnSDLPersistenceCompleteNotification(
const MessageSharedPtr& message, ApplicationManager& application_manager)
- : NotificationToHMI(message, application_manager) {
-}
+ : NotificationToHMI(message, application_manager) {}
-OnSDLPersistenceCompleteNotification::~OnSDLPersistenceCompleteNotification() {
-}
+OnSDLPersistenceCompleteNotification::~OnSDLPersistenceCompleteNotification() {}
void OnSDLPersistenceCompleteNotification::Run() {
LOG4CXX_AUTO_TRACE(logger_);
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
index 7697b5b8c7..8e94b2b004 100644
--- 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
@@ -32,17 +32,15 @@
#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(
+ const MessageSharedPtr& message, ApplicationManager& application_manager)
+ : NotificationFromHMI(message, application_manager) {}
-OnStartDeviceDiscovery::~OnStartDeviceDiscovery() {
-}
+OnStartDeviceDiscovery::~OnStartDeviceDiscovery() {}
void OnStartDeviceDiscovery::Run() {
LOG4CXX_AUTO_TRACE(logger_);
@@ -53,4 +51,3 @@ void OnStartDeviceDiscovery::Run() {
} // 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
index 385140d67e..78a6b68324 100644
--- 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
@@ -38,11 +38,9 @@ namespace commands {
OnStatusUpdateNotification::OnStatusUpdateNotification(
const MessageSharedPtr& message, ApplicationManager& application_manager)
- : NotificationToHMI(message, application_manager) {
-}
+ : NotificationToHMI(message, application_manager) {}
-OnStatusUpdateNotification::~OnStatusUpdateNotification() {
-}
+OnStatusUpdateNotification::~OnStatusUpdateNotification() {}
void OnStatusUpdateNotification::Run() {
LOG4CXX_AUTO_TRACE(logger_);
@@ -52,4 +50,3 @@ void OnStatusUpdateNotification::Run() {
} // 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
index 6d9ab5b10e..887aacf5b9 100644
--- 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
@@ -41,18 +41,17 @@ namespace commands {
OnSystemContextNotification::OnSystemContextNotification(
const MessageSharedPtr& message, ApplicationManager& application_manager)
- : NotificationFromHMI(message, application_manager) {
-}
+ : NotificationFromHMI(message, application_manager) {}
-OnSystemContextNotification::~OnSystemContextNotification() {
-}
+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());
+ 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) ||
@@ -62,13 +61,14 @@ void OnSystemContextNotification::Run() {
} 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());
+ 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);
+ application_manager_.state_controller().SetRegularState(app,
+ system_context);
} else {
LOG4CXX_ERROR(logger_, "Application does not exist");
}
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
index 3730dc2c64..4885420f1c 100644
--- 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
@@ -40,17 +40,15 @@ namespace commands {
OnSystemErrorNotification::OnSystemErrorNotification(
const MessageSharedPtr& message, ApplicationManager& application_manager)
- : NotificationFromHMI(message, application_manager) {
-}
+ : NotificationFromHMI(message, application_manager) {}
-OnSystemErrorNotification::~OnSystemErrorNotification() {
-}
+OnSystemErrorNotification::~OnSystemErrorNotification() {}
void OnSystemErrorNotification::Run() {
LOG4CXX_AUTO_TRACE(logger_);
- const int code = (*message_)[strings::msg_params][hmi_notification::error]
- .asInt();
+ const int code =
+ (*message_)[strings::msg_params][hmi_notification::error].asInt();
application_manager_.GetPolicyHandler().OnSystemError(code);
}
@@ -58,4 +56,3 @@ void OnSystemErrorNotification::Run() {
} // 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
index 9c852caa36..00b3649284 100644
--- 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
@@ -40,11 +40,9 @@ namespace commands {
OnSystemInfoChangedNotification::OnSystemInfoChangedNotification(
const MessageSharedPtr& message, ApplicationManager& application_manager)
- : NotificationFromHMI(message, application_manager) {
-}
+ : NotificationFromHMI(message, application_manager) {}
-OnSystemInfoChangedNotification::~OnSystemInfoChangedNotification() {
-}
+OnSystemInfoChangedNotification::~OnSystemInfoChangedNotification() {}
void OnSystemInfoChangedNotification::Run() {
LOG4CXX_AUTO_TRACE(logger_);
@@ -52,7 +50,7 @@ void OnSystemInfoChangedNotification::Run() {
(*message_)[strings::msg_params][strings::language].asUInt();
const std::string language =
application_manager::MessageHelper::CommonLanguageToString(
- static_cast<hmi_apis::Common_Language::eType>(lang_code));
+ static_cast<hmi_apis::Common_Language::eType>(lang_code));
application_manager_.GetPolicyHandler().OnSystemInfoChanged(language);
}
@@ -60,5 +58,3 @@ void OnSystemInfoChangedNotification::Run() {
} // 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
index fd0b4256a1..ce83d28db4 100644
--- 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
@@ -44,12 +44,10 @@ namespace application_manager {
namespace commands {
OnSystemRequestNotification::OnSystemRequestNotification(
- const MessageSharedPtr& message, ApplicationManager& application_manager)
- : NotificationFromHMI(message, application_manager) {
-}
+ const MessageSharedPtr& message, ApplicationManager& application_manager)
+ : NotificationFromHMI(message, application_manager) {}
-OnSystemRequestNotification::~OnSystemRequestNotification() {
-}
+OnSystemRequestNotification::~OnSystemRequestNotification() {}
void OnSystemRequestNotification::Run() {
LOG4CXX_AUTO_TRACE(logger_);
@@ -58,27 +56,29 @@ void OnSystemRequestNotification::Run() {
smart_objects::SmartObject& msg_params = (*message_)[strings::msg_params];
params[strings::function_id] =
- static_cast<int32_t>(mobile_apis::FunctionID::eType::OnSystemRequestID);
+ static_cast<int32_t>(mobile_apis::FunctionID::eType::OnSystemRequestID);
const std::string app_id = msg_params[strings::app_id].asString();
- LOG4CXX_DEBUG(logger_, "Received OnSystemRequest for " << app_id );
+ LOG4CXX_DEBUG(logger_, "Received OnSystemRequest for " << app_id);
ApplicationSharedPtr app;
if (strings::default_app_id == app_id) {
- const policy::PolicyHandlerInterface& policy_handler =
- application_manager_.GetPolicyHandler();
+ const policy::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 OnSystemRequestNotification");
+ LOG4CXX_WARN(
+ logger_,
+ "Can't select application to forward OnSystemRequestNotification");
return;
}
app = application_manager_.application(selected_app_id);
}
if (!app.valid()) {
- LOG4CXX_WARN(logger_, "Application with connection key " << app_id <<
- "is not registered.");
+ LOG4CXX_WARN(logger_,
+ "Application with connection key " << app_id
+ << "is not registered.");
return;
}
@@ -89,4 +89,3 @@ void OnSystemRequestNotification::Run() {
} // 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
index d0ef234850..bd152c2af0 100644
--- 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
@@ -42,17 +42,14 @@ namespace commands {
OnTTSLanguageChangeNotification::OnTTSLanguageChangeNotification(
const MessageSharedPtr& message, ApplicationManager& application_manager)
- : NotificationFromHMI(message, application_manager) {
-}
+ : NotificationFromHMI(message, application_manager) {}
-OnTTSLanguageChangeNotification::~OnTTSLanguageChangeNotification() {
-}
+OnTTSLanguageChangeNotification::~OnTTSLanguageChangeNotification() {}
void OnTTSLanguageChangeNotification::Run() {
LOG4CXX_AUTO_TRACE(logger_);
- HMICapabilities& hmi_capabilities =
- application_manager_.hmi_capabilities();
+ HMICapabilities& hmi_capabilities = application_manager_.hmi_capabilities();
hmi_capabilities.set_active_tts_language(
static_cast<hmi_apis::Common_Language::eType>(
@@ -70,18 +67,21 @@ void OnTTSLanguageChangeNotification::Run() {
(*message_)[strings::params][strings::function_id] =
static_cast<int32_t>(mobile_apis::FunctionID::OnLanguageChangeID);
- const ApplicationSet& accessor = application_manager_.applications().GetData();
+ 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);
+ 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);
}
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
index 51af2ae0d2..283e2056ba 100644
--- 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
@@ -9,11 +9,10 @@ namespace commands {
namespace hmi {
OnTTSResetTimeoutNotification::OnTTSResetTimeoutNotification(
- const MessageSharedPtr& message, ApplicationManager& application_manager) : NotificationFromHMI(message, application_manager) {
-}
+ const MessageSharedPtr& message, ApplicationManager& application_manager)
+ : NotificationFromHMI(message, application_manager) {}
-OnTTSResetTimeoutNotification::~OnTTSResetTimeoutNotification() {
-}
+OnTTSResetTimeoutNotification::~OnTTSResetTimeoutNotification() {}
void OnTTSResetTimeoutNotification::Run() {
LOG4CXX_AUTO_TRACE(logger_);
@@ -28,4 +27,3 @@ void OnTTSResetTimeoutNotification::Run() {
} // 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
index 9f9387c27c..317465f354 100644
--- 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
@@ -32,18 +32,15 @@
#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) {
-}
+ : NotificationFromHMI(message, application_manager) {}
-OnTTSStartedNotification::~OnTTSStartedNotification() {
-}
+OnTTSStartedNotification::~OnTTSStartedNotification() {}
void OnTTSStartedNotification::Run() {
LOG4CXX_AUTO_TRACE(logger_);
@@ -55,4 +52,3 @@ void OnTTSStartedNotification::Run() {
} // 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
index 2d953651ee..7f763d8598 100644
--- 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
@@ -40,11 +40,9 @@ namespace commands {
OnTTSStoppedNotification::OnTTSStoppedNotification(
const MessageSharedPtr& message, ApplicationManager& application_manager)
- : NotificationFromHMI(message, application_manager) {
-}
+ : NotificationFromHMI(message, application_manager) {}
-OnTTSStoppedNotification::~OnTTSStoppedNotification() {
-}
+OnTTSStoppedNotification::~OnTTSStoppedNotification() {}
void OnTTSStoppedNotification::Run() {
LOG4CXX_AUTO_TRACE(logger_);
@@ -57,4 +55,3 @@ void OnTTSStoppedNotification::Run() {
} // 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
index c6563744d3..9f91d99a85 100644
--- 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
@@ -39,11 +39,9 @@ namespace commands {
OnUICommandNotification::OnUICommandNotification(
const MessageSharedPtr& message, ApplicationManager& application_manager)
- : NotificationFromHMI(message, application_manager) {
-}
+ : NotificationFromHMI(message, application_manager) {}
-OnUICommandNotification::~OnUICommandNotification() {
-}
+OnUICommandNotification::~OnUICommandNotification() {}
void OnUICommandNotification::Run() {
LOG4CXX_AUTO_TRACE(logger_);
@@ -59,4 +57,3 @@ void OnUICommandNotification::Run() {
} // 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
index 920a2364da..117fec5741 100644
--- 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
@@ -40,18 +40,17 @@ namespace commands {
namespace hmi {
OnUIKeyBoardInputNotification::OnUIKeyBoardInputNotification(
- const MessageSharedPtr& message, ApplicationManager& application_manager) : NotificationFromHMI(message, application_manager) {
-}
+ const MessageSharedPtr& message, ApplicationManager& application_manager)
+ : NotificationFromHMI(message, application_manager) {}
-OnUIKeyBoardInputNotification::~OnUIKeyBoardInputNotification() {
-}
+OnUIKeyBoardInputNotification::~OnUIKeyBoardInputNotification() {}
void OnUIKeyBoardInputNotification::Run() {
LOG4CXX_AUTO_TRACE(logger_);
- //prepare SmartObject for mobile factory
+ // prepare SmartObject for mobile factory
(*message_)[strings::params][strings::function_id] =
- mobile_apis::FunctionID::OnKeyboardInputID;
+ mobile_apis::FunctionID::OnKeyboardInputID;
SendNotificationToMobile(message_);
}
@@ -60,4 +59,3 @@ void OnUIKeyBoardInputNotification::Run() {
} // 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
index ea6b9a9722..6e8e38f757 100644
--- 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
@@ -42,17 +42,14 @@ namespace commands {
OnUILanguageChangeNotification::OnUILanguageChangeNotification(
const MessageSharedPtr& message, ApplicationManager& application_manager)
- : NotificationFromHMI(message, application_manager) {
-}
+ : NotificationFromHMI(message, application_manager) {}
-OnUILanguageChangeNotification::~OnUILanguageChangeNotification() {
-}
+OnUILanguageChangeNotification::~OnUILanguageChangeNotification() {}
void OnUILanguageChangeNotification::Run() {
LOG4CXX_AUTO_TRACE(logger_);
- HMICapabilities& hmi_capabilities =
- application_manager_.hmi_capabilities();
+ HMICapabilities& hmi_capabilities = application_manager_.hmi_capabilities();
hmi_capabilities.set_active_ui_language(
static_cast<hmi_apis::Common_Language::eType>(
@@ -76,12 +73,14 @@ void OnUILanguageChangeNotification::Run() {
(*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);
+ 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);
}
@@ -91,4 +90,3 @@ void OnUILanguageChangeNotification::Run() {
} // 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
index b1be0cd14b..a5fea7bf8d 100644
--- 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
@@ -41,11 +41,10 @@ namespace commands {
namespace hmi {
OnUIResetTimeoutNotification::OnUIResetTimeoutNotification(
- const MessageSharedPtr& message, ApplicationManager& application_manager) : NotificationFromHMI(message, application_manager) {
-}
+ const MessageSharedPtr& message, ApplicationManager& application_manager)
+ : NotificationFromHMI(message, application_manager) {}
-OnUIResetTimeoutNotification::~OnUIResetTimeoutNotification() {
-}
+OnUIResetTimeoutNotification::~OnUIResetTimeoutNotification() {}
void OnUIResetTimeoutNotification::Run() {
LOG4CXX_AUTO_TRACE(logger_);
@@ -60,4 +59,3 @@ void OnUIResetTimeoutNotification::Run() {
} // 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
index 3c4b9aa50b..7709af8720 100644
--- 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
@@ -40,18 +40,17 @@ namespace commands {
namespace hmi {
OnUITouchEventNotification::OnUITouchEventNotification(
- const MessageSharedPtr& message, ApplicationManager& application_manager) : NotificationFromHMI(message, application_manager) {
-}
+ const MessageSharedPtr& message, ApplicationManager& application_manager)
+ : NotificationFromHMI(message, application_manager) {}
-OnUITouchEventNotification::~OnUITouchEventNotification() {
-}
+OnUITouchEventNotification::~OnUITouchEventNotification() {}
void OnUITouchEventNotification::Run() {
LOG4CXX_AUTO_TRACE(logger_);
- //prepare SmartObject for mobile factory
+ // prepare SmartObject for mobile factory
(*message_)[strings::params][strings::function_id] =
- mobile_apis::FunctionID::OnTouchEventID;
+ mobile_apis::FunctionID::OnTouchEventID;
SendNotificationToMobile(message_);
}
@@ -60,4 +59,3 @@ void OnUITouchEventNotification::Run() {
} // 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
index 00822582e0..b245ea21aa 100644
--- 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
@@ -31,17 +31,15 @@
*/
#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(const MessageSharedPtr& message,
+ ApplicationManager& application_manager)
+ : NotificationFromHMI(message, application_manager) {}
-OnUpdateDeviceList::~OnUpdateDeviceList() {
-}
+OnUpdateDeviceList::~OnUpdateDeviceList() {}
void OnUpdateDeviceList::Run() {
LOG4CXX_AUTO_TRACE(logger_);
@@ -50,4 +48,3 @@ void OnUpdateDeviceList::Run() {
} // 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
index a0a71955b0..9b10055e2c 100644
--- 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
@@ -39,11 +39,9 @@ namespace commands {
OnVIAccPedalPositionNotification::OnVIAccPedalPositionNotification(
const MessageSharedPtr& message, ApplicationManager& application_manager)
- : NotificationFromHMI(message, application_manager) {
-}
+ : NotificationFromHMI(message, application_manager) {}
-OnVIAccPedalPositionNotification::~OnVIAccPedalPositionNotification() {
-}
+OnVIAccPedalPositionNotification::~OnVIAccPedalPositionNotification() {}
void OnVIAccPedalPositionNotification::Run() {
LOG4CXX_AUTO_TRACE(logger_);
@@ -58,4 +56,3 @@ void OnVIAccPedalPositionNotification::Run() {
} // 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
index 75863903bb..58f9add514 100644
--- 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
@@ -39,11 +39,9 @@ namespace commands {
OnVIBeltStatusNotification::OnVIBeltStatusNotification(
const MessageSharedPtr& message, ApplicationManager& application_manager)
- : NotificationFromHMI(message, application_manager) {
-}
+ : NotificationFromHMI(message, application_manager) {}
-OnVIBeltStatusNotification::~OnVIBeltStatusNotification() {
-}
+OnVIBeltStatusNotification::~OnVIBeltStatusNotification() {}
void OnVIBeltStatusNotification::Run() {
LOG4CXX_AUTO_TRACE(logger_);
@@ -58,4 +56,3 @@ void OnVIBeltStatusNotification::Run() {
} // 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
index 2cab27f29c..33f2944c38 100644
--- 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
@@ -39,11 +39,9 @@ namespace commands {
OnVIBodyInformationNotification::OnVIBodyInformationNotification(
const MessageSharedPtr& message, ApplicationManager& application_manager)
- : NotificationFromHMI(message, application_manager) {
-}
+ : NotificationFromHMI(message, application_manager) {}
-OnVIBodyInformationNotification::~OnVIBodyInformationNotification() {
-}
+OnVIBodyInformationNotification::~OnVIBodyInformationNotification() {}
void OnVIBodyInformationNotification::Run() {
LOG4CXX_AUTO_TRACE(logger_);
@@ -58,4 +56,3 @@ void OnVIBodyInformationNotification::Run() {
} // 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
index bb8f40e318..9cbf612be1 100644
--- 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
@@ -39,11 +39,9 @@ namespace commands {
OnVIDeviceStatusNotification::OnVIDeviceStatusNotification(
const MessageSharedPtr& message, ApplicationManager& application_manager)
- : NotificationFromHMI(message, application_manager) {
-}
+ : NotificationFromHMI(message, application_manager) {}
-OnVIDeviceStatusNotification::~OnVIDeviceStatusNotification() {
-}
+OnVIDeviceStatusNotification::~OnVIDeviceStatusNotification() {}
void OnVIDeviceStatusNotification::Run() {
LOG4CXX_AUTO_TRACE(logger_);
@@ -58,4 +56,3 @@ void OnVIDeviceStatusNotification::Run() {
} // 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
index 7ef3a05211..e521ac3a37 100644
--- 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
@@ -39,11 +39,9 @@ namespace commands {
OnVIDriverBrakingNotification::OnVIDriverBrakingNotification(
const MessageSharedPtr& message, ApplicationManager& application_manager)
- : NotificationFromHMI(message, application_manager) {
-}
+ : NotificationFromHMI(message, application_manager) {}
-OnVIDriverBrakingNotification::~OnVIDriverBrakingNotification() {
-}
+OnVIDriverBrakingNotification::~OnVIDriverBrakingNotification() {}
void OnVIDriverBrakingNotification::Run() {
LOG4CXX_AUTO_TRACE(logger_);
@@ -58,4 +56,3 @@ void OnVIDriverBrakingNotification::Run() {
} // 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
index 390b0eda0a..ebed955270 100644
--- 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
@@ -39,11 +39,9 @@ namespace commands {
OnVIEngineTorqueNotification::OnVIEngineTorqueNotification(
const MessageSharedPtr& message, ApplicationManager& application_manager)
- : NotificationFromHMI(message, application_manager) {
-}
+ : NotificationFromHMI(message, application_manager) {}
-OnVIEngineTorqueNotification::~OnVIEngineTorqueNotification() {
-}
+OnVIEngineTorqueNotification::~OnVIEngineTorqueNotification() {}
void OnVIEngineTorqueNotification::Run() {
LOG4CXX_AUTO_TRACE(logger_);
@@ -58,4 +56,3 @@ void OnVIEngineTorqueNotification::Run() {
} // 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
index c77a54e74e..9f0696fdc6 100644
--- 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
@@ -39,11 +39,9 @@ namespace commands {
OnVIExternalTemperatureNotification::OnVIExternalTemperatureNotification(
const MessageSharedPtr& message, ApplicationManager& application_manager)
- : NotificationFromHMI(message, application_manager) {
-}
+ : NotificationFromHMI(message, application_manager) {}
-OnVIExternalTemperatureNotification::~OnVIExternalTemperatureNotification() {
-}
+OnVIExternalTemperatureNotification::~OnVIExternalTemperatureNotification() {}
void OnVIExternalTemperatureNotification::Run() {
LOG4CXX_AUTO_TRACE(logger_);
@@ -58,4 +56,3 @@ void OnVIExternalTemperatureNotification::Run() {
} // 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
index e1aaf6c2f2..ef650a9f99 100644
--- 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
@@ -39,11 +39,9 @@ namespace commands {
OnVIFuelLevelNotification::OnVIFuelLevelNotification(
const MessageSharedPtr& message, ApplicationManager& application_manager)
- : NotificationFromHMI(message, application_manager) {
-}
+ : NotificationFromHMI(message, application_manager) {}
-OnVIFuelLevelNotification::~OnVIFuelLevelNotification() {
-}
+OnVIFuelLevelNotification::~OnVIFuelLevelNotification() {}
void OnVIFuelLevelNotification::Run() {
LOG4CXX_AUTO_TRACE(logger_);
@@ -58,4 +56,3 @@ void OnVIFuelLevelNotification::Run() {
} // 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
index 174b3dd5cb..a5267d8dac 100644
--- 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
@@ -39,11 +39,9 @@ namespace commands {
OnVIFuelLevelStateNotification::OnVIFuelLevelStateNotification(
const MessageSharedPtr& message, ApplicationManager& application_manager)
- : NotificationFromHMI(message, application_manager) {
-}
+ : NotificationFromHMI(message, application_manager) {}
-OnVIFuelLevelStateNotification::~OnVIFuelLevelStateNotification() {
-}
+OnVIFuelLevelStateNotification::~OnVIFuelLevelStateNotification() {}
void OnVIFuelLevelStateNotification::Run() {
LOG4CXX_AUTO_TRACE(logger_);
@@ -58,4 +56,3 @@ void OnVIFuelLevelStateNotification::Run() {
} // 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
index ceff04e5d7..63b95bf6dc 100644
--- 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
@@ -39,11 +39,9 @@ namespace commands {
OnVIGpsDataNotification::OnVIGpsDataNotification(
const MessageSharedPtr& message, ApplicationManager& application_manager)
- : NotificationFromHMI(message, application_manager) {
-}
+ : NotificationFromHMI(message, application_manager) {}
-OnVIGpsDataNotification::~OnVIGpsDataNotification() {
-}
+OnVIGpsDataNotification::~OnVIGpsDataNotification() {}
void OnVIGpsDataNotification::Run() {
LOG4CXX_AUTO_TRACE(logger_);
@@ -58,4 +56,3 @@ void OnVIGpsDataNotification::Run() {
} // 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
index c7304bfc21..7d494f02d3 100644
--- 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
@@ -39,11 +39,9 @@ namespace commands {
OnVIHeadLampStatusNotification::OnVIHeadLampStatusNotification(
const MessageSharedPtr& message, ApplicationManager& application_manager)
- : NotificationFromHMI(message, application_manager) {
-}
+ : NotificationFromHMI(message, application_manager) {}
-OnVIHeadLampStatusNotification::~OnVIHeadLampStatusNotification() {
-}
+OnVIHeadLampStatusNotification::~OnVIHeadLampStatusNotification() {}
void OnVIHeadLampStatusNotification::Run() {
LOG4CXX_AUTO_TRACE(logger_);
@@ -58,4 +56,3 @@ void OnVIHeadLampStatusNotification::Run() {
} // 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
index 3177aca5d2..a62f4cacea 100644
--- 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
@@ -39,11 +39,10 @@ namespace commands {
OnVIInstantFuelConsumptionNotification::OnVIInstantFuelConsumptionNotification(
const MessageSharedPtr& message, ApplicationManager& application_manager)
- : NotificationFromHMI(message, application_manager) {
-}
+ : NotificationFromHMI(message, application_manager) {}
-OnVIInstantFuelConsumptionNotification::~OnVIInstantFuelConsumptionNotification() {
-}
+OnVIInstantFuelConsumptionNotification::
+ ~OnVIInstantFuelConsumptionNotification() {}
void OnVIInstantFuelConsumptionNotification::Run() {
LOG4CXX_AUTO_TRACE(logger_);
@@ -58,4 +57,3 @@ void OnVIInstantFuelConsumptionNotification::Run() {
} // 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
index 1501bbd72d..229d50667b 100644
--- 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
@@ -39,11 +39,9 @@ namespace commands {
OnVIMyKeyNotification::OnVIMyKeyNotification(
const MessageSharedPtr& message, ApplicationManager& application_manager)
- : NotificationFromHMI(message, application_manager) {
-}
+ : NotificationFromHMI(message, application_manager) {}
-OnVIMyKeyNotification::~OnVIMyKeyNotification() {
-}
+OnVIMyKeyNotification::~OnVIMyKeyNotification() {}
void OnVIMyKeyNotification::Run() {
LOG4CXX_AUTO_TRACE(logger_);
@@ -58,4 +56,3 @@ void OnVIMyKeyNotification::Run() {
} // 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
index 5fd9da0f67..10f236539c 100644
--- 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
@@ -39,11 +39,9 @@ namespace commands {
OnVIOdometerNotification::OnVIOdometerNotification(
const MessageSharedPtr& message, ApplicationManager& application_manager)
- : NotificationFromHMI(message, application_manager) {
-}
+ : NotificationFromHMI(message, application_manager) {}
-OnVIOdometerNotification::~OnVIOdometerNotification() {
-}
+OnVIOdometerNotification::~OnVIOdometerNotification() {}
void OnVIOdometerNotification::Run() {
LOG4CXX_AUTO_TRACE(logger_);
@@ -58,4 +56,3 @@ void OnVIOdometerNotification::Run() {
} // 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
index f58f494fcc..81585eabca 100644
--- 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
@@ -39,11 +39,9 @@ namespace commands {
OnVIPrndlNotification::OnVIPrndlNotification(
const MessageSharedPtr& message, ApplicationManager& application_manager)
- : NotificationFromHMI(message, application_manager) {
-}
+ : NotificationFromHMI(message, application_manager) {}
-OnVIPrndlNotification::~OnVIPrndlNotification() {
-}
+OnVIPrndlNotification::~OnVIPrndlNotification() {}
void OnVIPrndlNotification::Run() {
LOG4CXX_AUTO_TRACE(logger_);
@@ -58,4 +56,3 @@ void OnVIPrndlNotification::Run() {
} // 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
index e9e262b6d5..b5c0703917 100644
--- 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
@@ -39,11 +39,9 @@ namespace commands {
OnVIRpmNotification::OnVIRpmNotification(
const MessageSharedPtr& message, ApplicationManager& application_manager)
- : NotificationFromHMI(message, application_manager) {
-}
+ : NotificationFromHMI(message, application_manager) {}
-OnVIRpmNotification::~OnVIRpmNotification() {
-}
+OnVIRpmNotification::~OnVIRpmNotification() {}
void OnVIRpmNotification::Run() {
LOG4CXX_AUTO_TRACE(logger_);
@@ -58,4 +56,3 @@ void OnVIRpmNotification::Run() {
} // 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
index a875b168c7..aacafb71c9 100644
--- 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
@@ -39,11 +39,9 @@ namespace commands {
OnVISpeedNotification::OnVISpeedNotification(
const MessageSharedPtr& message, ApplicationManager& application_manager)
- : NotificationFromHMI(message, application_manager) {
-}
+ : NotificationFromHMI(message, application_manager) {}
-OnVISpeedNotification::~OnVISpeedNotification() {
-}
+OnVISpeedNotification::~OnVISpeedNotification() {}
void OnVISpeedNotification::Run() {
LOG4CXX_AUTO_TRACE(logger_);
@@ -58,4 +56,3 @@ void OnVISpeedNotification::Run() {
} // 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
index f51fce263b..af102ea926 100644
--- 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
@@ -39,11 +39,9 @@ namespace commands {
OnVISteeringWheelAngleNotification::OnVISteeringWheelAngleNotification(
const MessageSharedPtr& message, ApplicationManager& application_manager)
- : NotificationFromHMI(message, application_manager) {
-}
+ : NotificationFromHMI(message, application_manager) {}
-OnVISteeringWheelAngleNotification::~OnVISteeringWheelAngleNotification() {
-}
+OnVISteeringWheelAngleNotification::~OnVISteeringWheelAngleNotification() {}
void OnVISteeringWheelAngleNotification::Run() {
LOG4CXX_AUTO_TRACE(logger_);
@@ -58,4 +56,3 @@ void OnVISteeringWheelAngleNotification::Run() {
} // 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
index 8e77c98c4f..99506e6171 100644
--- 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
@@ -39,11 +39,9 @@ namespace commands {
OnVITirePressureNotification::OnVITirePressureNotification(
const MessageSharedPtr& message, ApplicationManager& application_manager)
- : NotificationFromHMI(message, application_manager) {
-}
+ : NotificationFromHMI(message, application_manager) {}
-OnVITirePressureNotification::~OnVITirePressureNotification() {
-}
+OnVITirePressureNotification::~OnVITirePressureNotification() {}
void OnVITirePressureNotification::Run() {
LOG4CXX_AUTO_TRACE(logger_);
@@ -58,4 +56,3 @@ void OnVITirePressureNotification::Run() {
} // 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
index 7b5fa3cc4f..5f8109ccab 100644
--- 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
@@ -39,11 +39,9 @@ namespace commands {
OnVIVehicleDataNotification::OnVIVehicleDataNotification(
const MessageSharedPtr& message, ApplicationManager& application_manager)
- : NotificationFromHMI(message, application_manager) {
-}
+ : NotificationFromHMI(message, application_manager) {}
-OnVIVehicleDataNotification::~OnVIVehicleDataNotification() {
-}
+OnVIVehicleDataNotification::~OnVIVehicleDataNotification() {}
void OnVIVehicleDataNotification::Run() {
LOG4CXX_AUTO_TRACE(logger_);
@@ -58,4 +56,3 @@ void OnVIVehicleDataNotification::Run() {
} // 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
index 330e91bf3b..c360e41dff 100644
--- 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
@@ -39,11 +39,9 @@ namespace commands {
OnVIVinNotification::OnVIVinNotification(
const MessageSharedPtr& message, ApplicationManager& application_manager)
- : NotificationFromHMI(message, application_manager) {
-}
+ : NotificationFromHMI(message, application_manager) {}
-OnVIVinNotification::~OnVIVinNotification() {
-}
+OnVIVinNotification::~OnVIVinNotification() {}
void OnVIVinNotification::Run() {
LOG4CXX_AUTO_TRACE(logger_);
@@ -58,4 +56,3 @@ void OnVIVinNotification::Run() {
} // 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
index 0b2719ee50..08fb3f31d4 100644
--- 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
@@ -39,11 +39,9 @@ namespace commands {
OnVIWiperStatusNotification::OnVIWiperStatusNotification(
const MessageSharedPtr& message, ApplicationManager& application_manager)
- : NotificationFromHMI(message, application_manager) {
-}
+ : NotificationFromHMI(message, application_manager) {}
-OnVIWiperStatusNotification::~OnVIWiperStatusNotification() {
-}
+OnVIWiperStatusNotification::~OnVIWiperStatusNotification() {}
void OnVIWiperStatusNotification::Run() {
LOG4CXX_AUTO_TRACE(logger_);
@@ -58,4 +56,3 @@ void OnVIWiperStatusNotification::Run() {
} // 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
index 4af2c2ee1d..ee0a91f5ef 100644
--- 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
@@ -39,11 +39,9 @@ namespace commands {
OnVideoDataStreamingNotification::OnVideoDataStreamingNotification(
const MessageSharedPtr& message, ApplicationManager& application_manager)
- : NotificationToHMI(message, application_manager) {
-}
+ : NotificationToHMI(message, application_manager) {}
-OnVideoDataStreamingNotification::~OnVideoDataStreamingNotification() {
-}
+OnVideoDataStreamingNotification::~OnVideoDataStreamingNotification() {}
void OnVideoDataStreamingNotification::Run() {
LOG4CXX_AUTO_TRACE(logger_);
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
index 0749537e07..c609e2dc0a 100644
--- 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
@@ -46,16 +46,14 @@ namespace commands {
OnVRCommandNotification::OnVRCommandNotification(
const MessageSharedPtr& message, ApplicationManager& application_manager)
- : NotificationFromHMI(message, application_manager) {
-}
+ : NotificationFromHMI(message, application_manager) {}
-OnVRCommandNotification::~OnVRCommandNotification() {
-}
+OnVRCommandNotification::~OnVRCommandNotification() {}
void OnVRCommandNotification::Run() {
LOG4CXX_AUTO_TRACE(logger_);
- const uint32_t cmd_id = (*message_)[strings::msg_params][strings::cmd_id]
- .asUInt();
+ 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")
@@ -76,8 +74,8 @@ void OnVRCommandNotification::Run() {
if (cmd_id == max_cmd_id + 1) {
return;
}
- const uint32_t app_id = (*message_)[strings::msg_params][strings::app_id]
- .asUInt();
+ 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");
@@ -104,4 +102,3 @@ void OnVRCommandNotification::Run() {
} // 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
index 2412fd8e9f..bbdb55cde6 100644
--- 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
@@ -43,17 +43,14 @@ namespace commands {
OnVRLanguageChangeNotification::OnVRLanguageChangeNotification(
const MessageSharedPtr& message, ApplicationManager& application_manager)
- : NotificationFromHMI(message, application_manager) {
-}
+ : NotificationFromHMI(message, application_manager) {}
-OnVRLanguageChangeNotification::~OnVRLanguageChangeNotification() {
-}
+OnVRLanguageChangeNotification::~OnVRLanguageChangeNotification() {}
void OnVRLanguageChangeNotification::Run() {
LOG4CXX_AUTO_TRACE(logger_);
- HMICapabilities& hmi_capabilities =
- application_manager_.hmi_capabilities();
+ HMICapabilities& hmi_capabilities = application_manager_.hmi_capabilities();
hmi_capabilities.set_active_vr_language(
static_cast<hmi_apis::Common_Language::eType>(
@@ -73,16 +70,16 @@ void OnVRLanguageChangeNotification::Run() {
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);
+ 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);
}
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
index f87f50f178..68942fcf01 100644
--- 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
@@ -32,18 +32,15 @@
#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) {
-}
+ : NotificationFromHMI(message, application_manager) {}
-OnVRStartedNotification::~OnVRStartedNotification() {
-}
+OnVRStartedNotification::~OnVRStartedNotification() {}
void OnVRStartedNotification::Run() {
LOG4CXX_AUTO_TRACE(logger_);
@@ -56,4 +53,3 @@ void OnVRStartedNotification::Run() {
} // 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
index fa13eb509f..e8f9fab847 100644
--- 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
@@ -32,18 +32,15 @@
#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) {
-}
+ : NotificationFromHMI(message, application_manager) {}
-OnVRStoppedNotification::~OnVRStoppedNotification() {
-}
+OnVRStoppedNotification::~OnVRStoppedNotification() {}
void OnVRStoppedNotification::Run() {
LOG4CXX_AUTO_TRACE(logger_);
@@ -56,4 +53,3 @@ void OnVRStoppedNotification::Run() {
} // 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
index 03a8bcfe8b..be3cd6314c 100644
--- a/src/components/application_manager/src/commands/hmi/request_from_hmi.cc
+++ b/src/components/application_manager/src/commands/hmi/request_from_hmi.cc
@@ -40,14 +40,13 @@ namespace commands {
RequestFromHMI::RequestFromHMI(const MessageSharedPtr& message,
ApplicationManager& application_manager)
- : CommandImpl(message, application_manager),
- EventObserver(application_manager.event_dispatcher()) {
+ : CommandImpl(message, application_manager)
+ , EventObserver(application_manager.event_dispatcher()) {
// Replace HMI app id with Mobile connection id
ReplaceHMIByMobileAppId(*(message.get()));
}
-RequestFromHMI::~RequestFromHMI() {
-}
+RequestFromHMI::~RequestFromHMI() {}
bool RequestFromHMI::Init() {
return true;
@@ -57,18 +56,17 @@ bool RequestFromHMI::CleanUp() {
return true;
}
-void RequestFromHMI::Run() {
-}
+void RequestFromHMI::Run() {}
-void RequestFromHMI::on_event(const event_engine::Event& event) {
-}
+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::SmartObject* message = new smart_objects::SmartObject(
- smart_objects::SmartType_Map);
+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::SmartObject* message =
+ new 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;
@@ -78,30 +76,31 @@ void RequestFromHMI::SendResponse(const bool success,
application_manager_.ManageHMICommand(message);
}
-//void RequestFromHMI::SendErrorResponse(uint32_t correlation_id,
-// hmi_apis::FunctionID::eType function_id,
-// hmi_apis::Common_Result::eType result_code) {
+// void RequestFromHMI::SendErrorResponse(uint32_t correlation_id,
+// hmi_apis::FunctionID::eType
+// function_id,
+// hmi_apis::Common_Result::eType
+// result_code) {
// smart_objects::SmartObject* message = new smart_objects::SmartObject(
// smart_objects::SmartType_Map);
// FillCommonParametersOfSO(message, correlation_id, function_id);
-// (*message)[strings::params][strings::message_type] = MessageType::kErrorResponse;
+// (*message)[strings::params][strings::message_type] =
+// MessageType::kErrorResponse;
// (*message)[strings::params][hmi_response::code] = result_code;
// (*message)[strings::params][strings::error_msg] = "HMIDeactivate is active";
// application_manager_.ManageHMICommand(message);
//}
-void RequestFromHMI::FillCommonParametersOfSO(smart_objects::SmartObject* message,
- uint32_t correlation_id,
- hmi_apis::FunctionID::eType function_id) {
-
+void RequestFromHMI::FillCommonParametersOfSO(
+ smart_objects::SmartObject* message,
+ uint32_t correlation_id,
+ 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
index adb3e0764b..2e7d7e9df1 100644
--- a/src/components/application_manager/src/commands/hmi/request_to_hmi.cc
+++ b/src/components/application_manager/src/commands/hmi/request_to_hmi.cc
@@ -32,8 +32,6 @@
#include "application_manager/commands/hmi/request_to_hmi.h"
-
-
namespace application_manager {
namespace commands {
@@ -45,8 +43,7 @@ RequestToHMI::RequestToHMI(const MessageSharedPtr& message,
ReplaceMobileByHMIAppId(*(message.get()));
}
-RequestToHMI::~RequestToHMI() {
-}
+RequestToHMI::~RequestToHMI() {}
bool RequestToHMI::Init() {
return true;
@@ -56,8 +53,7 @@ bool RequestToHMI::CleanUp() {
return true;
}
-void RequestToHMI::Run() {
-}
+void RequestToHMI::Run() {}
void RequestToHMI::SendRequest() {
(*message_)[strings::params][strings::protocol_type] = hmi_protocol_type_;
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
index 9dd4862aac..23d8e6e229 100644
--- a/src/components/application_manager/src/commands/hmi/response_from_hmi.cc
+++ b/src/components/application_manager/src/commands/hmi/response_from_hmi.cc
@@ -51,8 +51,7 @@ ResponseFromHMI::ResponseFromHMI(const MessageSharedPtr& message,
ReplaceHMIByMobileAppId(*(message.get()));
}
-ResponseFromHMI::~ResponseFromHMI() {
-}
+ResponseFromHMI::~ResponseFromHMI() {}
bool ResponseFromHMI::Init() {
return true;
@@ -62,10 +61,10 @@ bool ResponseFromHMI::CleanUp() {
return true;
}
-void ResponseFromHMI::Run() {
-}
+void ResponseFromHMI::Run() {}
-void ResponseFromHMI::SendResponseToMobile(const MessageSharedPtr& message, ApplicationManager& application_manager) {
+void ResponseFromHMI::SendResponseToMobile(
+ const MessageSharedPtr& message, ApplicationManager& application_manager) {
(*message)[strings::params][strings::message_type] = MessageType::kResponse;
application_manager_.ManageMobileCommand(message, ORIGIN_SDL);
@@ -74,7 +73,6 @@ void ResponseFromHMI::SendResponseToMobile(const MessageSharedPtr& message, Appl
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) {
@@ -83,7 +81,8 @@ void ResponseFromHMI::CreateHMIRequest(
}
// get hmi correlation id for chaining further request from this object
- const uint32_t hmi_correlation_id_ = application_manager_.GetNextHMICorrelationID();
+ const uint32_t hmi_correlation_id_ =
+ application_manager_.GetNextHMICorrelationID();
NsSmartDeviceLink::NsSmartObjects::SmartObject& request = *result;
request[strings::params][strings::message_type] = MessageType::kRequest;
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
index 0b9ea5a768..e6f64047ba 100644
--- a/src/components/application_manager/src/commands/hmi/response_to_hmi.cc
+++ b/src/components/application_manager/src/commands/hmi/response_to_hmi.cc
@@ -44,8 +44,7 @@ ResponseToHMI::ResponseToHMI(const MessageSharedPtr& message,
ReplaceMobileByHMIAppId(*(message.get()));
}
-ResponseToHMI::~ResponseToHMI() {
-}
+ResponseToHMI::~ResponseToHMI() {}
bool ResponseToHMI::Init() {
return true;
@@ -64,4 +63,3 @@ void ResponseToHMI::Run() {
} // 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
index 96864cbf6b..b3e7a968eb 100644
--- 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
@@ -38,12 +38,11 @@ namespace application_manager {
namespace commands {
-SDLActivateAppRequest::SDLActivateAppRequest(const MessageSharedPtr& message, ApplicationManager& application_manager)
- : RequestFromHMI(message, application_manager) {
-}
+SDLActivateAppRequest::SDLActivateAppRequest(
+ const MessageSharedPtr& message, ApplicationManager& application_manager)
+ : RequestFromHMI(message, application_manager) {}
-SDLActivateAppRequest::~SDLActivateAppRequest() {
-}
+SDLActivateAppRequest::~SDLActivateAppRequest() {}
void SDLActivateAppRequest::Run() {
LOG4CXX_AUTO_TRACE(logger_);
@@ -73,14 +72,18 @@ void SDLActivateAppRequest::Run() {
if (!app->IsRegistered()) {
if (devices_apps.first) {
- MessageHelper::SendLaunchApp(
- devices_apps.first->app_id(), app->SchemaUrl(), app->PackageName(), application_manager_);
+ MessageHelper::SendLaunchApp(devices_apps.first->app_id(),
+ app->SchemaUrl(),
+ app->PackageName(),
+ application_manager_);
} else {
std::vector<ApplicationSharedPtr>::const_iterator it =
devices_apps.second.begin();
for (; it != devices_apps.second.end(); ++it) {
- MessageHelper::SendLaunchApp(
- (*it)->app_id(), app->SchemaUrl(), app->PackageName(), application_manager_);
+ MessageHelper::SendLaunchApp((*it)->app_id(),
+ app->SchemaUrl(),
+ app->PackageName(),
+ application_manager_);
}
}
subscribe_on_event(BasicCommunication_OnAppRegistered);
@@ -91,9 +94,9 @@ void SDLActivateAppRequest::Run() {
app->PackageName(),
application_manager_);
} else {
- const uint32_t application_id = app_id();
- application_manager_.GetPolicyHandler().OnActivateApp(application_id,
- correlation_id());
+ const uint32_t application_id = app_id();
+ application_manager_.GetPolicyHandler().OnActivateApp(application_id,
+ correlation_id());
}
}
}
@@ -103,7 +106,8 @@ void SDLActivateAppRequest::onTimeOut() {
using namespace hmi_apis::Common_Result;
using namespace application_manager;
unsubscribe_from_event(BasicCommunication_OnAppRegistered);
- SendResponse(false, correlation_id(), SDL_ActivateApp, APPLICATION_NOT_REGISTERED);
+ SendResponse(
+ false, correlation_id(), SDL_ActivateApp, APPLICATION_NOT_REGISTERED);
}
void SDLActivateAppRequest::on_event(const event_engine::Event& event) {
@@ -125,15 +129,14 @@ void SDLActivateAppRequest::on_event(const event_engine::Event& event) {
logger_, "Application not found by HMI app id: " << hmi_application_id);
return;
}
- application_manager_.GetPolicyHandler()
- .OnActivateApp(app->app_id(), correlation_id());
+ application_manager_.GetPolicyHandler().OnActivateApp(app->app_id(),
+ correlation_id());
}
uint32_t SDLActivateAppRequest::app_id() const {
-
if ((*message_).keyExists(strings::msg_params)) {
- if ((*message_)[strings::msg_params].keyExists(strings::app_id)){
- return (*message_)[strings::msg_params][strings::app_id].asUInt();
+ if ((*message_)[strings::msg_params].keyExists(strings::app_id)) {
+ return (*message_)[strings::msg_params][strings::app_id].asUInt();
}
}
LOG4CXX_DEBUG(logger_, "app_id section is absent in the message.");
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
index dd0a7faae9..75a8c0b241 100644
--- 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
@@ -32,17 +32,15 @@
#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) {
-}
+ const MessageSharedPtr& message, ApplicationManager& application_manager)
+ : ResponseToHMI(message, application_manager) {}
-SDLActivateAppResponse::~SDLActivateAppResponse() {
-}
+SDLActivateAppResponse::~SDLActivateAppResponse() {}
void SDLActivateAppResponse::Run() {
LOG4CXX_AUTO_TRACE(logger_);
@@ -54,5 +52,3 @@ void SDLActivateAppResponse::Run() {
} // 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
index 693cb83392..4b150cda60 100644
--- 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
@@ -39,11 +39,9 @@ namespace commands {
SDLGetListOfPermissionsRequest::SDLGetListOfPermissionsRequest(
const MessageSharedPtr& message, ApplicationManager& application_manager)
- : RequestFromHMI(message, application_manager) {
-}
+ : RequestFromHMI(message, application_manager) {}
-SDLGetListOfPermissionsRequest::~SDLGetListOfPermissionsRequest() {
-}
+SDLGetListOfPermissionsRequest::~SDLGetListOfPermissionsRequest() {}
void SDLGetListOfPermissionsRequest::Run() {
LOG4CXX_AUTO_TRACE(logger_);
@@ -52,11 +50,9 @@ void SDLGetListOfPermissionsRequest::Run() {
connection_key = (*message_)[strings::msg_params][strings::app_id].asUInt();
}
application_manager_.GetPolicyHandler().OnGetListOfPermissions(
- connection_key,
- (*message_)[strings::params][strings::correlation_id].asUInt());
+ 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
index bd8b7c011d..521b59a0ec 100644
--- 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
@@ -32,17 +32,15 @@
#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) {
-}
+ const MessageSharedPtr& message, ApplicationManager& application_manager)
+ : ResponseToHMI(message, application_manager) {}
-SDLGetListOfPermissionsResponse::~SDLGetListOfPermissionsResponse() {
-}
+SDLGetListOfPermissionsResponse::~SDLGetListOfPermissionsResponse() {}
void SDLGetListOfPermissionsResponse::Run() {
LOG4CXX_AUTO_TRACE(logger_);
@@ -54,5 +52,3 @@ void SDLGetListOfPermissionsResponse::Run() {
} // 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
index a3829111d5..afa7569746 100644
--- 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
@@ -37,20 +37,17 @@ namespace application_manager {
namespace commands {
-SDLGetStatusUpdateRequest::SDLGetStatusUpdateRequest(const MessageSharedPtr& message, ApplicationManager& application_manager)
- : RequestFromHMI(message, application_manager) {
-}
+SDLGetStatusUpdateRequest::SDLGetStatusUpdateRequest(
+ const MessageSharedPtr& message, ApplicationManager& application_manager)
+ : RequestFromHMI(message, application_manager) {}
-SDLGetStatusUpdateRequest::~SDLGetStatusUpdateRequest() {
-}
+SDLGetStatusUpdateRequest::~SDLGetStatusUpdateRequest() {}
void SDLGetStatusUpdateRequest::Run() {
LOG4CXX_AUTO_TRACE(logger_);
application_manager_.GetPolicyHandler().OnGetStatusUpdate(
- (*message_)[strings::params][strings::correlation_id].asUInt());
+ (*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
index 2108b8856d..0af7e0217a 100644
--- 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
@@ -32,17 +32,15 @@
#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) {
-}
+ const MessageSharedPtr& message, ApplicationManager& application_manager)
+ : ResponseToHMI(message, application_manager) {}
-SDLGetStatusUpdateResponse::~SDLGetStatusUpdateResponse() {
-}
+SDLGetStatusUpdateResponse::~SDLGetStatusUpdateResponse() {}
void SDLGetStatusUpdateResponse::Run() {
LOG4CXX_AUTO_TRACE(logger_);
@@ -54,6 +52,3 @@ void SDLGetStatusUpdateResponse::Run() {
} // 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
index d8f9fbdeb9..ea959389ef 100644
--- 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
@@ -39,18 +39,16 @@ namespace commands {
SDLGetUserFriendlyMessageRequest::SDLGetUserFriendlyMessageRequest(
const MessageSharedPtr& message, ApplicationManager& application_manager)
- : RequestFromHMI(message, application_manager) {
-}
+ : RequestFromHMI(message, application_manager) {}
-SDLGetUserFriendlyMessageRequest::~SDLGetUserFriendlyMessageRequest() {
-}
+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");
+ "Mandatory parameter '" + messageCodes + "'' is missing");
return;
}
smart_objects::SmartArray* msg =
@@ -66,24 +64,24 @@ void SDLGetUserFriendlyMessageRequest::Run() {
std::string required_language;
if ((*message_)[strings::msg_params].keyExists(strings::language)) {
- uint32_t lang_code = (*message_)[strings::msg_params][strings::language]
- .asUInt();
+ 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));
+ static_cast<hmi_apis::Common_Language::eType>(lang_code));
} else {
- hmi_apis::Common_Language::eType ui_language = application_manager_.hmi_capabilities().active_ui_language();
+ 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());
+ 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
index b4e6549bb2..c693625dbb 100644
--- 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
@@ -32,17 +32,15 @@
#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) {
-}
+ const MessageSharedPtr& message, ApplicationManager& application_manager)
+ : ResponseToHMI(message, application_manager) {}
-SDLGetUserFriendlyMessageResponse::~SDLGetUserFriendlyMessageResponse() {
-}
+SDLGetUserFriendlyMessageResponse::~SDLGetUserFriendlyMessageResponse() {}
void SDLGetUserFriendlyMessageResponse::Run() {
LOG4CXX_AUTO_TRACE(logger_);
@@ -54,5 +52,3 @@ void SDLGetUserFriendlyMessageResponse::Run() {
} // 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
index 4649f86cfe..88b7c3faae 100644
--- a/src/components/application_manager/src/commands/hmi/sdl_policy_update.cc
+++ b/src/components/application_manager/src/commands/hmi/sdl_policy_update.cc
@@ -36,12 +36,11 @@ namespace application_manager {
namespace commands {
-SDLPolicyUpdate::SDLPolicyUpdate(
- const MessageSharedPtr& message, ApplicationManager& application_manager): RequestToHMI(message, application_manager) {
-}
+SDLPolicyUpdate::SDLPolicyUpdate(const MessageSharedPtr& message,
+ ApplicationManager& application_manager)
+ : RequestToHMI(message, application_manager) {}
-SDLPolicyUpdate::~SDLPolicyUpdate() {
-}
+SDLPolicyUpdate::~SDLPolicyUpdate() {}
void SDLPolicyUpdate::Run() {
LOG4CXX_AUTO_TRACE(logger_);
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
index f15ec9123d..38b57a5b9f 100644
--- 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
@@ -36,11 +36,10 @@ namespace application_manager {
namespace commands {
SDLPolicyUpdateResponse::SDLPolicyUpdateResponse(
- const MessageSharedPtr& message, ApplicationManager& application_manager): ResponseFromHMI(message, application_manager) {
-}
+ const MessageSharedPtr& message, ApplicationManager& application_manager)
+ : ResponseFromHMI(message, application_manager) {}
-SDLPolicyUpdateResponse::~SDLPolicyUpdateResponse() {
-}
+SDLPolicyUpdateResponse::~SDLPolicyUpdateResponse() {}
void SDLPolicyUpdateResponse::Run() {
LOG4CXX_AUTO_TRACE(logger_);
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
index 65d11922c2..bb1f29d889 100644
--- 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
@@ -38,11 +38,9 @@ namespace commands {
TTSChangeRegistrationRequest::TTSChangeRegistrationRequest(
const MessageSharedPtr& message, ApplicationManager& application_manager)
- : RequestToHMI(message, application_manager) {
-}
+ : RequestToHMI(message, application_manager) {}
-TTSChangeRegistrationRequest::~TTSChangeRegistrationRequest() {
-}
+TTSChangeRegistrationRequest::~TTSChangeRegistrationRequest() {}
void TTSChangeRegistrationRequest::Run() {
LOG4CXX_AUTO_TRACE(logger_);
@@ -53,4 +51,3 @@ void TTSChangeRegistrationRequest::Run() {
} // 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
index e5582a1edc..e63ee5f74d 100644
--- 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
@@ -40,11 +40,9 @@ namespace commands {
TTSChangeRegistratioResponse::TTSChangeRegistratioResponse(
const MessageSharedPtr& message, ApplicationManager& application_manager)
- : ResponseFromHMI(message, application_manager) {
-}
+ : ResponseFromHMI(message, application_manager) {}
-TTSChangeRegistratioResponse::~TTSChangeRegistratioResponse() {
-}
+TTSChangeRegistratioResponse::~TTSChangeRegistratioResponse() {}
void TTSChangeRegistratioResponse::Run() {
LOG4CXX_AUTO_TRACE(logger_);
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
index 4892c6889a..4dbf5e8ee7 100644
--- 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
@@ -38,11 +38,9 @@ namespace commands {
TTSGetCapabilitiesRequest::TTSGetCapabilitiesRequest(
const MessageSharedPtr& message, ApplicationManager& application_manager)
- : RequestToHMI(message, application_manager) {
-}
+ : RequestToHMI(message, application_manager) {}
-TTSGetCapabilitiesRequest::~TTSGetCapabilitiesRequest() {
-}
+TTSGetCapabilitiesRequest::~TTSGetCapabilitiesRequest() {}
void TTSGetCapabilitiesRequest::Run() {
LOG4CXX_AUTO_TRACE(logger_);
@@ -53,4 +51,3 @@ void TTSGetCapabilitiesRequest::Run() {
} // 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
index 8722979a51..ce629b36d7 100644
--- 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
@@ -31,35 +31,31 @@
*/
#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) {
-}
+ : ResponseFromHMI(message, application_manager) {}
-TTSGetCapabilitiesResponse::~TTSGetCapabilitiesResponse() {
-}
+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)) {
+ 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]);
+ (*message_)[strings::msg_params][hmi_response::speech_capabilities]);
}
if ((*message_)[strings::msg_params].keyExists(
- hmi_response::prerecorded_speech_capabilities)) {
+ hmi_response::prerecorded_speech_capabilities)) {
hmi_capabilities.set_prerecorded_speech(
(*message_)[strings::msg_params]
- [hmi_response::prerecorded_speech_capabilities]);
+ [hmi_response::prerecorded_speech_capabilities]);
}
-
}
} // namespace commands
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
index e55e5e7fdc..c44667a223 100644
--- 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
@@ -36,12 +36,11 @@ namespace application_manager {
namespace commands {
-TTSGetLanguageRequest::TTSGetLanguageRequest(const MessageSharedPtr& message, ApplicationManager& application_manager)
- : RequestToHMI(message, application_manager) {
-}
+TTSGetLanguageRequest::TTSGetLanguageRequest(
+ const MessageSharedPtr& message, ApplicationManager& application_manager)
+ : RequestToHMI(message, application_manager) {}
-TTSGetLanguageRequest::~TTSGetLanguageRequest() {
-}
+TTSGetLanguageRequest::~TTSGetLanguageRequest() {}
void TTSGetLanguageRequest::Run() {
LOG4CXX_AUTO_TRACE(logger_);
@@ -52,4 +51,3 @@ void TTSGetLanguageRequest::Run() {
} // 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
index 49e7e6d5d1..37aed2c6cb 100644
--- 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
@@ -37,12 +37,11 @@ namespace application_manager {
namespace commands {
-TTSGetLanguageResponse::TTSGetLanguageResponse(const MessageSharedPtr& message, ApplicationManager& application_manager)
- : ResponseFromHMI(message, application_manager) {
-}
+TTSGetLanguageResponse::TTSGetLanguageResponse(
+ const MessageSharedPtr& message, ApplicationManager& application_manager)
+ : ResponseFromHMI(message, application_manager) {}
-TTSGetLanguageResponse::~TTSGetLanguageResponse() {
-}
+TTSGetLanguageResponse::~TTSGetLanguageResponse() {}
void TTSGetLanguageResponse::Run() {
LOG4CXX_AUTO_TRACE(logger_);
@@ -52,17 +51,16 @@ void TTSGetLanguageResponse::Run() {
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());
+ (*message_)[strings::msg_params][hmi_response::language].asInt());
}
- application_manager_.hmi_capabilities().
- set_active_tts_language(language);
+ application_manager_.hmi_capabilities().set_active_tts_language(language);
- LOG4CXX_DEBUG(logger_, "Raising event for function_id "
- << function_id()
- << " and correlation_id " << correlation_id());
+ 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());
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
index a87b31072d..941adca01d 100644
--- 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
@@ -38,11 +38,9 @@ namespace commands {
TTSGetSupportedLanguagesRequest::TTSGetSupportedLanguagesRequest(
const MessageSharedPtr& message, ApplicationManager& application_manager)
- : RequestToHMI(message, application_manager) {
-}
+ : RequestToHMI(message, application_manager) {}
-TTSGetSupportedLanguagesRequest::~TTSGetSupportedLanguagesRequest() {
-}
+TTSGetSupportedLanguagesRequest::~TTSGetSupportedLanguagesRequest() {}
void TTSGetSupportedLanguagesRequest::Run() {
LOG4CXX_AUTO_TRACE(logger_);
@@ -53,4 +51,3 @@ void TTSGetSupportedLanguagesRequest::Run() {
} // 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
index 3e34acacdf..79af1d3cc2 100644
--- 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
@@ -39,11 +39,9 @@ namespace commands {
TTSGetSupportedLanguagesResponse::TTSGetSupportedLanguagesResponse(
const MessageSharedPtr& message, ApplicationManager& application_manager)
- : ResponseFromHMI(message, application_manager) {
-}
+ : ResponseFromHMI(message, application_manager) {}
-TTSGetSupportedLanguagesResponse::~TTSGetSupportedLanguagesResponse() {
-}
+TTSGetSupportedLanguagesResponse::~TTSGetSupportedLanguagesResponse() {}
void TTSGetSupportedLanguagesResponse::Run() {
LOG4CXX_AUTO_TRACE(logger_);
@@ -53,8 +51,7 @@ void TTSGetSupportedLanguagesResponse::Run() {
(*message_)[strings::params][hmi_response::code].asInt());
if (hmi_apis::Common_Result::SUCCESS == code) {
- HMICapabilities& hmi_capabilities =
- application_manager_.hmi_capabilities();
+ HMICapabilities& hmi_capabilities = application_manager_.hmi_capabilities();
hmi_capabilities.set_tts_supported_languages(
(*message_)[strings::msg_params][hmi_response::languages]);
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
index 39d20b20df..e7fd335808 100644
--- 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
@@ -36,12 +36,11 @@ namespace application_manager {
namespace commands {
-TTSIsReadyRequest::TTSIsReadyRequest(const MessageSharedPtr& message, ApplicationManager& application_manager)
- : RequestToHMI(message, application_manager) {
-}
+TTSIsReadyRequest::TTSIsReadyRequest(const MessageSharedPtr& message,
+ ApplicationManager& application_manager)
+ : RequestToHMI(message, application_manager) {}
-TTSIsReadyRequest::~TTSIsReadyRequest() {
-}
+TTSIsReadyRequest::~TTSIsReadyRequest() {}
void TTSIsReadyRequest::Run() {
LOG4CXX_AUTO_TRACE(logger_);
@@ -52,4 +51,3 @@ void TTSIsReadyRequest::Run() {
} // 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
index 332a139f55..91efb293c9 100644
--- 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
@@ -31,17 +31,15 @@
*/
#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(const MessageSharedPtr& message,
+ ApplicationManager& application_manager)
+ : ResponseFromHMI(message, application_manager) {}
-TTSIsReadyResponse::~TTSIsReadyResponse() {
-}
+TTSIsReadyResponse::~TTSIsReadyResponse() {}
void TTSIsReadyResponse::Run() {
LOG4CXX_AUTO_TRACE(logger_);
@@ -52,8 +50,7 @@ void TTSIsReadyResponse::Run() {
is_available = object[strings::msg_params][strings::available].asBool();
}
- HMICapabilities& hmi_capabilities =
- application_manager_.hmi_capabilities();
+ HMICapabilities& hmi_capabilities = application_manager_.hmi_capabilities();
hmi_capabilities.set_is_tts_cooperating(is_available);
}
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
index 6139df4eaf..bf035ffe23 100644
--- 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
@@ -38,11 +38,9 @@ namespace commands {
TTSSetGlobalPropertiesRequest::TTSSetGlobalPropertiesRequest(
const MessageSharedPtr& message, ApplicationManager& application_manager)
- : RequestToHMI(message, application_manager) {
-}
+ : RequestToHMI(message, application_manager) {}
-TTSSetGlobalPropertiesRequest::~TTSSetGlobalPropertiesRequest() {
-}
+TTSSetGlobalPropertiesRequest::~TTSSetGlobalPropertiesRequest() {}
void TTSSetGlobalPropertiesRequest::Run() {
LOG4CXX_AUTO_TRACE(logger_);
@@ -53,4 +51,3 @@ void TTSSetGlobalPropertiesRequest::Run() {
} // 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
index 3ab850493f..f494fb1a8e 100644
--- 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
@@ -40,11 +40,9 @@ namespace commands {
TTSSetGlobalPropertiesResponse::TTSSetGlobalPropertiesResponse(
const MessageSharedPtr& message, ApplicationManager& application_manager)
- : ResponseFromHMI(message, application_manager) {
-}
+ : ResponseFromHMI(message, application_manager) {}
-TTSSetGlobalPropertiesResponse::~TTSSetGlobalPropertiesResponse() {
-}
+TTSSetGlobalPropertiesResponse::~TTSSetGlobalPropertiesResponse() {}
void TTSSetGlobalPropertiesResponse::Run() {
LOG4CXX_AUTO_TRACE(logger_);
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
index eaddeb2a18..2e386449d0 100644
--- a/src/components/application_manager/src/commands/hmi/tts_speak_request.cc
+++ b/src/components/application_manager/src/commands/hmi/tts_speak_request.cc
@@ -36,12 +36,11 @@ namespace application_manager {
namespace commands {
-TTSSpeakRequest::TTSSpeakRequest(const MessageSharedPtr& message, ApplicationManager& application_manager)
- : RequestToHMI(message, application_manager) {
-}
+TTSSpeakRequest::TTSSpeakRequest(const MessageSharedPtr& message,
+ ApplicationManager& application_manager)
+ : RequestToHMI(message, application_manager) {}
-TTSSpeakRequest::~TTSSpeakRequest() {
-}
+TTSSpeakRequest::~TTSSpeakRequest() {}
void TTSSpeakRequest::Run() {
LOG4CXX_AUTO_TRACE(logger_);
@@ -52,4 +51,3 @@ void TTSSpeakRequest::Run() {
} // 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
index b0c55b2f7a..5cffdccf34 100644
--- a/src/components/application_manager/src/commands/hmi/tts_speak_response.cc
+++ b/src/components/application_manager/src/commands/hmi/tts_speak_response.cc
@@ -39,12 +39,11 @@ namespace application_manager {
namespace commands {
-TTSSpeakResponse::TTSSpeakResponse(const MessageSharedPtr& message, ApplicationManager& application_manager)
- : ResponseFromHMI(message, application_manager) {
-}
+TTSSpeakResponse::TTSSpeakResponse(const MessageSharedPtr& message,
+ ApplicationManager& application_manager)
+ : ResponseFromHMI(message, application_manager) {}
-TTSSpeakResponse::~TTSSpeakResponse() {
-}
+TTSSpeakResponse::~TTSSpeakResponse() {}
void TTSSpeakResponse::Run() {
LOG4CXX_AUTO_TRACE(logger_);
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
index 903a474b55..c2275dda72 100644
--- 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
@@ -36,12 +36,11 @@ namespace application_manager {
namespace commands {
-TTSStopSpeakingRequest::TTSStopSpeakingRequest(const MessageSharedPtr& message, ApplicationManager& application_manager)
- : RequestToHMI(message, application_manager) {
-}
+TTSStopSpeakingRequest::TTSStopSpeakingRequest(
+ const MessageSharedPtr& message, ApplicationManager& application_manager)
+ : RequestToHMI(message, application_manager) {}
-TTSStopSpeakingRequest::~TTSStopSpeakingRequest() {
-}
+TTSStopSpeakingRequest::~TTSStopSpeakingRequest() {}
void TTSStopSpeakingRequest::Run() {
LOG4CXX_AUTO_TRACE(logger_);
@@ -52,4 +51,3 @@ void TTSStopSpeakingRequest::Run() {
} // 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
index 5e8e286e9b..67d747f464 100644
--- 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
@@ -39,11 +39,9 @@ namespace commands {
TTSStopSpeakingResponse::TTSStopSpeakingResponse(
const MessageSharedPtr& message, ApplicationManager& application_manager)
- : ResponseFromHMI(message, application_manager) {
-}
+ : ResponseFromHMI(message, application_manager) {}
-TTSStopSpeakingResponse::~TTSStopSpeakingResponse() {
-}
+TTSStopSpeakingResponse::~TTSStopSpeakingResponse() {}
void TTSStopSpeakingResponse::Run() {
LOG4CXX_AUTO_TRACE(logger_);
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
index 84d18e8667..c0edad3f80 100644
--- 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
@@ -36,12 +36,11 @@ namespace application_manager {
namespace commands {
-UIAddCommandRequest::UIAddCommandRequest(const MessageSharedPtr& message, ApplicationManager& application_manager)
- : RequestToHMI(message, application_manager) {
-}
+UIAddCommandRequest::UIAddCommandRequest(
+ const MessageSharedPtr& message, ApplicationManager& application_manager)
+ : RequestToHMI(message, application_manager) {}
-UIAddCommandRequest::~UIAddCommandRequest() {
-}
+UIAddCommandRequest::~UIAddCommandRequest() {}
void UIAddCommandRequest::Run() {
LOG4CXX_AUTO_TRACE(logger_);
@@ -52,4 +51,3 @@ void UIAddCommandRequest::Run() {
} // 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
index 96a1a00c3d..a7eaabc91e 100644
--- 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
@@ -37,12 +37,11 @@ namespace application_manager {
namespace commands {
-UIAddCommandResponse::UIAddCommandResponse(const MessageSharedPtr& message, ApplicationManager& application_manager)
- : ResponseFromHMI(message, application_manager) {
-}
+UIAddCommandResponse::UIAddCommandResponse(
+ const MessageSharedPtr& message, ApplicationManager& application_manager)
+ : ResponseFromHMI(message, application_manager) {}
-UIAddCommandResponse::~UIAddCommandResponse() {
-}
+UIAddCommandResponse::~UIAddCommandResponse() {}
void UIAddCommandResponse::Run() {
LOG4CXX_AUTO_TRACE(logger_);
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
index cf080a8d04..f0a233853c 100644
--- 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
@@ -36,12 +36,11 @@ namespace application_manager {
namespace commands {
-UIAddSubmenuRequest::UIAddSubmenuRequest(const MessageSharedPtr& message, ApplicationManager& application_manager)
- : RequestToHMI(message, application_manager) {
-}
+UIAddSubmenuRequest::UIAddSubmenuRequest(
+ const MessageSharedPtr& message, ApplicationManager& application_manager)
+ : RequestToHMI(message, application_manager) {}
-UIAddSubmenuRequest::~UIAddSubmenuRequest() {
-}
+UIAddSubmenuRequest::~UIAddSubmenuRequest() {}
void UIAddSubmenuRequest::Run() {
LOG4CXX_AUTO_TRACE(logger_);
@@ -52,4 +51,3 @@ void UIAddSubmenuRequest::Run() {
} // 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
index cd8d6c9b35..6c6c18cbad 100644
--- 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
@@ -38,12 +38,11 @@ namespace application_manager {
namespace commands {
-UIAddSubmenuResponse::UIAddSubmenuResponse(const MessageSharedPtr& message, ApplicationManager& application_manager)
- : ResponseFromHMI(message, application_manager) {
-}
+UIAddSubmenuResponse::UIAddSubmenuResponse(
+ const MessageSharedPtr& message, ApplicationManager& application_manager)
+ : ResponseFromHMI(message, application_manager) {}
-UIAddSubmenuResponse::~UIAddSubmenuResponse() {
-}
+UIAddSubmenuResponse::~UIAddSubmenuResponse() {}
void UIAddSubmenuResponse::Run() {
LOG4CXX_AUTO_TRACE(logger_);
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
index ae8e8d1e88..44673d4981 100644
--- a/src/components/application_manager/src/commands/hmi/ui_alert_request.cc
+++ b/src/components/application_manager/src/commands/hmi/ui_alert_request.cc
@@ -36,12 +36,11 @@ namespace application_manager {
namespace commands {
-UIAlertRequest::UIAlertRequest(const MessageSharedPtr& message, ApplicationManager& application_manager)
- : RequestToHMI(message, application_manager) {
-}
+UIAlertRequest::UIAlertRequest(const MessageSharedPtr& message,
+ ApplicationManager& application_manager)
+ : RequestToHMI(message, application_manager) {}
-UIAlertRequest::~UIAlertRequest() {
-}
+UIAlertRequest::~UIAlertRequest() {}
void UIAlertRequest::Run() {
LOG4CXX_AUTO_TRACE(logger_);
@@ -52,4 +51,3 @@ void UIAlertRequest::Run() {
} // 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
index 865535e879..6d552a1eb7 100644
--- a/src/components/application_manager/src/commands/hmi/ui_alert_response.cc
+++ b/src/components/application_manager/src/commands/hmi/ui_alert_response.cc
@@ -38,12 +38,11 @@ namespace application_manager {
namespace commands {
-UIAlertResponse::UIAlertResponse(const MessageSharedPtr& message, ApplicationManager& application_manager)
- : ResponseFromHMI(message, application_manager) {
-}
+UIAlertResponse::UIAlertResponse(const MessageSharedPtr& message,
+ ApplicationManager& application_manager)
+ : ResponseFromHMI(message, application_manager) {}
-UIAlertResponse::~UIAlertResponse() {
-}
+UIAlertResponse::~UIAlertResponse() {}
void UIAlertResponse::Run() {
LOG4CXX_AUTO_TRACE(logger_);
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
index 87a9e4ba62..dcc88125fc 100644
--- 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
@@ -38,11 +38,9 @@ namespace commands {
UIChangeRegistrationRequest::UIChangeRegistrationRequest(
const MessageSharedPtr& message, ApplicationManager& application_manager)
- : RequestToHMI(message, application_manager) {
-}
+ : RequestToHMI(message, application_manager) {}
-UIChangeRegistrationRequest::~UIChangeRegistrationRequest() {
-}
+UIChangeRegistrationRequest::~UIChangeRegistrationRequest() {}
void UIChangeRegistrationRequest::Run() {
LOG4CXX_AUTO_TRACE(logger_);
@@ -53,4 +51,3 @@ void UIChangeRegistrationRequest::Run() {
} // 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
index dea74fc2d7..52805a93c8 100644
--- 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
@@ -40,11 +40,9 @@ namespace commands {
UIChangeRegistratioResponse::UIChangeRegistratioResponse(
const MessageSharedPtr& message, ApplicationManager& application_manager)
- : ResponseFromHMI(message, application_manager) {
-}
+ : ResponseFromHMI(message, application_manager) {}
-UIChangeRegistratioResponse::~UIChangeRegistratioResponse() {
-}
+UIChangeRegistratioResponse::~UIChangeRegistratioResponse() {}
void UIChangeRegistratioResponse::Run() {
LOG4CXX_AUTO_TRACE(logger_);
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
index 711067abf8..7bd529e8dc 100644
--- 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
@@ -36,12 +36,11 @@ namespace application_manager {
namespace commands {
-UIDeleteCommandRequest::UIDeleteCommandRequest(const MessageSharedPtr& message, ApplicationManager& application_manager)
- : RequestToHMI(message, application_manager) {
-}
+UIDeleteCommandRequest::UIDeleteCommandRequest(
+ const MessageSharedPtr& message, ApplicationManager& application_manager)
+ : RequestToHMI(message, application_manager) {}
-UIDeleteCommandRequest::~UIDeleteCommandRequest() {
-}
+UIDeleteCommandRequest::~UIDeleteCommandRequest() {}
void UIDeleteCommandRequest::Run() {
LOG4CXX_AUTO_TRACE(logger_);
@@ -52,4 +51,3 @@ void UIDeleteCommandRequest::Run() {
} // 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
index ac03d015f4..74a1bd64c2 100644
--- 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
@@ -40,11 +40,9 @@ namespace commands {
UIDeleteCommandResponse::UIDeleteCommandResponse(
const MessageSharedPtr& message, ApplicationManager& application_manager)
- : ResponseFromHMI(message, application_manager) {
-}
+ : ResponseFromHMI(message, application_manager) {}
-UIDeleteCommandResponse::~UIDeleteCommandResponse() {
-}
+UIDeleteCommandResponse::~UIDeleteCommandResponse() {}
void UIDeleteCommandResponse::Run() {
LOG4CXX_AUTO_TRACE(logger_);
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
index 9143186526..335d97eee4 100644
--- 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
@@ -36,12 +36,11 @@ namespace application_manager {
namespace commands {
-UIDeleteSubmenuRequest::UIDeleteSubmenuRequest(const MessageSharedPtr& message, ApplicationManager& application_manager)
- : RequestToHMI(message, application_manager) {
-}
+UIDeleteSubmenuRequest::UIDeleteSubmenuRequest(
+ const MessageSharedPtr& message, ApplicationManager& application_manager)
+ : RequestToHMI(message, application_manager) {}
-UIDeleteSubmenuRequest::~UIDeleteSubmenuRequest() {
-}
+UIDeleteSubmenuRequest::~UIDeleteSubmenuRequest() {}
void UIDeleteSubmenuRequest::Run() {
LOG4CXX_AUTO_TRACE(logger_);
@@ -52,4 +51,3 @@ void UIDeleteSubmenuRequest::Run() {
} // 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
index 6926bddefa..302343da5e 100644
--- 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
@@ -40,11 +40,9 @@ namespace commands {
UIDeleteSubmenuResponse::UIDeleteSubmenuResponse(
const MessageSharedPtr& message, ApplicationManager& application_manager)
- : ResponseFromHMI(message, application_manager) {
-}
+ : ResponseFromHMI(message, application_manager) {}
-UIDeleteSubmenuResponse::~UIDeleteSubmenuResponse() {
-}
+UIDeleteSubmenuResponse::~UIDeleteSubmenuResponse() {}
void UIDeleteSubmenuResponse::Run() {
LOG4CXX_AUTO_TRACE(logger_);
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
index 7837cc1bca..e1cd11f922 100644
--- 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
@@ -38,11 +38,9 @@ namespace commands {
UIEndAudioPassThruRequest::UIEndAudioPassThruRequest(
const MessageSharedPtr& message, ApplicationManager& application_manager)
- : RequestToHMI(message, application_manager) {
-}
+ : RequestToHMI(message, application_manager) {}
-UIEndAudioPassThruRequest::~UIEndAudioPassThruRequest() {
-}
+UIEndAudioPassThruRequest::~UIEndAudioPassThruRequest() {}
void UIEndAudioPassThruRequest::Run() {
LOG4CXX_AUTO_TRACE(logger_);
@@ -53,4 +51,3 @@ void UIEndAudioPassThruRequest::Run() {
} // 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
index 38d5c75cf8..e9eb596b85 100644
--- 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
@@ -40,11 +40,9 @@ namespace commands {
UIEndAudioPassThruResponse::UIEndAudioPassThruResponse(
const MessageSharedPtr& message, ApplicationManager& application_manager)
- : ResponseFromHMI(message, application_manager) {
-}
+ : ResponseFromHMI(message, application_manager) {}
-UIEndAudioPassThruResponse::~UIEndAudioPassThruResponse() {
-}
+UIEndAudioPassThruResponse::~UIEndAudioPassThruResponse() {}
void UIEndAudioPassThruResponse::Run() {
LOG4CXX_AUTO_TRACE(logger_);
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
index acbd8d277a..0ae4258d6b 100644
--- 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
@@ -38,11 +38,9 @@ namespace commands {
UIGetCapabilitiesRequest::UIGetCapabilitiesRequest(
const MessageSharedPtr& message, ApplicationManager& application_manager)
- : RequestToHMI(message, application_manager) {
-}
+ : RequestToHMI(message, application_manager) {}
-UIGetCapabilitiesRequest::~UIGetCapabilitiesRequest() {
-}
+UIGetCapabilitiesRequest::~UIGetCapabilitiesRequest() {}
void UIGetCapabilitiesRequest::Run() {
LOG4CXX_AUTO_TRACE(logger_);
@@ -53,4 +51,3 @@ void UIGetCapabilitiesRequest::Run() {
} // 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
index e0a07736f4..de0a2f2157 100644
--- 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
@@ -31,24 +31,20 @@
*/
#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) {
-}
+ : ResponseFromHMI(message, application_manager) {}
-UIGetCapabilitiesResponse::~UIGetCapabilitiesResponse() {
-}
+UIGetCapabilitiesResponse::~UIGetCapabilitiesResponse() {}
void UIGetCapabilitiesResponse::Run() {
LOG4CXX_AUTO_TRACE(logger_);
- HMICapabilities& hmi_capabilities =
- application_manager_.hmi_capabilities();
+ HMICapabilities& hmi_capabilities = application_manager_.hmi_capabilities();
const smart_objects::SmartObject& msg_params =
(*message_)[strings::msg_params];
@@ -83,7 +79,6 @@ void UIGetCapabilitiesResponse::Run() {
msg_params[strings::hmi_capabilities][strings::phone_call].asBool());
}
}
-
}
} // namespace commands
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
index 698cdc84ab..59d9eef6e3 100644
--- 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
@@ -36,12 +36,11 @@ namespace application_manager {
namespace commands {
-UIGetLanguageRequest::UIGetLanguageRequest(const MessageSharedPtr& message, ApplicationManager& application_manager)
- : RequestToHMI(message, application_manager) {
-}
+UIGetLanguageRequest::UIGetLanguageRequest(
+ const MessageSharedPtr& message, ApplicationManager& application_manager)
+ : RequestToHMI(message, application_manager) {}
-UIGetLanguageRequest::~UIGetLanguageRequest() {
-}
+UIGetLanguageRequest::~UIGetLanguageRequest() {}
void UIGetLanguageRequest::Run() {
LOG4CXX_AUTO_TRACE(logger_);
@@ -52,4 +51,3 @@ void UIGetLanguageRequest::Run() {
} // 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
index 02527a19d2..dfbdb89804 100644
--- 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
@@ -38,12 +38,11 @@ namespace application_manager {
namespace commands {
-UIGetLanguageResponse::UIGetLanguageResponse(const MessageSharedPtr& message, ApplicationManager& application_manager)
- : ResponseFromHMI(message, application_manager) {
-}
+UIGetLanguageResponse::UIGetLanguageResponse(
+ const MessageSharedPtr& message, ApplicationManager& application_manager)
+ : ResponseFromHMI(message, application_manager) {}
-UIGetLanguageResponse::~UIGetLanguageResponse() {
-}
+UIGetLanguageResponse::~UIGetLanguageResponse() {}
void UIGetLanguageResponse::Run() {
LOG4CXX_AUTO_TRACE(logger_);
@@ -53,17 +52,16 @@ void UIGetLanguageResponse::Run() {
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());
+ (*message_)[strings::msg_params][hmi_response::language].asInt());
}
- application_manager_.hmi_capabilities().
- set_active_ui_language(language);
+ application_manager_.hmi_capabilities().set_active_ui_language(language);
- LOG4CXX_DEBUG(logger_, "Raising event for function_id "
- << function_id()
- << " and correlation_id " << correlation_id());
+ 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());
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
index 55959c5638..598ff39f79 100644
--- 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
@@ -38,11 +38,9 @@ namespace commands {
UIGetSupportedLanguagesRequest::UIGetSupportedLanguagesRequest(
const MessageSharedPtr& message, ApplicationManager& application_manager)
- : RequestToHMI(message, application_manager) {
-}
+ : RequestToHMI(message, application_manager) {}
-UIGetSupportedLanguagesRequest::~UIGetSupportedLanguagesRequest() {
-}
+UIGetSupportedLanguagesRequest::~UIGetSupportedLanguagesRequest() {}
void UIGetSupportedLanguagesRequest::Run() {
LOG4CXX_AUTO_TRACE(logger_);
@@ -53,4 +51,3 @@ void UIGetSupportedLanguagesRequest::Run() {
} // 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
index d7b0d6b359..e5849f5f63 100644
--- 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
@@ -39,11 +39,9 @@ namespace commands {
UIGetSupportedLanguagesResponse::UIGetSupportedLanguagesResponse(
const MessageSharedPtr& message, ApplicationManager& application_manager)
- : ResponseFromHMI(message, application_manager) {
-}
+ : ResponseFromHMI(message, application_manager) {}
-UIGetSupportedLanguagesResponse::~UIGetSupportedLanguagesResponse() {
-}
+UIGetSupportedLanguagesResponse::~UIGetSupportedLanguagesResponse() {}
void UIGetSupportedLanguagesResponse::Run() {
LOG4CXX_AUTO_TRACE(logger_);
@@ -53,8 +51,7 @@ void UIGetSupportedLanguagesResponse::Run() {
(*message_)[strings::params][hmi_response::code].asInt());
if (hmi_apis::Common_Result::SUCCESS == code) {
- HMICapabilities& hmi_capabilities =
- application_manager_.hmi_capabilities();
+ HMICapabilities& hmi_capabilities = application_manager_.hmi_capabilities();
hmi_capabilities.set_ui_supported_languages(
(*message_)[strings::msg_params][hmi_response::languages]);
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
index efe4ddcd2a..463ae9d41d 100644
--- 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
@@ -36,12 +36,11 @@ namespace application_manager {
namespace commands {
-UIIsReadyRequest::UIIsReadyRequest(const MessageSharedPtr& message, ApplicationManager& application_manager)
- : RequestToHMI(message, application_manager) {
-}
+UIIsReadyRequest::UIIsReadyRequest(const MessageSharedPtr& message,
+ ApplicationManager& application_manager)
+ : RequestToHMI(message, application_manager) {}
-UIIsReadyRequest::~UIIsReadyRequest() {
-}
+UIIsReadyRequest::~UIIsReadyRequest() {}
void UIIsReadyRequest::Run() {
LOG4CXX_AUTO_TRACE(logger_);
@@ -52,4 +51,3 @@ void UIIsReadyRequest::Run() {
} // 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
index 98ff58c752..e7fca943bc 100644
--- 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
@@ -31,17 +31,15 @@
*/
#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(const MessageSharedPtr& message,
+ ApplicationManager& application_manager)
+ : ResponseFromHMI(message, application_manager) {}
-UIIsReadyResponse::~UIIsReadyResponse() {
-}
+UIIsReadyResponse::~UIIsReadyResponse() {}
void UIIsReadyResponse::Run() {
LOG4CXX_AUTO_TRACE(logger_);
@@ -52,8 +50,7 @@ void UIIsReadyResponse::Run() {
is_available = object[strings::msg_params][strings::available].asBool();
}
- HMICapabilities& hmi_capabilities =
- application_manager_.hmi_capabilities();
+ HMICapabilities& hmi_capabilities = application_manager_.hmi_capabilities();
hmi_capabilities.set_is_ui_cooperating(is_available);
}
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
index 52a39e1ecc..a88719d303 100644
--- 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
@@ -38,11 +38,9 @@ namespace commands {
UIPerformAudioPassThruRequest::UIPerformAudioPassThruRequest(
const MessageSharedPtr& message, ApplicationManager& application_manager)
- : RequestToHMI(message, application_manager) {
-}
+ : RequestToHMI(message, application_manager) {}
-UIPerformAudioPassThruRequest::~UIPerformAudioPassThruRequest() {
-}
+UIPerformAudioPassThruRequest::~UIPerformAudioPassThruRequest() {}
void UIPerformAudioPassThruRequest::Run() {
LOG4CXX_AUTO_TRACE(logger_);
@@ -53,4 +51,3 @@ void UIPerformAudioPassThruRequest::Run() {
} // 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
index 47299698ab..0736cca526 100644
--- 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
@@ -39,11 +39,9 @@ namespace commands {
UIPerformAudioPassThruResponse::UIPerformAudioPassThruResponse(
const MessageSharedPtr& message, ApplicationManager& application_manager)
- : ResponseFromHMI(message, application_manager) {
-}
+ : ResponseFromHMI(message, application_manager) {}
-UIPerformAudioPassThruResponse::~UIPerformAudioPassThruResponse() {
-}
+UIPerformAudioPassThruResponse::~UIPerformAudioPassThruResponse() {}
void UIPerformAudioPassThruResponse::Run() {
LOG4CXX_AUTO_TRACE(logger_);
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
index 9199ad23e8..82a900f1ae 100644
--- 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
@@ -38,11 +38,9 @@ namespace commands {
UIPerformInteractionRequest::UIPerformInteractionRequest(
const MessageSharedPtr& message, ApplicationManager& application_manager)
- : RequestToHMI(message, application_manager) {
-}
+ : RequestToHMI(message, application_manager) {}
-UIPerformInteractionRequest::~UIPerformInteractionRequest() {
-}
+UIPerformInteractionRequest::~UIPerformInteractionRequest() {}
void UIPerformInteractionRequest::Run() {
LOG4CXX_AUTO_TRACE(logger_);
@@ -53,4 +51,3 @@ void UIPerformInteractionRequest::Run() {
} // 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
index 0d264ee3af..ea78c0cd66 100644
--- 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
@@ -39,11 +39,9 @@ namespace commands {
UIPerformInteractionResponse::UIPerformInteractionResponse(
const MessageSharedPtr& message, ApplicationManager& application_manager)
- : ResponseFromHMI(message, application_manager) {
-}
+ : ResponseFromHMI(message, application_manager) {}
-UIPerformInteractionResponse::~UIPerformInteractionResponse() {
-}
+UIPerformInteractionResponse::~UIPerformInteractionResponse() {}
void UIPerformInteractionResponse::Run() {
LOG4CXX_AUTO_TRACE(logger_);
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
index 3f08393d39..006944d404 100644
--- 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
@@ -38,11 +38,9 @@ namespace commands {
UIScrollableMessageRequest::UIScrollableMessageRequest(
const MessageSharedPtr& message, ApplicationManager& application_manager)
- : RequestToHMI(message, application_manager) {
-}
+ : RequestToHMI(message, application_manager) {}
-UIScrollableMessageRequest::~UIScrollableMessageRequest() {
-}
+UIScrollableMessageRequest::~UIScrollableMessageRequest() {}
void UIScrollableMessageRequest::Run() {
LOG4CXX_AUTO_TRACE(logger_);
@@ -53,4 +51,3 @@ void UIScrollableMessageRequest::Run() {
} // 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
index 129872dec4..c39a99fc61 100644
--- 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
@@ -39,11 +39,9 @@ namespace commands {
UIScrollableMessageResponse::UIScrollableMessageResponse(
const MessageSharedPtr& message, ApplicationManager& application_manager)
- : ResponseFromHMI(message, application_manager) {
-}
+ : ResponseFromHMI(message, application_manager) {}
-UIScrollableMessageResponse::~UIScrollableMessageResponse() {
-}
+UIScrollableMessageResponse::~UIScrollableMessageResponse() {}
void UIScrollableMessageResponse::Run() {
LOG4CXX_AUTO_TRACE(logger_);
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
index 585a2f4101..2666eedfc8 100644
--- 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
@@ -36,12 +36,11 @@ namespace application_manager {
namespace commands {
-UISetAppIconRequest::UISetAppIconRequest(const MessageSharedPtr& message, ApplicationManager& application_manager)
- : RequestToHMI(message, application_manager) {
-}
+UISetAppIconRequest::UISetAppIconRequest(
+ const MessageSharedPtr& message, ApplicationManager& application_manager)
+ : RequestToHMI(message, application_manager) {}
-UISetAppIconRequest::~UISetAppIconRequest() {
-}
+UISetAppIconRequest::~UISetAppIconRequest() {}
void UISetAppIconRequest::Run() {
LOG4CXX_AUTO_TRACE(logger_);
@@ -52,4 +51,3 @@ void UISetAppIconRequest::Run() {
} // 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
index e518b5651b..18fc5a5761 100644
--- 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
@@ -37,12 +37,11 @@ namespace application_manager {
namespace commands {
-UISetAppIconResponse::UISetAppIconResponse(const MessageSharedPtr& message, ApplicationManager& application_manager)
- : ResponseFromHMI(message, application_manager) {
-}
+UISetAppIconResponse::UISetAppIconResponse(
+ const MessageSharedPtr& message, ApplicationManager& application_manager)
+ : ResponseFromHMI(message, application_manager) {}
-UISetAppIconResponse::~UISetAppIconResponse() {
-}
+UISetAppIconResponse::~UISetAppIconResponse() {}
void UISetAppIconResponse::Run() {
LOG4CXX_AUTO_TRACE(logger_);
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
index 46df71803c..cd69c9c8e6 100644
--- 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
@@ -37,11 +37,10 @@ namespace application_manager {
namespace commands {
UiSetDisplayLayoutRequest::UiSetDisplayLayoutRequest(
- const MessageSharedPtr& message, ApplicationManager& application_manager): RequestToHMI(message, application_manager) {
-}
+ const MessageSharedPtr& message, ApplicationManager& application_manager)
+ : RequestToHMI(message, application_manager) {}
-UiSetDisplayLayoutRequest::~UiSetDisplayLayoutRequest() {
-}
+UiSetDisplayLayoutRequest::~UiSetDisplayLayoutRequest() {}
void UiSetDisplayLayoutRequest::Run() {
LOG4CXX_AUTO_TRACE(logger_);
@@ -51,4 +50,3 @@ void UiSetDisplayLayoutRequest::Run() {
} // 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
index 46cea52160..c5a439636f 100644
--- 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
@@ -39,11 +39,10 @@ namespace application_manager {
namespace commands {
UiSetDisplayLayoutResponse::UiSetDisplayLayoutResponse(
- const MessageSharedPtr& message, ApplicationManager& application_manager): ResponseFromHMI(message, application_manager) {
-}
+ const MessageSharedPtr& message, ApplicationManager& application_manager)
+ : ResponseFromHMI(message, application_manager) {}
-UiSetDisplayLayoutResponse::~UiSetDisplayLayoutResponse() {
-}
+UiSetDisplayLayoutResponse::~UiSetDisplayLayoutResponse() {}
void UiSetDisplayLayoutResponse::Run() {
LOG4CXX_AUTO_TRACE(logger_);
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
index 6e26c74c26..8658a043b0 100644
--- 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
@@ -38,11 +38,9 @@ namespace commands {
UISetGlobalPropertiesRequest::UISetGlobalPropertiesRequest(
const MessageSharedPtr& message, ApplicationManager& application_manager)
- : RequestToHMI(message, application_manager) {
-}
+ : RequestToHMI(message, application_manager) {}
-UISetGlobalPropertiesRequest::~UISetGlobalPropertiesRequest() {
-}
+UISetGlobalPropertiesRequest::~UISetGlobalPropertiesRequest() {}
void UISetGlobalPropertiesRequest::Run() {
LOG4CXX_AUTO_TRACE(logger_);
@@ -53,4 +51,3 @@ void UISetGlobalPropertiesRequest::Run() {
} // 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
index 9dc6659e8f..d10c206a7c 100644
--- 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
@@ -39,11 +39,9 @@ namespace commands {
UISetGlobalPropertiesResponse::UISetGlobalPropertiesResponse(
const MessageSharedPtr& message, ApplicationManager& application_manager)
- : ResponseFromHMI(message, application_manager) {
-}
+ : ResponseFromHMI(message, application_manager) {}
-UISetGlobalPropertiesResponse::~UISetGlobalPropertiesResponse() {
-}
+UISetGlobalPropertiesResponse::~UISetGlobalPropertiesResponse() {}
void UISetGlobalPropertiesResponse::Run() {
LOG4CXX_AUTO_TRACE(logger_);
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
index 0f2c66e7e1..955cb1d57b 100644
--- 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
@@ -38,11 +38,9 @@ namespace commands {
UISetMediaClockTimerRequest::UISetMediaClockTimerRequest(
const MessageSharedPtr& message, ApplicationManager& application_manager)
- : RequestToHMI(message, application_manager) {
-}
+ : RequestToHMI(message, application_manager) {}
-UISetMediaClockTimerRequest::~UISetMediaClockTimerRequest() {
-}
+UISetMediaClockTimerRequest::~UISetMediaClockTimerRequest() {}
void UISetMediaClockTimerRequest::Run() {
LOG4CXX_AUTO_TRACE(logger_);
@@ -53,4 +51,3 @@ void UISetMediaClockTimerRequest::Run() {
} // 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
index 66b4168ee5..32acef4994 100644
--- 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
@@ -39,11 +39,9 @@ namespace commands {
UISetMediaClockTimerResponse::UISetMediaClockTimerResponse(
const MessageSharedPtr& message, ApplicationManager& application_manager)
- : ResponseFromHMI(message, application_manager) {
-}
+ : ResponseFromHMI(message, application_manager) {}
-UISetMediaClockTimerResponse::~UISetMediaClockTimerResponse() {
-}
+UISetMediaClockTimerResponse::~UISetMediaClockTimerResponse() {}
void UISetMediaClockTimerResponse::Run() {
LOG4CXX_AUTO_TRACE(logger_);
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
index 3d9310f5e3..9c0e90feff 100644
--- a/src/components/application_manager/src/commands/hmi/ui_show_request.cc
+++ b/src/components/application_manager/src/commands/hmi/ui_show_request.cc
@@ -36,12 +36,11 @@ namespace application_manager {
namespace commands {
-UIShowRequest::UIShowRequest(const MessageSharedPtr& message, ApplicationManager& application_manager)
- : RequestToHMI(message, application_manager) {
-}
+UIShowRequest::UIShowRequest(const MessageSharedPtr& message,
+ ApplicationManager& application_manager)
+ : RequestToHMI(message, application_manager) {}
-UIShowRequest::~UIShowRequest() {
-}
+UIShowRequest::~UIShowRequest() {}
void UIShowRequest::Run() {
LOG4CXX_AUTO_TRACE(logger_);
@@ -52,4 +51,3 @@ void UIShowRequest::Run() {
} // 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
index 644412c0ec..333d9e96c5 100644
--- a/src/components/application_manager/src/commands/hmi/ui_show_response.cc
+++ b/src/components/application_manager/src/commands/hmi/ui_show_response.cc
@@ -36,12 +36,11 @@ namespace application_manager {
namespace commands {
-UIShowResponse::UIShowResponse(const MessageSharedPtr& message, ApplicationManager& application_manager)
- : ResponseFromHMI(message, application_manager) {
-}
+UIShowResponse::UIShowResponse(const MessageSharedPtr& message,
+ ApplicationManager& application_manager)
+ : ResponseFromHMI(message, application_manager) {}
-UIShowResponse::~UIShowResponse() {
-}
+UIShowResponse::~UIShowResponse() {}
void UIShowResponse::Run() {
LOG4CXX_AUTO_TRACE(logger_);
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
index 2a8c383bc4..26e6ed76b0 100644
--- a/src/components/application_manager/src/commands/hmi/ui_slider_request.cc
+++ b/src/components/application_manager/src/commands/hmi/ui_slider_request.cc
@@ -36,12 +36,11 @@ namespace application_manager {
namespace commands {
-UISliderRequest::UISliderRequest(const MessageSharedPtr& message, ApplicationManager& application_manager)
- : RequestToHMI(message, application_manager) {
-}
+UISliderRequest::UISliderRequest(const MessageSharedPtr& message,
+ ApplicationManager& application_manager)
+ : RequestToHMI(message, application_manager) {}
-UISliderRequest::~UISliderRequest() {
-}
+UISliderRequest::~UISliderRequest() {}
void UISliderRequest::Run() {
LOG4CXX_AUTO_TRACE(logger_);
@@ -52,4 +51,3 @@ void UISliderRequest::Run() {
} // 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
index 1a036015b3..091eb50e0d 100644
--- a/src/components/application_manager/src/commands/hmi/ui_slider_response.cc
+++ b/src/components/application_manager/src/commands/hmi/ui_slider_response.cc
@@ -37,12 +37,11 @@ namespace application_manager {
namespace commands {
-UISliderResponse::UISliderResponse(const MessageSharedPtr& message, ApplicationManager& application_manager)
- : ResponseFromHMI(message, application_manager) {
-}
+UISliderResponse::UISliderResponse(const MessageSharedPtr& message,
+ ApplicationManager& application_manager)
+ : ResponseFromHMI(message, application_manager) {}
-UISliderResponse::~UISliderResponse() {
-}
+UISliderResponse::~UISliderResponse() {}
void UISliderResponse::Run() {
LOG4CXX_AUTO_TRACE(logger_);
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
index ccd0858e72..286d269727 100644
--- 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
@@ -36,12 +36,11 @@ namespace application_manager {
namespace commands {
-UpdateAppListRequest::UpdateAppListRequest(const MessageSharedPtr& message, ApplicationManager& application_manager)
- : RequestToHMI(message, application_manager) {
-}
+UpdateAppListRequest::UpdateAppListRequest(
+ const MessageSharedPtr& message, ApplicationManager& application_manager)
+ : RequestToHMI(message, application_manager) {}
-UpdateAppListRequest::~UpdateAppListRequest() {
-}
+UpdateAppListRequest::~UpdateAppListRequest() {}
void UpdateAppListRequest::Run() {
LOG4CXX_AUTO_TRACE(logger_);
@@ -52,5 +51,3 @@ void UpdateAppListRequest::Run() {
} // 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
index f8a1fe5489..6546d03805 100644
--- 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
@@ -36,12 +36,11 @@ namespace application_manager {
namespace commands {
-UpdateAppListResponse::UpdateAppListResponse(const MessageSharedPtr& message, ApplicationManager& application_manager)
- : ResponseFromHMI(message, application_manager) {
-}
+UpdateAppListResponse::UpdateAppListResponse(
+ const MessageSharedPtr& message, ApplicationManager& application_manager)
+ : ResponseFromHMI(message, application_manager) {}
-UpdateAppListResponse::~UpdateAppListResponse() {
-}
+UpdateAppListResponse::~UpdateAppListResponse() {}
void UpdateAppListResponse::Run() {
LOG4CXX_AUTO_TRACE(logger_);
@@ -52,5 +51,3 @@ void UpdateAppListResponse::Run() {
} // 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
index 93da0b9eb8..74d104b36d 100644
--- 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
@@ -32,7 +32,6 @@
#include "application_manager/commands/hmi/update_device_list_request.h"
-
#include "interfaces/HMI_API.h"
#include <unistd.h>
@@ -46,14 +45,14 @@ UpdateDeviceListRequest::UpdateDeviceListRequest(
: RequestToHMI(message, application_manager)
, EventObserver(application_manager_.event_dispatcher()) {}
-UpdateDeviceListRequest::~UpdateDeviceListRequest() {
-}
+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
+ // 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()) {
@@ -71,13 +70,13 @@ 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 : {
+ case hmi_apis::FunctionID::BasicCommunication_OnReady: {
LOG4CXX_INFO(logger_, "received OnReady");
unsubscribe_from_event(hmi_apis::FunctionID::BasicCommunication_OnReady);
termination_condition_.Broadcast();
break;
};
- default : {
+ default: {
LOG4CXX_ERROR(logger_, "Unknown event ");
break;
};
@@ -93,4 +92,3 @@ bool UpdateDeviceListRequest::CleanUp() {
} // 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
index 1a53231a3b..6d9dec92f8 100644
--- 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
@@ -37,11 +37,9 @@ namespace commands {
UpdateDeviceListResponse::UpdateDeviceListResponse(
const MessageSharedPtr& message, ApplicationManager& application_manager)
- : ResponseFromHMI(message, application_manager) {
-}
+ : ResponseFromHMI(message, application_manager) {}
-UpdateDeviceListResponse::~UpdateDeviceListResponse() {
-}
+UpdateDeviceListResponse::~UpdateDeviceListResponse() {}
void UpdateDeviceListResponse::Run() {
LOG4CXX_AUTO_TRACE(logger_);
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
index c476de2665..44f7547964 100644
--- a/src/components/application_manager/src/commands/hmi/update_sdl_request.cc
+++ b/src/components/application_manager/src/commands/hmi/update_sdl_request.cc
@@ -37,12 +37,11 @@ namespace application_manager {
namespace commands {
-UpdateSDLRequest::UpdateSDLRequest(const MessageSharedPtr& message, ApplicationManager& application_manager)
- : RequestToHMI(message, application_manager) {
-}
+UpdateSDLRequest::UpdateSDLRequest(const MessageSharedPtr& message,
+ ApplicationManager& application_manager)
+ : RequestToHMI(message, application_manager) {}
-UpdateSDLRequest::~UpdateSDLRequest() {
-}
+UpdateSDLRequest::~UpdateSDLRequest() {}
void UpdateSDLRequest::Run() {
LOG4CXX_AUTO_TRACE(logger_);
@@ -54,4 +53,3 @@ void UpdateSDLRequest::Run() {
} // 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
index aa5dc32881..0e8978fe89 100644
--- a/src/components/application_manager/src/commands/hmi/update_sdl_response.cc
+++ b/src/components/application_manager/src/commands/hmi/update_sdl_response.cc
@@ -31,17 +31,15 @@
*/
#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(const MessageSharedPtr& message,
+ ApplicationManager& application_manager)
+ : ResponseFromHMI(message, application_manager) {}
-UpdateSDLResponse::~UpdateSDLResponse() {
-}
+UpdateSDLResponse::~UpdateSDLResponse() {}
void UpdateSDLResponse::Run() {
LOG4CXX_AUTO_TRACE(logger_);
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
index 0a06b37817..5fe81fcbd8 100644
--- 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
@@ -36,12 +36,11 @@ namespace application_manager {
namespace commands {
-VIDiagnosticMessageRequest::VIDiagnosticMessageRequest(const MessageSharedPtr& message, ApplicationManager& application_manager)
- : RequestToHMI(message, application_manager) {
-}
+VIDiagnosticMessageRequest::VIDiagnosticMessageRequest(
+ const MessageSharedPtr& message, ApplicationManager& application_manager)
+ : RequestToHMI(message, application_manager) {}
-VIDiagnosticMessageRequest::~VIDiagnosticMessageRequest() {
-}
+VIDiagnosticMessageRequest::~VIDiagnosticMessageRequest() {}
void VIDiagnosticMessageRequest::Run() {
LOG4CXX_AUTO_TRACE(logger_);
@@ -52,4 +51,3 @@ void VIDiagnosticMessageRequest::Run() {
} // 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
index fa3ddbeea0..e19af75b54 100644
--- 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
@@ -37,17 +37,17 @@ namespace application_manager {
namespace commands {
-VIDiagnosticMessageResponse::VIDiagnosticMessageResponse(const MessageSharedPtr& message, ApplicationManager& application_manager)
- : ResponseFromHMI(message, application_manager) {
-}
+VIDiagnosticMessageResponse::VIDiagnosticMessageResponse(
+ const MessageSharedPtr& message, ApplicationManager& application_manager)
+ : ResponseFromHMI(message, application_manager) {}
-VIDiagnosticMessageResponse::~VIDiagnosticMessageResponse() {
-}
+VIDiagnosticMessageResponse::~VIDiagnosticMessageResponse() {}
void VIDiagnosticMessageResponse::Run() {
LOG4CXX_AUTO_TRACE(logger_);
- event_engine::Event event(hmi_apis::FunctionID::VehicleInfo_DiagnosticMessage);
+ event_engine::Event event(
+ hmi_apis::FunctionID::VehicleInfo_DiagnosticMessage);
event.set_smart_object(*message_);
event.raise(application_manager_.event_dispatcher());
}
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
index 3584a8a43b..b373471c43 100644
--- 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
@@ -36,12 +36,11 @@ namespace application_manager {
namespace commands {
-VIGetDTCsRequest::VIGetDTCsRequest(const MessageSharedPtr& message, ApplicationManager& application_manager)
- : RequestToHMI(message, application_manager) {
-}
+VIGetDTCsRequest::VIGetDTCsRequest(const MessageSharedPtr& message,
+ ApplicationManager& application_manager)
+ : RequestToHMI(message, application_manager) {}
-VIGetDTCsRequest::~VIGetDTCsRequest() {
-}
+VIGetDTCsRequest::~VIGetDTCsRequest() {}
void VIGetDTCsRequest::Run() {
LOG4CXX_AUTO_TRACE(logger_);
@@ -52,4 +51,3 @@ void VIGetDTCsRequest::Run() {
} // 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
index e17c97ddd5..3e720f9dbc 100644
--- 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
@@ -37,12 +37,11 @@ namespace application_manager {
namespace commands {
-VIGetDTCsResponse::VIGetDTCsResponse(const MessageSharedPtr& message, ApplicationManager& application_manager)
- : ResponseFromHMI(message, application_manager) {
-}
+VIGetDTCsResponse::VIGetDTCsResponse(const MessageSharedPtr& message,
+ ApplicationManager& application_manager)
+ : ResponseFromHMI(message, application_manager) {}
-VIGetDTCsResponse::~VIGetDTCsResponse() {
-}
+VIGetDTCsResponse::~VIGetDTCsResponse() {}
void VIGetDTCsResponse::Run() {
LOG4CXX_AUTO_TRACE(logger_);
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
index f4a6bb45b7..05424c4967 100644
--- 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
@@ -38,11 +38,9 @@ namespace commands {
VIGetVehicleDataRequest::VIGetVehicleDataRequest(
const MessageSharedPtr& message, ApplicationManager& application_manager)
- : RequestToHMI(message, application_manager) {
-}
+ : RequestToHMI(message, application_manager) {}
-VIGetVehicleDataRequest::~VIGetVehicleDataRequest() {
-}
+VIGetVehicleDataRequest::~VIGetVehicleDataRequest() {}
void VIGetVehicleDataRequest::Run() {
LOG4CXX_AUTO_TRACE(logger_);
@@ -53,4 +51,3 @@ void VIGetVehicleDataRequest::Run() {
} // 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
index b826b90753..2794f6eddd 100644
--- 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
@@ -38,19 +38,17 @@ namespace commands {
VIGetVehicleDataResponse::VIGetVehicleDataResponse(
const MessageSharedPtr& message, ApplicationManager& application_manager)
- : ResponseFromHMI(message, application_manager) {
-}
+ : ResponseFromHMI(message, application_manager) {}
-VIGetVehicleDataResponse::~VIGetVehicleDataResponse() {
-}
+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)) {
+ 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)) {
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
index 465528f402..64a3831e1c 100644
--- 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
@@ -38,11 +38,9 @@ namespace commands {
VIGetVehicleTypeRequest::VIGetVehicleTypeRequest(
const MessageSharedPtr& message, ApplicationManager& application_manager)
- : RequestToHMI(message, application_manager) {
-}
+ : RequestToHMI(message, application_manager) {}
-VIGetVehicleTypeRequest::~VIGetVehicleTypeRequest() {
-}
+VIGetVehicleTypeRequest::~VIGetVehicleTypeRequest() {}
void VIGetVehicleTypeRequest::Run() {
LOG4CXX_AUTO_TRACE(logger_);
@@ -53,4 +51,3 @@ void VIGetVehicleTypeRequest::Run() {
} // 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
index edc74b503c..2369eb7eee 100644
--- 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
@@ -31,24 +31,20 @@
*/
#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) {
-}
+ : ResponseFromHMI(message, application_manager) {}
-VIGetVehicleTypeResponse::~VIGetVehicleTypeResponse() {
-}
+VIGetVehicleTypeResponse::~VIGetVehicleTypeResponse() {}
void VIGetVehicleTypeResponse::Run() {
LOG4CXX_AUTO_TRACE(logger_);
- HMICapabilities& hmi_capabilities =
- application_manager_.hmi_capabilities();
+ HMICapabilities& hmi_capabilities = application_manager_.hmi_capabilities();
hmi_capabilities.set_vehicle_type(
(*message_)[strings::msg_params][hmi_response::vehicle_type]);
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
index 3c75072f85..3ecc2ffe90 100644
--- 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
@@ -36,12 +36,11 @@ namespace application_manager {
namespace commands {
-VIIsReadyRequest::VIIsReadyRequest(const MessageSharedPtr& message, ApplicationManager& application_manager)
- : RequestToHMI(message, application_manager) {
-}
+VIIsReadyRequest::VIIsReadyRequest(const MessageSharedPtr& message,
+ ApplicationManager& application_manager)
+ : RequestToHMI(message, application_manager) {}
-VIIsReadyRequest::~VIIsReadyRequest() {
-}
+VIIsReadyRequest::~VIIsReadyRequest() {}
void VIIsReadyRequest::Run() {
LOG4CXX_AUTO_TRACE(logger_);
@@ -52,4 +51,3 @@ void VIIsReadyRequest::Run() {
} // 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
index d4da852b73..91dae226b6 100644
--- 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
@@ -35,12 +35,11 @@ namespace application_manager {
namespace commands {
-VIIsReadyResponse::VIIsReadyResponse(const MessageSharedPtr& message, ApplicationManager& application_manager)
- : ResponseFromHMI(message, application_manager) {
-}
+VIIsReadyResponse::VIIsReadyResponse(const MessageSharedPtr& message,
+ ApplicationManager& application_manager)
+ : ResponseFromHMI(message, application_manager) {}
-VIIsReadyResponse::~VIIsReadyResponse() {
-}
+VIIsReadyResponse::~VIIsReadyResponse() {}
void VIIsReadyResponse::Run() {
LOG4CXX_AUTO_TRACE(logger_);
@@ -51,8 +50,7 @@ void VIIsReadyResponse::Run() {
is_available = object[strings::msg_params][strings::available].asBool();
}
- HMICapabilities& hmi_capabilities =
- application_manager_.hmi_capabilities();
+ HMICapabilities& hmi_capabilities = application_manager_.hmi_capabilities();
hmi_capabilities.set_is_ivi_cooperating(is_available);
application_manager_.GetPolicyHandler().OnVIIsReady();
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
index 2399182cb6..d72fcb8157 100644
--- 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
@@ -36,12 +36,11 @@ namespace application_manager {
namespace commands {
-VIReadDIDRequest::VIReadDIDRequest(const MessageSharedPtr& message, ApplicationManager& application_manager)
- : RequestToHMI(message, application_manager) {
-}
+VIReadDIDRequest::VIReadDIDRequest(const MessageSharedPtr& message,
+ ApplicationManager& application_manager)
+ : RequestToHMI(message, application_manager) {}
-VIReadDIDRequest::~VIReadDIDRequest() {
-}
+VIReadDIDRequest::~VIReadDIDRequest() {}
void VIReadDIDRequest::Run() {
LOG4CXX_AUTO_TRACE(logger_);
@@ -52,4 +51,3 @@ void VIReadDIDRequest::Run() {
} // 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
index d41df3caa7..568a573f88 100644
--- 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
@@ -32,18 +32,15 @@
#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(const MessageSharedPtr& message,
+ ApplicationManager& application_manager)
+ : ResponseFromHMI(message, application_manager) {}
-VIReadDIDResponse::~VIReadDIDResponse() {
-}
+VIReadDIDResponse::~VIReadDIDResponse() {}
void VIReadDIDResponse::Run() {
LOG4CXX_AUTO_TRACE(logger_);
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
index 85b7d7d9dc..5c953334bb 100644
--- 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
@@ -38,11 +38,9 @@ namespace commands {
VISubscribeVehicleDataRequest::VISubscribeVehicleDataRequest(
const MessageSharedPtr& message, ApplicationManager& application_manager)
- : RequestToHMI(message, application_manager) {
-}
+ : RequestToHMI(message, application_manager) {}
-VISubscribeVehicleDataRequest::~VISubscribeVehicleDataRequest() {
-}
+VISubscribeVehicleDataRequest::~VISubscribeVehicleDataRequest() {}
void VISubscribeVehicleDataRequest::Run() {
LOG4CXX_AUTO_TRACE(logger_);
@@ -53,4 +51,3 @@ void VISubscribeVehicleDataRequest::Run() {
} // 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
index 97a37d9bfd..4df2d9190a 100644
--- 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
@@ -38,17 +38,14 @@ namespace commands {
VISubscribeVehicleDataResponse::VISubscribeVehicleDataResponse(
const MessageSharedPtr& message, ApplicationManager& application_manager)
- : ResponseFromHMI(message, application_manager) {
-}
+ : ResponseFromHMI(message, application_manager) {}
-VISubscribeVehicleDataResponse::~VISubscribeVehicleDataResponse() {
-}
+VISubscribeVehicleDataResponse::~VISubscribeVehicleDataResponse() {}
void VISubscribeVehicleDataResponse::Run() {
LOG4CXX_AUTO_TRACE(logger_);
event_engine::Event event(
- hmi_apis::FunctionID::VehicleInfo_SubscribeVehicleData
- );
+ hmi_apis::FunctionID::VehicleInfo_SubscribeVehicleData);
event.set_smart_object(*message_);
event.raise(application_manager_.event_dispatcher());
}
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
index 073e767a5c..2211cde19c 100644
--- 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
@@ -38,11 +38,9 @@ namespace commands {
VIUnsubscribeVehicleDataRequest::VIUnsubscribeVehicleDataRequest(
const MessageSharedPtr& message, ApplicationManager& application_manager)
- : RequestToHMI(message, application_manager) {
-}
+ : RequestToHMI(message, application_manager) {}
-VIUnsubscribeVehicleDataRequest::~VIUnsubscribeVehicleDataRequest() {
-}
+VIUnsubscribeVehicleDataRequest::~VIUnsubscribeVehicleDataRequest() {}
void VIUnsubscribeVehicleDataRequest::Run() {
LOG4CXX_AUTO_TRACE(logger_);
@@ -53,4 +51,3 @@ void VIUnsubscribeVehicleDataRequest::Run() {
} // 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
index 15df29d5e7..5044f0ef43 100644
--- 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
@@ -38,17 +38,14 @@ namespace commands {
VIUnsubscribeVehicleDataResponse::VIUnsubscribeVehicleDataResponse(
const MessageSharedPtr& message, ApplicationManager& application_manager)
- : ResponseFromHMI(message, application_manager) {
-}
+ : ResponseFromHMI(message, application_manager) {}
-VIUnsubscribeVehicleDataResponse::~VIUnsubscribeVehicleDataResponse() {
-}
+VIUnsubscribeVehicleDataResponse::~VIUnsubscribeVehicleDataResponse() {}
void VIUnsubscribeVehicleDataResponse::Run() {
LOG4CXX_AUTO_TRACE(logger_);
event_engine::Event event(
- hmi_apis::FunctionID::VehicleInfo_UnsubscribeVehicleData
- );
+ hmi_apis::FunctionID::VehicleInfo_UnsubscribeVehicleData);
event.set_smart_object(*message_);
event.raise(application_manager_.event_dispatcher());
}
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
index 28ac3df84c..04af05d4e7 100644
--- 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
@@ -36,12 +36,11 @@ namespace application_manager {
namespace commands {
-VRAddCommandRequest::VRAddCommandRequest(const MessageSharedPtr& message, ApplicationManager& application_manager)
- : RequestToHMI(message, application_manager) {
-}
+VRAddCommandRequest::VRAddCommandRequest(
+ const MessageSharedPtr& message, ApplicationManager& application_manager)
+ : RequestToHMI(message, application_manager) {}
-VRAddCommandRequest::~VRAddCommandRequest() {
-}
+VRAddCommandRequest::~VRAddCommandRequest() {}
void VRAddCommandRequest::Run() {
LOG4CXX_AUTO_TRACE(logger_);
@@ -52,4 +51,3 @@ void VRAddCommandRequest::Run() {
} // 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
index 11581af91d..496bd47605 100644
--- 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
@@ -38,12 +38,11 @@ namespace application_manager {
namespace commands {
-VRAddCommandResponse::VRAddCommandResponse(const MessageSharedPtr& message, ApplicationManager& application_manager)
- : ResponseFromHMI(message, application_manager) {
-}
+VRAddCommandResponse::VRAddCommandResponse(
+ const MessageSharedPtr& message, ApplicationManager& application_manager)
+ : ResponseFromHMI(message, application_manager) {}
-VRAddCommandResponse::~VRAddCommandResponse() {
-}
+VRAddCommandResponse::~VRAddCommandResponse() {}
void VRAddCommandResponse::Run() {
LOG4CXX_AUTO_TRACE(logger_);
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
index 067292ecd0..e64e7cc388 100644
--- 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
@@ -38,11 +38,9 @@ namespace commands {
VRChangeRegistrationRequest::VRChangeRegistrationRequest(
const MessageSharedPtr& message, ApplicationManager& application_manager)
- : RequestToHMI(message, application_manager) {
-}
+ : RequestToHMI(message, application_manager) {}
-VRChangeRegistrationRequest::~VRChangeRegistrationRequest() {
-}
+VRChangeRegistrationRequest::~VRChangeRegistrationRequest() {}
void VRChangeRegistrationRequest::Run() {
LOG4CXX_AUTO_TRACE(logger_);
@@ -53,4 +51,3 @@ void VRChangeRegistrationRequest::Run() {
} // 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
index 1b322a5d7e..8084688c15 100644
--- 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
@@ -39,11 +39,9 @@ namespace commands {
VRChangeRegistrationResponse::VRChangeRegistrationResponse(
const MessageSharedPtr& message, ApplicationManager& application_manager)
- : ResponseFromHMI(message, application_manager) {
-}
+ : ResponseFromHMI(message, application_manager) {}
-VRChangeRegistrationResponse::~VRChangeRegistrationResponse() {
-}
+VRChangeRegistrationResponse::~VRChangeRegistrationResponse() {}
void VRChangeRegistrationResponse::Run() {
LOG4CXX_AUTO_TRACE(logger_);
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
index ed0924c293..1db85529da 100644
--- 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
@@ -36,12 +36,11 @@ namespace application_manager {
namespace commands {
-VRDeleteCommandRequest::VRDeleteCommandRequest(const MessageSharedPtr& message, ApplicationManager& application_manager)
- : RequestToHMI(message, application_manager) {
-}
+VRDeleteCommandRequest::VRDeleteCommandRequest(
+ const MessageSharedPtr& message, ApplicationManager& application_manager)
+ : RequestToHMI(message, application_manager) {}
-VRDeleteCommandRequest::~VRDeleteCommandRequest() {
-}
+VRDeleteCommandRequest::~VRDeleteCommandRequest() {}
void VRDeleteCommandRequest::Run() {
LOG4CXX_AUTO_TRACE(logger_);
@@ -52,4 +51,3 @@ void VRDeleteCommandRequest::Run() {
} // 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
index 42021f23cf..08711be2c8 100644
--- 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
@@ -39,11 +39,9 @@ namespace commands {
VRDeleteCommandResponse::VRDeleteCommandResponse(
const MessageSharedPtr& message, ApplicationManager& application_manager)
- : ResponseFromHMI(message, application_manager) {
-}
+ : ResponseFromHMI(message, application_manager) {}
-VRDeleteCommandResponse::~VRDeleteCommandResponse() {
-}
+VRDeleteCommandResponse::~VRDeleteCommandResponse() {}
void VRDeleteCommandResponse::Run() {
LOG4CXX_AUTO_TRACE(logger_);
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
index 46f9d4a397..3159380c17 100644
--- 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
@@ -37,12 +37,10 @@ namespace application_manager {
namespace commands {
VRGetCapabilitiesRequest::VRGetCapabilitiesRequest(
- const MessageSharedPtr& message, ApplicationManager& application_manager)
- : RequestToHMI(message, application_manager) {
-}
+ const MessageSharedPtr& message, ApplicationManager& application_manager)
+ : RequestToHMI(message, application_manager) {}
-VRGetCapabilitiesRequest::~VRGetCapabilitiesRequest() {
-}
+VRGetCapabilitiesRequest::~VRGetCapabilitiesRequest() {}
void VRGetCapabilitiesRequest::Run() {
LOG4CXX_AUTO_TRACE(logger_);
@@ -53,4 +51,3 @@ void VRGetCapabilitiesRequest::Run() {
} // 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
index f4537ed928..9aa0fc6668 100644
--- 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
@@ -31,27 +31,23 @@
*/
#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) {
-}
+ const MessageSharedPtr& message, ApplicationManager& application_manager)
+ : ResponseFromHMI(message, application_manager) {}
-VRGetCapabilitiesResponse::~VRGetCapabilitiesResponse() {
-}
+VRGetCapabilitiesResponse::~VRGetCapabilitiesResponse() {}
void VRGetCapabilitiesResponse::Run() {
LOG4CXX_AUTO_TRACE(logger_);
- HMICapabilities& hmi_capabilities =
- application_manager_.hmi_capabilities();
+ HMICapabilities& hmi_capabilities = application_manager_.hmi_capabilities();
hmi_capabilities.set_vr_capabilities(
- (*message_)[strings::msg_params][strings::vr_capabilities]);
+ (*message_)[strings::msg_params][strings::vr_capabilities]);
}
} // namespace commands
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
index 098607294d..baf34c8017 100644
--- 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
@@ -36,12 +36,11 @@ namespace application_manager {
namespace commands {
-VRGetLanguageRequest::VRGetLanguageRequest(const MessageSharedPtr& message, ApplicationManager& application_manager)
- : RequestToHMI(message, application_manager) {
-}
+VRGetLanguageRequest::VRGetLanguageRequest(
+ const MessageSharedPtr& message, ApplicationManager& application_manager)
+ : RequestToHMI(message, application_manager) {}
-VRGetLanguageRequest::~VRGetLanguageRequest() {
-}
+VRGetLanguageRequest::~VRGetLanguageRequest() {}
void VRGetLanguageRequest::Run() {
LOG4CXX_AUTO_TRACE(logger_);
@@ -52,4 +51,3 @@ void VRGetLanguageRequest::Run() {
} // 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
index 27ff302089..a55dca44a3 100644
--- 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
@@ -38,12 +38,11 @@ namespace application_manager {
namespace commands {
-VRGetLanguageResponse::VRGetLanguageResponse(const MessageSharedPtr& message, ApplicationManager& application_manager)
- : ResponseFromHMI(message, application_manager) {
-}
+VRGetLanguageResponse::VRGetLanguageResponse(
+ const MessageSharedPtr& message, ApplicationManager& application_manager)
+ : ResponseFromHMI(message, application_manager) {}
-VRGetLanguageResponse::~VRGetLanguageResponse() {
-}
+VRGetLanguageResponse::~VRGetLanguageResponse() {}
void VRGetLanguageResponse::Run() {
LOG4CXX_AUTO_TRACE(logger_);
@@ -53,17 +52,16 @@ void VRGetLanguageResponse::Run() {
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());
+ (*message_)[strings::msg_params][hmi_response::language].asInt());
}
- application_manager_.hmi_capabilities().
- set_active_vr_language(language);
+ application_manager_.hmi_capabilities().set_active_vr_language(language);
- LOG4CXX_DEBUG(logger_, "Raising event for function_id "
- << function_id()
- << " and correlation_id " << correlation_id());
+ 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());
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
index c2de988e93..def4a64699 100644
--- 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
@@ -38,11 +38,9 @@ namespace commands {
VRGetSupportedLanguagesRequest::VRGetSupportedLanguagesRequest(
const MessageSharedPtr& message, ApplicationManager& application_manager)
- : RequestToHMI(message, application_manager) {
-}
+ : RequestToHMI(message, application_manager) {}
-VRGetSupportedLanguagesRequest::~VRGetSupportedLanguagesRequest() {
-}
+VRGetSupportedLanguagesRequest::~VRGetSupportedLanguagesRequest() {}
void VRGetSupportedLanguagesRequest::Run() {
LOG4CXX_AUTO_TRACE(logger_);
@@ -53,4 +51,3 @@ void VRGetSupportedLanguagesRequest::Run() {
} // 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
index a33ba3d48e..e5a6ed0b86 100644
--- 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
@@ -40,11 +40,9 @@ namespace commands {
VRGetSupportedLanguagesResponse::VRGetSupportedLanguagesResponse(
const MessageSharedPtr& message, ApplicationManager& application_manager)
- : ResponseFromHMI(message, application_manager) {
-}
+ : ResponseFromHMI(message, application_manager) {}
-VRGetSupportedLanguagesResponse::~VRGetSupportedLanguagesResponse() {
-}
+VRGetSupportedLanguagesResponse::~VRGetSupportedLanguagesResponse() {}
void VRGetSupportedLanguagesResponse::Run() {
LOG4CXX_AUTO_TRACE(logger_);
@@ -54,8 +52,7 @@ void VRGetSupportedLanguagesResponse::Run() {
(*message_)[strings::params][hmi_response::code].asInt());
if (hmi_apis::Common_Result::SUCCESS == code) {
- HMICapabilities& hmi_capabilities =
- application_manager_.hmi_capabilities();
+ HMICapabilities& hmi_capabilities = application_manager_.hmi_capabilities();
hmi_capabilities.set_vr_supported_languages(
(*message_)[strings::msg_params][hmi_response::languages]);
}
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
index b72b5b378b..8c5e8bd49b 100644
--- 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
@@ -36,12 +36,11 @@ namespace application_manager {
namespace commands {
-VRIsReadyRequest::VRIsReadyRequest(const MessageSharedPtr& message, ApplicationManager& application_manager)
- : RequestToHMI(message, application_manager) {
-}
+VRIsReadyRequest::VRIsReadyRequest(const MessageSharedPtr& message,
+ ApplicationManager& application_manager)
+ : RequestToHMI(message, application_manager) {}
-VRIsReadyRequest::~VRIsReadyRequest() {
-}
+VRIsReadyRequest::~VRIsReadyRequest() {}
void VRIsReadyRequest::Run() {
LOG4CXX_AUTO_TRACE(logger_);
@@ -52,4 +51,3 @@ void VRIsReadyRequest::Run() {
} // 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
index 75e39120a8..617742a28c 100644
--- 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
@@ -31,17 +31,15 @@
*/
#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(const MessageSharedPtr& message,
+ ApplicationManager& application_manager)
+ : ResponseFromHMI(message, application_manager) {}
-VRIsReadyResponse::~VRIsReadyResponse() {
-}
+VRIsReadyResponse::~VRIsReadyResponse() {}
void VRIsReadyResponse::Run() {
LOG4CXX_AUTO_TRACE(logger_);
@@ -52,8 +50,7 @@ void VRIsReadyResponse::Run() {
is_available = object[strings::msg_params][strings::available].asBool();
}
- HMICapabilities& hmi_capabilities =
- application_manager_.hmi_capabilities();
+ HMICapabilities& hmi_capabilities = application_manager_.hmi_capabilities();
hmi_capabilities.set_is_vr_cooperating(is_available);
}
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
index c86f4f23b3..c4646e59f4 100644
--- 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
@@ -38,11 +38,9 @@ namespace commands {
VRPerformInteractionRequest::VRPerformInteractionRequest(
const MessageSharedPtr& message, ApplicationManager& application_manager)
- : RequestToHMI(message, application_manager) {
-}
+ : RequestToHMI(message, application_manager) {}
-VRPerformInteractionRequest::~VRPerformInteractionRequest() {
-}
+VRPerformInteractionRequest::~VRPerformInteractionRequest() {}
void VRPerformInteractionRequest::Run() {
LOG4CXX_AUTO_TRACE(logger_);
@@ -53,4 +51,3 @@ void VRPerformInteractionRequest::Run() {
} // 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
index a8b8231114..bb5ceb3755 100644
--- 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
@@ -38,11 +38,9 @@ namespace commands {
VRPerformInteractionResponse::VRPerformInteractionResponse(
const MessageSharedPtr& message, ApplicationManager& application_manager)
- : ResponseFromHMI(message, application_manager) {
-}
+ : ResponseFromHMI(message, application_manager) {}
-VRPerformInteractionResponse::~VRPerformInteractionResponse() {
-}
+VRPerformInteractionResponse::~VRPerformInteractionResponse() {}
void VRPerformInteractionResponse::Run() {
LOG4CXX_AUTO_TRACE(logger_);
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
index 6f45826d5a..03bdfadd66 100644
--- a/src/components/application_manager/src/commands/mobile/add_command_request.cc
+++ b/src/components/application_manager/src/commands/mobile/add_command_request.cc
@@ -46,18 +46,17 @@ 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() {
-}
+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_);
@@ -78,14 +77,14 @@ void AddCommandRequest::Run() {
}
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_);
+ 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);
+ logger_, "MessageHelper::VerifyImage return " << verification_result);
SendResponse(false, verification_result);
return;
}
@@ -98,13 +97,13 @@ void AddCommandRequest::Run() {
}
if (app->FindCommand(
- (*message_)[strings::msg_params][strings::cmd_id].asUInt())) {
+ (*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;
+ bool data_exist = false;
if ((*message_)[strings::msg_params].keyExists(strings::menu_params)) {
if (!CheckCommandName(app)) {
@@ -112,21 +111,21 @@ void AddCommandRequest::Run() {
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())) {
+ 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");
+ 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 (((*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;
@@ -142,18 +141,16 @@ void AddCommandRequest::Run() {
}
if (IsWhiteSpaceExist()) {
- LOG4CXX_ERROR(logger_,
- "Incoming add command has contains \t\n \\t \\n");
+ 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]);
+ 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);
+ 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];
@@ -162,10 +159,11 @@ void AddCommandRequest::Run() {
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())) {
+ 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];
}
@@ -173,8 +171,8 @@ void AddCommandRequest::Run() {
send_ui_ = true;
}
- smart_objects::SmartObject vr_msg_params = smart_objects::SmartObject(
- smart_objects::SmartType_Map);
+ 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];
@@ -207,10 +205,10 @@ bool AddCommandRequest::CheckCommandName(ApplicationConstSharedPtr app) {
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();
+ 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) {
@@ -220,13 +218,15 @@ bool AddCommandRequest::CheckCommandName(ApplicationConstSharedPtr app) {
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();
+ 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()) &&
+ 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"
+ LOG4CXX_INFO(logger_,
+ "AddCommandRequest::CheckCommandName received"
" command name already exist in same level menu");
return false;
}
@@ -244,23 +244,23 @@ bool AddCommandRequest::CheckCommandVRSynonym(ApplicationConstSharedPtr app) {
CommandsMap::const_iterator it = commands.begin();
for (; commands.end() != it; ++it) {
-
- if(!(*it->second).keyExists(strings::vr_commands)) {
+ 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) {
+ 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();
+ (*message_)[strings::msg_params][strings::vr_commands][j]
+ .asCustomString();
if (vr_cmd_i.CompareIgnoreCase(vr_cmd_j)) {
- LOG4CXX_INFO(logger_, "AddCommandRequest::CheckCommandVRSynonym"
+ LOG4CXX_INFO(logger_,
+ "AddCommandRequest::CheckCommandVRSynonym"
" received command vr synonym already exist");
return false;
}
@@ -277,11 +277,12 @@ bool AddCommandRequest::CheckCommandParentId(ApplicationConstSharedPtr app) {
const int32_t parent_id =
(*message_)[strings::msg_params][strings::menu_params]
- [hmi_request::parent_id].asInt();
+ [hmi_request::parent_id].asInt();
smart_objects::SmartObject* parent = app->FindSubMenu(parent_id);
if (!parent) {
- LOG4CXX_INFO(logger_, "AddCommandRequest::CheckCommandParentId received"
+ LOG4CXX_INFO(logger_,
+ "AddCommandRequest::CheckCommandParentId received"
" submenu doesn't exist");
return false;
}
@@ -303,7 +304,8 @@ void AddCommandRequest::on_event(const event_engine::Event& event) {
}
smart_objects::SmartObject msg_param(smart_objects::SmartType_Map);
- msg_param[strings::cmd_id] = (*message_)[strings::msg_params][strings::cmd_id];
+ msg_param[strings::cmd_id] =
+ (*message_)[strings::msg_params][strings::cmd_id];
msg_param[strings::app_id] = application->app_id();
switch (event.id()) {
@@ -330,7 +332,7 @@ void AddCommandRequest::on_event(const event_engine::Event& event) {
break;
}
default: {
- LOG4CXX_ERROR(logger_,"Received unknown event" << event.id());
+ LOG4CXX_ERROR(logger_, "Received unknown event" << event.id());
return;
}
}
@@ -344,93 +346,83 @@ void AddCommandRequest::on_event(const event_engine::Event& event) {
}
smart_objects::SmartObject msg_params(smart_objects::SmartType_Map);
- msg_params[strings::cmd_id] = (*message_)[strings::msg_params][strings::cmd_id];
+ 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);
+ vr_result_,
+ hmi_apis::Common_Result::INVALID_ENUM,
+ hmi_apis::Common_Result::UNSUPPORTED_RESOURCE);
const bool is_ui_ivalid_unsupported =
Compare<hmi_apis::Common_Result::eType, EQ, ONE>(
- ui_result_,
- hmi_apis::Common_Result::INVALID_ENUM,
- hmi_apis::Common_Result::UNSUPPORTED_RESOURCE);
+ ui_result_,
+ hmi_apis::Common_Result::INVALID_ENUM,
+ 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);
+ 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);
- 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);
+ 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);
- bool result =
- (is_no_ui_error && is_no_vr_error) ||
- (is_no_ui_error && is_vr_invalid_unsupported) ||
- (is_no_vr_error && is_ui_ivalid_unsupported);
+ bool result = (is_no_ui_error && is_no_vr_error) ||
+ (is_no_ui_error && is_vr_invalid_unsupported) ||
+ (is_no_vr_error && is_ui_ivalid_unsupported);
const bool is_vr_or_ui_warning =
Compare<hmi_apis::Common_Result::eType, EQ, ONE>(
- hmi_apis::Common_Result::WARNINGS,
- ui_result_,
- vr_result_);
+ hmi_apis::Common_Result::WARNINGS, ui_result_, vr_result_);
- if (!result &&
- hmi_apis::Common_Result::REJECTED == ui_result_) {
+ if (!result && hmi_apis::Common_Result::REJECTED == ui_result_) {
result_code = MessageHelper::HMIToMobileResult(ui_result_);
} else if (is_vr_or_ui_warning) {
result_code = mobile_apis::Result::WARNINGS;
} else {
- result_code = MessageHelper::HMIToMobileResult(
- std::max(ui_result_, vr_result_));
+ result_code =
+ MessageHelper::HMIToMobileResult(std::max(ui_result_, vr_result_));
}
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);
+ 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;
+ 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());
+ application->RemoveCommand(
+ (*message_)[strings::msg_params][strings::cmd_id].asUInt());
result = false;
}
}
- if(BothSend() &&
- hmi_apis::Common_Result::SUCCESS == ui_result_ &&
- !is_no_vr_error) {
-
- result_code =
- vr_result_ == hmi_apis::Common_Result::REJECTED
- ? mobile_apis::Result::REJECTED :
- mobile_apis::Result::GENERIC_ERROR;
+ if (BothSend() && hmi_apis::Common_Result::SUCCESS == ui_result_ &&
+ !is_no_vr_error) {
+ 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());
+ application->RemoveCommand(
+ (*message_)[strings::msg_params][strings::cmd_id].asUInt());
result = false;
}
@@ -451,7 +443,7 @@ bool AddCommandRequest::IsWhiteSpaceExist() {
if ((*message_)[strings::msg_params].keyExists(strings::menu_params)) {
str = (*message_)[strings::msg_params][strings::menu_params]
- [strings::menu_name].asCharArray();
+ [strings::menu_name].asCharArray();
if (!CheckSyntax(str)) {
LOG4CXX_ERROR(logger_, "Invalid menu name syntax check failed.");
return true;
@@ -463,8 +455,8 @@ bool AddCommandRequest::IsWhiteSpaceExist() {
(*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();
+ str = (*message_)[strings::msg_params][strings::vr_commands][i]
+ .asCharArray();
if (!CheckSyntax(str)) {
LOG4CXX_ERROR(logger_, "Invalid vr_commands syntax check failed");
return true;
@@ -473,8 +465,8 @@ bool AddCommandRequest::IsWhiteSpaceExist() {
}
if ((*message_)[strings::msg_params].keyExists(strings::cmd_icon)) {
- str = (*message_)[strings::msg_params]
- [strings::cmd_icon][strings::value].asCharArray();
+ 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;
@@ -489,19 +481,19 @@ bool AddCommandRequest::BothSend() const {
void AddCommandRequest::RemoveCommand() {
LOG4CXX_AUTO_TRACE(logger_);
- ApplicationSharedPtr app = application_manager_.application(
- connection_key());
+ 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::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());
+ 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
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
index 21f881a574..fc468f9c57 100644
--- a/src/components/application_manager/src/commands/mobile/add_command_response.cc
+++ b/src/components/application_manager/src/commands/mobile/add_command_response.cc
@@ -33,17 +33,15 @@
#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(const MessageSharedPtr& message,
+ ApplicationManager& application_manager)
+ : CommandResponseImpl(message, application_manager) {}
-AddCommandResponse::~AddCommandResponse() {
-}
+AddCommandResponse::~AddCommandResponse() {}
void AddCommandResponse::Run() {
LOG4CXX_AUTO_TRACE(logger_);
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
index c1d364b6cd..83f137ac19 100644
--- 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
@@ -40,18 +40,16 @@ namespace application_manager {
namespace commands {
-AddSubMenuRequest::AddSubMenuRequest(const MessageSharedPtr& message, ApplicationManager& application_manager)
- : CommandRequestImpl(message, application_manager) {
-}
+AddSubMenuRequest::AddSubMenuRequest(const MessageSharedPtr& message,
+ ApplicationManager& application_manager)
+ : CommandRequestImpl(message, application_manager) {}
-AddSubMenuRequest::~AddSubMenuRequest() {
-}
+AddSubMenuRequest::~AddSubMenuRequest() {}
void AddSubMenuRequest::Run() {
LOG4CXX_AUTO_TRACE(logger_);
- ApplicationSharedPtr app = application_manager_.application(
- connection_key());
+ ApplicationSharedPtr app = application_manager_.application(connection_key());
if (!app) {
LOG4CXX_ERROR(logger_, "NULL pointer");
@@ -82,14 +80,14 @@ void AddSubMenuRequest::Run() {
return;
}
- smart_objects::SmartObject msg_params = smart_objects::SmartObject(
- smart_objects::SmartType_Map);
+ 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::position] =
+ (*message_)[strings::msg_params][strings::position];
}
msg_params[strings::menu_params][strings::menu_name] =
(*message_)[strings::msg_params][strings::menu_name];
@@ -109,14 +107,13 @@ void AddSubMenuRequest::on_event(const event_engine::Event& event) {
static_cast<mobile_apis::Result::eType>(
message[strings::params][hmi_response::code].asInt());
- const bool result =
- Compare<mobile_api::Result::eType, EQ, ONE>(
- result_code,
- mobile_api::Result::SUCCESS,
- mobile_api::Result::WARNINGS);
+ 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());
+ application_manager_.application(connection_key());
if (!application) {
LOG4CXX_ERROR(logger_, "NULL pointer");
@@ -124,10 +121,10 @@ void AddSubMenuRequest::on_event(const event_engine::Event& event) {
}
if (result) {
- application->AddSubMenu((*message_)[strings::msg_params]
- [strings::menu_id].asInt(),
- (*message_)[strings::msg_params]);
- }
+ application->AddSubMenu(
+ (*message_)[strings::msg_params][strings::menu_id].asInt(),
+ (*message_)[strings::msg_params]);
+ }
SendResponse(result, result_code, NULL, &(message[strings::msg_params]));
if (result) {
application->UpdateHash();
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
index 02672edadd..1fbdb4e66c 100644
--- 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
@@ -39,12 +39,11 @@ namespace application_manager {
namespace commands {
-AddSubMenuResponse::AddSubMenuResponse(const MessageSharedPtr& message, ApplicationManager& application_manager)
- : CommandResponseImpl(message, application_manager) {
-}
+AddSubMenuResponse::AddSubMenuResponse(const MessageSharedPtr& message,
+ ApplicationManager& application_manager)
+ : CommandResponseImpl(message, application_manager) {}
-AddSubMenuResponse::~AddSubMenuResponse() {
-}
+AddSubMenuResponse::~AddSubMenuResponse() {}
void AddSubMenuResponse::Run() {
LOG4CXX_AUTO_TRACE(logger_);
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
index 7c0c557b62..d771553962 100644
--- a/src/components/application_manager/src/commands/mobile/alert_maneuver_request.cc
+++ b/src/components/application_manager/src/commands/mobile/alert_maneuver_request.cc
@@ -43,15 +43,15 @@ namespace application_manager {
namespace commands {
-AlertManeuverRequest::AlertManeuverRequest(const MessageSharedPtr& message, ApplicationManager& application_manager)
- : CommandRequestImpl(message, application_manager),
- tts_speak_result_code_(mobile_apis::Result::INVALID_ENUM),
- navi_alert_maneuver_result_code_(mobile_apis::Result::INVALID_ENUM) {
+AlertManeuverRequest::AlertManeuverRequest(
+ const MessageSharedPtr& message, ApplicationManager& application_manager)
+ : CommandRequestImpl(message, application_manager)
+ , tts_speak_result_code_(mobile_apis::Result::INVALID_ENUM)
+ , navi_alert_maneuver_result_code_(mobile_apis::Result::INVALID_ENUM) {
subscribe_on_event(hmi_apis::FunctionID::TTS_OnResetTimeout);
}
-AlertManeuverRequest::~AlertManeuverRequest() {
-}
+AlertManeuverRequest::~AlertManeuverRequest() {}
void AlertManeuverRequest::Run() {
LOG4CXX_AUTO_TRACE(logger_);
@@ -80,11 +80,13 @@ void AlertManeuverRequest::Run() {
return;
}
- //ProcessSoftButtons checks strings on the contents incorrect character
+ // 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_);
+ 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!");
@@ -103,25 +105,25 @@ void AlertManeuverRequest::Run() {
}
}
- smart_objects::SmartObject msg_params = smart_objects::SmartObject(
- smart_objects::SmartType_Map);
+ 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());
+ (*message_)[strings::msg_params][strings::soft_buttons];
+ MessageHelper::SubscribeApplicationToSoftButton(
+ (*message_)[strings::msg_params], app, function_id());
}
pending_requests_.Add(hmi_apis::FunctionID::Navigation_AlertManeuver);
- SendHMIRequest(hmi_apis::FunctionID::Navigation_AlertManeuver,
- &msg_params, true);
+ 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);
+ 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];
@@ -146,7 +148,7 @@ void AlertManeuverRequest::on_event(const event_engine::Event& event) {
navi_alert_maneuver_result_code_ =
static_cast<mobile_apis::Result::eType>(
- message[strings::params][hmi_response::code].asInt());
+ message[strings::params][hmi_response::code].asInt());
break;
}
@@ -155,8 +157,7 @@ void AlertManeuverRequest::on_event(const event_engine::Event& event) {
pending_requests_.Remove(event_id);
- tts_speak_result_code_ =
- static_cast<mobile_apis::Result::eType>(
+ tts_speak_result_code_ = static_cast<mobile_apis::Result::eType>(
message[strings::params][hmi_response::code].asInt());
break;
@@ -169,9 +170,9 @@ void AlertManeuverRequest::on_event(const event_engine::Event& event) {
break;
}
default: {
- LOG4CXX_ERROR(logger_,"Received unknown event" << event.id());
- SendResponse(false, mobile_apis::Result::INVALID_ENUM,
- "Received unknown event");
+ LOG4CXX_ERROR(logger_, "Received unknown event" << event.id());
+ SendResponse(
+ false, mobile_apis::Result::INVALID_ENUM, "Received unknown event");
return;
}
}
@@ -189,47 +190,44 @@ void AlertManeuverRequest::on_event(const event_engine::Event& event) {
hmi_apis::Common_Result::eType navi_result =
MessageHelper::MobileToHMIResult(navi_alert_maneuver_result_code_);
- const bool is_tts_ok =
- Compare<hmi_apis::Common_Result::eType, EQ, ONE>(
- tts_result,
- hmi_apis::Common_Result::SUCCESS,
- hmi_apis::Common_Result::UNSUPPORTED_RESOURCE,
- hmi_apis::Common_Result::WARNINGS,
- hmi_apis::Common_Result::INVALID_ENUM);
+ const bool is_tts_ok = Compare<hmi_apis::Common_Result::eType, EQ, ONE>(
+ tts_result,
+ hmi_apis::Common_Result::SUCCESS,
+ hmi_apis::Common_Result::UNSUPPORTED_RESOURCE,
+ hmi_apis::Common_Result::WARNINGS,
+ hmi_apis::Common_Result::INVALID_ENUM);
const bool is_no_navi_error =
Compare<hmi_apis::Common_Result::eType, EQ, ONE>(
- navi_result,
- hmi_apis::Common_Result::SUCCESS,
- hmi_apis::Common_Result::WARNINGS);
+ navi_result,
+ hmi_apis::Common_Result::SUCCESS,
+ hmi_apis::Common_Result::WARNINGS);
const bool result =
(is_tts_ok && is_no_navi_error) ||
(hmi_apis::Common_Result::SUCCESS == tts_result &&
- hmi_apis::Common_Result::UNSUPPORTED_RESOURCE == navi_result );
+ hmi_apis::Common_Result::UNSUPPORTED_RESOURCE == navi_result);
mobile_apis::Result::eType result_code =
static_cast<mobile_apis::Result::eType>(
- std::max(tts_speak_result_code_, navi_alert_maneuver_result_code_));
+ std::max(tts_speak_result_code_, navi_alert_maneuver_result_code_));
std::string return_info =
message[strings::msg_params][hmi_response::message].asString();
const bool is_tts_or_navi_warning =
Compare<hmi_apis::Common_Result::eType, EQ, ONE>(
- hmi_apis::Common_Result::WARNINGS,
- tts_result,
- navi_result);
+ hmi_apis::Common_Result::WARNINGS, tts_result, navi_result);
- if (result &&
- (is_tts_or_navi_warning ||
- hmi_apis::Common_Result::UNSUPPORTED_RESOURCE == tts_result)) {
+ if (result && (is_tts_or_navi_warning ||
+ hmi_apis::Common_Result::UNSUPPORTED_RESOURCE == tts_result)) {
result_code = mobile_apis::Result::WARNINGS;
- return_info =
- std::string("Unsupported phoneme type sent in a prompt");
+ return_info = std::string("Unsupported phoneme type sent in a prompt");
}
- SendResponse(result, result_code, return_info.c_str(),
+ SendResponse(result,
+ result_code,
+ return_info.c_str(),
&(message[strings::msg_params]));
}
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
index c1c2cdafc0..2f441594c2 100644
--- a/src/components/application_manager/src/commands/mobile/alert_maneuver_response.cc
+++ b/src/components/application_manager/src/commands/mobile/alert_maneuver_response.cc
@@ -39,12 +39,11 @@ namespace application_manager {
namespace commands {
-AlertManeuverResponse::AlertManeuverResponse(const MessageSharedPtr& message, ApplicationManager& application_manager)
- : CommandResponseImpl(message, application_manager) {
-}
+AlertManeuverResponse::AlertManeuverResponse(
+ const MessageSharedPtr& message, ApplicationManager& application_manager)
+ : CommandResponseImpl(message, application_manager) {}
-AlertManeuverResponse::~AlertManeuverResponse() {
-}
+AlertManeuverResponse::~AlertManeuverResponse() {}
void AlertManeuverResponse::Run() {
LOG4CXX_AUTO_TRACE(logger_);
diff --git a/src/components/application_manager/src/commands/mobile/alert_request.cc b/src/components/application_manager/src/commands/mobile/alert_request.cc
index 66ce432a95..53910a05b7 100644
--- a/src/components/application_manager/src/commands/mobile/alert_request.cc
+++ b/src/components/application_manager/src/commands/mobile/alert_request.cc
@@ -47,21 +47,21 @@ namespace commands {
namespace smart_objects = NsSmartDeviceLink::NsSmartObjects;
-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_(mobile_apis::Result::INVALID_ENUM),
- tts_speak_result_(mobile_apis::Result::INVALID_ENUM) {
+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_(mobile_apis::Result::INVALID_ENUM)
+ , tts_speak_result_(mobile_apis::Result::INVALID_ENUM) {
subscribe_on_event(hmi_apis::FunctionID::UI_OnResetTimeout);
subscribe_on_event(hmi_apis::FunctionID::TTS_OnResetTimeout);
}
-AlertRequest::~AlertRequest() {
-}
+AlertRequest::~AlertRequest() {}
bool AlertRequest::Init() {
/* Timeout in milliseconds.
@@ -74,9 +74,11 @@ bool AlertRequest::Init() {
default_timeout_ = def_value;
}
- // If soft buttons are present, SDL will not use initiate timeout tracking for response.
+ // 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 "
+ LOG4CXX_INFO(logger_,
+ "Request contains soft buttons - request timeout "
"will be set to 0.");
default_timeout_ = 0;
}
@@ -87,23 +89,25 @@ bool AlertRequest::Init() {
void AlertRequest::Run() {
LOG4CXX_AUTO_TRACE(logger_);
- uint32_t app_id = (*message_)[strings::params][strings::connection_key]
- .asInt();
+ 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);
+ 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();
+ 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())) {
+ (*message_)[strings::msg_params][strings::play_tone].asBool())) {
awaiting_tts_speak_response_ = true;
}
@@ -115,11 +119,13 @@ void AlertRequest::Run() {
void AlertRequest::onTimeOut() {
LOG4CXX_AUTO_TRACE(logger_);
- if (false == (*message_)[strings::msg_params].keyExists(strings::soft_buttons)) {
+ if (false ==
+ (*message_)[strings::msg_params].keyExists(strings::soft_buttons)) {
CommandRequestImpl::onTimeOut();
return;
}
- LOG4CXX_INFO(logger_, "Default timeout ignored. "
+ LOG4CXX_INFO(logger_,
+ "Default timeout ignored. "
"AlertRequest with soft buttons wait timeout on HMI side");
}
@@ -132,11 +138,12 @@ void AlertRequest::on_event(const event_engine::Event& event) {
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_);
+ 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;
@@ -157,12 +164,11 @@ void AlertRequest::on_event(const event_engine::Event& event) {
message[strings::params][hmi_response::code].asInt());
// Mobile Alert request is successful when UI_Alert is successful
- const bool is_alert_ok =
- Compare<mobile_api::Result::eType, EQ, ONE>(
- result_code,
- mobile_apis::Result::SUCCESS,
- mobile_apis::Result::UNSUPPORTED_RESOURCE,
- mobile_apis::Result::WARNINGS);
+ const bool is_alert_ok = Compare<mobile_api::Result::eType, EQ, ONE>(
+ result_code,
+ mobile_apis::Result::SUCCESS,
+ mobile_apis::Result::UNSUPPORTED_RESOURCE,
+ mobile_apis::Result::WARNINGS);
is_alert_succeeded_ = is_alert_ok;
alert_result_ = result_code;
@@ -186,7 +192,7 @@ void AlertRequest::on_event(const event_engine::Event& event) {
break;
}
default: {
- LOG4CXX_ERROR(logger_,"Received unknown event" << event.id());
+ LOG4CXX_ERROR(logger_, "Received unknown event" << event.id());
return;
}
}
@@ -197,15 +203,12 @@ void AlertRequest::on_event(const event_engine::Event& event) {
const bool is_tts_alert_unsupported =
Compare<mobile_api::Result::eType, EQ, ALL>(
- mobile_api::Result::UNSUPPORTED_RESOURCE,
- tts_speak_result_,
- alert_result_);
+ mobile_api::Result::UNSUPPORTED_RESOURCE,
+ tts_speak_result_,
+ alert_result_);
- const bool is_alert_ok =
- Compare<mobile_api::Result::eType, EQ, ONE>(
- alert_result_,
- mobile_api::Result::SUCCESS,
- mobile_api::Result::WARNINGS);
+ const bool is_alert_ok = Compare<mobile_api::Result::eType, EQ, ONE>(
+ alert_result_, mobile_api::Result::SUCCESS, mobile_api::Result::WARNINGS);
std::string response_info;
if (mobile_apis::Result::UNSUPPORTED_RESOURCE == tts_speak_result_ &&
@@ -215,24 +218,24 @@ void AlertRequest::on_event(const event_engine::Event& event) {
response_info = "Unsupported phoneme type sent in a prompt";
} else if (is_tts_alert_unsupported) {
alert_result_ = mobile_apis::Result::WARNINGS;
- response_info = "Unsupported phoneme type sent in a prompt and "
+ response_info =
+ "Unsupported phoneme type sent in a prompt and "
"unsupported image sent in soft buttons";
} else if (mobile_apis::Result::UNSUPPORTED_RESOURCE == tts_speak_result_ &&
is_alert_ok) {
alert_result_ = mobile_apis::Result::WARNINGS;
response_info = "Unsupported phoneme type sent in a prompt";
} else if (mobile_apis::Result::SUCCESS == tts_speak_result_ &&
- (mobile_apis::Result::INVALID_ENUM == alert_result_ &&
- !is_ui_alert_sent_)) {
+ (mobile_apis::Result::INVALID_ENUM == alert_result_ &&
+ !is_ui_alert_sent_)) {
alert_result_ = mobile_apis::Result::SUCCESS;
is_alert_succeeded_ = true;
}
const bool is_tts_not_ok =
- Compare<mobile_api::Result::eType, EQ, ONE>(
- tts_speak_result_,
- mobile_api::Result::ABORTED,
- mobile_api::Result::REJECTED);
+ Compare<mobile_api::Result::eType, EQ, ONE>(tts_speak_result_,
+ mobile_api::Result::ABORTED,
+ mobile_api::Result::REJECTED);
if (is_tts_not_ok && !is_ui_alert_sent_) {
is_alert_succeeded_ = false;
@@ -243,15 +246,15 @@ void AlertRequest::on_event(const event_engine::Event& event) {
alert_result_ = mobile_apis::Result::WARNINGS;
}
- SendResponse(is_alert_succeeded_, alert_result_,
+ SendResponse(is_alert_succeeded_,
+ alert_result_,
response_info.empty() ? NULL : response_info.c_str(),
&alert_response_params_);
}
bool AlertRequest::Validate(uint32_t app_id) {
LOG4CXX_AUTO_TRACE(logger_);
- ApplicationSharedPtr app =
- application_manager_.application(app_id);
+ ApplicationSharedPtr app = application_manager_.application(app_id);
if (!app) {
LOG4CXX_ERROR(logger_, "No application associated with session key");
@@ -261,8 +264,8 @@ bool AlertRequest::Validate(uint32_t app_id) {
if (mobile_apis::HMILevel::HMI_BACKGROUND == app->hmi_level() &&
app->IsCommandLimitsExceeded(
- static_cast<mobile_apis::FunctionID::eType>(function_id()),
- application_manager::TLimitSource::POLICY_TABLE)) {
+ 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;
@@ -273,11 +276,13 @@ bool AlertRequest::Validate(uint32_t app_id) {
return false;
}
- //ProcessSoftButtons checks strings on the contents incorrect character
+ // 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_);
+ MessageHelper::ProcessSoftButtons((*message_)[strings::msg_params],
+ app,
+ application_manager_.GetPolicyHandler(),
+ application_manager_);
if (mobile_apis::Result::SUCCESS != processing_result) {
LOG4CXX_ERROR(logger_, "INVALID_DATA!");
@@ -286,13 +291,13 @@ bool AlertRequest::Validate(uint32_t app_id) {
}
// 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()))) {
+ 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,
+ SendResponse(false,
+ mobile_apis::Result::INVALID_DATA,
"Mandatory parameters are missing");
return false;
}
@@ -302,22 +307,21 @@ bool AlertRequest::Validate(uint32_t app_id) {
void AlertRequest::SendAlertRequest(int32_t app_id) {
LOG4CXX_AUTO_TRACE(logger_);
- ApplicationSharedPtr app =
- application_manager_.application(app_id);
+ ApplicationSharedPtr app = application_manager_.application(app_id);
- smart_objects::SmartObject msg_params = smart_objects::SmartObject(
- smart_objects::SmartType_Map);
+ 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);
+ 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++;
+ 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] =
@@ -330,7 +334,7 @@ void AlertRequest::SendAlertRequest(int32_t app_id) {
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];
+ (*message_)[strings::msg_params][strings::alert_text3];
}
// softButtons
@@ -347,7 +351,7 @@ void AlertRequest::SendAlertRequest(int32_t app_id) {
// NAVI platform progressIndicator
if ((*message_)[strings::msg_params].keyExists(strings::progress_indicator)) {
msg_params[strings::progress_indicator] =
- (*message_)[strings::msg_params][strings::progress_indicator];
+ (*message_)[strings::msg_params][strings::progress_indicator];
}
// PASA Alert type
@@ -359,14 +363,14 @@ void AlertRequest::SendAlertRequest(int32_t app_id) {
// 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;
SendHMIRequest(hmi_apis::FunctionID::UI_Alert, &msg_params, true);
}
}
-void AlertRequest::SendSpeakRequest(int32_t app_id, bool tts_chunks_exists,
+void AlertRequest::SendSpeakRequest(int32_t app_id,
+ bool tts_chunks_exists,
size_t length_tts_chunks) {
LOG4CXX_AUTO_TRACE(logger_);
using namespace hmi_apis;
@@ -396,7 +400,7 @@ bool AlertRequest::CheckStringsOfAlertRequest() {
str = (*message_)[strings::msg_params][strings::alert_text1].asCharArray();
if (!CheckSyntax(str)) {
LOG4CXX_ERROR(logger_, "Invalid alert_text_1 syntax check failed");
- return false;
+ return false;
}
}
@@ -404,7 +408,7 @@ bool AlertRequest::CheckStringsOfAlertRequest() {
str = (*message_)[strings::msg_params][strings::alert_text2].asCharArray();
if (!CheckSyntax(str)) {
LOG4CXX_ERROR(logger_, "Invalid alert_text_2 syntax check failed");
- return false;
+ return false;
}
}
@@ -412,7 +416,7 @@ bool AlertRequest::CheckStringsOfAlertRequest() {
str = (*message_)[strings::msg_params][strings::alert_text3].asCharArray();
if (!CheckSyntax(str)) {
LOG4CXX_ERROR(logger_, "Invalid alert_text_3 syntax check failed");
- return false;
+ return false;
}
}
@@ -432,8 +436,8 @@ bool AlertRequest::CheckStringsOfAlertRequest() {
bool AlertRequest::HasHmiResponsesToWait() {
LOG4CXX_AUTO_TRACE(logger_);
- return awaiting_ui_alert_response_ || awaiting_tts_speak_response_
- || awaiting_tts_stop_speaking_response_;
+ return awaiting_ui_alert_response_ || awaiting_tts_speak_response_ ||
+ awaiting_tts_stop_speaking_response_;
}
} // namespace commands
diff --git a/src/components/application_manager/src/commands/mobile/alert_response.cc b/src/components/application_manager/src/commands/mobile/alert_response.cc
index 5c7918731c..f8ca487eae 100644
--- a/src/components/application_manager/src/commands/mobile/alert_response.cc
+++ b/src/components/application_manager/src/commands/mobile/alert_response.cc
@@ -41,12 +41,11 @@ namespace application_manager {
namespace commands {
-AlertResponse::AlertResponse(const MessageSharedPtr& message, ApplicationManager& application_manager)
- : CommandResponseImpl(message, application_manager) {
-}
+AlertResponse::AlertResponse(const MessageSharedPtr& message,
+ ApplicationManager& application_manager)
+ : CommandResponseImpl(message, application_manager) {}
-AlertResponse::~AlertResponse() {
-}
+AlertResponse::~AlertResponse() {}
void AlertResponse::Run() {
LOG4CXX_AUTO_TRACE(logger_);
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
index 84ce79611a..63339fdc33 100644
--- a/src/components/application_manager/src/commands/mobile/change_registration_request.cc
+++ b/src/components/application_manager/src/commands/mobile/change_registration_request.cc
@@ -42,16 +42,14 @@
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());
- }
+ 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_;
- };
+ private:
+ const custom_str::CustomString& app_id_;
+};
}
namespace application_manager {
@@ -60,20 +58,19 @@ 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) {
-}
+ : 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() {
-}
+ChangeRegistrationRequest::~ChangeRegistrationRequest() {}
void ChangeRegistrationRequest::Run() {
LOG4CXX_AUTO_TRACE(logger_);
using namespace smart_objects;
- const HMICapabilities& hmi_capabilities = application_manager_.hmi_capabilities();
+ const HMICapabilities& hmi_capabilities =
+ application_manager_.hmi_capabilities();
ApplicationSharedPtr app = application_manager_.application(connection_key());
if (!app) {
@@ -113,10 +110,9 @@ void ChangeRegistrationRequest::Run() {
const int32_t language = msg_params[strings::language].asInt();
- if (false ==
- (IsLanguageSupportedByUI(hmi_language) &&
- IsLanguageSupportedByVR(language) &&
- IsLanguageSupportedByTTS(language))) {
+ if (false == (IsLanguageSupportedByUI(hmi_language) &&
+ IsLanguageSupportedByVR(language) &&
+ IsLanguageSupportedByTTS(language))) {
LOG4CXX_ERROR(logger_, "Language is not supported");
SendResponse(false, mobile_apis::Result::REJECTED);
return;
@@ -146,11 +142,10 @@ void ChangeRegistrationRequest::Run() {
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]);
+ msg_params[strings::ngn_media_screen_app_name]);
}
- SendHMIRequest(hmi_apis::FunctionID::UI_ChangeRegistration,
- &ui_params, true);
+ SendHMIRequest(hmi_apis::FunctionID::UI_ChangeRegistration, &ui_params, true);
// VR processing
SmartObject vr_params = SmartObject(SmartType_Map);
@@ -160,10 +155,9 @@ void ChangeRegistrationRequest::Run() {
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]);
+ app->set_vr_synonyms(msg_params[strings::vr_synonyms]);
}
- SendHMIRequest(hmi_apis::FunctionID::VR_ChangeRegistration,
- &vr_params, true);
+ SendHMIRequest(hmi_apis::FunctionID::VR_ChangeRegistration, &vr_params, true);
// TTS processing
SmartObject tts_params = SmartObject(SmartType_Map);
@@ -176,19 +170,17 @@ void ChangeRegistrationRequest::Run() {
app->set_tts_name(msg_params[strings::tts_name]);
}
- SendHMIRequest(hmi_apis::FunctionID::TTS_ChangeRegistration,
- &tts_params, true);
+ SendHMIRequest(
+ hmi_apis::FunctionID::TTS_ChangeRegistration, &tts_params, true);
}
bool ChangeRegistrationRequest::AllHmiResponsesSuccess(
- const hmi_apis::Common_Result::eType ui,
- const hmi_apis::Common_Result::eType vr,
- const hmi_apis::Common_Result::eType tts) {
-
- return
- hmi_apis::Common_Result::SUCCESS == ui &&
- hmi_apis::Common_Result::SUCCESS == vr &&
- hmi_apis::Common_Result::SUCCESS == tts;
+ const hmi_apis::Common_Result::eType ui,
+ const hmi_apis::Common_Result::eType vr,
+ const hmi_apis::Common_Result::eType tts) {
+ return hmi_apis::Common_Result::SUCCESS == ui &&
+ hmi_apis::Common_Result::SUCCESS == vr &&
+ hmi_apis::Common_Result::SUCCESS == tts;
}
void ChangeRegistrationRequest::on_event(const event_engine::Event& event) {
@@ -236,28 +228,30 @@ void ChangeRegistrationRequest::on_event(const event_engine::Event& event) {
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()));
+ (*message_)[strings::msg_params][strings::hmi_display_language]
+ .asInt()));
}
- if (hmi_apis::Common_Result::SUCCESS == vr_result_
- || hmi_apis::Common_Result::SUCCESS == tts_result_) {
+ 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()));
}
- int32_t greates_result_code = std::max(std::max(ui_result_, vr_result_),
- tts_result_);
+ int32_t greates_result_code =
+ std::max(std::max(ui_result_, vr_result_), tts_result_);
(*message_)[strings::params][strings::function_id] =
- mobile_apis::FunctionID::eType::ChangeRegistrationID;
+ mobile_apis::FunctionID::eType::ChangeRegistrationID;
SendResponse(AllHmiResponsesSuccess(ui_result_, vr_result_, tts_result_),
static_cast<mobile_apis::Result::eType>(greates_result_code),
- NULL, &(message[strings::msg_params]));
+ NULL,
+ &(message[strings::msg_params]));
} else {
LOG4CXX_INFO(logger_,
- "There are some pending responses from HMI."
- "ChangeRegistrationRequest still waiting.");
+ "There are some pending responses from HMI."
+ "ChangeRegistrationRequest still waiting.");
}
}
@@ -357,10 +351,10 @@ bool ChangeRegistrationRequest::IsWhiteSpaceExist() {
}
}
- 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 ((*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");
@@ -436,20 +430,19 @@ mobile_apis::Result::eType ChangeRegistrationRequest::CheckCoincidence() {
return mobile_apis::Result::DUPLICATE_NAME;
}
} // end vr check
- } // application for end
+ } // 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());
+ ApplicationSharedPtr app = application_manager_.application(connection_key());
if (!app) {
- LOG4CXX_ERROR(logger_, "Can't find appication with connection key "
- << connection_key());
+ LOG4CXX_ERROR(logger_,
+ "Can't find appication with connection key "
+ << connection_key());
return false;
}
@@ -458,20 +451,20 @@ bool ChangeRegistrationRequest::IsNicknameAllowed(
policy::StringArray app_nicknames;
policy::StringArray app_hmi_types;
- bool init_result = application_manager_.GetPolicyHandler()
- .GetInitialAppData(policy_app_id, &app_nicknames, &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);
+ << 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);
+ 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.");
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
index 0c41534e73..210cae64c5 100644
--- a/src/components/application_manager/src/commands/mobile/change_registration_response.cc
+++ b/src/components/application_manager/src/commands/mobile/change_registration_response.cc
@@ -33,18 +33,15 @@
#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) {
-}
+ : CommandResponseImpl(message, application_manager) {}
-ChangeRegistrationResponse::~ChangeRegistrationResponse() {
-}
+ChangeRegistrationResponse::~ChangeRegistrationResponse() {}
void ChangeRegistrationResponse::Run() {
LOG4CXX_AUTO_TRACE(logger_);
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
index 8f2d531032..b602601f26 100644
--- 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
@@ -46,12 +46,11 @@ namespace application_manager {
namespace commands {
CreateInteractionChoiceSetRequest::CreateInteractionChoiceSetRequest(
- const MessageSharedPtr& message, ApplicationManager& application_manager)
- : CommandRequestImpl(message, application_manager),
- expected_chs_count_(0),
- received_chs_count_(0),
- error_from_hmi_(false) {
-}
+ const MessageSharedPtr& message, ApplicationManager& application_manager)
+ : CommandRequestImpl(message, application_manager)
+ , expected_chs_count_(0)
+ , received_chs_count_(0)
+ , error_from_hmi_(false) {}
CreateInteractionChoiceSetRequest::~CreateInteractionChoiceSetRequest() {
LOG4CXX_AUTO_TRACE(logger_);
@@ -60,8 +59,7 @@ CreateInteractionChoiceSetRequest::~CreateInteractionChoiceSetRequest() {
void CreateInteractionChoiceSetRequest::Run() {
LOG4CXX_AUTO_TRACE(logger_);
using namespace mobile_apis;
- ApplicationSharedPtr app = application_manager_.application(
- connection_key());
+ ApplicationSharedPtr app = application_manager_.application(connection_key());
if (!app) {
LOG4CXX_ERROR(logger_, "NULL pointer");
@@ -73,32 +71,37 @@ void CreateInteractionChoiceSetRequest::Run() {
++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)) {
+ 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_);
+ (*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)) {
+ 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_);
+ (*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);
+ SendResponse(false, Result::INVALID_DATA);
return;
}
}
- choice_set_id_ = (*message_)[strings::msg_params]
- [strings::interaction_choice_set_id].asInt();
+ 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.");
+ LOG4CXX_ERROR(logger_,
+ "Choice set with id " << choice_set_id_ << " is not found.");
SendResponse(false, Result::INVALID_ID);
return;
}
@@ -115,7 +118,7 @@ void CreateInteractionChoiceSetRequest::Run() {
}
mobile_apis::Result::eType CreateInteractionChoiceSetRequest::CheckChoiceSet(
- ApplicationConstSharedPtr app) {
+ ApplicationConstSharedPtr app) {
using namespace smart_objects;
LOG4CXX_AUTO_TRACE(logger_);
@@ -130,15 +133,15 @@ mobile_apis::Result::eType CreateInteractionChoiceSetRequest::CheckChoiceSet(
std::pair<std::set<uint32_t>::iterator, bool> ins_res =
choice_id_set.insert((*choice_set_it)[strings::choice_id].asInt());
if (!ins_res.second) {
- LOG4CXX_ERROR(logger_, "Choise with ID "
- << (*choice_set_it)[strings::choice_id].asInt()
- << " already exists");
+ LOG4CXX_ERROR(logger_,
+ "Choise with ID "
+ << (*choice_set_it)[strings::choice_id].asInt()
+ << " already exists");
return mobile_apis::Result::INVALID_ID;
}
if (IsWhiteSpaceExist(*choice_set_it)) {
- LOG4CXX_ERROR(logger_,
- "Incoming choice set has contains \t\n \\t \\n");
+ LOG4CXX_ERROR(logger_, "Incoming choice set has contains \t\n \\t \\n");
return mobile_apis::Result::INVALID_DATA;
}
}
@@ -146,24 +149,26 @@ mobile_apis::Result::eType CreateInteractionChoiceSetRequest::CheckChoiceSet(
}
bool CreateInteractionChoiceSetRequest::compareSynonyms(
- const NsSmartDeviceLink::NsSmartObjects::SmartObject& choice1,
- const NsSmartDeviceLink::NsSmartObjects::SmartObject& choice2) {
+ const NsSmartDeviceLink::NsSmartObjects::SmartObject& choice1,
+ const NsSmartDeviceLink::NsSmartObjects::SmartObject& choice2) {
smart_objects::SmartArray* vr_cmds_1 =
- choice1[strings::vr_commands].asArray();
+ choice1[strings::vr_commands].asArray();
DCHECK(vr_cmds_1 != NULL);
smart_objects::SmartArray* vr_cmds_2 =
- choice2[strings::vr_commands].asArray();
+ 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(),
+ 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());
+ LOG4CXX_INFO(logger_,
+ "Incoming choice set has duplicated VR synonyms "
+ << it->asString());
return true;
}
@@ -171,13 +176,13 @@ bool CreateInteractionChoiceSetRequest::compareSynonyms(
}
bool CreateInteractionChoiceSetRequest::compareStr(
- const NsSmartDeviceLink::NsSmartObjects::SmartObject& str1,
- const NsSmartDeviceLink::NsSmartObjects::SmartObject& str2) {
+ 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) {
+ const smart_objects::SmartObject& choice_set) {
LOG4CXX_AUTO_TRACE(logger_);
const char* str = NULL;
@@ -204,8 +209,7 @@ bool CreateInteractionChoiceSetRequest::IsWhiteSpaceExist(
}
if (choice_set.keyExists(strings::vr_commands)) {
- const size_t len =
- choice_set[strings::vr_commands].length();
+ 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();
@@ -227,8 +231,9 @@ bool CreateInteractionChoiceSetRequest::IsWhiteSpaceExist(
if (choice_set.keyExists(strings::secondary_image)) {
str = choice_set[strings::secondary_image][strings::value].asCharArray();
if (!CheckSyntax(str)) {
- LOG4CXX_ERROR(logger_, "Invalid secondary_image value. "
- "Syntax check failed");
+ LOG4CXX_ERROR(logger_,
+ "Invalid secondary_image value. "
+ "Syntax check failed");
return true;
}
}
@@ -236,15 +241,15 @@ bool CreateInteractionChoiceSetRequest::IsWhiteSpaceExist(
}
void CreateInteractionChoiceSetRequest::SendVRAddCommandRequests(
- application_manager::ApplicationSharedPtr const app) {
+ 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);
+ 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];
+ msg_params[strings::grammar_id] = choice_set[strings::grammar_id];
const uint32_t choice_count = choice_set[strings::choice_set].length();
SetAllowedToTerminate(false);
@@ -254,17 +259,18 @@ void CreateInteractionChoiceSetRequest::SendVRAddCommandRequests(
{
sync_primitives::AutoLock error_lock(error_from_hmi_lock_);
if (error_from_hmi_) {
- LOG4CXX_WARN(logger_, "Error from HMI received. Stop sending VRCommands");
+ 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);
+ 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];
+ 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();
@@ -273,8 +279,9 @@ void CreateInteractionChoiceSetRequest::SendVRAddCommandRequests(
VRCommandInfo vr_command(vr_cmd_id);
sent_commands_map_[vr_corr_id] = vr_command;
- LOG4CXX_DEBUG(logger_, "VR_command sent corr_id "
- << vr_corr_id << " cmd_id " << vr_corr_id);
+ 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_);
@@ -289,12 +296,13 @@ void CreateInteractionChoiceSetRequest::on_event(
const smart_objects::SmartObject& message = event.smart_object();
if (event.id() == hmi_apis::FunctionID::VR_AddCommand) {
received_chs_count_++;
- LOG4CXX_DEBUG(logger_, "Got VR.AddCommand response, there are "
- << expected_chs_count_ - received_chs_count_
- << " more to wait.");
+ LOG4CXX_DEBUG(logger_,
+ "Got VR.AddCommand response, there are "
+ << expected_chs_count_ - received_chs_count_
+ << " more to wait.");
- uint32_t corr_id = static_cast<uint32_t>(message[strings::params]
- [strings::correlation_id].asUInt());
+ uint32_t corr_id = static_cast<uint32_t>(
+ message[strings::params][strings::correlation_id].asUInt());
{
sync_primitives::AutoLock commands_lock(vr_commands_lock_);
SentCommandsMap::iterator it = sent_commands_map_.find(corr_id);
@@ -303,21 +311,20 @@ void CreateInteractionChoiceSetRequest::on_event(
return;
}
- Common_Result::eType vr_result = static_cast<Common_Result::eType>(
- message[strings::params][hmi_response::code].asInt());
+ Common_Result::eType vr_result = static_cast<Common_Result::eType>(
+ message[strings::params][hmi_response::code].asInt());
- const bool is_vr_no_error =
- Compare<Common_Result::eType, EQ, ONE>(
- vr_result,
- Common_Result::SUCCESS,
- Common_Result::WARNINGS);
+ const bool is_vr_no_error = Compare<Common_Result::eType, EQ, ONE>(
+ vr_result, Common_Result::SUCCESS, Common_Result::WARNINGS);
if (is_vr_no_error) {
VRCommandInfo& vr_command = it->second;
vr_command.succesful_response_received_ = true;
} else {
- LOG4CXX_DEBUG(logger_, "Hmi response is not Success: " << vr_result
- << ". Stop sending VRAddCommand requests");
+ LOG4CXX_DEBUG(logger_,
+ "Hmi response is not Success: "
+ << vr_result
+ << ". Stop sending VRAddCommand requests");
if (!error_from_hmi_) {
error_from_hmi_ = true;
SendResponse(false, GetMobileResultCode(vr_result));
@@ -346,15 +353,14 @@ void CreateInteractionChoiceSetRequest::onTimeOut() {
// 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());
+ application_manager_.TerminateRequest(connection_key(), correlation_id());
}
void CreateInteractionChoiceSetRequest::DeleteChoices() {
LOG4CXX_AUTO_TRACE(logger_);
ApplicationSharedPtr application =
- application_manager_.application(connection_key());
+ application_manager_.application(connection_key());
if (!application) {
LOG4CXX_ERROR(logger_, "NULL pointer");
return;
@@ -372,9 +378,9 @@ void CreateInteractionChoiceSetRequest::DeleteChoices() {
msg_param[strings::cmd_id] = vr_command_info.cmd_id_;
SendHMIRequest(hmi_apis::FunctionID::VR_DeleteCommand, &msg_param);
} else {
- LOG4CXX_WARN(
- logger_, "Succesfull response has not been received for cmd_id = "
- << vr_command_info.cmd_id_);
+ LOG4CXX_WARN(logger_,
+ "Succesfull response has not been received for cmd_id = "
+ << vr_command_info.cmd_id_);
}
}
sent_commands_map_.clear();
@@ -397,8 +403,7 @@ void CreateInteractionChoiceSetRequest::OnAllHMIResponsesReceived() {
DeleteChoices();
}
- application_manager_.TerminateRequest(
- connection_key(), correlation_id());
+ application_manager_.TerminateRequest(connection_key(), correlation_id());
}
} // namespace commands
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
index cac23a4bc9..0cc137d6a0 100644
--- 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
@@ -42,11 +42,9 @@ namespace commands {
CreateInteractionChoiceSetResponse::CreateInteractionChoiceSetResponse(
const MessageSharedPtr& message, ApplicationManager& application_manager)
- : CommandResponseImpl(message, application_manager) {
-}
+ : CommandResponseImpl(message, application_manager) {}
-CreateInteractionChoiceSetResponse::~CreateInteractionChoiceSetResponse() {
-}
+CreateInteractionChoiceSetResponse::~CreateInteractionChoiceSetResponse() {}
void CreateInteractionChoiceSetResponse::Run() {
LOG4CXX_AUTO_TRACE(logger_);
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
index baebbe26cd..9a7b92f7b8 100644
--- a/src/components/application_manager/src/commands/mobile/delete_command_request.cc
+++ b/src/components/application_manager/src/commands/mobile/delete_command_request.cc
@@ -43,24 +43,23 @@ 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() {
-}
+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());
+ ApplicationSharedPtr application =
+ application_manager_.application(connection_key());
if (!application) {
LOG4CXX_ERROR(logger_, "Application is not registered");
@@ -79,8 +78,8 @@ void DeleteCommandRequest::Run() {
return;
}
- smart_objects::SmartObject msg_params = smart_objects::SmartObject(
- smart_objects::SmartType_Map);
+ smart_objects::SmartObject msg_params =
+ smart_objects::SmartObject(smart_objects::SmartType_Map);
msg_params[strings::cmd_id] =
(*message_)[strings::msg_params][strings::cmd_id];
@@ -123,20 +122,22 @@ void DeleteCommandRequest::on_event(const event_engine::Event& event) {
is_ui_received_ = true;
const int result = message[strings::params][hmi_response::code].asInt();
ui_result_ = static_cast<hmi_apis::Common_Result::eType>(result);
- LOG4CXX_DEBUG(logger_, "Received UI_DeleteCommand event with result "
- << MessageHelper::HMIResultToString(ui_result_));
+ LOG4CXX_DEBUG(logger_,
+ "Received UI_DeleteCommand event with result "
+ << MessageHelper::HMIResultToString(ui_result_));
break;
}
case hmi_apis::FunctionID::VR_DeleteCommand: {
is_vr_received_ = true;
const int result = message[strings::params][hmi_response::code].asInt();
vr_result_ = static_cast<hmi_apis::Common_Result::eType>(result);
- LOG4CXX_DEBUG(logger_, "Received VR_DeleteCommand event with result "
- << MessageHelper::HMIResultToString(vr_result_));
+ LOG4CXX_DEBUG(logger_,
+ "Received VR_DeleteCommand event with result "
+ << MessageHelper::HMIResultToString(vr_result_));
break;
}
default: {
- LOG4CXX_ERROR(logger_,"Received unknown event" << event.id());
+ LOG4CXX_ERROR(logger_, "Received unknown event" << event.id());
return;
}
}
@@ -160,34 +161,32 @@ void DeleteCommandRequest::on_event(const event_engine::Event& event) {
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());
+ LOG4CXX_ERROR(logger_,
+ "Command id " << cmd_id << " not found for "
+ "application with connection key "
+ << connection_key());
return;
}
const bool is_vr_success_invalid =
Compare<hmi_apis::Common_Result::eType, EQ, ONE>(
- vr_result_,
- hmi_apis::Common_Result::SUCCESS,
- hmi_apis::Common_Result::INVALID_ENUM);
+ vr_result_,
+ hmi_apis::Common_Result::SUCCESS,
+ hmi_apis::Common_Result::INVALID_ENUM);
const bool is_ui_success_invalid =
Compare<hmi_apis::Common_Result::eType, EQ, ONE>(
- ui_result_,
- hmi_apis::Common_Result::SUCCESS,
- hmi_apis::Common_Result::INVALID_ENUM);
+ ui_result_,
+ hmi_apis::Common_Result::SUCCESS,
+ hmi_apis::Common_Result::INVALID_ENUM);
const bool is_vr_ui_invalid =
Compare<hmi_apis::Common_Result::eType, EQ, ALL>(
- hmi_apis::Common_Result::INVALID_ENUM,
- vr_result_,
- ui_result_);
+ hmi_apis::Common_Result::INVALID_ENUM, vr_result_, ui_result_);
const bool is_vr_or_ui_warning =
Compare<hmi_apis::Common_Result::eType, EQ, ONE>(
- hmi_apis::Common_Result::WARNINGS,
- ui_result_,
- vr_result_);
+ hmi_apis::Common_Result::WARNINGS, ui_result_, vr_result_);
const bool result =
// In case of UI/VR is SUCCESS and other is SUCCESS/INVALID_ENUM
@@ -202,15 +201,14 @@ void DeleteCommandRequest::on_event(const event_engine::Event& event) {
}
mobile_apis::Result::eType result_code = mobile_apis::Result::INVALID_ENUM;
- if (!result &&
- hmi_apis::Common_Result::REJECTED == ui_result_) {
+ if (!result && hmi_apis::Common_Result::REJECTED == ui_result_) {
result_code = MessageHelper::HMIToMobileResult(vr_result_);
} else if (is_vr_or_ui_warning) {
LOG4CXX_DEBUG(logger_, "VR or UI result is warning");
result_code = mobile_apis::Result::WARNINGS;
} else {
- result_code = MessageHelper::HMIToMobileResult(
- std::max(ui_result_, vr_result_));
+ result_code =
+ MessageHelper::HMIToMobileResult(std::max(ui_result_, vr_result_));
}
SendResponse(result, result_code, NULL, &msg_params);
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
index c1ab1926e2..7abc1c11d4 100644
--- a/src/components/application_manager/src/commands/mobile/delete_command_response.cc
+++ b/src/components/application_manager/src/commands/mobile/delete_command_response.cc
@@ -33,17 +33,15 @@
#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(
+ const MessageSharedPtr& message, ApplicationManager& application_manager)
+ : CommandResponseImpl(message, application_manager) {}
-DeleteCommandResponse::~DeleteCommandResponse() {
-}
+DeleteCommandResponse::~DeleteCommandResponse() {}
void DeleteCommandResponse::Run() {
LOG4CXX_AUTO_TRACE(logger_);
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
index adc4dbb776..00d23bb094 100644
--- a/src/components/application_manager/src/commands/mobile/delete_file_request.cc
+++ b/src/components/application_manager/src/commands/mobile/delete_file_request.cc
@@ -41,12 +41,11 @@ namespace application_manager {
namespace commands {
-DeleteFileRequest::DeleteFileRequest(const MessageSharedPtr& message, ApplicationManager& application_manager)
- : CommandRequestImpl(message, application_manager) {
-}
+DeleteFileRequest::DeleteFileRequest(const MessageSharedPtr& message,
+ ApplicationManager& application_manager)
+ : CommandRequestImpl(message, application_manager) {}
-DeleteFileRequest::~DeleteFileRequest() {
-}
+DeleteFileRequest::~DeleteFileRequest() {}
void DeleteFileRequest::Run() {
LOG4CXX_AUTO_TRACE(logger_);
@@ -63,11 +62,12 @@ void DeleteFileRequest::Run() {
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;
+ // 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 =
@@ -97,17 +97,16 @@ void DeleteFileRequest::Run() {
}
}
-void DeleteFileRequest::SendFileRemovedNotification(
- const AppFile* file) const {
- smart_objects::SmartObject msg_params = smart_objects::SmartObject(
- smart_objects::SmartType_Map);
+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;
+ 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);
+ CreateHMINotification(hmi_apis::FunctionID::BasicCommunication_OnFileRemoved,
+ msg_params);
}
} // namespace commands
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
index f9fbd93fa2..8ed6f7ba2e 100644
--- a/src/components/application_manager/src/commands/mobile/delete_file_response.cc
+++ b/src/components/application_manager/src/commands/mobile/delete_file_response.cc
@@ -39,19 +39,17 @@ namespace application_manager {
namespace commands {
-DeleteFileResponse::DeleteFileResponse(const MessageSharedPtr& message, ApplicationManager& application_manager)
- : CommandResponseImpl(message, application_manager) {
-}
+DeleteFileResponse::DeleteFileResponse(const MessageSharedPtr& message,
+ ApplicationManager& application_manager)
+ : CommandResponseImpl(message, application_manager) {}
-DeleteFileResponse::~DeleteFileResponse() {
-}
+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);
+ 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);
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
index 1a5aa490bb..6ef8e5d9da 100644
--- 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
@@ -44,32 +44,30 @@ namespace commands {
DeleteInteractionChoiceSetRequest::DeleteInteractionChoiceSetRequest(
const MessageSharedPtr& message, ApplicationManager& application_manager)
- : CommandRequestImpl(message, application_manager) {
-}
+ : CommandRequestImpl(message, application_manager) {}
-DeleteInteractionChoiceSetRequest::~DeleteInteractionChoiceSetRequest() {
-}
+DeleteInteractionChoiceSetRequest::~DeleteInteractionChoiceSetRequest() {}
void DeleteInteractionChoiceSetRequest::Run() {
LOG4CXX_AUTO_TRACE(logger_);
- ApplicationSharedPtr app =
- application_manager_.application(connection_key());
+ ApplicationSharedPtr app = application_manager_.application(connection_key());
if (!app) {
- LOG4CXX_ERROR(logger_, "No application associated with connection key "
- << connection_key());
+ 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();
+ (*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.");
+ LOG4CXX_ERROR(logger_,
+ "Choice set with id " << choice_set_id << " is not found.");
SendResponse(false, mobile_apis::Result::INVALID_ID);
return;
}
@@ -81,8 +79,8 @@ void DeleteInteractionChoiceSetRequest::Run() {
}
SendVrDeleteCommand(app);
- smart_objects::SmartObject msg_params = smart_objects::SmartObject(
- smart_objects::SmartType_Map);
+ 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();
@@ -108,17 +106,17 @@ bool DeleteInteractionChoiceSetRequest::ChoiceSetInUse(
const PerformChoiceSetMap& choice_set_map = accessor.GetData();
const uint32_t choice_set_id =
- (*message_)[strings::msg_params][strings::interaction_choice_set_id].
- asUInt();
+ (*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;
+ 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.");
+ LOG4CXX_ERROR(logger_,
+ "Choice set with id " << choice_set_id << " is in use.");
return true;
}
}
@@ -131,24 +129,24 @@ void DeleteInteractionChoiceSetRequest::SendVrDeleteCommand(
LOG4CXX_AUTO_TRACE(logger_);
const uint32_t choice_set_id =
- (*message_)[strings::msg_params][strings::interaction_choice_set_id].
- asUInt();
+ (*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.");
+ 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);
+ 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) {
+ for (uint32_t i = 0; i < (*choice_set).length(); ++i) {
msg_params[strings::cmd_id] = (*choice_set)[i][strings::choice_id];
SendHMIRequest(hmi_apis::FunctionID::VR_DeleteCommand, &msg_params);
}
diff --git a/src/components/application_manager/src/commands/mobile/delete_interaction_choice_set_response.cc b/src/components/application_manager/src/commands/mobile/delete_interaction_choice_set_response.cc
index 1281cddf6a..97e07529af 100644
--- 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
@@ -43,11 +43,9 @@ namespace commands {
DeleteInteractionChoiceSetResponse::DeleteInteractionChoiceSetResponse(
const MessageSharedPtr& message, ApplicationManager& application_manager)
- : CommandResponseImpl(message, application_manager) {
-}
+ : CommandResponseImpl(message, application_manager) {}
-DeleteInteractionChoiceSetResponse::~DeleteInteractionChoiceSetResponse() {
-}
+DeleteInteractionChoiceSetResponse::~DeleteInteractionChoiceSetResponse() {}
void DeleteInteractionChoiceSetResponse::Run() {
LOG4CXX_AUTO_TRACE(logger_);
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
index ea19cb3389..bdb5521921 100644
--- 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
@@ -41,18 +41,16 @@ namespace application_manager {
namespace commands {
-DeleteSubMenuRequest::DeleteSubMenuRequest(const MessageSharedPtr& message, ApplicationManager& application_manager)
- : CommandRequestImpl(message, application_manager) {
-}
+DeleteSubMenuRequest::DeleteSubMenuRequest(
+ const MessageSharedPtr& message, ApplicationManager& application_manager)
+ : CommandRequestImpl(message, application_manager) {}
-DeleteSubMenuRequest::~DeleteSubMenuRequest() {
-}
+DeleteSubMenuRequest::~DeleteSubMenuRequest() {}
void DeleteSubMenuRequest::Run() {
LOG4CXX_AUTO_TRACE(logger_);
- ApplicationSharedPtr app =
- application_manager_.application(connection_key());
+ ApplicationSharedPtr app = application_manager_.application(connection_key());
if (!app) {
SendResponse(false, mobile_apis::Result::APPLICATION_NOT_REGISTERED);
@@ -69,8 +67,8 @@ void DeleteSubMenuRequest::Run() {
return;
}
- smart_objects::SmartObject msg_params = smart_objects::SmartObject(
- smart_objects::SmartType_Map);
+ smart_objects::SmartObject msg_params =
+ smart_objects::SmartObject(smart_objects::SmartType_Map);
msg_params[strings::menu_id] =
(*message_)[strings::msg_params][strings::menu_id];
@@ -88,16 +86,14 @@ void DeleteSubMenuRequest::DeleteSubMenuVRCommands(
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);
+ 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();
@@ -123,11 +119,10 @@ void DeleteSubMenuRequest::DeleteSubMenuUICommands(
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);
+ 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());
@@ -152,14 +147,13 @@ void DeleteSubMenuRequest::on_event(const event_engine::Event& event) {
static_cast<mobile_apis::Result::eType>(
message[strings::params][hmi_response::code].asInt());
- const bool result =
- Compare<mobile_api::Result::eType, EQ, ONE>(
- result_code,
- mobile_api::Result::SUCCESS,
- mobile_api::Result::WARNINGS);
+ 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());
+ application_manager_.application(connection_key());
if (!application) {
LOG4CXX_ERROR(logger_, "NULL pointer");
@@ -172,7 +166,7 @@ void DeleteSubMenuRequest::on_event(const event_engine::Event& event) {
DeleteSubMenuUICommands(application);
application->RemoveSubMenu(
(*message_)[strings::msg_params][strings::menu_id].asInt());
- }
+ }
SendResponse(result, result_code, NULL, &(message[strings::msg_params]));
if (result) {
@@ -187,7 +181,6 @@ void DeleteSubMenuRequest::on_event(const event_engine::Event& event) {
}
}
-
} // 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
index cea087024c..ad9d2ad858 100644
--- 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
@@ -33,17 +33,15 @@
#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(
+ const MessageSharedPtr& message, ApplicationManager& application_manager)
+ : CommandResponseImpl(message, application_manager) {}
-DeleteSubMenuResponse::~DeleteSubMenuResponse() {
-}
+DeleteSubMenuResponse::~DeleteSubMenuResponse() {}
void DeleteSubMenuResponse::Run() {
LOG4CXX_AUTO_TRACE(logger_);
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
index 448c006793..5252ea0e33 100644
--- a/src/components/application_manager/src/commands/mobile/diagnostic_message_request.cc
+++ b/src/components/application_manager/src/commands/mobile/diagnostic_message_request.cc
@@ -42,18 +42,16 @@ namespace application_manager {
namespace commands {
-DiagnosticMessageRequest::DiagnosticMessageRequest(const MessageSharedPtr& message, ApplicationManager& application_manager)
- : CommandRequestImpl(message, application_manager) {
-}
+DiagnosticMessageRequest::DiagnosticMessageRequest(
+ const MessageSharedPtr& message, ApplicationManager& application_manager)
+ : CommandRequestImpl(message, application_manager) {}
-DiagnosticMessageRequest::~DiagnosticMessageRequest() {
-}
+DiagnosticMessageRequest::~DiagnosticMessageRequest() {}
void DiagnosticMessageRequest::Run() {
LOG4CXX_AUTO_TRACE(logger_);
- ApplicationSharedPtr app =
- application_manager_.application(connection_key());
+ ApplicationSharedPtr app = application_manager_.application(connection_key());
if (!app) {
LOG4CXX_ERROR(logger_, "Application is not registered.");
@@ -72,9 +70,11 @@ void DiagnosticMessageRequest::Run() {
if (supported_diag_modes.end() == std::find(supported_diag_modes.begin(),
supported_diag_modes.end(),
msg_diagnostic_mode)) {
- LOG4CXX_ERROR(logger_, "Received diagnostic mode " << msg_diagnostic_mode <<
- " is not supported.");
- SendResponse(false, mobile_apis::Result::REJECTED,
+ 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;
}
@@ -83,8 +83,8 @@ void DiagnosticMessageRequest::Run() {
(*message_)[strings::msg_params][strings::app_id] = app->app_id();
SendHMIRequest(hmi_apis::FunctionID::VehicleInfo_DiagnosticMessage,
- &(*message_)[strings::msg_params], true);
-
+ &(*message_)[strings::msg_params],
+ true);
}
void DiagnosticMessageRequest::on_event(const event_engine::Event& event) {
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
index ce987c9592..8c59a97a8b 100644
--- a/src/components/application_manager/src/commands/mobile/diagnostic_message_response.cc
+++ b/src/components/application_manager/src/commands/mobile/diagnostic_message_response.cc
@@ -33,17 +33,15 @@
#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(
+ const MessageSharedPtr& message, ApplicationManager& application_manager)
+ : CommandResponseImpl(message, application_manager) {}
-DiagnosticMessageResponse::~DiagnosticMessageResponse() {
-}
+DiagnosticMessageResponse::~DiagnosticMessageResponse() {}
void DiagnosticMessageResponse::Run() {
LOG4CXX_AUTO_TRACE(logger_);
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
index 52b6b7aaeb..64685afe2e 100644
--- a/src/components/application_manager/src/commands/mobile/dial_number_request.cc
+++ b/src/components/application_manager/src/commands/mobile/dial_number_request.cc
@@ -40,12 +40,11 @@ namespace application_manager {
namespace commands {
-DialNumberRequest::DialNumberRequest(const MessageSharedPtr& message, ApplicationManager& application_manager)
- : CommandRequestImpl(message, application_manager) {
-}
+DialNumberRequest::DialNumberRequest(const MessageSharedPtr& message,
+ ApplicationManager& application_manager)
+ : CommandRequestImpl(message, application_manager) {}
-DialNumberRequest::~DialNumberRequest() {
-}
+DialNumberRequest::~DialNumberRequest() {}
bool DialNumberRequest::Init() {
LOG4CXX_AUTO_TRACE(logger_);
@@ -77,7 +76,8 @@ void DialNumberRequest::Run() {
StripNumberParam(number);
if (number.empty()) {
- LOG4CXX_ERROR(logger_, "After strip number param is empty. Invalid incoming data");
+ LOG4CXX_ERROR(logger_,
+ "After strip number param is empty. Invalid incoming data");
SendResponse(false, mobile_apis::Result::INVALID_DATA);
return;
}
@@ -87,8 +87,8 @@ void DialNumberRequest::Run() {
(*message_)[strings::msg_params][strings::number].asString();
msg_params[strings::app_id] = application->hmi_app_id();
- SendHMIRequest(hmi_apis::FunctionID::BasicCommunication_DialNumber,
- &msg_params, true);
+ SendHMIRequest(
+ hmi_apis::FunctionID::BasicCommunication_DialNumber, &msg_params, true);
}
void DialNumberRequest::on_event(const event_engine::Event& event) {
@@ -106,9 +106,9 @@ void DialNumberRequest::on_event(const event_engine::Event& event) {
switch (event.id()) {
case hmi_apis::FunctionID::BasicCommunication_DialNumber: {
LOG4CXX_INFO(logger_, "Received DialNumber event");
- result_code = CommandRequestImpl::GetMobileResultCode(
- static_cast<hmi_apis::Common_Result::eType>(
- message[strings::params][hmi_response::code].asInt()));
+ result_code = CommandRequestImpl::GetMobileResultCode(
+ static_cast<hmi_apis::Common_Result::eType>(
+ message[strings::params][hmi_response::code].asInt()));
break;
}
default: {
@@ -133,7 +133,8 @@ void DialNumberRequest::on_event(const event_engine::Event& event) {
void DialNumberRequest::StripNumberParam(std::string& number) {
std::size_t found = 0;
- while (std::string::npos != (found = number.find_first_not_of("0123456789*#,;+"))) {
+ while (std::string::npos !=
+ (found = number.find_first_not_of("0123456789*#,;+"))) {
number.erase(number.begin() + found);
}
(*message_)[strings::msg_params][strings::number] = number;
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
index ae44597607..750dcf25c4 100644
--- a/src/components/application_manager/src/commands/mobile/dial_number_response.cc
+++ b/src/components/application_manager/src/commands/mobile/dial_number_response.cc
@@ -32,17 +32,15 @@
#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(const MessageSharedPtr& message,
+ ApplicationManager& application_manager)
+ : CommandResponseImpl(message, application_manager) {}
-DialNumberResponse::~DialNumberResponse() {
-}
+DialNumberResponse::~DialNumberResponse() {}
void DialNumberResponse::Run() {
LOG4CXX_AUTO_TRACE(logger_);
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
index 827eb25526..5a922f595f 100644
--- 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
@@ -33,18 +33,15 @@
#include "application_manager/commands/mobile/end_audio_pass_thru_request.h"
-
namespace application_manager {
namespace commands {
EndAudioPassThruRequest::EndAudioPassThruRequest(
- const MessageSharedPtr& message, ApplicationManager& application_manager)
- : CommandRequestImpl(message, application_manager) {
-}
+ const MessageSharedPtr& message, ApplicationManager& application_manager)
+ : CommandRequestImpl(message, application_manager) {}
-EndAudioPassThruRequest::~EndAudioPassThruRequest() {
-}
+EndAudioPassThruRequest::~EndAudioPassThruRequest() {}
void EndAudioPassThruRequest::Run() {
LOG4CXX_AUTO_TRACE(logger_);
@@ -65,11 +62,9 @@ void EndAudioPassThruRequest::on_event(const event_engine::Event& event) {
bool result = mobile_apis::Result::SUCCESS == mobile_code;
if (result) {
- bool ended_successfully =
- application_manager_.EndAudioPassThrough();
+ bool ended_successfully = application_manager_.EndAudioPassThrough();
if (ended_successfully) {
- application_manager_.StopAudioPassThru(
- connection_key());
+ application_manager_.StopAudioPassThru(connection_key());
}
}
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
index 2f66b6e70c..bb477f5083 100644
--- 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
@@ -33,18 +33,15 @@
#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) {
-}
+ : CommandResponseImpl(message, application_manager) {}
-EndAudioPassThruResponse::~EndAudioPassThruResponse() {
-}
+EndAudioPassThruResponse::~EndAudioPassThruResponse() {}
void EndAudioPassThruResponse::Run() {
LOG4CXX_AUTO_TRACE(logger_);
diff --git a/src/components/application_manager/src/commands/mobile/generic_response.cc b/src/components/application_manager/src/commands/mobile/generic_response.cc
index cab1779940..20f6931bb9 100644
--- a/src/components/application_manager/src/commands/mobile/generic_response.cc
+++ b/src/components/application_manager/src/commands/mobile/generic_response.cc
@@ -55,7 +55,7 @@ void GenericResponse::Run() {
(*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;
+ mobile_apis::Result::INVALID_DATA;
SendResponse(false);
}
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
index 4d2a3ba7a7..80bc89f853 100644
--- a/src/components/application_manager/src/commands/mobile/get_dtcs_request.cc
+++ b/src/components/application_manager/src/commands/mobile/get_dtcs_request.cc
@@ -40,12 +40,11 @@ namespace application_manager {
namespace commands {
-GetDTCsRequest::GetDTCsRequest(const MessageSharedPtr& message, ApplicationManager& application_manager)
- : CommandRequestImpl(message, application_manager) {
-}
+GetDTCsRequest::GetDTCsRequest(const MessageSharedPtr& message,
+ ApplicationManager& application_manager)
+ : CommandRequestImpl(message, application_manager) {}
-GetDTCsRequest::~GetDTCsRequest() {
-}
+GetDTCsRequest::~GetDTCsRequest() {}
void GetDTCsRequest::Run() {
LOG4CXX_AUTO_TRACE(logger_);
@@ -59,8 +58,8 @@ void GetDTCsRequest::Run() {
return;
}
- smart_objects::SmartObject msg_params = smart_objects::SmartObject(
- smart_objects::SmartType_Map);
+ smart_objects::SmartObject msg_params =
+ smart_objects::SmartObject(smart_objects::SmartType_Map);
msg_params[strings::ecu_name] =
(*message_)[strings::msg_params][strings::ecu_name];
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
index 3ba11f560f..ecaf5c3d8f 100644
--- a/src/components/application_manager/src/commands/mobile/get_dtcs_response.cc
+++ b/src/components/application_manager/src/commands/mobile/get_dtcs_response.cc
@@ -33,17 +33,15 @@
#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(const MessageSharedPtr& message,
+ ApplicationManager& application_manager)
+ : CommandResponseImpl(message, application_manager) {}
-GetDTCsResponse::~GetDTCsResponse() {
-}
+GetDTCsResponse::~GetDTCsResponse() {}
void GetDTCsResponse::Run() {
LOG4CXX_AUTO_TRACE(logger_);
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
index 7f13fa0316..8b7010c6a1 100644
--- 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
@@ -46,20 +46,18 @@ namespace commands {
namespace str = strings;
#ifdef HMI_DBUS_API
-GetVehicleDataRequest::GetVehicleDataRequest(const MessageSharedPtr& message, ApplicationManager& application_manager)
- : CommandRequestImpl(message, application_manager) {
-}
+GetVehicleDataRequest::GetVehicleDataRequest(
+ const MessageSharedPtr& message, ApplicationManager& application_manager)
+ : CommandRequestImpl(message, application_manager) {}
-GetVehicleDataRequest::~GetVehicleDataRequest() {
-}
+GetVehicleDataRequest::~GetVehicleDataRequest() {}
void GetVehicleDataRequest::Run() {
LOG4CXX_AUTO_TRACE(logger_);
int32_t app_id =
(*message_)[strings::params][strings::connection_key].asUInt();
- ApplicationSharedPtr app =
- appplication_manager.application(app_id);
+ ApplicationSharedPtr app = appplication_manager.application(app_id);
if (!app) {
LOG4CXX_ERROR(logger_, "NULL pointer");
@@ -71,8 +69,8 @@ void GetVehicleDataRequest::Run() {
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()) {
+ if (true == (*message_)[str::msg_params].keyExists(it->first) &&
+ true == (*message_)[str::msg_params][it->first].asBool()) {
SendRequestsToHmi(app->app_id());
return;
}
@@ -82,37 +80,44 @@ void GetVehicleDataRequest::Run() {
}
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},
- };
+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) {
@@ -121,8 +126,8 @@ void GetVehicleDataRequest::SendRequestsToHmi(const int32_t 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()) {
+ 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;
@@ -135,7 +140,8 @@ void GetVehicleDataRequest::SendRequestsToHmi(const int32_t app_id) {
hmi_requests_.size() << " requests are going to be sent to HMI");
for (HmiRequests::const_iterator it = hmi_requests_.begin();
- it != hmi_requests_.end(); ++it) {
+ it != hmi_requests_.end();
+ ++it) {
SendHMIRequest(it->func_id, &msg_params, true);
}
}
@@ -150,9 +156,8 @@ void GetVehicleDataRequest::on_event(const event_engine::Event& event) {
++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());
+ 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;
@@ -206,16 +211,17 @@ void GetVehicleDataRequest::on_event(const event_engine::Event& event) {
}
}
#else
-GetVehicleDataRequest::GetVehicleDataRequest(const MessageSharedPtr& message, ApplicationManager& application_manager)
- : CommandRequestImpl(message, application_manager) {
-}
+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();
+ int32_t app_id =
+ (*message_)[strings::params][strings::connection_key].asUInt();
ApplicationSharedPtr app = application_manager_.application(app_id);
if (!app) {
@@ -290,8 +296,8 @@ void GetVehicleDataRequest::on_event(const event_engine::Event& event) {
}
}
-#endif // #ifdef HMI_DBUS_API
+#endif // #ifdef HMI_DBUS_API
-} // namespace commands
+} // namespace commands
-} // namespace application_manager
+} // 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
index 138016832a..1e64746262 100644
--- 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
@@ -39,12 +39,11 @@ namespace application_manager {
namespace commands {
-GetVehicleDataResponse::GetVehicleDataResponse(const MessageSharedPtr& message, ApplicationManager& application_manager)
- : CommandResponseImpl(message, application_manager) {
-}
+GetVehicleDataResponse::GetVehicleDataResponse(
+ const MessageSharedPtr& message, ApplicationManager& application_manager)
+ : CommandResponseImpl(message, application_manager) {}
-GetVehicleDataResponse::~GetVehicleDataResponse() {
-}
+GetVehicleDataResponse::~GetVehicleDataResponse() {}
void GetVehicleDataResponse::Run() {
LOG4CXX_AUTO_TRACE(logger_);
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
index c7d73288cc..596a8c4627 100644
--- 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
@@ -7,23 +7,21 @@ namespace commands {
GetWayPointsRequest::GetWayPointsRequest(
const MessageSharedPtr& message, ApplicationManager& application_manager)
- :CommandRequestImpl(message, application_manager){
-}
+ : CommandRequestImpl(message, application_manager) {}
GetWayPointsRequest::~GetWayPointsRequest() {}
void GetWayPointsRequest::Run() {
LOG4CXX_AUTO_TRACE(logger_);
- ApplicationSharedPtr app =
- application_manager_.application(
- connection_key());
+ 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;
+ LOG4CXX_ERROR(logger_,
+ "An application with connection key "
+ << connection_key() << " is not registered.");
+ SendResponse(false, mobile_apis::Result::APPLICATION_NOT_REGISTERED);
+ return;
}
SendHMIRequest(hmi_apis::FunctionID::Navigation_GetWayPoints, NULL, true);
@@ -31,24 +29,22 @@ void GetWayPointsRequest::Run() {
void GetWayPointsRequest::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()) {
+ ApplicationSharedPtr app = application_manager_.application(connection_key());
+ const smart_objects::SmartObject& message = event.smart_object();
+ switch (event.id()) {
case hmi_apis::FunctionID::Navigation_GetWayPoints: {
LOG4CXX_INFO(logger_, "Received Navigation_GetWayPoints event");
mobile_apis::Result::eType result_code =
- GetMobileResultCode(static_cast<hmi_apis::Common_Result::eType>(
- message[strings::params][hmi_response::code].asUInt()));
+ GetMobileResultCode(static_cast<hmi_apis::Common_Result::eType>(
+ message[strings::params][hmi_response::code].asUInt()));
bool result = mobile_apis::Result::SUCCESS == result_code;
SendResponse(result, result_code, NULL, &(message[strings::msg_params]));
break;
}
- default: {
- LOG4CXX_ERROR(logger_, "Received unknown event" << event.id());
- break;
- }
+ default: {
+ LOG4CXX_ERROR(logger_, "Received unknown event" << event.id());
+ break;
+ }
}
}
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
index 615a0996a5..7956b34cae 100644
--- 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
@@ -6,12 +6,10 @@ namespace application_manager {
namespace commands {
GetWayPointsResponse::GetWayPointsResponse(
- const MessageSharedPtr &message, ApplicationManager& application_manager)
- : CommandResponseImpl(message, application_manager) {
-}
+ const MessageSharedPtr& message, ApplicationManager& application_manager)
+ : CommandResponseImpl(message, application_manager) {}
-GetWayPointsResponse::~GetWayPointsResponse() {
-}
+GetWayPointsResponse::~GetWayPointsResponse() {}
void GetWayPointsResponse::Run() {
LOG4CXX_AUTO_TRACE(logger_);
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
index 7410c12a05..425f1ddb46 100644
--- a/src/components/application_manager/src/commands/mobile/list_files_request.cc
+++ b/src/components/application_manager/src/commands/mobile/list_files_request.cc
@@ -43,12 +43,11 @@ namespace application_manager {
namespace commands {
-ListFilesRequest::ListFilesRequest(const MessageSharedPtr& message, ApplicationManager& application_manager)
- : CommandRequestImpl(message, application_manager) {
-}
+ListFilesRequest::ListFilesRequest(const MessageSharedPtr& message,
+ ApplicationManager& application_manager)
+ : CommandRequestImpl(message, application_manager) {}
-ListFilesRequest::~ListFilesRequest() {
-}
+ListFilesRequest::~ListFilesRequest() {}
void ListFilesRequest::Run() {
LOG4CXX_AUTO_TRACE(logger_);
@@ -65,35 +64,41 @@ void ListFilesRequest::Run() {
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;
+ // 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());
+ static_cast<int32_t>(application->GetAvailableDiskSpace());
uint32_t i = 0;
const AppFilesMap& app_files = application->getAppFiles();
for (AppFilesMap::const_iterator it = app_files.begin();
- it != app_files.end(); ++it) {
+ it != app_files.end();
+ ++it) {
std::string filename = it->first.substr(it->first.find_last_of('/') + 1);
// In AppFile to application stored full path to file. In message required
// to write only name file.
// Plus one required for move to next letter after '/'.
if (i < application_manager_.get_settings().list_files_response_size()) {
- LOG4CXX_DEBUG(logger_, "File " + filename + " added to ListFiles response");
+ LOG4CXX_DEBUG(logger_,
+ "File " + filename + " added to ListFiles response");
(*message_)[strings::msg_params][strings::filenames][i++] = filename;
} else {
- LOG4CXX_DEBUG(logger_, "File " + filename + " not added to ListFiles response");
+ LOG4CXX_DEBUG(logger_,
+ "File " + filename + " not added to ListFiles response");
}
}
(*message_)[strings::params][strings::message_type] =
application_manager::MessageType::kResponse;
- SendResponse(true, mobile_apis::Result::SUCCESS, NULL,
+ SendResponse(true,
+ mobile_apis::Result::SUCCESS,
+ NULL,
&(*message_)[strings::msg_params]);
}
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
index 8517d37b0d..fde15a94ef 100644
--- a/src/components/application_manager/src/commands/mobile/list_files_response.cc
+++ b/src/components/application_manager/src/commands/mobile/list_files_response.cc
@@ -39,12 +39,11 @@ namespace application_manager {
namespace commands {
-ListFilesResponse::ListFilesResponse(const MessageSharedPtr& message, ApplicationManager& application_manager)
- : CommandResponseImpl(message, application_manager) {
-}
+ListFilesResponse::ListFilesResponse(const MessageSharedPtr& message,
+ ApplicationManager& application_manager)
+ : CommandResponseImpl(message, application_manager) {}
-ListFilesResponse::~ListFilesResponse() {
-}
+ListFilesResponse::~ListFilesResponse() {}
void ListFilesResponse::Run() {
LOG4CXX_AUTO_TRACE(logger_);
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
index b7a26df478..6064374dab 100644
--- 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
@@ -40,11 +40,10 @@ namespace commands {
OnAppInterfaceUnregisteredNotification::OnAppInterfaceUnregisteredNotification(
const MessageSharedPtr& message, ApplicationManager& application_manager)
- : CommandNotificationImpl(message, application_manager) {
-}
+ : CommandNotificationImpl(message, application_manager) {}
-OnAppInterfaceUnregisteredNotification::~OnAppInterfaceUnregisteredNotification() {
-}
+OnAppInterfaceUnregisteredNotification::
+ ~OnAppInterfaceUnregisteredNotification() {}
void OnAppInterfaceUnregisteredNotification::Run() {
LOG4CXX_AUTO_TRACE(logger_);
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
index 9b10cd08ad..d0fa3597bc 100644
--- 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
@@ -38,11 +38,9 @@ namespace commands {
OnAudioPassThruNotification::OnAudioPassThruNotification(
const MessageSharedPtr& message, ApplicationManager& application_manager)
- : CommandNotificationImpl(message, application_manager) {
-}
+ : CommandNotificationImpl(message, application_manager) {}
-OnAudioPassThruNotification::~OnAudioPassThruNotification() {
-}
+OnAudioPassThruNotification::~OnAudioPassThruNotification() {}
void OnAudioPassThruNotification::Run() {
LOG4CXX_AUTO_TRACE(logger_);
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
index d045dadbe9..fb35257441 100644
--- 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
@@ -44,18 +44,15 @@ namespace mobile {
OnButtonEventNotification::OnButtonEventNotification(
const MessageSharedPtr& message, ApplicationManager& application_manager)
- : CommandNotificationImpl(message, application_manager) {
-}
+ : CommandNotificationImpl(message, application_manager) {}
-OnButtonEventNotification::~OnButtonEventNotification() {
-}
+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 uint32_t btn_id = static_cast<uint32_t>(
+ (*message_)[strings::msg_params][hmi_response::button_name].asInt());
// CUSTOM_BUTTON notification
if (static_cast<uint32_t>(mobile_apis::ButtonName::CUSTOM_BUTTON) == btn_id) {
@@ -66,8 +63,9 @@ void OnButtonEventNotification::Run() {
}
// custom_button_id is mandatory for CUSTOM_BUTTON notification
- if (false == (*message_)[strings::msg_params].keyExists(
- hmi_response::custom_button_id)) {
+ if (false ==
+ (*message_)[strings::msg_params].keyExists(
+ hmi_response::custom_button_id)) {
LOG4CXX_ERROR(logger_,
"CUSTOM_BUTTON OnButtonEvent without custom_button_id.");
return;
@@ -82,8 +80,9 @@ void OnButtonEventNotification::Run() {
}
uint32_t custom_btn_id = 0;
- custom_btn_id = (*message_)[strings::msg_params]
- [hmi_response::custom_button_id].asUInt();
+ custom_btn_id =
+ (*message_)[strings::msg_params][hmi_response::custom_button_id]
+ .asUInt();
if (false == app->IsSubscribedToSoftButton(custom_btn_id)) {
LOG4CXX_ERROR(logger_,
@@ -106,19 +105,21 @@ void OnButtonEventNotification::Run() {
continue;
}
- //Send ButtonEvent notification only in HMI_FULL or HMI_LIMITED mode
+ // 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");
+ LOG4CXX_WARN(logger_,
+ "OnButtonEvent notification is allowed only"
+ << "in FULL or LIMITED hmi level");
continue;
}
- //Send ButtonEvent notification for OK button only in HMI_FULL mode
+ // Send ButtonEvent notification for OK button only in HMI_FULL mode
if ((static_cast<uint32_t>(mobile_apis::ButtonName::OK) == btn_id) &&
(mobile_api::HMILevel::HMI_FULL != subscribed_app->hmi_level())) {
- LOG4CXX_WARN(logger_, "OnButtonEvent notification for OK button"
- << "is allowed only in FULL hmi level");
+ LOG4CXX_WARN(logger_,
+ "OnButtonEvent notification for OK button"
+ << "is allowed only in FULL hmi level");
continue;
}
@@ -132,14 +133,14 @@ void OnButtonEventNotification::SendButtonEvent(ApplicationConstSharedPtr app) {
return;
}
- smart_objects::SmartObjectSPtr on_btn_event = new smart_objects::SmartObject();
+ 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] =
@@ -151,7 +152,7 @@ void OnButtonEventNotification::SendButtonEvent(ApplicationConstSharedPtr app) {
(*message_)[strings::msg_params][hmi_response::button_mode];
if ((*message_)[strings::msg_params].keyExists(
- hmi_response::custom_button_id)) {
+ hmi_response::custom_button_id)) {
(*on_btn_event)[strings::msg_params][strings::custom_button_id] =
(*message_)[strings::msg_params][strings::custom_button_id];
}
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
index 84a59f22e7..d4b7daf185 100644
--- 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
@@ -44,18 +44,15 @@ namespace mobile {
OnButtonPressNotification::OnButtonPressNotification(
const MessageSharedPtr& message, ApplicationManager& application_manager)
- : CommandNotificationImpl(message, application_manager) {
-}
+ : CommandNotificationImpl(message, application_manager) {}
-OnButtonPressNotification::~OnButtonPressNotification() {
-}
+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 uint32_t btn_id = static_cast<uint32_t>(
+ (*message_)[strings::msg_params][hmi_response::button_name].asInt());
// CUSTOM_BUTTON notification
if (static_cast<uint32_t>(mobile_apis::ButtonName::CUSTOM_BUTTON) == btn_id) {
@@ -66,8 +63,9 @@ void OnButtonPressNotification::Run() {
}
// custom_button_id is mandatory for CUSTOM_BUTTON notification
- if (false == (*message_)[strings::msg_params].keyExists(
- hmi_response::custom_button_id)) {
+ if (false ==
+ (*message_)[strings::msg_params].keyExists(
+ hmi_response::custom_button_id)) {
LOG4CXX_ERROR(logger_,
"CUSTOM_BUTTON OnButtonPress without custom_button_id.");
return;
@@ -82,8 +80,9 @@ void OnButtonPressNotification::Run() {
}
uint32_t custom_btn_id = 0;
- custom_btn_id = (*message_)[strings::msg_params]
- [hmi_response::custom_button_id].asUInt();
+ custom_btn_id =
+ (*message_)[strings::msg_params][hmi_response::custom_button_id]
+ .asUInt();
if (false == app->IsSubscribedToSoftButton(custom_btn_id)) {
LOG4CXX_ERROR(logger_,
@@ -106,19 +105,21 @@ void OnButtonPressNotification::Run() {
continue;
}
- //Send ButtonPress notification only in HMI_FULL or HMI_LIMITED mode
+ // 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");
+ LOG4CXX_WARN(logger_,
+ "OnButtonPress notification is allowed only"
+ << "in FULL or LIMITED hmi level");
continue;
}
- //Send ButtonPress notification for OK button only in HMI_FULL mode
+ // Send ButtonPress notification for OK button only in HMI_FULL mode
if ((static_cast<uint32_t>(mobile_apis::ButtonName::OK) == btn_id) &&
(mobile_api::HMILevel::HMI_FULL != subscribed_app->hmi_level())) {
- LOG4CXX_WARN(logger_, "OnButtonPress notification for OK button"
- << "is allowed only in FULL hmi level");
+ LOG4CXX_WARN(logger_,
+ "OnButtonPress notification for OK button"
+ << "is allowed only in FULL hmi level");
continue;
}
@@ -132,14 +133,14 @@ void OnButtonPressNotification::SendButtonPress(ApplicationConstSharedPtr app) {
return;
}
- smart_objects::SmartObjectSPtr on_btn_press = new smart_objects::SmartObject();
+ 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] =
@@ -151,7 +152,7 @@ void OnButtonPressNotification::SendButtonPress(ApplicationConstSharedPtr app) {
(*message_)[strings::msg_params][hmi_response::button_mode];
if ((*message_)[strings::msg_params].keyExists(
- hmi_response::custom_button_id)) {
+ hmi_response::custom_button_id)) {
(*on_btn_press)[strings::msg_params][strings::custom_button_id] =
(*message_)[strings::msg_params][strings::custom_button_id];
}
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
index 5a9070d1af..ae8aeff771 100644
--- a/src/components/application_manager/src/commands/mobile/on_command_notification.cc
+++ b/src/components/application_manager/src/commands/mobile/on_command_notification.cc
@@ -39,12 +39,11 @@ namespace application_manager {
namespace commands {
-OnCommandNotification::OnCommandNotification(const MessageSharedPtr& message, ApplicationManager& application_manager)
- : CommandNotificationImpl(message, application_manager) {
-}
+OnCommandNotification::OnCommandNotification(
+ const MessageSharedPtr& message, ApplicationManager& application_manager)
+ : CommandNotificationImpl(message, application_manager) {}
-OnCommandNotification::~OnCommandNotification() {
-}
+OnCommandNotification::~OnCommandNotification() {}
void OnCommandNotification::Run() {
LOG4CXX_AUTO_TRACE(logger_);
@@ -57,12 +56,11 @@ void OnCommandNotification::Run() {
return;
}
- const uint32_t cmd_id = (*message_)[strings::msg_params][strings::cmd_id]
- .asUInt();
+ 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);
+ LOG4CXX_ERROR(logger_, " No applications found for the command " << cmd_id);
return;
}
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
index f55527736c..44ed2cf3b7 100644
--- 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
@@ -44,11 +44,9 @@ namespace mobile {
OnDriverDistractionNotification::OnDriverDistractionNotification(
const MessageSharedPtr& message, ApplicationManager& application_manager)
- : CommandNotificationImpl(message, application_manager) {
-}
+ : CommandNotificationImpl(message, application_manager) {}
-OnDriverDistractionNotification::~OnDriverDistractionNotification() {
-}
+OnDriverDistractionNotification::~OnDriverDistractionNotification() {}
void OnDriverDistractionNotification::Run() {
LOG4CXX_AUTO_TRACE(logger_);
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
index c8df30d451..19b93f2cbf 100644
--- 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
@@ -46,11 +46,9 @@ namespace mobile {
OnHashChangeNotification::OnHashChangeNotification(
const MessageSharedPtr& message, ApplicationManager& application_manager)
- : CommandNotificationImpl(message, application_manager) {
-}
+ : CommandNotificationImpl(message, application_manager) {}
-OnHashChangeNotification::~OnHashChangeNotification() {
-}
+OnHashChangeNotification::~OnHashChangeNotification() {}
void OnHashChangeNotification::Run() {
LOG4CXX_AUTO_TRACE(logger_);
@@ -65,12 +63,12 @@ void OnHashChangeNotification::Run() {
(*message_)[strings::msg_params][strings::hash_id] = app->curHash();
SendNotification();
} else {
- LOG4CXX_WARN(logger_, "Application with app_id " << app_id << " does not exist");
+ LOG4CXX_WARN(logger_,
+ "Application with app_id " << app_id << " does not exist");
}
-
}
-} //namespace mobile
+} // namespace mobile
} // namespace commands
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
index 7c267f06e1..5225002652 100644
--- 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
@@ -42,19 +42,16 @@ namespace commands {
OnHMIStatusNotification::OnHMIStatusNotification(
const MessageSharedPtr& message, ApplicationManager& application_manager)
- : CommandNotificationImpl(message, application_manager) {
-}
+ : CommandNotificationImpl(message, application_manager) {}
-OnHMIStatusNotification::~OnHMIStatusNotification() {
-}
+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());
+ (*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;
@@ -67,18 +64,18 @@ void OnHMIStatusNotification::Run() {
(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"
+ 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)) {
+ (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());
+ application_manager_.AddAppToTTSGlobalPropertiesList(app->app_id());
}
}
SendNotification();
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
index c729882ae4..9b16bd3572 100644
--- 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
@@ -39,8 +39,7 @@ namespace application_manager {
namespace commands {
OnHMIStatusNotificationFromMobile::OnHMIStatusNotificationFromMobile(
- const MessageSharedPtr& message,
- ApplicationManager& application_manager)
+ const MessageSharedPtr& message, ApplicationManager& application_manager)
: CommandNotificationFromMobileImpl(message, application_manager) {}
OnHMIStatusNotificationFromMobile::~OnHMIStatusNotificationFromMobile() {}
@@ -50,8 +49,7 @@ void OnHMIStatusNotificationFromMobile::Run() {
(*message_)[strings::params][strings::message_type] =
static_cast<int32_t>(application_manager::MessageType::kNotification);
- ApplicationSharedPtr app =
- application_manager_.application(connection_key());
+ ApplicationSharedPtr app = application_manager_.application(connection_key());
if (!app.valid()) {
LOG4CXX_ERROR(
@@ -72,11 +70,9 @@ void OnHMIStatusNotificationFromMobile::Run() {
bool is_apps_requested_before =
application_manager_.IsAppsQueriedFrom(handle);
- LOG4CXX_DEBUG(
- logger_,
- "Mobile HMI state notication came for connection key:" << connection_key()
- << " and handle: "
- << handle);
+ LOG4CXX_DEBUG(logger_,
+ "Mobile HMI state notication came for connection key:"
+ << connection_key() << " and handle: " << handle);
if (!is_apps_requested_before &&
ProtocolVersion::kV4 == app->protocol_version() && app->is_foreground()) {
@@ -109,7 +105,8 @@ void OnHMIStatusNotificationFromMobile::Run() {
}
if (!is_another_foreground_sdl4_app) {
- application_manager_.MarkAppsGreyOut(handle, !is_current_state_foreground);
+ application_manager_.MarkAppsGreyOut(handle,
+ !is_current_state_foreground);
application_manager_.SendUpdateAppList();
}
}
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
index f94cda91b2..76420b85b6 100644
--- 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
@@ -39,11 +39,9 @@ namespace commands {
OnLanguageChangeNotification::OnLanguageChangeNotification(
const MessageSharedPtr& message, ApplicationManager& application_manager)
- : CommandNotificationImpl(message, application_manager) {
-}
+ : CommandNotificationImpl(message, application_manager) {}
-OnLanguageChangeNotification::~OnLanguageChangeNotification() {
-}
+OnLanguageChangeNotification::~OnLanguageChangeNotification() {}
void OnLanguageChangeNotification::Run() {
LOG4CXX_AUTO_TRACE(logger_);
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
index 4d2f66075c..a4167a802e 100644
--- 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
@@ -41,11 +41,9 @@ namespace commands {
OnPermissionsChangeNotification::OnPermissionsChangeNotification(
const MessageSharedPtr& message, ApplicationManager& application_manager)
- : CommandNotificationImpl(message, application_manager) {
-}
+ : CommandNotificationImpl(message, application_manager) {}
-OnPermissionsChangeNotification::~OnPermissionsChangeNotification() {
-}
+OnPermissionsChangeNotification::~OnPermissionsChangeNotification() {}
void OnPermissionsChangeNotification::Run() {
LOG4CXX_AUTO_TRACE(logger_);
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
index 14cbff8d28..4f73ad0ffe 100644
--- 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
@@ -45,34 +45,33 @@ namespace mobile {
OnSystemRequestNotification::OnSystemRequestNotification(
const MessageSharedPtr& message, ApplicationManager& application_manager)
- : CommandNotificationImpl(message, application_manager) {
-}
+ : CommandNotificationImpl(message, application_manager) {}
-OnSystemRequestNotification::~OnSystemRequestNotification() {
-}
+OnSystemRequestNotification::~OnSystemRequestNotification() {}
void OnSystemRequestNotification::Run() {
LOG4CXX_AUTO_TRACE(logger_);
using namespace application_manager;
using namespace mobile_apis;
- ApplicationSharedPtr app = application_manager_.
- application(connection_key());
+ ApplicationSharedPtr app = application_manager_.application(connection_key());
if (!app.valid()) {
- LOG4CXX_ERROR(logger_, "Application with connection key "
- << connection_key() << " is not registered.");
+ LOG4CXX_ERROR(logger_,
+ "Application with connection key " << connection_key()
+ << " is not registered.");
return;
}
- RequestType::eType request_type = static_cast<RequestType::eType>
- ((*message_)[strings::msg_params][strings::request_type].asInt());
+ RequestType::eType request_type = static_cast<RequestType::eType>(
+ (*message_)[strings::msg_params][strings::request_type].asInt());
const policy::PolicyHandlerInterface& policy_handler =
application_manager_.GetPolicyHandler();
if (!policy_handler.IsRequestTypeAllowed(app->policy_app_id(),
request_type)) {
- LOG4CXX_WARN(logger_, "Request type " << request_type
- <<" is not allowed by policies");
+ LOG4CXX_WARN(logger_,
+ "Request type " << request_type
+ << " is not allowed by policies");
return;
}
@@ -80,7 +79,8 @@ void OnSystemRequestNotification::Run() {
/* 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 */
+ Also in Genivi SDL we don't save the PT to file - we put it directly in
+ binary_data */
(*message_)[strings::msg_params][strings::file_type] = FileType::JSON;
} else if (RequestType::HTTP == request_type) {
(*message_)[strings::msg_params][strings::file_type] = FileType::BINARY;
@@ -89,7 +89,7 @@ void OnSystemRequestNotification::Run() {
SendNotification();
}
-} //namespace mobile
+} // namespace mobile
} // namespace commands
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
index aae32c4115..894469ac34 100644
--- 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
@@ -42,11 +42,9 @@ namespace commands {
OnTBTClientStateNotification::OnTBTClientStateNotification(
const MessageSharedPtr& message, ApplicationManager& application_manager)
- : CommandNotificationImpl(message, application_manager) {
-}
+ : CommandNotificationImpl(message, application_manager) {}
-OnTBTClientStateNotification::~OnTBTClientStateNotification() {
-}
+OnTBTClientStateNotification::~OnTBTClientStateNotification() {}
void OnTBTClientStateNotification::Run() {
LOG4CXX_AUTO_TRACE(logger_);
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
index 3c0b0a5657..c769194c95 100644
--- 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
@@ -43,11 +43,9 @@ namespace mobile {
OnTouchEventNotification::OnTouchEventNotification(
const MessageSharedPtr& message, ApplicationManager& application_manager)
- : CommandNotificationImpl(message, application_manager) {
-}
+ : CommandNotificationImpl(message, application_manager) {}
-OnTouchEventNotification::~OnTouchEventNotification() {
-}
+OnTouchEventNotification::~OnTouchEventNotification() {}
void OnTouchEventNotification::Run() {
LOG4CXX_AUTO_TRACE(logger_);
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
index ec74c1c621..37abbab351 100644
--- 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
@@ -42,19 +42,17 @@ namespace application_manager {
namespace commands {
OnVehicleDataNotification::OnVehicleDataNotification(
- const MessageSharedPtr& message, ApplicationManager& application_manager)
- : CommandNotificationImpl(message, application_manager) {
-}
+ const MessageSharedPtr& message, ApplicationManager& application_manager)
+ : CommandNotificationImpl(message, application_manager) {}
-OnVehicleDataNotification::~OnVehicleDataNotification() {
-}
+OnVehicleDataNotification::~OnVehicleDataNotification() {}
void OnVehicleDataNotification::Run() {
LOG4CXX_AUTO_TRACE(logger_);
std::vector<ApplicationSharedPtr> appNotification;
std::vector<ApplicationSharedPtr>::iterator appNotification_it =
- appNotification.begin();
+ appNotification.begin();
std::vector<smart_objects::SmartObject> appSO;
const VehicleData& vehicle_data = MessageHelper::vehicle_data();
@@ -63,45 +61,47 @@ void OnVehicleDataNotification::Run() {
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());
+ application_manager_.IviInfoUpdated(
+ it->second, (*message_)[strings::msg_params][it->first].asInt());
std::vector<ApplicationSharedPtr>::const_iterator app_it =
- applications.begin();
+ 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);
+ 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);
+ 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);
+ 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());
+ 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());
+ 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();
+ appNotification[idx]->app_id();
(*message_)[strings::msg_params] = appSO[idx];
SendNotification();
}
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
index 3a0cf0143c..0b24228810 100644
--- 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
@@ -51,7 +51,8 @@ void OnWayPointChangeNotification::Run() {
for (std::set<int32_t>::const_iterator app_id =
subscribed_for_way_points.begin();
- app_id != subscribed_for_way_points.end(); ++app_id) {
+ app_id != subscribed_for_way_points.end();
+ ++app_id) {
(*message_)[strings::params][strings::connection_key] = *app_id;
SendNotification();
}
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
index 55619bc318..d595119d45 100644
--- 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
@@ -46,14 +46,13 @@ namespace str = strings;
PerformAudioPassThruRequest::PerformAudioPassThruRequest(
const MessageSharedPtr& message, ApplicationManager& application_manager)
- : CommandRequestImpl(message, application_manager),
- is_active_tts_speak_(false),
- result_tts_speak_(mobile_apis::Result::SUCCESS) {
+ : CommandRequestImpl(message, application_manager)
+ , is_active_tts_speak_(false)
+ , result_tts_speak_(mobile_apis::Result::SUCCESS) {
subscribe_on_event(hmi_apis::FunctionID::TTS_OnResetTimeout);
}
-PerformAudioPassThruRequest::~PerformAudioPassThruRequest() {
-}
+PerformAudioPassThruRequest::~PerformAudioPassThruRequest() {}
void PerformAudioPassThruRequest::onTimeOut() {
LOG4CXX_AUTO_TRACE(logger_);
@@ -71,8 +70,7 @@ bool PerformAudioPassThruRequest::Init() {
void PerformAudioPassThruRequest::Run() {
LOG4CXX_AUTO_TRACE(logger_);
- ApplicationSharedPtr app =
- application_manager_.application(connection_key());
+ ApplicationSharedPtr app = application_manager_.application(connection_key());
if (!app) {
LOG4CXX_ERROR(logger_, "APPLICATION_NOT_REGISTERED");
@@ -136,18 +134,16 @@ void PerformAudioPassThruRequest::on_event(const event_engine::Event& event) {
FinishTTSSpeak();
std::string return_info;
- const bool result =
- Compare<mobile_api::Result::eType, EQ, ONE>(
- mobile_code,
- mobile_apis::Result::SUCCESS,
- mobile_apis::Result::RETRY,
- mobile_apis::Result::WARNINGS);
-
- const bool is_result_ok =
- Compare<mobile_api::Result::eType, EQ, ONE>(
- mobile_code,
- mobile_apis::Result::SUCCESS,
- mobile_apis::Result::WARNINGS);
+ const bool result = Compare<mobile_api::Result::eType, EQ, ONE>(
+ mobile_code,
+ mobile_apis::Result::SUCCESS,
+ mobile_apis::Result::RETRY,
+ mobile_apis::Result::WARNINGS);
+
+ const bool is_result_ok = Compare<mobile_api::Result::eType, EQ, ONE>(
+ mobile_code,
+ mobile_apis::Result::SUCCESS,
+ mobile_apis::Result::WARNINGS);
if (is_result_ok &&
mobile_apis::Result::UNSUPPORTED_RESOURCE == result_tts_speak_) {
@@ -155,25 +151,25 @@ void PerformAudioPassThruRequest::on_event(const event_engine::Event& event) {
return_info = "Unsupported phoneme type sent in a prompt";
}
- SendResponse(result, mobile_code, return_info.empty() ? NULL : return_info.c_str(),
+ SendResponse(result,
+ mobile_code,
+ return_info.empty() ? NULL : return_info.c_str(),
&(message[strings::msg_params]));
break;
}
case hmi_apis::FunctionID::TTS_Speak: {
LOG4CXX_INFO(logger_, "Received TTS_Speak event");
- result_tts_speak_ = GetMobileResultCode(
- static_cast<hmi_apis::Common_Result::eType>(
- message[strings::params][hmi_response::code].asUInt()));
+ result_tts_speak_ =
+ GetMobileResultCode(static_cast<hmi_apis::Common_Result::eType>(
+ message[strings::params][hmi_response::code].asUInt()));
is_active_tts_speak_ = false;
if (mobile_apis::Result::SUCCESS == result_tts_speak_) {
SendRecordStartNotification();
StartMicrophoneRecording();
// update request timeout to get time for perform audio recording
- application_manager_.
- updateRequestTimeout(connection_key(),
- correlation_id(),
- default_timeout());
+ application_manager_.updateRequestTimeout(
+ connection_key(), correlation_id(), default_timeout());
}
break;
}
@@ -202,8 +198,8 @@ void PerformAudioPassThruRequest::SendSpeakRequest() {
if ((*message_)[str::msg_params].keyExists(str::initial_prompt) &&
(0 < (*message_)[str::msg_params][str::initial_prompt].length())) {
for (uint32_t i = 0;
- i < (*message_)[str::msg_params][str::initial_prompt].length();
- ++i) {
+ 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] =
@@ -220,8 +216,8 @@ void PerformAudioPassThruRequest::SendSpeakRequest() {
void PerformAudioPassThruRequest::SendPerformAudioPassThruRequest() {
LOG4CXX_AUTO_TRACE(logger_);
- smart_objects::SmartObject msg_params = smart_objects::SmartObject(
- smart_objects::SmartType_Map);
+ smart_objects::SmartObject msg_params =
+ smart_objects::SmartObject(smart_objects::SmartType_Map);
msg_params[str::app_id] = connection_key();
@@ -232,21 +228,21 @@ void PerformAudioPassThruRequest::SendPerformAudioPassThruRequest() {
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];
+ 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];
+ 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)) {
@@ -257,15 +253,15 @@ void PerformAudioPassThruRequest::SendPerformAudioPassThruRequest() {
msg_params[str::mute_audio] = true;
}
- SendHMIRequest(hmi_apis::FunctionID::UI_PerformAudioPassThru,
- &msg_params, true);
+ 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);
+ 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);
@@ -277,7 +273,8 @@ void PerformAudioPassThruRequest::StartMicrophoneRecording() {
application_manager_.BeginAudioPassThrough();
application_manager_.StartAudioPassThruThread(
- connection_key(), correlation_id(),
+ 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(),
@@ -304,25 +301,25 @@ bool PerformAudioPassThruRequest::IsWhiteSpaceExist() {
}
}
- if ((*message_)[strings::msg_params].
- keyExists(strings::audio_pass_display_text1)) {
-
- str = (*message_)[strings::msg_params]
- [strings::audio_pass_display_text1].asCharArray();
+ 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_,
+ 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 ((*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_,
+ LOG4CXX_ERROR(
+ logger_,
"Invalid audio_pass_display_text2 value syntax check failed");
return true;
}
@@ -330,7 +327,7 @@ bool PerformAudioPassThruRequest::IsWhiteSpaceExist() {
return false;
}
-void PerformAudioPassThruRequest::FinishTTSSpeak(){
+void PerformAudioPassThruRequest::FinishTTSSpeak() {
LOG4CXX_AUTO_TRACE(logger_);
if (application_manager_.EndAudioPassThrough()) {
LOG4CXX_DEBUG(logger_, "Stop AudioPassThru.");
@@ -352,16 +349,17 @@ bool PerformAudioPassThruRequest::WaitTTSSpeak() {
// Waiting for TTS_Speak
while (is_active_tts_speak_) {
- uint64_t difference_between_start_current_time
- = date_time::DateTime::calculateTimeSpan(start_time);
+ uint64_t difference_between_start_current_time =
+ date_time::DateTime::calculateTimeSpan(start_time);
// Send GENERIC_ERROR after default timeout
if (difference_between_start_current_time > default_timeout_msec) {
LOG4CXX_WARN(logger_, "Expired timeout for TTS.Speak response");
// Don't use onTimeOut(), because default_timeout_ is bigger than
// Default time in *.ini file
FinishTTSSpeak();
- SendResponse(false, mobile_apis::Result::eType::GENERIC_ERROR,
- "Expired timeout for TTS.Speak response");
+ SendResponse(false,
+ mobile_apis::Result::eType::GENERIC_ERROR,
+ "Expired timeout for TTS.Speak response");
return false;
}
}
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
index 411a0a41ae..e8a638c076 100644
--- 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
@@ -33,19 +33,15 @@
#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) {
-}
+ const MessageSharedPtr& message, ApplicationManager& application_manager)
+ : CommandResponseImpl(message, application_manager) {}
-PerformAudioPassThruResponse::~PerformAudioPassThruResponse() {
-}
+PerformAudioPassThruResponse::~PerformAudioPassThruResponse() {}
void PerformAudioPassThruResponse::Run() {
LOG4CXX_AUTO_TRACE(logger_);
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
index 4745587fe6..39ad51e822 100644
--- a/src/components/application_manager/src/commands/mobile/perform_interaction_request.cc
+++ b/src/components/application_manager/src/commands/mobile/perform_interaction_request.cc
@@ -45,8 +45,6 @@
#include "utils/custom_string.h"
#include "utils/gen_hash.h"
-
-
namespace application_manager {
namespace commands {
@@ -56,23 +54,22 @@ 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_recived_(false),
- vr_response_recived_(false),
- ui_result_(false),
- vr_result_(false),
- app_pi_was_active_before_(false),
- vr_resultCode_(mobile_apis::Result::INVALID_ENUM),
- ui_resultCode_(mobile_apis::Result::INVALID_ENUM) {
+ const MessageSharedPtr& message, ApplicationManager& application_manager)
+ : CommandRequestImpl(message, application_manager)
+ , interaction_mode_(mobile_apis::InteractionMode::INVALID_ENUM)
+ , ui_response_recived_(false)
+ , vr_response_recived_(false)
+ , ui_result_(false)
+ , vr_result_(false)
+ , app_pi_was_active_before_(false)
+ , vr_resultCode_(mobile_apis::Result::INVALID_ENUM)
+ , ui_resultCode_(mobile_apis::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() {
-}
+PerformInteractionRequest::~PerformInteractionRequest() {}
bool PerformInteractionRequest::Init() {
/* Timeout in milliseconds.
@@ -95,8 +92,7 @@ bool PerformInteractionRequest::Init() {
void PerformInteractionRequest::Run() {
LOG4CXX_AUTO_TRACE(logger_);
- ApplicationSharedPtr app =
- application_manager_.application(connection_key());
+ ApplicationSharedPtr app = application_manager_.application(connection_key());
if (!app) {
LOG4CXX_ERROR(logger_, "Application is not registered");
@@ -120,8 +116,9 @@ void PerformInteractionRequest::Run() {
if ((mobile_apis::InteractionMode::VR_ONLY == interaction_mode_) &&
(mobile_apis::LayoutMode::KEYBOARD == interaction_layout)) {
- LOG4CXX_ERROR(logger_, "PerformInteraction contains InteractionMode"
- "=VR_ONLY and interactionLayout=KEYBOARD");
+ LOG4CXX_ERROR(logger_,
+ "PerformInteraction contains InteractionMode"
+ "=VR_ONLY and interactionLayout=KEYBOARD");
SendResponse(false, mobile_apis::Result::INVALID_DATA);
return;
}
@@ -132,15 +129,17 @@ void PerformInteractionRequest::Run() {
if (0 == choice_set_id_list_length) {
if (mobile_apis::LayoutMode::KEYBOARD == interaction_layout) {
if (mobile_apis::InteractionMode::BOTH == interaction_mode_) {
- LOG4CXX_ERROR(logger_,"interactionChoiceSetIDList is empty,"
- " InteractionMode=BOTH and"
- " interactionLayout=KEYBOARD");
+ 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");
+ LOG4CXX_ERROR(logger_,
+ "interactionChoiceSetIDList is empty"
+ " and interactionLayout!=KEYBOARD");
SendResponse(false, mobile_apis::Result::INVALID_DATA);
return;
}
@@ -148,20 +147,22 @@ void PerformInteractionRequest::Run() {
if (choice_set_id_list_length &&
(!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");
+ 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.");
+ 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;
}
@@ -177,8 +178,7 @@ void PerformInteractionRequest::Run() {
switch (interaction_mode_) {
case mobile_apis::InteractionMode::BOTH: {
LOG4CXX_DEBUG(logger_, "Interaction Mode: BOTH");
- if (!CheckChoiceSetVRSynonyms(app) ||
- !CheckChoiceSetMenuNames(app) ||
+ if (!CheckChoiceSetVRSynonyms(app) || !CheckChoiceSetMenuNames(app) ||
!CheckVrHelpItemPositions(app)) {
return;
}
@@ -186,8 +186,7 @@ void PerformInteractionRequest::Run() {
}
case mobile_apis::InteractionMode::MANUAL_ONLY: {
LOG4CXX_DEBUG(logger_, "Interaction Mode: MANUAL_ONLY");
- if (!CheckChoiceSetVRSynonyms(app) ||
- !CheckChoiceSetMenuNames(app) ||
+ if (!CheckChoiceSetVRSynonyms(app) || !CheckChoiceSetMenuNames(app) ||
!CheckVrHelpItemPositions(app)) {
return;
}
@@ -195,8 +194,7 @@ void PerformInteractionRequest::Run() {
}
case mobile_apis::InteractionMode::VR_ONLY: {
LOG4CXX_DEBUG(logger_, "Interaction Mode: VR_ONLY");
- if (!CheckChoiceSetVRSynonyms(app) ||
- !CheckVrHelpItemPositions(app)) {
+ if (!CheckChoiceSetVRSynonyms(app) || !CheckVrHelpItemPositions(app)) {
return;
}
break;
@@ -225,15 +223,16 @@ void PerformInteractionRequest::on_event(const event_engine::Event& event) {
case hmi_apis::FunctionID::UI_OnResetTimeout: {
LOG4CXX_DEBUG(logger_, "Received UI_OnResetTimeout event");
application_manager_.updateRequestTimeout(
- connection_key(), correlation_id(), default_timeout());
+ connection_key(), correlation_id(), default_timeout());
break;
}
case hmi_apis::FunctionID::UI_PerformInteraction: {
LOG4CXX_DEBUG(logger_, "Received UI_PerformInteraction event");
ui_response_recived_ = true;
unsubscribe_from_event(hmi_apis::FunctionID::UI_PerformInteraction);
- ui_resultCode_ = GetMobileResultCode(static_cast<hmi_apis::Common_Result::eType>(
- message[strings::params][hmi_response::code].asUInt()));
+ ui_resultCode_ =
+ GetMobileResultCode(static_cast<hmi_apis::Common_Result::eType>(
+ message[strings::params][hmi_response::code].asUInt()));
ProcessPerformInteractionResponse(event.smart_object(), msg_param);
break;
}
@@ -241,8 +240,9 @@ void PerformInteractionRequest::on_event(const event_engine::Event& event) {
LOG4CXX_DEBUG(logger_, "Received VR_PerformInteraction");
vr_response_recived_ = true;
unsubscribe_from_event(hmi_apis::FunctionID::VR_PerformInteraction);
- vr_resultCode_ = GetMobileResultCode(static_cast<hmi_apis::Common_Result::eType>(
- message[strings::params][hmi_response::code].asUInt()));
+ vr_resultCode_ =
+ GetMobileResultCode(static_cast<hmi_apis::Common_Result::eType>(
+ message[strings::params][hmi_response::code].asUInt()));
ProcessVRResponse(event.smart_object(), msg_param);
break;
}
@@ -270,13 +270,13 @@ void PerformInteractionRequest::onTimeOut() {
CommandRequestImpl::onTimeOut();
} else {
application_manager_.updateRequestTimeout(
- connection_key(), correlation_id(), default_timeout());
+ connection_key(), correlation_id(), default_timeout());
}
break;
}
case mobile_apis::InteractionMode::VR_ONLY: {
application_manager_.updateRequestTimeout(
- connection_key(), correlation_id(), default_timeout());
+ connection_key(), correlation_id(), default_timeout());
break;
}
case mobile_apis::InteractionMode::MANUAL_ONLY: {
@@ -292,7 +292,6 @@ void PerformInteractionRequest::onTimeOut() {
};
}
-
void PerformInteractionRequest::ProcessVRResponse(
const smart_objects::SmartObject& message,
smart_objects::SmartObject& msg_params) {
@@ -302,8 +301,7 @@ void PerformInteractionRequest::ProcessVRResponse(
using namespace smart_objects;
using namespace helpers;
- ApplicationSharedPtr app =
- application_manager_.application(connection_key());
+ ApplicationSharedPtr app = application_manager_.application(connection_key());
if (!app) {
LOG4CXX_ERROR(logger_, "NULL pointer");
@@ -315,9 +313,7 @@ void PerformInteractionRequest::ProcessVRResponse(
static_cast<int32_t>(TriggerSource::TS_VR);
const bool is_vr_aborted_timeout =
- Compare<Result::eType, EQ, ONE>(vr_resultCode_,
- ABORTED,
- TIMED_OUT);
+ Compare<Result::eType, EQ, ONE>(vr_resultCode_, ABORTED, TIMED_OUT);
if (is_vr_aborted_timeout) {
LOG4CXX_DEBUG(logger_, "VR response aborted");
@@ -328,17 +324,16 @@ void PerformInteractionRequest::ProcessVRResponse(
return;
}
LOG4CXX_DEBUG(logger_, "Update timeout for UI");
- application_manager_.
- updateRequestTimeout(connection_key(),
- correlation_id(),
- default_timeout());
+ application_manager_.updateRequestTimeout(
+ connection_key(), correlation_id(), default_timeout());
return;
}
if (SUCCESS == vr_resultCode_ &&
InteractionMode::MANUAL_ONLY == interaction_mode_) {
- LOG4CXX_DEBUG(logger_, "VR response SUCCESS in MANUAL_ONLY mode " <<
- "Wait for UI response");
+ 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;
}
@@ -349,7 +344,8 @@ void PerformInteractionRequest::ProcessVRResponse(
if (!CheckChoiceIDFromResponse(app, choise_id)) {
LOG4CXX_ERROR(logger_, "Wrong choiceID was received from HMI");
TerminatePerformInteraction();
- SendResponse(false, GENERIC_ERROR,"Wrong choiceID was received from HMI");
+ SendResponse(
+ false, GENERIC_ERROR, "Wrong choiceID was received from HMI");
return;
}
msg_params[strings::choice_id] = choise_id;
@@ -375,29 +371,23 @@ void PerformInteractionRequest::ProcessPerformInteractionResponse(
using namespace helpers;
using namespace smart_objects;
- ApplicationSharedPtr app =
- application_manager_.application(connection_key());
+ ApplicationSharedPtr app = application_manager_.application(connection_key());
if (!app) {
LOG4CXX_ERROR(logger_, "NULL pointer");
return;
}
- ui_result_ =
- Compare<mobile_api::Result::eType, EQ, ONE>(
- ui_resultCode_,
- mobile_apis::Result::SUCCESS,
- mobile_apis::Result::WARNINGS,
- mobile_apis::Result::UNSUPPORTED_RESOURCE);
+ ui_result_ = Compare<mobile_api::Result::eType, EQ, ONE>(
+ ui_resultCode_,
+ mobile_apis::Result::SUCCESS,
+ mobile_apis::Result::WARNINGS,
+ mobile_apis::Result::UNSUPPORTED_RESOURCE);
- const bool is_pi_warning =
- Compare<mobile_api::Result::eType, EQ, ONE>(
- ui_resultCode_,
- mobile_apis::Result::WARNINGS);
+ const bool is_pi_warning = Compare<mobile_api::Result::eType, EQ, ONE>(
+ ui_resultCode_, mobile_apis::Result::WARNINGS);
- const bool is_pi_unsupported =
- Compare<mobile_api::Result::eType, EQ, ONE>(
- ui_resultCode_,
- mobile_apis::Result::UNSUPPORTED_RESOURCE);
+ const bool is_pi_unsupported = Compare<mobile_api::Result::eType, EQ, ONE>(
+ ui_resultCode_, mobile_apis::Result::UNSUPPORTED_RESOURCE);
std::string info;
@@ -405,8 +395,8 @@ void PerformInteractionRequest::ProcessPerformInteractionResponse(
if (is_pi_warning) {
ui_resultCode_ = mobile_apis::Result::WARNINGS;
info = "Unsupported phoneme type was sent in an item";
- if (message.keyExists(strings::params)
- && message[strings::params].keyExists(strings::data)) {
+ if (message.keyExists(strings::params) &&
+ message[strings::params].keyExists(strings::data)) {
msg_params = message[strings::params][strings::data];
}
} else if (is_pi_unsupported) {
@@ -436,10 +426,7 @@ void PerformInteractionRequest::ProcessPerformInteractionResponse(
DisablePerformInteraction();
- const SmartObject* response_params =
- msg_params.empty()
- ? NULL
- : &msg_params;
+ const SmartObject* response_params = msg_params.empty() ? NULL : &msg_params;
if (mobile_apis::InteractionMode::BOTH != interaction_mode_) {
DisablePerformInteraction();
@@ -527,8 +514,8 @@ void PerformInteractionRequest::SendUIPerformInteractionRequest(
(*message_)[strings::msg_params][hmi_request::interaction_layout]
.asInt();
}
- SendHMIRequest(hmi_apis::FunctionID::UI_PerformInteraction,
- &msg_params, true);
+ SendHMIRequest(
+ hmi_apis::FunctionID::UI_PerformInteraction, &msg_params, true);
}
void PerformInteractionRequest::SendVRPerformInteractionRequest(
@@ -539,7 +526,7 @@ void PerformInteractionRequest::SendVRPerformInteractionRequest(
smart_objects::SmartObject(smart_objects::SmartType_Map);
smart_objects::SmartObject& choice_list =
- (*message_)[strings::msg_params][strings::interaction_choice_set_id_list];
+ (*message_)[strings::msg_params][strings::interaction_choice_set_id_list];
if (mobile_apis::InteractionMode::MANUAL_ONLY != interaction_mode_) {
msg_params[strings::grammar_id] =
@@ -553,7 +540,7 @@ void PerformInteractionRequest::SendVRPerformInteractionRequest(
LOG4CXX_WARN(logger_, "Couldn't found choiset");
continue;
}
- msg_params[strings::grammar_id][grammar_id_index++]=
+ msg_params[strings::grammar_id][grammar_id_index++] =
(*choice_set)[strings::grammar_id].asUInt();
}
}
@@ -582,8 +569,9 @@ void PerformInteractionRequest::SendVRPerformInteractionRequest(
// 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();
+ item[strings::text] =
+ vr_commands[0].asString() +
+ application_manager_.get_settings().tts_delimiter();
msg_params[strings::help_prompt][index++] = item;
}
}
@@ -595,7 +583,7 @@ void PerformInteractionRequest::SendVRPerformInteractionRequest(
if ((*message_)[strings::msg_params].keyExists(strings::timeout_prompt)) {
msg_params[strings::timeout_prompt] =
- (*message_)[strings::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];
@@ -603,8 +591,8 @@ void PerformInteractionRequest::SendVRPerformInteractionRequest(
}
if ((*message_)[strings::msg_params].keyExists(strings::initial_prompt)) {
- msg_params[strings::initial_prompt] =
- (*message_)[strings::msg_params][strings::initial_prompt];
+ msg_params[strings::initial_prompt] =
+ (*message_)[strings::msg_params][strings::initial_prompt];
}
mobile_apis::InteractionMode::eType mode =
@@ -618,8 +606,8 @@ void PerformInteractionRequest::SendVRPerformInteractionRequest(
msg_params[strings::timeout] = default_timeout_;
}
msg_params[strings::app_id] = app->app_id();
- SendHMIRequest(hmi_apis::FunctionID::VR_PerformInteraction, &msg_params,
- true);
+ SendHMIRequest(
+ hmi_apis::FunctionID::VR_PerformInteraction, &msg_params, true);
}
bool PerformInteractionRequest::CheckChoiceSetMenuNames(
@@ -631,12 +619,12 @@ bool PerformInteractionRequest::CheckChoiceSetMenuNames(
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());
+ 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());
+ smart_objects::SmartObject* j_choice_set =
+ app->FindChoiceSet(choice_list[j].asInt());
if (i == j) {
// skip check the same element
@@ -662,7 +650,8 @@ bool PerformInteractionRequest::CheckChoiceSetMenuNames(
if (ii_menu_name == jj_menu_name) {
LOG4CXX_ERROR(logger_, "Choice set has duplicated menu name");
- SendResponse(false, mobile_apis::Result::DUPLICATE_NAME,
+ SendResponse(false,
+ mobile_apis::Result::DUPLICATE_NAME,
"Choice set has duplicated menu name");
return false;
}
@@ -750,7 +739,8 @@ bool PerformInteractionRequest::CheckVrHelpItemPositions(
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,
+ SendResponse(false,
+ mobile_apis::Result::REJECTED,
"Non-sequential vrHelp item position");
return false;
}
@@ -789,7 +779,6 @@ bool PerformInteractionRequest::IsWhiteSpaceExist() {
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();
@@ -868,8 +857,8 @@ bool PerformInteractionRequest::IsWhiteSpaceExist() {
void PerformInteractionRequest::TerminatePerformInteraction() {
LOG4CXX_AUTO_TRACE(logger_);
- smart_objects::SmartObject msg_params = smart_objects::SmartObject(
- smart_objects::SmartType_Map);
+ 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();
@@ -888,8 +877,8 @@ bool PerformInteractionRequest::CheckChoiceIDFromResponse(
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);
+ 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()) {
@@ -915,19 +904,22 @@ bool PerformInteractionRequest::CheckChoiceIDFromRequest(
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());
+ 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());
+ 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");
+ LOG4CXX_ERROR(logger_,
+ "Choise with ID "
+ << choices_list[k][strings::choice_id].asInt()
+ << " already exists");
return false;
}
}
@@ -951,7 +943,7 @@ void PerformInteractionRequest::CheckResponseResultCode() {
LOG4CXX_DEBUG(logger_, "VR had been rejected.");
resultCode = mobile_apis::Result::REJECTED;
} else if (mobile_apis::Result::WARNINGS == vr_resultCode_ ||
- mobile_apis::Result::UNSUPPORTED_REQUEST == vr_resultCode_) {
+ mobile_apis::Result::UNSUPPORTED_REQUEST == vr_resultCode_) {
LOG4CXX_DEBUG(logger_, "VR response WARNINGS");
resultCode = mobile_api::Result::WARNINGS;
result = true;
@@ -975,21 +967,19 @@ void PerformInteractionRequest::SendBothModeResponse(
UNSUPPORTED_RESOURCE != ui_resultCode_) {
perform_interaction_result_code = vr_resultCode_;
} else if (UNSUPPORTED_RESOURCE == vr_resultCode_ &&
- UNSUPPORTED_RESOURCE == ui_resultCode_) {
+ UNSUPPORTED_RESOURCE == ui_resultCode_) {
result = false;
}
const bool is_error_code = (SUCCESS != perform_interaction_result_code ||
- WARNINGS != perform_interaction_result_code);
+ WARNINGS != perform_interaction_result_code);
if (vr_resultCode_ == ui_resultCode_ && is_error_code) {
result = false;
}
const smart_objects::SmartObject* response_params =
- msg_param.empty()
- ? NULL
- : &msg_param;
+ msg_param.empty() ? NULL : &msg_param;
TerminatePerformInteraction();
SendResponse(result, perform_interaction_result_code, NULL, response_params);
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
index 16a8e9616c..6003751669 100644
--- a/src/components/application_manager/src/commands/mobile/perform_interaction_response.cc
+++ b/src/components/application_manager/src/commands/mobile/perform_interaction_response.cc
@@ -33,18 +33,15 @@
#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) {
-}
+ : CommandResponseImpl(message, application_manager) {}
-PerformInteractionResponse::~PerformInteractionResponse() {
-}
+PerformInteractionResponse::~PerformInteractionResponse() {}
void PerformInteractionResponse::Run() {
LOG4CXX_AUTO_TRACE(logger_);
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
index 9ff52da8f4..68e7ad60d1 100644
--- a/src/components/application_manager/src/commands/mobile/put_file_request.cc
+++ b/src/components/application_manager/src/commands/mobile/put_file_request.cc
@@ -43,25 +43,24 @@ 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(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() {
-}
+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);
+ smart_objects::SmartObject response_params =
+ smart_objects::SmartObject(smart_objects::SmartType_Map);
if (!application) {
LOG4CXX_ERROR(logger_, "Application is not registered");
@@ -71,12 +70,13 @@ void PutFileRequest::Run() {
if (mobile_api::HMILevel::HMI_NONE == application->hmi_level() &&
application_manager_.get_settings().put_file_in_none() <=
- application->put_file_in_none_count()) {
+ 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,
+ SendResponse(false,
+ mobile_apis::Result::REJECTED,
"Too many requests from the app with HMILevel HMI_NONE",
&response_params);
return;
@@ -84,7 +84,8 @@ void PutFileRequest::Run() {
if (!(*message_)[strings::params].keyExists(strings::binary_data)) {
LOG4CXX_ERROR(logger_, "Binary data empty");
- SendResponse(false, mobile_apis::Result::INVALID_DATA,
+ SendResponse(false,
+ mobile_apis::Result::INVALID_DATA,
"Binary data empty",
&response_params);
return;
@@ -92,7 +93,8 @@ void PutFileRequest::Run() {
if (!(*message_)[strings::msg_params].keyExists(strings::sync_file_name)) {
LOG4CXX_ERROR(logger_, "No file name");
- SendResponse(false, mobile_apis::Result::INVALID_DATA,
+ SendResponse(false,
+ mobile_apis::Result::INVALID_DATA,
"No file name",
&response_params);
return;
@@ -100,24 +102,24 @@ void PutFileRequest::Run() {
if (!(*message_)[strings::msg_params].keyExists(strings::file_type)) {
LOG4CXX_ERROR(logger_, "No file type");
- SendResponse(false, mobile_apis::Result::INVALID_DATA,
+ 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();
- file_type_ =
- static_cast<mobile_apis::FileType::eType>(
+ (*message_)[strings::msg_params][strings::sync_file_name].asString();
+ 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();
+ (*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);
+ application_manager_.GetPolicyHandler().ReceiveMessageFromSDK(
+ sync_file_name_, binary_data);
}
offset_ = 0;
@@ -132,15 +134,13 @@ void PutFileRequest::Run() {
offset_ = (*message_)[strings::msg_params][strings::offset].asInt();
}
- if ((*message_)[strings::msg_params].
- keyExists(strings::persistent_file)) {
+ if ((*message_)[strings::msg_params].keyExists(strings::persistent_file)) {
is_persistent_file_ =
- (*message_)[strings::msg_params][strings::persistent_file].asBool();
+ (*message_)[strings::msg_params][strings::persistent_file].asBool();
}
- if ((*message_)[strings::msg_params].
- keyExists(strings::system_file)) {
+ if ((*message_)[strings::msg_params].keyExists(strings::system_file)) {
is_system_file =
- (*message_)[strings::msg_params][strings::system_file].asBool();
+ (*message_)[strings::msg_params][strings::system_file].asBool();
}
std::string file_path;
@@ -155,39 +155,42 @@ void PutFileRequest::Run() {
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);
+ 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);
+ SendResponse(false,
+ mobile_apis::Result::GENERIC_ERROR,
+ "Can't create folder.",
+ &response_params);
return;
}
const std::string full_path = file_path + "/" + sync_file_name_;
UNUSED(full_path);
- LOG4CXX_DEBUG(logger_, "Wrtiting " << binary_data.size() << "bytes to "
- << full_path << " (current size is"
- << file_system::FileSize(full_path) << ")");
-
- mobile_apis::Result::eType save_result =
- application_manager_.SaveBinary(binary_data, file_path,
- sync_file_name_, offset_);
-
- LOG4CXX_DEBUG(logger_, "New size of "
- << full_path << " is "
- << file_system::FileSize(full_path) << " bytes");
+ LOG4CXX_DEBUG(logger_,
+ "Wrtiting " << binary_data.size() << "bytes to " << full_path
+ << " (current size is"
+ << file_system::FileSize(full_path) << ")");
+
+ mobile_apis::Result::eType save_result = application_manager_.SaveBinary(
+ binary_data, file_path, sync_file_name_, offset_);
+
+ LOG4CXX_DEBUG(logger_,
+ "New size of " << full_path << " is "
+ << file_system::FileSize(full_path) << " bytes");
if (!is_system_file) {
- response_params[strings::space_available] = static_cast<uint32_t>(
- application->GetAvailableDiskSpace());
+ response_params[strings::space_available] =
+ static_cast<uint32_t>(application->GetAvailableDiskSpace());
}
sync_file_name_ = file_path + "/" + sync_file_name_;
@@ -195,23 +198,25 @@ void PutFileRequest::Run() {
case mobile_apis::Result::SUCCESS: {
LOG4CXX_INFO(logger_, "PutFile is successful");
if (!is_system_file) {
- AppFile file(sync_file_name_, is_persistent_file_,
- is_download_compleate, file_type_);
+ AppFile file(sync_file_name_,
+ is_persistent_file_,
+ is_download_compleate,
+ file_type_);
if (0 == offset_) {
LOG4CXX_INFO(logger_, "New file downloading");
if (!application->AddFile(file)) {
-
LOG4CXX_INFO(logger_,
"Couldn't add file to application (File already Exist"
- << " in application and was rewritten on FS)");
+ << " 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,
+ SendResponse(false,
+ mobile_apis::Result::INVALID_DATA,
"Couldn't update file",
&response_params);
return;
@@ -232,20 +237,21 @@ void PutFileRequest::Run() {
break;
}
default:
- LOG4CXX_WARN(logger_, "PutFile is unsuccessful. Result = " << save_result);
+ 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);
+ 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;
+ hmi_apis::FunctionID::BasicCommunication_OnPutFile;
message[strings::params][strings::message_type] = MessageType::kNotification;
message[strings::msg_params][strings::app_id] = connection_key();
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
index 08d936863a..50c62aef7f 100644
--- a/src/components/application_manager/src/commands/mobile/put_file_response.cc
+++ b/src/components/application_manager/src/commands/mobile/put_file_response.cc
@@ -35,22 +35,20 @@
#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(const MessageSharedPtr& message,
+ ApplicationManager& application_manager)
+ : CommandResponseImpl(message, application_manager) {}
-PutFileResponse::~PutFileResponse() {
-}
+PutFileResponse::~PutFileResponse() {}
void PutFileResponse::Run() {
LOG4CXX_AUTO_TRACE(logger_);
- uint32_t app_id = (*message_)[strings::params][strings::connection_key]
- .asUInt();
+ 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");
@@ -58,7 +56,6 @@ void PutFileResponse::Run() {
return;
}
-
SendResponse((*message_)[strings::msg_params][strings::success].asBool());
}
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
index f37e02bc7d..69885f9d40 100644
--- a/src/components/application_manager/src/commands/mobile/read_did_request.cc
+++ b/src/components/application_manager/src/commands/mobile/read_did_request.cc
@@ -41,22 +41,23 @@ namespace application_manager {
namespace commands {
-ReadDIDRequest::ReadDIDRequest(const MessageSharedPtr& message, ApplicationManager& application_manager)
- : CommandRequestImpl(message, application_manager) {
-}
+ReadDIDRequest::ReadDIDRequest(const MessageSharedPtr& message,
+ ApplicationManager& application_manager)
+ : CommandRequestImpl(message, application_manager) {}
-ReadDIDRequest::~ReadDIDRequest() {
-}
+ReadDIDRequest::~ReadDIDRequest() {}
void ReadDIDRequest::Run() {
LOG4CXX_AUTO_TRACE(logger_);
- uint32_t app_id = (*message_)[strings::params][strings::connection_key]
- .asUInt();
+ 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());
+ LOG4CXX_INFO(
+ logger_,
+ "Correlation_id :"
+ << (*message_)[strings::params][strings::correlation_id].asUInt());
if (!app) {
LOG4CXX_ERROR(logger_, "An application is not registered.");
@@ -65,8 +66,8 @@ void ReadDIDRequest::Run() {
}
if (app->IsCommandLimitsExceeded(
- static_cast<mobile_apis::FunctionID::eType>(function_id()),
- application_manager::TLimitSource::CONFIG_FILE)) {
+ 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;
@@ -78,8 +79,8 @@ void ReadDIDRequest::Run() {
return;
}
- smart_objects::SmartObject msg_params = smart_objects::SmartObject(
- smart_objects::SmartType_Map);
+ 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];
@@ -104,7 +105,9 @@ void ReadDIDRequest::on_event(const event_engine::Event& event) {
const std::string return_info =
message[strings::msg_params][hmi_response::message].asString();
- SendResponse(result, result_code, return_info.c_str(),
+ SendResponse(result,
+ result_code,
+ return_info.c_str(),
&(message[strings::msg_params]));
break;
}
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
index 1637f3e9bc..e54c4ba005 100644
--- a/src/components/application_manager/src/commands/mobile/read_did_response.cc
+++ b/src/components/application_manager/src/commands/mobile/read_did_response.cc
@@ -33,17 +33,15 @@
#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(const MessageSharedPtr& message,
+ ApplicationManager& application_manager)
+ : CommandResponseImpl(message, application_manager) {}
-ReadDIDResponse::~ReadDIDResponse() {
-}
+ReadDIDResponse::~ReadDIDResponse() {}
void ReadDIDResponse::Run() {
LOG4CXX_AUTO_TRACE(logger_);
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
index 23fba2edcc..eea2f443b7 100644
--- 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
@@ -187,8 +187,8 @@ void RegisterAppInterfaceRequest::Run() {
const std::string& policy_app_id = msg_params[strings::app_id].asString();
- if (application_manager_.IsApplicationForbidden(
- connection_key(), policy_app_id)) {
+ if (application_manager_.IsApplicationForbidden(connection_key(),
+ policy_app_id)) {
SendResponse(false, mobile_apis::Result::TOO_MANY_PENDING_REQUESTS);
return;
}
@@ -230,16 +230,14 @@ void RegisterAppInterfaceRequest::Run() {
return;
}
- application =
- application_manager_.RegisterApplication(message_);
+ 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();
+ 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
@@ -323,11 +321,9 @@ void RegisterAppInterfaceRequest::SendRegisterAppInterfaceResponseToMobile() {
application_manager_.hmi_capabilities();
const uint32_t key = connection_key();
- ApplicationSharedPtr application =
- application_manager_.application(key);
+ ApplicationSharedPtr application = application_manager_.application(key);
- resumption::ResumeCtrl& resumer =
- application_manager_.resume_controller();
+ resumption::ResumeCtrl& resumer = application_manager_.resume_controller();
if (!application) {
LOG4CXX_ERROR(logger_,
@@ -338,9 +334,9 @@ void RegisterAppInterfaceRequest::SendRegisterAppInterfaceResponseToMobile() {
}
response_params[strings::sync_msg_version][strings::major_version] =
- major_version; // From generated file interfaces/generated_msg_version.h
+ 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
+ minor_version; // From generated file interfaces/generated_msg_version.h
response_params[strings::language] = hmi_capabilities.active_vr_language();
response_params[strings::hmi_display_language] =
@@ -534,9 +530,8 @@ void RegisterAppInterfaceRequest::SendRegisterAppInterfaceResponseToMobile() {
// in case application exist in resumption we need to send resumeVrgrammars
if (false == resumption) {
- resumption = resumer.IsApplicationSaved(
- application->policy_app_id(),
- application->mac_address());
+ resumption = resumer.IsApplicationSaved(application->policy_app_id(),
+ application->mac_address());
}
SendOnAppRegisteredNotificationToHMI(
@@ -551,7 +546,8 @@ void RegisterAppInterfaceRequest::SendRegisterAppInterfaceResponseToMobile() {
// By default app subscribed to CUSTOM_BUTTON
SendSubscribeCustomButtonNotification();
- MessageHelper::SendChangeRegistrationRequestToHMI(application, application_manager_);
+ MessageHelper::SendChangeRegistrationRequestToHMI(application,
+ application_manager_);
}
void RegisterAppInterfaceRequest::SendOnAppRegisteredNotificationToHMI(
@@ -621,8 +617,7 @@ void RegisterAppInterfaceRequest::SendOnAppRegisteredNotificationToHMI(
}
std::vector<std::string> request_types =
- GetPolicyHandler().GetAppRequestTypes(
- application_impl.policy_app_id());
+ GetPolicyHandler().GetAppRequestTypes(application_impl.policy_app_id());
application[strings::request_type] = SmartObject(SmartType_Array);
smart_objects::SmartObject& request_array =
@@ -638,8 +633,7 @@ void RegisterAppInterfaceRequest::SendOnAppRegisteredNotificationToHMI(
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();
+ application_manager_.connection_handler().get_session_observer();
std::string device_name;
std::string mac_address;
std::string transport_type;
@@ -660,8 +654,7 @@ void RegisterAppInterfaceRequest::SendOnAppRegisteredNotificationToHMI(
policy::DeviceConsent::kDeviceAllowed == device_consent;
device_info[strings::transport_type] =
- application_manager_.GetDeviceTransportType(
- transport_type);
+ application_manager_.GetDeviceTransportType(transport_type);
DCHECK(application_manager_.ManageHMICommand(notification));
}
@@ -1006,7 +999,8 @@ void RegisterAppInterfaceRequest::SendSubscribeCustomButtonNotification() {
CreateHMINotification(FunctionID::Buttons_OnButtonSubscription, msg_params);
}
-policy::PolicyHandlerInterface& RegisterAppInterfaceRequest::GetPolicyHandler() {
+policy::PolicyHandlerInterface&
+RegisterAppInterfaceRequest::GetPolicyHandler() {
return application_manager_.GetPolicyHandler();
}
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
index 576f842bf7..1d7f829a68 100644
--- 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
@@ -61,13 +61,14 @@ void RegisterAppInterfaceResponse::Run() {
SendResponse(success, result_code, last_message);
- if (mobile_apis::Result::SUCCESS != result_code) { return; }
+ 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());
+ application_manager_.application(connection_key());
if (!application) {
LOG4CXX_ERROR(logger_,
"Application with connection key " << connection_key()
@@ -83,7 +84,8 @@ void RegisterAppInterfaceResponse::Run() {
// Sends OnPermissionChange notification to mobile right after RAI response
// and HMI level set-up
- application_manager_.GetPolicyHandler().OnAppRegisteredOnMobile(application->policy_app_id());
+ application_manager_.GetPolicyHandler().OnAppRegisteredOnMobile(
+ application->policy_app_id());
}
void RegisterAppInterfaceResponse::SetHeartBeatTimeout(
@@ -94,8 +96,8 @@ void RegisterAppInterfaceResponse::SetHeartBeatTimeout(
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);
+ application_manager_.connection_handler().SetHeartBeatTimeout(
+ connection_key, timeout);
}
} else {
LOG4CXX_INFO(logger_, "Policy is turn off");
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
index d394370658..e47ed01f51 100644
--- 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
@@ -44,23 +44,22 @@ namespace application_manager {
namespace commands {
ResetGlobalPropertiesRequest::ResetGlobalPropertiesRequest(
- 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) {
-}
+ 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) {}
-ResetGlobalPropertiesRequest::~ResetGlobalPropertiesRequest() {
-}
+ResetGlobalPropertiesRequest::~ResetGlobalPropertiesRequest() {}
void ResetGlobalPropertiesRequest::Run() {
LOG4CXX_AUTO_TRACE(logger_);
- uint32_t app_id = (*message_)[strings::params][strings::connection_key].asUInt();
+ uint32_t app_id =
+ (*message_)[strings::params][strings::connection_key].asUInt();
ApplicationSharedPtr app = application_manager_.application(app_id);
if (!app) {
@@ -69,13 +68,12 @@ void ResetGlobalPropertiesRequest::Run() {
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_
+ 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);
+ application_manager_.RemoveAppFromTTSGlobalPropertiesList(app_id);
bool helpt_promt = false;
bool timeout_prompt = false;
@@ -96,20 +94,23 @@ void ResetGlobalPropertiesRequest::Run() {
} 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)) {
+ (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) {
+ } 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) {
+ if (vr_help_title_items || menu_name || menu_icon ||
+ is_key_board_properties) {
is_ui_send_ = true;
}
@@ -119,13 +120,14 @@ void ResetGlobalPropertiesRequest::Run() {
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 || 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);
+ smart_objects::SmartObjectSPtr vr_help =
+ MessageHelper::CreateAppVrHelp(app);
if (!vr_help) {
return;
}
@@ -135,19 +137,20 @@ void ResetGlobalPropertiesRequest::Run() {
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) {
+ // 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);
+ 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::SmartObject limited_character_list =
+ smart_objects::SmartObject(
smart_objects::SmartType_Array);
limited_character_list[0] = "";
key_board_properties[hmi_request::limited_character_list] =
@@ -158,14 +161,14 @@ void ResetGlobalPropertiesRequest::Run() {
}
msg_params[strings::app_id] = app->app_id();
- SendHMIRequest(hmi_apis::FunctionID::UI_SetGlobalProperties,
- &msg_params, true);
+ 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);
+ smart_objects::SmartObject msg_params =
+ smart_objects::SmartObject(smart_objects::SmartType_Map);
if (helpt_promt) {
msg_params[strings::help_prompt] = (*app->help_prompt());
@@ -177,8 +180,8 @@ void ResetGlobalPropertiesRequest::Run() {
msg_params[strings::app_id] = app->app_id();
- SendHMIRequest(hmi_apis::FunctionID::TTS_SetGlobalProperties,
- &msg_params, true);
+ SendHMIRequest(
+ hmi_apis::FunctionID::TTS_SetGlobalProperties, &msg_params, true);
}
}
@@ -189,8 +192,8 @@ bool ResetGlobalPropertiesRequest::ResetHelpPromt(
SendResponse(false, mobile_apis::Result::APPLICATION_NOT_REGISTERED);
return false;
}
- smart_objects::SmartObject so_help_prompt = smart_objects::SmartObject(
- smart_objects::SmartType_Array);
+ smart_objects::SmartObject so_help_prompt =
+ smart_objects::SmartObject(smart_objects::SmartType_Array);
app->set_help_prompt(so_help_prompt);
return true;
}
@@ -206,12 +209,12 @@ bool ResetGlobalPropertiesRequest::ResetTimeoutPromt(
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);
+ 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);
+ 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;
@@ -243,34 +246,35 @@ void ResetGlobalPropertiesRequest::on_event(const event_engine::Event& event) {
application_manager_.application(connection_key());
switch (event.id()) {
- case hmi_apis::FunctionID::UI_SetGlobalProperties: {
- LOG4CXX_INFO(logger_, "Received UI_SetGlobalProperties event");
- is_ui_received_ = true;
- ui_result_ = static_cast<hmi_apis::Common_Result::eType>(
- message[strings::params][hmi_response::code].asInt());
- break;
- }
- case hmi_apis::FunctionID::TTS_SetGlobalProperties: {
- LOG4CXX_INFO(logger_, "Received TTS_SetGlobalProperties event");
- is_tts_received_ = true;
- tts_result_ = 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;
- }
+ case hmi_apis::FunctionID::UI_SetGlobalProperties: {
+ LOG4CXX_INFO(logger_, "Received UI_SetGlobalProperties event");
+ is_ui_received_ = true;
+ ui_result_ = static_cast<hmi_apis::Common_Result::eType>(
+ message[strings::params][hmi_response::code].asInt());
+ break;
+ }
+ case hmi_apis::FunctionID::TTS_SetGlobalProperties: {
+ LOG4CXX_INFO(logger_, "Received TTS_SetGlobalProperties event");
+ is_tts_received_ = true;
+ tts_result_ = 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;
+ }
}
if (!IsPendingResponseExist()) {
- bool result = ((hmi_apis::Common_Result::SUCCESS == ui_result_)
- && (hmi_apis::Common_Result::SUCCESS == tts_result_ ||
- hmi_apis::Common_Result::UNSUPPORTED_RESOURCE == tts_result_))
- || ((hmi_apis::Common_Result::SUCCESS == ui_result_)
- && (hmi_apis::Common_Result::INVALID_ENUM == tts_result_))
- || ((hmi_apis::Common_Result::INVALID_ENUM == ui_result_)
- && (hmi_apis::Common_Result::SUCCESS == tts_result_));
+ bool result =
+ ((hmi_apis::Common_Result::SUCCESS == ui_result_) &&
+ (hmi_apis::Common_Result::SUCCESS == tts_result_ ||
+ hmi_apis::Common_Result::UNSUPPORTED_RESOURCE == tts_result_)) ||
+ ((hmi_apis::Common_Result::SUCCESS == ui_result_) &&
+ (hmi_apis::Common_Result::INVALID_ENUM == tts_result_)) ||
+ ((hmi_apis::Common_Result::INVALID_ENUM == ui_result_) &&
+ (hmi_apis::Common_Result::SUCCESS == tts_result_));
mobile_apis::Result::eType result_code;
const char* return_info = NULL;
@@ -278,18 +282,21 @@ void ResetGlobalPropertiesRequest::on_event(const event_engine::Event& event) {
if (result) {
if (hmi_apis::Common_Result::UNSUPPORTED_RESOURCE == tts_result_) {
result_code = mobile_apis::Result::WARNINGS;
- return_info = std::string("Unsupported phoneme type sent in a prompt").c_str();
+ return_info =
+ std::string("Unsupported phoneme type sent in a prompt").c_str();
} else {
result_code = static_cast<mobile_apis::Result::eType>(
- std::max(ui_result_, tts_result_));
+ std::max(ui_result_, tts_result_));
}
} else {
result_code = static_cast<mobile_apis::Result::eType>(
- std::max(ui_result_, tts_result_));
+ std::max(ui_result_, tts_result_));
}
- SendResponse(result, static_cast<mobile_apis::Result::eType>(result_code),
- return_info, &(message[strings::msg_params]));
+ SendResponse(result,
+ static_cast<mobile_apis::Result::eType>(result_code),
+ return_info,
+ &(message[strings::msg_params]));
if (!application) {
LOG4CXX_ERROR(logger_, "NULL pointer");
@@ -304,7 +311,6 @@ void ResetGlobalPropertiesRequest::on_event(const event_engine::Event& event) {
}
}
-
bool ResetGlobalPropertiesRequest::IsPendingResponseExist() {
return is_ui_send_ != is_ui_received_ || is_tts_send_ != is_tts_received_;
}
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
index 6892543d78..c621977868 100644
--- 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
@@ -33,18 +33,15 @@
#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) {
-}
+ : CommandResponseImpl(message, application_manager) {}
-ResetGlobalPropertiesResponse::~ResetGlobalPropertiesResponse() {
-}
+ResetGlobalPropertiesResponse::~ResetGlobalPropertiesResponse() {}
void ResetGlobalPropertiesResponse::Run() {
LOG4CXX_AUTO_TRACE(logger_);
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
index 6366ccefdc..89bd43fcd6 100644
--- a/src/components/application_manager/src/commands/mobile/scrollable_message_request.cc
+++ b/src/components/application_manager/src/commands/mobile/scrollable_message_request.cc
@@ -47,15 +47,13 @@ namespace commands {
ScrollableMessageRequest::ScrollableMessageRequest(
const MessageSharedPtr& message, ApplicationManager& application_manager)
- : CommandRequestImpl(message, application_manager) {
+ : CommandRequestImpl(message, application_manager) {
subscribe_on_event(hmi_apis::FunctionID::UI_OnResetTimeout);
}
-ScrollableMessageRequest::~ScrollableMessageRequest() {
-}
+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)) {
@@ -80,11 +78,13 @@ void ScrollableMessageRequest::Run() {
return;
}
- //ProcessSoftButtons checks strings on the contents incorrect character
+ // 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_);
+ 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!");
@@ -92,11 +92,12 @@ void ScrollableMessageRequest::Run() {
return;
}
- smart_objects::SmartObject msg_params = smart_objects::SmartObject(
- smart_objects::SmartType_Map);
+ 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);
+ 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();
@@ -120,26 +121,24 @@ void ScrollableMessageRequest::on_event(const event_engine::Event& event) {
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());
+ application_manager_.updateRequestTimeout(
+ connection_key(), correlation_id(), default_timeout());
break;
}
case hmi_apis::FunctionID::UI_ScrollableMessage: {
LOG4CXX_INFO(logger_, "Received UI_ScrollableMessage event");
mobile_apis::Result::eType result_code =
- static_cast<mobile_apis::Result::eType>
- (message[strings::params][hmi_response::code].asInt());
+ static_cast<mobile_apis::Result::eType>(
+ message[strings::params][hmi_response::code].asInt());
HMICapabilities& hmi_capabilities =
application_manager_.hmi_capabilities();
- bool result =
- Compare<mobile_api::Result::eType, EQ, ONE>(
- result_code,
- mobile_api::Result::SUCCESS,
- mobile_api::Result::WARNINGS);
+ bool result = Compare<mobile_api::Result::eType, EQ, ONE>(
+ result_code,
+ mobile_api::Result::SUCCESS,
+ mobile_api::Result::WARNINGS);
if (mobile_apis::Result::UNSUPPORTED_RESOURCE == result_code &&
hmi_capabilities.is_ui_cooperating()) {
@@ -150,7 +149,7 @@ void ScrollableMessageRequest::on_event(const event_engine::Event& event) {
break;
}
default: {
- LOG4CXX_ERROR(logger_,"Received unknown event" << event.id());
+ LOG4CXX_ERROR(logger_, "Received unknown event" << event.id());
break;
}
}
@@ -158,4 +157,3 @@ void ScrollableMessageRequest::on_event(const event_engine::Event& event) {
} // 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
index ccc8bafbb0..a5b16bdb70 100644
--- a/src/components/application_manager/src/commands/mobile/scrollable_message_response.cc
+++ b/src/components/application_manager/src/commands/mobile/scrollable_message_response.cc
@@ -41,17 +41,16 @@ namespace application_manager {
namespace commands {
ScrollableMessageResponse::ScrollableMessageResponse(
- const MessageSharedPtr& message, ApplicationManager& application_manager)
- : CommandResponseImpl(message, application_manager) {
-}
+ 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());
+ 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());
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
index 9237b59ee9..8225e8081f 100644
--- a/src/components/application_manager/src/commands/mobile/send_location_request.cc
+++ b/src/components/application_manager/src/commands/mobile/send_location_request.cc
@@ -40,12 +40,11 @@ namespace application_manager {
namespace commands {
-SendLocationRequest::SendLocationRequest(const MessageSharedPtr& message, ApplicationManager& application_manager)
- : CommandRequestImpl(message, application_manager) {
-}
+SendLocationRequest::SendLocationRequest(
+ const MessageSharedPtr& message, ApplicationManager& application_manager)
+ : CommandRequestImpl(message, application_manager) {}
-SendLocationRequest::~SendLocationRequest() {
-}
+SendLocationRequest::~SendLocationRequest() {}
void SendLocationRequest::Run() {
using namespace hmi_apis;
@@ -56,8 +55,8 @@ void SendLocationRequest::Run() {
if (!app) {
LOG4CXX_ERROR(logger_,
- "An application with connection key " << connection_key()
- << " is not registered.");
+ "An application with connection key "
+ << connection_key() << " is not registered.");
SendResponse(false, mobile_apis::Result::APPLICATION_NOT_REGISTERED);
return;
}
@@ -83,7 +82,6 @@ void SendLocationRequest::Run() {
return;
}
-
if (IsWhiteSpaceExist()) {
LOG4CXX_ERROR(logger_, "Strings contain invalid characters");
SendResponse(false, mobile_apis::Result::INVALID_DATA);
@@ -94,21 +92,23 @@ void SendLocationRequest::Run() {
const utils::custom_string::CustomString& address =
msg_params[strings::address].asCustomString();
if (address.empty()) {
- msg_params.erase(strings::address);
+ msg_params.erase(strings::address);
}
}
- if (!CheckFieldsCompatibility()){
- LOG4CXX_ERROR(logger_, "CheckFieldsCompatibility failed");
- SendResponse(false, mobile_apis::Result::INVALID_DATA);
- return;
+ 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_);
+ (*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);
@@ -116,13 +116,11 @@ void SendLocationRequest::Run() {
}
}
-
- SmartObject request_msg_params = SmartObject(
- smart_objects::SmartType_Map);
+ SmartObject request_msg_params = SmartObject(smart_objects::SmartType_Map);
request_msg_params = msg_params;
request_msg_params[strings::app_id] = app->hmi_app_id();
- SendHMIRequest(hmi_apis::FunctionID::Navigation_SendLocation,
- &request_msg_params, true);
+ SendHMIRequest(
+ hmi_apis::FunctionID::Navigation_SendLocation, &request_msg_params, true);
}
void SendLocationRequest::on_event(const event_engine::Event& event) {
@@ -148,7 +146,8 @@ void SendLocationRequest::on_event(const event_engine::Event& event) {
}
bool SendLocationRequest::CheckFieldsCompatibility() {
- const smart_objects::SmartObject& msg_params = (*message_)[strings::msg_params];
+ 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);
@@ -157,22 +156,25 @@ bool SendLocationRequest::CheckFieldsCompatibility() {
const bool address_exist = msg_params.keyExists(strings::address);
if (latitude_degrees_exist ^ longitude_degrees_exist) {
- LOG4CXX_DEBUG(logger_, "latitude and longitude should be provided only in pair");
+ 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");
+ 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());
- }
+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() {
@@ -222,15 +224,17 @@ bool SendLocationRequest::IsWhiteSpaceExist() {
return false;
}
-bool SendLocationRequest::CheckHMICapabilities(std::list<hmi_apis::Common_TextFieldName::eType>& fields_names) {
- LOG4CXX_AUTO_TRACE(logger_);
+bool SendLocationRequest::CheckHMICapabilities(
+ std::list<hmi_apis::Common_TextFieldName::eType>& fields_names) {
+ LOG4CXX_AUTO_TRACE(logger_);
using namespace smart_objects;
using namespace hmi_apis;
if (fields_names.empty()) {
return true;
}
- const HMICapabilities& hmi_capabilities = application_manager_.hmi_capabilities();
+ const HMICapabilities& hmi_capabilities =
+ application_manager_.hmi_capabilities();
if (!hmi_capabilities.is_ui_cooperating()) {
LOG4CXX_ERROR(logger_, "UI is not supported.");
return false;
@@ -238,12 +242,14 @@ bool SendLocationRequest::CheckHMICapabilities(std::list<hmi_apis::Common_TextFi
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 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());
+ static_cast<Common_TextFieldName::eType>(
+ text_field.getElement(strings::name).asInt());
const std::list<Common_TextFieldName::eType>::iterator it =
std::find(fields_names.begin(), fields_names.end(), filed_name);
if (it != fields_names.end()) {
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
index 756dfc16db..167642e390 100644
--- a/src/components/application_manager/src/commands/mobile/send_location_response.cc
+++ b/src/components/application_manager/src/commands/mobile/send_location_response.cc
@@ -40,12 +40,11 @@ namespace application_manager {
namespace commands {
-SendLocationResponse::SendLocationResponse(const MessageSharedPtr& message, ApplicationManager& application_manager)
- : CommandResponseImpl(message, application_manager) {
-}
+SendLocationResponse::SendLocationResponse(
+ const MessageSharedPtr& message, ApplicationManager& application_manager)
+ : CommandResponseImpl(message, application_manager) {}
-SendLocationResponse::~SendLocationResponse() {
-}
+SendLocationResponse::~SendLocationResponse() {}
void SendLocationResponse::Run() {
LOG4CXX_AUTO_TRACE(logger_);
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
index cbacbef612..40b708e30d 100644
--- 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
@@ -44,12 +44,14 @@ namespace application_manager {
namespace commands {
-SetAppIconRequest::SetAppIconRequest(const MessageSharedPtr& message, ApplicationManager& application_manager)
+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);
+ , 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() {}
@@ -57,8 +59,7 @@ SetAppIconRequest::~SetAppIconRequest() {}
void SetAppIconRequest::Run() {
LOG4CXX_AUTO_TRACE(logger_);
- ApplicationSharedPtr app =
- application_manager_.application(connection_key());
+ ApplicationSharedPtr app = application_manager_.application(connection_key());
if (!app) {
LOG4CXX_ERROR(logger_, "Application is not registered");
@@ -111,7 +112,9 @@ void SetAppIconRequest::Run() {
void SetAppIconRequest::CopyToIconStorage(
const std::string& path_to_file) const {
- if (!application_manager_.protocol_handler().get_settings().enable_protocol_4()) {
+ if (!application_manager_.protocol_handler()
+ .get_settings()
+ .enable_protocol_4()) {
LOG4CXX_WARN(logger_,
"Icon copying skipped, since protocol ver. 4 is not enabled.");
return;
@@ -133,9 +136,8 @@ void SetAppIconRequest::CopyToIconStorage(
LOG4CXX_ERROR(logger_,
"Icon size (" << file_size << ") is bigger, than "
" icons storage maximum size ("
- << storage_max_size
- << ")."
- "Copying skipped.");
+ << storage_max_size << ")."
+ "Copying skipped.");
return;
}
@@ -236,11 +238,10 @@ void SetAppIconRequest::on_event(const event_engine::Event& event) {
static_cast<mobile_apis::Result::eType>(
message[strings::params][hmi_response::code].asInt());
- const bool result =
- Compare<mobile_api::Result::eType, EQ, ONE>(
- result_code,
- mobile_api::Result::SUCCESS,
- mobile_api::Result::WARNINGS);
+ const bool result = Compare<mobile_api::Result::eType, EQ, ONE>(
+ result_code,
+ mobile_api::Result::SUCCESS,
+ mobile_api::Result::WARNINGS);
if (result) {
ApplicationSharedPtr app =
@@ -251,9 +252,9 @@ void SetAppIconRequest::on_event(const event_engine::Event& event) {
return;
}
- const std::string& path = (*message_)[strings::msg_params]
- [strings::sync_file_name]
- [strings::value].asString();
+ const std::string& path =
+ (*message_)[strings::msg_params][strings::sync_file_name]
+ [strings::value].asString();
app->set_app_icon_path(path);
LOG4CXX_INFO(logger_,
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
index 53d9fd9ea6..29f3950ffc 100644
--- 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
@@ -33,17 +33,15 @@
#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(const MessageSharedPtr& message,
+ ApplicationManager& application_manager)
+ : CommandResponseImpl(message, application_manager) {}
-SetAppIconResponse::~SetAppIconResponse() {
-}
+SetAppIconResponse::~SetAppIconResponse() {}
void SetAppIconResponse::Run() {
LOG4CXX_AUTO_TRACE(logger_);
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
index dfca103b35..6cb6318791 100644
--- 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
@@ -35,18 +35,15 @@
#include "application_manager/application_impl.h"
-
namespace application_manager {
namespace commands {
SetDisplayLayoutRequest::SetDisplayLayoutRequest(
const MessageSharedPtr& message, ApplicationManager& application_manager)
- : CommandRequestImpl(message, application_manager) {
-}
+ : CommandRequestImpl(message, application_manager) {}
-SetDisplayLayoutRequest::~SetDisplayLayoutRequest() {
-}
+SetDisplayLayoutRequest::~SetDisplayLayoutRequest() {}
void SetDisplayLayoutRequest::Run() {
LOG4CXX_AUTO_TRACE(logger_);
@@ -61,8 +58,8 @@ void SetDisplayLayoutRequest::Run() {
(*message_)[strings::msg_params][strings::app_id] = app->app_id();
SendHMIRequest(hmi_apis::FunctionID::UI_SetDisplayLayout,
- &((*message_)[strings::msg_params]), true);
-
+ &((*message_)[strings::msg_params]),
+ true);
}
void SetDisplayLayoutRequest::on_event(const event_engine::Event& event) {
@@ -74,8 +71,8 @@ void SetDisplayLayoutRequest::on_event(const event_engine::Event& event) {
LOG4CXX_INFO(logger_, "Received UI_SetDisplayLayout event");
mobile_apis::Result::eType result_code =
- static_cast<mobile_apis::Result::eType>(
- message[strings::params][hmi_response::code].asInt());
+ static_cast<mobile_apis::Result::eType>(
+ message[strings::params][hmi_response::code].asInt());
bool response_success = mobile_apis::Result::SUCCESS == result_code;
smart_objects::SmartObject msg_params = message[strings::msg_params];
@@ -86,9 +83,13 @@ void SetDisplayLayoutRequest::on_event(const event_engine::Event& event) {
// 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);
+ 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);
}
}
}
@@ -96,7 +97,7 @@ void SetDisplayLayoutRequest::on_event(const event_engine::Event& event) {
break;
}
default: {
- LOG4CXX_ERROR(logger_,"Received unknown event" << event.id());
+ LOG4CXX_ERROR(logger_, "Received unknown event" << event.id());
return;
}
}
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
index 02a03b7b07..b5e53803c8 100644
--- 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
@@ -34,24 +34,20 @@
#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) {
-}
+ : CommandResponseImpl(message, application_manager) {}
-SetDisplayLayoutResponse::~SetDisplayLayoutResponse() {
-}
+SetDisplayLayoutResponse::~SetDisplayLayoutResponse() {}
void SetDisplayLayoutResponse::Run() {
LOG4CXX_AUTO_TRACE(logger_);
application_manager_.SendMessageToMobile(message_);
-
}
} // namespace commands
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
index f74e8a923c..171b902df1 100644
--- 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
@@ -45,17 +45,15 @@ 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) {
-}
+ : 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() {
-}
+SetGlobalPropertiesRequest::~SetGlobalPropertiesRequest() {}
void SetGlobalPropertiesRequest::Run() {
LOG4CXX_AUTO_TRACE(logger_);
@@ -63,12 +61,12 @@ void SetGlobalPropertiesRequest::Run() {
const smart_objects::SmartObject& msg_params =
(*message_)[strings::msg_params];
- ApplicationSharedPtr app =
- application_manager_.application(connection_key());
+ ApplicationSharedPtr app = application_manager_.application(connection_key());
if (!app) {
- LOG4CXX_ERROR(logger_, "No application associated with connection key "
- << connection_key());
+ LOG4CXX_ERROR(logger_,
+ "No application associated with connection key "
+ << connection_key());
SendResponse(false, mobile_apis::Result::APPLICATION_NOT_REGISTERED);
return;
}
@@ -84,18 +82,23 @@ void SetGlobalPropertiesRequest::Run() {
if ((*message_)[strings::msg_params].keyExists(strings::menu_icon)) {
verification_result = MessageHelper::VerifyImage(
- (*message_)[strings::msg_params][strings::menu_icon], app, application_manager_);
+ (*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);
+ 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_)) {
+ 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;
@@ -108,19 +111,19 @@ void SetGlobalPropertiesRequest::Run() {
return;
}
- //if application waits for sending ttsGlobalProperties need to remove this
- //application from tts_global_properties_app_list_
- application_manager_.RemoveAppFromTTSGlobalPropertiesList(
- connection_key());
+ // 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_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");
+ LOG4CXX_ERROR(logger_,
+ "Reject because of vr_help or vr_help_title only provided");
SendResponse(false, mobile_apis::Result::REJECTED);
return;
}
@@ -129,8 +132,8 @@ void SetGlobalPropertiesRequest::Run() {
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");
+ "VR Help Items contains nonsequential positions"
+ << " (e.g. [1,2,4]) or not started from 1");
SendResponse(false, mobile_apis::Result::REJECTED);
return;
}
@@ -177,14 +180,12 @@ void SetGlobalPropertiesRequest::Run() {
smart_objects::SmartObject(smart_objects::SmartType_Map);
if (is_help_prompt_present) {
- app->set_help_prompt(
- msg_params.getElement(strings::help_prompt));
+ 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));
+ app->set_timeout_prompt(msg_params.getElement(strings::timeout_prompt));
params[strings::timeout_prompt] = (*app->timeout_prompt());
}
@@ -201,11 +202,13 @@ bool SetGlobalPropertiesRequest::CheckVrHelpItemsOrder(
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();
+ 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);
+ LOG4CXX_ERROR(logger_,
+ "VR help items order is wrong"
+ << " at " << j << ", position value:" << position);
return false;
}
}
@@ -245,56 +248,51 @@ void SetGlobalPropertiesRequest::on_event(const event_engine::Event& event) {
const bool is_tts_succeeded =
Compare<hmi_apis::Common_Result::eType, EQ, ONE>(
- tts_result_,
- hmi_apis::Common_Result::SUCCESS,
- hmi_apis::Common_Result::UNSUPPORTED_RESOURCE,
- hmi_apis::Common_Result::WARNINGS);
+ tts_result_,
+ hmi_apis::Common_Result::SUCCESS,
+ hmi_apis::Common_Result::UNSUPPORTED_RESOURCE,
+ hmi_apis::Common_Result::WARNINGS);
- const bool is_ui_succeeded =
- Compare<hmi_apis::Common_Result::eType, EQ, ONE>(
- ui_result_,
- hmi_apis::Common_Result::SUCCESS,
- hmi_apis::Common_Result::UNSUPPORTED_RESOURCE,
- hmi_apis::Common_Result::WARNINGS);
+ const bool is_ui_succeeded = Compare<hmi_apis::Common_Result::eType, EQ, ONE>(
+ ui_result_,
+ hmi_apis::Common_Result::SUCCESS,
+ hmi_apis::Common_Result::UNSUPPORTED_RESOURCE,
+ hmi_apis::Common_Result::WARNINGS);
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);
+ ui_result_,
+ hmi_apis::Common_Result::INVALID_ENUM,
+ hmi_apis::Common_Result::UNSUPPORTED_RESOURCE);
- bool result =
- (is_tts_succeeded && is_ui_succeeded) ||
- (is_ui_succeeded &&
- hmi_apis::Common_Result::INVALID_ENUM == tts_result_) ||
- (is_ui_invalid_unsupported && is_tts_succeeded);
+ bool result = (is_tts_succeeded && is_ui_succeeded) ||
+ (is_ui_succeeded &&
+ hmi_apis::Common_Result::INVALID_ENUM == tts_result_) ||
+ (is_ui_invalid_unsupported && is_tts_succeeded);
mobile_apis::Result::eType result_code = mobile_apis::Result::INVALID_ENUM;
const char* return_info = NULL;
const bool is_ui_or_tts_warning =
Compare<hmi_apis::Common_Result::eType, EQ, ONE>(
- hmi_apis::Common_Result::WARNINGS,
- tts_result_,
- ui_result_);
+ hmi_apis::Common_Result::WARNINGS, tts_result_, ui_result_);
- if (result &&
- (hmi_apis::Common_Result::UNSUPPORTED_RESOURCE == tts_result_ ||
- is_ui_or_tts_warning)) {
+ if (result && (hmi_apis::Common_Result::UNSUPPORTED_RESOURCE == tts_result_ ||
+ is_ui_or_tts_warning)) {
result_code = mobile_apis::Result::WARNINGS;
return_info =
std::string("Unsupported phoneme type sent in a prompt").c_str();
} else {
- result_code = MessageHelper::HMIToMobileResult(
- std::max(ui_result_, tts_result_));
+ result_code =
+ MessageHelper::HMIToMobileResult(std::max(ui_result_, tts_result_));
}
- //TODO{ALeshin} APPLINK-15858. connection_key removed during SendResponse
- ApplicationSharedPtr application =
- application_manager_.application(connection_key());
+ // TODO{ALeshin} APPLINK-15858. connection_key removed during SendResponse
+ ApplicationSharedPtr application =
+ application_manager_.application(connection_key());
- SendResponse(result, result_code, return_info,
- &(message[strings::msg_params]));
+ SendResponse(
+ result, result_code, return_info, &(message[strings::msg_params]));
if (!application) {
LOG4CXX_DEBUG(logger_, "NULL pointer.");
@@ -311,30 +309,28 @@ bool SetGlobalPropertiesRequest::ValidateVRHelpTitle(
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 << '"');
+ 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) {
+ 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));
+ 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) {
+ const ApplicationSharedPtr app, smart_objects::SmartObject& out_params) {
LOG4CXX_AUTO_TRACE(logger_);
DCHECK_OR_RETURN(app, false);
@@ -345,7 +341,8 @@ bool SetGlobalPropertiesRequest::PrepareUIRequestDefaultVRHelpData(
int32_t index = 0;
smart_objects::SmartObject vr_help_items;
for (CommandsMap::const_iterator command_it = cmdMap.begin();
- cmdMap.end() != command_it; ++command_it) {
+ 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");
@@ -368,13 +365,16 @@ bool SetGlobalPropertiesRequest::PrepareUIRequestDefaultVRHelpData(
}
void SetGlobalPropertiesRequest::PrepareUIRequestMenuAndKeyboardData(
- const ApplicationSharedPtr app, const smart_objects::SmartObject &msg_params,
- smart_objects::SmartObject &out_params) {
+ 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_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);
@@ -384,8 +384,7 @@ void SetGlobalPropertiesRequest::PrepareUIRequestMenuAndKeyboardData(
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];
+ 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) {
@@ -396,18 +395,18 @@ void SetGlobalPropertiesRequest::PrepareUIRequestMenuAndKeyboardData(
}
void SetGlobalPropertiesRequest::SendTTSRequest(
- const smart_objects::SmartObject &params, bool use_events) {
+ const smart_objects::SmartObject& params, bool use_events) {
LOG4CXX_AUTO_TRACE(logger_);
- SendHMIRequest(hmi_apis::FunctionID::TTS_SetGlobalProperties,
- &params, use_events);
+ SendHMIRequest(
+ hmi_apis::FunctionID::TTS_SetGlobalProperties, &params, use_events);
is_tts_send_ = true;
}
void SetGlobalPropertiesRequest::SendUIRequest(
- const smart_objects::SmartObject &params, bool use_events) {
+ const smart_objects::SmartObject& params, bool use_events) {
LOG4CXX_AUTO_TRACE(logger_);
- SendHMIRequest(hmi_apis::FunctionID::UI_SetGlobalProperties,
- &params, use_events);
+ SendHMIRequest(
+ hmi_apis::FunctionID::UI_SetGlobalProperties, &params, use_events);
is_ui_send_ = true;
}
@@ -418,13 +417,13 @@ bool SetGlobalPropertiesRequest::IsPendingResponseExist() {
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);
+ 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() {
@@ -484,11 +483,11 @@ bool SetGlobalPropertiesRequest::IsWhiteSpaceExist() {
str = (*it_vh)[strings::image][strings::value].asCharArray();
if (!CheckSyntax(str)) {
LOG4CXX_ERROR(logger_,
- "Invalid vr_help image value syntax check failed");
+ "Invalid vr_help image value syntax check failed");
return true;
}
} // if image exists
- } // for - vh_array iteration
+ } // for - vh_array iteration
}
if (msg_params.keyExists(strings::menu_icon)) {
@@ -515,13 +514,12 @@ bool SetGlobalPropertiesRequest::IsWhiteSpaceExist() {
}
}
-
if (msg_params.keyExists(strings::keyboard_properties)) {
- if (msg_params[strings::keyboard_properties].
- keyExists(strings::limited_character_list)) {
+ 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();
+ [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();
@@ -529,21 +527,24 @@ bool SetGlobalPropertiesRequest::IsWhiteSpaceExist() {
for (; it_lcl != it_lcl_end; ++it_lcl) {
str = (*it_lcl).asCharArray();
if (!CheckSyntax(str)) {
- LOG4CXX_ERROR(logger_, "Invalid keyboard_properties "
- "limited_character_list syntax check failed");
+ 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 (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");
+ LOG4CXX_ERROR(logger_,
+ "Invalid keyboard_properties "
+ "auto_complete_text syntax check failed");
return true;
}
}
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
index 9e4880e53d..5cfbcb2d58 100644
--- 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
@@ -33,19 +33,15 @@
#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) {
-}
+ : CommandResponseImpl(message, application_manager) {}
-SetGlobalPropertiesResponse::~SetGlobalPropertiesResponse() {
-}
+SetGlobalPropertiesResponse::~SetGlobalPropertiesResponse() {}
void SetGlobalPropertiesResponse::Run() {
LOG4CXX_AUTO_TRACE(logger_);
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
index 0aa6e34488..85f34aead9 100644
--- a/src/components/application_manager/src/commands/mobile/set_icon_request.cc
+++ b/src/components/application_manager/src/commands/mobile/set_icon_request.cc
@@ -43,18 +43,16 @@ namespace application_manager {
namespace commands {
-SetIconRequest::SetIconRequest(const MessageSharedPtr& message, ApplicationManager& application_manager)
- : CommandRequestImpl(message, application_manager) {
-}
+SetIconRequest::SetIconRequest(const MessageSharedPtr& message,
+ ApplicationManager& application_manager)
+ : CommandRequestImpl(message, application_manager) {}
-SetIconRequest::~SetIconRequest() {
-}
+SetIconRequest::~SetIconRequest() {}
void SetIconRequest::Run() {
LOG4CXX_AUTO_TRACE(logger_);
- ApplicationSharedPtr app =
- application_manager_.application(connection_key());
+ ApplicationSharedPtr app = application_manager_.application(connection_key());
if (!app) {
LOG4CXX_ERROR(logger_, "Application is not registered");
@@ -77,22 +75,22 @@ void SetIconRequest::Run() {
return;
}
- smart_objects::SmartObject msg_params = smart_objects::SmartObject(
- smart_objects::SmartType_Map);
+ 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);
+ 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);
+ // 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);
+ static_cast<int32_t>(SetIconRequest::ImageType::DYNAMIC);
// for further use in on_event function
(*message_)[strings::msg_params][strings::sync_file_name] =
@@ -117,9 +115,9 @@ void SetIconRequest::on_event(const event_engine::Event& event) {
ApplicationSharedPtr app =
application_manager_.application(connection_key());
- const std::string path = (*message_)[strings::msg_params]
- [strings::sync_file_name]
- [strings::value].asString();
+ const std::string path =
+ (*message_)[strings::msg_params][strings::sync_file_name]
+ [strings::value].asString();
app->set_app_icon_path(path);
LOG4CXX_INFO(logger_,
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
index 92c0a666c9..c140d04f51 100644
--- a/src/components/application_manager/src/commands/mobile/set_icon_response.cc
+++ b/src/components/application_manager/src/commands/mobile/set_icon_response.cc
@@ -40,11 +40,9 @@ namespace commands {
SetIconResponse::SetIconResponse(const MessageSharedPtr& message,
ApplicationManager& app_man)
- : CommandResponseImpl(message, app_man) {
-}
+ : CommandResponseImpl(message, app_man) {}
-SetIconResponse::~SetIconResponse() {
-}
+SetIconResponse::~SetIconResponse() {}
void SetIconResponse::Run() {
LOG4CXX_AUTO_TRACE(logger_);
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
index 444efdce86..a198ce63c3 100644
--- 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
@@ -41,18 +41,16 @@ namespace application_manager {
namespace commands {
-SetMediaClockRequest::SetMediaClockRequest(const MessageSharedPtr& message, ApplicationManager& application_manager)
- : CommandRequestImpl(message, application_manager) {
-}
+SetMediaClockRequest::SetMediaClockRequest(
+ const MessageSharedPtr& message, ApplicationManager& application_manager)
+ : CommandRequestImpl(message, application_manager) {}
-SetMediaClockRequest::~SetMediaClockRequest() {
-}
+SetMediaClockRequest::~SetMediaClockRequest() {}
void SetMediaClockRequest::Run() {
LOG4CXX_AUTO_TRACE(logger_);
- ApplicationSharedPtr app =
- application_manager_.application(connection_key());
+ ApplicationSharedPtr app = application_manager_.application(connection_key());
if (!app) {
SendResponse(false, mobile_apis::Result::APPLICATION_NOT_REGISTERED);
@@ -67,14 +65,14 @@ void SetMediaClockRequest::Run() {
}
if (isDataValid()) {
- smart_objects::SmartObject msg_params = smart_objects::SmartObject(
- smart_objects::SmartType_Map);
+ 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();
- SendHMIRequest(hmi_apis::FunctionID::UI_SetMediaClockTimer,
- &msg_params, true);
+ SendHMIRequest(
+ hmi_apis::FunctionID::UI_SetMediaClockTimer, &msg_params, true);
} else {
SendResponse(false, mobile_apis::Result::INVALID_DATA);
}
@@ -110,7 +108,6 @@ bool SetMediaClockRequest::isDataValid() {
if (update_mode == mobile_apis::UpdateMode::COUNTUP ||
update_mode == mobile_apis::UpdateMode::COUNTDOWN) {
-
if (!msg_params.keyExists(strings::start_time)) {
LOG4CXX_INFO(logger_, "Invalid data");
return false;
@@ -134,9 +131,9 @@ bool SetMediaClockRequest::isDataValid() {
(msg_params[strings::end_time][strings::seconds].asUInt());
if (((end_time_in_seconds > start_time_in_seconds) &&
- (update_mode == mobile_apis::UpdateMode::COUNTDOWN)) ||
+ (update_mode == mobile_apis::UpdateMode::COUNTDOWN)) ||
((end_time_in_seconds < start_time_in_seconds) &&
- (update_mode == mobile_apis::UpdateMode::COUNTUP))) {
+ (update_mode == mobile_apis::UpdateMode::COUNTUP))) {
LOG4CXX_INFO(logger_, "Invalid data");
return false;
}
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
index e1d3259a23..30e802a1db 100644
--- 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
@@ -33,18 +33,15 @@
#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) {
-}
+ const MessageSharedPtr& message, ApplicationManager& application_manager)
+ : CommandResponseImpl(message, application_manager) {}
-SetMediaClockTimerResponse::~SetMediaClockTimerResponse() {
-}
+SetMediaClockTimerResponse::~SetMediaClockTimerResponse() {}
void SetMediaClockTimerResponse::Run() {
LOG4CXX_AUTO_TRACE(logger_);
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
index 6d2deddc46..2d79e13582 100644
--- 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
@@ -45,12 +45,11 @@ namespace application_manager {
namespace commands {
-ShowConstantTBTRequest::ShowConstantTBTRequest(const MessageSharedPtr& message, ApplicationManager& application_manager)
- : CommandRequestImpl(message, application_manager) {
-}
+ShowConstantTBTRequest::ShowConstantTBTRequest(
+ const MessageSharedPtr& message, ApplicationManager& application_manager)
+ : CommandRequestImpl(message, application_manager) {}
-ShowConstantTBTRequest::~ShowConstantTBTRequest() {
-}
+ShowConstantTBTRequest::~ShowConstantTBTRequest() {}
void ShowConstantTBTRequest::Run() {
LOG4CXX_AUTO_TRACE(logger_);
@@ -70,8 +69,8 @@ void ShowConstantTBTRequest::Run() {
return;
}
- smart_objects::SmartObject msg_params = smart_objects::SmartObject(
- smart_objects::SmartType_Map);
+ smart_objects::SmartObject msg_params =
+ smart_objects::SmartObject(smart_objects::SmartType_Map);
msg_params = (*message_)[strings::msg_params];
if (IsWhiteSpaceExist()) {
@@ -81,12 +80,13 @@ void ShowConstantTBTRequest::Run() {
return;
}
- //ProcessSoftButtons checks strings on the contents incorrect character
+ // ProcessSoftButtons checks strings on the contents incorrect character
mobile_apis::Result::eType processing_result =
- MessageHelper::ProcessSoftButtons(
- msg_params,
- app, application_manager_.GetPolicyHandler() , application_manager_);
+ MessageHelper::ProcessSoftButtons(msg_params,
+ app,
+ application_manager_.GetPolicyHandler(),
+ application_manager_);
if (mobile_apis::Result::SUCCESS != processing_result) {
LOG4CXX_ERROR(logger_, "INVALID_DATA!");
@@ -94,9 +94,7 @@ void ShowConstantTBTRequest::Run() {
return;
}
-
- mobile_apis::Result::eType verification_result =
- mobile_apis::Result::SUCCESS;
+ 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_);
@@ -119,8 +117,8 @@ void ShowConstantTBTRequest::Run() {
msg_params[strings::app_id] = app->app_id();
- msg_params[hmi_request::navi_texts] = smart_objects::SmartObject(
- smart_objects::SmartType_Array);
+ 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)) {
@@ -160,24 +158,24 @@ void ShowConstantTBTRequest::Run() {
}
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];
+ // 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());
+ MessageHelper::SubscribeApplicationToSoftButton(
+ msg_params, app, function_id());
}
app->set_tbt_show_command(msg_params);
- SendHMIRequest(hmi_apis::FunctionID::Navigation_ShowConstantTBT, &msg_params,
- true);
+ SendHMIRequest(
+ hmi_apis::FunctionID::Navigation_ShowConstantTBT, &msg_params, true);
}
-
void ShowConstantTBTRequest::on_event(const event_engine::Event& event) {
LOG4CXX_AUTO_TRACE(logger_);
const smart_objects::SmartObject& message = event.smart_object();
@@ -191,24 +189,25 @@ void ShowConstantTBTRequest::on_event(const event_engine::Event& event) {
GetMobileResultCode(static_cast<hmi_apis::Common_Result::eType>(
message[strings::params][hmi_response::code].asInt()));
HMICapabilities& hmi_capabilities =
- application_manager_.hmi_capabilities();
+ application_manager_.hmi_capabilities();
bool result = false;
if (mobile_apis::Result::SUCCESS == result_code) {
result = true;
return_info =
message[strings::msg_params][hmi_response::message].asString();
} else if ((mobile_apis::Result::UNSUPPORTED_RESOURCE == result_code) &&
- hmi_capabilities.is_ui_cooperating()) {
+ hmi_capabilities.is_ui_cooperating()) {
result = true;
}
- SendResponse(result, result_code,
+ SendResponse(result,
+ result_code,
return_info.empty() ? 0 : return_info.c_str(),
&(message[strings::msg_params]));
break;
}
default: {
- LOG4CXX_ERROR(logger_,"Received unknown event" << event.id());
+ LOG4CXX_ERROR(logger_, "Received unknown event" << event.id());
break;
}
}
@@ -219,8 +218,8 @@ bool ShowConstantTBTRequest::IsWhiteSpaceExist() {
const char* str = NULL;
if ((*message_)[strings::msg_params].keyExists(strings::turn_icon)) {
- str = (*message_)[strings::msg_params]
- [strings::turn_icon][strings::value].asCharArray();
+ 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;
@@ -228,8 +227,8 @@ bool ShowConstantTBTRequest::IsWhiteSpaceExist() {
}
if ((*message_)[strings::msg_params].keyExists(strings::next_turn_icon)) {
- str = (*message_)[strings::msg_params]
- [strings::next_turn_icon][strings::value].asCharArray();
+ 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");
@@ -238,8 +237,8 @@ bool ShowConstantTBTRequest::IsWhiteSpaceExist() {
}
if ((*message_)[strings::msg_params].keyExists(strings::navigation_text_1)) {
- str = (*message_)[strings::msg_params]
- [strings::navigation_text_1].asCharArray();
+ 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");
@@ -248,8 +247,8 @@ bool ShowConstantTBTRequest::IsWhiteSpaceExist() {
}
if ((*message_)[strings::msg_params].keyExists(strings::navigation_text_2)) {
- str = (*message_)[strings::msg_params]
- [strings::navigation_text_2].asCharArray();
+ 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");
@@ -266,8 +265,8 @@ bool ShowConstantTBTRequest::IsWhiteSpaceExist() {
}
if ((*message_)[strings::msg_params].keyExists(strings::total_distance)) {
- str = (*message_)[strings::msg_params]
- [strings::total_distance].asCharArray();
+ str =
+ (*message_)[strings::msg_params][strings::total_distance].asCharArray();
if (strlen(str) && !CheckSyntax(str)) {
LOG4CXX_ERROR(logger_,
"Invalid total_distance value syntax check failed");
@@ -275,9 +274,10 @@ bool ShowConstantTBTRequest::IsWhiteSpaceExist() {
}
}
- if ((*message_)[strings::msg_params].keyExists(strings::time_to_destination)) {
- str = (*message_)[strings::msg_params]
- [strings::time_to_destination].asCharArray();
+ 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");
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
index 3669159fb5..80a36129cf 100644
--- 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
@@ -42,11 +42,9 @@ namespace commands {
ShowConstantTBTResponse::ShowConstantTBTResponse(
const MessageSharedPtr& message, ApplicationManager& application_manager)
- : CommandResponseImpl(message, application_manager) {
-}
+ : CommandResponseImpl(message, application_manager) {}
-ShowConstantTBTResponse::~ShowConstantTBTResponse() {
-}
+ShowConstantTBTResponse::~ShowConstantTBTResponse() {}
void ShowConstantTBTResponse::Run() {
LOG4CXX_AUTO_TRACE(logger_);
diff --git a/src/components/application_manager/src/commands/mobile/show_request.cc b/src/components/application_manager/src/commands/mobile/show_request.cc
index 2684417a62..467d8d0236 100644
--- a/src/components/application_manager/src/commands/mobile/show_request.cc
+++ b/src/components/application_manager/src/commands/mobile/show_request.cc
@@ -43,26 +43,23 @@ namespace application_manager {
namespace commands {
-ShowRequest::ShowRequest(const MessageSharedPtr& message, ApplicationManager& application_manager)
- : CommandRequestImpl(message, application_manager) {
-}
+ShowRequest::ShowRequest(const MessageSharedPtr& message,
+ ApplicationManager& application_manager)
+ : CommandRequestImpl(message, application_manager) {}
-ShowRequest::~ShowRequest() {
-}
+ShowRequest::~ShowRequest() {}
void ShowRequest::Run() {
LOG4CXX_AUTO_TRACE(logger_);
- ApplicationSharedPtr app =
- application_manager_.application(
- connection_key());
+ 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
+ // 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);
@@ -70,19 +67,21 @@ void ShowRequest::Run() {
}
if (!CheckStringsOfShowRequest()) {
- LOG4CXX_ERROR(logger_, "Incorrect characters in string");
- SendResponse(false, mobile_apis::Result::INVALID_DATA);
- return;
- }
+ LOG4CXX_ERROR(logger_, "Incorrect characters in string");
+ SendResponse(false, mobile_apis::Result::INVALID_DATA);
+ return;
+ }
- //ProcessSoftButtons checks strings on the contents incorrect character
+ // 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)) &&
+ 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_);
+ app,
+ application_manager_.GetPolicyHandler(),
+ application_manager_);
}
if (mobile_apis::Result::SUCCESS != processing_result) {
@@ -91,13 +90,14 @@ void ShowRequest::Run() {
return;
}
- mobile_apis::Result::eType verification_result =
- mobile_apis::Result::SUCCESS;
+ 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()) {
+ ((*message_)[strings::msg_params][strings::graphic][strings::value]
+ .asString()).length()) {
verification_result = MessageHelper::VerifyImage(
- (*message_)[strings::msg_params][strings::graphic], app, application_manager_);
+ (*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);
@@ -107,7 +107,9 @@ void ShowRequest::Run() {
if ((*message_)[strings::msg_params].keyExists(strings::secondary_graphic)) {
verification_result = MessageHelper::VerifyImage(
- (*message_)[strings::msg_params][strings::secondary_graphic], app, application_manager_);
+ (*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);
@@ -115,12 +117,12 @@ void ShowRequest::Run() {
}
}
- smart_objects::SmartObject msg_params = smart_objects::SmartObject(
- smart_objects::SmartType_Map);
+ 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);
+ msg_params[hmi_request::show_strings] =
+ smart_objects::SmartObject(smart_objects::SmartType_Array);
int32_t index = 0;
if ((*message_)[strings::msg_params].keyExists(strings::main_field_1)) {
@@ -191,7 +193,7 @@ void ShowRequest::Run() {
if ((*message_)[strings::msg_params].keyExists(strings::secondary_graphic)) {
msg_params[strings::secondary_graphic] =
- (*message_)[strings::msg_params][strings::secondary_graphic];
+ (*message_)[strings::msg_params][strings::secondary_graphic];
}
if ((*message_)[strings::msg_params].keyExists(strings::soft_buttons)) {
@@ -228,13 +230,12 @@ void ShowRequest::on_event(const event_engine::Event& event) {
std::string response_info;
mobile_apis::Result::eType result_code =
static_cast<mobile_apis::Result::eType>(
- message[strings::params][hmi_response::code].asInt());
+ message[strings::params][hmi_response::code].asInt());
- const bool result =
- Compare<mobile_api::Result::eType, EQ, ONE>(
- result_code,
- mobile_api::Result::SUCCESS,
- mobile_api::Result::WARNINGS);
+ const bool result = Compare<mobile_api::Result::eType, EQ, ONE>(
+ result_code,
+ mobile_api::Result::SUCCESS,
+ mobile_api::Result::WARNINGS);
if (mobile_apis::Result::WARNINGS == result_code &&
message[strings::params].keyExists(hmi_response::message)) {
@@ -242,13 +243,14 @@ void ShowRequest::on_event(const event_engine::Event& event) {
message[strings::params][hmi_response::message].asString();
}
- SendResponse(result, result_code,
+ SendResponse(result,
+ result_code,
response_info.empty() ? NULL : response_info.c_str(),
&(message[strings::msg_params]));
break;
}
default: {
- LOG4CXX_ERROR(logger_,"Received unknown event " << event.id());
+ LOG4CXX_ERROR(logger_, "Received unknown event " << event.id());
break;
}
}
@@ -262,7 +264,7 @@ bool ShowRequest::CheckStringsOfShowRequest() {
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;
+ return false;
}
}
if ((*message_)[strings::msg_params].keyExists(strings::main_field_3)) {
@@ -308,20 +310,20 @@ bool ShowRequest::CheckStringsOfShowRequest() {
}
}
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;
- }
+ 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();
+ 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;
@@ -329,11 +331,11 @@ bool ShowRequest::CheckStringsOfShowRequest() {
}
if ((*message_)[strings::msg_params].keyExists(strings::secondary_graphic)) {
- str = (*message_)[strings::msg_params]
- [strings::secondary_graphic][strings::value].asCharArray();
+ str = (*message_)[strings::msg_params][strings::secondary_graphic]
+ [strings::value].asCharArray();
if (!CheckSyntax(str)) {
LOG4CXX_ERROR(logger_,
- "Invalid secondary_graphic value syntax check failed");
+ "Invalid secondary_graphic value syntax check failed");
return false;
}
}
diff --git a/src/components/application_manager/src/commands/mobile/show_response.cc b/src/components/application_manager/src/commands/mobile/show_response.cc
index 764f37d42c..8027c908f1 100644
--- a/src/components/application_manager/src/commands/mobile/show_response.cc
+++ b/src/components/application_manager/src/commands/mobile/show_response.cc
@@ -40,12 +40,11 @@ namespace application_manager {
namespace commands {
-ShowResponse::ShowResponse(const MessageSharedPtr& message, ApplicationManager& application_manager)
- : CommandResponseImpl(message, application_manager) {
-}
+ShowResponse::ShowResponse(const MessageSharedPtr& message,
+ ApplicationManager& application_manager)
+ : CommandResponseImpl(message, application_manager) {}
-ShowResponse::~ShowResponse() {
-}
+ShowResponse::~ShowResponse() {}
void ShowResponse::Run() {
LOG4CXX_AUTO_TRACE(logger_);
diff --git a/src/components/application_manager/src/commands/mobile/slider_request.cc b/src/components/application_manager/src/commands/mobile/slider_request.cc
index 0c4b177d44..3920b49db3 100644
--- a/src/components/application_manager/src/commands/mobile/slider_request.cc
+++ b/src/components/application_manager/src/commands/mobile/slider_request.cc
@@ -42,16 +42,15 @@ namespace application_manager {
namespace commands {
-SliderRequest::SliderRequest(const MessageSharedPtr& message, ApplicationManager& application_manager)
- : CommandRequestImpl(message, application_manager) {
+SliderRequest::SliderRequest(const MessageSharedPtr& message,
+ ApplicationManager& application_manager)
+ : CommandRequestImpl(message, application_manager) {
subscribe_on_event(hmi_apis::FunctionID::UI_OnResetTimeout);
}
-SliderRequest::~SliderRequest() {
-}
+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)) {
@@ -66,9 +65,8 @@ bool SliderRequest::Init() {
void SliderRequest::Run() {
LOG4CXX_AUTO_TRACE(logger_);
- ApplicationSharedPtr application =
- application_manager_.application(
- (*message_)[strings::params][strings::connection_key].asUInt());
+ ApplicationSharedPtr application = application_manager_.application(
+ (*message_)[strings::params][strings::connection_key].asUInt());
if (!application) {
LOG4CXX_ERROR(logger_, "Application is not registered");
@@ -85,9 +83,8 @@ void SliderRequest::Run() {
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()) {
+ 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;
@@ -101,8 +98,8 @@ void SliderRequest::Run() {
return;
}
- smart_objects::SmartObject msg_params = smart_objects::SmartObject(
- smart_objects::SmartType_Map);
+ 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();
@@ -124,9 +121,8 @@ void SliderRequest::on_event(const event_engine::Event& event) {
const event_engine::Event::EventID event_id = event.id();
if (event_id == FunctionID::UI_OnResetTimeout) {
LOG4CXX_INFO(logger_, "Received UI_OnResetTimeout event");
- application_manager_.updateRequestTimeout(connection_key(),
- correlation_id(),
- default_timeout());
+ application_manager_.updateRequestTimeout(
+ connection_key(), correlation_id(), default_timeout());
return;
}
@@ -142,30 +138,25 @@ void SliderRequest::on_event(const event_engine::Event& event) {
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);
+ 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
+ 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.");
+ LOG4CXX_ERROR(logger_,
+ strings::slider_position << " field is absent"
+ " in response.");
response_msg_params[strings::slider_position] = 0;
}
}
- const bool is_response_success =
- Compare<Common_Result::eType, EQ, ONE>(
- response_code,
- Common_Result::SUCCESS,
- Common_Result::WARNINGS);
+ const bool is_response_success = Compare<Common_Result::eType, EQ, ONE>(
+ response_code, Common_Result::SUCCESS, Common_Result::WARNINGS);
SendResponse(is_response_success,
MessageHelper::HMIToMobileResult(response_code),
@@ -203,4 +194,3 @@ bool SliderRequest::IsWhiteSpaceExist() {
} // 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
index dd9837ba7f..2cfcaf48fd 100644
--- a/src/components/application_manager/src/commands/mobile/slider_response.cc
+++ b/src/components/application_manager/src/commands/mobile/slider_response.cc
@@ -33,17 +33,15 @@
#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(const MessageSharedPtr& message,
+ ApplicationManager& application_manager)
+ : CommandResponseImpl(message, application_manager) {}
-SliderResponse::~SliderResponse() {
-}
+SliderResponse::~SliderResponse() {}
void SliderResponse::Run() {
LOG4CXX_AUTO_TRACE(logger_);
diff --git a/src/components/application_manager/src/commands/mobile/speak_request.cc b/src/components/application_manager/src/commands/mobile/speak_request.cc
index da65c8b57b..7e4731b569 100644
--- a/src/components/application_manager/src/commands/mobile/speak_request.cc
+++ b/src/components/application_manager/src/commands/mobile/speak_request.cc
@@ -42,20 +42,18 @@ namespace application_manager {
namespace commands {
-SpeakRequest::SpeakRequest(const MessageSharedPtr& message, ApplicationManager& application_manager)
- : CommandRequestImpl(message, application_manager) {
+SpeakRequest::SpeakRequest(const MessageSharedPtr& message,
+ ApplicationManager& application_manager)
+ : CommandRequestImpl(message, application_manager) {
subscribe_on_event(hmi_apis::FunctionID::TTS_OnResetTimeout);
}
-SpeakRequest::~SpeakRequest() {
-}
+SpeakRequest::~SpeakRequest() {}
void SpeakRequest::Run() {
LOG4CXX_AUTO_TRACE(logger_);
- ApplicationSharedPtr app =
- application_manager_.application(
- connection_key());
+ ApplicationSharedPtr app = application_manager_.application(connection_key());
if (!app) {
LOG4CXX_ERROR(logger_, "NULL pointer");
@@ -75,7 +73,8 @@ void SpeakRequest::Run() {
(*message_)[strings::msg_params][hmi_request::speak_type] =
hmi_apis::Common_MethodName::SPEAK;
SendHMIRequest(hmi_apis::FunctionID::TTS_Speak,
- &message_->getElement(strings::msg_params), true);
+ &message_->getElement(strings::msg_params),
+ true);
}
void SpeakRequest::on_event(const event_engine::Event& event) {
@@ -102,7 +101,7 @@ void SpeakRequest::on_event(const event_engine::Event& event) {
}
void SpeakRequest::ProcessTTSSpeakResponse(
- const smart_objects::SmartObject& message) {
+ const smart_objects::SmartObject& message) {
LOG4CXX_AUTO_TRACE(logger_);
using namespace helpers;
@@ -116,36 +115,32 @@ void SpeakRequest::ProcessTTSSpeakResponse(
hmi_apis::Common_Result::eType hmi_result_code =
static_cast<hmi_apis::Common_Result::eType>(
- message[strings::params][hmi_response::code].asInt());
+ message[strings::params][hmi_response::code].asInt());
mobile_apis::Result::eType result_code =
- MessageHelper::HMIToMobileResult(hmi_result_code);
+ MessageHelper::HMIToMobileResult(hmi_result_code);
- const bool result =
- Compare<mobile_api::Result::eType, EQ, ONE>(
- result_code,
- mobile_api::Result::SUCCESS,
- mobile_api::Result::WARNINGS);
+ const bool result = Compare<mobile_api::Result::eType, EQ, ONE>(
+ result_code, mobile_api::Result::SUCCESS, mobile_api::Result::WARNINGS);
(*message_)[strings::params][strings::function_id] =
mobile_apis::FunctionID::SpeakID;
const char* return_info = NULL;
- const bool is_result_ok =
- Compare<mobile_api::Result::eType, EQ, ONE>(
- result_code,
- mobile_api::Result::UNSUPPORTED_RESOURCE,
- mobile_api::Result::WARNINGS);
+ const bool is_result_ok = Compare<mobile_api::Result::eType, EQ, ONE>(
+ result_code,
+ mobile_api::Result::UNSUPPORTED_RESOURCE,
+ mobile_api::Result::WARNINGS);
if (is_result_ok) {
result_code = mobile_apis::Result::WARNINGS;
- return_info = std::string(
- "Unsupported phoneme type sent in a prompt").c_str();
+ return_info =
+ std::string("Unsupported phoneme type sent in a prompt").c_str();
}
- SendResponse(result, result_code, return_info,
- &(message[strings::msg_params]));
+ SendResponse(
+ result, result_code, return_info, &(message[strings::msg_params]));
}
bool SpeakRequest::IsWhiteSpaceExist() {
diff --git a/src/components/application_manager/src/commands/mobile/speak_response.cc b/src/components/application_manager/src/commands/mobile/speak_response.cc
index 1deae79990..612d32c913 100644
--- a/src/components/application_manager/src/commands/mobile/speak_response.cc
+++ b/src/components/application_manager/src/commands/mobile/speak_response.cc
@@ -40,12 +40,11 @@ namespace application_manager {
namespace commands {
-SpeakResponse::SpeakResponse(const MessageSharedPtr& message, ApplicationManager& application_manager)
- : CommandResponseImpl(message, application_manager) {
-}
+SpeakResponse::SpeakResponse(const MessageSharedPtr& message,
+ ApplicationManager& application_manager)
+ : CommandResponseImpl(message, application_manager) {}
-SpeakResponse::~SpeakResponse() {
-}
+SpeakResponse::~SpeakResponse() {}
void SpeakResponse::Run() {
LOG4CXX_AUTO_TRACE(logger_);
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
index 98d66d9311..7ec4e20fbd 100644
--- a/src/components/application_manager/src/commands/mobile/subscribe_button_request.cc
+++ b/src/components/application_manager/src/commands/mobile/subscribe_button_request.cc
@@ -33,25 +33,22 @@
#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(
+ const MessageSharedPtr& message, ApplicationManager& application_manager)
+ : CommandRequestImpl(message, application_manager) {}
-SubscribeButtonRequest::~SubscribeButtonRequest() {
-}
+SubscribeButtonRequest::~SubscribeButtonRequest() {}
void SubscribeButtonRequest::Run() {
LOG4CXX_AUTO_TRACE(logger_);
- ApplicationSharedPtr app =
- application_manager_.application(connection_key());
+ ApplicationSharedPtr app = application_manager_.application(connection_key());
if (!app) {
LOG4CXX_ERROR(logger_, "APPLICATION_NOT_REGISTERED");
@@ -64,15 +61,16 @@ void SubscribeButtonRequest::Run() {
(*message_)[str::msg_params][str::button_name].asUInt());
if (!IsSubscriptionAllowed(app, btn_id)) {
- LOG4CXX_ERROR(logger_, "Subscribe on button " << btn_id
- << " isn't allowed");
+ 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");
+ LOG4CXX_ERROR(logger_,
+ "Subscribe on button "
+ << btn_id << " isn't allowed by HMI capabilities");
SendResponse(false, mobile_apis::Result::UNSUPPORTED_RESOURCE);
return;
}
@@ -96,11 +94,10 @@ void SubscribeButtonRequest::Run() {
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::SEEKRIGHT == btn_id) ||
+ (mobile_apis::ButtonName::TUNEUP == btn_id) ||
(mobile_apis::ButtonName::TUNEDOWN == btn_id))) {
return false;
}
@@ -126,8 +123,8 @@ bool SubscribeButtonRequest::CheckHMICapabilities(
const size_t length = button_caps.length();
for (size_t i = 0; i < length; ++i) {
const SmartObject& caps = button_caps[i];
- const ButtonName::eType name =
- static_cast<ButtonName::eType>(caps.getElement(hmi_response::button_name).asInt());
+ const ButtonName::eType name = static_cast<ButtonName::eType>(
+ caps.getElement(hmi_response::button_name).asInt());
if (name == button) {
return true;
}
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
index 390a6811a4..a92e58b19a 100644
--- a/src/components/application_manager/src/commands/mobile/subscribe_button_response.cc
+++ b/src/components/application_manager/src/commands/mobile/subscribe_button_response.cc
@@ -39,11 +39,9 @@ namespace commands {
SubscribeButtonResponse::SubscribeButtonResponse(
const MessageSharedPtr& message, ApplicationManager& application_manager)
- : CommandResponseImpl(message, application_manager) {
-}
+ : CommandResponseImpl(message, application_manager) {}
-SubscribeButtonResponse::~SubscribeButtonResponse() {
-}
+SubscribeButtonResponse::~SubscribeButtonResponse() {}
void SubscribeButtonResponse::Run() {
LOG4CXX_AUTO_TRACE(logger_);
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
index eab1ccbf26..485c5d0009 100644
--- 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
@@ -42,53 +42,67 @@ namespace commands {
SubscribeVehicleDataRequest::SubscribeVehicleDataRequest(
const MessageSharedPtr& message, ApplicationManager& application_manager)
- : CommandRequestImpl(message, application_manager) {
-}
+ : CommandRequestImpl(message, application_manager) {}
-SubscribeVehicleDataRequest::~SubscribeVehicleDataRequest() {
-}
+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},
- };
+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
+#endif // #ifdef HMI_DBUS_API
void SubscribeVehicleDataRequest::Run() {
LOG4CXX_AUTO_TRACE(logger_);
- ApplicationSharedPtr app = application_manager_.application(
- connection_key());
+ ApplicationSharedPtr app = application_manager_.application(connection_key());
if (!app) {
LOG4CXX_ERROR(logger_, "NULL pointer");
@@ -104,11 +118,11 @@ void SubscribeVehicleDataRequest::Run() {
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 msg_params =
+ smart_objects::SmartObject(smart_objects::SmartType_Map);
- smart_objects::SmartObject response_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;
@@ -119,9 +133,11 @@ void SubscribeVehicleDataRequest::Run() {
VehicleDataType 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);
+ 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);
response_params[key_name][strings::data_type] = key_type;
@@ -131,16 +147,21 @@ void SubscribeVehicleDataRequest::Run() {
}
if (IsSomeoneSubscribedFor(key_type)) {
- LOG4CXX_DEBUG(logger_, "There are apps subscribed already for "
- "VehicleDataType: " << 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);
+ 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);
+ 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);
response_params[key_name][strings::data_type] = key_type;
@@ -152,9 +173,11 @@ void SubscribeVehicleDataRequest::Run() {
msg_params[key_name] = is_key_enabled;
if (app->SubscribeToIVI(static_cast<uint32_t>(key_type))) {
- LOG4CXX_DEBUG(logger_, "App with connection key " << connection_key()
- << " have been subscribed for VehicleDataType: "
- << key_type);
+ LOG4CXX_DEBUG(
+ logger_,
+ "App with connection key "
+ << connection_key()
+ << " have been subscribed for VehicleDataType: " << key_type);
++subscribed_items;
}
}
@@ -164,14 +187,14 @@ void SubscribeVehicleDataRequest::Run() {
bool is_everything_already_subscribed =
static_cast<uint32_t>(items_to_subscribe) ==
vi_already_subscribed_by_another_apps_.size() +
- vi_already_subscribed_by_this_app_.size();
+ vi_already_subscribed_by_this_app_.size();
if (0 == items_to_subscribe) {
if (HasDisallowedParams()) {
SendResponse(false, mobile_apis::Result::DISALLOWED);
} else {
- SendResponse(false, mobile_apis::Result::INVALID_DATA,
- "No data in the request");
+ SendResponse(
+ false, mobile_apis::Result::INVALID_DATA, "No data in the request");
}
return;
}
@@ -187,27 +210,23 @@ void SubscribeVehicleDataRequest::Run() {
if (is_everything_already_subscribed) {
mobile_apis::Result::eType result_code =
vi_already_subscribed_by_this_app_.size()
- ? mobile_apis::Result::IGNORED
- : mobile_apis::Result::SUCCESS;
+ ? mobile_apis::Result::IGNORED
+ : mobile_apis::Result::SUCCESS;
- const char* info =
- vi_already_subscribed_by_this_app_.size()
- ? "Already subscribed on some provided VehicleData."
- : NULL;
+ const char* info = vi_already_subscribed_by_this_app_.size()
+ ? "Already subscribed on some provided VehicleData."
+ : NULL;
- SendResponse(true,
- result_code,
- info,
- &response_params);
+ SendResponse(true, result_code, info, &response_params);
return;
}
#ifdef HMI_DBUS_API
- //Generate list of subrequests
+ // 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()) {
+ 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;
@@ -215,17 +234,19 @@ void SubscribeVehicleDataRequest::Run() {
hmi_requests_.push_back(hmi_request);
}
}
- LOG4CXX_DEBUG(logger_, hmi_requests_.size() <<
- " requests are going to be sent to HMI");
+ LOG4CXX_DEBUG(
+ logger_, hmi_requests_.size() << " requests are going to be sent to HMI");
- //Send subrequests
+ // Send subrequests
for (HmiRequests::const_iterator it = hmi_requests_.begin();
- it != hmi_requests_.end(); ++it)
+ it != hmi_requests_.end();
+ ++it)
SendHMIRequest(it->func_id, &msg_params, true);
#else
SendHMIRequest(hmi_apis::FunctionID::VehicleInfo_SubscribeVehicleData,
- &msg_params, true);
-#endif // #ifdef HMI_DBUS_API
+ &msg_params,
+ true);
+#endif // #ifdef HMI_DBUS_API
}
void SubscribeVehicleDataRequest::on_event(const event_engine::Event& event) {
@@ -239,8 +260,8 @@ void SubscribeVehicleDataRequest::on_event(const event_engine::Event& event) {
return;
}
- ApplicationSharedPtr app = application_manager_.application(
- CommandRequestImpl::connection_key());
+ ApplicationSharedPtr app =
+ application_manager_.application(CommandRequestImpl::connection_key());
if (!app) {
LOG4CXX_ERROR(logger_, "NULL pointer.");
@@ -249,23 +270,24 @@ void SubscribeVehicleDataRequest::on_event(const event_engine::Event& event) {
#ifdef HMI_DBUS_API
for (HmiRequests::iterator it = hmi_requests_.begin();
- it != hmi_requests_.end(); ++it) {
- HmiRequest & hmi_request = *it;
+ 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());
+ 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 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) {
+ it != hmi_requests_.end();
+ ++it) {
if (!it->complete) {
all_complete = false;
break;
@@ -273,12 +295,14 @@ void SubscribeVehicleDataRequest::on_event(const event_engine::Event& event) {
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)) {
+ } 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);
+ LOG4CXX_TRACE(logger_,
+ "Status from HMI: " << it->status
+ << ", so response status become "
+ << status);
} else {
any_arg_success = true;
}
@@ -288,7 +312,8 @@ void SubscribeVehicleDataRequest::on_event(const event_engine::Event& event) {
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) {
+ it != hmi_requests_.end();
+ ++it) {
response_params[it->str] = it->value;
}
}
@@ -306,12 +331,12 @@ void SubscribeVehicleDataRequest::on_event(const event_engine::Event& event) {
const bool is_result_no_error =
Compare<hmi_apis::Common_Result::eType, EQ, ONE>(
- hmi_result,
- hmi_apis::Common_Result::SUCCESS,
- hmi_apis::Common_Result::WARNINGS);
+ hmi_result,
+ hmi_apis::Common_Result::SUCCESS,
+ hmi_apis::Common_Result::WARNINGS);
- bool is_succeeded = is_result_no_error ||
- !vi_already_subscribed_by_another_apps_.empty();
+ bool is_succeeded =
+ is_result_no_error || !vi_already_subscribed_by_another_apps_.empty();
mobile_apis::Result::eType result_code =
MessageHelper::HMIToMobileResult(hmi_result);
@@ -328,19 +353,17 @@ void SubscribeVehicleDataRequest::on_event(const event_engine::Event& event) {
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]));
+ AddAlreadySubscribedVI(
+ const_cast<smart_objects::SmartObject&>(message[strings::msg_params]));
}
- SendResponse(is_succeeded,
- result_code,
- return_info,
- &(message[strings::msg_params]));
+ SendResponse(
+ is_succeeded, result_code, return_info, &(message[strings::msg_params]));
if (is_succeeded) {
app->UpdateHash();
}
-#endif // #ifdef HMI_DBUS_API
+#endif // #ifdef HMI_DBUS_API
}
void SubscribeVehicleDataRequest::AddAlreadySubscribedVI(
@@ -349,7 +372,7 @@ void SubscribeVehicleDataRequest::AddAlreadySubscribedVI(
using namespace mobile_apis;
VehicleInfoSubscriptions::const_iterator it_same_app =
vi_already_subscribed_by_this_app_.begin();
- for (;vi_already_subscribed_by_this_app_.end() != it_same_app;
+ for (; vi_already_subscribed_by_this_app_.end() != it_same_app;
++it_same_app) {
msg_params[*it_same_app][strings::result_code] =
VehicleDataResultCode::VDRC_DATA_ALREADY_SUBSCRIBED;
@@ -357,7 +380,7 @@ void SubscribeVehicleDataRequest::AddAlreadySubscribedVI(
VehicleInfoSubscriptions::const_iterator it_another_app =
vi_already_subscribed_by_another_apps_.begin();
- for (;vi_already_subscribed_by_another_apps_.end() != it_another_app;
+ for (; vi_already_subscribed_by_another_apps_.end() != it_another_app;
++it_another_app) {
msg_params[*it_another_app][strings::result_code] =
VehicleDataResultCode::VDRC_SUCCESS;
@@ -374,13 +397,13 @@ void SubscribeVehicleDataRequest::UnsubscribeFailedSubscriptions(
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.");
+ 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);
}
}
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
index 454c7ad9f6..7ed16407a5 100644
--- 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
@@ -41,11 +41,9 @@ namespace commands {
SubscribeVehicleDataResponse::SubscribeVehicleDataResponse(
const MessageSharedPtr& message, ApplicationManager& application_manager)
- : CommandResponseImpl(message, application_manager) {
-}
+ : CommandResponseImpl(message, application_manager) {}
-SubscribeVehicleDataResponse::~SubscribeVehicleDataResponse() {
-}
+SubscribeVehicleDataResponse::~SubscribeVehicleDataResponse() {}
void SubscribeVehicleDataResponse::Run() {
LOG4CXX_AUTO_TRACE(logger_);
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
index 9b71b71aaa..e749d4f3db 100644
--- 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
@@ -6,7 +6,7 @@ namespace application_manager {
namespace commands {
SubscribeWayPointsRequest::SubscribeWayPointsRequest(
- const MessageSharedPtr &message, ApplicationManager& application_manager)
+ const MessageSharedPtr& message, ApplicationManager& application_manager)
: CommandRequestImpl(message, application_manager) {}
SubscribeWayPointsRequest::~SubscribeWayPointsRequest() {}
@@ -14,13 +14,12 @@ SubscribeWayPointsRequest::~SubscribeWayPointsRequest() {}
void SubscribeWayPointsRequest::Run() {
LOG4CXX_AUTO_TRACE(logger_);
- ApplicationSharedPtr app =
- application_manager_.application(
- connection_key());
+ ApplicationSharedPtr app = application_manager_.application(connection_key());
if (!app) {
- LOG4CXX_ERROR(logger_, "An application with connection key "
- << connection_key() << " is not registered.");
+ LOG4CXX_ERROR(logger_,
+ "An application with connection key "
+ << connection_key() << " is not registered.");
SendResponse(false, mobile_apis::Result::APPLICATION_NOT_REGISTERED);
return;
}
@@ -36,16 +35,14 @@ void SubscribeWayPointsRequest::Run() {
return;
}
- SendHMIRequest(hmi_apis::FunctionID::Navigation_SubscribeWayPoints, NULL,
- true);
+ SendHMIRequest(
+ hmi_apis::FunctionID::Navigation_SubscribeWayPoints, NULL, true);
}
-void SubscribeWayPointsRequest::on_event(const event_engine::Event &event) {
+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();
+ 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");
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
index 51b213444d..c2e642619a 100644
--- 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
@@ -6,12 +6,10 @@ namespace application_manager {
namespace commands {
SubscribeWayPointsResponse::SubscribeWayPointsResponse(
- const MessageSharedPtr &message, ApplicationManager& application_manager)
- : CommandResponseImpl(message, application_manager) {
-}
+ const MessageSharedPtr& message, ApplicationManager& application_manager)
+ : CommandResponseImpl(message, application_manager) {}
-SubscribeWayPointsResponse::~SubscribeWayPointsResponse() {
-}
+SubscribeWayPointsResponse::~SubscribeWayPointsResponse() {}
void SubscribeWayPointsResponse::Run() {
LOG4CXX_AUTO_TRACE(logger_);
diff --git a/src/components/application_manager/src/commands/mobile/system_request.cc b/src/components/application_manager/src/commands/mobile/system_request.cc
index 5c1231684e..93eab1ee1e 100644
--- a/src/components/application_manager/src/commands/mobile/system_request.cc
+++ b/src/components/application_manager/src/commands/mobile/system_request.cc
@@ -418,9 +418,9 @@ 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(const MessageSharedPtr& message,
+ ApplicationManager& application_manager)
+ : CommandRequestImpl(message, application_manager) {}
SystemRequest::~SystemRequest() {}
@@ -442,8 +442,8 @@ void SystemRequest::Run() {
const policy::PolicyHandlerInterface& policy_handler =
application_manager_.GetPolicyHandler();
- if (!policy_handler.IsRequestTypeAllowed(
- application->policy_app_id(), request_type)) {
+ if (!policy_handler.IsRequestTypeAllowed(application->policy_app_id(),
+ request_type)) {
SendResponse(false, mobile_apis::Result::DISALLOWED);
return;
}
@@ -470,15 +470,18 @@ void SystemRequest::Run() {
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();
+ binary_data_folder =
+ application_manager_.get_settings().system_files_path();
} else {
- binary_data_folder = application_manager_.get_settings().app_storage_folder();
+ 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();
+ std::string file_dst_path =
+ application_manager_.get_settings().system_files_path();
file_dst_path += "/";
file_dst_path += file_name;
@@ -499,8 +502,7 @@ void SystemRequest::Run() {
LOG4CXX_DEBUG(logger_,
"Binary data is not present. Trying to find file "
- << file_name
- << " within previously saved app file in "
+ << file_name << " within previously saved app file in "
<< binary_data_folder);
const AppFile* file = application->GetFile(app_full_file_path);
@@ -579,14 +581,13 @@ void SystemRequest::on_event(const event_engine::Event& event) {
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);
+ 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());
+ application_manager_.application(connection_key());
if (!(application.valid())) {
LOG4CXX_ERROR(logger_, "NULL pointer");
diff --git a/src/components/application_manager/src/commands/mobile/system_response.cc b/src/components/application_manager/src/commands/mobile/system_response.cc
index 35b4d72ee2..f5bc03f4a5 100644
--- a/src/components/application_manager/src/commands/mobile/system_response.cc
+++ b/src/components/application_manager/src/commands/mobile/system_response.cc
@@ -33,17 +33,15 @@
#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(const MessageSharedPtr& message,
+ ApplicationManager& application_manager)
+ : CommandResponseImpl(message, application_manager) {}
-SystemResponse::~SystemResponse() {
-}
+SystemResponse::~SystemResponse() {}
void SystemResponse::Run() {
LOG4CXX_AUTO_TRACE(logger_);
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
index 3363eb854b..d7056a624e 100644
--- 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
@@ -48,11 +48,13 @@ void UnregisterAppInterfaceRequest::Run() {
return;
}
- application_manager_.ManageMobileCommand(MessageHelper::GetOnAppInterfaceUnregisteredNotificationToMobile(
- connection_key(),
- mobile_api::AppInterfaceUnregisteredReason::INVALID_ENUM), commands::Command::ORIGIN_SDL);
+ application_manager_.ManageMobileCommand(
+ MessageHelper::GetOnAppInterfaceUnregisteredNotificationToMobile(
+ connection_key(),
+ mobile_api::AppInterfaceUnregisteredReason::INVALID_ENUM),
+ commands::Command::ORIGIN_SDL);
application_manager_.UnregisterApplication(connection_key(),
- mobile_apis::Result::SUCCESS);
+ mobile_apis::Result::SUCCESS);
SendResponse(true, mobile_apis::Result::SUCCESS);
}
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
index 478cc7881f..86df8fabb1 100644
--- a/src/components/application_manager/src/commands/mobile/unsubscribe_button_request.cc
+++ b/src/components/application_manager/src/commands/mobile/unsubscribe_button_request.cc
@@ -43,17 +43,14 @@ namespace str = strings;
UnsubscribeButtonRequest::UnsubscribeButtonRequest(
const MessageSharedPtr& message, ApplicationManager& application_manager)
- : CommandRequestImpl(message, application_manager) {
-}
+ : CommandRequestImpl(message, application_manager) {}
-UnsubscribeButtonRequest::~UnsubscribeButtonRequest() {
-}
+UnsubscribeButtonRequest::~UnsubscribeButtonRequest() {}
void UnsubscribeButtonRequest::Run() {
LOG4CXX_AUTO_TRACE(logger_);
- ApplicationSharedPtr app =
- application_manager_.application(connection_key());
+ ApplicationSharedPtr app = application_manager_.application(connection_key());
if (!app) {
LOG4CXX_ERROR(logger_, "APPLICATION_NOT_REGISTERED");
@@ -64,13 +61,15 @@ void UnsubscribeButtonRequest::Run() {
const uint32_t btn_id =
(*message_)[str::msg_params][str::button_name].asUInt();
- if (!app->IsSubscribedToButton(static_cast<mobile_apis::ButtonName::eType>(btn_id))) {
+ if (!app->IsSubscribedToButton(
+ 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;
}
- app->UnsubscribeFromButton(static_cast<mobile_apis::ButtonName::eType>(btn_id));
+ app->UnsubscribeFromButton(
+ static_cast<mobile_apis::ButtonName::eType>(btn_id));
SendUnsubscribeButtonNotification();
const bool is_succedeed = true;
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
index f7999181a1..409579b294 100644
--- a/src/components/application_manager/src/commands/mobile/unsubscribe_button_response.cc
+++ b/src/components/application_manager/src/commands/mobile/unsubscribe_button_response.cc
@@ -33,18 +33,15 @@
#include "application_manager/commands/mobile/unsubscribe_button_response.h"
-
namespace application_manager {
namespace commands {
UnsubscribeButtonResponse::UnsubscribeButtonResponse(
const MessageSharedPtr& message, ApplicationManager& application_manager)
- : CommandResponseImpl(message, application_manager) {
-}
+ : CommandResponseImpl(message, application_manager) {}
-UnsubscribeButtonResponse::~UnsubscribeButtonResponse() {
-}
+UnsubscribeButtonResponse::~UnsubscribeButtonResponse() {}
void UnsubscribeButtonResponse::Run() {
LOG4CXX_AUTO_TRACE(logger_);
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
index 5e33edc226..4fcc04c7be 100644
--- 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
@@ -46,53 +46,68 @@ namespace commands {
UnsubscribeVehicleDataRequest::UnsubscribeVehicleDataRequest(
const MessageSharedPtr& message, ApplicationManager& application_manager)
- : CommandRequestImpl(message, application_manager) {
-}
+ : CommandRequestImpl(message, application_manager) {}
-UnsubscribeVehicleDataRequest::~UnsubscribeVehicleDataRequest() {
-}
+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},
- };
+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
+#endif // #ifdef HMI_DBUS_API
void UnsubscribeVehicleDataRequest::Run() {
LOG4CXX_AUTO_TRACE(logger_);
- ApplicationSharedPtr app = application_manager_.application(
- connection_key());
+ ApplicationSharedPtr app = application_manager_.application(connection_key());
if (!app) {
LOG4CXX_ERROR(logger_, "NULL pointer");
@@ -106,11 +121,11 @@ void UnsubscribeVehicleDataRequest::Run() {
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 msg_params =
+ smart_objects::SmartObject(smart_objects::SmartType_Map);
- smart_objects::SmartObject response_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;
@@ -130,21 +145,25 @@ void UnsubscribeVehicleDataRequest::Run() {
}
if (!app->UnsubscribeFromIVI(static_cast<uint32_t>(key_type))) {
- LOG4CXX_ERROR(logger_, "Unable to unsubscribe from "
- "VehicleDataType: " << 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);
+ 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);
+ 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;
@@ -161,48 +180,46 @@ void UnsubscribeVehicleDataRequest::Run() {
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();
+ 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.");
+ 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);
+ SendResponse(false,
+ mobile_apis::Result::IGNORED,
+ "Was not subscribed on any VehicleData.",
+ &response_params);
return;
}
if (is_everything_already_unsubscribed) {
mobile_apis::Result::eType result_code =
vi_already_unsubscribed_by_this_app_.size()
- ? mobile_apis::Result::IGNORED
- : mobile_apis::Result::SUCCESS;
+ ? mobile_apis::Result::IGNORED
+ : mobile_apis::Result::SUCCESS;
- const char* info =
- vi_already_unsubscribed_by_this_app_.size()
- ? "Already subscribed on some provided VehicleData."
- : NULL;
+ const char* info = vi_already_unsubscribed_by_this_app_.size()
+ ? "Already subscribed on some provided VehicleData."
+ : NULL;
- SendResponse(true,
- result_code,
- info,
- &response_params);
+ SendResponse(true, result_code, info, &response_params);
return;
}
#ifdef HMI_DBUS_API
- //Generate list of subrequests
+ // 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()) {
+ 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;
@@ -213,14 +230,16 @@ void UnsubscribeVehicleDataRequest::Run() {
LOG4CXX_INFO(logger_,
hmi_requests_.size() << " requests are going to be sent to HMI");
- //Send subrequests
+ // Send subrequests
for (HmiRequests::const_iterator it = hmi_requests_.begin();
- it != hmi_requests_.end(); ++it)
+ it != hmi_requests_.end();
+ ++it)
SendHMIRequest(it->func_id, &msg_params, true);
#else
SendHMIRequest(hmi_apis::FunctionID::VehicleInfo_UnsubscribeVehicleData,
- &msg_params, true);
-#endif // #ifdef HMI_DBUS_API
+ &msg_params,
+ true);
+#endif // #ifdef HMI_DBUS_API
}
void UnsubscribeVehicleDataRequest::on_event(const event_engine::Event& event) {
@@ -236,12 +255,12 @@ void UnsubscribeVehicleDataRequest::on_event(const event_engine::Event& event) {
#ifdef HMI_DBUS_API
for (HmiRequests::iterator it = hmi_requests_.begin();
- it != hmi_requests_.end(); ++it) {
- HmiRequest & hmi_request = *it;
+ 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());
+ 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;
@@ -252,7 +271,8 @@ void UnsubscribeVehicleDataRequest::on_event(const event_engine::Event& event) {
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) {
+ it != hmi_requests_.end();
+ ++it) {
if (!it->complete) {
all_complete = false;
break;
@@ -260,20 +280,24 @@ void UnsubscribeVehicleDataRequest::on_event(const event_engine::Event& event) {
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)) {
+ } 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);
+ }
+ LOG4CXX_TRACE(logger_,
+ "Status from HMI: " << it->status
+ << ", so response status become "
+ << status);
} else {
any_arg_success = true;
}
}
- if (all_complete) {
+ 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) {
+ it != hmi_requests_.end();
+ ++it) {
response_params[it->str] = it->value;
}
}
@@ -286,17 +310,16 @@ void UnsubscribeVehicleDataRequest::on_event(const event_engine::Event& event) {
if (true == any_arg_success) {
UpdateHash();
}
- }
+ }
#else
hmi_apis::Common_Result::eType hmi_result =
static_cast<hmi_apis::Common_Result::eType>(
message[strings::params][hmi_response::code].asInt());
- bool is_succeeded =
- Compare<hmi_apis::Common_Result::eType, EQ, ONE>(
- hmi_result,
- hmi_apis::Common_Result::SUCCESS,
- hmi_apis::Common_Result::WARNINGS);
+ bool is_succeeded = Compare<hmi_apis::Common_Result::eType, EQ, ONE>(
+ hmi_result,
+ hmi_apis::Common_Result::SUCCESS,
+ hmi_apis::Common_Result::WARNINGS);
mobile_apis::Result::eType result_code =
MessageHelper::HMIToMobileResult(hmi_result);
@@ -312,19 +335,19 @@ void UnsubscribeVehicleDataRequest::on_event(const event_engine::Event& event) {
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]));
+ AddAlreadyUnsubscribedVI(
+ const_cast<smart_objects::SmartObject&>(message[strings::msg_params]));
}
if (is_succeeded) {
SetAllowedToTerminate(false);
}
- SendResponse(is_succeeded, result_code, return_info,
- &(message[strings::msg_params]));
+ SendResponse(
+ is_succeeded, result_code, return_info, &(message[strings::msg_params]));
if (is_succeeded) {
UpdateHash();
}
-#endif // #ifdef HMI_DBUS_API
+#endif // #ifdef HMI_DBUS_API
}
struct SubscribedToIVIPredicate {
@@ -352,7 +375,7 @@ void UnsubscribeVehicleDataRequest::AddAlreadyUnsubscribedVI(
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;
+ 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;
@@ -360,7 +383,7 @@ void UnsubscribeVehicleDataRequest::AddAlreadyUnsubscribedVI(
VehicleInfoSubscriptions::const_iterator it_another_app =
vi_still_subscribed_by_another_apps_.begin();
- for (;vi_still_subscribed_by_another_apps_.end() != it_another_app;
+ for (; vi_still_subscribed_by_another_apps_.end() != it_another_app;
++it_another_app) {
response[*it_another_app][strings::result_code] =
VehicleDataResultCode::VDRC_SUCCESS;
@@ -374,13 +397,12 @@ void UnsubscribeVehicleDataRequest::UpdateHash() const {
if (application) {
application->UpdateHash();
} else {
- LOG4CXX_ERROR(logger_, "Application with connection_key = "
- << connection_key() <<" doesn't exist.");
+ LOG4CXX_ERROR(logger_,
+ "Application with connection_key = " << connection_key()
+ << " doesn't exist.");
}
- application_manager_.TerminateRequest(connection_key(),
- correlation_id());
+ application_manager_.TerminateRequest(connection_key(), correlation_id());
}
-
} // 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
index 843a53682e..e06158e4eb 100644
--- 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
@@ -38,11 +38,9 @@ namespace commands {
UnsubscribeVehicleDataResponse::UnsubscribeVehicleDataResponse(
const MessageSharedPtr& message, ApplicationManager& application_manager)
- : CommandResponseImpl(message, application_manager) {
-}
+ : CommandResponseImpl(message, application_manager) {}
-UnsubscribeVehicleDataResponse::~UnsubscribeVehicleDataResponse() {
-}
+UnsubscribeVehicleDataResponse::~UnsubscribeVehicleDataResponse() {}
void UnsubscribeVehicleDataResponse::Run() {
LOG4CXX_AUTO_TRACE(logger_);
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
index 215d6dadc2..3a0363845d 100644
--- 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
@@ -6,7 +6,7 @@ namespace application_manager {
namespace commands {
UnSubscribeWayPointsRequest::UnSubscribeWayPointsRequest(
- const MessageSharedPtr &message, ApplicationManager& application_manager)
+ const MessageSharedPtr& message, ApplicationManager& application_manager)
: CommandRequestImpl(message, application_manager) {}
UnSubscribeWayPointsRequest::~UnSubscribeWayPointsRequest() {}
@@ -14,12 +14,12 @@ UnSubscribeWayPointsRequest::~UnSubscribeWayPointsRequest() {}
void UnSubscribeWayPointsRequest::Run() {
LOG4CXX_AUTO_TRACE(logger_);
- ApplicationSharedPtr app =
- application_manager_.application(connection_key());
+ ApplicationSharedPtr app = application_manager_.application(connection_key());
if (!app) {
- LOG4CXX_ERROR(logger_, "An application with connection key "
- << connection_key() << " is not registered.");
+ LOG4CXX_ERROR(logger_,
+ "An application with connection key "
+ << connection_key() << " is not registered.");
SendResponse(false, mobile_apis::Result::APPLICATION_NOT_REGISTERED);
return;
}
@@ -29,15 +29,14 @@ void UnSubscribeWayPointsRequest::Run() {
return;
}
- SendHMIRequest(hmi_apis::FunctionID::Navigation_UnsubscribeWayPoints, NULL,
- true);
+ SendHMIRequest(
+ hmi_apis::FunctionID::Navigation_UnsubscribeWayPoints, NULL, true);
}
-void UnSubscribeWayPointsRequest::on_event(const event_engine::Event &event) {
+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();
+ 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");
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
index 0e57fe410a..f6430d1f0d 100644
--- 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
@@ -6,7 +6,7 @@ namespace application_manager {
namespace commands {
UnsubscribeWayPointsResponse::UnsubscribeWayPointsResponse(
- const MessageSharedPtr &message, ApplicationManager& application_manager)
+ const MessageSharedPtr& message, ApplicationManager& application_manager)
: CommandResponseImpl(message, application_manager) {}
UnsubscribeWayPointsResponse::~UnsubscribeWayPointsResponse() {}
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
index 02c9e479b7..9b3b221446 100644
--- 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
@@ -47,9 +47,9 @@ namespace commands {
namespace custom_str = utils::custom_string;
-UpdateTurnListRequest::UpdateTurnListRequest(const MessageSharedPtr& message, ApplicationManager& application_manager)
- : CommandRequestImpl(message, application_manager) {
-}
+UpdateTurnListRequest::UpdateTurnListRequest(
+ const MessageSharedPtr& message, ApplicationManager& application_manager)
+ : CommandRequestImpl(message, application_manager) {}
UpdateTurnListRequest::~UpdateTurnListRequest() {}
@@ -75,8 +75,10 @@ void UpdateTurnListRequest::Run() {
// 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_);
+ MessageHelper::ProcessSoftButtons((*message_)[strings::msg_params],
+ app,
+ application_manager_.GetPolicyHandler(),
+ application_manager_);
if (mobile_apis::Result::SUCCESS != processing_result) {
LOG4CXX_ERROR(logger_, "INVALID_DATA!");
@@ -91,7 +93,8 @@ void UpdateTurnListRequest::Run() {
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_))) {
+ app,
+ application_manager_))) {
LOG4CXX_ERROR(logger_,
"MessageHelper::VerifyImage return INVALID_DATA");
SendResponse(false, mobile_apis::Result::INVALID_DATA);
@@ -221,7 +224,6 @@ bool UpdateTurnListRequest::IsWhiteSpaceExist() {
return true;
}
}
-
}
}
return false;
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
index 005e0ad261..d40a4546fc 100644
--- 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
@@ -39,12 +39,11 @@ namespace application_manager {
namespace commands {
-UpdateTurnListResponse::UpdateTurnListResponse(const MessageSharedPtr& message, ApplicationManager& application_manager)
- : CommandResponseImpl(message, application_manager) {
-}
+UpdateTurnListResponse::UpdateTurnListResponse(
+ const MessageSharedPtr& message, ApplicationManager& application_manager)
+ : CommandResponseImpl(message, application_manager) {}
-UpdateTurnListResponse::~UpdateTurnListResponse() {
-}
+UpdateTurnListResponse::~UpdateTurnListResponse() {}
void UpdateTurnListResponse::Run() {
LOG4CXX_AUTO_TRACE(logger_);
diff --git a/src/components/application_manager/src/event_engine/event_dispatcher_impl.cc b/src/components/application_manager/src/event_engine/event_dispatcher_impl.cc
index 860df6f8a2..f8b8bc791d 100644
--- a/src/components/application_manager/src/event_engine/event_dispatcher_impl.cc
+++ b/src/components/application_manager/src/event_engine/event_dispatcher_impl.cc
@@ -98,7 +98,8 @@ void EventDispatcherImpl::remove_observer(const Event::EventID& event_id,
ObserverVector& obs_vec = it->second;
const ObserverVector::iterator obs_vec_it = obs_vec.end();
obs_vec.erase(
- std::remove_if(obs_vec.begin(), obs_vec_it, IdCheckFunctor(observer.id())),
+ std::remove_if(
+ obs_vec.begin(), obs_vec_it, IdCheckFunctor(observer.id())),
obs_vec_it);
}
}
@@ -112,13 +113,12 @@ void EventDispatcherImpl::remove_observer(EventObserver& observer) {
}
}
-void EventDispatcherImpl::remove_observer_from_vector(
- EventObserver& observer) {
+void EventDispatcherImpl::remove_observer_from_vector(EventObserver& observer) {
AutoLock auto_lock(observer_lock_);
observers_.erase(
- std::remove_if(observers_.begin(), observers_.end(),
- IdCheckFunctor(observer.id())),
+ std::remove_if(
+ observers_.begin(), observers_.end(), IdCheckFunctor(observer.id())),
observers_.end());
}
diff --git a/src/components/application_manager/src/event_engine/event_observer.cc b/src/components/application_manager/src/event_engine/event_observer.cc
index cfb8cc6718..f89f6649b1 100644
--- a/src/components/application_manager/src/event_engine/event_observer.cc
+++ b/src/components/application_manager/src/event_engine/event_observer.cc
@@ -43,12 +43,13 @@ EventObserver::EventObserver(EventDispatcher& event_dispatcher)
id_ = reinterpret_cast<unsigned long>(this);
}
-EventObserver::~EventObserver() { unsubscribe_from_all_events(); }
+EventObserver::~EventObserver() {
+ unsubscribe_from_all_events();
+}
void EventObserver::subscribe_on_event(const Event::EventID& event_id,
int32_t hmi_correlation_id) {
- event_dispatcher_.add_observer(event_id, hmi_correlation_id,
- *this);
+ event_dispatcher_.add_observer(event_id, hmi_correlation_id, *this);
}
void EventObserver::unsubscribe_from_event(const Event::EventID& event_id) {
diff --git a/src/components/application_manager/src/hmi_capabilities.cc b/src/components/application_manager/src/hmi_capabilities.cc
index 0f15d7ea6b..f63e7d5f1a 100644
--- a/src/components/application_manager/src/hmi_capabilities.cc
+++ b/src/components/application_manager/src/hmi_capabilities.cc
@@ -50,30 +50,27 @@ CREATE_LOGGERPTR_GLOBAL(logger_, "ApplicationManager")
namespace application_manager {
namespace Formatters = NsSmartDeviceLink::NsJSONHandler::Formatters;
-std::map<std::string, hmi_apis::Common_VrCapabilities::eType> vr_enum_capabilities =
-{
- {"TEXT", hmi_apis::Common_VrCapabilities::VR_TEXT}
-};
-
-std::map<std::string, hmi_apis::Common_ButtonName::eType> button_enum_name =
-{
- {"OK" , hmi_apis::Common_ButtonName::OK},
- {"SEEKLEFT" , hmi_apis::Common_ButtonName::SEEKLEFT},
- {"SEEKRIGHT" , hmi_apis::Common_ButtonName::SEEKRIGHT},
- {"TUNEUP" , hmi_apis::Common_ButtonName::TUNEUP},
- {"TUNEDOWN" , hmi_apis::Common_ButtonName::TUNEDOWN},
- {"PRESET_0" , hmi_apis::Common_ButtonName::PRESET_0},
- {"PRESET_1" , hmi_apis::Common_ButtonName::PRESET_1},
- {"PRESET_2" , hmi_apis::Common_ButtonName::PRESET_2},
- {"PRESET_3" , hmi_apis::Common_ButtonName::PRESET_3},
- {"PRESET_4" , hmi_apis::Common_ButtonName::PRESET_4},
- {"PRESET_5" , hmi_apis::Common_ButtonName::PRESET_5},
- {"PRESET_6" , hmi_apis::Common_ButtonName::PRESET_6},
- {"PRESET_7" , hmi_apis::Common_ButtonName::PRESET_7},
- {"PRESET_8" , hmi_apis::Common_ButtonName::PRESET_8},
- {"PRESET_9" , hmi_apis::Common_ButtonName::PRESET_9},
- {"CUSTOM_BUTTON" , hmi_apis::Common_ButtonName::CUSTOM_BUTTON},
- {"SEARCH" , hmi_apis::Common_ButtonName::SEARCH},
+std::map<std::string, hmi_apis::Common_VrCapabilities::eType>
+ vr_enum_capabilities = {{"TEXT", hmi_apis::Common_VrCapabilities::VR_TEXT}};
+
+std::map<std::string, hmi_apis::Common_ButtonName::eType> button_enum_name = {
+ {"OK", hmi_apis::Common_ButtonName::OK},
+ {"SEEKLEFT", hmi_apis::Common_ButtonName::SEEKLEFT},
+ {"SEEKRIGHT", hmi_apis::Common_ButtonName::SEEKRIGHT},
+ {"TUNEUP", hmi_apis::Common_ButtonName::TUNEUP},
+ {"TUNEDOWN", hmi_apis::Common_ButtonName::TUNEDOWN},
+ {"PRESET_0", hmi_apis::Common_ButtonName::PRESET_0},
+ {"PRESET_1", hmi_apis::Common_ButtonName::PRESET_1},
+ {"PRESET_2", hmi_apis::Common_ButtonName::PRESET_2},
+ {"PRESET_3", hmi_apis::Common_ButtonName::PRESET_3},
+ {"PRESET_4", hmi_apis::Common_ButtonName::PRESET_4},
+ {"PRESET_5", hmi_apis::Common_ButtonName::PRESET_5},
+ {"PRESET_6", hmi_apis::Common_ButtonName::PRESET_6},
+ {"PRESET_7", hmi_apis::Common_ButtonName::PRESET_7},
+ {"PRESET_8", hmi_apis::Common_ButtonName::PRESET_8},
+ {"PRESET_9", hmi_apis::Common_ButtonName::PRESET_9},
+ {"CUSTOM_BUTTON", hmi_apis::Common_ButtonName::CUSTOM_BUTTON},
+ {"SEARCH", hmi_apis::Common_ButtonName::SEARCH},
};
@@ -232,7 +229,7 @@ HMICapabilities::HMICapabilities(ApplicationManager& app_mngr)
, is_navigation_supported_(false)
, is_phone_call_supported_(false)
, app_mngr_(app_mngr)
- , hmi_language_handler_(app_mngr_){
+ , hmi_language_handler_(app_mngr_) {
if (false == app_mngr_.get_settings().launch_hmi()) {
is_vr_ready_response_recieved_ = true;
is_tts_ready_response_recieved_ = true;
@@ -326,14 +323,17 @@ void HMICapabilities::set_is_vr_cooperating(bool value) {
is_vr_cooperating_ = value;
if (is_vr_cooperating_) {
utils::SharedPtr<smart_objects::SmartObject> get_language(
- MessageHelper::CreateModuleInfoSO(hmi_apis::FunctionID::VR_GetLanguage, app_mngr_));
+ MessageHelper::CreateModuleInfoSO(hmi_apis::FunctionID::VR_GetLanguage,
+ app_mngr_));
hmi_language_handler_.set_handle_response_for(*get_language);
app_mngr_.ManageHMICommand(get_language);
utils::SharedPtr<smart_objects::SmartObject> get_all_languages(
- MessageHelper::CreateModuleInfoSO(hmi_apis::FunctionID::VR_GetSupportedLanguages, app_mngr_));
+ MessageHelper::CreateModuleInfoSO(
+ hmi_apis::FunctionID::VR_GetSupportedLanguages, app_mngr_));
app_mngr_.ManageHMICommand(get_all_languages);
utils::SharedPtr<smart_objects::SmartObject> get_capabilities(
- MessageHelper::CreateModuleInfoSO(hmi_apis::FunctionID::VR_GetCapabilities, app_mngr_));
+ MessageHelper::CreateModuleInfoSO(
+ hmi_apis::FunctionID::VR_GetCapabilities, app_mngr_));
app_mngr_.ManageHMICommand(get_capabilities);
}
}
@@ -343,17 +343,17 @@ void HMICapabilities::set_is_tts_cooperating(bool value) {
is_tts_cooperating_ = value;
if (is_tts_cooperating_) {
utils::SharedPtr<smart_objects::SmartObject> get_language(
- MessageHelper::CreateModuleInfoSO(
- hmi_apis::FunctionID::TTS_GetLanguage, app_mngr_));
+ MessageHelper::CreateModuleInfoSO(hmi_apis::FunctionID::TTS_GetLanguage,
+ app_mngr_));
hmi_language_handler_.set_handle_response_for(*get_language);
app_mngr_.ManageHMICommand(get_language);
utils::SharedPtr<smart_objects::SmartObject> get_all_languages(
- MessageHelper::CreateModuleInfoSO(
- hmi_apis::FunctionID::TTS_GetSupportedLanguages, app_mngr_));
+ MessageHelper::CreateModuleInfoSO(
+ hmi_apis::FunctionID::TTS_GetSupportedLanguages, app_mngr_));
app_mngr_.ManageHMICommand(get_all_languages);
utils::SharedPtr<smart_objects::SmartObject> get_capabilities(
- MessageHelper::CreateModuleInfoSO(
- hmi_apis::FunctionID::TTS_GetCapabilities, app_mngr_));
+ MessageHelper::CreateModuleInfoSO(
+ hmi_apis::FunctionID::TTS_GetCapabilities, app_mngr_));
app_mngr_.ManageHMICommand(get_capabilities);
}
}
@@ -363,17 +363,17 @@ void HMICapabilities::set_is_ui_cooperating(bool value) {
is_ui_cooperating_ = value;
if (is_ui_cooperating_) {
utils::SharedPtr<smart_objects::SmartObject> get_language(
- MessageHelper::CreateModuleInfoSO(
- hmi_apis::FunctionID::UI_GetLanguage, app_mngr_));
+ MessageHelper::CreateModuleInfoSO(hmi_apis::FunctionID::UI_GetLanguage,
+ app_mngr_));
hmi_language_handler_.set_handle_response_for(*get_language);
app_mngr_.ManageHMICommand(get_language);
utils::SharedPtr<smart_objects::SmartObject> get_all_languages(
- MessageHelper::CreateModuleInfoSO(
- hmi_apis::FunctionID::UI_GetSupportedLanguages, app_mngr_));
+ MessageHelper::CreateModuleInfoSO(
+ hmi_apis::FunctionID::UI_GetSupportedLanguages, app_mngr_));
app_mngr_.ManageHMICommand(get_all_languages);
utils::SharedPtr<smart_objects::SmartObject> get_capabilities(
- MessageHelper::CreateModuleInfoSO(
- hmi_apis::FunctionID::UI_GetCapabilities, app_mngr_));
+ MessageHelper::CreateModuleInfoSO(
+ hmi_apis::FunctionID::UI_GetCapabilities, app_mngr_));
app_mngr_.ManageHMICommand(get_capabilities);
}
}
@@ -388,8 +388,8 @@ void HMICapabilities::set_is_ivi_cooperating(bool value) {
is_ivi_cooperating_ = value;
if (is_ivi_cooperating_) {
utils::SharedPtr<smart_objects::SmartObject> get_type(
- MessageHelper::CreateModuleInfoSO(
- hmi_apis::FunctionID::VehicleInfo_GetVehicleType, app_mngr_));
+ MessageHelper::CreateModuleInfoSO(
+ hmi_apis::FunctionID::VehicleInfo_GetVehicleType, app_mngr_));
app_mngr_.ManageHMICommand(get_type);
}
}
@@ -419,24 +419,24 @@ void HMICapabilities::set_active_tts_language(
language);
}
-const hmi_apis::Common_Language::eType
-HMICapabilities::active_ui_language() const {
+const hmi_apis::Common_Language::eType HMICapabilities::active_ui_language()
+ const {
using namespace hmi_apis;
const Common_Language::eType language =
hmi_language_handler_.get_language_for(HMILanguageHandler::INTERFACE_UI);
return Common_Language::INVALID_ENUM != language ? language : ui_language_;
}
-const hmi_apis::Common_Language::eType
-HMICapabilities::active_vr_language() const {
+const hmi_apis::Common_Language::eType HMICapabilities::active_vr_language()
+ const {
using namespace hmi_apis;
const Common_Language::eType language =
hmi_language_handler_.get_language_for(HMILanguageHandler::INTERFACE_VR);
return Common_Language::INVALID_ENUM != language ? language : vr_language_;
}
-const hmi_apis::Common_Language::eType
-HMICapabilities::active_tts_language() const {
+const hmi_apis::Common_Language::eType HMICapabilities::active_tts_language()
+ const {
using namespace hmi_apis;
const Common_Language::eType language =
hmi_language_handler_.get_language_for(HMILanguageHandler::INTERFACE_TTS);
@@ -562,10 +562,10 @@ void HMICapabilities::set_navigation_supported(const bool supported) {
}
void HMICapabilities::set_phone_call_supported(const bool supported) {
- is_phone_call_supported_ = supported;
+ is_phone_call_supported_ = supported;
}
-void HMICapabilities::Init(resumption::LastState *last_state) {
+void HMICapabilities::Init(resumption::LastState* last_state) {
hmi_language_handler_.Init(last_state);
if (false == load_capabilities_from_file()) {
LOG4CXX_ERROR(logger_, "file hmi_capabilities.json was not loaded");
@@ -573,7 +573,7 @@ void HMICapabilities::Init(resumption::LastState *last_state) {
LOG4CXX_INFO(logger_, "file hmi_capabilities.json was loaded");
}
hmi_language_handler_.set_default_capabilities_languages(
- ui_language_, vr_language_, tts_language_);
+ ui_language_, vr_language_, tts_language_);
}
bool HMICapabilities::load_capabilities_from_file() {
@@ -589,7 +589,6 @@ bool HMICapabilities::load_capabilities_from_file() {
}
try {
-
Json::Reader reader_;
Json::Value root_json;
@@ -643,8 +642,7 @@ bool HMICapabilities::load_capabilities_from_file() {
hmi_apis::Common_TextFieldName::eType>::const_iterator
it_text_field_name = text_fields_enum_name.find(
display_capabilities_so[hmi_response::text_fields][i]
- [strings::name]
- .asString());
+ [strings::name].asString());
display_capabilities_so[hmi_response::text_fields][i].erase(
strings::name);
if (text_fields_enum_name.end() != it_text_field_name) {
@@ -762,21 +760,18 @@ bool HMICapabilities::load_capabilities_from_file() {
if (check_existing_json_member(audio_capabilities, "samplingRate")) {
audio_capabilities_so["samplingRate"] =
sampling_rate_enum.find(audio_capabilities.get("samplingRate", "")
- .asString())
- ->second;
+ .asString())->second;
}
if (check_existing_json_member(audio_capabilities, "bitsPerSample")) {
audio_capabilities_so["bitsPerSample"] =
- bit_per_sample_enum.find(
- audio_capabilities.get("bitsPerSample", "")
- .asString())
+ bit_per_sample_enum.find(audio_capabilities.get("bitsPerSample",
+ "").asString())
->second;
}
if (check_existing_json_member(audio_capabilities, "audioType")) {
audio_capabilities_so["audioType"] =
audio_type_enum.find(audio_capabilities.get("audioType", "")
- .asString())
- ->second;
+ .asString())->second;
}
set_audio_pass_thru_capabilities(audio_capabilities_so);
}
diff --git a/src/components/application_manager/src/hmi_command_factory.cc b/src/components/application_manager/src/hmi_command_factory.cc
index f1e2733222..67625fde88 100644
--- a/src/components/application_manager/src/hmi_command_factory.cc
+++ b/src/components/application_manager/src/hmi_command_factory.cc
@@ -193,7 +193,7 @@
#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
+#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"
@@ -275,25 +275,27 @@
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);
+ 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));
+ 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)) {
+ 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)) {
+ } 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 {
@@ -302,1770 +304,1901 @@ CommandSharedPtr HMICommandFactory::CreateCommand(
switch (function_id) {
case hmi_apis::FunctionID::BasicCommunication_OnStartDeviceDiscovery: {
- command.reset(new commands::OnStartDeviceDiscovery(message, application_manager));
+ 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));
+ command.reset(new commands::UpdateDeviceListResponse(
+ message, application_manager));
} else {
- command.reset(new commands::UpdateDeviceListRequest(message, application_manager));
+ 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));
+ command.reset(
+ new commands::ActivateAppResponse(message, application_manager));
} else {
- command.reset(new commands::ActivateAppRequest(message, application_manager));
+ command.reset(
+ new commands::ActivateAppRequest(message, application_manager));
}
break;
}
case hmi_apis::FunctionID::BasicCommunication_GetSystemInfo: {
if (is_response) {
- command.reset(new commands::GetSystemInfoResponse(message, application_manager));
+ command.reset(
+ new commands::GetSystemInfoResponse(message, application_manager));
} else {
- command.reset(new commands::GetSystemInfoRequest(message, application_manager));
+ 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));
+ command.reset(
+ new commands::SDLActivateAppResponse(message, application_manager));
} else {
- command.reset(new commands::SDLActivateAppRequest(message, application_manager));
+ 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));
+ command.reset(new commands::SDLPolicyUpdateResponse(
+ message, application_manager));
} else {
- command.reset(new commands::SDLPolicyUpdate(message, application_manager));
+ 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));
+ 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));
+ 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));
+ command.reset(new commands::SDLGetListOfPermissionsResponse(
+ message, application_manager));
} else {
- command.reset(new commands::SDLGetListOfPermissionsRequest(message, application_manager));
+ 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));
+ command.reset(new commands::SDLGetUserFriendlyMessageResponse(
+ message, application_manager));
} else {
- command.reset(new commands::SDLGetUserFriendlyMessageRequest(message, application_manager));
+ 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));
+ command.reset(new commands::SDLGetStatusUpdateResponse(
+ message, application_manager));
} else {
- command.reset(new commands::SDLGetStatusUpdateRequest(message, application_manager));
+ command.reset(new commands::SDLGetStatusUpdateRequest(
+ message, application_manager));
}
break;
}
case hmi_apis::FunctionID::SDL_OnStatusUpdate: {
- command.reset(new commands::OnStatusUpdateNotification(message, application_manager));
+ command.reset(new commands::OnStatusUpdateNotification(
+ message, application_manager));
break;
}
case hmi_apis::FunctionID::SDL_OnAppPermissionConsent: {
- command.reset(new commands::OnAppPermissionConsentNotification(message, application_manager));
+ 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));
+ command.reset(new commands::MixingAudioSupportedResponse(
+ message, application_manager));
} else {
- command.reset(new commands::MixingAudioSupportedRequest(message, application_manager));
+ command.reset(new commands::MixingAudioSupportedRequest(
+ message, application_manager));
}
break;
}
case hmi_apis::FunctionID::BasicCommunication_OnExitAllApplications: {
- command.reset(new commands::OnExitAllApplicationsNotification(message, application_manager));
+ 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));
+ command.reset(
+ new commands::UIAddCommandResponse(message, application_manager));
} else {
- command.reset(new commands::UIAddCommandRequest(message, application_manager));
+ 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));
+ command.reset(new commands::UIDeleteCommandResponse(
+ message, application_manager));
} else {
- command.reset(new commands::UIDeleteCommandRequest(message, application_manager));
+ 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));
+ command.reset(
+ new commands::UIAddSubmenuResponse(message, application_manager));
} else {
- command.reset(new commands::UIAddSubmenuRequest(message, application_manager));
+ 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));
+ command.reset(new commands::UIDeleteSubmenuResponse(
+ message, application_manager));
} else {
- command.reset(new commands::UIDeleteSubmenuRequest(message, application_manager));
+ 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));
+ command.reset(new commands::UISetMediaClockTimerResponse(
+ message, application_manager));
} else {
- command.reset(new commands::UISetMediaClockTimerRequest(message, application_manager));
+ 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));
+ command.reset(new commands::UIPerformInteractionResponse(
+ message, application_manager));
} else {
- command.reset(new commands::UIPerformInteractionRequest(message, application_manager));
+ 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));
+ command.reset(new commands::UISetGlobalPropertiesResponse(
+ message, application_manager));
} else {
- command.reset(new commands::UISetGlobalPropertiesRequest(message, application_manager));
+ 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));
+ command.reset(new commands::UIScrollableMessageResponse(
+ message, application_manager));
} else {
- command.reset(new commands::UIScrollableMessageRequest(message, application_manager));
+ 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));
+ command.reset(
+ new commands::UISetAppIconResponse(message, application_manager));
} else {
- command.reset(new commands::UISetAppIconRequest(message, application_manager));
+ 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));
+ command.reset(new commands::UIGetSupportedLanguagesResponse(
+ message, application_manager));
} else {
- command.reset(new commands::UIGetSupportedLanguagesRequest(message, application_manager));
+ 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));
+ command.reset(
+ new commands::UIGetLanguageResponse(message, application_manager));
} else {
- command.reset(new commands::UIGetLanguageRequest(message, application_manager));
+ 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));
+ command.reset(new commands::UIGetCapabilitiesResponse(
+ message, application_manager));
} else {
- command.reset(new commands::UIGetCapabilitiesRequest(message, application_manager));
+ 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));
+ command.reset(new commands::UIChangeRegistratioResponse(
+ message, application_manager));
} else {
- command.reset(new commands::UIChangeRegistrationRequest(message, application_manager));
+ 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));
+ command.reset(new commands::UIPerformAudioPassThruResponse(
+ message, application_manager));
} else {
- command.reset(new commands::UIPerformAudioPassThruRequest(message, application_manager));
+ 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));
+ command.reset(new commands::UIEndAudioPassThruResponse(
+ message, application_manager));
} else {
- command.reset(new commands::UIEndAudioPassThruRequest(message, application_manager));
+ 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));
+ command.reset(
+ new commands::UIAlertResponse(message, application_manager));
} else {
- command.reset(new commands::UIAlertRequest(message, application_manager));
+ 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));
+ command.reset(
+ new commands::VRIsReadyResponse(message, application_manager));
} else {
- command.reset(new commands::VRIsReadyRequest(message, application_manager));
+ 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));
+ command.reset(
+ new commands::VRAddCommandResponse(message, application_manager));
} else {
- command.reset(new commands::VRAddCommandRequest(message, application_manager));
+ 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));
+ command.reset(new commands::VRDeleteCommandResponse(
+ message, application_manager));
} else {
- command.reset(new commands::VRDeleteCommandRequest(message, application_manager));
+ 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));
+ command.reset(new commands::VRChangeRegistrationResponse(
+ message, application_manager));
} else {
- command.reset(new commands::VRChangeRegistrationRequest(message, application_manager));
+ 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));
+ command.reset(new commands::VRGetSupportedLanguagesResponse(
+ message, application_manager));
} else {
- command.reset(new commands::VRGetSupportedLanguagesRequest(message, application_manager));
+ 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));
+ command.reset(
+ new commands::VRGetLanguageResponse(message, application_manager));
} else {
- command.reset(new commands::VRGetLanguageRequest(message, application_manager));
+ 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));
+ command.reset(new commands::VRGetCapabilitiesResponse(
+ message, application_manager));
} else {
- command.reset(new commands::VRGetCapabilitiesRequest(message, application_manager));
+ 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));
+ command.reset(
+ new commands::TTSIsReadyResponse(message, application_manager));
} else {
- command.reset(new commands::TTSIsReadyRequest(message, application_manager));
+ 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));
+ command.reset(new commands::TTSChangeRegistratioResponse(
+ message, application_manager));
} else {
- command.reset(new commands::TTSChangeRegistrationRequest(message, application_manager));
+ 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));
+ command.reset(new commands::TTSGetSupportedLanguagesResponse(
+ message, application_manager));
} else {
- command.reset(new commands::TTSGetSupportedLanguagesRequest(message, application_manager));
+ 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));
+ command.reset(new commands::TTSStopSpeakingResponse(
+ message, application_manager));
} else {
- command.reset(new commands::TTSStopSpeakingRequest(message, application_manager));
+ 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));
+ command.reset(
+ new commands::TTSGetLanguageResponse(message, application_manager));
} else {
- command.reset(new commands::TTSGetLanguageRequest(message, application_manager));
+ 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));
+ command.reset(
+ new commands::TTSSpeakResponse(message, application_manager));
} else {
- command.reset(new commands::TTSSpeakRequest(message, application_manager));
+ 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));
+ command.reset(new commands::TTSSetGlobalPropertiesResponse(
+ message, application_manager));
} else {
- command.reset(new commands::TTSSetGlobalPropertiesRequest(message, application_manager));
+ 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));
+ command.reset(new commands::TTSGetCapabilitiesResponse(
+ message, application_manager));
} else {
- command.reset(new commands::TTSGetCapabilitiesRequest(message, application_manager));
+ command.reset(new commands::TTSGetCapabilitiesRequest(
+ message, application_manager));
}
break;
}
case hmi_apis::FunctionID::TTS_Started: {
- command.reset(new commands::OnTTSStartedNotification(message, application_manager));
+ command.reset(
+ new commands::OnTTSStartedNotification(message, application_manager));
break;
}
case hmi_apis::FunctionID::TTS_Stopped: {
- command.reset(new commands::OnTTSStoppedNotification(message, application_manager));
+ command.reset(
+ new commands::OnTTSStoppedNotification(message, application_manager));
break;
}
case hmi_apis::FunctionID::BasicCommunication_OnAppActivated: {
- command.reset(new commands::OnAppActivatedNotification(message, application_manager));
+ command.reset(new commands::OnAppActivatedNotification(
+ message, application_manager));
break;
}
case hmi_apis::FunctionID::BasicCommunication_OnExitApplication: {
- command.reset(new commands::OnExitApplicationNotification(message, application_manager));
+ 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));
+ command.reset(
+ new commands::UIShowResponse(message, application_manager));
} else {
- command.reset(new commands::UIShowRequest(message, application_manager));
+ 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));
+ command.reset(
+ new commands::UISliderResponse(message, application_manager));
} else {
- command.reset(new commands::UISliderRequest(message, application_manager));
+ 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));
+ command.reset(
+ new commands::ClosePopupResponse(message, application_manager));
} else {
- command.reset(new commands::ClosePopupRequest(message, application_manager));
+ 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));
+ command.reset(
+ new commands::UIIsReadyResponse(message, application_manager));
} else {
- command.reset(new commands::UIIsReadyRequest(message, application_manager));
+ 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));
+ command.reset(
+ new commands::VIIsReadyResponse(message, application_manager));
} else {
- command.reset(new commands::VIIsReadyRequest(message, application_manager));
+ 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));
+ command.reset(
+ new commands::VIReadDIDResponse(message, application_manager));
} else {
- command.reset(new commands::VIReadDIDRequest(message, application_manager));
+ 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));
+ 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));
+ 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));
+ 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));
+ 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));
+ 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));
+ 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));
+ 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));
+ 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));
+ 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));
+ 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));
+ 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));
+ 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));
+ 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));
+ 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));
+ 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));
+ 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));
+ 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));
+ 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));
+ 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));
+ 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));
+ 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));
+ 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));
+ 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));
+ 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));
+ 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));
+ 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));
+ 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));
+ 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));
+ 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));
+ 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));
+ 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));
+ 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));
+ 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));
+ 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));
+ 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));
+ 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));
+ 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));
+ 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));
+ 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));
+ 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));
+ 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));
+ 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));
+ 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));
+ 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));
+ 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));
+ 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));
+ 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));
+ 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));
+ 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));
+ 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));
+ command.reset(new commands::VIGetVehicleDataResponse(
+ message, application_manager));
} else {
- command.reset(new commands::VIGetVehicleDataRequest(message, application_manager));
+ command.reset(new commands::VIGetVehicleDataRequest(
+ message, application_manager));
}
break;
}
-#endif // #ifdef HMI_DBUS_API
+#endif // #ifdef HMI_DBUS_API
case hmi_apis::FunctionID::VehicleInfo_GetDTCs: {
if (is_response) {
- command.reset(new commands::VIGetDTCsResponse(message, application_manager));
+ command.reset(
+ new commands::VIGetDTCsResponse(message, application_manager));
} else {
- command.reset(new commands::VIGetDTCsRequest(message, application_manager));
+ 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));
+ command.reset(new commands::VIDiagnosticMessageResponse(
+ message, application_manager));
} else {
- command.reset(new commands::VIDiagnosticMessageRequest(message, application_manager));
+ 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));
+ command.reset(new commands::VIGetVehicleTypeResponse(
+ message, application_manager));
} else {
- command.reset(new commands::VIGetVehicleTypeRequest(message, application_manager));
+ 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));
+ command.reset(
+ new commands::NaviIsReadyResponse(message, application_manager));
} else {
- command.reset(new commands::NaviIsReadyRequest(message, application_manager));
+ 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));
+ command.reset(new commands::NaviAlertManeuverResponse(
+ message, application_manager));
} else {
- command.reset(new commands::NaviAlertManeuverRequest(message, application_manager));
+ 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));
+ command.reset(new commands::NaviGetWayPointsResponse(
+ message, application_manager));
} else {
- command.reset(new commands::NaviGetWayPointsRequest(message, application_manager));
+ 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));
+ command.reset(new commands::NaviUpdateTurnListResponse(
+ message, application_manager));
} else {
- command.reset(new commands::NaviUpdateTurnListRequest(message, application_manager));
+ 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));
+ command.reset(new commands::NaviShowConstantTBTResponse(
+ message, application_manager));
} else {
- command.reset(new commands::NaviShowConstantTBTRequest(message, application_manager));
+ 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));
+ command.reset(new commands::NaviSubscribeWayPointsResponse(
+ message, application_manager));
} else {
- command.reset(new commands::NaviSubscribeWayPointsRequest(message, application_manager));
+ 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));
+ command.reset(new commands::NaviUnsubscribeWayPointsResponse(
+ message, application_manager));
} else {
- command.reset(new commands::NaviUnSubscribeWayPointsRequest(message, application_manager));
+ 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));
+ command.reset(new commands::ButtonGetCapabilitiesResponse(
+ message, application_manager));
} else {
- command.reset(new commands::ButtonGetCapabilitiesRequest(message, application_manager));
+ command.reset(new commands::ButtonGetCapabilitiesRequest(
+ message, application_manager));
}
break;
}
case hmi_apis::FunctionID::SDL_OnAllowSDLFunctionality: {
- command.reset(new commands::OnAllowSDLFunctionalityNotification(message, application_manager));
+ command.reset(new commands::OnAllowSDLFunctionalityNotification(
+ message, application_manager));
break;
}
case hmi_apis::FunctionID::SDL_OnSDLConsentNeeded: {
- command.reset(new commands::OnSDLConsentNeededNotification(message, application_manager));
+ 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));
+ command.reset(
+ new commands::UpdateSDLResponse(message, application_manager));
} else {
- command.reset(new commands::UpdateSDLRequest(message, application_manager));
+ command.reset(
+ new commands::UpdateSDLRequest(message, application_manager));
}
break;
}
case hmi_apis::FunctionID::BasicCommunication_OnIgnitionCycleOver: {
- command.reset(new commands::OnIgnitionCycleOverNotification(message, application_manager));
+ command.reset(new commands::OnIgnitionCycleOverNotification(
+ message, application_manager));
break;
}
case hmi_apis::FunctionID::BasicCommunication_OnSystemInfoChanged: {
- command.reset(new commands::OnSystemInfoChangedNotification(message, application_manager));
+ command.reset(new commands::OnSystemInfoChangedNotification(
+ message, application_manager));
break;
}
case hmi_apis::FunctionID::BasicCommunication_OnReady: {
- command.reset(new commands::OnReadyNotification(message, application_manager));
+ command.reset(
+ new commands::OnReadyNotification(message, application_manager));
break;
}
case hmi_apis::FunctionID::BasicCommunication_OnDeviceChosen: {
- command.reset(new commands::OnDeviceChosenNotification(message, application_manager));
+ command.reset(new commands::OnDeviceChosenNotification(
+ message, application_manager));
break;
}
case hmi_apis::FunctionID::UI_OnSystemContext: {
- command.reset(new commands::OnSystemContextNotification(message, application_manager));
+ command.reset(new commands::OnSystemContextNotification(
+ message, application_manager));
break;
}
case hmi_apis::FunctionID::UI_OnDriverDistraction: {
- command.reset(
- new commands::hmi::OnDriverDistractionNotification(message, application_manager));
+ command.reset(new commands::hmi::OnDriverDistractionNotification(
+ message, application_manager));
break;
}
case hmi_apis::FunctionID::BasicCommunication_OnUpdateDeviceList: {
- command.reset(new commands::OnUpdateDeviceList(message, application_manager));
+ command.reset(
+ new commands::OnUpdateDeviceList(message, application_manager));
break;
}
case hmi_apis::FunctionID::BasicCommunication_OnAppRegistered: {
- command.reset(new commands::OnAppRegisteredNotification(message, application_manager));
+ command.reset(new commands::OnAppRegisteredNotification(
+ message, application_manager));
break;
}
case hmi_apis::FunctionID::BasicCommunication_OnAppUnregistered: {
- command.reset(new commands::OnAppUnregisteredNotification(message, application_manager));
+ command.reset(new commands::OnAppUnregisteredNotification(
+ message, application_manager));
break;
}
case hmi_apis::FunctionID::BasicCommunication_OnFindApplications: {
- command.reset(new commands::OnFindApplications(message, application_manager));
+ 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));
+ command.reset(
+ new commands::UpdateAppListResponse(message, application_manager));
} else {
- command.reset(new commands::UpdateAppListRequest(message, application_manager));
+ command.reset(
+ new commands::UpdateAppListRequest(message, application_manager));
}
break;
}
case hmi_apis::FunctionID::VR_Started: {
- command.reset(new commands::OnVRStartedNotification(message, application_manager));
+ command.reset(
+ new commands::OnVRStartedNotification(message, application_manager));
break;
}
case hmi_apis::FunctionID::VR_Stopped: {
- command.reset(new commands::OnVRStoppedNotification(message, application_manager));
+ command.reset(
+ new commands::OnVRStoppedNotification(message, application_manager));
break;
}
case hmi_apis::FunctionID::VR_OnCommand: {
- command.reset(new commands::OnVRCommandNotification(message, application_manager));
+ command.reset(
+ new commands::OnVRCommandNotification(message, application_manager));
break;
}
case hmi_apis::FunctionID::UI_OnCommand: {
- command.reset(new commands::OnUICommandNotification(message, application_manager));
+ command.reset(
+ new commands::OnUICommandNotification(message, application_manager));
break;
}
case hmi_apis::FunctionID::BasicCommunication_OnAppDeactivated: {
- command.reset(new commands::OnAppDeactivatedNotification(message, application_manager));
+ command.reset(new commands::OnAppDeactivatedNotification(
+ message, application_manager));
break;
}
case hmi_apis::FunctionID::UI_OnLanguageChange: {
- command.reset(new commands::OnUILanguageChangeNotification(message, application_manager));
+ command.reset(new commands::OnUILanguageChangeNotification(
+ message, application_manager));
break;
}
case hmi_apis::FunctionID::VR_OnLanguageChange: {
- command.reset(new commands::OnVRLanguageChangeNotification(message, application_manager));
+ command.reset(new commands::OnVRLanguageChangeNotification(
+ message, application_manager));
break;
}
case hmi_apis::FunctionID::TTS_OnLanguageChange: {
- command.reset(new commands::OnTTSLanguageChangeNotification(message, application_manager));
+ command.reset(new commands::OnTTSLanguageChangeNotification(
+ message, application_manager));
break;
}
case hmi_apis::FunctionID::Buttons_OnButtonEvent: {
- command.reset(new commands::hmi::OnButtonEventNotification(message, application_manager));
+ 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));
+ 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));
+ 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));
+ 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));
+ 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));
+ 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));
+ 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));
+ 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));
+ 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));
+ 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));
+ 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));
+ 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));
+ 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));
+ 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));
+ 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));
+ 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));
+ 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));
+ 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));
+ 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));
+ 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));
+ 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));
+ 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));
+ 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));
+ 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));
+ 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));
+ 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));
+ 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));
+ 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));
+ 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));
+ 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));
+ 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));
+ 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));
+ 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));
+ 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));
+ 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));
+ 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));
+ 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));
+ 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));
+ 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));
+ 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));
+ 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));
+ 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));
+ 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));
+ 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));
+ 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));
+ 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));
+ 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));
+ 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));
+ 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));
+ 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));
+ 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));
+ 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));
+ 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));
+ command.reset(new commands::VISubscribeVehicleDataResponse(
+ message, application_manager));
} else {
- command.reset(new commands::VISubscribeVehicleDataRequest(message, application_manager));
+ command.reset(new commands::VISubscribeVehicleDataRequest(
+ message, application_manager));
}
break;
}
-#endif // #ifdef HMI_DBUS_API
+#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));
+ 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));
+ 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));
+ 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));
+ 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));
+ 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));
+ 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));
+ 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));
+ 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));
+ 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));
+ 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));
+ 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));
+ 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));
+ 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));
+ 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));
+ 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));
+ 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));
+ 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));
+ 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));
+ 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));
+ 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));
+ 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));
+ 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));
+ 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));
+ 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));
+ 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));
+ 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));
+ 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));
+ 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));
+ 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));
+ 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));
+ 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));
+ 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));
+ 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));
+ 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));
+ 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));
+ 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));
+ 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));
+ 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));
+ 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));
+ 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));
+ 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));
+ 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));
+ 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));
+ 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));
+ 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));
+ 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));
+ 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));
+ 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));
+ 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));
+ 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));
+ command.reset(new commands::VIUnsubscribeVehicleDataResponse(
+ message, application_manager));
} else {
- command.reset(new commands::VIUnsubscribeVehicleDataRequest(message, application_manager));
+ command.reset(new commands::VIUnsubscribeVehicleDataRequest(
+ message, application_manager));
}
break;
}
-#endif // #ifdef HMI_DBUS_API
+#endif // #ifdef HMI_DBUS_API
#ifdef HMI_DBUS_API
case hmi_apis::FunctionID::VehicleInfo_OnGpsData: {
- command.reset(new commands::OnVIGpsDataNotification(message, application_manager));
+ command.reset(
+ new commands::OnVIGpsDataNotification(message, application_manager));
break;
}
case hmi_apis::FunctionID::VehicleInfo_OnSpeed: {
- command.reset(new commands::OnVISpeedNotification(message, application_manager));
+ command.reset(
+ new commands::OnVISpeedNotification(message, application_manager));
break;
}
case hmi_apis::FunctionID::VehicleInfo_OnRpm: {
- command.reset(new commands::OnVIRpmNotification(message, application_manager));
+ command.reset(
+ new commands::OnVIRpmNotification(message, application_manager));
break;
}
case hmi_apis::FunctionID::VehicleInfo_OnFuelLevel: {
- command.reset(new commands::OnVIFuelLevelNotification(message, application_manager));
+ command.reset(new commands::OnVIFuelLevelNotification(
+ message, application_manager));
break;
}
case hmi_apis::FunctionID::VehicleInfo_OnFuelLevelState: {
- command.reset(new commands::OnVIFuelLevelStateNotification(message, application_manager));
+ command.reset(new commands::OnVIFuelLevelStateNotification(
+ message, application_manager));
break;
}
case hmi_apis::FunctionID::VehicleInfo_OnInstantFuelConsumption: {
- command.reset(
- new commands::OnVIInstantFuelConsumptionNotification(message, application_manager));
+ command.reset(new commands::OnVIInstantFuelConsumptionNotification(
+ message, application_manager));
break;
}
case hmi_apis::FunctionID::VehicleInfo_OnExternalTemperature: {
- command.reset(new commands::OnVIExternalTemperatureNotification(message, application_manager));
+ command.reset(new commands::OnVIExternalTemperatureNotification(
+ message, application_manager));
break;
}
case hmi_apis::FunctionID::VehicleInfo_OnVin: {
- command.reset(new commands::OnVIVinNotification(message, application_manager));
+ command.reset(
+ new commands::OnVIVinNotification(message, application_manager));
break;
}
case hmi_apis::FunctionID::VehicleInfo_OnPrndl: {
- command.reset(new commands::OnVIPrndlNotification(message, application_manager));
+ command.reset(
+ new commands::OnVIPrndlNotification(message, application_manager));
break;
}
case hmi_apis::FunctionID::VehicleInfo_OnTirePressure: {
- command.reset(new commands::OnVITirePressureNotification(message, application_manager));
+ command.reset(new commands::OnVITirePressureNotification(
+ message, application_manager));
break;
}
case hmi_apis::FunctionID::VehicleInfo_OnOdometer: {
- command.reset(new commands::OnVIOdometerNotification(message, application_manager));
+ command.reset(
+ new commands::OnVIOdometerNotification(message, application_manager));
break;
}
case hmi_apis::FunctionID::VehicleInfo_OnBeltStatus: {
- command.reset(new commands::OnVIBeltStatusNotification(message, application_manager));
+ command.reset(new commands::OnVIBeltStatusNotification(
+ message, application_manager));
break;
}
case hmi_apis::FunctionID::VehicleInfo_OnBodyInformation: {
- command.reset(new commands::OnVIBodyInformationNotification(message, application_manager));
+ command.reset(new commands::OnVIBodyInformationNotification(
+ message, application_manager));
break;
}
case hmi_apis::FunctionID::VehicleInfo_OnDeviceStatus: {
- command.reset(new commands::OnVIDeviceStatusNotification(message, application_manager));
+ command.reset(new commands::OnVIDeviceStatusNotification(
+ message, application_manager));
break;
}
case hmi_apis::FunctionID::VehicleInfo_OnDriverBraking: {
- command.reset(new commands::OnVIDriverBrakingNotification(message, application_manager));
+ command.reset(new commands::OnVIDriverBrakingNotification(
+ message, application_manager));
break;
}
case hmi_apis::FunctionID::VehicleInfo_OnWiperStatus: {
- command.reset(new commands::OnVIWiperStatusNotification(message, application_manager));
+ command.reset(new commands::OnVIWiperStatusNotification(
+ message, application_manager));
break;
}
case hmi_apis::FunctionID::VehicleInfo_OnHeadLampStatus: {
- command.reset(new commands::OnVIHeadLampStatusNotification(message, application_manager));
+ command.reset(new commands::OnVIHeadLampStatusNotification(
+ message, application_manager));
break;
}
case hmi_apis::FunctionID::VehicleInfo_OnEngineTorque: {
- command.reset(new commands::OnVIEngineTorqueNotification(message, application_manager));
+ command.reset(new commands::OnVIEngineTorqueNotification(
+ message, application_manager));
break;
}
case hmi_apis::FunctionID::VehicleInfo_OnAccPedalPosition: {
- command.reset(new commands::OnVIAccPedalPositionNotification(message, application_manager));
+ command.reset(new commands::OnVIAccPedalPositionNotification(
+ message, application_manager));
break;
}
case hmi_apis::FunctionID::VehicleInfo_OnSteeringWheelAngle: {
- command.reset(new commands::OnVISteeringWheelAngleNotification(message, application_manager));
+ command.reset(new commands::OnVISteeringWheelAngleNotification(
+ message, application_manager));
break;
}
case hmi_apis::FunctionID::VehicleInfo_OnMyKey: {
- command.reset(new commands::OnVIMyKeyNotification(message, application_manager));
+ command.reset(
+ new commands::OnVIMyKeyNotification(message, application_manager));
break;
}
#else
case hmi_apis::FunctionID::VehicleInfo_OnVehicleData: {
- command.reset(new commands::OnVIVehicleDataNotification(message, application_manager));
+ command.reset(new commands::OnVIVehicleDataNotification(
+ message, application_manager));
break;
}
-#endif // #ifdef HMI_DBUS_API
+#endif // #ifdef HMI_DBUS_API
case hmi_apis::FunctionID::Navigation_OnTBTClientState: {
- command.reset(new commands::OnNaviTBTClientStateNotification(message, application_manager));
+ command.reset(new commands::OnNaviTBTClientStateNotification(
+ message, application_manager));
break;
}
case hmi_apis::FunctionID::UI_OnKeyboardInput: {
- command.reset(new commands::hmi::OnUIKeyBoardInputNotification(message, application_manager));
+ 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));
+ 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));
+ command.reset(new commands::hmi::OnUIResetTimeoutNotification(
+ message, application_manager));
break;
}
case hmi_apis::FunctionID::Navigation_StartStream: {
if (is_response) {
- command.reset(new commands::NaviStartStreamResponse(message, application_manager));
+ command.reset(new commands::NaviStartStreamResponse(
+ message, application_manager));
} else {
- command.reset(new commands::NaviStartStreamRequest(message, application_manager));
+ 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));
+ command.reset(
+ new commands::NaviStopStreamResponse(message, application_manager));
} else {
- command.reset(new commands::NaviStopStreamRequest(message, application_manager));
+ 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));
+ command.reset(new commands::AudioStartStreamResponse(
+ message, application_manager));
} else {
- command.reset(new commands::AudioStartStreamRequest(message, application_manager));
+ 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));
+ command.reset(new commands::AudioStopStreamResponse(
+ message, application_manager));
} else {
- command.reset(new commands::AudioStopStreamRequest(message, application_manager));
+ command.reset(
+ new commands::AudioStopStreamRequest(message, application_manager));
}
break;
}
case hmi_apis::FunctionID::Navigation_OnAudioDataStreaming: {
- command.reset(new commands::OnAudioDataStreamingNotification(message, application_manager));
+ command.reset(new commands::OnAudioDataStreamingNotification(
+ message, application_manager));
break;
}
case hmi_apis::FunctionID::Navigation_OnVideoDataStreaming: {
- command.reset(new commands::OnVideoDataStreamingNotification(message, application_manager));
+ 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));
+ command.reset(new commands::VRPerformInteractionResponse(
+ message, application_manager));
} else {
- command.reset(new commands::VRPerformInteractionRequest(message, application_manager));
+ command.reset(new commands::VRPerformInteractionRequest(
+ message, application_manager));
}
break;
}
case hmi_apis::FunctionID::BasicCommunication_OnSystemRequest: {
- command.reset(new commands::OnSystemRequestNotification(message, application_manager));
+ command.reset(new commands::OnSystemRequestNotification(
+ message, application_manager));
break;
}
case hmi_apis::FunctionID::BasicCommunication_OnPutFile: {
- command.reset(new commands::OnPutFileNotification(message, application_manager));
+ command.reset(
+ new commands::OnPutFileNotification(message, application_manager));
break;
}
case hmi_apis::FunctionID::BasicCommunication_OnResumeAudioSource: {
- command.reset(new commands::OnResumeAudioSourceNotification(message, application_manager));
+ 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));
+ command.reset(new commands::UiSetDisplayLayoutResponse(
+ message, application_manager));
} else {
- command.reset(new commands::UiSetDisplayLayoutRequest(message, application_manager));
+ command.reset(new commands::UiSetDisplayLayoutRequest(
+ message, application_manager));
}
break;
}
case hmi_apis::FunctionID::BasicCommunication_OnSDLClose: {
- command.reset(new commands::OnSDLCloseNotification(message, application_manager));
+ command.reset(
+ new commands::OnSDLCloseNotification(message, application_manager));
break;
}
case hmi_apis::FunctionID::BasicCommunication_OnSDLPersistenceComplete: {
- command.reset(new commands::OnSDLPersistenceCompleteNotification(message, application_manager));
+ command.reset(new commands::OnSDLPersistenceCompleteNotification(
+ message, application_manager));
break;
}
case hmi_apis::FunctionID::BasicCommunication_OnFileRemoved: {
- command.reset(new commands::OnFileRemovedNotification(message, application_manager));
+ command.reset(new commands::OnFileRemovedNotification(
+ message, application_manager));
break;
}
case hmi_apis::FunctionID::UI_OnRecordStart: {
- command.reset(new commands::OnRecordStartdNotification(message, application_manager));
+ 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));
+ command.reset(new commands::BasicCommunicationSystemResponse(
+ message, application_manager));
} else {
- command.reset(new commands::BasicCommunicationSystemRequest(message, application_manager));
+ 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));
+ command.reset(new commands::NaviSendLocationResponse(
+ message, application_manager));
} else {
- command.reset(new commands::NaviSendLocationRequest(message, application_manager));
+ command.reset(new commands::NaviSendLocationRequest(
+ message, application_manager));
}
break;
}
case hmi_apis::FunctionID::SDL_AddStatisticsInfo: {
- command.reset(new commands::AddStatisticsInfoNotification(message, application_manager));
+ command.reset(new commands::AddStatisticsInfoNotification(
+ message, application_manager));
break;
}
case hmi_apis::FunctionID::SDL_OnSystemError: {
- command.reset(new commands::OnSystemErrorNotification(message, application_manager));
+ command.reset(new commands::OnSystemErrorNotification(
+ message, application_manager));
break;
}
case hmi_apis::FunctionID::SDL_OnReceivedPolicyUpdate: {
- command.reset(new commands::OnReceivedPolicyUpdate(message, application_manager));
+ command.reset(
+ new commands::OnReceivedPolicyUpdate(message, application_manager));
break;
}
case hmi_apis::FunctionID::SDL_OnPolicyUpdate: {
@@ -2073,27 +2206,33 @@ CommandSharedPtr HMICommandFactory::CreateCommand(
break;
}
case hmi_apis::FunctionID::SDL_OnDeviceStateChanged: {
- command.reset(new commands::OnDeviceStateChangedNotification(message, application_manager));
+ command.reset(new commands::OnDeviceStateChangedNotification(
+ message, application_manager));
break;
}
case hmi_apis::FunctionID::TTS_OnResetTimeout: {
- command.reset(new commands::hmi::OnTTSResetTimeoutNotification(message, application_manager));
+ command.reset(new commands::hmi::OnTTSResetTimeoutNotification(
+ message, application_manager));
break;
}
case hmi_apis::FunctionID::BasicCommunication_OnEventChanged: {
- command.reset(new commands::OnEventChangedNotification(message, application_manager));
+ 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));
+ command.reset(new commands::hmi::DialNumberResponse(
+ message, application_manager));
} else {
- command.reset(new commands::hmi::DialNumberRequest(message, application_manager));
+ command.reset(
+ new commands::hmi::DialNumberRequest(message, application_manager));
}
break;
}
case hmi_apis::FunctionID::Navigation_OnWayPointChange: {
- command.reset(new commands::OnNaviWayPointChangeNotification(message, application_manager));
+ command.reset(new commands::OnNaviWayPointChangeNotification(
+ message, application_manager));
break;
}
}
diff --git a/src/components/application_manager/src/hmi_language_handler.cc b/src/components/application_manager/src/hmi_language_handler.cc
index f62c130c42..72ab60eb3a 100644
--- a/src/components/application_manager/src/hmi_language_handler.cc
+++ b/src/components/application_manager/src/hmi_language_handler.cc
@@ -186,8 +186,9 @@ void HMILanguageHandler::set_handle_response_for(
subscribe_on_event(function_id, correlation_id);
- LOG4CXX_DEBUG(logger_, "Subscribed for function_id " << function_id <<
- " and correlation_id " << correlation_id);
+ LOG4CXX_DEBUG(logger_,
+ "Subscribed for function_id "
+ << function_id << " and correlation_id " << correlation_id);
}
void HMILanguageHandler::set_default_capabilities_languages(
@@ -211,7 +212,7 @@ void HMILanguageHandler::set_default_capabilities_languages(
}
void HMILanguageHandler::SendOnLanguageChangeToMobile(
- const uint32_t connection_key) {
+ const uint32_t connection_key) {
LOG4CXX_AUTO_TRACE(logger_);
smart_objects::SmartObjectSPtr notification = new smart_objects::SmartObject;
@@ -228,8 +229,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_.ManageMobileCommand(notification,
+ commands::Command::ORIGIN_SDL)) {
LOG4CXX_INFO(logger_, "Mobile command sent");
} else {
LOG4CXX_WARN(logger_, "Cannot send mobile command");
@@ -239,28 +240,32 @@ void HMILanguageHandler::SendOnLanguageChangeToMobile(
void HMILanguageHandler::VerifyWithPersistedLanguages() {
LOG4CXX_AUTO_TRACE(logger_);
using namespace helpers;
- const HMICapabilities& hmi_capabilities = application_manager_.hmi_capabilities();
+ const HMICapabilities& hmi_capabilities =
+ application_manager_.hmi_capabilities();
// Updated values compared with persisted
if (hmi_capabilities.active_ui_language() == persisted_ui_language_ &&
hmi_capabilities.active_vr_language() == persisted_vr_language_ &&
hmi_capabilities.active_tts_language() == persisted_tts_language_) {
LOG4CXX_INFO(logger_,
- "All languages gotten from HMI match to persisted values.");
+ "All languages gotten from HMI match to persisted values.");
return;
}
- LOG4CXX_INFO(logger_, "Some languages gotten from HMI have "
- "mismatch with persisted values.");
+ LOG4CXX_INFO(logger_,
+ "Some languages gotten from HMI have "
+ "mismatch with persisted values.");
- const ApplicationSet& accessor = application_manager_.applications().GetData();
+ const ApplicationSet& accessor =
+ application_manager_.applications().GetData();
ApplicationSetIt it = accessor.begin();
for (; accessor.end() != it;) {
ApplicationConstSharedPtr app = *it++;
- LOG4CXX_INFO(logger_, "Application with app_id " << app->app_id()
- << " will be unregistered because of "
- "HMI language(s) mismatch.");
+ LOG4CXX_INFO(logger_,
+ "Application with app_id "
+ << app->app_id() << " will be unregistered because of "
+ "HMI language(s) mismatch.");
CheckApplication(std::make_pair(app->app_id(), false));
}
@@ -277,17 +282,23 @@ void HMILanguageHandler::HandleWrongLanguageApp(const Apps::value_type& app) {
LOG4CXX_AUTO_TRACE(logger_);
Apps::iterator it = apps_.find(app.first);
if (apps_.end() == it) {
- LOG4CXX_DEBUG(logger_, "Application id " << app.first <<
- " is not found within apps with wrong language.");
+ LOG4CXX_DEBUG(logger_,
+ "Application id "
+ << app.first
+ << " is not found within apps with wrong language.");
return;
}
- LOG4CXX_INFO(logger_, "Unregistering application with app_id "
- << app.first << " because of HMI language(s) mismatch.");
+ LOG4CXX_INFO(logger_,
+ "Unregistering application with app_id "
+ << app.first << " because of HMI language(s) mismatch.");
SendOnLanguageChangeToMobile(app.first);
- application_manager_.ManageMobileCommand(MessageHelper::GetOnAppInterfaceUnregisteredNotificationToMobile(
- app.first, mobile_api::AppInterfaceUnregisteredReason::LANGUAGE_CHANGE), commands::Command::ORIGIN_SDL);
+ application_manager_.ManageMobileCommand(
+ MessageHelper::GetOnAppInterfaceUnregisteredNotificationToMobile(
+ app.first,
+ mobile_api::AppInterfaceUnregisteredReason::LANGUAGE_CHANGE),
+ commands::Command::ORIGIN_SDL);
application_manager_.UnregisterApplication(
app.first, mobile_apis::Result::SUCCESS, false);
apps_.erase(it);
@@ -303,8 +314,9 @@ void HMILanguageHandler::CheckApplication(const Apps::value_type app) {
sync_primitives::AutoLock lock(apps_lock_);
Apps::iterator it = apps_.find(app.first);
if (apps_.end() == it) {
- LOG4CXX_INFO(logger_, "Adding application id " << app.first <<
- " Application registered: " << app.second);
+ LOG4CXX_INFO(logger_,
+ "Adding application id "
+ << app.first << " Application registered: " << app.second);
apps_.insert(app);
return;
}
@@ -318,7 +330,6 @@ void HMILanguageHandler::Init(resumption::LastState* value) {
persisted_ui_language_ = get_language_for(INTERFACE_UI);
persisted_vr_language_ = get_language_for(INTERFACE_VR);
persisted_tts_language_ = get_language_for(INTERFACE_TTS);
-
}
} // namespace application_manager
diff --git a/src/components/application_manager/src/hmi_state.cc b/src/components/application_manager/src/hmi_state.cc
index 721eb9b063..bad2d8661b 100644
--- a/src/components/application_manager/src/hmi_state.cc
+++ b/src/components/application_manager/src/hmi_state.cc
@@ -97,8 +97,8 @@ mobile_apis::AudioStreamingState::eType TTSHmiState::audio_streaming_state()
AudioStreamingState::eType expected_state = AudioStreamingState::NOT_AUDIBLE;
if (app_mngr_.is_attenuated_supported() &&
AudioStreamingState::NOT_AUDIBLE != parent()->audio_streaming_state() &&
- Compare<HMILevel::eType, EQ, ONE>(hmi_level(), HMILevel::HMI_FULL,
- HMILevel::HMI_LIMITED)) {
+ Compare<HMILevel::eType, EQ, ONE>(
+ hmi_level(), HMILevel::HMI_FULL, HMILevel::HMI_LIMITED)) {
expected_state = AudioStreamingState::ATTENUATED;
}
return expected_state;
@@ -151,7 +151,7 @@ SafetyModeHmiState::SafetyModeHmiState(uint32_t app_id,
DeactivateHMI::DeactivateHMI(uint32_t app_id,
const ApplicationManager& app_mngr)
-: HmiState(app_id, app_mngr, STATE_ID_DEACTIVATE_HMI) {}
+ : HmiState(app_id, app_mngr, STATE_ID_DEACTIVATE_HMI) {}
mobile_apis::HMILevel::eType DeactivateHMI::hmi_level() const {
using namespace helpers;
@@ -165,7 +165,7 @@ mobile_apis::HMILevel::eType DeactivateHMI::hmi_level() const {
}
AudioSource::AudioSource(uint32_t app_id, const ApplicationManager& app_mngr)
- : HmiState(app_id, app_mngr, STATE_ID_AUDIO_SOURCE) {}
+ : HmiState(app_id, app_mngr, STATE_ID_AUDIO_SOURCE) {}
mobile_apis::HMILevel::eType AudioSource::hmi_level() const {
using namespace mobile_apis;
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 1be6bb6a24..77b6c9d6cc 100644
--- a/src/components/application_manager/src/message_helper/message_helper.cc
+++ b/src/components/application_manager/src/message_helper/message_helper.cc
@@ -220,19 +220,20 @@ hmi_apis::Common_Language::eType MessageHelper::CommonLanguageFromString(
return hmi_apis::Common_Language::INVALID_ENUM;
}
-smart_objects::SmartObjectSPtr MessageHelper::CreateRequestObject(const uint32_t correlation_id) {
+smart_objects::SmartObjectSPtr MessageHelper::CreateRequestObject(
+ const uint32_t correlation_id) {
using namespace smart_objects;
SmartObjectSPtr request = utils::MakeShared<SmartObject>(SmartType_Map);
- SmartObject& ref = *request;
+ SmartObject& ref = *request;
- ref[strings::params][strings::message_type] =
- static_cast<int>(hmi_apis::messageType::request);
- ref[strings::params][strings::protocol_version] =
- commands::CommandImpl::protocol_version_;
- ref[strings::params][strings::protocol_type] =
- commands::CommandImpl::hmi_protocol_type_;
- ref[strings::params][strings::correlation_id] = correlation_id;
+ ref[strings::params][strings::message_type] =
+ static_cast<int>(hmi_apis::messageType::request);
+ ref[strings::params][strings::protocol_version] =
+ commands::CommandImpl::protocol_version_;
+ ref[strings::params][strings::protocol_type] =
+ commands::CommandImpl::hmi_protocol_type_;
+ ref[strings::params][strings::correlation_id] = correlation_id;
return request;
}
@@ -250,7 +251,8 @@ smart_objects::SmartObjectSPtr MessageHelper::CreateHashUpdateNotification(
return message;
}
-void MessageHelper::SendHashUpdateNotification(const uint32_t app_id, ApplicationManager& app_mngr) {
+void MessageHelper::SendHashUpdateNotification(const uint32_t app_id,
+ ApplicationManager& app_mngr) {
LOG4CXX_AUTO_TRACE(logger_);
ApplicationSharedPtr app = app_mngr.application(app_id);
if (!app) {
@@ -259,19 +261,21 @@ void MessageHelper::SendHashUpdateNotification(const uint32_t app_id, Applicatio
}
smart_objects::SmartObjectSPtr so = CreateHashUpdateNotification(app_id);
PrintSmartObject(*so);
- if (!app_mngr.ManageMobileCommand(
- so, commands::Command::ORIGIN_SDL)) {
+ if (!app_mngr.ManageMobileCommand(so, commands::Command::ORIGIN_SDL)) {
LOG4CXX_ERROR(logger_, "Failed to send HashUpdate notification.");
return;
}
app_mngr.resume_controller().ApplicationsDataUpdated();
}
-smart_objects::SmartObjectSPtr MessageHelper::GetOnAppInterfaceUnregisteredNotificationToMobile(int32_t connection_key,
+smart_objects::SmartObjectSPtr
+MessageHelper::GetOnAppInterfaceUnregisteredNotificationToMobile(
+ int32_t connection_key,
mobile_api::AppInterfaceUnregisteredReason::eType reason) {
LOG4CXX_AUTO_TRACE(logger_);
- smart_objects::SmartObjectSPtr notification = utils::MakeShared<smart_objects::SmartObject>();
+ smart_objects::SmartObjectSPtr notification =
+ utils::MakeShared<smart_objects::SmartObject>();
smart_objects::SmartObject& message = *notification;
message[strings::params][strings::function_id] = static_cast<int32_t>(
@@ -462,8 +466,9 @@ static std::map<std::string, uint16_t> vehicle_data_args =
#endif
void MessageHelper::CreateGetVehicleDataRequest(
- const uint32_t correlation_id, const std::vector<std::string>& params,
- ApplicationManager& app_mngr) {
+ 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();
@@ -536,7 +541,7 @@ smart_objects::SmartObjectSPtr MessageHelper::CreateBlockedByPoliciesResponse(
smart_objects::SmartObjectSPtr MessageHelper::CreateDeviceListSO(
const connection_handler::DeviceMap& devices,
const policy::PolicyHandlerInterface& policy_handler,
- ApplicationManager& app_mngr) {
+ ApplicationManager& app_mngr) {
LOG4CXX_AUTO_TRACE(logger_);
smart_objects::SmartObjectSPtr device_list_so =
utils::MakeShared<smart_objects::SmartObject>(
@@ -560,8 +565,7 @@ smart_objects::SmartObjectSPtr MessageHelper::CreateDeviceListSO(
list_so[index][strings::isSDLAllowed] =
policy::DeviceConsent::kDeviceAllowed == device_consent;
list_so[index][strings::transport_type] =
- app_mngr.GetDeviceTransportType(
- d.connection_type());
+ app_mngr.GetDeviceTransportType(d.connection_type());
++index;
}
return device_list_so;
@@ -604,7 +608,8 @@ smart_objects::SmartObjectSPtr MessageHelper::CreateSetAppIcon(
return set_icon;
}
-bool MessageHelper::SendIVISubscribtions(const uint32_t app_id, ApplicationManager& app_mngr) {
+bool MessageHelper::SendIVISubscribtions(const uint32_t app_id,
+ ApplicationManager& app_mngr) {
LOG4CXX_AUTO_TRACE(logger_);
bool result = true;
@@ -615,7 +620,8 @@ bool MessageHelper::SendIVISubscribtions(const uint32_t app_id, ApplicationManag
return result;
}
- smart_objects::SmartObjectList requests = GetIVISubscriptionRequests(app, app_mngr);
+ smart_objects::SmartObjectList requests =
+ GetIVISubscriptionRequests(app, app_mngr);
for (smart_objects::SmartObjectList::const_iterator it = requests.begin();
it != requests.end();
++it) {
@@ -678,7 +684,8 @@ smart_objects::SmartObjectList MessageHelper::GetIVISubscriptionRequests(
void MessageHelper::SendOnButtonSubscriptionNotification(
uint32_t app_id,
hmi_apis::Common_ButtonName::eType button,
- bool is_subscribed, ApplicationManager& app_mngr) {
+ bool is_subscribed,
+ ApplicationManager& app_mngr) {
using namespace smart_objects;
using namespace hmi_apis;
LOG4CXX_AUTO_TRACE(logger_);
@@ -728,16 +735,17 @@ void MessageHelper::SendAllOnButtonSubscriptionNotificationsForApp(
ButtonSubscriptions::iterator it = subscriptions.begin();
for (; subscriptions.end() != it; ++it) {
SendOnButtonSubscriptionNotification(
- app->hmi_app_id(),
- static_cast<Common_ButtonName::eType>(*it),
- true,
- app_mngr);
+ app->hmi_app_id(),
+ static_cast<Common_ButtonName::eType>(*it),
+ true,
+ app_mngr);
}
}
-void MessageHelper::SendSetAppIcon(const uint32_t app_id,
- const std::string& icon_path,
- application_manager::ApplicationManager& application_manager) {
+void MessageHelper::SendSetAppIcon(
+ const uint32_t app_id,
+ const std::string& icon_path,
+ application_manager::ApplicationManager& application_manager) {
using namespace smart_objects;
SmartObjectSPtr set_app_icon =
@@ -759,7 +767,8 @@ void MessageHelper::SendSetAppIcon(const uint32_t app_id,
}
}
-void MessageHelper::SendAppDataToHMI(ApplicationConstSharedPtr app, ApplicationManager& app_man) {
+void MessageHelper::SendAppDataToHMI(ApplicationConstSharedPtr app,
+ ApplicationManager& app_man) {
LOG4CXX_AUTO_TRACE(logger_);
if (app) {
SendSetAppIcon(app, app->app_icon_path(), app_man);
@@ -768,14 +777,15 @@ void MessageHelper::SendAppDataToHMI(ApplicationConstSharedPtr app, ApplicationM
}
}
-void MessageHelper::SendGlobalPropertiesToHMI(ApplicationConstSharedPtr app, ApplicationManager& app_mngr) {
+void MessageHelper::SendGlobalPropertiesToHMI(ApplicationConstSharedPtr app,
+ ApplicationManager& app_mngr) {
if (!app.valid()) {
LOG4CXX_ERROR(logger_, "Invalid application");
return;
}
- smart_objects::SmartObjectList requests =
- CreateGlobalPropertiesRequestsToHMI(app, app_mngr.GetNextHMICorrelationID());
+ smart_objects::SmartObjectList requests = CreateGlobalPropertiesRequestsToHMI(
+ app, app_mngr.GetNextHMICorrelationID());
for (smart_objects::SmartObjectList::const_iterator it = requests.begin();
it != requests.end();
++it) {
@@ -784,8 +794,8 @@ void MessageHelper::SendGlobalPropertiesToHMI(ApplicationConstSharedPtr app, App
}
smart_objects::SmartObjectList
-MessageHelper::CreateGlobalPropertiesRequestsToHMI(ApplicationConstSharedPtr app,
- const uint32_t correlation_id) {
+MessageHelper::CreateGlobalPropertiesRequestsToHMI(
+ ApplicationConstSharedPtr app, const uint32_t correlation_id) {
LOG4CXX_AUTO_TRACE(logger_);
smart_objects::SmartObjectList requests;
@@ -865,7 +875,8 @@ void MessageHelper::SendTTSGlobalProperties(ApplicationSharedPtr app,
if (!app) {
return;
}
- smart_objects::SmartObjectSPtr tts_global_properties = CreateRequestObject(app_man.GetNextHMICorrelationID());
+ smart_objects::SmartObjectSPtr tts_global_properties =
+ CreateRequestObject(app_man.GetNextHMICorrelationID());
if (tts_global_properties) {
smart_objects::SmartObject& so_to_send = *tts_global_properties;
so_to_send[strings::params][strings::function_id] =
@@ -942,7 +953,8 @@ smart_objects::SmartObjectList MessageHelper::CreateShowRequestToHMI(
}
if (app->show_command()) {
- smart_objects::SmartObjectSPtr ui_show = CreateRequestObject(correlation_id);
+ smart_objects::SmartObjectSPtr ui_show =
+ CreateRequestObject(correlation_id);
(*ui_show)[strings::params][strings::function_id] =
static_cast<int>(hmi_apis::FunctionID::UI_Show);
@@ -952,11 +964,13 @@ smart_objects::SmartObjectList MessageHelper::CreateShowRequestToHMI(
return requests;
}
-void MessageHelper::SendShowRequestToHMI(ApplicationConstSharedPtr app, ApplicationManager& app_mngr) {
+void MessageHelper::SendShowRequestToHMI(ApplicationConstSharedPtr app,
+ ApplicationManager& app_mngr) {
if (!app) {
return;
}
- smart_objects::SmartObjectList shows = CreateShowRequestToHMI(app, app_mngr.GetNextHMICorrelationID());
+ smart_objects::SmartObjectList shows =
+ CreateShowRequestToHMI(app, app_mngr.GetNextHMICorrelationID());
for (smart_objects::SmartObjectList::const_iterator it = shows.begin();
it != shows.end();
@@ -990,7 +1004,8 @@ void MessageHelper::SendAddCommandRequestToHMI(ApplicationConstSharedPtr app,
if (!app) {
return;
}
- smart_objects::SmartObjectList requests = CreateAddCommandRequestToHMI(app, app_man);
+ smart_objects::SmartObjectList requests =
+ CreateAddCommandRequestToHMI(app, app_man);
for (smart_objects::SmartObjectList::iterator it = requests.begin();
it != requests.end();
++it) {
@@ -1012,7 +1027,8 @@ smart_objects::SmartObjectList MessageHelper::CreateAddCommandRequestToHMI(
for (; commands.end() != i; ++i) {
// UI Interface
if ((*i->second).keyExists(strings::menu_params)) {
- smart_objects::SmartObjectSPtr ui_command = CreateRequestObject(app_mngr.GetNextHMICorrelationID());
+ smart_objects::SmartObjectSPtr ui_command =
+ CreateRequestObject(app_mngr.GetNextHMICorrelationID());
if (!ui_command) {
return requests;
}
@@ -1064,7 +1080,8 @@ MessageHelper::CreateAddVRCommandRequestFromChoiceToHMI(
(*(it->second))[strings::grammar_id].asUInt();
const size_t size = (*(it->second))[strings::choice_set].length();
for (size_t j = 0; j < size; ++j) {
- smart_objects::SmartObjectSPtr vr_command = CreateRequestObject(app_mngr.GetNextHMICorrelationID());
+ smart_objects::SmartObjectSPtr vr_command =
+ CreateRequestObject(app_mngr.GetNextHMICorrelationID());
if (!vr_command) {
return requests;
}
@@ -1095,7 +1112,7 @@ smart_objects::SmartObjectSPtr MessageHelper::CreateChangeRegistration(
const int32_t function_id,
const int32_t language,
const uint32_t app_id,
- const smart_objects::SmartObject* app_types,
+ const smart_objects::SmartObject* app_types,
ApplicationManager& app_mngr) {
smart_objects::SmartObjectSPtr command =
CreateRequestObject(app_mngr.GetNextHMICorrelationID());
@@ -1130,8 +1147,8 @@ void MessageHelper::SendUIChangeRegistrationRequestToHMI(
CreateChangeRegistration(hmi_apis::FunctionID::UI_ChangeRegistration,
app->ui_language(),
app->app_id(),
- app->app_types(),
- app_mngr);
+ app->app_types(),
+ app_mngr);
if (ui_command) {
app_mngr.ManageHMICommand(ui_command);
@@ -1148,7 +1165,9 @@ void MessageHelper::SendChangeRegistrationRequestToHMI(
smart_objects::SmartObjectSPtr vr_command =
CreateChangeRegistration(hmi_apis::FunctionID::VR_ChangeRegistration,
app->language(),
- app->app_id(), NULL, app_mngr);
+ app->app_id(),
+ NULL,
+ app_mngr);
if (vr_command) {
app_mngr.ManageHMICommand(vr_command);
@@ -1159,7 +1178,9 @@ void MessageHelper::SendChangeRegistrationRequestToHMI(
smart_objects::SmartObjectSPtr tts_command =
CreateChangeRegistration(hmi_apis::FunctionID::TTS_ChangeRegistration,
app->language(),
- app->app_id(), NULL, app_mngr);
+ app->app_id(),
+ NULL,
+ app_mngr);
if (tts_command) {
app_mngr.ManageHMICommand(tts_command);
@@ -1170,7 +1191,9 @@ void MessageHelper::SendChangeRegistrationRequestToHMI(
smart_objects::SmartObjectSPtr ui_command =
CreateChangeRegistration(hmi_apis::FunctionID::UI_ChangeRegistration,
app->ui_language(),
- app->app_id(), NULL, app_mngr);
+ app->app_id(),
+ NULL,
+ app_mngr);
if (ui_command) {
app_mngr.ManageHMICommand(ui_command);
@@ -1191,8 +1214,10 @@ void MessageHelper::SendAddVRCommandToHMI(
smart_objects::SmartObjectSPtr MessageHelper::CreateAddVRCommandToHMI(
const uint32_t cmd_id,
const smart_objects::SmartObject& vr_commands,
- uint32_t app_id, ApplicationManager& app_mngr) {
- smart_objects::SmartObjectSPtr vr_command = CreateRequestObject(app_mngr.GetNextHMICorrelationID());
+ uint32_t app_id,
+ ApplicationManager& app_mngr) {
+ smart_objects::SmartObjectSPtr vr_command =
+ CreateRequestObject(app_mngr.GetNextHMICorrelationID());
if (!vr_command) {
return NULL;
}
@@ -1209,7 +1234,8 @@ smart_objects::SmartObjectSPtr MessageHelper::CreateAddVRCommandToHMI(
if (0 < app_id) {
msg_params[strings::app_id] = app_id;
}
- msg_params[strings::grammar_id] = app_mngr.application(app_id)->get_grammar_id();
+ msg_params[strings::grammar_id] =
+ app_mngr.application(app_id)->get_grammar_id();
msg_params[strings::type] = hmi_apis::Common_VRCommandType::Command;
(*vr_command)[strings::msg_params] = msg_params;
@@ -1282,8 +1308,7 @@ bool MessageHelper::CreateHMIApplicationStruct(
policy::DeviceConsent::kDeviceAllowed == device_consent;
message[strings::device_info][strings::transport_type] =
- app_mngr.GetDeviceTransportType(
- transport_type);
+ app_mngr.GetDeviceTransportType(transport_type);
return true;
}
@@ -1364,7 +1389,7 @@ smart_objects::SmartObjectSPtr MessageHelper::GetBCActivateAppRequestToHMI(
const policy::PolicyHandlerInterface& policy_handler,
hmi_apis::Common_HMILevel::eType level,
bool send_policy_priority,
- ApplicationManager& app_mngr) {
+ ApplicationManager& app_mngr) {
DCHECK_OR_RETURN(app, smart_objects::SmartObjectSPtr());
const uint32_t correlation_id = app_mngr.GetNextHMICorrelationID();
@@ -1381,14 +1406,14 @@ smart_objects::SmartObjectSPtr MessageHelper::GetBCActivateAppRequestToHMI(
std::string priority;
// TODO(KKolodiy): need remove method policy_manager
- policy_handler.GetPriority(app->policy_app_id(),
- &priority);
+ policy_handler.GetPriority(app->policy_app_id(), &priority);
// According SDLAQ-CRS-2794
// SDL have to send ActivateApp without "proirity" parameter to HMI.
// in case of unconsented device
const std::string& mac_adress = app->mac_address();
- policy::DeviceConsent consent = policy_handler.GetUserConsentForDevice(mac_adress);
+ policy::DeviceConsent consent =
+ policy_handler.GetUserConsentForDevice(mac_adress);
if (!priority.empty() &&
(policy::DeviceConsent::kDeviceAllowed == consent)) {
(*message)[strings::msg_params][strings::priority] =
@@ -1407,8 +1432,8 @@ smart_objects::SmartObjectSPtr MessageHelper::GetBCActivateAppRequestToHMI(
void MessageHelper::SendOnResumeAudioSourceToHMI(const uint32_t app_id,
ApplicationManager& app_mngr) {
LOG4CXX_WARN(logger_, "SendOnResumeAudioSourceToHMI app_id: " << app_id);
- application_manager::ApplicationConstSharedPtr app = app_mngr.application(
- app_id);
+ application_manager::ApplicationConstSharedPtr app =
+ app_mngr.application(app_id);
if (!app) {
LOG4CXX_WARN(logger_, "Invalid app_id: " << app_id);
return;
@@ -1430,8 +1455,8 @@ void MessageHelper::SendOnResumeAudioSourceToHMI(const uint32_t app_id,
}
void MessageHelper::SendSDLActivateAppResponse(
- policy::AppPermissions& permissions,
- const uint32_t correlation_id,
+ policy::AppPermissions& permissions,
+ const uint32_t correlation_id,
ApplicationManager& app_mngr) {
smart_objects::SmartObjectSPtr message =
utils::MakeShared<smart_objects::SmartObject>(
@@ -1480,8 +1505,7 @@ void MessageHelper::SendSDLActivateAppResponse(
}
void MessageHelper::SendOnSDLConsentNeeded(
- const policy::DeviceParams& device_info,
- ApplicationManager& app_man) {
+ const policy::DeviceParams& device_info, ApplicationManager& app_man) {
smart_objects::SmartObjectSPtr message =
utils::MakeShared<smart_objects::SmartObject>(
smart_objects::SmartType_Map);
@@ -1737,9 +1761,10 @@ void MessageHelper::SendAudioStopStream(const int32_t app_id,
app_mngr.ManageHMICommand(stop_stream);
}
-void MessageHelper::SendOnDataStreaming(const protocol_handler::ServiceType service,
- const bool available,
- ApplicationManager& app_mngr) {
+void MessageHelper::SendOnDataStreaming(
+ const protocol_handler::ServiceType service,
+ const bool available,
+ ApplicationManager& app_mngr) {
using namespace protocol_handler;
using namespace helpers;
@@ -1795,13 +1820,13 @@ bool MessageHelper::SendUnsubscribedWayPoints(ApplicationManager& app_mngr) {
void MessageHelper::SendPolicySnapshotNotification(
uint32_t connection_key,
const std::vector<uint8_t>& policy_data,
- const std::string& url,
+ const std::string& url,
ApplicationManager& app_mngr) {
-
smart_objects::SmartObject content(smart_objects::SmartType_Map);
if (!url.empty()) {
- content[strings::msg_params][strings::url] = url; // Doesn't work with mobile_notification::syncp_url ("URL")
+ content[strings::msg_params][strings::url] =
+ url; // Doesn't work with mobile_notification::syncp_url ("URL")
} else {
LOG4CXX_WARN(logger_, "No service URLs");
}
@@ -1817,7 +1842,7 @@ void MessageHelper::SendPolicySnapshotNotification(
}
void MessageHelper::SendSystemRequestNotification(
- const uint32_t connection_key,
+ const uint32_t connection_key,
smart_objects::SmartObject& content,
ApplicationManager& app_mngr) {
content[strings::params][strings::function_id] =
@@ -1836,20 +1861,19 @@ void MessageHelper::SendSystemRequestNotification(
#endif
DCHECK(app_mngr.ManageMobileCommand(
- utils::MakeShared<smart_objects::SmartObject>(content),
- commands::Command::ORIGIN_SDL));
+ utils::MakeShared<smart_objects::SmartObject>(content),
+ commands::Command::ORIGIN_SDL));
}
void MessageHelper::SendLaunchApp(const uint32_t connection_key,
const std::string& urlSchema,
- const std::string& packageName,
+ const std::string& packageName,
ApplicationManager& app_mngr) {
using namespace mobile_apis;
using namespace smart_objects;
SmartObject content(SmartType_Map);
- content[strings::msg_params][strings::request_type] =
- RequestType::LAUNCH_APP;
+ content[strings::msg_params][strings::request_type] = RequestType::LAUNCH_APP;
content[strings::msg_params][strings::app_id] = connection_key;
if (!urlSchema.empty()) {
content[strings::msg_params][strings::url] = urlSchema;
@@ -1860,19 +1884,15 @@ void MessageHelper::SendLaunchApp(const uint32_t connection_key,
SendSystemRequestNotification(connection_key, content, app_mngr);
}
-void MessageHelper::SendQueryApps(
- const uint32_t connection_key,
- ApplicationManager& app_mngr) {
+void MessageHelper::SendQueryApps(const uint32_t connection_key,
+ ApplicationManager& app_mngr) {
using namespace mobile_apis;
- policy::PolicyHandlerInterface& policy_handler =
- app_mngr.GetPolicyHandler();
+ policy::PolicyHandlerInterface& policy_handler = app_mngr.GetPolicyHandler();
smart_objects::SmartObject content(smart_objects::SmartType_Map);
- content[strings::msg_params][strings::request_type] =
- RequestType::QUERY_APPS;
- content[strings::msg_params][strings::url] =
- policy_handler.RemoteAppsUrl();
+ content[strings::msg_params][strings::request_type] = RequestType::QUERY_APPS;
+ content[strings::msg_params][strings::url] = policy_handler.RemoteAppsUrl();
content[strings::msg_params][strings::timeout] =
policy_handler.TimeoutExchange();
@@ -1902,8 +1922,9 @@ void MessageHelper::SendQueryApps(
}
void MessageHelper::SendOnPermissionsChangeNotification(
- uint32_t connection_key, const policy::Permissions& permissions, ApplicationManager& app_mngr) {
-
+ uint32_t connection_key,
+ const policy::Permissions& permissions,
+ ApplicationManager& app_mngr) {
smart_objects::SmartObject content(smart_objects::SmartType_Map);
content[strings::params][strings::function_id] =
@@ -2039,9 +2060,8 @@ void MessageHelper::FillAppRevokedPermissions(
void MessageHelper::SendOnAppPermissionsChangedNotification(
const uint32_t connection_key,
- const policy::AppPermissions& permissions,
- ApplicationManager& app_mngr) {
-
+ const policy::AppPermissions& permissions,
+ ApplicationManager& app_mngr) {
smart_objects::SmartObject message(smart_objects::SmartType_Map);
message[strings::params][strings::function_id] =
@@ -2075,7 +2095,8 @@ void MessageHelper::SendOnAppPermissionsChangedNotification(
}
if (permissions.requestTypeChanged) {
smart_objects::SmartObject request_types_array(
- smart_objects::SmartType_Array);;
+ smart_objects::SmartType_Array);
+ ;
for (uint16_t index = 0; index < permissions.requestType.size(); ++index) {
request_types_array[index] = permissions.requestType[index];
}
@@ -2083,7 +2104,7 @@ void MessageHelper::SendOnAppPermissionsChangedNotification(
}
app_mngr.ManageHMICommand(
- utils::MakeShared<smart_objects::SmartObject>(message));
+ utils::MakeShared<smart_objects::SmartObject>(message));
}
void MessageHelper::SendGetStatusUpdateResponse(const std::string& status,
@@ -2159,11 +2180,13 @@ void MessageHelper::SendGetSystemInfoRequest(ApplicationManager& app_mngr) {
}
mobile_apis::Result::eType MessageHelper::VerifyImageFiles(
- smart_objects::SmartObject& message, ApplicationConstSharedPtr app,
- ApplicationManager& app_mngr) {
+ smart_objects::SmartObject& message,
+ ApplicationConstSharedPtr app,
+ ApplicationManager& app_mngr) {
if (NsSmartDeviceLink::NsSmartObjects::SmartType_Array == message.getType()) {
for (uint32_t i = 0; i < message.length(); ++i) {
- mobile_apis::Result::eType res = VerifyImageFiles(message[i], app, app_mngr);
+ mobile_apis::Result::eType res =
+ VerifyImageFiles(message[i], app, app_mngr);
if (mobile_apis::Result::SUCCESS != res) {
LOG4CXX_DEBUG(logger_, "VerifyImageFiles result:" << res);
return res;
@@ -2187,7 +2210,8 @@ mobile_apis::Result::eType MessageHelper::VerifyImageFiles(
key != keys.end();
++key) {
if (strings::soft_buttons != (*key)) {
- mobile_apis::Result::eType res = VerifyImageFiles(message[*key], app, app_mngr);
+ mobile_apis::Result::eType res =
+ VerifyImageFiles(message[*key], app, app_mngr);
if (mobile_apis::Result::SUCCESS != res) {
LOG4CXX_DEBUG(logger_, "VerifyImageFiles result:" << res);
return res;
@@ -2202,7 +2226,8 @@ mobile_apis::Result::eType MessageHelper::VerifyImageFiles(
mobile_apis::Result::eType MessageHelper::VerifyImage(
smart_objects::SmartObject& image,
- ApplicationConstSharedPtr app, ApplicationManager& app_mngr) {
+ ApplicationConstSharedPtr app,
+ ApplicationManager& app_mngr) {
// Checking image type first: if STATIC - skip existence check, since it is
// HMI related file and it should know it location
const uint32_t image_type = image[strings::image_type].asUInt();
@@ -2213,7 +2238,7 @@ mobile_apis::Result::eType MessageHelper::VerifyImage(
}
const std::string& file_name = image[strings::value].asString();
-
+
std::string str = file_name;
str.erase(remove(str.begin(), str.end(), ' '), str.end());
if (0 == str.size()) {
@@ -2253,12 +2278,15 @@ mobile_apis::Result::eType MessageHelper::VerifyImage(
}
mobile_apis::Result::eType MessageHelper::VerifyImageVrHelpItems(
- smart_objects::SmartObject& message, ApplicationConstSharedPtr app, ApplicationManager& app_mngr) {
+ smart_objects::SmartObject& message,
+ ApplicationConstSharedPtr app,
+ ApplicationManager& app_mngr) {
mobile_apis::Result::eType verification_result_image =
mobile_apis::Result::SUCCESS;
for (uint32_t i = 0; i < message.length(); ++i) {
if (message[i].keyExists(strings::image)) {
- verification_result_image = VerifyImage(message[i][strings::image], app, app_mngr);
+ verification_result_image =
+ VerifyImage(message[i][strings::image], app, app_mngr);
if (mobile_apis::Result::SUCCESS != verification_result_image) {
return verification_result_image;
}
@@ -2291,7 +2319,8 @@ bool CheckWithPolicy(mobile_api::SystemAction::eType system_action,
return result;
}
-mobile_apis::Result::eType MessageHelper::ProcessSoftButtons(smart_objects::SmartObject& message_params,
+mobile_apis::Result::eType MessageHelper::ProcessSoftButtons(
+ smart_objects::SmartObject& message_params,
ApplicationConstSharedPtr app,
const policy::PolicyHandlerInterface& policy_handler,
ApplicationManager& app_mngr) {
@@ -2318,7 +2347,8 @@ mobile_apis::Result::eType MessageHelper::ProcessSoftButtons(smart_objects::Smar
request_soft_buttons[i][strings::system_action].asInt();
if (!CheckWithPolicy(static_cast<SystemAction::eType>(system_action),
- app->policy_app_id(), policy_handler)) {
+ app->policy_app_id(),
+ policy_handler)) {
return Result::DISALLOWED;
}
@@ -2331,7 +2361,8 @@ mobile_apis::Result::eType MessageHelper::ProcessSoftButtons(smart_objects::Smar
if ((!request_soft_buttons[i].keyExists(strings::image) ||
(Result::SUCCESS !=
- VerifyImage(request_soft_buttons[i][strings::image], app, app_mngr)))) {
+ VerifyImage(
+ request_soft_buttons[i][strings::image], app, app_mngr)))) {
return Result::INVALID_DATA;
}
break;
@@ -2339,7 +2370,7 @@ mobile_apis::Result::eType MessageHelper::ProcessSoftButtons(smart_objects::Smar
case SoftButtonType::SBT_TEXT: {
if ((!request_soft_buttons[i].keyExists(strings::text)) ||
(!VerifySoftButtonString(
- request_soft_buttons[i][strings::text].asString()))) {
+ request_soft_buttons[i][strings::text].asString()))) {
return Result::INVALID_DATA;
}
break;
@@ -2348,13 +2379,14 @@ mobile_apis::Result::eType MessageHelper::ProcessSoftButtons(smart_objects::Smar
if ((!request_soft_buttons[i].keyExists(strings::text)) ||
((request_soft_buttons[i][strings::text].length()) &&
(!VerifySoftButtonString(
- request_soft_buttons[i][strings::text].asString())))) {
+ request_soft_buttons[i][strings::text].asString())))) {
return Result::INVALID_DATA;
}
if ((!request_soft_buttons[i].keyExists(strings::image) ||
(Result::SUCCESS !=
- VerifyImage(request_soft_buttons[i][strings::image], app, app_mngr)))) {
+ VerifyImage(
+ request_soft_buttons[i][strings::image], app, app_mngr)))) {
return Result::INVALID_DATA;
}
break;
diff --git a/src/components/application_manager/src/mobile_command_factory.cc b/src/components/application_manager/src/mobile_command_factory.cc
index dd00a80557..e9d169eaf8 100644
--- a/src/components/application_manager/src/mobile_command_factory.cc
+++ b/src/components/application_manager/src/mobile_command_factory.cc
@@ -142,211 +142,253 @@ CommandSharedPtr MobileCommandFactory::CreateCommand(
const commands::MessageSharedPtr& message,
commands::Command::CommandOrigin origin,
ApplicationManager& application_manager) {
- CommandSharedPtr command;
+ 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));
+ 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));
+ 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));
+ 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));
+ 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));
+ 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));
+ 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));
+ 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));
+ 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));
+ 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));
+ 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));
+ 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));
+ 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));
+ 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));
+ 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));
+ 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));
+ 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));
+ 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));
+ 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));
+ 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));
+ 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));
+ 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));
+ 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));
+ 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));
+ 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));
+ 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));
+ 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));
+ 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));
+ 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));
+ 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));
+ 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));
+ 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));
+ 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));
+ 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));
+ 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));
+ 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));
+ 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));
+ 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));
+ 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));
+ 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));
+ 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));
+ 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));
+ 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)) {
+ 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));
@@ -354,246 +396,301 @@ CommandSharedPtr MobileCommandFactory::CreateCommand(
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);
+ 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);
+ 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));
+ 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));
+ 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));
+ 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));
+ 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);
+ 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);
+ 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);
+ 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);
+ command = utils::MakeShared<commands::UnSubscribeWayPointsRequest>(
+ 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));
+ 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));
+ 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));
+ 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));
+ 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));
+ 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));
+ 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));
+ 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));
+ 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));
+ 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));
+ 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));
+ 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));
+ 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));
+ 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));
+ 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));
+ 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));
+ 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));
+ 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));
+ 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));
+ 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));
+ 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));
+ 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));
+ 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));
+ 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));
+ 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));
+ 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));
+ 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));
+ 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));
+ command.reset(
+ new commands::DialNumberRequest(message, application_manager));
}
break;
}
case mobile_apis::FunctionID::OnButtonEventID: {
- command.reset(new commands::mobile::OnButtonEventNotification(message, application_manager));
+ command.reset(new commands::mobile::OnButtonEventNotification(
+ message, application_manager));
break;
}
case mobile_apis::FunctionID::OnButtonPressID: {
- command.reset(new commands::mobile::OnButtonPressNotification(message, application_manager));
+ command.reset(new commands::mobile::OnButtonPressNotification(
+ message, application_manager));
break;
}
case mobile_apis::FunctionID::OnAudioPassThruID: {
- command.reset(new commands::OnAudioPassThruNotification(message, application_manager));
+ command.reset(new commands::OnAudioPassThruNotification(
+ message, application_manager));
break;
}
case mobile_apis::FunctionID::OnVehicleDataID: {
- command.reset(new commands::OnVehicleDataNotification(message, application_manager));
+ command.reset(new commands::OnVehicleDataNotification(
+ message, application_manager));
break;
}
case mobile_apis::FunctionID::OnAppInterfaceUnregisteredID: {
- command.reset(new commands::OnAppInterfaceUnregisteredNotification(message, application_manager));
+ command.reset(new commands::OnAppInterfaceUnregisteredNotification(
+ message, application_manager));
break;
}
case mobile_apis::FunctionID::OnCommandID: {
- command.reset(new commands::OnCommandNotification(message, application_manager));
+ command.reset(
+ new commands::OnCommandNotification(message, application_manager));
break;
}
case mobile_apis::FunctionID::OnTBTClientStateID: {
- command.reset(new commands::OnTBTClientStateNotification(message, application_manager));
+ command.reset(new commands::OnTBTClientStateNotification(
+ message, application_manager));
break;
}
case mobile_apis::FunctionID::OnDriverDistractionID: {
- command.reset(new commands::mobile::OnDriverDistractionNotification(message, application_manager));
+ command.reset(new commands::mobile::OnDriverDistractionNotification(
+ message, application_manager));
break;
}
case mobile_apis::FunctionID::OnLanguageChangeID: {
- command.reset(new commands::OnLanguageChangeNotification(message, application_manager));
+ command.reset(new commands::OnLanguageChangeNotification(
+ message, application_manager));
break;
}
case mobile_apis::FunctionID::OnPermissionsChangeID: {
- command.reset(new commands::OnPermissionsChangeNotification(message, application_manager));
+ 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));
+ command.reset(new commands::OnHMIStatusNotification(
+ message, application_manager));
}
break;
}
case mobile_apis::FunctionID::OnKeyboardInputID: {
- command.reset(new commands::mobile::OnKeyBoardInputNotification(message, application_manager));
+ command.reset(new commands::mobile::OnKeyBoardInputNotification(
+ message, application_manager));
break;
}
case mobile_apis::FunctionID::OnTouchEventID: {
- command.reset(new commands::mobile::OnTouchEventNotification(message, application_manager));
+ command.reset(new commands::mobile::OnTouchEventNotification(
+ message, application_manager));
break;
}
case mobile_apis::FunctionID::OnSystemRequestID: {
- command.reset(new commands::mobile::OnSystemRequestNotification(message, application_manager));
+ command.reset(new commands::mobile::OnSystemRequestNotification(
+ message, application_manager));
break;
}
case mobile_apis::FunctionID::OnHashChangeID: {
- command.reset(new commands::mobile::OnHashChangeNotification(message, application_manager));
+ command.reset(new commands::mobile::OnHashChangeNotification(
+ message, application_manager));
break;
}
case mobile_apis::FunctionID::OnWayPointChangeID: {
- command = utils::MakeShared<commands::OnWayPointChangeNotification>(message, application_manager);
+ 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));
+ command.reset(
+ new commands::GenericResponse(message, application_manager));
}
}
return command;
diff --git a/src/components/application_manager/src/policies/delegates/app_permission_delegate.cc b/src/components/application_manager/src/policies/delegates/app_permission_delegate.cc
index fa242962d4..7b5954a3c3 100644
--- a/src/components/application_manager/src/policies/delegates/app_permission_delegate.cc
+++ b/src/components/application_manager/src/policies/delegates/app_permission_delegate.cc
@@ -34,20 +34,19 @@
#include "application_manager/application_manager.h"
namespace policy {
- CREATE_LOGGERPTR_GLOBAL(logger_, "PolicyHandler")
+CREATE_LOGGERPTR_GLOBAL(logger_, "PolicyHandler")
- AppPermissionDelegate::AppPermissionDelegate(
- const uint32_t connection_key,
- const PermissionConsent& permissions,
- policy::PolicyHandlerInterface& policy_handler)
- : connection_key_(connection_key)
- , permissions_(permissions)
- , policy_handler_(policy_handler) {}
+AppPermissionDelegate::AppPermissionDelegate(
+ const uint32_t connection_key,
+ const PermissionConsent& permissions,
+ policy::PolicyHandlerInterface& policy_handler)
+ : connection_key_(connection_key)
+ , permissions_(permissions)
+ , policy_handler_(policy_handler) {}
- void AppPermissionDelegate::threadMain() {
+void AppPermissionDelegate::threadMain() {
LOG4CXX_AUTO_TRACE(logger_);
- policy_handler_.OnAppPermissionConsentInternal(connection_key_,
- permissions_);
+ policy_handler_.OnAppPermissionConsentInternal(connection_key_, permissions_);
}
void AppPermissionDelegate::exitThreadMain() {
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 819d99e065..492abe499a 100644
--- a/src/components/application_manager/src/policies/policy_event_observer.cc
+++ b/src/components/application_manager/src/policies/policy_event_observer.cc
@@ -48,7 +48,8 @@ PolicyEventObserver::PolicyEventObserver(
application_manager::event_engine::EventDispatcher& event_dispatcher)
: EventObserver(event_dispatcher), policy_handler_(policy_handler) {}
-void PolicyEventObserver::set_policy_handler(PolicyHandlerInterface* const policy_handler) {
+void PolicyEventObserver::set_policy_handler(
+ PolicyHandlerInterface* const policy_handler) {
LOG4CXX_AUTO_TRACE(logger_);
sync_primitives::AutoLock auto_lock(policy_handler_lock_);
LOG4CXX_DEBUG(logger_, "Set policy handler " << policy_handler);
@@ -68,10 +69,8 @@ void PolicyEventObserver::on_event(const event_engine::Event& event) {
ProcessOdometerEvent(message);
break;
}
- default: {
- break;
- }
- unsubscribe_from_event(hmi_apis::FunctionID::VehicleInfo_GetOdometer);
+ default: { break; }
+ unsubscribe_from_event(hmi_apis::FunctionID::VehicleInfo_GetOdometer);
#else
case hmi_apis::FunctionID::VehicleInfo_GetVehicleData: {
ProcessOdometerEvent(message);
@@ -83,23 +82,21 @@ void PolicyEventObserver::on_event(const event_engine::Event& event) {
unsubscribe_from_event(hmi_apis::FunctionID::BasicCommunication_OnReady);
break;
}
- default: {
- break;
- }
+ default: { break; }
#endif
}
}
-void PolicyEventObserver::ProcessOdometerEvent(const smart_objects::SmartObject& message) {
- if (hmi_apis::Common_Result::SUCCESS
- == static_cast<hmi_apis::Common_Result::eType>(message[strings::params][hmi_response::code]
- .asInt())) {
-
+void PolicyEventObserver::ProcessOdometerEvent(
+ const smart_objects::SmartObject& message) {
+ if (hmi_apis::Common_Result::SUCCESS ==
+ static_cast<hmi_apis::Common_Result::eType>(
+ message[strings::params][hmi_response::code].asInt())) {
if (message[strings::msg_params].keyExists(strings::odometer)) {
if (policy_handler_) {
policy_handler_->PTUpdatedAt(
- Counters::KILOMETERS,
- message[strings::msg_params][strings::odometer].asInt());
+ Counters::KILOMETERS,
+ message[strings::msg_params][strings::odometer].asInt());
}
}
}
diff --git a/src/components/application_manager/src/policies/policy_handler.cc b/src/components/application_manager/src/policies/policy_handler.cc
index 1961369d9b..c00c51dcfe 100644
--- a/src/components/application_manager/src/policies/policy_handler.cc
+++ b/src/components/application_manager/src/policies/policy_handler.cc
@@ -156,16 +156,15 @@ typedef std::set<application_manager::ApplicationSharedPtr,
struct DeactivateApplication {
explicit DeactivateApplication(
const connection_handler::DeviceHandle& device_id,
- StateController& state_ctrl)
+ StateController& state_ctrl)
: device_id_(device_id), state_ctrl_(state_ctrl) {}
void operator()(const ApplicationSharedPtr& app) {
if (device_id_ == app->device()) {
- state_ctrl_.SetRegularState(
- app,
- mobile_apis::HMILevel::HMI_NONE,
- mobile_apis::AudioStreamingState::NOT_AUDIBLE,
- true);
+ state_ctrl_.SetRegularState(app,
+ mobile_apis::HMILevel::HMI_NONE,
+ mobile_apis::AudioStreamingState::NOT_AUDIBLE,
+ true);
}
}
@@ -176,8 +175,8 @@ struct DeactivateApplication {
struct SDLAllowedNotification {
SDLAllowedNotification(const connection_handler::DeviceHandle& device_id,
- PolicyManager* policy_manager,
- StateController& state_controller)
+ PolicyManager* policy_manager,
+ StateController& state_controller)
: device_id_(device_id)
, policy_manager_(policy_manager)
, state_controller_(state_controller) {}
@@ -214,9 +213,9 @@ struct SDLAllowedNotification {
struct LinkAppToDevice {
explicit LinkAppToDevice(
std::map<std::string, std::string>& app_to_device_link,
- const ApplicationManager& application_manager)
- : app_to_device_link_(app_to_device_link),
- application_manager_(application_manager) {
+ const ApplicationManager& application_manager)
+ : app_to_device_link_(app_to_device_link)
+ , application_manager_(application_manager) {
app_to_device_link_.clear();
}
@@ -227,10 +226,9 @@ struct LinkAppToDevice {
"Skip current application.");
return;
}
- DeviceParams device_params =
- GetDeviceParams(app->device(),
- application_manager_.connection_handler()
- .get_session_observer());
+ DeviceParams device_params = GetDeviceParams(
+ app->device(),
+ application_manager_.connection_handler().get_session_observer());
const std::string app_id = app->policy_app_id();
if (device_params.device_mac_address.empty()) {
LOG4CXX_WARN(logger_,
@@ -314,9 +312,9 @@ bool PolicyHandler::LoadPolicyLibrary() {
if (!error) {
if (CreateManager()) {
policy_manager_->set_listener(this);
- event_observer_ = utils::SharedPtr<PolicyEventObserver>(
- new PolicyEventObserver(this,
- application_manager_.event_dispatcher()));
+ event_observer_ =
+ utils::SharedPtr<PolicyEventObserver>(new PolicyEventObserver(
+ this, application_manager_.event_dispatcher()));
}
} else {
LOG4CXX_ERROR(logger_, error);
@@ -325,20 +323,21 @@ bool PolicyHandler::LoadPolicyLibrary() {
return policy_manager_.valid();
}
-bool PolicyHandler::PolicyEnabled() const{
+bool PolicyHandler::PolicyEnabled() const {
return get_settings().enable_policy();
}
bool PolicyHandler::CreateManager() {
typedef PolicyManager* (*CreateManager)();
- typedef void (*DeleteManager)(PolicyManager* );
+ typedef void (*DeleteManager)(PolicyManager*);
CreateManager create_manager =
reinterpret_cast<CreateManager>(dlsym(dl_handle_, "CreateManager"));
DeleteManager delete_manager =
- reinterpret_cast<DeleteManager>(dlsym(dl_handle_, "DeleteManager"));
+ reinterpret_cast<DeleteManager>(dlsym(dl_handle_, "DeleteManager"));
char* error_string = dlerror();
if (NULL == error_string) {
- policy_manager_ = utils::SharedPtr<PolicyManager>(create_manager(), delete_manager);
+ policy_manager_ =
+ utils::SharedPtr<PolicyManager>(create_manager(), delete_manager);
} else {
LOG4CXX_WARN(logger_, error_string);
}
@@ -350,8 +349,8 @@ const PolicySettings& PolicyHandler::get_settings() const {
}
bool PolicyHandler::InitPolicyTable() {
- LOG4CXX_AUTO_TRACE(logger_);
- POLICY_LIB_CHECK(false);
+ LOG4CXX_AUTO_TRACE(logger_);
+ POLICY_LIB_CHECK(false);
// Subscribing to notification for system readiness to be able to get system
// info necessary for policy table
event_observer_->subscribe_on_event(
@@ -367,7 +366,7 @@ bool PolicyHandler::InitPolicyTable() {
bool PolicyHandler::ResetPolicyTable() {
LOG4CXX_TRACE(logger_, "Reset policy table.");
POLICY_LIB_CHECK(false);
- const std::string& preloaded_file =get_settings().preloaded_pt_file();
+ const std::string& preloaded_file = get_settings().preloaded_pt_file();
if (file_system::FileExists(preloaded_file)) {
return policy_manager_->ResetPT(preloaded_file);
}
@@ -383,7 +382,8 @@ bool PolicyHandler::ClearUserConsent() {
uint32_t PolicyHandler::GetAppIdForSending() const {
POLICY_LIB_CHECK(0);
- const ApplicationSet& accessor = application_manager_.applications().GetData();
+ const ApplicationSet& accessor =
+ application_manager_.applications().GetData();
HmiLevelOrderedApplicationList app_list(accessor.begin(), accessor.end());
LOG4CXX_INFO(logger_, "Apps size: " << app_list.size());
@@ -392,11 +392,10 @@ uint32_t PolicyHandler::GetAppIdForSending() const {
first != app_list.end();
++first) {
if ((*first)->IsRegistered()) {
- const uint32_t app_id = (*first)->app_id();
- DeviceParams device_params =
- GetDeviceParams((*first)->device(),
- application_manager_.connection_handler()
- .get_session_observer());
+ const uint32_t app_id = (*first)->app_id();
+ DeviceParams device_params = GetDeviceParams(
+ (*first)->device(),
+ application_manager_.connection_handler().get_session_observer());
if (kDeviceAllowed ==
policy_manager_->GetUserConsentForDevice(
@@ -418,14 +417,15 @@ void PolicyHandler::OnDeviceConsentChanged(const std::string& device_id,
const bool is_allowed) {
POLICY_LIB_CHECK_VOID();
connection_handler::DeviceHandle device_handle;
- application_manager_.connection_handler().GetDeviceID(
- device_id, &device_handle);
+ application_manager_.connection_handler().GetDeviceID(device_id,
+ &device_handle);
// In case of changed consent for device, related applications will be
// limited to pre_DataConsent permissions, if device disallowed, or switch
// back to their own permissions, if device allowed again, and must be
// notified about these changes
- const ApplicationSet& accessor = application_manager_.applications().GetData();
+ const ApplicationSet& accessor =
+ application_manager_.applications().GetData();
ApplicationSetConstIt it_app_list = accessor.begin();
ApplicationSetConstIt it_app_list_end = accessor.end();
for (; it_app_list != it_app_list_end; ++it_app_list) {
@@ -453,24 +453,25 @@ void PolicyHandler::SendOnAppPermissionsChanged(
"PolicyHandler::SendOnAppPermissionsChanged for "
<< policy_app_id);
ApplicationSharedPtr app =
- application_manager_.application_by_policy_id(
- policy_app_id);
+ application_manager_.application_by_policy_id(policy_app_id);
if (!app.valid()) {
LOG4CXX_WARN(logger_, "No app found for policy app id = " << policy_app_id);
return;
}
- MessageHelper::SendOnAppPermissionsChangedNotification(app->app_id(),
- permissions, application_manager_);
+ MessageHelper::SendOnAppPermissionsChangedNotification(
+ app->app_id(), permissions, application_manager_);
}
void PolicyHandler::OnPTExchangeNeeded() {
POLICY_LIB_CHECK_VOID();
- MessageHelper::SendOnStatusUpdate(policy_manager_->ForcePTExchange(), application_manager_);
+ MessageHelper::SendOnStatusUpdate(policy_manager_->ForcePTExchange(),
+ application_manager_);
}
void PolicyHandler::GetAvailableApps(std::queue<std::string>& apps) {
LOG4CXX_INFO(logger_, "GetAvailable apps");
- const ApplicationSet& app_list = application_manager_.applications().GetData();
+ const ApplicationSet& app_list =
+ application_manager_.applications().GetData();
ApplicationSetConstIt iter = app_list.begin();
for (; app_list.end() != iter; ++iter) {
@@ -503,15 +504,13 @@ void PolicyHandler::OnAppPermissionConsentInternal(
LOG4CXX_AUTO_TRACE(logger_);
POLICY_LIB_CHECK_VOID();
if (connection_key) {
- ApplicationSharedPtr app =
- application_manager_.application(connection_key);
+ ApplicationSharedPtr app = application_manager_.application(connection_key);
if (app.valid()) {
permissions.policy_app_id = app->policy_app_id();
- DeviceParams device_params =
- GetDeviceParams(app->device(),
- application_manager_.connection_handler()
- .get_session_observer());
+ DeviceParams device_params = GetDeviceParams(
+ app->device(),
+ application_manager_.connection_handler().get_session_observer());
permissions.device_id = device_params.device_mac_address;
}
@@ -548,10 +547,9 @@ void PolicyHandler::OnAppPermissionConsentInternal(
continue;
}
- DeviceParams device_params =
- GetDeviceParams(app->device(),
- application_manager_.connection_handler()
- .get_session_observer());
+ DeviceParams device_params = GetDeviceParams(
+ app->device(),
+ application_manager_.connection_handler().get_session_observer());
if (device_params.device_mac_address != it->second) {
LOG4CXX_WARN(logger_,
@@ -590,7 +588,8 @@ void PolicyHandler::OnGetUserFriendlyMessage(
std::vector<UserFriendlyMessage> result =
policy_manager_->GetUserFriendlyMessages(message_codes, language);
// Send response to HMI with gathered data
- MessageHelper::SendGetUserFriendlyMessageResponse(result, correlation_id, application_manager_);
+ MessageHelper::SendGetUserFriendlyMessageResponse(
+ result, correlation_id, application_manager_);
}
void PolicyHandler::OnGetListOfPermissions(const uint32_t connection_key,
@@ -602,7 +601,8 @@ void PolicyHandler::OnGetListOfPermissions(const uint32_t connection_key,
if (!connection_key) {
sync_primitives::AutoLock lock(app_to_device_link_lock_);
LinkAppToDevice linker(app_to_device_link_, application_manager_);
- const ApplicationSet& accessor = application_manager_.applications().GetData();
+ const ApplicationSet& accessor =
+ application_manager_.applications().GetData();
ApplicationSetConstIt it_app = accessor.begin();
ApplicationSetConstIt it_app_end = accessor.end();
@@ -620,7 +620,9 @@ void PolicyHandler::OnGetListOfPermissions(const uint32_t connection_key,
}
MessageHelper::SendGetListOfPermissionsResponse(
- consolidator.GetConsolidatedPermissions(), correlation_id, application_manager_);
+ consolidator.GetConsolidatedPermissions(),
+ correlation_id,
+ application_manager_);
return;
}
@@ -637,10 +639,9 @@ void PolicyHandler::OnGetListOfPermissions(const uint32_t connection_key,
return;
}
- DeviceParams device_params =
- GetDeviceParams(app->device(),
- application_manager_.connection_handler()
- .get_session_observer());
+ DeviceParams device_params = GetDeviceParams(
+ app->device(),
+ application_manager_.connection_handler().get_session_observer());
std::vector<FunctionalGroupPermission> group_permissions;
if (device_params.device_mac_address.empty()) {
@@ -652,8 +653,8 @@ void PolicyHandler::OnGetListOfPermissions(const uint32_t connection_key,
app->policy_app_id(),
group_permissions);
- MessageHelper::SendGetListOfPermissionsResponse(group_permissions,
- correlation_id, application_manager_);
+ MessageHelper::SendGetListOfPermissionsResponse(
+ group_permissions, correlation_id, application_manager_);
}
}
@@ -661,7 +662,9 @@ void PolicyHandler::OnGetStatusUpdate(const uint32_t correlation_id) {
LOG4CXX_AUTO_TRACE(logger_);
POLICY_LIB_CHECK_VOID();
MessageHelper::SendGetStatusUpdateResponse(
- policy_manager_->GetPolicyTableStatus(), correlation_id, application_manager_);
+ policy_manager_->GetPolicyTableStatus(),
+ correlation_id,
+ application_manager_);
}
void PolicyHandler::OnUpdateStatusChanged(const std::string& status) {
@@ -673,8 +676,7 @@ std::string PolicyHandler::OnCurrentDeviceIdUpdateRequired(
const std::string& policy_app_id) {
LOG4CXX_AUTO_TRACE(logger_);
ApplicationSharedPtr app =
- application_manager_.application_by_policy_id(
- policy_app_id);
+ application_manager_.application_by_policy_id(policy_app_id);
if (!app.valid()) {
LOG4CXX_WARN(logger_,
@@ -684,10 +686,9 @@ std::string PolicyHandler::OnCurrentDeviceIdUpdateRequired(
"not found within registered applications.");
return "";
}
- DeviceParams device_params =
- GetDeviceParams(app->device(),
- application_manager_.connection_handler()
- .get_session_observer());
+ DeviceParams device_params = GetDeviceParams(
+ app->device(),
+ application_manager_.connection_handler().get_session_observer());
return device_params.device_mac_address;
}
@@ -714,12 +715,14 @@ void PolicyHandler::OnSystemInfoUpdateRequired() {
void PolicyHandler::OnVIIsReady() {
LOG4CXX_AUTO_TRACE(logger_);
- const uint32_t correlation_id = application_manager_.GetNextHMICorrelationID();
+ const uint32_t correlation_id =
+ application_manager_.GetNextHMICorrelationID();
std::vector<std::string> params;
params.push_back(strings::vin);
- MessageHelper::CreateGetVehicleDataRequest(correlation_id, params, application_manager_);
+ MessageHelper::CreateGetVehicleDataRequest(
+ correlation_id, params, application_manager_);
}
void PolicyHandler::OnVehicleDataUpdated(
@@ -733,8 +736,8 @@ void PolicyHandler::OnPendingPermissionChange(
"PolicyHandler::OnPendingPermissionChange for "
<< policy_app_id);
POLICY_LIB_CHECK_VOID();
- ApplicationSharedPtr app = application_manager_.application_by_policy_id(
- policy_app_id);
+ ApplicationSharedPtr app =
+ application_manager_.application_by_policy_id(policy_app_id);
if (!app.valid()) {
LOG4CXX_WARN(logger_,
"No app found for " << policy_app_id << " policy app id.");
@@ -764,8 +767,8 @@ void PolicyHandler::OnPendingPermissionChange(
case mobile_apis::HMILevel::eType::HMI_FULL:
case mobile_apis::HMILevel::eType::HMI_LIMITED: {
if (permissions.appPermissionsConsentNeeded) {
- MessageHelper::SendOnAppPermissionsChangedNotification(app->app_id(),
- permissions, application_manager_);
+ MessageHelper::SendOnAppPermissionsChangedNotification(
+ app->app_id(), permissions, application_manager_);
policy_manager_->RemovePendingPermissionChanges(policy_app_id);
// "Break" statement has to be here to continue processing in case of
@@ -775,8 +778,8 @@ void PolicyHandler::OnPendingPermissionChange(
}
case mobile_apis::HMILevel::eType::HMI_BACKGROUND: {
if (permissions.isAppPermissionsRevoked) {
- MessageHelper::SendOnAppPermissionsChangedNotification(app->app_id(),
- permissions, application_manager_);
+ MessageHelper::SendOnAppPermissionsChangedNotification(
+ app->app_id(), permissions, application_manager_);
policy_manager_->RemovePendingPermissionChanges(policy_app_id);
}
@@ -789,12 +792,14 @@ void PolicyHandler::OnPendingPermissionChange(
if (permissions.appUnauthorized) {
if (mobile_apis::HMILevel::HMI_FULL == app_hmi_level ||
mobile_apis::HMILevel::HMI_LIMITED == app_hmi_level) {
- MessageHelper::SendOnAppPermissionsChangedNotification(app->app_id(),
- permissions, application_manager_);
+ MessageHelper::SendOnAppPermissionsChangedNotification(
+ app->app_id(), permissions, application_manager_);
}
- application_manager_.ManageMobileCommand(MessageHelper::GetOnAppInterfaceUnregisteredNotificationToMobile(
- app->app_id(),
- mobile_api::AppInterfaceUnregisteredReason::APP_UNAUTHORIZED), commands::Command::ORIGIN_SDL);
+ application_manager_.ManageMobileCommand(
+ MessageHelper::GetOnAppInterfaceUnregisteredNotificationToMobile(
+ app->app_id(),
+ mobile_api::AppInterfaceUnregisteredReason::APP_UNAUTHORIZED),
+ commands::Command::ORIGIN_SDL);
application_manager_.OnAppUnauthorized(app->app_id());
@@ -802,8 +807,8 @@ void PolicyHandler::OnPendingPermissionChange(
}
if (permissions.requestTypeChanged) {
- MessageHelper::SendOnAppPermissionsChangedNotification(app->app_id(),
- permissions, application_manager_);
+ MessageHelper::SendOnAppPermissionsChangedNotification(
+ app->app_id(), permissions, application_manager_);
policy_manager_->RemovePendingPermissionChanges(policy_app_id);
}
}
@@ -842,7 +847,8 @@ bool PolicyHandler::SendMessageToSDK(const BinaryMessage& pt_string,
"Update url is " << url << " for application "
"with connection key " << app_id);
- MessageHelper::SendPolicySnapshotNotification(app_id, pt_string, url, application_manager_);
+ MessageHelper::SendPolicySnapshotNotification(
+ app_id, pt_string, url, application_manager_);
return true;
}
@@ -869,8 +875,8 @@ bool PolicyHandler::ReceiveMessageFromSDK(const std::string& file,
);
std::vector<std::string> vehicle_data_args;
vehicle_data_args.push_back(strings::odometer);
- MessageHelper::CreateGetVehicleDataRequest(correlation_id,
- vehicle_data_args , application_manager_);
+ MessageHelper::CreateGetVehicleDataRequest(
+ correlation_id, vehicle_data_args, application_manager_);
} else {
LOG4CXX_WARN(logger_, "Exchange wasn't successful, trying another one.");
OnPTExchangeNeeded();
@@ -990,7 +996,8 @@ void PolicyHandler::OnActivateApp(uint32_t connection_key,
LOG4CXX_WARN(logger_, "Application should not be activated");
}
- MessageHelper::SendSDLActivateAppResponse(permissions, correlation_id, application_manager_);
+ MessageHelper::SendSDLActivateAppResponse(
+ permissions, correlation_id, application_manager_);
}
void PolicyHandler::KmsChanged(int kilometers) {
@@ -1004,7 +1011,8 @@ void PolicyHandler::PTExchangeAtUserRequest(uint32_t correlation_id) {
LOG4CXX_TRACE(logger_, "PT exchange at user request");
POLICY_LIB_CHECK_VOID();
std::string update_status = policy_manager_->ForcePTExchange();
- MessageHelper::SendUpdateSDLResponse(update_status, correlation_id, application_manager_);
+ MessageHelper::SendUpdateSDLResponse(
+ update_status, correlation_id, application_manager_);
}
void PolicyHandler::OnPermissionsUpdated(const std::string& policy_app_id,
@@ -1013,8 +1021,8 @@ void PolicyHandler::OnPermissionsUpdated(const std::string& policy_app_id,
LOG4CXX_AUTO_TRACE(logger_);
OnPermissionsUpdated(policy_app_id, permissions);
- ApplicationSharedPtr app = application_manager_.application_by_policy_id(
- policy_app_id);
+ ApplicationSharedPtr app =
+ application_manager_.application_by_policy_id(policy_app_id);
if (!app.valid()) {
LOG4CXX_WARN(
logger_,
@@ -1046,13 +1054,11 @@ void PolicyHandler::OnPermissionsUpdated(const std::string& policy_app_id,
<< default_hmi);
if (hmi_level == mobile_apis::HMILevel::HMI_FULL) {
- application_manager_.state_controller().SetRegularState(app,
- hmi_level,
- true);
+ application_manager_.state_controller().SetRegularState(
+ app, hmi_level, true);
} else {
- application_manager_.state_controller().SetRegularState(app,
- hmi_level,
- false);
+ application_manager_.state_controller().SetRegularState(
+ app, hmi_level, false);
}
break;
}
@@ -1068,8 +1074,8 @@ void PolicyHandler::OnPermissionsUpdated(const std::string& policy_app_id,
void PolicyHandler::OnPermissionsUpdated(const std::string& policy_app_id,
const Permissions& permissions) {
LOG4CXX_AUTO_TRACE(logger_);
- ApplicationSharedPtr app = application_manager_.application_by_policy_id(
- policy_app_id);
+ ApplicationSharedPtr app =
+ application_manager_.application_by_policy_id(policy_app_id);
if (!app.valid()) {
LOG4CXX_WARN(
logger_,
@@ -1077,8 +1083,8 @@ void PolicyHandler::OnPermissionsUpdated(const std::string& policy_app_id,
return;
}
- MessageHelper::SendOnPermissionsChangeNotification(app->app_id(),
- permissions ,application_manager_);
+ MessageHelper::SendOnPermissionsChangeNotification(
+ app->app_id(), permissions, application_manager_);
LOG4CXX_DEBUG(logger_,
"Notification sent for application_id:"
@@ -1088,7 +1094,8 @@ void PolicyHandler::OnPermissionsUpdated(const std::string& policy_app_id,
bool PolicyHandler::SaveSnapshot(const BinaryMessage& pt_string,
std::string& snap_path) {
- const std::string& policy_snapshot_file_name = get_settings().policies_snapshot_file_name();
+ const std::string& policy_snapshot_file_name =
+ get_settings().policies_snapshot_file_name();
const std::string& system_files_path = get_settings().system_files_path();
snap_path = system_files_path + '/' + policy_snapshot_file_name;
@@ -1130,7 +1137,8 @@ void PolicyHandler::CheckPermissions(const PTString& app_id,
policy_manager_->CheckPermissions(app_id, hmi_level, rpc, rpc_params, result);
}
-uint32_t PolicyHandler::GetNotificationsNumber(const std::string& priority) const {
+uint32_t PolicyHandler::GetNotificationsNumber(
+ const std::string& priority) const {
POLICY_LIB_CHECK(0);
return policy_manager_->GetNotificationsNumber(priority);
}
@@ -1152,7 +1160,7 @@ bool PolicyHandler::GetInitialAppData(const std::string& application_id,
StringArray* app_hmi_types) {
POLICY_LIB_CHECK(false);
return policy_manager_->GetInitialAppData(
- application_id, nicknames, app_hmi_types);
+ application_id, nicknames, app_hmi_types);
}
void PolicyHandler::GetServiceUrls(const std::string& service_type,
@@ -1246,8 +1254,8 @@ void PolicyHandler::OnSystemError(int code) {
custom_str::CustomString PolicyHandler::GetAppName(
const std::string& policy_app_id) {
- ApplicationSharedPtr app = application_manager_.application_by_policy_id(
- policy_app_id);
+ ApplicationSharedPtr app =
+ application_manager_.application_by_policy_id(policy_app_id);
if (!app.valid()) {
LOG4CXX_WARN(
diff --git a/src/components/application_manager/src/policies/pt_exchange_handler_ext.cc b/src/components/application_manager/src/policies/pt_exchange_handler_ext.cc
index df1761ef66..e1d5199063 100644
--- a/src/components/application_manager/src/policies/pt_exchange_handler_ext.cc
+++ b/src/components/application_manager/src/policies/pt_exchange_handler_ext.cc
@@ -43,19 +43,16 @@ using application_manager::MessageHelper;
using profile::Profile;
using std::string;
-
namespace policy {
CREATE_LOGGERPTR_GLOBAL(logger_, "PolicyHandler")
PTExchangeHandlerExt::PTExchangeHandlerExt(PolicyHandler* policy_handler)
- : PTExchangeHandler(),
- policy_handler_(policy_handler) {
+ : PTExchangeHandler(), policy_handler_(policy_handler) {
DCHECK(policy_handler_);
}
-PTExchangeHandlerExt::~PTExchangeHandlerExt() {
-}
+PTExchangeHandlerExt::~PTExchangeHandlerExt() {}
void PTExchangeHandlerExt::Start() {
LOG4CXX_TRACE(logger_, "Start exchange PT");
@@ -64,17 +61,20 @@ void PTExchangeHandlerExt::Start() {
policy_handler_->get_settings().policies_snapshot_file_name();
const std::string system_files_path =
policy_handler_->get_settings().system_files_path();
- const std::string policy_snapshot_full_path = system_files_path + '/' +
- policy_snapshot_file_name;
+ const std::string policy_snapshot_full_path =
+ system_files_path + '/' + policy_snapshot_file_name;
BinaryMessageSptr pt_snapshot = policy_handler_->RequestPTUpdate();
if (pt_snapshot.valid()) {
if (file_system::CreateDirectoryRecursively(system_files_path) &&
file_system::WriteBinaryFile(policy_snapshot_full_path, *pt_snapshot)) {
- MessageHelper::SendPolicyUpdate(policy_snapshot_full_path,
- policy_handler_->TimeoutExchange(),
- policy_handler_->RetrySequenceDelaysSeconds());
+ MessageHelper::SendPolicyUpdate(
+ policy_snapshot_full_path,
+ policy_handler_->TimeoutExchange(),
+ policy_handler_->RetrySequenceDelaysSeconds());
} else {
- LOG4CXX_ERROR(logger_, "Failed to write snapshot file to " << policy_snapshot_file_name);
+ LOG4CXX_ERROR(logger_,
+ "Failed to write snapshot file to "
+ << policy_snapshot_file_name);
}
} else {
LOG4CXX_ERROR(logger_, "Failed to obtain policy table snapshot");
diff --git a/src/components/application_manager/src/request_controller.cc b/src/components/application_manager/src/request_controller.cc
index 4c014e203b..57db5f6fa1 100644
--- a/src/components/application_manager/src/request_controller.cc
+++ b/src/components/application_manager/src/request_controller.cc
@@ -71,7 +71,7 @@ void RequestController::InitializeThreadpool() {
pool_state_ = TPoolState::STARTED;
char name[50];
for (uint32_t i = 0; i < pool_size_; i++) {
- snprintf(name, sizeof(name)/sizeof(name[0]), "AM Pool %d", i);
+ snprintf(name, sizeof(name) / sizeof(name[0]), "AM Pool %d", i);
pool_.push_back(threads::CreateThread(name, new Worker(this)));
pool_[i]->start();
LOG4CXX_DEBUG(logger_, "Request thread initialized: " << name);
@@ -95,7 +95,7 @@ void RequestController::DestroyThreadpool() {
pool_.clear();
}
-RequestController::TResult RequestController::CheckPosibilitytoAdd(
+RequestController::TResult RequestController::CheckPosibilitytoAdd(
const RequestPtr request) {
LOG4CXX_AUTO_TRACE(logger_);
const uint32_t& app_hmi_level_none_time_scale =
@@ -103,16 +103,14 @@ RequestController::TResult RequestController::CheckPosibilitytoAdd(
// app_hmi_level_none_max_request_per_time_scale
const uint32_t& hmi_level_none_count =
- settings_.app_hmi_level_none_time_scale_max_requests();
+ settings_.app_hmi_level_none_time_scale_max_requests();
- const uint32_t& app_time_scale =
- settings_.app_time_scale();
+ const uint32_t& app_time_scale = settings_.app_time_scale();
const uint32_t& max_request_per_time_scale =
- settings_.app_time_scale_max_requests();
+ settings_.app_time_scale_max_requests();
- const uint32_t& pending_requests_amount =
- settings_.pending_requests_amount();
+ const uint32_t& pending_requests_amount = settings_.pending_requests_amount();
if (!CheckPendingRequestsAmount(pending_requests_amount)) {
LOG4CXX_ERROR(logger_, "Too many pending request");
@@ -120,16 +118,17 @@ RequestController::TResult RequestController::CheckPosibilitytoAdd(
}
if (!waiting_for_response_.CheckHMILevelTimeScaleMaxRequest(
- mobile_apis::HMILevel::HMI_NONE,
- request->connection_key(),
- app_hmi_level_none_time_scale,
- hmi_level_none_count)) {
+ mobile_apis::HMILevel::HMI_NONE,
+ request->connection_key(),
+ app_hmi_level_none_time_scale,
+ hmi_level_none_count)) {
LOG4CXX_ERROR(logger_, "Too many application requests in hmi level NONE");
return RequestController::NONE_HMI_LEVEL_MANY_REQUESTS;
}
- if (!waiting_for_response_.CheckTimeScaleMaxRequest(request->connection_key(),
- app_time_scale,
- max_request_per_time_scale)) {
+ if (!waiting_for_response_.CheckTimeScaleMaxRequest(
+ request->connection_key(),
+ app_time_scale,
+ max_request_per_time_scale)) {
LOG4CXX_ERROR(logger_, "Too many application requests");
return RequestController::TOO_MANY_REQUESTS;
}
@@ -144,8 +143,10 @@ bool RequestController::CheckPendingRequestsAmount(
const bool available_to_add =
pending_requests_amount > pending_requests_size;
if (!available_to_add) {
- LOG4CXX_WARN(logger_, "Pending requests count " << pending_requests_size
- << " exceed application limit " << pending_requests_amount);
+ LOG4CXX_WARN(logger_,
+ "Pending requests count " << pending_requests_size
+ << " exceed application limit "
+ << pending_requests_amount);
}
return available_to_add;
}
@@ -154,23 +155,24 @@ bool RequestController::CheckPendingRequestsAmount(
}
RequestController::TResult RequestController::addMobileRequest(
- const RequestPtr request,
- const mobile_apis::HMILevel::eType& hmi_level) {
+ const RequestPtr request, const mobile_apis::HMILevel::eType& hmi_level) {
LOG4CXX_AUTO_TRACE(logger_);
if (!request) {
LOG4CXX_ERROR(logger_, "Null Pointer request");
cond_var_.NotifyOne();
return INVALID_DATA;
}
- LOG4CXX_DEBUG(logger_, "correlation_id : " << request->correlation_id()
- << "connection_key : " << request->connection_key());
+ LOG4CXX_DEBUG(
+ logger_,
+ "correlation_id : " << request->correlation_id()
+ << "connection_key : " << request->connection_key());
RequestController::TResult result = CheckPosibilitytoAdd(request);
- if (SUCCESS ==result) {
+ if (SUCCESS == result) {
AutoLock auto_lock_list(mobile_request_list_lock_);
mobile_request_list_.push_back(request);
- LOG4CXX_DEBUG(logger_, "Waiting for execution: "
- << mobile_request_list_.size());
- // wake up one thread that is waiting for a task to be available
+ LOG4CXX_DEBUG(logger_,
+ "Waiting for execution: " << mobile_request_list_.size());
+ // wake up one thread that is waiting for a task to be available
}
cond_var_.NotifyOne();
return result;
@@ -186,16 +188,19 @@ RequestController::TResult RequestController::addHMIRequest(
}
LOG4CXX_DEBUG(logger_, " correlation_id : " << request->correlation_id());
- const uint64_t timeout_in_mseconds = static_cast<uint64_t>(request->default_timeout());
- RequestInfoPtr request_info_ptr(new HMIRequestInfo(request,
- timeout_in_mseconds));
+ const uint64_t timeout_in_mseconds =
+ static_cast<uint64_t>(request->default_timeout());
+ RequestInfoPtr request_info_ptr(
+ new HMIRequestInfo(request, timeout_in_mseconds));
if (0 == timeout_in_mseconds) {
- LOG4CXX_DEBUG (logger_, "Default timeout was set to 0."
- "RequestController will not track timeout of this request.");
+ LOG4CXX_DEBUG(logger_,
+ "Default timeout was set to 0."
+ "RequestController will not track timeout of this request.");
}
waiting_for_response_.Add(request_info_ptr);
- LOG4CXX_DEBUG(logger_, "Waiting for response count:" << waiting_for_response_.Size());
+ LOG4CXX_DEBUG(logger_,
+ "Waiting for response count:" << waiting_for_response_.Size());
UpdateTimer();
return RequestController::SUCCESS;
@@ -210,7 +215,7 @@ void RequestController::removeNotification(
const commands::Command* notification) {
LOG4CXX_AUTO_TRACE(logger_);
std::list<RequestPtr>::iterator it = notification_list_.begin();
- for (; notification_list_.end() != it; ) {
+ for (; notification_list_.end() != it;) {
if (it->get() == notification) {
notification_list_.erase(it++);
LOG4CXX_DEBUG(logger_, "Notification removed");
@@ -222,18 +227,18 @@ void RequestController::removeNotification(
LOG4CXX_DEBUG(logger_, "Cant find notification");
}
-void RequestController::terminateRequest(
- const uint32_t& correlation_id,
- const uint32_t& connection_key, bool force_terminate) {
+void RequestController::terminateRequest(const uint32_t& correlation_id,
+ const uint32_t& connection_key,
+ bool force_terminate) {
LOG4CXX_AUTO_TRACE(logger_);
- LOG4CXX_DEBUG(logger_, "correlation_id = " << correlation_id
- << " connection_key = " << connection_key
- << " force_terminate = " << force_terminate);
- RequestInfoPtr request = waiting_for_response_.Find(connection_key,
- correlation_id);
+ LOG4CXX_DEBUG(logger_,
+ "correlation_id = "
+ << correlation_id << " connection_key = " << connection_key
+ << " force_terminate = " << force_terminate);
+ RequestInfoPtr request =
+ waiting_for_response_.Find(connection_key, correlation_id);
if (request) {
- if (force_terminate ||
- request->request()->AllowedToTerminate()) {
+ if (force_terminate || request->request()->AllowedToTerminate()) {
waiting_for_response_.RemoveRequest(request);
} else {
LOG4CXX_WARN(logger_, "Request was not terminated");
@@ -244,14 +249,13 @@ void RequestController::terminateRequest(
}
}
-void RequestController::OnMobileResponse(
- const uint32_t& mobile_correlation_id,
- const uint32_t& connection_key) {
+void RequestController::OnMobileResponse(const uint32_t& mobile_correlation_id,
+ const uint32_t& connection_key) {
LOG4CXX_AUTO_TRACE(logger_);
terminateRequest(mobile_correlation_id, connection_key);
}
-void RequestController::OnHMIResponse(const uint32_t &correlation_id) {
+void RequestController::OnHMIResponse(const uint32_t& correlation_id) {
LOG4CXX_AUTO_TRACE(logger_);
terminateRequest(correlation_id, RequestInfo::HmiConnectoinKey);
}
@@ -259,39 +263,39 @@ void RequestController::OnHMIResponse(const uint32_t &correlation_id) {
void RequestController::terminateWaitingForExecutionAppRequests(
const uint32_t& app_id) {
LOG4CXX_AUTO_TRACE(logger_);
- LOG4CXX_DEBUG(logger_, "app_id: " << app_id
- << "Waiting for execution" << mobile_request_list_.size());
+ LOG4CXX_DEBUG(logger_,
+ "app_id: " << app_id << "Waiting for execution"
+ << mobile_request_list_.size());
AutoLock auto_lock(mobile_request_list_lock_);
- std::list<RequestPtr>::iterator request_it =
- mobile_request_list_.begin();
+ std::list<RequestPtr>::iterator request_it = mobile_request_list_.begin();
while (mobile_request_list_.end() != request_it) {
RequestPtr request = (*request_it);
- if ((request.valid()) && (request->connection_key() == app_id)) {
+ if ((request.valid()) && (request->connection_key() == app_id)) {
mobile_request_list_.erase(request_it++);
} else {
++request_it;
}
}
- LOG4CXX_DEBUG(logger_, "Waiting for execution "
- << mobile_request_list_.size());
+ LOG4CXX_DEBUG(logger_,
+ "Waiting for execution " << mobile_request_list_.size());
}
void RequestController::terminateWaitingForResponseAppRequests(
const uint32_t& app_id) {
LOG4CXX_AUTO_TRACE(logger_);
waiting_for_response_.RemoveByConnectionKey(app_id);
- LOG4CXX_DEBUG(logger_, "Waiting for response count : "
- << waiting_for_response_.Size());
+ LOG4CXX_DEBUG(
+ logger_, "Waiting for response count : " << waiting_for_response_.Size());
}
-void RequestController::terminateAppRequests(
- const uint32_t& app_id) {
+void RequestController::terminateAppRequests(const uint32_t& app_id) {
LOG4CXX_AUTO_TRACE(logger_);
- LOG4CXX_DEBUG(logger_, "app_id : " << app_id
- << "Requests waiting for execution count : "
- << mobile_request_list_.size()
- << "Requests waiting for response count : "
- << waiting_for_response_.Size());
+ LOG4CXX_DEBUG(logger_,
+ "app_id : " << app_id
+ << "Requests waiting for execution count : "
+ << mobile_request_list_.size()
+ << "Requests waiting for response count : "
+ << waiting_for_response_.Size());
terminateWaitingForExecutionAppRequests(app_id);
terminateWaitingForResponseAppRequests(app_id);
@@ -313,18 +317,19 @@ void RequestController::terminateAllMobileRequests() {
UpdateTimer();
}
-void RequestController::updateRequestTimeout(
- const uint32_t& app_id,
- const uint32_t& correlation_id,
- const uint32_t& new_timeout) {
+void RequestController::updateRequestTimeout(const uint32_t& app_id,
+ const uint32_t& correlation_id,
+ const uint32_t& new_timeout) {
LOG4CXX_AUTO_TRACE(logger_);
- LOG4CXX_DEBUG(logger_, "app_id : " << app_id
- << " mobile_correlation_id : " << correlation_id
- << " new_timeout : " << new_timeout);
- LOG4CXX_DEBUG(logger_, "New_timeout is NULL. RequestCtrl will "
- "not manage this request any more");
-
+ LOG4CXX_DEBUG(logger_,
+ "app_id : " << app_id
+ << " mobile_correlation_id : " << correlation_id
+ << " new_timeout : " << new_timeout);
+ LOG4CXX_DEBUG(logger_,
+ "New_timeout is NULL. RequestCtrl will "
+ "not manage this request any more");
+
RequestInfoPtr request_info =
waiting_for_response_.Find(app_id, correlation_id);
if (request_info) {
@@ -332,14 +337,15 @@ void RequestController::updateRequestTimeout(
request_info->updateTimeOut(new_timeout);
waiting_for_response_.Add(request_info);
UpdateTimer();
- LOG4CXX_INFO(logger_, "Timeout updated for "
- << " app_id: " << app_id
- << " correlation_id: " << correlation_id
- << " new_timeout (ms): " << new_timeout);
+ LOG4CXX_INFO(logger_,
+ "Timeout updated for "
+ << " app_id: " << app_id << " correlation_id: "
+ << correlation_id << " new_timeout (ms): " << new_timeout);
} else {
- LOG4CXX_ERROR(logger_, "Can't find request with "
- << " app_id: " << app_id
- << " correlation_id: " << correlation_id);
+ LOG4CXX_ERROR(logger_,
+ "Can't find request with "
+ << " app_id: " << app_id
+ << " correlation_id: " << correlation_id);
}
}
@@ -363,25 +369,28 @@ bool RequestController::IsLowVoltage() {
void RequestController::onTimer() {
LOG4CXX_AUTO_TRACE(logger_);
- LOG4CXX_DEBUG(logger_, "ENTER Waiting fore response count: "
- << waiting_for_response_.Size());
+ LOG4CXX_DEBUG(
+ logger_,
+ "ENTER Waiting fore response count: " << waiting_for_response_.Size());
RequestInfoPtr probably_expired =
waiting_for_response_.FrontWithNotNullTimeout();
while (probably_expired && probably_expired->isExpired()) {
- LOG4CXX_INFO(logger_, "Timeout for "
- << (RequestInfo::HMIRequest
- == probably_expired ->requst_type() ? "HMI": "Mobile")
- << " request id: "
- << probably_expired ->requestId()
- << " connection_key: " <<
- probably_expired ->app_id() << " is expired");
+ LOG4CXX_INFO(logger_,
+ "Timeout for "
+ << (RequestInfo::HMIRequest ==
+ probably_expired->requst_type()
+ ? "HMI"
+ : "Mobile")
+ << " request id: " << probably_expired->requestId()
+ << " connection_key: " << probably_expired->app_id()
+ << " is expired");
const uint32_t experied_request_id = probably_expired->requestId();
const uint32_t experied_app_id = probably_expired->app_id();
probably_expired->request()->onTimeOut();
- if (RequestInfo::HmiConnectoinKey == probably_expired ->app_id()) {
- LOG4CXX_DEBUG(logger_, "Erase HMI request: "
- << probably_expired ->requestId());
+ if (RequestInfo::HmiConnectoinKey == probably_expired->app_id()) {
+ LOG4CXX_DEBUG(logger_,
+ "Erase HMI request: " << probably_expired->requestId());
waiting_for_response_.RemoveRequest(probably_expired);
}
probably_expired = waiting_for_response_.FrontWithNotNullTimeout();
@@ -394,17 +403,15 @@ void RequestController::onTimer() {
}
}
UpdateTimer();
- LOG4CXX_DEBUG(logger_, "EXIT Waiting for response count : "
- << waiting_for_response_.Size());
+ LOG4CXX_DEBUG(
+ logger_,
+ "EXIT Waiting for response count : " << waiting_for_response_.Size());
}
RequestController::Worker::Worker(RequestController* requestController)
- : request_controller_(requestController)
- , stop_flag_(false) {
-}
+ : request_controller_(requestController), stop_flag_(false) {}
-RequestController::Worker::~Worker() {
-}
+RequestController::Worker::~Worker() {}
void RequestController::Worker::threadMain() {
LOG4CXX_AUTO_TRACE(logger_);
@@ -432,15 +439,15 @@ void RequestController::Worker::threadMain() {
break;
}
- RequestPtr request_ptr( request_controller_->mobile_request_list_.front());
- request_controller_->mobile_request_list_.pop_front();
+ RequestPtr request_ptr(request_controller_->mobile_request_list_.front());
+ request_controller_->mobile_request_list_.pop_front();
bool init_res = request_ptr->Init(); // to setup specific
- // default timeout
+ // default timeout
const uint32_t timeout_in_mseconds = request_ptr->default_timeout();
- RequestInfoPtr request_info_ptr(new MobileRequestInfo(request_ptr,
- timeout_in_mseconds));
+ RequestInfoPtr request_info_ptr(
+ new MobileRequestInfo(request_ptr, timeout_in_mseconds));
request_controller_->waiting_for_response_.Add(request_info_ptr);
LOG4CXX_DEBUG(logger_, "timeout_in_mseconds " << timeout_in_mseconds);
@@ -448,7 +455,8 @@ void RequestController::Worker::threadMain() {
if (0 != timeout_in_mseconds) {
request_controller_->UpdateTimer();
} else {
- LOG4CXX_DEBUG(logger_, "Default timeout was set to 0. "
+ LOG4CXX_DEBUG(logger_,
+ "Default timeout was set to 0. "
"RequestController will not track timeout "
"of this request.");
}
@@ -458,9 +466,10 @@ void RequestController::Worker::threadMain() {
// execute
if ((false == request_controller_->IsLowVoltage()) &&
request_ptr->CheckPermissions() && init_res) {
- LOG4CXX_DEBUG(logger_, "Execute MobileRequest corr_id = "
- << request_info_ptr->requestId()
- << " with timeout: " << timeout_in_mseconds);
+ LOG4CXX_DEBUG(logger_,
+ "Execute MobileRequest corr_id = "
+ << request_info_ptr->requestId()
+ << " with timeout: " << timeout_in_mseconds);
request_ptr->Run();
}
}
@@ -482,22 +491,25 @@ void RequestController::UpdateTimer() {
TimevalStruct end_time = front->end_time();
date_time::DateTime::AddMilliseconds(end_time, delay_time);
if (current_time < end_time) {
- const uint32_t msecs =static_cast<uint32_t>(date_time::DateTime::getmSecs(end_time - current_time) );
- LOG4CXX_DEBUG(logger_, "Sleep for " << msecs << " millisecs" );
+ const uint32_t msecs = static_cast<uint32_t>(
+ date_time::DateTime::getmSecs(end_time - current_time));
+ LOG4CXX_DEBUG(logger_, "Sleep for " << msecs << " millisecs");
// Timeout for bigger than 5 minutes is a mistake
timer_.Start(msecs, true);
} else {
- LOG4CXX_WARN(logger_, "Request app_id: " << front->app_id()
- << " correlation_id: " << front->requestId()
- << " is expired. "
- << "End time (ms): "
- << date_time::DateTime::getmSecs(end_time)
- << " Current time (ms): "
- << date_time::DateTime::getmSecs(current_time)
- << " Diff (current - end) (ms): "
- << date_time::DateTime::getmSecs(current_time - end_time)
- << " Request timeout (sec): "
- << front->timeout_msec()/date_time::DateTime::MILLISECONDS_IN_SECOND);
+ LOG4CXX_WARN(
+ logger_,
+ "Request app_id: "
+ << front->app_id() << " correlation_id: " << front->requestId()
+ << " is expired. "
+ << "End time (ms): " << date_time::DateTime::getmSecs(end_time)
+ << " Current time (ms): "
+ << date_time::DateTime::getmSecs(current_time)
+ << " Diff (current - end) (ms): "
+ << date_time::DateTime::getmSecs(current_time - end_time)
+ << " Request timeout (sec): "
+ << front->timeout_msec() /
+ date_time::DateTime::MILLISECONDS_IN_SECOND);
timer_.Start(0u, true);
}
}
diff --git a/src/components/application_manager/src/resumption/resume_ctrl.cc b/src/components/application_manager/src/resumption/resume_ctrl.cc
index 02440b13a6..608ec29167 100644
--- a/src/components/application_manager/src/resumption/resume_ctrl.cc
+++ b/src/components/application_manager/src/resumption/resume_ctrl.cc
@@ -56,8 +56,8 @@ using namespace application_manager;
CREATE_LOGGERPTR_GLOBAL(logger_, "Resumption")
ResumeCtrl::ResumeCtrl(ApplicationManager& application_manager)
- : event_engine::EventObserver(application_manager.event_dispatcher()),
- queue_lock_(false)
+ : event_engine::EventObserver(application_manager.event_dispatcher())
+ , queue_lock_(false)
, restore_hmi_level_timer_(
"RsmCtrlRstore",
new timer::TimerTaskImpl<ResumeCtrl>(
@@ -103,16 +103,17 @@ bool ResumeCtrl::Init(resumption::LastState& last_state) {
db->UpdateDBVersion();
}
} else {
- resumption_storage_.reset(new ResumptionDataJson(last_state,
- application_manager_));
+ resumption_storage_.reset(
+ new ResumptionDataJson(last_state, application_manager_));
if (!resumption_storage_->Init()) {
- LOG4CXX_DEBUG(logger_, "Resumption storage initialisation failed");
- return false;
+ LOG4CXX_DEBUG(logger_, "Resumption storage initialisation failed");
+ return false;
}
}
LoadResumeData();
save_persistent_data_timer_.Start(
- application_manager_.get_settings().app_resumption_save_persistent_data_timeout(),
+ application_manager_.get_settings()
+ .app_resumption_save_persistent_data_timeout(),
true);
return true;
}
@@ -213,14 +214,13 @@ bool ResumeCtrl::SetAppHMIState(ApplicationSharedPtr application,
using namespace mobile_apis;
LOG4CXX_AUTO_TRACE(logger_);
DCHECK_OR_RETURN(application, false);
- LOG4CXX_TRACE(
- logger_,
- " app_id : " << application->app_id() << ", hmi_level : " << hmi_level
- << ", check_policy : "
- << check_policy);
+ LOG4CXX_TRACE(logger_,
+ " app_id : " << application->app_id()
+ << ", hmi_level : " << hmi_level
+ << ", check_policy : " << check_policy);
const std::string& device_mac = application->mac_address();
if (check_policy &&
- application_manager_.GetUserConsentForDevice(device_mac) !=
+ application_manager_.GetUserConsentForDevice(device_mac) !=
policy::DeviceConsent::kDeviceAllowed) {
LOG4CXX_ERROR(logger_, "Resumption abort. Data consent wasn't allowed.");
SetupDefaultHMILevel(application);
@@ -231,8 +231,7 @@ bool ResumeCtrl::SetAppHMIState(ApplicationSharedPtr application,
hmi_level);
LOG4CXX_INFO(logger_,
"Application with policy id " << application->policy_app_id()
- << " got HMI level "
- << hmi_level);
+ << " got HMI level " << hmi_level);
return true;
}
@@ -277,7 +276,9 @@ void ResumeCtrl::StartSavePersistentDataTimer() {
LOG4CXX_AUTO_TRACE(logger_);
if (!save_persistent_data_timer_.is_running()) {
save_persistent_data_timer_.Start(
- application_manager_.get_settings().app_resumption_save_persistent_data_timeout(), true);
+ application_manager_.get_settings()
+ .app_resumption_save_persistent_data_timeout(),
+ true);
}
}
@@ -292,20 +293,17 @@ bool ResumeCtrl::StartResumption(ApplicationSharedPtr application,
const std::string& hash) {
LOG4CXX_AUTO_TRACE(logger_);
DCHECK_OR_RETURN(application, false);
- LOG4CXX_DEBUG(logger_,
- " Resume app_id = " << application->app_id() << " hmi_app_id = "
- << application->hmi_app_id()
- << " policy_id = "
- << application->policy_app_id()
- << " received hash = "
- << hash);
+ LOG4CXX_DEBUG(
+ logger_,
+ " Resume app_id = " << application->app_id()
+ << " hmi_app_id = " << application->hmi_app_id()
+ << " policy_id = " << application->policy_app_id()
+ << " received hash = " << hash);
SetupDefaultHMILevel(application);
smart_objects::SmartObject saved_app;
const std::string& device_mac = application->mac_address();
bool result = resumption_storage_->GetSavedApplication(
- application->policy_app_id(),
- device_mac,
- saved_app);
+ application->policy_app_id(), device_mac, saved_app);
if (result) {
const std::string& saved_hash = saved_app[strings::hash_id].asString();
result = saved_hash == hash ? RestoreApplicationData(application) : false;
@@ -324,18 +322,14 @@ bool ResumeCtrl::StartResumptionOnlyHMILevel(ApplicationSharedPtr application) {
}
LOG4CXX_DEBUG(logger_,
"HMI level resumption requested for application id "
- << application->app_id()
- << "with hmi_app_id "
- << application->hmi_app_id()
- << ", policy_app_id "
+ << application->app_id() << "with hmi_app_id "
+ << application->hmi_app_id() << ", policy_app_id "
<< application->policy_app_id());
SetupDefaultHMILevel(application);
const std::string& device_mac = application->mac_address();
smart_objects::SmartObject saved_app;
bool result = resumption_storage_->GetSavedApplication(
- application->policy_app_id(),
- device_mac,
- saved_app);
+ application->policy_app_id(), device_mac, saved_app);
if (result) {
// sync_primitives::AutoUnlock unlock(lock);
AddToResumptionTimerQueue(application->app_id());
@@ -351,9 +345,7 @@ void ResumeCtrl::StartAppHmiStateResumption(ApplicationSharedPtr application) {
smart_objects::SmartObject saved_app;
const std::string& device_mac = application->mac_address();
bool result = resumption_storage_->GetSavedApplication(
- application->policy_app_id(),
- device_mac,
- saved_app);
+ application->policy_app_id(), device_mac, saved_app);
DCHECK_OR_RETURN_VOID(result);
const uint32_t ign_off_count = saved_app[strings::ign_off_count].asUInt();
bool restore_data_allowed = false;
@@ -387,9 +379,7 @@ bool ResumeCtrl::CheckPersistenceFilesForResumption(
smart_objects::SmartObject saved_app;
const std::string& device_mac = application->mac_address();
bool result = resumption_storage_->GetSavedApplication(
- application->policy_app_id(),
- device_mac,
- saved_app);
+ application->policy_app_id(), device_mac, saved_app);
if (result) {
if (!CheckIcons(application, saved_app[strings::application_commands])) {
return false;
@@ -410,9 +400,7 @@ bool ResumeCtrl::CheckApplicationHash(ApplicationSharedPtr application,
smart_objects::SmartObject saved_app;
const std::string& device_mac = application->mac_address();
bool result = resumption_storage_->GetSavedApplication(
- application->policy_app_id(),
- device_mac,
- saved_app);
+ application->policy_app_id(), device_mac, saved_app);
return result ? saved_app[strings::hash_id].asString() == hash : false;
}
@@ -447,9 +435,7 @@ bool ResumeCtrl::RestoreApplicationData(ApplicationSharedPtr application) {
smart_objects::SmartObject saved_app(smart_objects::SmartType_Map);
const std::string& device_mac = application->mac_address();
bool result = resumption_storage_->GetSavedApplication(
- application->policy_app_id(),
- device_mac,
- saved_app);
+ application->policy_app_id(), device_mac, saved_app);
if (result) {
if (saved_app.keyExists(strings::grammar_id)) {
const uint32_t app_grammar_id = saved_app[strings::grammar_id].asUInt();
@@ -512,8 +498,8 @@ void ResumeCtrl::AddSubmenues(ApplicationSharedPtr application,
const smart_objects::SmartObject& submenu = app_submenus[i];
application->AddSubMenu(submenu[strings::menu_id].asUInt(), submenu);
}
- ProcessHMIRequests(
- MessageHelper::CreateAddSubMenuRequestToHMI(application, application_manager_.GetNextHMICorrelationID()));
+ ProcessHMIRequests(MessageHelper::CreateAddSubMenuRequestToHMI(
+ application, application_manager_.GetNextHMICorrelationID()));
} else {
LOG4CXX_FATAL(logger_, "application_submenus section is not exists");
}
@@ -531,8 +517,8 @@ void ResumeCtrl::AddCommands(ApplicationSharedPtr application,
application->AddCommand(command[strings::cmd_id].asUInt(), command);
}
- ProcessHMIRequests(
- MessageHelper::CreateAddCommandRequestToHMI(application, application_manager_));
+ ProcessHMIRequests(MessageHelper::CreateAddCommandRequestToHMI(
+ application, application_manager_));
} else {
LOG4CXX_FATAL(logger_, "application_commands section is not exists");
}
@@ -551,8 +537,8 @@ void ResumeCtrl::AddChoicesets(ApplicationSharedPtr application,
choice_set[strings::interaction_choice_set_id].asInt();
application->AddChoiceSet(choice_set_id, choice_set);
}
- ProcessHMIRequests(
- MessageHelper::CreateAddVRCommandRequestFromChoiceToHMI(application, application_manager_));
+ ProcessHMIRequests(MessageHelper::CreateAddVRCommandRequestFromChoiceToHMI(
+ application, application_manager_));
} else {
LOG4CXX_FATAL(logger_, "There is no any choicesets");
}
@@ -571,8 +557,9 @@ void ResumeCtrl::SetGlobalProperties(
}
}
-void ResumeCtrl::AddWayPointsSubscription(app_mngr::ApplicationSharedPtr application,
- const smart_objects::SmartObject& saved_app) {
+void ResumeCtrl::AddWayPointsSubscription(
+ app_mngr::ApplicationSharedPtr application,
+ const smart_objects::SmartObject& saved_app) {
LOG4CXX_AUTO_TRACE(logger_);
if (saved_app.keyExists(strings::subscribed_for_way_points)) {
@@ -601,7 +588,8 @@ void ResumeCtrl::AddSubscriptions(ApplicationSharedPtr application,
application->SubscribeToButton(btn);
}
}
- MessageHelper::SendAllOnButtonSubscriptionNotificationsForApp(application, application_manager_);
+ MessageHelper::SendAllOnButtonSubscriptionNotificationsForApp(
+ application, application_manager_);
if (subscribtions.keyExists(strings::application_vehicle_info)) {
const smart_objects::SmartObject& subscribtions_ivi =
@@ -611,8 +599,8 @@ void ResumeCtrl::AddSubscriptions(ApplicationSharedPtr application,
ivi = static_cast<VehicleDataType>((subscribtions_ivi[i]).asInt());
application->SubscribeToIVI(ivi);
}
- ProcessHMIRequests(
- MessageHelper::GetIVISubscriptionRequests(application, application_manager_));
+ ProcessHMIRequests(MessageHelper::GetIVISubscriptionRequests(
+ application, application_manager_));
}
}
}
@@ -647,11 +635,11 @@ bool ResumeCtrl::DisconnectedJustBeforeIgnOff(
const uint32_t sec_spent_before_ign = labs(ign_off_time - time_stamp);
LOG4CXX_DEBUG(
logger_,
- "ign_off_time " << ign_off_time << "; app_disconnect_time " << time_stamp
- << "; sec_spent_before_ign "
- << sec_spent_before_ign
- << "; resumption_delay_before_ign "
- << application_manager_.get_settings().resumption_delay_before_ign());
+ "ign_off_time "
+ << ign_off_time << "; app_disconnect_time " << time_stamp
+ << "; sec_spent_before_ign " << sec_spent_before_ign
+ << "; resumption_delay_before_ign "
+ << application_manager_.get_settings().resumption_delay_before_ign());
return sec_spent_before_ign <=
application_manager_.get_settings().resumption_delay_before_ign();
}
@@ -673,8 +661,7 @@ bool ResumeCtrl::CheckAppRestrictions(
: false;
LOG4CXX_DEBUG(logger_,
"is_media_app " << is_media_app << "; hmi_level " << hmi_level
- << " result "
- << result);
+ << " result " << result);
return result;
}
@@ -693,13 +680,12 @@ bool ResumeCtrl::CheckDelayAfterIgnOn() {
const time_t curr_time = time(NULL);
const time_t sdl_launch_time = launch_time();
const uint32_t seconds_from_sdl_start = labs(curr_time - sdl_launch_time);
- const uint32_t wait_time = application_manager_.get_settings().resumption_delay_after_ign();
+ const uint32_t wait_time =
+ application_manager_.get_settings().resumption_delay_after_ign();
LOG4CXX_DEBUG(logger_,
"curr_time " << curr_time << "; sdl_launch_time "
- << sdl_launch_time
- << "; seconds_from_sdl_start "
- << seconds_from_sdl_start
- << "; wait_time "
+ << sdl_launch_time << "; seconds_from_sdl_start "
+ << seconds_from_sdl_start << "; wait_time "
<< wait_time);
return seconds_from_sdl_start <= wait_time;
}
@@ -767,9 +753,10 @@ void ResumeCtrl::LoadResumeData() {
const std::string device_id = application[strings::device_id].asString();
const std::string app_id = application[strings::app_id].asString();
LOG4CXX_INFO(logger_, "Data resumption is expired.");
- LOG4CXX_DEBUG(logger_, "Resumption data for application " << app_id
- << " and device id " << device_id
- << " will be dropped.");
+ LOG4CXX_DEBUG(logger_,
+ "Resumption data for application "
+ << app_id << " and device id " << device_id
+ << " will be dropped.");
resumption_storage_->DropAppDataResumption(device_id, app_id);
continue;
}
@@ -777,10 +764,12 @@ void ResumeCtrl::LoadResumeData() {
}
void ResumeCtrl::OnAppRegistrationStart(const std::string& policy_app_id,
- const std::string& device_id) {
+ const std::string& device_id) {
LOG4CXX_AUTO_TRACE(logger_);
if (IsApplicationSaved(policy_app_id, device_id)) {
- LOG4CXX_INFO(logger_, "Application is found in resumption "
+ LOG4CXX_INFO(
+ logger_,
+ "Application is found in resumption "
"data and will try to resume. Stopping resume data persistent timer");
StopSavePersistentDataTimer();
}
@@ -797,6 +786,4 @@ bool ResumeCtrl::IsAppDataResumptionExpired(
return max_ign_off_count <= application[strings::ign_off_count].asInt();
}
-
-
} // 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 f7332a796d..a44a22425b 100644
--- a/src/components/application_manager/src/resumption/resumption_data.cc
+++ b/src/components/application_manager/src/resumption/resumption_data.cc
@@ -40,7 +40,8 @@ namespace resumption {
CREATE_LOGGERPTR_GLOBAL(logger_, "Resumption")
-ResumptionData::ResumptionData(const application_manager::ApplicationManager& application_manager)
+ResumptionData::ResumptionData(
+ const application_manager::ApplicationManager& application_manager)
: resumption_lock_(true), application_manager_(application_manager) {}
smart_objects::SmartObject ResumptionData::GetApplicationCommands(
@@ -68,8 +69,8 @@ smart_objects::SmartObject ResumptionData::GetApplicationSubMenus(
LOG4CXX_AUTO_TRACE(logger_);
DCHECK(application.get());
- smart_objects::SmartObject submenues_array = smart_objects::SmartObject(
- smart_objects::SmartType_Array);
+ smart_objects::SmartObject submenues_array =
+ smart_objects::SmartObject(smart_objects::SmartType_Array);
if (!application) {
LOG4CXX_ERROR(logger_, "NULL Pointer App");
@@ -78,14 +79,14 @@ smart_objects::SmartObject ResumptionData::GetApplicationSubMenus(
const DataAccessor<SubMenuMap> accessor = application->sub_menu_map();
const SubMenuMap& sub_menus = accessor.GetData();
SubMenuMap::const_iterator it = sub_menus.begin();
- for (int i = 0;it != sub_menus.end(); ++it, ++i) {
+ for (int i = 0; it != sub_menus.end(); ++it, ++i) {
submenues_array[i] = *(it->second);
}
return submenues_array;
}
smart_objects::SmartObject ResumptionData::GetApplicationInteractionChoiseSets(
- app_mngr::ApplicationConstSharedPtr application) const {
+ app_mngr::ApplicationConstSharedPtr application) const {
using namespace app_mngr;
LOG4CXX_AUTO_TRACE(logger_);
@@ -93,9 +94,9 @@ smart_objects::SmartObject ResumptionData::GetApplicationInteractionChoiseSets(
smart_objects::SmartObject interaction_choice_set_array =
smart_objects::SmartObject(smart_objects::SmartType_Array);
if (!application) {
- LOG4CXX_ERROR(logger_, "NULL Pointer App");
- return interaction_choice_set_array;
- }
+ LOG4CXX_ERROR(logger_, "NULL Pointer App");
+ return interaction_choice_set_array;
+ }
const DataAccessor<ChoiceSetMap> accessor = application->choice_set_map();
const ChoiceSetMap& choices = accessor.GetData();
ChoiceSetMap::const_iterator it = choices.begin();
@@ -106,7 +107,7 @@ smart_objects::SmartObject ResumptionData::GetApplicationInteractionChoiseSets(
}
smart_objects::SmartObject ResumptionData::GetApplicationGlobalProperties(
- app_mngr::ApplicationConstSharedPtr application) const {
+ app_mngr::ApplicationConstSharedPtr application) const {
using namespace app_mngr;
LOG4CXX_AUTO_TRACE(logger_);
@@ -131,14 +132,14 @@ smart_objects::SmartObject ResumptionData::GetApplicationGlobalProperties(
global_properties[strings::keyboard_properties] =
PointerToSmartObj(application->keyboard_props());
global_properties[strings::menu_title] =
- PointerToSmartObj(application->menu_title());
+ PointerToSmartObj(application->menu_title());
global_properties[strings::menu_icon] =
- PointerToSmartObj(application->menu_icon());
+ PointerToSmartObj(application->menu_icon());
return global_properties;
}
smart_objects::SmartObject ResumptionData::GetApplicationSubscriptions(
- app_mngr::ApplicationConstSharedPtr application) const {
+ app_mngr::ApplicationConstSharedPtr application) const {
using namespace app_mngr;
LOG4CXX_AUTO_TRACE(logger_);
DCHECK(application.get());
@@ -156,8 +157,10 @@ smart_objects::SmartObject ResumptionData::GetApplicationSubscriptions(
const ButtonSubscriptions& button_subscriptions = button_accessor.GetData();
LOG4CXX_DEBUG(logger_, "SubscribedButtons:" << button_subscriptions.size());
- Append(button_subscriptions.begin(), button_subscriptions.end(),
- strings::application_buttons, subscriptions);
+ Append(button_subscriptions.begin(),
+ button_subscriptions.end(),
+ strings::application_buttons,
+ subscriptions);
DataAccessor<VehicleInfoSubscriptions> vi_accessor =
application->SubscribedIVI();
@@ -165,8 +168,10 @@ smart_objects::SmartObject ResumptionData::GetApplicationSubscriptions(
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);
+ Append(vi_subscription.begin(),
+ vi_subscription.end(),
+ strings::application_vehicle_info,
+ subscriptions);
return subscriptions;
}
@@ -175,8 +180,7 @@ smart_objects::SmartObject ResumptionData::GetApplicationFiles(
using namespace app_mngr;
LOG4CXX_AUTO_TRACE(logger_);
DCHECK(application.get());
- LOG4CXX_TRACE(logger_, "ENTER app_id:"
- << application->app_id());
+ LOG4CXX_TRACE(logger_, "ENTER app_id:" << application->app_id());
smart_objects::SmartObject files =
smart_objects::SmartObject(smart_objects::SmartType_Array);
@@ -187,8 +191,9 @@ smart_objects::SmartObject ResumptionData::GetApplicationFiles(
const AppFilesMap& app_files = application->getAppFiles();
int i = 0;
- for(AppFilesMap::const_iterator file_it = app_files.begin();
- file_it != app_files.end(); file_it++) {
+ for (AppFilesMap::const_iterator file_it = app_files.begin();
+ file_it != app_files.end();
+ file_it++) {
const AppFile& file = file_it->second;
if (file.is_persistent) {
smart_objects::SmartObject file_data =
diff --git a/src/components/application_manager/src/resumption/resumption_data_db.cc b/src/components/application_manager/src/resumption/resumption_data_db.cc
index b493001c45..063cb332f1 100644
--- a/src/components/application_manager/src/resumption/resumption_data_db.cc
+++ b/src/components/application_manager/src/resumption/resumption_data_db.cc
@@ -49,9 +49,10 @@ const std::string kDatabaseName = "resumption";
namespace resumption {
CREATE_LOGGERPTR_GLOBAL(logger_, "Resumption")
-ResumptionDataDB::ResumptionDataDB(const application_manager::ApplicationManager& application_manager)
- : ResumptionData(application_manager),
- db_(new utils::dbms::SQLDatabase(kDatabaseName)) {
+ResumptionDataDB::ResumptionDataDB(
+ const application_manager::ApplicationManager& application_manager)
+ : ResumptionData(application_manager)
+ , db_(new utils::dbms::SQLDatabase(kDatabaseName)) {
#ifndef __QNX__
std::string path = application_manager_.get_settings().app_storage_folder();
if (!path.empty()) {
@@ -71,10 +72,13 @@ bool ResumptionDataDB::Init() {
if (!db_->Open()) {
LOG4CXX_ERROR(logger_, "Failed opening database.");
LOG4CXX_INFO(logger_, "Starting opening retries.");
- const uint16_t attempts = application_manager_.get_settings().attempts_to_open_resumption_db();
+ const uint16_t attempts =
+ application_manager_.get_settings().attempts_to_open_resumption_db();
LOG4CXX_DEBUG(logger_, "Total attempts number is: " << attempts);
bool is_opened = false;
- const uint16_t open_attempt_timeout_ms = application_manager_.get_settings().open_attempt_timeout_ms_resumption_db();
+ const uint16_t open_attempt_timeout_ms =
+ application_manager_.get_settings()
+ .open_attempt_timeout_ms_resumption_db();
const useconds_t sleep_interval_mcsec = open_attempt_timeout_ms * 1000;
LOG4CXX_DEBUG(logger_,
"Open attempt timeout(ms) is: " << open_attempt_timeout_ms);
@@ -90,8 +94,7 @@ bool ResumptionDataDB::Init() {
if (!is_opened) {
LOG4CXX_ERROR(logger_,
"Open retry sequence failed. Tried "
- << attempts
- << " attempts with "
+ << attempts << " attempts with "
<< open_attempt_timeout_ms
<< " open timeout(ms) for each.");
return false;
@@ -143,11 +146,10 @@ void ResumptionDataDB::SaveApplication(
const std::string& device_mac = application->mac_address();
LOG4CXX_INFO(logger_,
"app_id : " << application->app_id() << " policy_app_id : "
- << policy_app_id
- << " device_id : "
- << device_mac);
+ << policy_app_id << " device_id : " << device_mac);
- if (!CheckExistenceApplication(policy_app_id, device_mac, application_exist)) {
+ if (!CheckExistenceApplication(
+ policy_app_id, device_mac, application_exist)) {
LOG4CXX_ERROR(logger_, "Problem with access to DB");
return;
}
@@ -193,13 +195,10 @@ int32_t ResumptionDataDB::GetStoredHMILevel(
int hmi_level;
if (SelectHMILevel(policy_app_id, device_id, hmi_level)) {
- LOG4CXX_INFO(
- logger_,
- "Application with policy application id = " << policy_app_id
- << " and device id = "
- << device_id
- << "has hmi level = "
- << hmi_level);
+ LOG4CXX_INFO(logger_,
+ "Application with policy application id = "
+ << policy_app_id << " and device id = " << device_id
+ << "has hmi level = " << hmi_level);
return hmi_level;
}
LOG4CXX_FATAL(logger_, "HMI level doesn't exists in saved data");
@@ -223,10 +222,9 @@ bool ResumptionDataDB::CheckSavedApplication(const std::string& policy_app_id,
return false;
}
LOG4CXX_INFO(logger_,
- "Application with policy_app_id = " << policy_app_id
- << " and device_id = "
- << device_id
- << " does exist");
+ "Application with policy_app_id = "
+ << policy_app_id << " and device_id = " << device_id
+ << " does exist");
return true;
}
@@ -491,9 +489,7 @@ void ResumptionDataDB::SelectHMIId(const std::string& policy_app_id,
LOG4CXX_FATAL(logger_,
"Saved data doesn't have application with "
"device id = "
- << device_id
- << " and policy appID = "
- << policy_app_id);
+ << device_id << " and policy appID = " << policy_app_id);
}
bool ResumptionDataDB::SelectHashId(const std::string& policy_app_id,
@@ -525,9 +521,7 @@ bool ResumptionDataDB::SelectHashId(const std::string& policy_app_id,
LOG4CXX_WARN(logger_,
"Saved data doesn't have application with "
"device id = "
- << device_id
- << " and policy appID = "
- << policy_app_id
+ << device_id << " and policy appID = " << policy_app_id
<< "or hashID");
return false;
}
@@ -566,11 +560,9 @@ bool ResumptionDataDB::CheckExistenceApplication(
/* Position of data in "query" :
amount of application = 0 */
if (result && query.GetInteger(0)) {
- LOG4CXX_INFO(
- logger_,
- "Saved data has application with policy appID = " << policy_app_id
- << " and deviceID = "
- << device_id);
+ LOG4CXX_INFO(logger_,
+ "Saved data has application with policy appID = "
+ << policy_app_id << " and deviceID = " << device_id);
application_exist = true;
} else if (result) {
LOG4CXX_INFO(logger_, "Saved data does not contain application");
@@ -640,18 +632,15 @@ void ResumptionDataDB::UpdateHmiLevel(const std::string& policy_app_id,
if (query.Exec()) {
LOG4CXX_INFO(logger_,
"Saved data has application with policy appID = "
- << policy_app_id
- << " and deviceID = "
- << device_id
- << " has new HMI level = "
- << hmi_level);
+ << policy_app_id << " and deviceID = " << device_id
+ << " has new HMI level = " << hmi_level);
WriteDb();
}
}
}
void ResumptionDataDB::Persist() {
- WriteDb();
+ WriteDb();
}
bool ResumptionDataDB::RefreshDB() const {
@@ -761,9 +750,8 @@ bool ResumptionDataDB::DropAppDataResumption(const std::string& device_id,
const std::string& app_id) {
LOG4CXX_AUTO_TRACE(logger_);
- utils::ScopeGuard guard = utils::MakeObjGuard(
- *db_,
- &utils::dbms::SQLDatabase::RollbackTransaction);
+ utils::ScopeGuard guard =
+ utils::MakeObjGuard(*db_, &utils::dbms::SQLDatabase::RollbackTransaction);
db_->BeginTransaction();
if (!DeleteSavedFiles(app_id, device_id)) {
@@ -784,7 +772,7 @@ bool ResumptionDataDB::DropAppDataResumption(const std::string& device_id,
if (!DeleteSavedGlobalProperties(app_id, device_id)) {
return false;
}
- if(!UpdateGrammarID(app_id, device_id, 0)) {
+ if (!UpdateGrammarID(app_id, device_id, 0)) {
return false;
}
db_->CommitTransaction();
@@ -1468,9 +1456,8 @@ bool ResumptionDataDB::DeleteSavedApplication(const std::string& policy_app_id,
const std::string& device_id) {
LOG4CXX_AUTO_TRACE(logger_);
- utils::ScopeGuard guard = utils::MakeObjGuard(
- *db_,
- &utils::dbms::SQLDatabase::RollbackTransaction);
+ utils::ScopeGuard guard =
+ utils::MakeObjGuard(*db_, &utils::dbms::SQLDatabase::RollbackTransaction);
db_->BeginTransaction();
if (!DeleteSavedFiles(policy_app_id, device_id)) {
diff --git a/src/components/application_manager/src/resumption/resumption_data_json.cc b/src/components/application_manager/src/resumption/resumption_data_json.cc
index 46fb21729e..d9c755835a 100644
--- a/src/components/application_manager/src/resumption/resumption_data_json.cc
+++ b/src/components/application_manager/src/resumption/resumption_data_json.cc
@@ -45,7 +45,8 @@ namespace Formatters = NsSmartDeviceLink::NsJSONHandler::Formatters;
CREATE_LOGGERPTR_GLOBAL(logger_, "Resumption")
-ResumptionDataJson::ResumptionDataJson(LastState& last_state,
+ResumptionDataJson::ResumptionDataJson(
+ LastState& last_state,
const application_manager::ApplicationManager& application_manager)
: ResumptionData(application_manager), last_state_(last_state) {}
@@ -57,15 +58,15 @@ void ResumptionDataJson::SaveApplication(
const std::string& policy_app_id = application->policy_app_id();
LOG4CXX_DEBUG(logger_,
- "app_id : " << application->app_id() << " policy_app_id : "
- << policy_app_id);
+ "app_id : " << application->app_id()
+ << " policy_app_id : " << policy_app_id);
const std::string hash = application->curHash();
const uint32_t grammar_id = application->get_grammar_id();
const uint32_t time_stamp = (uint32_t)time(NULL);
const std::string device_mac = application->mac_address();
const mobile_apis::HMILevel::eType hmi_level = application->hmi_level();
- const bool is_subscribed_for_way_points = application_manager_.
- IsAppSubscribedForWayPoints(application->app_id());
+ const bool is_subscribed_for_way_points =
+ application_manager_.IsAppSubscribedForWayPoints(application->app_id());
sync_primitives::AutoLock autolock(resumption_lock_);
Json::Value tmp;
@@ -151,9 +152,7 @@ bool ResumptionDataJson::CheckSavedApplication(const std::string& policy_app_id,
LOG4CXX_INFO(
logger_,
"Resumption data for app_id "
- << policy_app_id
- << " device id "
- << device_id
+ << policy_app_id << " device id " << device_id
<< " is corrupted. Remove application from resumption list");
RemoveApplicationFromSaved(policy_app_id, device_id);
return false;
@@ -386,11 +385,9 @@ void ResumptionDataJson::UpdateHmiLevel(
int idx = GetObjectIndex(policy_app_id, device_id);
if (-1 == idx) {
- LOG4CXX_WARN(
- logger_,
- "Application isn't saved with mobile_app_id = " << policy_app_id
- << " device_id = "
- << device_id);
+ LOG4CXX_WARN(logger_,
+ "Application isn't saved with mobile_app_id = "
+ << policy_app_id << " device_id = " << device_id);
return;
}
GetSavedApplications()[idx][strings::hmi_level] = hmi_level;
@@ -419,7 +416,8 @@ Json::Value& ResumptionDataJson::GetResumptionData() const {
sync_primitives::AutoLock autolock(resumption_lock_);
Json::Value& dictionary = last_state().dictionary;
if (!dictionary.isMember(strings::resumption)) {
- last_state().dictionary[strings::resumption] = Json::Value(Json::objectValue);
+ last_state().dictionary[strings::resumption] =
+ Json::Value(Json::objectValue);
LOG4CXX_WARN(logger_, "resumption section is missed");
}
Json::Value& resumption = dictionary[strings::resumption];
@@ -505,8 +503,9 @@ bool ResumptionDataJson::DropAppDataResumption(const std::string& device_id,
sync_primitives::AutoLock autolock(resumption_lock_);
Json::Value& application = GetFromSavedOrAppend(app_id, device_id);
if (application.isNull()) {
- LOG4CXX_DEBUG(logger_, "Application " << app_id << " with device_id "
- << device_id << " hasn't been found in resumption data.");
+ LOG4CXX_DEBUG(logger_,
+ "Application " << app_id << " with device_id " << device_id
+ << " hasn't been found in resumption data.");
return false;
}
application[strings::application_commands].clear();
@@ -516,14 +515,15 @@ bool ResumptionDataJson::DropAppDataResumption(const std::string& device_id,
application[strings::application_subscribtions].clear();
application[strings::application_files].clear();
application.removeMember(strings::grammar_id);
- LOG4CXX_DEBUG(logger_, "Resumption data for application " << app_id <<
- " with device_id " << device_id << " has been dropped.");
+ LOG4CXX_DEBUG(logger_,
+ "Resumption data for application "
+ << app_id << " with device_id " << device_id
+ << " has been dropped.");
return true;
}
void ResumptionDataJson::Persist() {
- last_state().SaveToFileSystem();
+ last_state().SaveToFileSystem();
}
-
} // resumption
diff --git a/src/components/application_manager/src/state_controller_impl.cc b/src/components/application_manager/src/state_controller_impl.cc
index a01672a545..839cc13026 100644
--- a/src/components/application_manager/src/state_controller_impl.cc
+++ b/src/components/application_manager/src/state_controller_impl.cc
@@ -61,8 +61,9 @@ StateControllerImpl::StateControllerImpl(ApplicationManager& app_mngr)
subscribe_on_event(hmi_apis::FunctionID::BasicCommunication_OnEventChanged);
}
-
-void StateControllerImpl::SetRegularState(ApplicationSharedPtr app, HmiStatePtr state, const bool send_activate_app) {
+void StateControllerImpl::SetRegularState(ApplicationSharedPtr app,
+ HmiStatePtr state,
+ const bool send_activate_app) {
CREATE_LOGGERPTR_LOCAL(logger_, "StateControllerImpl");
LOG4CXX_AUTO_TRACE(logger_);
if (!app) {
@@ -74,7 +75,7 @@ void StateControllerImpl::SetRegularState(ApplicationSharedPtr app, HmiStatePtr
if (state->hmi_level() == mobile_apis::HMILevel::INVALID_ENUM ||
state->audio_streaming_state() ==
- mobile_apis::AudioStreamingState::INVALID_ENUM ||
+ mobile_apis::AudioStreamingState::INVALID_ENUM ||
state->system_context() == mobile_apis::SystemContext::INVALID_ENUM) {
LOG4CXX_ERROR(logger_, "Get invalid state");
return;
@@ -92,7 +93,7 @@ void StateControllerImpl::SetRegularState(ApplicationSharedPtr app, HmiStatePtr
}
hmi_apis::Common_HMILevel::eType hmi_level =
static_cast<hmi_apis::Common_HMILevel::eType>(
- resolved_state->hmi_level());
+ resolved_state->hmi_level());
const bool is_full_allowed = (hmi_apis::Common_HMILevel::FULL == hmi_level);
@@ -110,10 +111,11 @@ void StateControllerImpl::SetRegularState(ApplicationSharedPtr app, HmiStatePtr
ApplyRegularState(app, resolved_state);
}
-void StateControllerImpl::SetRegularState(ApplicationSharedPtr app,
- const mobile_apis::HMILevel::eType hmi_level,
- const mobile_apis::AudioStreamingState::eType audio_state,
- const bool send_activate_app) {
+void StateControllerImpl::SetRegularState(
+ ApplicationSharedPtr app,
+ const mobile_apis::HMILevel::eType hmi_level,
+ const mobile_apis::AudioStreamingState::eType audio_state,
+ const bool send_activate_app) {
CREATE_LOGGERPTR_LOCAL(logger_, "StateControllerImpl");
LOG4CXX_AUTO_TRACE(logger_);
if (!app) {
@@ -131,9 +133,10 @@ void StateControllerImpl::SetRegularState(ApplicationSharedPtr app,
SetRegularState(app, hmi_state, send_activate_app);
}
-void StateControllerImpl::SetRegularState(ApplicationSharedPtr app,
- const mobile_apis::HMILevel::eType hmi_level,
- const bool send_activate_app) {
+void StateControllerImpl::SetRegularState(
+ ApplicationSharedPtr app,
+ const mobile_apis::HMILevel::eType hmi_level,
+ const bool send_activate_app) {
using namespace mobile_apis;
using namespace helpers;
CREATE_LOGGERPTR_LOCAL(logger_, "StateControllerImpl");
@@ -152,11 +155,12 @@ void StateControllerImpl::SetRegularState(ApplicationSharedPtr app,
SetRegularState(app, hmi_state, send_activate_app);
}
-void StateControllerImpl::SetRegularState(ApplicationSharedPtr app,
- const mobile_apis::HMILevel::eType hmi_level,
- const mobile_apis::AudioStreamingState::eType audio_state,
- const mobile_apis::SystemContext::eType system_context,
- const bool send_activate_app) {
+void StateControllerImpl::SetRegularState(
+ ApplicationSharedPtr app,
+ const mobile_apis::HMILevel::eType hmi_level,
+ const mobile_apis::AudioStreamingState::eType audio_state,
+ const mobile_apis::SystemContext::eType system_context,
+ const bool send_activate_app) {
CREATE_LOGGERPTR_LOCAL(logger_, "StateControllerImpl");
LOG4CXX_AUTO_TRACE(logger_);
if (!app) {
@@ -172,8 +176,8 @@ void StateControllerImpl::SetRegularState(ApplicationSharedPtr app,
SetRegularState(app, hmi_state, send_activate_app);
}
-void StateControllerImpl::SetRegularState(ApplicationSharedPtr app,
- const mobile_apis::HMILevel::eType hmi_level) {
+void StateControllerImpl::SetRegularState(
+ ApplicationSharedPtr app, const mobile_apis::HMILevel::eType hmi_level) {
CREATE_LOGGERPTR_LOCAL(logger_, "StateControllerImpl");
LOG4CXX_AUTO_TRACE(logger_);
if (!app) {
@@ -186,14 +190,15 @@ void StateControllerImpl::SetRegularState(ApplicationSharedPtr app,
DCHECK_OR_RETURN_VOID(hmi_state);
hmi_state->set_hmi_level(hmi_level);
hmi_state->set_audio_streaming_state(CalcAudioState(app, hmi_level));
- hmi_state->set_system_context(
- prev_state ? prev_state->system_context()
- : mobile_apis::SystemContext::SYSCTXT_MAIN);
+ hmi_state->set_system_context(prev_state
+ ? prev_state->system_context()
+ : mobile_apis::SystemContext::SYSCTXT_MAIN);
SetRegularState(app, hmi_state);
}
-void StateControllerImpl::SetRegularState(ApplicationSharedPtr app,
- const mobile_apis::SystemContext::eType system_context) {
+void StateControllerImpl::SetRegularState(
+ ApplicationSharedPtr app,
+ const mobile_apis::SystemContext::eType system_context) {
CREATE_LOGGERPTR_LOCAL(logger_, "StateControllerImpl");
LOG4CXX_AUTO_TRACE(logger_);
if (!app) {
@@ -207,13 +212,14 @@ void StateControllerImpl::SetRegularState(ApplicationSharedPtr app,
DCHECK_OR_RETURN_VOID(hmi_state);
hmi_state->set_hmi_level(prev_regular->hmi_level());
hmi_state->set_audio_streaming_state(
- CalcAudioState(app, prev_regular->hmi_level()));
+ CalcAudioState(app, prev_regular->hmi_level()));
hmi_state->set_system_context(system_context);
SetRegularState(app, hmi_state, false);
}
-void StateControllerImpl::SetRegularState(ApplicationSharedPtr app,
- const mobile_apis::AudioStreamingState::eType audio_state) {
+void StateControllerImpl::SetRegularState(
+ ApplicationSharedPtr app,
+ const mobile_apis::AudioStreamingState::eType audio_state) {
CREATE_LOGGERPTR_LOCAL(logger_, "StateControllerImpl");
LOG4CXX_AUTO_TRACE(logger_);
if (!app) {
@@ -310,16 +316,15 @@ void StateControllerImpl::HmiLevelConflictResolver::operator()(
}
HmiStatePtr StateControllerImpl::ResolveHmiState(ApplicationSharedPtr app,
- HmiStatePtr state) const {
+ HmiStatePtr state) const {
using namespace mobile_apis;
using namespace helpers;
LOG4CXX_AUTO_TRACE(logger_);
LOG4CXX_DEBUG(logger_,
- "State to resolve: hmi_level " << state->hmi_level()
- << ", audio_state "
- << state->audio_streaming_state()
- << ", system_context "
- << state->system_context());
+ "State to resolve: hmi_level "
+ << state->hmi_level() << ", audio_state "
+ << state->audio_streaming_state() << ", system_context "
+ << state->system_context());
HmiStatePtr available_state =
CreateHmiState(app->app_id(), HmiState::StateID::STATE_ID_REGULAR);
@@ -340,7 +345,7 @@ HmiStatePtr StateControllerImpl::ResolveHmiState(ApplicationSharedPtr app,
}
bool StateControllerImpl::IsResumptionAllowed(ApplicationSharedPtr app,
- HmiStatePtr state) const {
+ HmiStatePtr state) const {
LOG4CXX_AUTO_TRACE(logger_);
using namespace helpers;
using namespace mobile_apis;
@@ -419,7 +424,7 @@ mobile_apis::HMILevel::eType StateControllerImpl::GetAvailableHmiLevel(
}
bool StateControllerImpl::IsStateAvailable(ApplicationSharedPtr app,
- HmiStatePtr state) const {
+ HmiStatePtr state) const {
using namespace mobile_apis;
using namespace helpers;
LOG4CXX_AUTO_TRACE(logger_);
@@ -447,8 +452,8 @@ bool StateControllerImpl::IsStateAvailable(ApplicationSharedPtr app,
return true;
}
-bool StateControllerImpl::IsStateAvailableForResumption(ApplicationSharedPtr app,
- HmiStatePtr state) const {
+bool StateControllerImpl::IsStateAvailableForResumption(
+ ApplicationSharedPtr app, HmiStatePtr state) const {
LOG4CXX_AUTO_TRACE(logger_);
using namespace mobile_apis;
using namespace helpers;
@@ -488,7 +493,7 @@ bool StateControllerImpl::IsStateAvailableForResumption(ApplicationSharedPtr app
}
void StateControllerImpl::SetupRegularHmiState(ApplicationSharedPtr app,
- HmiStatePtr state) {
+ HmiStatePtr state) {
namespace HMILevel = mobile_apis::HMILevel;
namespace AudioStreamingState = mobile_apis::AudioStreamingState;
LOG4CXX_AUTO_TRACE(logger_);
@@ -539,7 +544,7 @@ void StateControllerImpl::SetupRegularHmiState(
}
void StateControllerImpl::ApplyRegularState(ApplicationSharedPtr app,
- HmiStatePtr state) {
+ HmiStatePtr state) {
LOG4CXX_AUTO_TRACE(logger_);
DCHECK_OR_RETURN_VOID(app);
DCHECK_OR_RETURN_VOID(state);
@@ -550,7 +555,7 @@ void StateControllerImpl::ApplyRegularState(ApplicationSharedPtr app,
}
bool StateControllerImpl::IsSameAppType(ApplicationConstSharedPtr app1,
- ApplicationConstSharedPtr app2) {
+ ApplicationConstSharedPtr app2) {
const bool both_media =
app1->is_media_application() && app2->is_media_application();
const bool both_navi = app1->is_navi() && app2->is_navi();
@@ -658,8 +663,8 @@ void StateControllerImpl::on_event(const event_engine::Event& event) {
}
void StateControllerImpl::OnStateChanged(ApplicationSharedPtr app,
- HmiStatePtr old_state,
- HmiStatePtr new_state) {
+ HmiStatePtr old_state,
+ HmiStatePtr new_state) {
LOG4CXX_AUTO_TRACE(logger_);
DCHECK_OR_RETURN_VOID(app);
DCHECK_OR_RETURN_VOID(old_state);
@@ -742,7 +747,8 @@ int64_t StateControllerImpl::SendBCActivateApp(
app_mngr_.connection_handler().get_session_observer(),
app_mngr_.GetPolicyHandler(),
level,
- send_policy_priority, app_mngr_);
+ send_policy_priority,
+ app_mngr_);
if (!bc_activate_app_request) {
LOG4CXX_ERROR(logger_, "Unable to create BC.ActivateAppRequest");
return -1;
@@ -884,8 +890,8 @@ bool StateControllerImpl::IsStateActive(HmiState::StateID state_id) const {
return false;
}
-HmiStatePtr StateControllerImpl::CreateHmiState(uint32_t app_id,
- HmiState::StateID state_id) const {
+HmiStatePtr StateControllerImpl::CreateHmiState(
+ uint32_t app_id, HmiState::StateID state_id) const {
using namespace utils;
LOG4CXX_AUTO_TRACE(logger_);
HmiStatePtr new_state;