summaryrefslogtreecommitdiff
path: root/src/components/application_manager/src/commands
diff options
context:
space:
mode:
Diffstat (limited to 'src/components/application_manager/src/commands')
-rw-r--r--src/components/application_manager/src/commands/command_impl.cc2
-rw-r--r--src/components/application_manager/src/commands/command_notification_from_mobile_impl.cc74
-rw-r--r--src/components/application_manager/src/commands/command_request_impl.cc54
-rw-r--r--src/components/application_manager/src/commands/hmi/activate_app_request.cc21
-rw-r--r--src/components/application_manager/src/commands/hmi/activate_app_response.cc2
-rw-r--r--src/components/application_manager/src/commands/hmi/add_statistics_info_notification.cc4
-rw-r--r--src/components/application_manager/src/commands/hmi/allow_all_apps_request.cc4
-rw-r--r--src/components/application_manager/src/commands/hmi/allow_all_apps_response.cc4
-rw-r--r--src/components/application_manager/src/commands/hmi/allow_app_request.cc4
-rw-r--r--src/components/application_manager/src/commands/hmi/allow_app_response.cc4
-rw-r--r--src/components/application_manager/src/commands/hmi/basic_communication_system_request.cc4
-rw-r--r--src/components/application_manager/src/commands/hmi/basic_communication_system_response.cc4
-rw-r--r--src/components/application_manager/src/commands/hmi/button_get_capabilities_request.cc4
-rw-r--r--src/components/application_manager/src/commands/hmi/button_get_capabilities_response.cc4
-rw-r--r--src/components/application_manager/src/commands/hmi/close_popup_request.cc4
-rw-r--r--src/components/application_manager/src/commands/hmi/close_popup_response.cc4
-rw-r--r--src/components/application_manager/src/commands/hmi/get_system_info_request.cc4
-rw-r--r--src/components/application_manager/src/commands/hmi/get_system_info_response.cc4
-rw-r--r--src/components/application_manager/src/commands/hmi/get_urls.cc53
-rw-r--r--src/components/application_manager/src/commands/hmi/get_urls_response.cc4
-rw-r--r--src/components/application_manager/src/commands/hmi/mixing_audio_supported_request.cc4
-rw-r--r--src/components/application_manager/src/commands/hmi/mixing_audio_supported_response.cc4
-rw-r--r--src/components/application_manager/src/commands/hmi/navi_alert_maneuver_request.cc4
-rw-r--r--src/components/application_manager/src/commands/hmi/navi_alert_maneuver_response.cc4
-rw-r--r--src/components/application_manager/src/commands/hmi/navi_audio_start_stream_request.cc4
-rw-r--r--src/components/application_manager/src/commands/hmi/navi_audio_start_stream_response.cc4
-rw-r--r--src/components/application_manager/src/commands/hmi/navi_audio_stop_stream_request.cc4
-rw-r--r--src/components/application_manager/src/commands/hmi/navi_audio_stop_stream_response.cc4
-rw-r--r--src/components/application_manager/src/commands/hmi/navi_is_ready_request.cc4
-rw-r--r--src/components/application_manager/src/commands/hmi/navi_is_ready_response.cc4
-rw-r--r--src/components/application_manager/src/commands/hmi/navi_send_location_request.cc4
-rw-r--r--src/components/application_manager/src/commands/hmi/navi_send_location_response.cc4
-rw-r--r--src/components/application_manager/src/commands/hmi/navi_show_constant_tbt_request.cc4
-rw-r--r--src/components/application_manager/src/commands/hmi/navi_show_constant_tbt_response.cc4
-rw-r--r--src/components/application_manager/src/commands/hmi/navi_start_stream_request.cc4
-rw-r--r--src/components/application_manager/src/commands/hmi/navi_start_stream_response.cc4
-rw-r--r--src/components/application_manager/src/commands/hmi/navi_stop_stream_request.cc2
-rw-r--r--src/components/application_manager/src/commands/hmi/navi_stop_stream_response.cc4
-rw-r--r--src/components/application_manager/src/commands/hmi/navi_update_turn_list_request.cc4
-rw-r--r--src/components/application_manager/src/commands/hmi/navi_update_turn_list_response.cc4
-rw-r--r--src/components/application_manager/src/commands/hmi/notification_from_hmi.cc10
-rw-r--r--src/components/application_manager/src/commands/hmi/on_allow_sdl_functionality_notification.cc4
-rw-r--r--src/components/application_manager/src/commands/hmi/on_app_activated_notification.cc4
-rw-r--r--src/components/application_manager/src/commands/hmi/on_app_deactivated_notification.cc47
-rw-r--r--src/components/application_manager/src/commands/hmi/on_app_permission_changed_notification.cc4
-rw-r--r--src/components/application_manager/src/commands/hmi/on_app_permission_consent_notification.cc2
-rw-r--r--src/components/application_manager/src/commands/hmi/on_app_registered_notification.cc8
-rw-r--r--src/components/application_manager/src/commands/hmi/on_app_unregistered_notification.cc4
-rw-r--r--src/components/application_manager/src/commands/hmi/on_button_event_notification.cc4
-rw-r--r--src/components/application_manager/src/commands/hmi/on_button_press_notification.cc4
-rw-r--r--src/components/application_manager/src/commands/hmi/on_device_chosen_notification.cc4
-rw-r--r--src/components/application_manager/src/commands/hmi/on_device_state_changed_notification.cc51
-rw-r--r--src/components/application_manager/src/commands/hmi/on_driver_distraction_notification.cc16
-rw-r--r--src/components/application_manager/src/commands/hmi/on_exit_all_applications_notification.cc10
-rw-r--r--src/components/application_manager/src/commands/hmi/on_exit_application_notification.cc9
-rw-r--r--src/components/application_manager/src/commands/hmi/on_file_removed_notification.cc4
-rw-r--r--src/components/application_manager/src/commands/hmi/on_find_applications.cc4
-rw-r--r--src/components/application_manager/src/commands/hmi/on_ignition_cycle_over_notification.cc4
-rw-r--r--src/components/application_manager/src/commands/hmi/on_navi_tbt_client_state_notification.cc4
-rw-r--r--src/components/application_manager/src/commands/hmi/on_phone_call_notification.cc4
-rw-r--r--src/components/application_manager/src/commands/hmi/on_play_tone_notification.cc4
-rw-r--r--src/components/application_manager/src/commands/hmi/on_policy_update.cc4
-rw-r--r--src/components/application_manager/src/commands/hmi/on_put_file_notification.cc4
-rw-r--r--src/components/application_manager/src/commands/hmi/on_ready_notification.cc4
-rw-r--r--src/components/application_manager/src/commands/hmi/on_received_policy_update.cc4
-rw-r--r--src/components/application_manager/src/commands/hmi/on_record_start_notification.cc4
-rw-r--r--src/components/application_manager/src/commands/hmi/on_resume_audio_source_notification.cc4
-rw-r--r--src/components/application_manager/src/commands/hmi/on_sdl_close_notification.cc2
-rw-r--r--src/components/application_manager/src/commands/hmi/on_sdl_consent_needed_notification.cc2
-rw-r--r--src/components/application_manager/src/commands/hmi/on_sdl_persistence_complete_notification.cc2
-rw-r--r--src/components/application_manager/src/commands/hmi/on_start_device_discovery.cc4
-rw-r--r--src/components/application_manager/src/commands/hmi/on_status_update_notification.cc2
-rw-r--r--src/components/application_manager/src/commands/hmi/on_system_context_notification.cc4
-rw-r--r--src/components/application_manager/src/commands/hmi/on_system_error_notification.cc4
-rw-r--r--src/components/application_manager/src/commands/hmi/on_system_info_changed_notification.cc4
-rw-r--r--src/components/application_manager/src/commands/hmi/on_system_request_notification.cc10
-rw-r--r--src/components/application_manager/src/commands/hmi/on_tts_language_change_notification.cc9
-rw-r--r--src/components/application_manager/src/commands/hmi/on_tts_reset_timeout_notification.cc2
-rw-r--r--src/components/application_manager/src/commands/hmi/on_tts_started_notification.cc4
-rw-r--r--src/components/application_manager/src/commands/hmi/on_tts_stopped_notification.cc4
-rw-r--r--src/components/application_manager/src/commands/hmi/on_ui_command_notification.cc4
-rw-r--r--src/components/application_manager/src/commands/hmi/on_ui_keyboard_input_notification.cc4
-rw-r--r--src/components/application_manager/src/commands/hmi/on_ui_language_change_notification.cc9
-rw-r--r--src/components/application_manager/src/commands/hmi/on_ui_reset_timeout_notification.cc4
-rw-r--r--src/components/application_manager/src/commands/hmi/on_ui_touch_event_notification.cc4
-rw-r--r--src/components/application_manager/src/commands/hmi/on_update_device_list.cc4
-rw-r--r--src/components/application_manager/src/commands/hmi/on_vi_acc_pedal_position_notification.cc4
-rw-r--r--src/components/application_manager/src/commands/hmi/on_vi_belt_status_notification.cc4
-rw-r--r--src/components/application_manager/src/commands/hmi/on_vi_body_information_notification.cc4
-rw-r--r--src/components/application_manager/src/commands/hmi/on_vi_device_status_notification.cc4
-rw-r--r--src/components/application_manager/src/commands/hmi/on_vi_driver_braking_notification.cc4
-rw-r--r--src/components/application_manager/src/commands/hmi/on_vi_engine_torque_notification.cc4
-rw-r--r--src/components/application_manager/src/commands/hmi/on_vi_external_temperature_notification.cc4
-rw-r--r--src/components/application_manager/src/commands/hmi/on_vi_fuel_level_notification.cc4
-rw-r--r--src/components/application_manager/src/commands/hmi/on_vi_fuel_level_state_notification.cc4
-rw-r--r--src/components/application_manager/src/commands/hmi/on_vi_gps_data_notification.cc4
-rw-r--r--src/components/application_manager/src/commands/hmi/on_vi_head_lamp_status_notification.cc4
-rw-r--r--src/components/application_manager/src/commands/hmi/on_vi_instant_fuel_consumption_notification.cc4
-rw-r--r--src/components/application_manager/src/commands/hmi/on_vi_my_key_notification.cc4
-rw-r--r--src/components/application_manager/src/commands/hmi/on_vi_odometer_notification.cc4
-rw-r--r--src/components/application_manager/src/commands/hmi/on_vi_prndl_notification.cc4
-rw-r--r--src/components/application_manager/src/commands/hmi/on_vi_rpm_notification.cc4
-rw-r--r--src/components/application_manager/src/commands/hmi/on_vi_speed_notification.cc4
-rw-r--r--src/components/application_manager/src/commands/hmi/on_vi_steering_wheel_angle_notification.cc4
-rw-r--r--src/components/application_manager/src/commands/hmi/on_vi_tire_pressure_notification.cc4
-rw-r--r--src/components/application_manager/src/commands/hmi/on_vi_vehicle_data_notification.cc4
-rw-r--r--src/components/application_manager/src/commands/hmi/on_vi_vin_notification.cc4
-rw-r--r--src/components/application_manager/src/commands/hmi/on_vi_wiper_status_notification.cc4
-rw-r--r--src/components/application_manager/src/commands/hmi/on_vr_command_notification.cc4
-rw-r--r--src/components/application_manager/src/commands/hmi/on_vr_language_change_notification.cc13
-rw-r--r--src/components/application_manager/src/commands/hmi/on_vr_started_notification.cc4
-rw-r--r--src/components/application_manager/src/commands/hmi/on_vr_stopped_notification.cc4
-rw-r--r--src/components/application_manager/src/commands/hmi/request_from_hmi.cc22
-rw-r--r--src/components/application_manager/src/commands/hmi/request_to_hmi.cc2
-rw-r--r--src/components/application_manager/src/commands/hmi/response_from_hmi.cc5
-rw-r--r--src/components/application_manager/src/commands/hmi/sdl_activate_app_request.cc54
-rw-r--r--src/components/application_manager/src/commands/hmi/sdl_activate_app_response.cc4
-rw-r--r--src/components/application_manager/src/commands/hmi/sdl_get_list_of_permissions_request.cc4
-rw-r--r--src/components/application_manager/src/commands/hmi/sdl_get_list_of_permissions_response.cc4
-rw-r--r--src/components/application_manager/src/commands/hmi/sdl_get_status_update_request.cc4
-rw-r--r--src/components/application_manager/src/commands/hmi/sdl_get_status_update_response.cc4
-rw-r--r--src/components/application_manager/src/commands/hmi/sdl_get_user_friendly_message_request.cc4
-rw-r--r--src/components/application_manager/src/commands/hmi/sdl_get_user_friendly_message_response.cc4
-rw-r--r--src/components/application_manager/src/commands/hmi/sdl_policy_update.cc4
-rw-r--r--src/components/application_manager/src/commands/hmi/sdl_policy_update_response.cc4
-rw-r--r--src/components/application_manager/src/commands/hmi/tts_change_registration_request.cc4
-rw-r--r--src/components/application_manager/src/commands/hmi/tts_change_registration_response.cc4
-rw-r--r--src/components/application_manager/src/commands/hmi/tts_get_capabilities_request.cc4
-rw-r--r--src/components/application_manager/src/commands/hmi/tts_get_capabilities_response.cc4
-rw-r--r--src/components/application_manager/src/commands/hmi/tts_get_language_request.cc4
-rw-r--r--src/components/application_manager/src/commands/hmi/tts_get_language_response.cc4
-rw-r--r--src/components/application_manager/src/commands/hmi/tts_get_supported_languages_request.cc4
-rw-r--r--src/components/application_manager/src/commands/hmi/tts_get_supported_languages_response.cc4
-rw-r--r--src/components/application_manager/src/commands/hmi/tts_is_ready_request.cc4
-rw-r--r--src/components/application_manager/src/commands/hmi/tts_is_ready_response.cc4
-rw-r--r--src/components/application_manager/src/commands/hmi/tts_set_global_properties_request.cc4
-rw-r--r--src/components/application_manager/src/commands/hmi/tts_set_global_properties_response.cc4
-rw-r--r--src/components/application_manager/src/commands/hmi/tts_speak_request.cc4
-rw-r--r--src/components/application_manager/src/commands/hmi/tts_speak_response.cc4
-rw-r--r--src/components/application_manager/src/commands/hmi/tts_stop_speaking_request.cc4
-rw-r--r--src/components/application_manager/src/commands/hmi/tts_stop_speaking_response.cc4
-rw-r--r--src/components/application_manager/src/commands/hmi/ui_add_command_request.cc4
-rw-r--r--src/components/application_manager/src/commands/hmi/ui_add_command_response.cc4
-rw-r--r--src/components/application_manager/src/commands/hmi/ui_add_submenu_request.cc2
-rw-r--r--src/components/application_manager/src/commands/hmi/ui_add_submenu_response.cc4
-rw-r--r--src/components/application_manager/src/commands/hmi/ui_alert_request.cc4
-rw-r--r--src/components/application_manager/src/commands/hmi/ui_alert_response.cc4
-rw-r--r--src/components/application_manager/src/commands/hmi/ui_change_registration_request.cc4
-rw-r--r--src/components/application_manager/src/commands/hmi/ui_change_registration_response.cc4
-rw-r--r--src/components/application_manager/src/commands/hmi/ui_delete_command_request.cc4
-rw-r--r--src/components/application_manager/src/commands/hmi/ui_delete_command_response.cc4
-rw-r--r--src/components/application_manager/src/commands/hmi/ui_delete_submenu_request.cc4
-rw-r--r--src/components/application_manager/src/commands/hmi/ui_delete_submenu_response.cc4
-rw-r--r--src/components/application_manager/src/commands/hmi/ui_end_audio_pass_thru_request.cc4
-rw-r--r--src/components/application_manager/src/commands/hmi/ui_end_audio_pass_thru_response.cc4
-rw-r--r--src/components/application_manager/src/commands/hmi/ui_get_capabilities_request.cc4
-rw-r--r--src/components/application_manager/src/commands/hmi/ui_get_capabilities_response.cc4
-rw-r--r--src/components/application_manager/src/commands/hmi/ui_get_language_request.cc4
-rw-r--r--src/components/application_manager/src/commands/hmi/ui_get_language_response.cc4
-rw-r--r--src/components/application_manager/src/commands/hmi/ui_get_supported_languages_request.cc4
-rw-r--r--src/components/application_manager/src/commands/hmi/ui_get_supported_languages_response.cc4
-rw-r--r--src/components/application_manager/src/commands/hmi/ui_is_ready_request.cc4
-rw-r--r--src/components/application_manager/src/commands/hmi/ui_is_ready_response.cc4
-rw-r--r--src/components/application_manager/src/commands/hmi/ui_perform_audio_pass_thru_request.cc4
-rw-r--r--src/components/application_manager/src/commands/hmi/ui_perform_audio_pass_thru_response.cc4
-rw-r--r--src/components/application_manager/src/commands/hmi/ui_perform_interaction_request.cc4
-rw-r--r--src/components/application_manager/src/commands/hmi/ui_perform_interaction_response.cc4
-rw-r--r--src/components/application_manager/src/commands/hmi/ui_scrollable_message_request.cc4
-rw-r--r--src/components/application_manager/src/commands/hmi/ui_scrollable_message_response.cc4
-rw-r--r--src/components/application_manager/src/commands/hmi/ui_set_app_icon_request.cc55
-rw-r--r--src/components/application_manager/src/commands/hmi/ui_set_app_icon_response.cc57
-rw-r--r--src/components/application_manager/src/commands/hmi/ui_set_display_layout_request.cc4
-rw-r--r--src/components/application_manager/src/commands/hmi/ui_set_display_layout_response.cc4
-rw-r--r--src/components/application_manager/src/commands/hmi/ui_set_global_properties_request.cc4
-rw-r--r--src/components/application_manager/src/commands/hmi/ui_set_global_properties_response.cc4
-rw-r--r--src/components/application_manager/src/commands/hmi/ui_set_media_clock_timer_request.cc4
-rw-r--r--src/components/application_manager/src/commands/hmi/ui_set_media_clock_timer_response.cc4
-rw-r--r--src/components/application_manager/src/commands/hmi/ui_show_request.cc4
-rw-r--r--src/components/application_manager/src/commands/hmi/ui_show_response.cc4
-rw-r--r--src/components/application_manager/src/commands/hmi/ui_slider_request.cc4
-rw-r--r--src/components/application_manager/src/commands/hmi/ui_slider_response.cc4
-rw-r--r--src/components/application_manager/src/commands/hmi/update_app_list_request.cc4
-rw-r--r--src/components/application_manager/src/commands/hmi/update_app_list_response.cc4
-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.cc4
-rw-r--r--src/components/application_manager/src/commands/hmi/update_sdl_request.cc2
-rw-r--r--src/components/application_manager/src/commands/hmi/update_sdl_response.cc4
-rw-r--r--src/components/application_manager/src/commands/hmi/vi_diagnostic_message_request.cc4
-rw-r--r--src/components/application_manager/src/commands/hmi/vi_diagnostic_message_response.cc4
-rw-r--r--src/components/application_manager/src/commands/hmi/vi_get_dtcs_request.cc4
-rw-r--r--src/components/application_manager/src/commands/hmi/vi_get_dtcs_response.cc4
-rw-r--r--src/components/application_manager/src/commands/hmi/vi_get_vehicle_data_request.cc4
-rw-r--r--src/components/application_manager/src/commands/hmi/vi_get_vehicle_data_response.cc22
-rw-r--r--src/components/application_manager/src/commands/hmi/vi_get_vehicle_type_request.cc4
-rw-r--r--src/components/application_manager/src/commands/hmi/vi_get_vehicle_type_response.cc4
-rw-r--r--src/components/application_manager/src/commands/hmi/vi_is_ready_request.cc4
-rw-r--r--src/components/application_manager/src/commands/hmi/vi_is_ready_response.cc4
-rw-r--r--src/components/application_manager/src/commands/hmi/vi_read_did_request.cc4
-rw-r--r--src/components/application_manager/src/commands/hmi/vi_read_did_response.cc4
-rw-r--r--src/components/application_manager/src/commands/hmi/vi_subscribe_vehicle_data_request.cc4
-rw-r--r--src/components/application_manager/src/commands/hmi/vi_subscribe_vehicle_data_response.cc4
-rw-r--r--src/components/application_manager/src/commands/hmi/vi_unsubscribe_vehicle_data_request.cc4
-rw-r--r--src/components/application_manager/src/commands/hmi/vi_unsubscribe_vehicle_data_response.cc4
-rw-r--r--src/components/application_manager/src/commands/hmi/vr_add_command_request.cc4
-rw-r--r--src/components/application_manager/src/commands/hmi/vr_add_command_response.cc4
-rw-r--r--src/components/application_manager/src/commands/hmi/vr_change_registration_request.cc4
-rw-r--r--src/components/application_manager/src/commands/hmi/vr_change_registration_response.cc2
-rw-r--r--src/components/application_manager/src/commands/hmi/vr_delete_command_request.cc4
-rw-r--r--src/components/application_manager/src/commands/hmi/vr_delete_command_response.cc4
-rw-r--r--src/components/application_manager/src/commands/hmi/vr_get_capabilities_request.cc4
-rw-r--r--src/components/application_manager/src/commands/hmi/vr_get_capabilities_response.cc4
-rw-r--r--src/components/application_manager/src/commands/hmi/vr_get_language_request.cc4
-rw-r--r--src/components/application_manager/src/commands/hmi/vr_get_language_response.cc4
-rw-r--r--src/components/application_manager/src/commands/hmi/vr_get_supported_languages_request.cc4
-rw-r--r--src/components/application_manager/src/commands/hmi/vr_get_supported_languages_response.cc4
-rw-r--r--src/components/application_manager/src/commands/hmi/vr_is_ready_request.cc4
-rw-r--r--src/components/application_manager/src/commands/hmi/vr_is_ready_response.cc4
-rw-r--r--src/components/application_manager/src/commands/hmi/vr_perform_interaction_request.cc4
-rw-r--r--src/components/application_manager/src/commands/hmi/vr_perform_interaction_response.cc4
-rw-r--r--src/components/application_manager/src/commands/mobile/add_command_request.cc101
-rw-r--r--src/components/application_manager/src/commands/mobile/add_command_response.cc2
-rw-r--r--src/components/application_manager/src/commands/mobile/add_sub_menu_request.cc4
-rw-r--r--src/components/application_manager/src/commands/mobile/add_sub_menu_response.cc2
-rw-r--r--src/components/application_manager/src/commands/mobile/alert_maneuver_request.cc6
-rw-r--r--src/components/application_manager/src/commands/mobile/alert_maneuver_response.cc2
-rw-r--r--src/components/application_manager/src/commands/mobile/alert_request.cc45
-rw-r--r--src/components/application_manager/src/commands/mobile/alert_response.cc2
-rw-r--r--src/components/application_manager/src/commands/mobile/change_registration_request.cc19
-rw-r--r--src/components/application_manager/src/commands/mobile/change_registration_response.cc2
-rw-r--r--src/components/application_manager/src/commands/mobile/create_interaction_choice_set_request.cc19
-rw-r--r--src/components/application_manager/src/commands/mobile/create_interaction_choice_set_response.cc2
-rw-r--r--src/components/application_manager/src/commands/mobile/delete_command_request.cc4
-rw-r--r--src/components/application_manager/src/commands/mobile/delete_command_response.cc2
-rw-r--r--src/components/application_manager/src/commands/mobile/delete_file_request.cc2
-rw-r--r--src/components/application_manager/src/commands/mobile/delete_file_response.cc2
-rw-r--r--src/components/application_manager/src/commands/mobile/delete_interaction_choice_set_request.cc7
-rw-r--r--src/components/application_manager/src/commands/mobile/delete_interaction_choice_set_response.cc2
-rw-r--r--src/components/application_manager/src/commands/mobile/delete_sub_menu_request.cc19
-rw-r--r--src/components/application_manager/src/commands/mobile/delete_sub_menu_response.cc2
-rw-r--r--src/components/application_manager/src/commands/mobile/diagnostic_message_request.cc4
-rw-r--r--src/components/application_manager/src/commands/mobile/diagnostic_message_response.cc2
-rw-r--r--src/components/application_manager/src/commands/mobile/dial_number_request.cc2
-rw-r--r--src/components/application_manager/src/commands/mobile/end_audio_pass_thru_request.cc4
-rw-r--r--src/components/application_manager/src/commands/mobile/end_audio_pass_thru_response.cc2
-rw-r--r--src/components/application_manager/src/commands/mobile/get_dtcs_request.cc4
-rw-r--r--src/components/application_manager/src/commands/mobile/get_dtcs_response.cc2
-rw-r--r--src/components/application_manager/src/commands/mobile/get_vehicle_data_request.cc6
-rw-r--r--src/components/application_manager/src/commands/mobile/get_vehicle_data_response.cc2
-rw-r--r--src/components/application_manager/src/commands/mobile/list_files_request.cc2
-rw-r--r--src/components/application_manager/src/commands/mobile/list_files_response.cc2
-rw-r--r--src/components/application_manager/src/commands/mobile/on_app_interface_unregistered_notification.cc2
-rw-r--r--src/components/application_manager/src/commands/mobile/on_audio_pass_thru_notification.cc2
-rw-r--r--src/components/application_manager/src/commands/mobile/on_button_event_notification.cc13
-rw-r--r--src/components/application_manager/src/commands/mobile/on_button_press_notification.cc13
-rw-r--r--src/components/application_manager/src/commands/mobile/on_command_notification.cc2
-rw-r--r--src/components/application_manager/src/commands/mobile/on_driver_distraction_notification.cc2
-rw-r--r--src/components/application_manager/src/commands/mobile/on_hash_change_notification.cc14
-rw-r--r--src/components/application_manager/src/commands/mobile/on_hmi_status_notification.cc8
-rw-r--r--src/components/application_manager/src/commands/mobile/on_hmi_status_notification_from_mobile.cc81
-rw-r--r--src/components/application_manager/src/commands/mobile/on_keyboard_input_notification.cc2
-rw-r--r--src/components/application_manager/src/commands/mobile/on_language_change_notification.cc2
-rw-r--r--src/components/application_manager/src/commands/mobile/on_permissions_change_notification.cc2
-rw-r--r--src/components/application_manager/src/commands/mobile/on_system_request_notification.cc2
-rw-r--r--src/components/application_manager/src/commands/mobile/on_tbt_client_state_notification.cc2
-rw-r--r--src/components/application_manager/src/commands/mobile/on_touch_event_notification.cc2
-rw-r--r--src/components/application_manager/src/commands/mobile/on_vehicle_data_notification.cc2
-rw-r--r--src/components/application_manager/src/commands/mobile/perform_audio_pass_thru_request.cc17
-rw-r--r--src/components/application_manager/src/commands/mobile/perform_audio_pass_thru_response.cc2
-rw-r--r--src/components/application_manager/src/commands/mobile/perform_interaction_request.cc302
-rw-r--r--src/components/application_manager/src/commands/mobile/perform_interaction_response.cc2
-rw-r--r--src/components/application_manager/src/commands/mobile/put_file_request.cc8
-rw-r--r--src/components/application_manager/src/commands/mobile/put_file_response.cc2
-rw-r--r--src/components/application_manager/src/commands/mobile/read_did_request.cc4
-rw-r--r--src/components/application_manager/src/commands/mobile/read_did_response.cc2
-rw-r--r--src/components/application_manager/src/commands/mobile/register_app_interface_request.cc184
-rw-r--r--src/components/application_manager/src/commands/mobile/register_app_interface_response.cc10
-rw-r--r--src/components/application_manager/src/commands/mobile/reset_global_properties_request.cc6
-rw-r--r--src/components/application_manager/src/commands/mobile/reset_global_properties_response.cc2
-rw-r--r--src/components/application_manager/src/commands/mobile/scrollable_message_request.cc7
-rw-r--r--src/components/application_manager/src/commands/mobile/scrollable_message_response.cc2
-rw-r--r--src/components/application_manager/src/commands/mobile/send_location_request.cc66
-rw-r--r--src/components/application_manager/src/commands/mobile/send_location_response.cc2
-rw-r--r--src/components/application_manager/src/commands/mobile/set_app_icon_request.cc235
-rw-r--r--src/components/application_manager/src/commands/mobile/set_app_icon_response.cc56
-rw-r--r--src/components/application_manager/src/commands/mobile/set_display_layout_request.cc4
-rw-r--r--src/components/application_manager/src/commands/mobile/set_display_layout_response.cc2
-rw-r--r--src/components/application_manager/src/commands/mobile/set_global_properties_request.cc9
-rw-r--r--src/components/application_manager/src/commands/mobile/set_global_properties_response.cc2
-rw-r--r--src/components/application_manager/src/commands/mobile/set_media_clock_timer_request.cc4
-rw-r--r--src/components/application_manager/src/commands/mobile/set_media_clock_timer_response.cc2
-rw-r--r--src/components/application_manager/src/commands/mobile/show_constant_tbt_request.cc6
-rw-r--r--src/components/application_manager/src/commands/mobile/show_constant_tbt_response.cc2
-rw-r--r--src/components/application_manager/src/commands/mobile/show_request.cc6
-rw-r--r--src/components/application_manager/src/commands/mobile/show_response.cc2
-rw-r--r--src/components/application_manager/src/commands/mobile/slider_request.cc14
-rw-r--r--src/components/application_manager/src/commands/mobile/slider_response.cc2
-rw-r--r--src/components/application_manager/src/commands/mobile/speak_request.cc10
-rw-r--r--src/components/application_manager/src/commands/mobile/speak_response.cc2
-rw-r--r--src/components/application_manager/src/commands/mobile/subscribe_button_request.cc2
-rw-r--r--src/components/application_manager/src/commands/mobile/subscribe_button_response.cc2
-rw-r--r--src/components/application_manager/src/commands/mobile/subscribe_vehicle_data_request.cc4
-rw-r--r--src/components/application_manager/src/commands/mobile/subscribe_vehicle_data_response.cc2
-rw-r--r--src/components/application_manager/src/commands/mobile/system_request.cc24
-rw-r--r--src/components/application_manager/src/commands/mobile/system_response.cc2
-rw-r--r--src/components/application_manager/src/commands/mobile/unregister_app_interface_request.cc2
-rw-r--r--src/components/application_manager/src/commands/mobile/unregister_app_interface_response.cc2
-rw-r--r--src/components/application_manager/src/commands/mobile/unsubscribe_button_request.cc2
-rw-r--r--src/components/application_manager/src/commands/mobile/unsubscribe_button_response.cc2
-rw-r--r--src/components/application_manager/src/commands/mobile/unsubscribe_vehicle_data_request.cc4
-rw-r--r--src/components/application_manager/src/commands/mobile/unsubscribe_vehicle_data_response.cc2
-rw-r--r--src/components/application_manager/src/commands/mobile/update_turn_list_request.cc6
-rw-r--r--src/components/application_manager/src/commands/mobile/update_turn_list_response.cc2
312 files changed, 1791 insertions, 1055 deletions
diff --git a/src/components/application_manager/src/commands/command_impl.cc b/src/components/application_manager/src/commands/command_impl.cc
index 86b764c46a..66c0e2c631 100644
--- a/src/components/application_manager/src/commands/command_impl.cc
+++ b/src/components/application_manager/src/commands/command_impl.cc
@@ -1,4 +1,4 @@
-/**
+/*
Copyright (c) 2014, Ford Motor Company
All rights reserved.
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
new file mode 100644
index 0000000000..ee7afaddf9
--- /dev/null
+++ b/src/components/application_manager/src/commands/command_notification_from_mobile_impl.cc
@@ -0,0 +1,74 @@
+/*
+ Copyright (c) 2013, Ford Motor Company
+ All rights reserved.
+
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions are met:
+
+ Redistributions of source code must retain the above copyright notice, this
+ list of conditions and the following disclaimer.
+
+ Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions and the following
+ disclaimer in the documentation and/or other materials provided with the
+ distribution.
+
+ Neither the name of the Ford Motor Company nor the names of its contributors
+ may be used to endorse or promote products derived from this software
+ without specific prior written permission.
+
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+ LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include "application_manager/commands/command_notification_from_mobile_impl.h"
+#include "application_manager/application_manager_impl.h"
+#include "application_manager/message_helper.h"
+
+namespace application_manager {
+
+namespace commands {
+
+CommandNotificationFromMobileImpl::CommandNotificationFromMobileImpl(
+ const MessageSharedPtr& message)
+ : CommandImpl(message) {
+}
+
+CommandNotificationFromMobileImpl::~CommandNotificationFromMobileImpl() {
+}
+
+bool CommandNotificationFromMobileImpl::Init() {
+ return true;
+}
+
+bool CommandNotificationFromMobileImpl::CleanUp() {
+ return true;
+}
+
+void CommandNotificationFromMobileImpl::Run() {
+}
+
+void CommandNotificationFromMobileImpl::SendNotification() {
+ (*message_)[strings::params][strings::protocol_type] = mobile_protocol_type_;
+ (*message_)[strings::params][strings::protocol_version] = protocol_version_;
+ (*message_)[strings::params][strings::message_type] =
+ static_cast<int32_t>(application_manager::MessageType::kNotification);
+
+ LOG4CXX_INFO(logger_, "SendNotification");
+ MessageHelper::PrintSmartObject(*message_);
+
+ ApplicationManagerImpl::instance()->SendMessageToMobile(message_);
+}
+
+} // namespace commands
+
+} // namespace application_manager
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 5f8757754f..5d70e15722 100644
--- a/src/components/application_manager/src/commands/command_request_impl.cc
+++ b/src/components/application_manager/src/commands/command_request_impl.cc
@@ -1,4 +1,4 @@
-/*
+/*
Copyright (c) 2013, Ford Motor Company
All rights reserved.
@@ -53,12 +53,12 @@ struct DisallowedParamsInserter {
application_manager::MessageHelper::vehicle_data();
VehicleData::const_iterator it = vehicle_data.find(param);
if (vehicle_data.end() != it) {
- smart_objects::SmartObject* disallowed_param =
+ smart_objects::SmartObjectSPtr disallowed_param =
new smart_objects::SmartObject(smart_objects::SmartType_Map);
(*disallowed_param)[strings::data_type] = (*it).second;
(*disallowed_param)[strings::result_code] = code_;
- response_[strings::msg_params][param.c_str()] = *disallowed_param;
- return true;
+ response_[strings::msg_params][param.c_str()] = *disallowed_param;
+ return true;
}
return false;
}
@@ -75,7 +75,7 @@ CommandRequestImpl::CommandRequestImpl(const MessageSharedPtr& message)
CommandRequestImpl::~CommandRequestImpl() {
}
-bool CommandRequestImpl::Init() {
+bool CommandRequestImpl::Init() {
return true;
}
@@ -91,12 +91,14 @@ void CommandRequestImpl::Run() {
}
void CommandRequestImpl::onTimeOut() {
- LOG4CXX_INFO(logger_, "CommandRequestImpl::onTimeOut");
+ LOG4CXX_AUTO_TRACE(logger_);
unsubscribe_from_all_events();
{
+ // FIXME (dchmerev@luxoft.com): atomic_xchg fits better
sync_primitives::AutoLock auto_lock(state_lock_);
if (kCompleted == current_state_) {
+ LOG4CXX_DEBUG(logger_, "current_state_ = kCompleted");
// don't send timeout if request completed
return;
}
@@ -104,7 +106,7 @@ void CommandRequestImpl::onTimeOut() {
current_state_ = kTimedOut;
}
- smart_objects::SmartObject* response =
+ smart_objects::SmartObjectSPtr response =
MessageHelper::CreateNegativeResponse(connection_key(), function_id(),
correlation_id(), mobile_api::Result::GENERIC_ERROR);
@@ -116,7 +118,7 @@ void CommandRequestImpl::on_event(const event_engine::Event& event) {
void CommandRequestImpl::SendResponse(
const bool success, const mobile_apis::Result::eType& result_code,
- const char* info, const NsSmart::SmartObject* response_params) {
+ const char* info, const smart_objects::SmartObject* response_params) {
{
sync_primitives::AutoLock auto_lock(state_lock_);
@@ -128,13 +130,12 @@ void CommandRequestImpl::SendResponse(
current_state_ = kCompleted;
}
- NsSmartDeviceLink::NsSmartObjects::SmartObject* result =
- new NsSmartDeviceLink::NsSmartObjects::SmartObject;
+ smart_objects::SmartObjectSPtr result = new smart_objects::SmartObject;
if (!result) {
LOG4CXX_ERROR(logger_, "Memory allocation failed.");
return;
}
- NsSmartDeviceLink::NsSmartObjects::SmartObject& response = *result;
+ smart_objects::SmartObject& response = *result;
response[strings::params][strings::message_type] = MessageType::kResponse;
response[strings::params][strings::correlation_id] = correlation_id();
@@ -193,10 +194,9 @@ bool CommandRequestImpl::CheckSyntax(std::string str, bool allow_empty_line) {
void CommandRequestImpl::SendHMIRequest(
const hmi_apis::FunctionID::eType& function_id,
- const NsSmart::SmartObject* msg_params, bool use_events) {
+ const smart_objects::SmartObject* msg_params, bool use_events) {
- NsSmartDeviceLink::NsSmartObjects::SmartObject* result =
- new NsSmartDeviceLink::NsSmartObjects::SmartObject;
+ smart_objects::SmartObjectSPtr result = new smart_objects::SmartObject;
if (!result) {
LOG4CXX_ERROR(logger_, "Memory allocation failed.");
return;
@@ -205,11 +205,11 @@ void CommandRequestImpl::SendHMIRequest(
const uint32_t hmi_correlation_id =
ApplicationManagerImpl::instance()->GetNextHMICorrelationID();
if (use_events) {
- LOG4CXX_WARN(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);
}
- NsSmartDeviceLink::NsSmartObjects::SmartObject& request = *result;
+ smart_objects::SmartObject& request = *result;
request[strings::params][strings::message_type] = MessageType::kRequest;
request[strings::params][strings::function_id] = function_id;
request[strings::params][strings::correlation_id] = hmi_correlation_id;
@@ -232,13 +232,12 @@ void CommandRequestImpl::CreateHMINotification(
const hmi_apis::FunctionID::eType& function_id,
const NsSmart::SmartObject& msg_params) const {
- NsSmartDeviceLink::NsSmartObjects::SmartObject* result =
- new NsSmartDeviceLink::NsSmartObjects::SmartObject;
+ smart_objects::SmartObjectSPtr result = new smart_objects::SmartObject;
if (!result) {
LOG4CXX_ERROR(logger_, "Memory allocation failed.");
return;
}
- NsSmartDeviceLink::NsSmartObjects::SmartObject& notify = *result;
+ smart_objects::SmartObject& notify = *result;
notify[strings::params][strings::message_type] =
static_cast<int32_t>(application_manager::MessageType::kNotification);
@@ -369,11 +368,11 @@ bool CommandRequestImpl::CheckAllowedParameters() {
return true;
}
- typedef std::set<application_manager::ApplicationSharedPtr> ApplicationList;
ApplicationManagerImpl::ApplicationListAccessor accessor;
- ApplicationList app_list = accessor.applications();
- ApplicationList::const_iterator it_app_list = app_list.begin();
- ApplicationList::const_iterator it_app_list_end = app_list.end();
+ ApplicationManagerImpl::ApplictionSetConstIt it_app_list =
+ accessor.begin();
+ ApplicationManagerImpl::ApplictionSetConstIt it_app_list_end =
+ accessor.end();
for (; it_app_list != it_app_list_end; ++it_app_list) {
if (connection_key() == (*it_app_list).get()->app_id()) {
@@ -385,7 +384,10 @@ bool CommandRequestImpl::CheckAllowedParameters() {
smart_objects::SmartMap::iterator iter_end = s_map.map_end();
for (; iter != iter_end; ++iter) {
- params.push_back(iter->first);
+ if (true == iter->second.asBool()) {
+ LOG4CXX_INFO(logger_, "Request's param: " << iter->first);
+ params.push_back(iter->first);
+ }
}
}
@@ -393,7 +395,7 @@ bool CommandRequestImpl::CheckAllowedParameters() {
mobile_apis::Result::eType check_result =
application_manager::ApplicationManagerImpl::instance()->
CheckPolicyPermissions(
- (*it_app_list).get()->mobile_app_id()->asString(),
+ (*it_app_list).get()->mobile_app_id(),
(*it_app_list).get()->hmi_level(),
static_cast<mobile_api::FunctionID::eType>(function_id()),
params,
@@ -401,7 +403,7 @@ bool CommandRequestImpl::CheckAllowedParameters() {
// Check, if RPC is allowed by policy
if (mobile_apis::Result::SUCCESS != check_result) {
- smart_objects::SmartObject* response =
+ smart_objects::SmartObjectSPtr response =
MessageHelper::CreateBlockedByPoliciesResponse(
static_cast<mobile_api::FunctionID::eType>(function_id()),
check_result, correlation_id(), (*it_app_list)->app_id());
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 29d998640e..4b07a5dcfa 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
@@ -1,4 +1,4 @@
-/**
+/*
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
@@ -69,11 +69,11 @@ namespace application_manager {
void ActivateAppRequest::on_event(const event_engine::Event& event) {
- LOG4CXX_TRACE_ENTER(logger_);
- const smart_objects::SmartObject* response = &(event.smart_object());
+ LOG4CXX_AUTO_TRACE(logger_);
+ const smart_objects::SmartObject& response = event.smart_object();
const hmi_apis::Common_Result::eType code =
static_cast<hmi_apis::Common_Result::eType>(
- (*response)[strings::params][hmi_response::code].asInt());
+ response[strings::params][hmi_response::code].asInt());
if (hmi_apis::Common_Result::SUCCESS != code) {
LOG4CXX_ERROR(logger_, "Error ActivateApp result code " << code);
return;
@@ -82,8 +82,15 @@ namespace application_manager {
// Mobile id is converted to HMI id for HMI requests
const uint32_t hmi_app_id = ApplicationManagerImpl::instance()->
application_id(correlation_id);
- mobile_apis::HMILevel::eType requested_hmi_level = static_cast<mobile_apis::HMILevel::eType>(
- (*message_)[strings::msg_params][strings::activate_app_hmi_level].asInt());
+
+ mobile_apis::HMILevel::eType requested_hmi_level = mobile_apis::HMILevel::HMI_FULL;
+ if ((*message_)[strings::msg_params].keyExists(
+ strings::activate_app_hmi_level)) {
+ requested_hmi_level = static_cast<mobile_apis::HMILevel::eType>(
+ (*message_)[strings::msg_params][strings::activate_app_hmi_level].asInt());
+ LOG4CXX_INFO(logger_, "requested_hmi_level = " << requested_hmi_level);
+ }
+
if (0 == hmi_app_id) {
LOG4CXX_ERROR(logger_, "Error hmi_app_id = "<< hmi_app_id);
return;
@@ -95,8 +102,10 @@ namespace application_manager {
LOG4CXX_ERROR(logger_, "Application can't be activated.");
return;
}
+
if (mobile_apis::HMILevel::HMI_FULL == requested_hmi_level) {
if (ApplicationManagerImpl::instance()->ActivateApplication(application)) {
+ LOG4CXX_DEBUG(logger_, "Put Application in FULL succes");
MessageHelper::SendHMIStatusNotification(*(application.get()));
}
}
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 aba5886097..2f63198d82 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
@@ -1,4 +1,4 @@
-/**
+/*
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
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 c11621045e..73c9a49def 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
@@ -1,4 +1,4 @@
-/**
+/*
* Copyright (c) 2014, Ford Motor Company
* All rights reserved.
*
@@ -47,7 +47,7 @@ AddStatisticsInfoNotification::~AddStatisticsInfoNotification() {
}
void AddStatisticsInfoNotification::Run() {
- LOG4CXX_INFO(logger_, "AddStatisticsInfoNotification::Run");
+ LOG4CXX_AUTO_TRACE(logger_);
int type = (*message_)[strings::msg_params][hmi_notification::statistic_type]
.asInt();
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 6ac42c7a00..548238f00f 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
@@ -1,4 +1,4 @@
-/**
+/*
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
@@ -44,7 +44,7 @@ AllowAllAppsRequest::~AllowAllAppsRequest() {
}
void AllowAllAppsRequest::Run() {
- LOG4CXX_INFO(logger_, "AllowAllAppsRequest::Run");
+ LOG4CXX_AUTO_TRACE(logger_);
SendRequest();
}
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 69c52a3269..eca9363254 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
@@ -1,4 +1,4 @@
-/**
+/*
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
@@ -44,7 +44,7 @@ AllowAllAppsResponse::~AllowAllAppsResponse() {
}
void AllowAllAppsResponse::Run() {
- LOG4CXX_INFO(logger_, "AllowAllAppsResponse::Run");
+ LOG4CXX_AUTO_TRACE(logger_);
ApplicationManagerImpl::instance()->set_all_apps_allowed(
(*message_)[strings::msg_params][hmi_response::allowed].asBool());
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 302a8c6766..2f0d4bcc98 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
@@ -1,4 +1,4 @@
-/**
+/*
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
@@ -44,7 +44,7 @@ AllowAppRequest::~AllowAppRequest() {
}
void AllowAppRequest::Run() {
- LOG4CXX_INFO(logger_, "AllowAppRequest::Run");
+ LOG4CXX_AUTO_TRACE(logger_);
SendRequest();
}
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 035e41438d..7a7f3dd560 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
@@ -1,4 +1,4 @@
-/**
+/*
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
@@ -45,7 +45,7 @@ AllowAppResponse::~AllowAppResponse() {
}
void AllowAppResponse::Run() {
- LOG4CXX_INFO(logger_, "AllowAppResponse::Run");
+ LOG4CXX_AUTO_TRACE(logger_);
uint32_t connection_key =
(*message_)[strings::params][strings::connection_key].asInt();
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 0d2bcca4f4..d0251a7276 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
@@ -1,4 +1,4 @@
-/**
+/*
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
@@ -45,7 +45,7 @@ BasicCommunicationSystemRequest::~BasicCommunicationSystemRequest() {
}
void BasicCommunicationSystemRequest::Run() {
- LOG4CXX_INFO(logger_, "BasicCommunicationSystemRequest::Run");
+ LOG4CXX_AUTO_TRACE(logger_);
SendRequest();
}
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 dd9f657adc..6106266d19 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
@@ -1,4 +1,4 @@
-/**
+/*
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
@@ -45,7 +45,7 @@ BasicCommunicationSystemResponse::~BasicCommunicationSystemResponse() {
}
void BasicCommunicationSystemResponse::Run() {
- LOG4CXX_INFO(logger_, "BasicCommunicationSystemResponse::Run");
+ LOG4CXX_AUTO_TRACE(logger_);
event_engine::Event event(hmi_apis::FunctionID::BasicCommunication_SystemRequest);
event.set_smart_object(*message_);
event.raise();
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 e00b3fdc5a..87cf1aa783 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
@@ -1,4 +1,4 @@
-/**
+/*
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
@@ -46,7 +46,7 @@ ButtonGetCapabilitiesRequest::~ButtonGetCapabilitiesRequest() {
}
void ButtonGetCapabilitiesRequest::Run() {
- LOG4CXX_INFO(logger_, "ButtonGetCapabilitiesRequest::Run");
+ LOG4CXX_AUTO_TRACE(logger_);
SendRequest();
}
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 0b67234743..69cfbe49c5 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
@@ -1,4 +1,4 @@
-/**
+/*
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
@@ -46,7 +46,7 @@ ButtonGetCapabilitiesResponse::~ButtonGetCapabilitiesResponse() {
}
void ButtonGetCapabilitiesResponse::Run() {
- LOG4CXX_INFO(logger_, "ButtonGetCapabilitiesResponse::Run");
+ LOG4CXX_AUTO_TRACE(logger_);
HMICapabilities& hmi_capabilities =
ApplicationManagerImpl::instance()->hmi_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 3cc5818688..352a281348 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
@@ -1,4 +1,4 @@
-/**
+/*
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
@@ -44,7 +44,7 @@ ClosePopupRequest::~ClosePopupRequest() {
}
void ClosePopupRequest::Run() {
- LOG4CXX_INFO(logger_, "ClosePopupRequest::Run");
+ LOG4CXX_AUTO_TRACE(logger_);
SendRequest();
}
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 fa98be5e02..078d24ef2d 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
@@ -1,4 +1,4 @@
-/**
+/*
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
@@ -43,7 +43,7 @@ ClosePopupResponse::~ClosePopupResponse() {
}
void ClosePopupResponse::Run() {
- LOG4CXX_INFO(logger_, "ClosePopupResponse::Run");
+ LOG4CXX_AUTO_TRACE(logger_);
// TODO(VS): Process response from HMI
}
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 53a084d23e..9024331462 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
@@ -1,4 +1,4 @@
-/**
+/*
* Copyright (c) 2014, Ford Motor Company
* All rights reserved.
*
@@ -45,7 +45,7 @@ GetSystemInfoRequest::~GetSystemInfoRequest() {
}
void GetSystemInfoRequest::Run() {
- LOG4CXX_INFO(logger_, "GetSystemInfoRequest::Run");
+ LOG4CXX_AUTO_TRACE(logger_);
uint32_t correlation_id = RequestToHMI::correlation_id();
uint32_t app_id = RequestToHMI::application_id();
ApplicationManagerImpl::instance()->set_application_id(correlation_id, app_id);
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 090b04c3e3..7cfd1b5797 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
@@ -1,4 +1,4 @@
-/**
+/*
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
@@ -45,7 +45,7 @@ GetSystemInfoResponse::~GetSystemInfoResponse() {
}
void GetSystemInfoResponse::Run() {
- LOG4CXX_INFO(logger_, "GetSystemInfoResponse::Run");
+ LOG4CXX_AUTO_TRACE(logger_);
const hmi_apis::Common_Result::eType code =
static_cast<hmi_apis::Common_Result::eType>(
(*message_)[strings::params][hmi_response::code].asInt());
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 b3d0f60610..70ca40d1ed 100644
--- a/src/components/application_manager/src/commands/hmi/get_urls.cc
+++ b/src/components/application_manager/src/commands/hmi/get_urls.cc
@@ -1,4 +1,4 @@
-/**
+/*
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
@@ -46,27 +46,48 @@ GetUrls::~GetUrls() {
}
void GetUrls::Run() {
- LOG4CXX_INFO(logger_, "GetUrls::Run");
+ LOG4CXX_AUTO_TRACE(logger_);
smart_objects::SmartObject& object = *message_;
object[strings::params][strings::message_type] = MessageType::kResponse;
if (policy::PolicyHandler::instance()->PolicyEnabled()) {
- policy::EndpointUrls endpoints =
- policy::PolicyHandler::instance()->GetUpdateUrls(
- object[strings::msg_params][hmi_request::service].asInt());
- object[strings::msg_params].erase(hmi_request::service);
- object[strings::msg_params][hmi_response::urls] =
- smart_objects::SmartObject(smart_objects::SmartType_Array);
- for (size_t i = 0; i < endpoints.size(); ++i) {
- std::string url = endpoints[i].url.empty() ? "" : endpoints[i].url[0];
- object[strings::msg_params][hmi_response::urls][i][strings::url] = url;
- if (policy::kDefaultId != endpoints[i].app_id) {
- object[strings::msg_params][hmi_response::urls][i][hmi_response::policy_app_id] =
- endpoints[i].app_id;
+ policy::EndpointUrls endpoints;
+ policy::PolicyHandler::instance()->GetUpdateUrls(
+ object[strings::msg_params][hmi_request::service].asInt(), 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& urls =
+ object[strings::msg_params][hmi_response::urls];
+
+ size_t index = 0;
+
+ for (size_t i = 0; i < endpoints.size(); ++i) {
+ 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);
+ 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;
+ }
+ }
}
+ object[strings::params][hmi_response::code] =
+ hmi_apis::Common_Result::SUCCESS;
+ } else {
+ object[strings::params][hmi_response::code] =
+ hmi_apis::Common_Result::DATA_NOT_AVAILABLE;
}
- object[strings::params][hmi_response::code] = hmi_apis::Common_Result::SUCCESS;
} else {
- object[strings::params][hmi_response::code] = hmi_apis::Common_Result::DATA_NOT_AVAILABLE;
+ object[strings::params][hmi_response::code] =
+ hmi_apis::Common_Result::DATA_NOT_AVAILABLE;
}
ApplicationManagerImpl::instance()->ManageHMICommand(message_);
}
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 f8086affe3..b446f088bf 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
@@ -1,4 +1,4 @@
-/**
+/*
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
@@ -44,7 +44,7 @@ GetUrlsResponse::~GetUrlsResponse() {
}
void GetUrlsResponse::Run() {
- LOG4CXX_INFO(logger_, "GetUrlsResponse::Run");
+ LOG4CXX_AUTO_TRACE(logger_);
(*message_)[strings::params][strings::protocol_type] = hmi_protocol_type_;
(*message_)[strings::params][strings::protocol_version] = protocol_version_;
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 9ab4bf5dbb..059843355c 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
@@ -1,4 +1,4 @@
-/**
+/*
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
@@ -44,7 +44,7 @@ MixingAudioSupportedRequest::~MixingAudioSupportedRequest() {
}
void MixingAudioSupportedRequest::Run() {
- LOG4CXX_INFO(logger_, "MixingAudioSupportedRequest::Run");
+ LOG4CXX_AUTO_TRACE(logger_);
SendRequest();
}
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 4a4fc276de..2da8bdc453 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
@@ -1,4 +1,4 @@
-/**
+/*
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
@@ -44,7 +44,7 @@ MixingAudioSupportedResponse::~MixingAudioSupportedResponse() {
}
void MixingAudioSupportedResponse::Run() {
- LOG4CXX_INFO(logger_, "MixingAudioSupportedResponse::Run");
+ LOG4CXX_AUTO_TRACE(logger_);
HMICapabilities& hmi_capabilities =
ApplicationManagerImpl::instance()->hmi_capabilities();
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 7128231b11..77b3701904 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
@@ -1,4 +1,4 @@
-/**
+/*
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
@@ -44,7 +44,7 @@ NaviAlertManeuverRequest::~NaviAlertManeuverRequest() {
}
void NaviAlertManeuverRequest::Run() {
- LOG4CXX_INFO(logger_, "NaviAlertManeuverRequest::Run");
+ LOG4CXX_AUTO_TRACE(logger_);
SendRequest();
}
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 823c96211e..49d659777b 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
@@ -1,4 +1,4 @@
-/**
+/*
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
@@ -45,7 +45,7 @@ NaviAlertManeuverResponse::~NaviAlertManeuverResponse() {
}
void NaviAlertManeuverResponse::Run() {
- LOG4CXX_INFO(logger_, "NaviAlertManeuverResponse::Run");
+ LOG4CXX_AUTO_TRACE(logger_);
event_engine::Event event(hmi_apis::FunctionID::Navigation_AlertManeuver);
event.set_smart_object(*message_);
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 3c7a7d3ab5..3908238ada 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
@@ -1,4 +1,4 @@
-/**
+/*
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
@@ -45,7 +45,7 @@ AudioStartStreamRequest::~AudioStartStreamRequest() {
}
void AudioStartStreamRequest::Run() {
- LOG4CXX_INFO(logger_, "AudioStartStreamRequest::Run");
+ LOG4CXX_AUTO_TRACE(logger_);
SendRequest();
}
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 e4cc8f4cc6..0509028a94 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
@@ -1,4 +1,4 @@
-/**
+/*
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
@@ -45,7 +45,7 @@ AudioStartStreamResponse::~AudioStartStreamResponse() {
}
void AudioStartStreamResponse::Run() {
- LOG4CXX_INFO(logger_, "AudioStartStreamResponse::Run");
+ LOG4CXX_AUTO_TRACE(logger_);
ApplicationSharedPtr app =
ApplicationManagerImpl::instance()->active_application();
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 4052769d53..ea00d5bc3b 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
@@ -1,4 +1,4 @@
-/**
+/*
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
@@ -44,7 +44,7 @@ AudioStopStreamRequest::~AudioStopStreamRequest() {
}
void AudioStopStreamRequest::Run() {
- LOG4CXX_INFO(logger_, "AudioStopStreamRequest::Run");
+ LOG4CXX_AUTO_TRACE(logger_);
SendRequest();
}
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 81a6c62e8d..29e6708e19 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
@@ -1,4 +1,4 @@
-/**
+/*
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
@@ -43,7 +43,7 @@ AudioStopStreamResponse::~AudioStopStreamResponse() {
}
void AudioStopStreamResponse::Run() {
- LOG4CXX_INFO(logger_, "AudioStopStreamResponse::Run");
+ LOG4CXX_AUTO_TRACE(logger_);
}
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 b7a1799427..4c00908781 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
@@ -1,4 +1,4 @@
-/**
+/*
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
@@ -44,7 +44,7 @@ NaviIsReadyRequest::~NaviIsReadyRequest() {
}
void NaviIsReadyRequest::Run() {
- LOG4CXX_INFO(logger_, "NaviIsReadyRequest::Run");
+ LOG4CXX_AUTO_TRACE(logger_);
SendRequest();
}
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 8aef42b40d..a3387aec33 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
@@ -1,4 +1,4 @@
-/**
+/*
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
@@ -44,7 +44,7 @@ NaviIsReadyResponse::~NaviIsReadyResponse() {
}
void NaviIsReadyResponse::Run() {
- LOG4CXX_INFO(logger_, "NaviIsReadyResponse::Run");
+ LOG4CXX_AUTO_TRACE(logger_);
smart_objects::SmartObject& object = *message_;
bool is_available = false;
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 f396a24323..94d569c4ef 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
@@ -1,4 +1,4 @@
-/**
+/*
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
@@ -44,7 +44,7 @@ NaviSendLocationRequest::~NaviSendLocationRequest() {
}
void NaviSendLocationRequest::Run() {
- LOG4CXX_INFO(logger_, "NaviSendLocationRequest::Run");
+ LOG4CXX_AUTO_TRACE(logger_);
SendRequest();
}
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 944ced170c..7ec5a5907d 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
@@ -1,4 +1,4 @@
-/**
+/*
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
@@ -44,7 +44,7 @@ NaviSendLocationResponse::~NaviSendLocationResponse() {
}
void NaviSendLocationResponse::Run() {
- LOG4CXX_INFO(logger_, "NaviSendLocationResponse::Run");
+ LOG4CXX_AUTO_TRACE(logger_);
event_engine::Event event(hmi_apis::FunctionID::Navigation_SendLocation);
event.set_smart_object(*message_);
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 9103e1f6c4..b477dc8dab 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
@@ -1,4 +1,4 @@
-/**
+/*
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
@@ -44,7 +44,7 @@ NaviShowConstantTBTRequest::~NaviShowConstantTBTRequest() {
}
void NaviShowConstantTBTRequest::Run() {
- LOG4CXX_INFO(logger_, "NaviShowConstantTBTRequest::Run");
+ LOG4CXX_AUTO_TRACE(logger_);
SendRequest();
}
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 03c70dd81b..58878a3c0c 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
@@ -1,4 +1,4 @@
-/**
+/*
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
@@ -45,7 +45,7 @@ NaviShowConstantTBTResponse::~NaviShowConstantTBTResponse() {
}
void NaviShowConstantTBTResponse::Run() {
- LOG4CXX_INFO(logger_, "NaviShowConstantTBTResponse::Run");
+ LOG4CXX_AUTO_TRACE(logger_);
event_engine::Event event(hmi_apis::FunctionID::Navigation_ShowConstantTBT);
event.set_smart_object(*message_);
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 cb9dbd61e3..7ee3733e51 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
@@ -1,4 +1,4 @@
-/**
+/*
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
@@ -45,7 +45,7 @@ NaviStartStreamRequest::~NaviStartStreamRequest() {
}
void NaviStartStreamRequest::Run() {
- LOG4CXX_INFO(logger_, "NaviStartStreamRequest::Run");
+ LOG4CXX_AUTO_TRACE(logger_);
SendRequest();
}
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 79d51dcb66..c2de690d63 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
@@ -1,4 +1,4 @@
-/**
+/*
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
@@ -45,7 +45,7 @@ NaviStartStreamResponse::~NaviStartStreamResponse() {
}
void NaviStartStreamResponse::Run() {
- LOG4CXX_INFO(logger_, "NaviStartStreamResponse::Run");
+ LOG4CXX_AUTO_TRACE(logger_);
ApplicationSharedPtr app =
ApplicationManagerImpl::instance()->active_application();
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 2f1e14a122..3d74c27535 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
@@ -13,7 +13,7 @@ NaviStopStreamRequest::~NaviStopStreamRequest() {
}
void NaviStopStreamRequest::Run() {
- LOG4CXX_INFO(logger_, "NaviStopStreamRequest::Run");
+ LOG4CXX_AUTO_TRACE(logger_);
SendRequest();
}
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 c368940d5b..0603df6a65 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
@@ -1,4 +1,4 @@
-/**
+/*
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
@@ -43,7 +43,7 @@ NaviStopStreamResponse::~NaviStopStreamResponse() {
}
void NaviStopStreamResponse::Run() {
- LOG4CXX_INFO(logger_, "NaviStopStreamResponse::Run");
+ LOG4CXX_AUTO_TRACE(logger_);
}
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 d0df9ec867..37037245fa 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
@@ -1,4 +1,4 @@
-/**
+/*
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
@@ -44,7 +44,7 @@ NaviUpdateTurnListRequest::~NaviUpdateTurnListRequest() {
}
void NaviUpdateTurnListRequest::Run() {
- LOG4CXX_INFO(logger_, "NaviUpdateTurnListRequest::Run");
+ LOG4CXX_AUTO_TRACE(logger_);
SendRequest();
}
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 d93b67bb52..d196db93e9 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
@@ -1,4 +1,4 @@
-/**
+/*
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
@@ -45,7 +45,7 @@ NaviUpdateTurnListResponse::~NaviUpdateTurnListResponse() {
}
void NaviUpdateTurnListResponse::Run() {
- LOG4CXX_INFO(logger_, "NaviUpdateTurnListResponse::Run");
+ LOG4CXX_AUTO_TRACE(logger_);
event_engine::Event event(hmi_apis::FunctionID::Navigation_UpdateTurnList);
event.set_smart_object(*message_);
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 2b7ec13c43..9c483459e1 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
@@ -42,7 +42,7 @@ NotificationFromHMI::NotificationFromHMI(const MessageSharedPtr& message)
: CommandImpl(message) {
// Replace HMI app id with Mobile connection id
- ApplicationManagerImpl::instance()->ReplaceHMIByMobileAppId(*(message.get()));
+ ApplicationManagerImpl::instance()->ReplaceHMIByMobileAppId(*message);
}
NotificationFromHMI::~NotificationFromHMI() {
@@ -61,15 +61,17 @@ void NotificationFromHMI::Run() {
void NotificationFromHMI::SendNotificationToMobile(
const MessageSharedPtr& message) {
+
+ (*message)[strings::params][strings::message_type] =
+ static_cast<int32_t>(application_manager::MessageType::kNotification);
ApplicationManagerImpl::instance()->ManageMobileCommand(message);
}
void NotificationFromHMI::CreateHMIRequest(
const hmi_apis::FunctionID::eType& function_id,
- const NsSmartObj::SmartObject& msg_params) const {
+ const smart_objects::SmartObject& msg_params) const {
- NsSmartDeviceLink::NsSmartObjects::SmartObject* result =
- new NsSmartDeviceLink::NsSmartObjects::SmartObject;
+ smart_objects::SmartObjectSPtr result = new smart_objects::SmartObject;
if (!result) {
LOG4CXX_ERROR(logger_, "Memory allocation failed.");
return;
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 020428d6c0..506413ce1e 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
@@ -1,4 +1,4 @@
-/**
+/*
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
@@ -46,7 +46,7 @@ OnAllowSDLFunctionalityNotification::~OnAllowSDLFunctionalityNotification() {
}
void OnAllowSDLFunctionalityNotification::Run() {
- LOG4CXX_INFO(logger_, "OnAllowSDLFunctionalityNotification::Run");
+ LOG4CXX_AUTO_TRACE(logger_);
uint32_t device_id = 0;
if ((*message_)[strings::msg_params].keyExists("device")) {
device_id = (*message_)[strings::msg_params]["device"]["id"].asUInt();
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 8152244a9c..7e60eaadaf 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
@@ -1,4 +1,4 @@
-/**
+/*
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
@@ -48,7 +48,7 @@ OnAppActivatedNotification::~OnAppActivatedNotification() {
}
void OnAppActivatedNotification::Run() {
- LOG4CXX_INFO(logger_, "OnAppActivatedNotification::Run");
+ LOG4CXX_AUTO_TRACE(logger_);
uint32_t app_id = ((*message_)[strings::msg_params][strings::app_id]).asUInt();
MessageHelper::SendActivateAppToHMI(app_id);
}
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 19dd91ab2a..1d55044f7a 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
@@ -1,4 +1,4 @@
-/**
+/*
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
@@ -35,6 +35,7 @@
#include "application_manager/application_impl.h"
#include "application_manager/message_helper.h"
#include "config_profile/profile.h"
+#include "utils/helpers.h"
namespace application_manager {
@@ -49,7 +50,7 @@ OnAppDeactivatedNotification::~OnAppDeactivatedNotification() {
}
void OnAppDeactivatedNotification::Run() {
- LOG4CXX_INFO(logger_, "OnAppDeactivatedNotification::Run");
+ LOG4CXX_AUTO_TRACE(logger_);
uint32_t app_id = (*message_)[strings::msg_params][strings::app_id].asUInt();
ApplicationSharedPtr app =
ApplicationManagerImpl::instance()->application(app_id);
@@ -58,11 +59,13 @@ void OnAppDeactivatedNotification::Run() {
return;
}
+ using namespace mobile_apis::HMILevel;
+ using namespace helpers;
if (!(((hmi_apis::Common_DeactivateReason::AUDIO ==
(*message_)[strings::msg_params][hmi_request::reason].asInt()) ||
(hmi_apis::Common_DeactivateReason::PHONECALL ==
(*message_)[strings::msg_params][hmi_request::reason].asInt())) &&
- (app->hmi_level() == mobile_api::HMILevel::eType::HMI_LIMITED))) {
+ (app->hmi_level() == HMI_LIMITED))) {
app = ApplicationManagerImpl::instance()->active_application();
if (!app.valid()) {
LOG4CXX_ERROR_EXT(logger_, "OnAppDeactivatedNotification no active app!");
@@ -74,10 +77,11 @@ void OnAppDeactivatedNotification::Run() {
}
}
- if (mobile_api::HMILevel::eType::HMI_NONE == app->hmi_level()) {
+ if (HMI_NONE == app->hmi_level()) {
return;
}
+ eType new_hmi_level = app->hmi_level();
switch ((*message_)[strings::msg_params][hmi_request::reason].asInt()) {
case hmi_apis::Common_DeactivateReason::AUDIO: {
if (app->is_media_application()) {
@@ -89,29 +93,14 @@ void OnAppDeactivatedNotification::Run() {
app->set_audio_streaming_state(mobile_api::AudioStreamingState::NOT_AUDIBLE);
}
}
- // switch HMI level for all applications in FULL or LIMITED
- ApplicationManagerImpl::ApplicationListAccessor accessor;
- ApplicationManagerImpl::TAppList applications =
- accessor.applications();
- ApplicationManagerImpl::TAppListIt it =
- applications.begin();
- for (; applications.end() != it; ++it) {
- ApplicationSharedPtr app = *it;
- if (app.valid()) {
- if (mobile_apis::HMILevel::eType::HMI_FULL == app->hmi_level() ||
- mobile_apis::HMILevel::eType::HMI_LIMITED == app->hmi_level()) {
- app->set_hmi_level(mobile_api::HMILevel::HMI_BACKGROUND);
- MessageHelper::SendHMIStatusNotification(*app);
- }
- }
+ // HMI must send this notification for each active app
+ if (app.valid()) {
+ if (Compare<eType, EQ, ONE>(app->hmi_level(), HMI_FULL, HMI_LIMITED)) {
+ new_hmi_level = HMI_BACKGROUND;
+ }
}
break;
}
- case hmi_apis::Common_DeactivateReason::PHONECALL: {
- app->set_audio_streaming_state(mobile_api::AudioStreamingState::NOT_AUDIBLE);
- app->set_hmi_level(mobile_api::HMILevel::HMI_BACKGROUND);
- break;
- }
case hmi_apis::Common_DeactivateReason::NAVIGATIONMAP:
case hmi_apis::Common_DeactivateReason::PHONEMENU:
case hmi_apis::Common_DeactivateReason::SYNCSETTINGS:
@@ -119,9 +108,9 @@ void OnAppDeactivatedNotification::Run() {
if ((!app->IsAudioApplication()) ||
ApplicationManagerImpl::instance()->
DoesAudioAppWithSameHMITypeExistInFullOrLimited(app)) {
- app->set_hmi_level(mobile_api::HMILevel::HMI_BACKGROUND);
+ new_hmi_level = HMI_BACKGROUND;
} else {
- app->set_hmi_level(mobile_api::HMILevel::HMI_LIMITED);
+ new_hmi_level = HMI_LIMITED;
}
break;
}
@@ -131,7 +120,11 @@ void OnAppDeactivatedNotification::Run() {
}
}
- MessageHelper::SendHMIStatusNotification(*app);
+ if (new_hmi_level != app->hmi_level()) {
+ ApplicationManagerImpl::instance()->ChangeAppsHMILevel(app->app_id(),
+ new_hmi_level);
+ MessageHelper::SendHMIStatusNotification(*app);
+ }
}
} // namespace commands
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 26d580e83a..c786b486f4 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
@@ -1,4 +1,4 @@
-/**
+/*
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
@@ -45,7 +45,7 @@ OnAppPermissionChangedNotification::~OnAppPermissionChangedNotification() {
}
void OnAppPermissionChangedNotification::Run() {
- LOG4CXX_INFO(logger_, "OnAppPermissionChangedNotification::Run");
+ LOG4CXX_AUTO_TRACE(logger_);
SendNotification();
}
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 951a2ebdf1..69a18200fa 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
@@ -48,7 +48,7 @@ OnAppPermissionConsentNotification::~OnAppPermissionConsentNotification() {
}
void OnAppPermissionConsentNotification::Run() {
- LOG4CXX_INFO(logger_, "OnAppPermissionConsentNotification::Run");
+ LOG4CXX_AUTO_TRACE(logger_);
smart_objects::SmartObject& msg_params = (*message_)[strings::msg_params];
uint32_t connection_key = 0;
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 26bc396db6..0b7f1cd860 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
@@ -1,4 +1,4 @@
-/**
+/*
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
@@ -45,8 +45,10 @@ OnAppRegisteredNotification::~OnAppRegisteredNotification() {
}
void OnAppRegisteredNotification::Run() {
- LOG4CXX_INFO(logger_, "OnAppRegisteredNotification::Run");
-
+ LOG4CXX_AUTO_TRACE(logger_);
+ event_engine::Event event(hmi_apis::FunctionID::BasicCommunication_OnAppRegistered);
+ event.set_smart_object(*message_);
+ event.raise();
SendNotification();
}
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 2bedcb0631..571c6f381c 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
@@ -1,4 +1,4 @@
-/**
+/*
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
@@ -46,7 +46,7 @@ OnAppUnregisteredNotification::~OnAppUnregisteredNotification() {
}
void OnAppUnregisteredNotification::Run() {
- LOG4CXX_INFO(logger_, "OnAppUnregisteredNotification::Run");
+ LOG4CXX_AUTO_TRACE(logger_);
//sending event for delete VRCommand on PerformInteraction
event_engine::Event event(hmi_apis::FunctionID::BasicCommunication_OnAppUnregistered);
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 23aceaa7d6..2beffc2bdd 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
@@ -1,4 +1,4 @@
-/**
+/*
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
@@ -46,7 +46,7 @@ OnButtonEventNotification::OnButtonEventNotification(
}
void OnButtonEventNotification::Run() {
- LOG4CXX_INFO(logger_, "OnButtonEventNotification::Run");
+ LOG4CXX_AUTO_TRACE(logger_);
(*message_)[strings::params][strings::function_id] =
static_cast<int32_t>(mobile_apis::FunctionID::OnButtonEventID);
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 83bcbd7efa..261aa68ee7 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
@@ -1,4 +1,4 @@
-/**
+/*
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
@@ -47,7 +47,7 @@ OnButtonPressNotification::OnButtonPressNotification(
}
void OnButtonPressNotification::Run() {
- LOG4CXX_INFO(logger_, "OnButtonPressNotification::Run");
+ LOG4CXX_AUTO_TRACE(logger_);
event_engine::Event event(hmi_apis::FunctionID::Buttons_OnButtonPress);
event.set_smart_object(*message_);
event.raise();
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 537c246f42..5d73c7b80e 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
@@ -1,4 +1,4 @@
-/**
+/*
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
@@ -45,7 +45,7 @@ OnDeviceChosenNotification::~OnDeviceChosenNotification() {
}
void OnDeviceChosenNotification::Run() {
- LOG4CXX_INFO(logger_, "OnDeviceChosenNotification::Run");
+ LOG4CXX_AUTO_TRACE(logger_);
if ((*message_)[strings::msg_params].keyExists(strings::device_info)) {
ApplicationManagerImpl::instance()->ConnectToDevice(
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 8af2571b55..fbb2bcfe93 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
@@ -1,4 +1,4 @@
-/**
+/*
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
@@ -30,10 +30,47 @@
* POSSIBILITY OF SUCH DAMAGE.
*/
+#include <algorithm>
#include "application_manager/commands/hmi/on_device_state_changed_notification.h"
#include "application_manager/policies/policy_handler.h"
#include "application_manager/message_helper.h"
#include "interfaces/HMI_API.h"
+#include "encryption/hashing.h"
+
+namespace {
+ // TODO(AOleynik) : replace this !!!
+ void check_zero(const char& a, const char& b, std::string& bt_mac) {
+ if ('0' != a && '0' == b) {
+ bt_mac.push_back(a);
+ bt_mac.push_back(b);
+ } else if ('0' == a) {
+ bt_mac.push_back(b);
+ } else {
+ bt_mac.push_back(a);
+ bt_mac.push_back(b);
+ }
+ }
+
+ std::string convert_to_bt_mac(std::string& deviceInternalId) {
+ std::transform(deviceInternalId.begin(), deviceInternalId.end(),deviceInternalId.begin(), ::tolower);
+
+ std::string bt_mac;
+ check_zero(deviceInternalId[10], deviceInternalId[11], bt_mac);
+ bt_mac.push_back(':');
+ check_zero(deviceInternalId[8], deviceInternalId[9], bt_mac);
+ bt_mac.push_back(':');
+ check_zero(deviceInternalId[6], deviceInternalId[7], bt_mac);
+ bt_mac.push_back(':');
+ check_zero(deviceInternalId[4], deviceInternalId[5], bt_mac);
+ bt_mac.push_back(':');
+ check_zero(deviceInternalId[2], deviceInternalId[3], bt_mac);
+ bt_mac.push_back(':');
+ check_zero(deviceInternalId[0], deviceInternalId[1], bt_mac);
+
+ return bt_mac;
+ }
+
+}
namespace application_manager {
@@ -48,10 +85,12 @@ OnDeviceStateChangedNotification::~OnDeviceStateChangedNotification() {
}
void OnDeviceStateChangedNotification::Run() {
- LOG4CXX_INFO(logger_, "OnDeviceStateChangedNotification::Run");
+ LOG4CXX_AUTO_TRACE(logger_);
if ((*message_)[strings::msg_params]["deviceState"]
== hmi_apis::Common_DeviceState::UNPAIRED) {
+ // It is expected, that "deviceInternalId" is the device MAC address in
+ // form XXXXXXXXXX
std::string device_id = (*message_)[strings::msg_params]["deviceInternalId"]
.asString();
if (device_id.empty()) {
@@ -59,6 +98,13 @@ void OnDeviceStateChangedNotification::Run() {
device_id = MessageHelper::GetDeviceMacAddressForHandle(
(*message_)[strings::msg_params]["deviceId"]["id"].asInt());
}
+ } else {
+ // Policy uses hashed MAC address as device_id
+ LOG4CXX_DEBUG(logger_,"Device_id from HMI: " << device_id);
+ std::string bt_mac = convert_to_bt_mac(device_id);
+ LOG4CXX_DEBUG(logger_,"Device_id as BT MAC: " << bt_mac);
+ device_id = encryption::MakeHash(bt_mac);
+ LOG4CXX_DEBUG(logger_,"Device_id hashed as BT MAC : " << device_id);
}
policy::PolicyHandler::instance()->RemoveDevice(device_id);
}
@@ -67,4 +113,3 @@ void OnDeviceStateChangedNotification::Run() {
} // namespace commands
} // namespace application_manager
-
diff --git a/src/components/application_manager/src/commands/hmi/on_driver_distraction_notification.cc b/src/components/application_manager/src/commands/hmi/on_driver_distraction_notification.cc
index d5a8edc48d..fc9dcc6f8e 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
@@ -1,4 +1,4 @@
-/**
+/*
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
@@ -52,7 +52,7 @@ OnDriverDistractionNotification::~OnDriverDistractionNotification() {
}
void OnDriverDistractionNotification::Run() {
- LOG4CXX_INFO(logger_, "OnDriverDistractionNotification::Run");
+ LOG4CXX_AUTO_TRACE(logger_);
const hmi_apis::Common_DriverDistractionState::eType state =
static_cast<hmi_apis::Common_DriverDistractionState::eType>(
@@ -60,10 +60,10 @@ void OnDriverDistractionNotification::Run() {
.asInt());
ApplicationManagerImpl::instance()->set_driver_distraction(state);
- MessageSharedPtr on_driver_distraction =
+ smart_objects::SmartObjectSPtr on_driver_distraction =
new smart_objects::SmartObject();
- if (false == on_driver_distraction.valid()) {
+ if (!on_driver_distraction) {
LOG4CXX_ERROR_EXT(logger_, "NULL pointer");
return;
}
@@ -75,12 +75,12 @@ void OnDriverDistractionNotification::Run() {
state;
ApplicationManagerImpl::ApplicationListAccessor accessor;
- const std::set<ApplicationSharedPtr> applications = accessor.applications();
+ const ApplicationManagerImpl::ApplictionSet applications = accessor.applications();
- std::set<ApplicationSharedPtr>::const_iterator it = applications.begin();
+ ApplicationManagerImpl::ApplictionSetConstIt it = applications.begin();
for (; applications.end() != it; ++it) {
- ApplicationSharedPtr app = *it;
- if (app.valid()) {
+ const ApplicationSharedPtr app = *it;
+ if (app) {
if (mobile_apis::HMILevel::eType::HMI_NONE != app->hmi_level()) {
(*on_driver_distraction)[strings::params]
[strings::connection_key] = app->app_id();
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 b284c81f21..7c09800d21 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
@@ -52,11 +52,12 @@ OnExitAllApplicationsNotification::~OnExitAllApplicationsNotification() {
}
void OnExitAllApplicationsNotification::Run() {
- LOG4CXX_INFO(logger_, "OnExitAllApplicationsNotification::Run");
+ LOG4CXX_AUTO_TRACE(logger_);
const hmi_apis::Common_ApplicationsCloseReason::eType reason =
static_cast<hmi_apis::Common_ApplicationsCloseReason::eType>(
(*message_)[strings::msg_params][hmi_request::reason].asInt());
+ LOG4CXX_DEBUG(logger_, "Reason " << reason);
mobile_api::AppInterfaceUnregisteredReason::eType mob_reason =
mobile_api::AppInterfaceUnregisteredReason::INVALID_ENUM;
@@ -77,7 +78,6 @@ void OnExitAllApplicationsNotification::Run() {
break;
}
case hmi_apis::Common_ApplicationsCloseReason::SUSPEND: {
- app_manager->HeadUnitSuspend();
SendOnSDLPersistenceComplete();
return;
}
@@ -93,15 +93,13 @@ void OnExitAllApplicationsNotification::Run() {
mobile_api::AppInterfaceUnregisteredReason::FACTORY_DEFAULTS == mob_reason) {
app_manager->HeadUnitReset(mob_reason);
}
-
kill(getpid(), SIGINT);
}
void OnExitAllApplicationsNotification::SendOnSDLPersistenceComplete() {
- LOG4CXX_INFO(logger_, ""
- "OnExitAllApplicationsNotification::SendOnSDLPersistenceComplete");
+ LOG4CXX_AUTO_TRACE(logger_);
- smart_objects::SmartObject* message =
+ smart_objects::SmartObjectSPtr message =
new smart_objects::SmartObject(smart_objects::SmartType_Map);
(*message)[strings::params][strings::function_id] =
hmi_apis::FunctionID::BasicCommunication_OnSDLPersistenceComplete;
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 f4aed61392..9cb40bd645 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
@@ -1,4 +1,4 @@
-/**
+/*
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
@@ -49,7 +49,7 @@ OnExitApplicationNotification::~OnExitApplicationNotification() {
}
void OnExitApplicationNotification::Run() {
- LOG4CXX_INFO(logger_, "OnExitApplicationNotification::Run");
+ LOG4CXX_AUTO_TRACE(logger_);
ApplicationManagerImpl* app_mgr = ApplicationManagerImpl::instance();
ApplicationSharedPtr app_impl = app_mgr->application(
@@ -70,7 +70,10 @@ void OnExitApplicationNotification::Run() {
break;
}
}
- app_impl->set_hmi_level(mobile_apis::HMILevel::HMI_NONE);
+
+ ApplicationManagerImpl::instance()->ChangeAppsHMILevel(app_impl->app_id(),
+ mobile_apis::HMILevel::HMI_NONE);
+
app_impl->set_audio_streaming_state(mobile_apis::AudioStreamingState::NOT_AUDIBLE);
app_impl->set_system_context(mobile_api::SystemContext::SYSCTXT_MAIN);
MessageHelper::SendHMIStatusNotification(*app_impl);
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 f1a590ee04..83c3e61a0c 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
@@ -1,4 +1,4 @@
-/**
+/*
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
@@ -45,7 +45,7 @@ OnFileRemovedNotification::~OnFileRemovedNotification() {
}
void OnFileRemovedNotification::Run() {
- LOG4CXX_INFO(logger_, "OnFileRemovedNotification::Run");
+ LOG4CXX_AUTO_TRACE(logger_);
SendNotification();
}
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 bc32ab1cf0..fc1b72c73a 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
@@ -1,4 +1,4 @@
-/**
+/*
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
@@ -44,7 +44,7 @@ OnFindApplications::~OnFindApplications() {
}
void OnFindApplications::Run() {
- LOG4CXX_INFO(logger_, "OnFindApplications::Run");
+ LOG4CXX_AUTO_TRACE(logger_);
// TODO(PV): add UpdateAppsOnDevice to ApplicationManager
}
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 523013734f..32babf05cc 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
@@ -1,4 +1,4 @@
-/**
+/*
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
@@ -46,7 +46,7 @@ OnIgnitionCycleOverNotification::~OnIgnitionCycleOverNotification() {
}
void OnIgnitionCycleOverNotification::Run() {
- LOG4CXX_INFO(logger_, "OnIgnitionCycleOverNotification::Run");
+ LOG4CXX_AUTO_TRACE(logger_);
policy::PolicyHandler::instance()->OnIgnitionCycleOver();
}
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 a68ae90796..87db5d4a38 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
@@ -1,4 +1,4 @@
-/**
+/*
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
@@ -46,7 +46,7 @@ OnNaviTBTClientStateNotification::~OnNaviTBTClientStateNotification() {
}
void OnNaviTBTClientStateNotification::Run() {
- LOG4CXX_INFO(logger_, "OnNaviTBTClientStateNotification::Run");
+ LOG4CXX_AUTO_TRACE(logger_);
// prepare SmartObject for mobile factory
(*message_)[strings::params][strings::function_id] =
diff --git a/src/components/application_manager/src/commands/hmi/on_phone_call_notification.cc b/src/components/application_manager/src/commands/hmi/on_phone_call_notification.cc
index 9bd9099c75..9cee8801e7 100644
--- a/src/components/application_manager/src/commands/hmi/on_phone_call_notification.cc
+++ b/src/components/application_manager/src/commands/hmi/on_phone_call_notification.cc
@@ -1,4 +1,4 @@
-/**
+/*
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
@@ -50,7 +50,7 @@ OnPhoneCallNotification::~OnPhoneCallNotification() {
}
void OnPhoneCallNotification::Run() {
- LOG4CXX_INFO(logger_, "OnPhoneCallNotification::Run");
+ LOG4CXX_AUTO_TRACE(logger_);
bool is_active =
(*message_)[strings::msg_params][hmi_notification::is_active].asBool();
diff --git a/src/components/application_manager/src/commands/hmi/on_play_tone_notification.cc b/src/components/application_manager/src/commands/hmi/on_play_tone_notification.cc
index e05b38d456..9820bb02ad 100644
--- a/src/components/application_manager/src/commands/hmi/on_play_tone_notification.cc
+++ b/src/components/application_manager/src/commands/hmi/on_play_tone_notification.cc
@@ -1,4 +1,4 @@
-/**
+/*
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
@@ -44,7 +44,7 @@ OnPlayToneNotification::~OnPlayToneNotification() {
}
void OnPlayToneNotification::Run() {
- LOG4CXX_INFO(logger_, "OnPlayToneNotification::Run");
+ LOG4CXX_AUTO_TRACE(logger_);
SendNotification();
}
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 b3f5803d44..56c544888a 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
@@ -1,4 +1,4 @@
-/**
+/*
* Copyright (c) 2014, Ford Motor Company
* All rights reserved.
*
@@ -44,7 +44,7 @@ OnPolicyUpdate::~OnPolicyUpdate() {
}
void OnPolicyUpdate::Run() {
- LOG4CXX_INFO(logger_, "OnPolicyUpdate::Run");
+ LOG4CXX_AUTO_TRACE(logger_);
policy::PolicyHandler::instance()->OnPTExchangeNeeded();
}
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 2fecbec9c7..cf0297df01 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
@@ -1,4 +1,4 @@
-/**
+/*
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
@@ -46,7 +46,7 @@ OnPutFileNotification::~OnPutFileNotification() {
}
void OnPutFileNotification::Run() {
- LOG4CXX_INFO(logger_, "OnPutFileNotification::Run");
+ LOG4CXX_AUTO_TRACE(logger_);
SendNotification();
}
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 783aa4af40..f1ac8b6d3c 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
@@ -1,4 +1,4 @@
-/**
+/*
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
@@ -45,7 +45,7 @@ OnReadyNotification::~OnReadyNotification() {
}
void OnReadyNotification::Run() {
- LOG4CXX_INFO(logger_, "OnReadyNotification::Run");
+ LOG4CXX_AUTO_TRACE(logger_);
ApplicationManagerImpl::instance()->OnHMIStartedCooperation();
event_engine::Event event(hmi_apis::FunctionID::BasicCommunication_OnReady);
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 1e517f35de..a5ea29c6d2 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
@@ -1,4 +1,4 @@
-/**
+/*
* Copyright (c) 2014, Ford Motor Company
* All rights reserved.
*
@@ -47,7 +47,7 @@ OnReceivedPolicyUpdate::~OnReceivedPolicyUpdate() {
}
void OnReceivedPolicyUpdate::Run() {
- LOG4CXX_INFO(logger_, "OnReceivedPolicyUpdate::Run");
+ LOG4CXX_AUTO_TRACE(logger_);
const std::string& file_path =
(*message_)[strings::msg_params][hmi_notification::policyfile].asString();
policy::BinaryMessage file_content;
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 e0dae8f045..163b525628 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
@@ -1,4 +1,4 @@
-/**
+/*
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
@@ -45,7 +45,7 @@ OnRecordStartdNotification::~OnRecordStartdNotification() {
}
void OnRecordStartdNotification::Run() {
- LOG4CXX_INFO(logger_, "OnRecordStartdNotification::Run");
+ LOG4CXX_AUTO_TRACE(logger_);
SendNotification();
}
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 70868b826f..8e00c3447c 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
@@ -1,4 +1,4 @@
-/**
+/*
* Copyright (c) 2014, Ford Motor Company
* All rights reserved.
*
@@ -46,7 +46,7 @@ OnResumeAudioSourceNotification::~OnResumeAudioSourceNotification() {
}
void OnResumeAudioSourceNotification::Run() {
- LOG4CXX_INFO(logger_, "OnResumeAudioSourceNotification::Run");
+ LOG4CXX_AUTO_TRACE(logger_);
SendNotification();
}
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 70240b4bf6..c393219134 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
@@ -1,4 +1,4 @@
-/**
+/*
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
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 1fda4986e4..20010111fd 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
@@ -46,7 +46,7 @@ OnSDLConsentNeededNotification::~OnSDLConsentNeededNotification() {
}
void OnSDLConsentNeededNotification::Run() {
- LOG4CXX_INFO(logger_, "OnSDLConsentNeededNotification::Run");
+ LOG4CXX_AUTO_TRACE(logger_);
SendNotification();
}
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 d71413ef85..afe0ffeabc 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
@@ -1,4 +1,4 @@
-/**
+/*
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
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 fc5ffed42c..6f867adbcd 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
@@ -1,4 +1,4 @@
-/**
+/*
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
@@ -45,7 +45,7 @@ OnStartDeviceDiscovery::~OnStartDeviceDiscovery() {
}
void OnStartDeviceDiscovery::Run() {
- LOG4CXX_INFO(logger_, "OnStartDeviceDiscovery::Run");
+ LOG4CXX_AUTO_TRACE(logger_);
ApplicationManagerImpl::instance()->StartDevicesDiscovery();
}
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 6e4e65987e..7db0053e2d 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
@@ -1,4 +1,4 @@
-/**
+/*
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
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 5a5c12b907..8dbd1e13e4 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
@@ -1,4 +1,4 @@
-/**
+/*
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
@@ -47,7 +47,7 @@ OnSystemContextNotification::~OnSystemContextNotification() {
}
void OnSystemContextNotification::Run() {
- LOG4CXX_INFO(logger_, "OnSystemContextNotification::Run");
+ LOG4CXX_AUTO_TRACE(logger_);
mobile_api::SystemContext::eType system_context =
static_cast<mobile_api::SystemContext::eType>(
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 bac3d37359..09a96cc797 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
@@ -1,4 +1,4 @@
-/**
+/*
* Copyright (c) 2014, Ford Motor Company
* All rights reserved.
*
@@ -47,7 +47,7 @@ OnSystemErrorNotification::~OnSystemErrorNotification() {
}
void OnSystemErrorNotification::Run() {
- LOG4CXX_INFO(logger_, "OnSystemErrorNotification::Run");
+ LOG4CXX_AUTO_TRACE(logger_);
int code = (*message_)[strings::msg_params][hmi_notification::error]
.asInt();
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 ec8460d581..fb5a9abc43 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
@@ -1,4 +1,4 @@
-/**
+/*
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
@@ -47,7 +47,7 @@ OnSystemInfoChangedNotification::~OnSystemInfoChangedNotification() {
}
void OnSystemInfoChangedNotification::Run() {
- LOG4CXX_INFO(logger_, "OnSystemInfoChangedNotification::Run");
+ LOG4CXX_AUTO_TRACE(logger_);
uint32_t lang_code =
(*message_)[strings::msg_params][strings::language].asUInt();
const std::string language =
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 e3d0ea511d..a77bd24766 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
@@ -1,4 +1,4 @@
-/**
+/*
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
@@ -52,7 +52,7 @@ OnSystemRequestNotification::~OnSystemRequestNotification() {
}
void OnSystemRequestNotification::Run() {
- LOG4CXX_INFO(logger_, "OnSystemRequestNotification::Run");
+ LOG4CXX_AUTO_TRACE(logger_);
smart_objects::SmartObject& params = (*message_)[strings::params];
smart_objects::SmartObject& msg_params = (*message_)[strings::msg_params];
@@ -60,7 +60,8 @@ void OnSystemRequestNotification::Run() {
params[strings::function_id] =
static_cast<int32_t>(mobile_apis::FunctionID::eType::OnSystemRequestID);
- std::string app_id = msg_params[strings::app_id].asString();
+ const std::string app_id = msg_params[strings::app_id].asString();
+ LOG4CXX_DEBUG(logger_, "Received OnSystemRequest for " << app_id );
if (strings::default_app_id == app_id) {
PolicyHandler* policy_handler = PolicyHandler::instance();
@@ -81,7 +82,8 @@ void OnSystemRequestNotification::Run() {
ApplicationSharedPtr app =
ApplicationManagerImpl::instance()->application_by_policy_id(app_id);
if (!app.valid()) {
- LOG4CXX_WARN(logger_, "Application with such id is not yet registered.");
+ LOG4CXX_WARN(logger_, "Application with id " << app_id
+ << " is not registered.");
return;
}
params[strings::connection_key] = app->app_id();
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 60c0dca10a..5dba6400b8 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
@@ -1,4 +1,4 @@
-/**
+/*
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
@@ -49,7 +49,7 @@ OnTTSLanguageChangeNotification::~OnTTSLanguageChangeNotification() {
}
void OnTTSLanguageChangeNotification::Run() {
- LOG4CXX_INFO(logger_, "OnTTSLanguageChangeNotification::Run");
+ LOG4CXX_AUTO_TRACE(logger_);
HMICapabilities& hmi_capabilities =
ApplicationManagerImpl::instance()->hmi_capabilities();
@@ -71,10 +71,9 @@ void OnTTSLanguageChangeNotification::Run() {
static_cast<int32_t>(mobile_apis::FunctionID::OnLanguageChangeID);
ApplicationManagerImpl::ApplicationListAccessor accessor;
- const std::set<ApplicationSharedPtr> applications = accessor.applications();
- std::set<ApplicationSharedPtr>::iterator it = applications.begin();
- for (;applications.end() != it; ++it) {
+ ApplicationManagerImpl::ApplictionSetIt it = accessor.begin();
+ for (;accessor.end() != it; ++it) {
ApplicationSharedPtr app = (*it);
(*message_)[strings::params][strings::connection_key] = app->app_id();
SendNotificationToMobile(message_);
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 047a5d985d..96089384c4 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
@@ -16,7 +16,7 @@ OnTTSResetTimeoutNotification::~OnTTSResetTimeoutNotification() {
}
void OnTTSResetTimeoutNotification::Run() {
- LOG4CXX_INFO(logger_, "OnTTSResetTimeoutNotification::Run");
+ LOG4CXX_AUTO_TRACE(logger_);
event_engine::Event event(hmi_apis::FunctionID::TTS_OnResetTimeout);
event.set_smart_object(*message_);
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 519fc290d9..8213474c09 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
@@ -1,4 +1,4 @@
-/**
+/*
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
@@ -46,7 +46,7 @@ OnTTSStartedNotification::~OnTTSStartedNotification() {
}
void OnTTSStartedNotification::Run() {
- LOG4CXX_INFO(logger_, "OnTTSStartedNotification::Run");
+ LOG4CXX_AUTO_TRACE(logger_);
ApplicationManagerImpl::instance()->Mute(kTTSSessionChanging);
}
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 b3e3683f32..c812c84af5 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
@@ -1,4 +1,4 @@
-/**
+/*
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
@@ -47,7 +47,7 @@ OnTTSStoppedNotification::~OnTTSStoppedNotification() {
}
void OnTTSStoppedNotification::Run() {
- LOG4CXX_INFO(logger_, "OnTTSStoppedNotification::Run");
+ LOG4CXX_AUTO_TRACE(logger_);
event_engine::Event event(hmi_apis::FunctionID::TTS_Stopped);
event.set_smart_object(*message_);
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 4ed5839e5f..d8fe1ebdea 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
@@ -1,4 +1,4 @@
-/**
+/*
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
@@ -46,7 +46,7 @@ OnUICommandNotification::~OnUICommandNotification() {
}
void OnUICommandNotification::Run() {
- LOG4CXX_INFO(logger_, "OnUICommandNotification::Run");
+ LOG4CXX_AUTO_TRACE(logger_);
(*message_)[strings::params][strings::function_id] =
static_cast<int32_t>(mobile_apis::FunctionID::eType::OnCommandID);
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 45ff7425b7..9dcfe01e60 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
@@ -1,4 +1,4 @@
-/**
+/*
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
@@ -47,7 +47,7 @@ OnUIKeyBoardInputNotification::~OnUIKeyBoardInputNotification() {
}
void OnUIKeyBoardInputNotification::Run() {
- LOG4CXX_INFO(logger_, "OnUIKeyBoardInputNotification::Run");
+ LOG4CXX_AUTO_TRACE(logger_);
//prepare SmartObject for mobile factory
(*message_)[strings::params][strings::function_id] =
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 5756f50eb5..931a27abc4 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
@@ -1,4 +1,4 @@
-/**
+/*
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
@@ -49,7 +49,7 @@ OnUILanguageChangeNotification::~OnUILanguageChangeNotification() {
}
void OnUILanguageChangeNotification::Run() {
- LOG4CXX_INFO(logger_, "OnUILanguageChangeNotification::Run");
+ LOG4CXX_AUTO_TRACE(logger_);
HMICapabilities& hmi_capabilities =
ApplicationManagerImpl::instance()->hmi_capabilities();
@@ -68,10 +68,9 @@ void OnUILanguageChangeNotification::Run() {
static_cast<int32_t>(mobile_apis::FunctionID::OnLanguageChangeID);
ApplicationManagerImpl::ApplicationListAccessor accessor;
- const std::set<ApplicationSharedPtr> applications = accessor.applications();
- std::set<ApplicationSharedPtr>::iterator it = applications.begin();
- for (;applications.end() != it; ++it) {
+ ApplicationManagerImpl::ApplictionSetIt it = accessor.begin();
+ for (;accessor.end() != it; ++it) {
ApplicationSharedPtr app = *it;
(*message_)[strings::params][strings::connection_key] = app->app_id();
SendNotificationToMobile(message_);
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 357bfc4cb3..96f65839c1 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
@@ -1,4 +1,4 @@
-/**
+/*
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
@@ -48,7 +48,7 @@ OnUIResetTimeoutNotification::~OnUIResetTimeoutNotification() {
}
void OnUIResetTimeoutNotification::Run() {
- LOG4CXX_INFO(logger_, "OnUIResetTimeoutNotification::Run");
+ LOG4CXX_AUTO_TRACE(logger_);
event_engine::Event event(hmi_apis::FunctionID::UI_OnResetTimeout);
event.set_smart_object(*message_);
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 7868e81193..00e0e4d2c6 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
@@ -1,4 +1,4 @@
-/**
+/*
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
@@ -47,7 +47,7 @@ OnUITouchEventNotification::~OnUITouchEventNotification() {
}
void OnUITouchEventNotification::Run() {
- LOG4CXX_INFO(logger_, "OnUITouchEventNotification::Run");
+ LOG4CXX_AUTO_TRACE(logger_);
//prepare SmartObject for mobile factory
(*message_)[strings::params][strings::function_id] =
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 a5b84748ef..8716fb4165 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
@@ -1,4 +1,4 @@
-/**
+/*
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
@@ -44,7 +44,7 @@ OnUpdateDeviceList::~OnUpdateDeviceList() {
}
void OnUpdateDeviceList::Run() {
- LOG4CXX_INFO(logger_, "OnUpdateDeviceList::Run");
+ LOG4CXX_AUTO_TRACE(logger_);
}
} // namespace commands
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 be0c4ebb60..f1e515e2f2 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
@@ -1,4 +1,4 @@
-/**
+/*
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
@@ -46,7 +46,7 @@ OnVIAccPedalPositionNotification::~OnVIAccPedalPositionNotification() {
}
void OnVIAccPedalPositionNotification::Run() {
- LOG4CXX_INFO(logger_, "OnVIAccPedalPositionNotification::Run");
+ LOG4CXX_AUTO_TRACE(logger_);
// prepare SmartObject for mobile factory
(*message_)[strings::params][strings::function_id] =
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 688a5c1fb1..0dd5361f74 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
@@ -1,4 +1,4 @@
-/**
+/*
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
@@ -46,7 +46,7 @@ OnVIBeltStatusNotification::~OnVIBeltStatusNotification() {
}
void OnVIBeltStatusNotification::Run() {
- LOG4CXX_INFO(logger_, "OnVIBeltStatusNotification::Run");
+ LOG4CXX_AUTO_TRACE(logger_);
// prepare SmartObject for mobile factory
(*message_)[strings::params][strings::function_id] =
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 e80a2edcf3..27c902c880 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
@@ -1,4 +1,4 @@
-/**
+/*
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
@@ -46,7 +46,7 @@ OnVIBodyInformationNotification::~OnVIBodyInformationNotification() {
}
void OnVIBodyInformationNotification::Run() {
- LOG4CXX_INFO(logger_, "OnVIBodyInformationNotification::Run");
+ LOG4CXX_AUTO_TRACE(logger_);
// prepare SmartObject for mobile factory
(*message_)[strings::params][strings::function_id] =
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 4669398da1..07b96f1011 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
@@ -1,4 +1,4 @@
-/**
+/*
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
@@ -46,7 +46,7 @@ OnVIDeviceStatusNotification::~OnVIDeviceStatusNotification() {
}
void OnVIDeviceStatusNotification::Run() {
- LOG4CXX_INFO(logger_, "OnVIDeviceStatusNotification::Run");
+ LOG4CXX_AUTO_TRACE(logger_);
// prepare SmartObject for mobile factory
(*message_)[strings::params][strings::function_id] =
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 8b61d0af21..57a8f9c6ef 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
@@ -1,4 +1,4 @@
-/**
+/*
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
@@ -46,7 +46,7 @@ OnVIDriverBrakingNotification::~OnVIDriverBrakingNotification() {
}
void OnVIDriverBrakingNotification::Run() {
- LOG4CXX_INFO(logger_, "OnVIDriverBrakingNotification::Run");
+ LOG4CXX_AUTO_TRACE(logger_);
// prepare SmartObject for mobile factory
(*message_)[strings::params][strings::function_id] =
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 1b0989b1ec..7509884497 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
@@ -1,4 +1,4 @@
-/**
+/*
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
@@ -46,7 +46,7 @@ OnVIEngineTorqueNotification::~OnVIEngineTorqueNotification() {
}
void OnVIEngineTorqueNotification::Run() {
- LOG4CXX_INFO(logger_, "OnVIEngineTorqueNotification::Run");
+ LOG4CXX_AUTO_TRACE(logger_);
// prepare SmartObject for mobile factory
(*message_)[strings::params][strings::function_id] =
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 f7a9213598..64dd411bdd 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
@@ -1,4 +1,4 @@
-/**
+/*
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
@@ -46,7 +46,7 @@ OnVIExternalTemperatureNotification::~OnVIExternalTemperatureNotification() {
}
void OnVIExternalTemperatureNotification::Run() {
- LOG4CXX_INFO(logger_, "OnVIExternalTemperatureNotification::Run");
+ LOG4CXX_AUTO_TRACE(logger_);
// prepare SmartObject for mobile factory
(*message_)[strings::params][strings::function_id] =
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 97d797b630..59ecab0abc 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
@@ -1,4 +1,4 @@
-/**
+/*
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
@@ -46,7 +46,7 @@ OnVIFuelLevelNotification::~OnVIFuelLevelNotification() {
}
void OnVIFuelLevelNotification::Run() {
- LOG4CXX_INFO(logger_, "OnVIFuelLevelNotification::Run");
+ LOG4CXX_AUTO_TRACE(logger_);
// prepare SmartObject for mobile factory
(*message_)[strings::params][strings::function_id] =
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 0024f17a80..faa8a0522a 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
@@ -1,4 +1,4 @@
-/**
+/*
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
@@ -46,7 +46,7 @@ OnVIFuelLevelStateNotification::~OnVIFuelLevelStateNotification() {
}
void OnVIFuelLevelStateNotification::Run() {
- LOG4CXX_INFO(logger_, "OnVIFuelLevelStateNotification::Run");
+ LOG4CXX_AUTO_TRACE(logger_);
// prepare SmartObject for mobile factory
(*message_)[strings::params][strings::function_id] =
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 5b7ec72977..df582418cb 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
@@ -1,4 +1,4 @@
-/**
+/*
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
@@ -46,7 +46,7 @@ OnVIGpsDataNotification::~OnVIGpsDataNotification() {
}
void OnVIGpsDataNotification::Run() {
- LOG4CXX_INFO(logger_, "OnVIGpsDataNotification::Run");
+ LOG4CXX_AUTO_TRACE(logger_);
// prepare SmartObject for mobile factory
(*message_)[strings::params][strings::function_id] =
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 355c00f0c9..01a0a725ef 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
@@ -1,4 +1,4 @@
-/**
+/*
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
@@ -46,7 +46,7 @@ OnVIHeadLampStatusNotification::~OnVIHeadLampStatusNotification() {
}
void OnVIHeadLampStatusNotification::Run() {
- LOG4CXX_INFO(logger_, "OnVIHeadLampStatusNotification::Run");
+ LOG4CXX_AUTO_TRACE(logger_);
// prepare SmartObject for mobile factory
(*message_)[strings::params][strings::function_id] =
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 17240bce6c..b13d50fc1c 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
@@ -1,4 +1,4 @@
-/**
+/*
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
@@ -46,7 +46,7 @@ OnVIInstantFuelConsumptionNotification::~OnVIInstantFuelConsumptionNotification(
}
void OnVIInstantFuelConsumptionNotification::Run() {
- LOG4CXX_INFO(logger_, "OnVIInstantFuelConsumptionNotification::Run");
+ LOG4CXX_AUTO_TRACE(logger_);
// prepare SmartObject for mobile factory
(*message_)[strings::params][strings::function_id] =
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 1caaecb442..71870522ce 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
@@ -1,4 +1,4 @@
-/**
+/*
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
@@ -46,7 +46,7 @@ OnVIMyKeyNotification::~OnVIMyKeyNotification() {
}
void OnVIMyKeyNotification::Run() {
- LOG4CXX_INFO(logger_, "OnVIMyKeyNotification::Run");
+ LOG4CXX_AUTO_TRACE(logger_);
// prepare SmartObject for mobile factory
(*message_)[strings::params][strings::function_id] =
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 02127a1389..5db3ef3bb3 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
@@ -1,4 +1,4 @@
-/**
+/*
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
@@ -46,7 +46,7 @@ OnVIOdometerNotification::~OnVIOdometerNotification() {
}
void OnVIOdometerNotification::Run() {
- LOG4CXX_INFO(logger_, "OnVIOdometerNotification::Run");
+ LOG4CXX_AUTO_TRACE(logger_);
// prepare SmartObject for mobile factory
(*message_)[strings::params][strings::function_id] =
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 4692191cb3..1739f4809b 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
@@ -1,4 +1,4 @@
-/**
+/*
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
@@ -46,7 +46,7 @@ OnVIPrndlNotification::~OnVIPrndlNotification() {
}
void OnVIPrndlNotification::Run() {
- LOG4CXX_INFO(logger_, "OnVIPrndlNotification::Run");
+ LOG4CXX_AUTO_TRACE(logger_);
// prepare SmartObject for mobile factory
(*message_)[strings::params][strings::function_id] =
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 b16421903a..336847ced0 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
@@ -1,4 +1,4 @@
-/**
+/*
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
@@ -46,7 +46,7 @@ OnVIRpmNotification::~OnVIRpmNotification() {
}
void OnVIRpmNotification::Run() {
- LOG4CXX_INFO(logger_, "OnVIRpmNotification::Run");
+ LOG4CXX_AUTO_TRACE(logger_);
// prepare SmartObject for mobile factory
(*message_)[strings::params][strings::function_id] =
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 6bc1e8b2cf..ad38bf50a5 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
@@ -1,4 +1,4 @@
-/**
+/*
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
@@ -46,7 +46,7 @@ OnVISpeedNotification::~OnVISpeedNotification() {
}
void OnVISpeedNotification::Run() {
- LOG4CXX_INFO(logger_, "OnVISpeedNotification::Run");
+ LOG4CXX_AUTO_TRACE(logger_);
// prepare SmartObject for mobile factory
(*message_)[strings::params][strings::function_id] =
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 853b4eeea3..4fd70bf169 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
@@ -1,4 +1,4 @@
-/**
+/*
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
@@ -46,7 +46,7 @@ OnVISteeringWheelAngleNotification::~OnVISteeringWheelAngleNotification() {
}
void OnVISteeringWheelAngleNotification::Run() {
- LOG4CXX_INFO(logger_, "OnVISteeringWheelAngleNotification::Run");
+ LOG4CXX_AUTO_TRACE(logger_);
// prepare SmartObject for mobile factory
(*message_)[strings::params][strings::function_id] =
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 01ac7e9f8c..fda6e6e28d 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
@@ -1,4 +1,4 @@
-/**
+/*
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
@@ -46,7 +46,7 @@ OnVITirePressureNotification::~OnVITirePressureNotification() {
}
void OnVITirePressureNotification::Run() {
- LOG4CXX_INFO(logger_, "OnVITirePressureNotification::Run");
+ LOG4CXX_AUTO_TRACE(logger_);
// prepare SmartObject for mobile factory
(*message_)[strings::params][strings::function_id] =
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 eda88ef602..15ccf940b8 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
@@ -1,4 +1,4 @@
-/**
+/*
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
@@ -46,7 +46,7 @@ OnVIVehicleDataNotification::~OnVIVehicleDataNotification() {
}
void OnVIVehicleDataNotification::Run() {
- LOG4CXX_INFO(logger_, "OnVIVehicleDataNotification::Run");
+ LOG4CXX_AUTO_TRACE(logger_);
// prepare SmartObject for mobile factory
(*message_)[strings::params][strings::function_id] =
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 546dc0d3cf..aa1683c5fb 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
@@ -1,4 +1,4 @@
-/**
+/*
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
@@ -46,7 +46,7 @@ OnVIVinNotification::~OnVIVinNotification() {
}
void OnVIVinNotification::Run() {
- LOG4CXX_INFO(logger_, "OnVIVinNotification::Run");
+ LOG4CXX_AUTO_TRACE(logger_);
// prepare SmartObject for mobile factory
(*message_)[strings::params][strings::function_id] =
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 101427df0a..0d27f42388 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
@@ -1,4 +1,4 @@
-/**
+/*
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
@@ -46,7 +46,7 @@ OnVIWiperStatusNotification::~OnVIWiperStatusNotification() {
}
void OnVIWiperStatusNotification::Run() {
- LOG4CXX_INFO(logger_, "OnVIWiperStatusNotification::Run");
+ LOG4CXX_AUTO_TRACE(logger_);
// prepare SmartObject for mobile factory
(*message_)[strings::params][strings::function_id] =
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 99842b8524..bcd02196a8 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
@@ -1,4 +1,4 @@
-/**
+/*
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
@@ -51,7 +51,7 @@ OnVRCommandNotification::~OnVRCommandNotification() {
}
void OnVRCommandNotification::Run() {
- LOG4CXX_INFO(logger_, "OnVRCommandNotification::Run");
+ LOG4CXX_AUTO_TRACE(logger_);
ApplicationSharedPtr active_app = ApplicationManagerImpl::instance()
->active_application();
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 92e7cb7b23..19d064d15b 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
@@ -1,4 +1,4 @@
-/**
+/*
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
@@ -49,7 +49,7 @@ OnVRLanguageChangeNotification::~OnVRLanguageChangeNotification() {
}
void OnVRLanguageChangeNotification::Run() {
- LOG4CXX_INFO(logger_, "OnVRLanguageChangeNotification::Run");
+ LOG4CXX_AUTO_TRACE(logger_);
HMICapabilities& hmi_capabilities =
ApplicationManagerImpl::instance()->hmi_capabilities();
@@ -65,16 +65,17 @@ void OnVRLanguageChangeNotification::Run() {
static_cast<int32_t>(mobile_apis::FunctionID::OnLanguageChangeID);
ApplicationManagerImpl::ApplicationListAccessor accessor;
- const std::set<ApplicationSharedPtr> applications = accessor.applications();
- std::set<ApplicationSharedPtr>::iterator it = applications.begin();
- for (;applications.end() != it; ++it) {
+ ApplicationManagerImpl::ApplictionSetIt it = accessor.begin();
+ for (;accessor.end() != it; ++it) {
ApplicationSharedPtr app = (*it);
(*message_)[strings::params][strings::connection_key] = app->app_id();
SendNotificationToMobile(message_);
if (static_cast<int32_t>(app->language())
!= (*message_)[strings::msg_params][strings::language].asInt()) {
- app->set_hmi_level(mobile_api::HMILevel::HMI_NONE);
+
+ ApplicationManagerImpl::instance()->ChangeAppsHMILevel(app->app_id(),
+ mobile_api::HMILevel::HMI_NONE);
MessageHelper::SendOnAppInterfaceUnregisteredNotificationToMobile(
app->app_id(),
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 72f6767e8c..6e56dd29c0 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
@@ -1,4 +1,4 @@
-/**
+/*
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
@@ -46,7 +46,7 @@ OnVRStartedNotification::~OnVRStartedNotification() {
}
void OnVRStartedNotification::Run() {
- LOG4CXX_INFO(logger_, "OnVRStartedNotification::Run");
+ LOG4CXX_AUTO_TRACE(logger_);
ApplicationManagerImpl::instance()->set_vr_session_started(true);
ApplicationManagerImpl::instance()->Mute(kVRSessionChanging);
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 46274a3b2e..442968ea1e 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
@@ -1,4 +1,4 @@
-/**
+/*
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
@@ -46,7 +46,7 @@ OnVRStoppedNotification::~OnVRStoppedNotification() {
}
void OnVRStoppedNotification::Run() {
- LOG4CXX_INFO(logger_, "OnVRStoppedNotification::Run");
+ LOG4CXX_AUTO_TRACE(logger_);
ApplicationManagerImpl::instance()->set_vr_session_started(false);
ApplicationManagerImpl::instance()->Unmute(kVRSessionChanging);
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 7b7f740904..44eb24b7ab 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
@@ -58,6 +58,28 @@ bool RequestFromHMI::CleanUp() {
void RequestFromHMI::Run() {
}
+void RequestFromHMI::on_event(const event_engine::Event& event) {
+}
+
+void RequestFromHMI::SendResponse(bool success,
+ 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);
+
+ (*message)[strings::params][strings::function_id] = function_id;
+ (*message)[strings::params][strings::message_type] = MessageType::kResponse;
+ (*message)[strings::params][strings::correlation_id] = correlation_id;
+ (*message)[strings::params][hmi_response::code] = 0;
+
+ (*message)[strings::msg_params][strings::success] = success;
+ (*message)[strings::msg_params][strings::result_code] = result_code;
+
+ ApplicationManagerImpl::instance()->ManageHMICommand(message);
+}
+
+
} // 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 242118a417..82b36be0f0 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
@@ -1,4 +1,4 @@
-/**
+/*
Copyright (c) 2014, Ford Motor Company
All rights reserved.
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 42bebb847d..9f6ced5974 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
@@ -72,10 +72,9 @@ void ResponseFromHMI::SendResponseToMobile(const MessageSharedPtr& message) {
void ResponseFromHMI::CreateHMIRequest(
const hmi_apis::FunctionID::eType& function_id,
- const NsSmart::SmartObject& msg_params) const {
+ const smart_objects::SmartObject& msg_params) const {
- NsSmartDeviceLink::NsSmartObjects::SmartObject* result =
- new NsSmartDeviceLink::NsSmartObjects::SmartObject;
+ smart_objects::SmartObjectSPtr result = new smart_objects::SmartObject;
if (!result) {
LOG4CXX_ERROR(logger_, "Memory allocation failed.");
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 72abf233ce..a65fd981bc 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
@@ -1,4 +1,4 @@
-/**
+/*
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
@@ -32,6 +32,7 @@
#include "application_manager/commands/hmi/sdl_activate_app_request.h"
#include "application_manager/policies/policy_handler.h"
+#include "application_manager/message_helper.h"
namespace application_manager {
@@ -45,10 +46,53 @@ SDLActivateAppRequest::~SDLActivateAppRequest() {
}
void SDLActivateAppRequest::Run() {
- LOG4CXX_INFO(logger_, "SDLActivateAppRequest::Run");
- policy::PolicyHandler::instance()->OnActivateApp(
- (*message_)[strings::msg_params][strings::app_id].asUInt(),
- (*message_)[strings::params][strings::correlation_id].asInt());
+ LOG4CXX_AUTO_TRACE(logger_);
+ using namespace hmi_apis::FunctionID;
+
+ const uint32_t application_id = app_id();
+ ApplicationConstSharedPtr app =
+ ApplicationManagerImpl::instance()->application(application_id);
+
+ if (app && !app->IsRegistered()) {
+ MessageHelper::SendLaunchApp(application_id,
+ app->SchemaUrl(),
+ app->PackageName());
+ subscribe_on_event(BasicCommunication_OnAppRegistered);
+ } else {
+ policy::PolicyHandler::instance()->OnActivateApp(application_id,
+ correlation_id());
+ }
+}
+
+void SDLActivateAppRequest::onTimeOut() {
+ using namespace hmi_apis::FunctionID;
+ using namespace hmi_apis::Common_Result;
+ using namespace application_manager;
+ unsubscribe_from_event(BasicCommunication_OnAppRegistered);
+ const bool is_success = false;
+ SendResponse(is_success, correlation_id(),
+ BasicCommunication_ActivateApp, APPLICATION_NOT_REGISTERED);
+}
+
+void SDLActivateAppRequest::on_event(const event_engine::Event& event) {
+ using namespace hmi_apis::FunctionID;
+ if (event.id() != BasicCommunication_OnAppRegistered) {
+ return;
+ }
+ unsubscribe_from_event(BasicCommunication_OnAppRegistered);
+ policy::PolicyHandler::instance()->OnActivateApp(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();
+ }
+ }
+ LOG4CXX_DEBUG(logger_, "app_id section is absent in the message.");
+ return 0;
}
} // namespace commands
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 46eb402f41..6c7a0b5355 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
@@ -1,4 +1,4 @@
-/**
+/*
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
@@ -45,7 +45,7 @@ SDLActivateAppResponse::~SDLActivateAppResponse() {
}
void SDLActivateAppResponse::Run() {
- LOG4CXX_INFO(logger_, "SDLActivateAppResponse::Run");
+ LOG4CXX_AUTO_TRACE(logger_);
(*message_)[strings::params][strings::protocol_type] = hmi_protocol_type_;
(*message_)[strings::params][strings::protocol_version] = protocol_version_;
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 7eb5a268ac..a6649b2579 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
@@ -1,4 +1,4 @@
-/**
+/*
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
@@ -46,7 +46,7 @@ SDLGetListOfPermissionsRequest::~SDLGetListOfPermissionsRequest() {
}
void SDLGetListOfPermissionsRequest::Run() {
- LOG4CXX_INFO(logger_, "SDLGetListOfPermissionsRequest::Run");
+ LOG4CXX_AUTO_TRACE(logger_);
uint32_t connection_key = 0;
if ((*message_)[strings::msg_params].keyExists(strings::app_id)) {
connection_key = (*message_)[strings::msg_params][strings::app_id].asUInt();
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 da474cb128..5d5e75e5c7 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
@@ -1,4 +1,4 @@
-/**
+/*
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
@@ -45,7 +45,7 @@ SDLGetListOfPermissionsResponse::~SDLGetListOfPermissionsResponse() {
}
void SDLGetListOfPermissionsResponse::Run() {
- LOG4CXX_INFO(logger_, "SDLGetListOfPermissionsResponse::Run");
+ LOG4CXX_AUTO_TRACE(logger_);
(*message_)[strings::params][strings::protocol_type] = hmi_protocol_type_;
(*message_)[strings::params][strings::protocol_version] = protocol_version_;
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 cc5fbc63ae..dd977d99f0 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
@@ -1,4 +1,4 @@
-/**
+/*
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
@@ -45,7 +45,7 @@ SDLGetStatusUpdateRequest::~SDLGetStatusUpdateRequest() {
}
void SDLGetStatusUpdateRequest::Run() {
- LOG4CXX_INFO(logger_, "SDLGetStatusUpdateRequest::Run");
+ LOG4CXX_AUTO_TRACE(logger_);
policy::PolicyHandler::instance()->OnGetStatusUpdate(
(*message_)[strings::params][strings::correlation_id].asUInt());
}
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 08d8d315a5..ab1c57e9af 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
@@ -1,4 +1,4 @@
-/**
+/*
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
@@ -45,7 +45,7 @@ SDLGetStatusUpdateResponse::~SDLGetStatusUpdateResponse() {
}
void SDLGetStatusUpdateResponse::Run() {
- LOG4CXX_INFO(logger_, "SDLGetStatusUpdateResponse::Run");
+ LOG4CXX_AUTO_TRACE(logger_);
(*message_)[strings::params][strings::protocol_type] = hmi_protocol_type_;
(*message_)[strings::params][strings::protocol_version] = protocol_version_;
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 047d6bf846..cdd5c16ed0 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
@@ -1,4 +1,4 @@
-/**
+/*
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
@@ -48,7 +48,7 @@ SDLGetUserFriendlyMessageRequest::~SDLGetUserFriendlyMessageRequest() {
}
void SDLGetUserFriendlyMessageRequest::Run() {
- LOG4CXX_INFO(logger_, "SDLGetUserFriendlyMessageRequest::Run");
+ LOG4CXX_AUTO_TRACE(logger_);
const std::string messageCodes = "messageCodes";
if (!(*message_)[strings::msg_params].keyExists(messageCodes)) {
LOG4CXX_WARN(logger_,
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 c849204cc3..8cc1b2d629 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
@@ -1,4 +1,4 @@
-/**
+/*
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
@@ -45,7 +45,7 @@ SDLGetUserFriendlyMessageResponse::~SDLGetUserFriendlyMessageResponse() {
}
void SDLGetUserFriendlyMessageResponse::Run() {
- LOG4CXX_INFO(logger_, "SDLGetUserFriendlyMessageResponse::Run");
+ LOG4CXX_AUTO_TRACE(logger_);
(*message_)[strings::params][strings::protocol_type] = hmi_protocol_type_;
(*message_)[strings::params][strings::protocol_version] = protocol_version_;
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 4779e106c5..b9c5aaa086 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
@@ -1,4 +1,4 @@
-/**
+/*
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
@@ -44,7 +44,7 @@ SDLPolicyUpdate::~SDLPolicyUpdate() {
}
void SDLPolicyUpdate::Run() {
- LOG4CXX_INFO(logger_, "SDLPolicyUpdate::Run");
+ LOG4CXX_AUTO_TRACE(logger_);
SendRequest();
}
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 a3db3a9047..bc7c6e0d74 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
@@ -1,4 +1,4 @@
-/**
+/*
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
@@ -43,7 +43,7 @@ SDLPolicyUpdateResponse::~SDLPolicyUpdateResponse() {
}
void SDLPolicyUpdateResponse::Run() {
- LOG4CXX_INFO(logger_, "SDLPolicyUpdateResponse::Run");
+ LOG4CXX_AUTO_TRACE(logger_);
// TODO(PV): add some logic here
}
} // namespace commands
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 638503d162..dd127ec43f 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
@@ -1,4 +1,4 @@
-/**
+/*
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
@@ -45,7 +45,7 @@ TTSChangeRegistrationRequest::~TTSChangeRegistrationRequest() {
}
void TTSChangeRegistrationRequest::Run() {
- LOG4CXX_INFO(logger_, "TTSChangeRegistrationRequest::Run");
+ LOG4CXX_AUTO_TRACE(logger_);
SendRequest();
}
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 67e48b4ed5..03b51e5db7 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
@@ -1,4 +1,4 @@
-/**
+/*
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
@@ -46,7 +46,7 @@ TTSChangeRegistratioResponse::~TTSChangeRegistratioResponse() {
}
void TTSChangeRegistratioResponse::Run() {
- LOG4CXX_INFO(logger_, "TTSChangeRegistratioResponse::Run");
+ LOG4CXX_AUTO_TRACE(logger_);
event_engine::Event event(hmi_apis::FunctionID::TTS_ChangeRegistration);
event.set_smart_object(*message_);
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 59cf50b38d..fb3dedc1c0 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
@@ -1,4 +1,4 @@
-/**
+/*
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
@@ -45,7 +45,7 @@ TTSGetCapabilitiesRequest::~TTSGetCapabilitiesRequest() {
}
void TTSGetCapabilitiesRequest::Run() {
- LOG4CXX_INFO(logger_, "TTSGetCapabilitiesRequest::Run");
+ LOG4CXX_AUTO_TRACE(logger_);
SendRequest();
}
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 f7309822d8..53a1bd3916 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
@@ -1,4 +1,4 @@
-/**
+/*
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
@@ -45,7 +45,7 @@ TTSGetCapabilitiesResponse::~TTSGetCapabilitiesResponse() {
}
void TTSGetCapabilitiesResponse::Run() {
- LOG4CXX_INFO(logger_, "TTSGetCapabilitiesResponse::Run");
+ LOG4CXX_AUTO_TRACE(logger_);
HMICapabilities& hmi_capabilities =
ApplicationManagerImpl::instance()->hmi_capabilities();
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 9f2fe7134a..6d4e4f465a 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
@@ -1,4 +1,4 @@
-/**
+/*
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
@@ -44,7 +44,7 @@ TTSGetLanguageRequest::~TTSGetLanguageRequest() {
}
void TTSGetLanguageRequest::Run() {
- LOG4CXX_INFO(logger_, "TTSGetLanguageRequest::Run");
+ LOG4CXX_AUTO_TRACE(logger_);
SendRequest();
}
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 e26fa87739..6c2122557b 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
@@ -1,4 +1,4 @@
-/**
+/*
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
@@ -44,7 +44,7 @@ TTSGetLanguageResponse::~TTSGetLanguageResponse() {
}
void TTSGetLanguageResponse::Run() {
- LOG4CXX_INFO(logger_, "TTSGetLanguageResponse::Run");
+ LOG4CXX_AUTO_TRACE(logger_);
HMICapabilities& hmi_capabilities =
ApplicationManagerImpl::instance()->hmi_capabilities();
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 08c1d82448..5251832bc1 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
@@ -1,4 +1,4 @@
-/**
+/*
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
@@ -45,7 +45,7 @@ TTSGetSupportedLanguagesRequest::~TTSGetSupportedLanguagesRequest() {
}
void TTSGetSupportedLanguagesRequest::Run() {
- LOG4CXX_INFO(logger_, "TTSGetSupportedLanguagesRequest::Run");
+ LOG4CXX_AUTO_TRACE(logger_);
SendRequest();
}
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 aa041f66b3..a5d022a6cb 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
@@ -1,4 +1,4 @@
-/**
+/*
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
@@ -46,7 +46,7 @@ TTSGetSupportedLanguagesResponse::~TTSGetSupportedLanguagesResponse() {
}
void TTSGetSupportedLanguagesResponse::Run() {
- LOG4CXX_INFO(logger_, "TTSGetSupportedLanguagesResponse::Run");
+ LOG4CXX_AUTO_TRACE(logger_);
const hmi_apis::Common_Result::eType code =
static_cast<hmi_apis::Common_Result::eType>(
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 7733de4887..3a50cfef90 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
@@ -1,4 +1,4 @@
-/**
+/*
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
@@ -44,7 +44,7 @@ TTSIsReadyRequest::~TTSIsReadyRequest() {
}
void TTSIsReadyRequest::Run() {
- LOG4CXX_INFO(logger_, "TTSIsReadyRequest::Run");
+ LOG4CXX_AUTO_TRACE(logger_);
SendRequest();
}
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 fb3cb4858f..dd8eab7534 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
@@ -1,4 +1,4 @@
-/**
+/*
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
@@ -44,7 +44,7 @@ TTSIsReadyResponse::~TTSIsReadyResponse() {
}
void TTSIsReadyResponse::Run() {
- LOG4CXX_INFO(logger_, "TTSIsReadyResponse::Run");
+ LOG4CXX_AUTO_TRACE(logger_);
smart_objects::SmartObject& object = *message_;
bool is_available = false;
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 04f1380d91..ce330c355f 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
@@ -1,4 +1,4 @@
-/**
+/*
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
@@ -45,7 +45,7 @@ TTSSetGlobalPropertiesRequest::~TTSSetGlobalPropertiesRequest() {
}
void TTSSetGlobalPropertiesRequest::Run() {
- LOG4CXX_INFO(logger_, "TTSSetGlobalPropertiesRequest::Run");
+ LOG4CXX_AUTO_TRACE(logger_);
SendRequest();
}
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 c90655186f..70dc46d6a6 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
@@ -1,4 +1,4 @@
-/**
+/*
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
@@ -46,7 +46,7 @@ TTSSetGlobalPropertiesResponse::~TTSSetGlobalPropertiesResponse() {
}
void TTSSetGlobalPropertiesResponse::Run() {
- LOG4CXX_INFO(logger_, "TTSSetGlobalPropertiesResponse::Run");
+ LOG4CXX_AUTO_TRACE(logger_);
event_engine::Event event(hmi_apis::FunctionID::TTS_SetGlobalProperties);
event.set_smart_object(*message_);
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 9b4bd68585..79fbde2c4f 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
@@ -1,4 +1,4 @@
-/**
+/*
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
@@ -44,7 +44,7 @@ TTSSpeakRequest::~TTSSpeakRequest() {
}
void TTSSpeakRequest::Run() {
- LOG4CXX_INFO(logger_, "TTSSpeakRequest::Run");
+ LOG4CXX_AUTO_TRACE(logger_);
SendRequest();
}
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 9b9e43dbe8..ff60115e70 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
@@ -1,4 +1,4 @@
-/**
+/*
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
@@ -46,7 +46,7 @@ TTSSpeakResponse::~TTSSpeakResponse() {
}
void TTSSpeakResponse::Run() {
- LOG4CXX_INFO(logger_, "TTSSpeakResponse::Run");
+ LOG4CXX_AUTO_TRACE(logger_);
event_engine::Event event(hmi_apis::FunctionID::TTS_Speak);
event.set_smart_object(*message_);
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 107cb7933b..32aaec27e7 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
@@ -1,4 +1,4 @@
-/**
+/*
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
@@ -44,7 +44,7 @@ TTSStopSpeakingRequest::~TTSStopSpeakingRequest() {
}
void TTSStopSpeakingRequest::Run() {
- LOG4CXX_INFO(logger_, "TTSStopSpeakingRequest::Run");
+ LOG4CXX_AUTO_TRACE(logger_);
SendRequest();
}
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 9bd4f89660..b32cf52bb5 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
@@ -1,4 +1,4 @@
-/**
+/*
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
@@ -46,7 +46,7 @@ TTSStopSpeakingResponse::~TTSStopSpeakingResponse() {
}
void TTSStopSpeakingResponse::Run() {
- LOG4CXX_INFO(logger_, "TTSStopSpeakingResponse::Run");
+ LOG4CXX_AUTO_TRACE(logger_);
event_engine::Event event(hmi_apis::FunctionID::TTS_StopSpeaking);
event.set_smart_object(*message_);
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 9aa5d2e2d3..ed9f7979a1 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
@@ -1,4 +1,4 @@
-/**
+/*
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
@@ -44,7 +44,7 @@ UIAddCommandRequest::~UIAddCommandRequest() {
}
void UIAddCommandRequest::Run() {
- LOG4CXX_INFO(logger_, "UIAddCommandRequest::Run");
+ LOG4CXX_AUTO_TRACE(logger_);
SendRequest();
}
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 21b34e0637..13b2ab1b2b 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
@@ -1,4 +1,4 @@
-/**
+/*
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
@@ -45,7 +45,7 @@ UIAddCommandResponse::~UIAddCommandResponse() {
}
void UIAddCommandResponse::Run() {
- LOG4CXX_INFO(logger_, "UIAddCommandResponse::Run");
+ LOG4CXX_AUTO_TRACE(logger_);
event_engine::Event event(hmi_apis::FunctionID::UI_AddCommand);
event.set_smart_object(*message_);
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 7a9c5c6fed..667499584f 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
@@ -1,4 +1,4 @@
-/**
+/*
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
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 af88de2b48..54247dbbce 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
@@ -1,4 +1,4 @@
-/**
+/*
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
@@ -45,7 +45,7 @@ UIAddSubmenuResponse::~UIAddSubmenuResponse() {
}
void UIAddSubmenuResponse::Run() {
- LOG4CXX_INFO(logger_, "UIAddSubmenuResponse::Run");
+ LOG4CXX_AUTO_TRACE(logger_);
event_engine::Event event(hmi_apis::FunctionID::UI_AddSubMenu);
event.set_smart_object(*message_);
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 f8c9ed5708..c706d5fdba 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
@@ -1,4 +1,4 @@
-/**
+/*
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
@@ -44,7 +44,7 @@ UIAlertRequest::~UIAlertRequest() {
}
void UIAlertRequest::Run() {
- LOG4CXX_INFO(logger_, "UIAlertRequest::Run");
+ LOG4CXX_AUTO_TRACE(logger_);
SendRequest();
}
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 289b90d290..8c9ddef7ac 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
@@ -1,4 +1,4 @@
-/**
+/*
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
@@ -45,7 +45,7 @@ UIAlertResponse::~UIAlertResponse() {
}
void UIAlertResponse::Run() {
- LOG4CXX_INFO(logger_, "UIAlertResponse::Run");
+ LOG4CXX_AUTO_TRACE(logger_);
event_engine::Event event(hmi_apis::FunctionID::UI_Alert);
event.set_smart_object(*message_);
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 fbba2b4023..67c9be6cb5 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
@@ -1,4 +1,4 @@
-/**
+/*
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
@@ -45,7 +45,7 @@ UIChangeRegistrationRequest::~UIChangeRegistrationRequest() {
}
void UIChangeRegistrationRequest::Run() {
- LOG4CXX_INFO(logger_, "UIChangeRegistrationRequest::Run");
+ LOG4CXX_AUTO_TRACE(logger_);
SendRequest();
}
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 16447077dd..1d59d66d74 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
@@ -1,4 +1,4 @@
-/**
+/*
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
@@ -46,7 +46,7 @@ UIChangeRegistratioResponse::~UIChangeRegistratioResponse() {
}
void UIChangeRegistratioResponse::Run() {
- LOG4CXX_INFO(logger_, "UIChangeRegistratioResponse::Run");
+ LOG4CXX_AUTO_TRACE(logger_);
event_engine::Event event(hmi_apis::FunctionID::UI_ChangeRegistration);
event.set_smart_object(*message_);
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 23fb4c67f5..7d5532f30f 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
@@ -1,4 +1,4 @@
-/**
+/*
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
@@ -44,7 +44,7 @@ UIDeleteCommandRequest::~UIDeleteCommandRequest() {
}
void UIDeleteCommandRequest::Run() {
- LOG4CXX_INFO(logger_, "UIDeleteCommandRequest::Run");
+ LOG4CXX_AUTO_TRACE(logger_);
SendRequest();
}
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 0ac32877c4..2fb94a63a3 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
@@ -1,4 +1,4 @@
-/**
+/*
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
@@ -46,7 +46,7 @@ UIDeleteCommandResponse::~UIDeleteCommandResponse() {
}
void UIDeleteCommandResponse::Run() {
- LOG4CXX_INFO(logger_, "UIDeleteCommandResponse::Run");
+ LOG4CXX_AUTO_TRACE(logger_);
event_engine::Event event(hmi_apis::FunctionID::UI_DeleteCommand);
event.set_smart_object(*message_);
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 41f356b981..e945139639 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
@@ -1,4 +1,4 @@
-/**
+/*
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
@@ -44,7 +44,7 @@ UIDeleteSubmenuRequest::~UIDeleteSubmenuRequest() {
}
void UIDeleteSubmenuRequest::Run() {
- LOG4CXX_INFO(logger_, "UIDeleteSubmenuRequest::Run");
+ LOG4CXX_AUTO_TRACE(logger_);
SendRequest();
}
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 5a3359b722..89a5a19a0b 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
@@ -1,4 +1,4 @@
-/**
+/*
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
@@ -46,7 +46,7 @@ UIDeleteSubmenuResponse::~UIDeleteSubmenuResponse() {
}
void UIDeleteSubmenuResponse::Run() {
- LOG4CXX_INFO(logger_, "UIDeleteSubmenuResponse::Run");
+ LOG4CXX_AUTO_TRACE(logger_);
event_engine::Event event(hmi_apis::FunctionID::UI_DeleteSubMenu);
event.set_smart_object(*message_);
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 4c93f9235b..b87e1d89b8 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
@@ -1,4 +1,4 @@
-/**
+/*
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
@@ -45,7 +45,7 @@ UIEndAudioPassThruRequest::~UIEndAudioPassThruRequest() {
}
void UIEndAudioPassThruRequest::Run() {
- LOG4CXX_INFO(logger_, "UIEndAudioPassThruRequest::Run");
+ LOG4CXX_AUTO_TRACE(logger_);
SendRequest();
}
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 e560ae293a..8f5d92b78f 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
@@ -1,4 +1,4 @@
-/**
+/*
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
@@ -46,7 +46,7 @@ UIEndAudioPassThruResponse::~UIEndAudioPassThruResponse() {
}
void UIEndAudioPassThruResponse::Run() {
- LOG4CXX_INFO(logger_, "UIEndAudioPassThruResponse::Run");
+ LOG4CXX_AUTO_TRACE(logger_);
event_engine::Event event(hmi_apis::FunctionID::UI_EndAudioPassThru);
event.set_smart_object(*message_);
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 b9f1b6917c..74ee67e884 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
@@ -1,4 +1,4 @@
-/**
+/*
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
@@ -45,7 +45,7 @@ UIGetCapabilitiesRequest::~UIGetCapabilitiesRequest() {
}
void UIGetCapabilitiesRequest::Run() {
- LOG4CXX_INFO(logger_, "UIGetCapabilitiesRequest::Run");
+ LOG4CXX_AUTO_TRACE(logger_);
SendRequest();
}
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 0663bf033e..7ebc5ffcc9 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
@@ -1,4 +1,4 @@
-/**
+/*
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
@@ -45,7 +45,7 @@ UIGetCapabilitiesResponse::~UIGetCapabilitiesResponse() {
}
void UIGetCapabilitiesResponse::Run() {
- LOG4CXX_INFO(logger_, "UIGetCapabilitiesResponse::Run");
+ LOG4CXX_AUTO_TRACE(logger_);
HMICapabilities& hmi_capabilities =
ApplicationManagerImpl::instance()->hmi_capabilities();
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 ffca242d43..1b22a9b58f 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
@@ -1,4 +1,4 @@
-/**
+/*
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
@@ -44,7 +44,7 @@ UIGetLanguageRequest::~UIGetLanguageRequest() {
}
void UIGetLanguageRequest::Run() {
- LOG4CXX_INFO(logger_, "UIGetLanguageRequest::Run");
+ LOG4CXX_AUTO_TRACE(logger_);
SendRequest();
}
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 20435d788b..cba85d91e7 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
@@ -1,4 +1,4 @@
-/**
+/*
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
@@ -45,7 +45,7 @@ UIGetLanguageResponse::~UIGetLanguageResponse() {
}
void UIGetLanguageResponse::Run() {
- LOG4CXX_INFO(logger_, "UIGetLanguageResponse::Run");
+ LOG4CXX_AUTO_TRACE(logger_);
HMICapabilities& hmi_capabilities =
ApplicationManagerImpl::instance()->hmi_capabilities();
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 455486ef6c..5cd0c09e65 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
@@ -1,4 +1,4 @@
-/**
+/*
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
@@ -45,7 +45,7 @@ UIGetSupportedLanguagesRequest::~UIGetSupportedLanguagesRequest() {
}
void UIGetSupportedLanguagesRequest::Run() {
- LOG4CXX_INFO(logger_, "UIGetSupportedLanguagesRequest::Run");
+ LOG4CXX_AUTO_TRACE(logger_);
SendRequest();
}
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 8492cfca5b..2057f3cbb2 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
@@ -1,4 +1,4 @@
-/**
+/*
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
@@ -46,7 +46,7 @@ UIGetSupportedLanguagesResponse::~UIGetSupportedLanguagesResponse() {
}
void UIGetSupportedLanguagesResponse::Run() {
- LOG4CXX_INFO(logger_, "UIGetSupportedLanguagesResponse::Run");
+ LOG4CXX_AUTO_TRACE(logger_);
const hmi_apis::Common_Result::eType code =
static_cast<hmi_apis::Common_Result::eType>(
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 50d0ddd95a..94df3cec7d 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
@@ -1,4 +1,4 @@
-/**
+/*
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
@@ -44,7 +44,7 @@ UIIsReadyRequest::~UIIsReadyRequest() {
}
void UIIsReadyRequest::Run() {
- LOG4CXX_INFO(logger_, "UIIsReadyRequest::Run");
+ LOG4CXX_AUTO_TRACE(logger_);
SendRequest();
}
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 97d11b6022..9edf77080e 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
@@ -1,4 +1,4 @@
-/**
+/*
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
@@ -44,7 +44,7 @@ UIIsReadyResponse::~UIIsReadyResponse() {
}
void UIIsReadyResponse::Run() {
- LOG4CXX_INFO(logger_, "UIIsReadyResponse::Run");
+ LOG4CXX_AUTO_TRACE(logger_);
smart_objects::SmartObject& object = *message_;
bool is_available = false;
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 cf77703a9b..3cf7722b24 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
@@ -1,4 +1,4 @@
-/**
+/*
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
@@ -45,7 +45,7 @@ UIPerformAudioPassThruRequest::~UIPerformAudioPassThruRequest() {
}
void UIPerformAudioPassThruRequest::Run() {
- LOG4CXX_INFO(logger_, "UIPerformAudioPassThruRequest::Run");
+ LOG4CXX_AUTO_TRACE(logger_);
SendRequest();
}
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 36d4c507b5..c8a488e44d 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
@@ -1,4 +1,4 @@
-/**
+/*
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
@@ -46,7 +46,7 @@ UIPerformAudioPassThruResponse::~UIPerformAudioPassThruResponse() {
}
void UIPerformAudioPassThruResponse::Run() {
- LOG4CXX_INFO(logger_, "UIPerformAudioPassThruResponse::Run");
+ LOG4CXX_AUTO_TRACE(logger_);
event_engine::Event event(hmi_apis::FunctionID::UI_PerformAudioPassThru);
event.set_smart_object(*message_);
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 09f98ec036..2b1f5ce484 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
@@ -1,4 +1,4 @@
-/**
+/*
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
@@ -45,7 +45,7 @@ UIPerformInteractionRequest::~UIPerformInteractionRequest() {
}
void UIPerformInteractionRequest::Run() {
- LOG4CXX_INFO(logger_, "UIPerformInteractionRequest::Run");
+ LOG4CXX_AUTO_TRACE(logger_);
SendRequest();
}
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 2f5f6ead57..25237525da 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
@@ -1,4 +1,4 @@
-/**
+/*
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
@@ -46,7 +46,7 @@ UIPerformInteractionResponse::~UIPerformInteractionResponse() {
}
void UIPerformInteractionResponse::Run() {
- LOG4CXX_INFO(logger_, "UIPerformInteractionResponse::Run");
+ LOG4CXX_AUTO_TRACE(logger_);
event_engine::Event event(hmi_apis::FunctionID::UI_PerformInteraction);
event.set_smart_object(*message_);
event.raise();
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 ac34dd236f..911c840ce4 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
@@ -1,4 +1,4 @@
-/**
+/*
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
@@ -45,7 +45,7 @@ UIScrollableMessageRequest::~UIScrollableMessageRequest() {
}
void UIScrollableMessageRequest::Run() {
- LOG4CXX_INFO(logger_, "UIScrollableMessageRequest::Run");
+ LOG4CXX_AUTO_TRACE(logger_);
SendRequest();
}
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 182d512c8c..58c793c3b6 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
@@ -1,4 +1,4 @@
-/**
+/*
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
@@ -46,7 +46,7 @@ UIScrollableMessageResponse::~UIScrollableMessageResponse() {
}
void UIScrollableMessageResponse::Run() {
- LOG4CXX_INFO(logger_, "UIScrollableMessageResponse::Run");
+ LOG4CXX_AUTO_TRACE(logger_);
event_engine::Event event(hmi_apis::FunctionID::UI_ScrollableMessage);
event.set_smart_object(*message_);
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
new file mode 100644
index 0000000000..c4a3b3b3af
--- /dev/null
+++ b/src/components/application_manager/src/commands/hmi/ui_set_app_icon_request.cc
@@ -0,0 +1,55 @@
+/*
+ * Copyright (c) 2013, Ford Motor Company
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * Redistributions of source code must retain the above copyright notice, this
+ * list of conditions and the following disclaimer.
+ *
+ * Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following
+ * disclaimer in the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * Neither the name of the Ford Motor Company nor the names of its contributors
+ * may be used to endorse or promote products derived from this software
+ * without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+ * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include "application_manager/commands/hmi/ui_set_app_icon_request.h"
+
+namespace application_manager {
+
+namespace commands {
+
+UISetAppIconRequest::UISetAppIconRequest(const MessageSharedPtr& message)
+ : RequestToHMI(message) {
+}
+
+UISetAppIconRequest::~UISetAppIconRequest() {
+}
+
+void UISetAppIconRequest::Run() {
+ LOG4CXX_AUTO_TRACE(logger_);
+
+ SendRequest();
+}
+
+} // namespace commands
+
+} // namespace application_manager
+
diff --git a/src/components/application_manager/src/commands/hmi/ui_set_app_icon_response.cc b/src/components/application_manager/src/commands/hmi/ui_set_app_icon_response.cc
new file mode 100644
index 0000000000..46c10e8f22
--- /dev/null
+++ b/src/components/application_manager/src/commands/hmi/ui_set_app_icon_response.cc
@@ -0,0 +1,57 @@
+/*
+ * Copyright (c) 2013, Ford Motor Company
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * Redistributions of source code must retain the above copyright notice, this
+ * list of conditions and the following disclaimer.
+ *
+ * Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following
+ * disclaimer in the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * Neither the name of the Ford Motor Company nor the names of its contributors
+ * may be used to endorse or promote products derived from this software
+ * without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+ * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ */
+#include "application_manager/commands/hmi/ui_set_app_icon_response.h"
+#include "application_manager/event_engine/event.h"
+#include "interfaces/HMI_API.h"
+
+namespace application_manager {
+
+namespace commands {
+
+UISetAppIconResponse::UISetAppIconResponse(const MessageSharedPtr& message)
+ : ResponseFromHMI(message) {
+}
+
+UISetAppIconResponse::~UISetAppIconResponse() {
+}
+
+void UISetAppIconResponse::Run() {
+ LOG4CXX_AUTO_TRACE(logger_);
+
+ event_engine::Event event(hmi_apis::FunctionID::UI_SetAppIcon);
+ event.set_smart_object(*message_);
+ event.raise();
+}
+
+} // namespace commands
+
+} // namespace application_manager
diff --git a/src/components/application_manager/src/commands/hmi/ui_set_display_layout_request.cc b/src/components/application_manager/src/commands/hmi/ui_set_display_layout_request.cc
index 3dea853486..df9f6cf2a6 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
@@ -1,4 +1,4 @@
-/**
+/*
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
@@ -44,7 +44,7 @@ UiSetDisplayLayoutRequest::~UiSetDisplayLayoutRequest() {
}
void UiSetDisplayLayoutRequest::Run() {
- LOG4CXX_INFO(logger_, "UiSetDisplayLayoutRequest::Run");
+ LOG4CXX_AUTO_TRACE(logger_);
SendRequest();
}
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 f381a4db28..f23cc92642 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
@@ -1,4 +1,4 @@
-/**
+/*
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
@@ -46,7 +46,7 @@ UiSetDisplayLayoutResponse::~UiSetDisplayLayoutResponse() {
}
void UiSetDisplayLayoutResponse::Run() {
- LOG4CXX_INFO(logger_, "UiSetDisplayLayoutResponse::Run");
+ LOG4CXX_AUTO_TRACE(logger_);
event_engine::Event event(hmi_apis::FunctionID::UI_SetDisplayLayout);
event.set_smart_object(*message_);
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 e538866c1b..39a0e865df 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
@@ -1,4 +1,4 @@
-/**
+/*
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
@@ -45,7 +45,7 @@ UISetGlobalPropertiesRequest::~UISetGlobalPropertiesRequest() {
}
void UISetGlobalPropertiesRequest::Run() {
- LOG4CXX_INFO(logger_, "UISetGlobalPropertiesRequest::Run");
+ LOG4CXX_AUTO_TRACE(logger_);
SendRequest();
}
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 67023533c9..23173961fb 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
@@ -1,4 +1,4 @@
-/**
+/*
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
@@ -46,7 +46,7 @@ UISetGlobalPropertiesResponse::~UISetGlobalPropertiesResponse() {
}
void UISetGlobalPropertiesResponse::Run() {
- LOG4CXX_INFO(logger_, "UISetGlobalPropertiesResponse::Run");
+ LOG4CXX_AUTO_TRACE(logger_);
event_engine::Event event(hmi_apis::FunctionID::UI_SetGlobalProperties);
event.set_smart_object(*message_);
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 1eb218013b..272ff561aa 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
@@ -1,4 +1,4 @@
-/**
+/*
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
@@ -45,7 +45,7 @@ UISetMediaClockTimerRequest::~UISetMediaClockTimerRequest() {
}
void UISetMediaClockTimerRequest::Run() {
- LOG4CXX_INFO(logger_, "UISetMediaClockTimerRequest::Run");
+ LOG4CXX_AUTO_TRACE(logger_);
SendRequest();
}
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 ee67862a1a..ae878bd694 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
@@ -1,4 +1,4 @@
-/**
+/*
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
@@ -46,7 +46,7 @@ UISetMediaClockTimerResponse::~UISetMediaClockTimerResponse() {
}
void UISetMediaClockTimerResponse::Run() {
- LOG4CXX_INFO(logger_, "UISetMediaClockTimerResponse::Run");
+ LOG4CXX_AUTO_TRACE(logger_);
event_engine::Event event(hmi_apis::FunctionID::UI_SetMediaClockTimer);
event.set_smart_object(*message_);
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 841c8a62fa..65b9894902 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
@@ -1,4 +1,4 @@
-/**
+/*
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
@@ -44,7 +44,7 @@ UIShowRequest::~UIShowRequest() {
}
void UIShowRequest::Run() {
- LOG4CXX_INFO(logger_, "UIShowRequest::Run");
+ LOG4CXX_AUTO_TRACE(logger_);
SendRequest();
}
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 c95cbbd2ba..8d348e6086 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
@@ -1,4 +1,4 @@
-/**
+/*
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
@@ -44,7 +44,7 @@ UIShowResponse::~UIShowResponse() {
}
void UIShowResponse::Run() {
- LOG4CXX_INFO(logger_, "UIShowResponse::Run");
+ LOG4CXX_AUTO_TRACE(logger_);
event_engine::Event event(hmi_apis::FunctionID::UI_Show);
event.set_smart_object(*message_);
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 fc7203c0ea..c8d3242d98 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
@@ -1,4 +1,4 @@
-/**
+/*
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
@@ -44,7 +44,7 @@ UISliderRequest::~UISliderRequest() {
}
void UISliderRequest::Run() {
- LOG4CXX_INFO(logger_, "UISliderRequest::Run");
+ LOG4CXX_AUTO_TRACE(logger_);
SendRequest();
}
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 8d2522e224..7837117ebd 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
@@ -1,4 +1,4 @@
-/**
+/*
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
@@ -45,7 +45,7 @@ UISliderResponse::~UISliderResponse() {
}
void UISliderResponse::Run() {
- LOG4CXX_INFO(logger_, "UISliderResponse::Run");
+ LOG4CXX_AUTO_TRACE(logger_);
event_engine::Event event(hmi_apis::FunctionID::UI_Slider);
event.set_smart_object(*message_);
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 955f4b19c6..72f65d1a2e 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
@@ -1,4 +1,4 @@
-/**
+/*
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
@@ -44,7 +44,7 @@ UpdateAppListRequest::~UpdateAppListRequest() {
}
void UpdateAppListRequest::Run() {
- LOG4CXX_INFO(logger_, "UpdateAppListRequest::Run");
+ LOG4CXX_AUTO_TRACE(logger_);
SendRequest();
}
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 d5db0b4ea8..308bce3ad2 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
@@ -1,4 +1,4 @@
-/**
+/*
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
@@ -44,7 +44,7 @@ UpdateAppListResponse::~UpdateAppListResponse() {
}
void UpdateAppListResponse::Run() {
- LOG4CXX_INFO(logger_, "UpdateAppListResponse::Run");
+ LOG4CXX_AUTO_TRACE(logger_);
// TODO(PV): add check
}
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 1f632378b4..696e2f85c4 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
@@ -1,4 +1,4 @@
-/**
+/*
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
@@ -50,17 +50,17 @@ UpdateDeviceListRequest::~UpdateDeviceListRequest() {
}
void UpdateDeviceListRequest::Run() {
- LOG4CXX_INFO(logger_, "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 "CUSTOMER_PASA" is used in order to exclude
+ // Flag conditional compilation for specific customer is used in order to exclude
// hit code to RTC
if (true == profile::Profile::instance()->launch_hmi()) {
if (!ApplicationManagerImpl::instance()->IsHMICooperating()) {
- LOG4CXX_INFO(logger_, "MY Wait for HMI Cooperation");
+ LOG4CXX_INFO(logger_, "Wait for HMI Cooperation");
subscribe_on_event(hmi_apis::FunctionID::BasicCommunication_OnReady);
termination_condition_.Wait(auto_lock);
- LOG4CXX_INFO(logger_, "MY HMI Cooperation OK");
+ LOG4CXX_DEBUG(logger_, "HMI Cooperation OK");
}
}
@@ -68,7 +68,7 @@ void UpdateDeviceListRequest::Run() {
}
void UpdateDeviceListRequest::on_event(const event_engine::Event& event) {
- LOG4CXX_INFO(logger_, "UpdateDeviceListRequest::on_event");
+ LOG4CXX_AUTO_TRACE(logger_);
sync_primitives::AutoLock auto_lock(wait_hmi_lock);
switch (event.id()) {
case hmi_apis::FunctionID::BasicCommunication_OnReady : {
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 85ef57404c..b3e0f9a309 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
@@ -1,4 +1,4 @@
-/**
+/*
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
@@ -44,7 +44,7 @@ UpdateDeviceListResponse::~UpdateDeviceListResponse() {
}
void UpdateDeviceListResponse::Run() {
- LOG4CXX_INFO(logger_, "UpdateDeviceListResponse::Run");
+ LOG4CXX_AUTO_TRACE(logger_);
// TODO(PV): add check for correctness.
}
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 7d47f84ce3..b03e595e9c 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
@@ -46,7 +46,7 @@ UpdateSDLRequest::~UpdateSDLRequest() {
}
void UpdateSDLRequest::Run() {
- LOG4CXX_INFO(logger_, "UpdateSDLRequest::Run");
+ LOG4CXX_AUTO_TRACE(logger_);
policy::PolicyHandler::instance()->PTExchangeAtUserRequest(
(*message_)[strings::params][strings::correlation_id].asInt());
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 d2be2c655c..d9c8b6102f 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
@@ -1,4 +1,4 @@
-/**
+/*
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
@@ -44,7 +44,7 @@ UpdateSDLResponse::~UpdateSDLResponse() {
}
void UpdateSDLResponse::Run() {
- LOG4CXX_INFO(logger_, "UpdateSDLResponse::Run");
+ LOG4CXX_AUTO_TRACE(logger_);
(*message_)[strings::params][strings::protocol_type] = hmi_protocol_type_;
(*message_)[strings::params][strings::protocol_version] = protocol_version_;
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 45d44e4475..eb9a9841be 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
@@ -1,4 +1,4 @@
-/**
+/*
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
@@ -44,7 +44,7 @@ VIDiagnosticMessageRequest::~VIDiagnosticMessageRequest() {
}
void VIDiagnosticMessageRequest::Run() {
- LOG4CXX_INFO(logger_, "VIDiagnosticMessageRequest::Run");
+ LOG4CXX_AUTO_TRACE(logger_);
SendRequest();
}
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 d83869b279..4183395e99 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
@@ -1,4 +1,4 @@
-/**
+/*
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
@@ -45,7 +45,7 @@ VIDiagnosticMessageResponse::~VIDiagnosticMessageResponse() {
}
void VIDiagnosticMessageResponse::Run() {
- LOG4CXX_INFO(logger_, "VIDiagnosticMessageResponse::Run");
+ LOG4CXX_AUTO_TRACE(logger_);
event_engine::Event event(hmi_apis::FunctionID::VehicleInfo_DiagnosticMessage);
event.set_smart_object(*message_);
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 5289816fb5..a89252ada2 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
@@ -1,4 +1,4 @@
-/**
+/*
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
@@ -44,7 +44,7 @@ VIGetDTCsRequest::~VIGetDTCsRequest() {
}
void VIGetDTCsRequest::Run() {
- LOG4CXX_INFO(logger_, "VIGetDTCsRequest::Run");
+ LOG4CXX_AUTO_TRACE(logger_);
SendRequest();
}
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 0cacc51d6c..c44f5213d2 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
@@ -1,4 +1,4 @@
-/**
+/*
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
@@ -45,7 +45,7 @@ VIGetDTCsResponse::~VIGetDTCsResponse() {
}
void VIGetDTCsResponse::Run() {
- LOG4CXX_INFO(logger_, "VIGetDTCsResponse::Run");
+ LOG4CXX_AUTO_TRACE(logger_);
event_engine::Event event(hmi_apis::FunctionID::VehicleInfo_GetDTCs);
event.set_smart_object(*message_);
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 40b2ca9fed..37d5ede4b0 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
@@ -1,4 +1,4 @@
-/**
+/*
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
@@ -45,7 +45,7 @@ VIGetVehicleDataRequest::~VIGetVehicleDataRequest() {
}
void VIGetVehicleDataRequest::Run() {
- LOG4CXX_INFO(logger_, "VIGetVehicleDataRequest::Run");
+ LOG4CXX_AUTO_TRACE(logger_);
SendRequest();
}
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 73444a19bd..0ed0f7f515 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
@@ -1,4 +1,4 @@
-/**
+/*
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
@@ -35,7 +35,6 @@
#include "interfaces/HMI_API.h"
namespace application_manager {
-
namespace commands {
VIGetVehicleDataResponse::VIGetVehicleDataResponse(
@@ -47,22 +46,14 @@ VIGetVehicleDataResponse::~VIGetVehicleDataResponse() {
}
void VIGetVehicleDataResponse::Run() {
- LOG4CXX_INFO(logger_, "VIGetVehicleDataResponse::Run");
- smart_objects::SmartObject* result_so = new smart_objects::SmartObject(
- smart_objects::SmartType_Map);
- if (!result_so) {
- // TODO(PV): add response with out of memory.
- LOG4CXX_ERROR(logger_,
- "Failed to create new Smart Object on get vehicle response.");
- return;
- }
+ LOG4CXX_AUTO_TRACE(logger_);
event_engine::Event event(hmi_apis::FunctionID::VehicleInfo_GetVehicleData);
- smart_objects::SmartObject& result = *result_so;
-
if ((*message_)[strings::params][strings::message_type]
== static_cast<int32_t>(hmi_apis::messageType::error_response)) {
+ smart_objects::SmartObject result(smart_objects::SmartType_Map);
+
if ((*message_)[strings::params].keyExists(strings::data)) {
result[strings::msg_params] = (*message_)[strings::params][strings::data];
result[strings::params][hmi_response::code] =
@@ -79,17 +70,14 @@ void VIGetVehicleDataResponse::Run() {
(*message_)[strings::params][strings::protocol_version];
}
-
- event.set_smart_object(*result_so);
+ event.set_smart_object(result);
} else {
event.set_smart_object(*message_);
policy::PolicyHandler::instance()->OnVehicleDataUpdated(*message_);
}
-
event.raise();
}
} // namespace commands
-
} // namespace application_manager
diff --git a/src/components/application_manager/src/commands/hmi/vi_get_vehicle_type_request.cc b/src/components/application_manager/src/commands/hmi/vi_get_vehicle_type_request.cc
index 4c46de950e..11dd26dfad 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
@@ -1,4 +1,4 @@
-/**
+/*
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
@@ -45,7 +45,7 @@ VIGetVehicleTypeRequest::~VIGetVehicleTypeRequest() {
}
void VIGetVehicleTypeRequest::Run() {
- LOG4CXX_INFO(logger_, "VIGetVehicleTypeRequest::Run");
+ LOG4CXX_AUTO_TRACE(logger_);
SendRequest();
}
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 18c0136d12..2b5f6b96be 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
@@ -1,4 +1,4 @@
-/**
+/*
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
@@ -45,7 +45,7 @@ VIGetVehicleTypeResponse::~VIGetVehicleTypeResponse() {
}
void VIGetVehicleTypeResponse::Run() {
- LOG4CXX_INFO(logger_, "VIGetVehicleTypeResponse::Run");
+ LOG4CXX_AUTO_TRACE(logger_);
HMICapabilities& hmi_capabilities =
ApplicationManagerImpl::instance()->hmi_capabilities();
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 074d6f6022..aae05e0fcc 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
@@ -1,4 +1,4 @@
-/**
+/*
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
@@ -44,7 +44,7 @@ VIIsReadyRequest::~VIIsReadyRequest() {
}
void VIIsReadyRequest::Run() {
- LOG4CXX_INFO(logger_, "VIIsReadyRequest::Run");
+ LOG4CXX_AUTO_TRACE(logger_);
SendRequest();
}
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 e7c9c180c2..4a79a6d9b9 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
@@ -1,4 +1,4 @@
-/**
+/*
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
@@ -45,7 +45,7 @@ VIIsReadyResponse::~VIIsReadyResponse() {
}
void VIIsReadyResponse::Run() {
- LOG4CXX_INFO(logger_, "VIIsReadyResponse::Run");
+ LOG4CXX_AUTO_TRACE(logger_);
smart_objects::SmartObject& object = *message_;
bool is_available = false;
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 1485b471c4..92a105dde4 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
@@ -1,4 +1,4 @@
-/**
+/*
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
@@ -44,7 +44,7 @@ VIReadDIDRequest::~VIReadDIDRequest() {
}
void VIReadDIDRequest::Run() {
- LOG4CXX_INFO(logger_, "VIReadDIDRequest::Run");
+ LOG4CXX_AUTO_TRACE(logger_);
SendRequest();
}
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 ddd9f3c540..675b944272 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
@@ -1,4 +1,4 @@
-/**
+/*
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
@@ -46,7 +46,7 @@ VIReadDIDResponse::~VIReadDIDResponse() {
}
void VIReadDIDResponse::Run() {
- LOG4CXX_INFO(logger_, "VIReadDIDResponse::Run");
+ LOG4CXX_AUTO_TRACE(logger_);
event_engine::Event event(hmi_apis::FunctionID::VehicleInfo_ReadDID);
event.set_smart_object(*message_);
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 38950a2a2b..5ad4daea94 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
@@ -1,4 +1,4 @@
-/**
+/*
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
@@ -45,7 +45,7 @@ VISubscribeVehicleDataRequest::~VISubscribeVehicleDataRequest() {
}
void VISubscribeVehicleDataRequest::Run() {
- LOG4CXX_INFO(logger_, "VISubscribeVehicleDataRequest::Run");
+ LOG4CXX_AUTO_TRACE(logger_);
SendRequest();
}
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 bd67294fbb..91d9c85382 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
@@ -1,4 +1,4 @@
-/**
+/*
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
@@ -45,7 +45,7 @@ VISubscribeVehicleDataResponse::~VISubscribeVehicleDataResponse() {
}
void VISubscribeVehicleDataResponse::Run() {
- LOG4CXX_INFO(logger_, "VISubscribeVehicleDataResponse::Run");
+ LOG4CXX_AUTO_TRACE(logger_);
event_engine::Event event(
hmi_apis::FunctionID::VehicleInfo_SubscribeVehicleData
);
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 0af87c2a2e..7c12cbe6f1 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
@@ -1,4 +1,4 @@
-/**
+/*
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
@@ -45,7 +45,7 @@ VIUnsubscribeVehicleDataRequest::~VIUnsubscribeVehicleDataRequest() {
}
void VIUnsubscribeVehicleDataRequest::Run() {
- LOG4CXX_INFO(logger_, "VIUnsubscribeVehicleDataRequest::Run");
+ LOG4CXX_AUTO_TRACE(logger_);
SendRequest();
}
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 22231b4a61..124b7dacbd 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
@@ -1,4 +1,4 @@
-/**
+/*
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
@@ -45,7 +45,7 @@ VIUnsubscribeVehicleDataResponse::~VIUnsubscribeVehicleDataResponse() {
}
void VIUnsubscribeVehicleDataResponse::Run() {
- LOG4CXX_INFO(logger_, "VIUnsubscribeVehicleDataResponse::Run");
+ LOG4CXX_AUTO_TRACE(logger_);
event_engine::Event event(
hmi_apis::FunctionID::VehicleInfo_UnsubscribeVehicleData
);
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 a74ece95da..c900df1678 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
@@ -1,4 +1,4 @@
-/**
+/*
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
@@ -44,7 +44,7 @@ VRAddCommandRequest::~VRAddCommandRequest() {
}
void VRAddCommandRequest::Run() {
- LOG4CXX_INFO(logger_, "VRAddCommandRequest::Run");
+ LOG4CXX_AUTO_TRACE(logger_);
SendRequest();
}
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 513ccdace2..3d34b5c65a 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
@@ -1,4 +1,4 @@
-/**
+/*
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
@@ -45,7 +45,7 @@ VRAddCommandResponse::~VRAddCommandResponse() {
}
void VRAddCommandResponse::Run() {
- LOG4CXX_INFO(logger_, "VRAddCommandResponse::Run");
+ LOG4CXX_AUTO_TRACE(logger_);
event_engine::Event event(hmi_apis::FunctionID::VR_AddCommand);
event.set_smart_object(*message_);
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 bd7c1e7841..fe8ee69021 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
@@ -1,4 +1,4 @@
-/**
+/*
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
@@ -45,7 +45,7 @@ VRChangeRegistrationRequest::~VRChangeRegistrationRequest() {
}
void VRChangeRegistrationRequest::Run() {
- LOG4CXX_INFO(logger_, "VRChangeRegistrationRequest::Run");
+ LOG4CXX_AUTO_TRACE(logger_);
SendRequest();
}
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 92a36d23f6..5bd2fb853a 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
@@ -1,4 +1,4 @@
-/**
+/*
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
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 0241be6308..e3052ae208 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
@@ -1,4 +1,4 @@
-/**
+/*
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
@@ -44,7 +44,7 @@ VRDeleteCommandRequest::~VRDeleteCommandRequest() {
}
void VRDeleteCommandRequest::Run() {
- LOG4CXX_INFO(logger_, "VRDeleteCommandRequest::Run");
+ LOG4CXX_AUTO_TRACE(logger_);
SendRequest();
}
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 c5a13126b0..8954b1d1b9 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
@@ -1,4 +1,4 @@
-/**
+/*
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
@@ -46,7 +46,7 @@ VRDeleteCommandResponse::~VRDeleteCommandResponse() {
}
void VRDeleteCommandResponse::Run() {
- LOG4CXX_INFO(logger_, "VRDeleteCommandResponse::Run");
+ LOG4CXX_AUTO_TRACE(logger_);
event_engine::Event event(hmi_apis::FunctionID::VR_DeleteCommand);
event.set_smart_object(*message_);
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 8b1d4ae0b4..58d0a4b3e4 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
@@ -1,4 +1,4 @@
-/**
+/*
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
@@ -45,7 +45,7 @@ VRGetCapabilitiesRequest::~VRGetCapabilitiesRequest() {
}
void VRGetCapabilitiesRequest::Run() {
- LOG4CXX_INFO(logger_, "VRGetCapabilitiesRequest::Run");
+ LOG4CXX_AUTO_TRACE(logger_);
SendRequest();
}
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 de6fdd7a93..5ca1d86190 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
@@ -1,4 +1,4 @@
-/**
+/*
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
@@ -45,7 +45,7 @@ VRGetCapabilitiesResponse::~VRGetCapabilitiesResponse() {
}
void VRGetCapabilitiesResponse::Run() {
- LOG4CXX_INFO(logger_, "VRGetCapabilitiesResponse::Run");
+ LOG4CXX_AUTO_TRACE(logger_);
HMICapabilities& hmi_capabilities =
ApplicationManagerImpl::instance()->hmi_capabilities();
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 9f4aeb9797..0b98979418 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
@@ -1,4 +1,4 @@
-/**
+/*
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
@@ -44,7 +44,7 @@ VRGetLanguageRequest::~VRGetLanguageRequest() {
}
void VRGetLanguageRequest::Run() {
- LOG4CXX_INFO(logger_, "VRGetLanguageRequest::Run");
+ LOG4CXX_AUTO_TRACE(logger_);
SendRequest();
}
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 acbd24fbbf..62127bdf9b 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
@@ -1,4 +1,4 @@
-/**
+/*
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
@@ -45,7 +45,7 @@ VRGetLanguageResponse::~VRGetLanguageResponse() {
}
void VRGetLanguageResponse::Run() {
- LOG4CXX_INFO(logger_, "VRGetLanguageResponse::Run");
+ LOG4CXX_AUTO_TRACE(logger_);
HMICapabilities& hmi_capabilities =
ApplicationManagerImpl::instance()->hmi_capabilities();
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 e43d88430d..aea97da02d 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
@@ -1,4 +1,4 @@
-/**
+/*
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
@@ -45,7 +45,7 @@ VRGetSupportedLanguagesRequest::~VRGetSupportedLanguagesRequest() {
}
void VRGetSupportedLanguagesRequest::Run() {
- LOG4CXX_INFO(logger_, "VRGetSupportedLanguagesRequest::Run");
+ LOG4CXX_AUTO_TRACE(logger_);
SendRequest();
}
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 d2cc148a09..b1ea89a460 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
@@ -1,4 +1,4 @@
-/**
+/*
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
@@ -47,7 +47,7 @@ VRGetSupportedLanguagesResponse::~VRGetSupportedLanguagesResponse() {
}
void VRGetSupportedLanguagesResponse::Run() {
- LOG4CXX_INFO(logger_, "VRGetSupportedLanguagesResponse::Run");
+ LOG4CXX_AUTO_TRACE(logger_);
const hmi_apis::Common_Result::eType code =
static_cast<hmi_apis::Common_Result::eType>(
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 944cfcbb3c..a5a3a2b62e 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
@@ -1,4 +1,4 @@
-/**
+/*
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
@@ -44,7 +44,7 @@ VRIsReadyRequest::~VRIsReadyRequest() {
}
void VRIsReadyRequest::Run() {
- LOG4CXX_INFO(logger_, "VRIsReadyRequest::Run");
+ LOG4CXX_AUTO_TRACE(logger_);
SendRequest();
}
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 8cf5e66ee7..a0de7ae33a 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
@@ -1,4 +1,4 @@
-/**
+/*
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
@@ -44,7 +44,7 @@ VRIsReadyResponse::~VRIsReadyResponse() {
}
void VRIsReadyResponse::Run() {
- LOG4CXX_INFO(logger_, "VRIsReadyResponse::Run");
+ LOG4CXX_AUTO_TRACE(logger_);
smart_objects::SmartObject& object = *message_;
bool is_available = false;
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 6de32dc5b5..1791bab57a 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
@@ -1,4 +1,4 @@
-/**
+/*
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
@@ -45,7 +45,7 @@ VRPerformInteractionRequest::~VRPerformInteractionRequest() {
}
void VRPerformInteractionRequest::Run() {
- LOG4CXX_INFO(logger_, "VRPerformInteractionRequest::Run");
+ LOG4CXX_AUTO_TRACE(logger_);
SendRequest();
}
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 fea09b9f29..8fc22ce872 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
@@ -1,4 +1,4 @@
-/**
+/*
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
@@ -45,7 +45,7 @@ VRPerformInteractionResponse::~VRPerformInteractionResponse() {
}
void VRPerformInteractionResponse::Run() {
- LOG4CXX_INFO(logger_, "VRPerformInteractionResponse::Run");
+ LOG4CXX_AUTO_TRACE(logger_);
event_engine::Event event(hmi_apis::FunctionID::VR_PerformInteraction);
event.set_smart_object(*message_);
event.raise();
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 35cc619895..da44d0e7c4 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
@@ -56,13 +56,13 @@ AddCommandRequest::~AddCommandRequest() {
}
void AddCommandRequest::onTimeOut() {
- LOG4CXX_INFO(logger_, "AddCommandRequest::onTimeOut");
+ LOG4CXX_AUTO_TRACE(logger_);
RemoveCommand();
CommandRequestImpl::onTimeOut();
}
void AddCommandRequest::Run() {
- LOG4CXX_INFO(logger_, "AddCommandRequest::Run");
+ LOG4CXX_AUTO_TRACE(logger_);
ApplicationSharedPtr app = ApplicationManagerImpl::instance()->application(
(*message_)[strings::params][strings::connection_key].asUInt());
@@ -198,7 +198,8 @@ bool AddCommandRequest::CheckCommandName(ApplicationConstSharedPtr app) {
return false;
}
- const CommandsMap& commands = app->commands_map();
+ const DataAccessor<CommandsMap> accessor = app->commands_map();
+ const CommandsMap& commands = accessor.GetData();
CommandsMap::const_iterator i = commands.begin();
uint32_t saved_parent_id = 0;
uint32_t parent_id = 0;
@@ -235,7 +236,8 @@ bool AddCommandRequest::CheckCommandVRSynonym(ApplicationConstSharedPtr app) {
return false;
}
- const CommandsMap& commands = app->commands_map();
+ const DataAccessor<CommandsMap> accessor = app->commands_map();
+ const CommandsMap& commands = accessor.GetData();
CommandsMap::const_iterator it = commands.begin();
for (; commands.end() != it; ++it) {
@@ -284,10 +286,22 @@ bool AddCommandRequest::CheckCommandParentId(ApplicationConstSharedPtr app) {
}
void AddCommandRequest::on_event(const event_engine::Event& event) {
- LOG4CXX_INFO(logger_, "AddCommandRequest::on_event");
+ LOG4CXX_AUTO_TRACE(logger_);
const smart_objects::SmartObject& message = event.smart_object();
+ ApplicationSharedPtr application =
+ ApplicationManagerImpl::instance()->application(connection_key());
+
+ if (!application) {
+ LOG4CXX_ERROR(logger_, "NULL pointer");
+ return;
+ }
+
+ smart_objects::SmartObject msg_param(smart_objects::SmartType_Map);
+ msg_param[strings::cmd_id] = (*message_)[strings::msg_params][strings::cmd_id];
+ msg_param[strings::app_id] = application->app_id();
+
switch (event.id()) {
case hmi_apis::FunctionID::UI_AddCommand: {
LOG4CXX_INFO(logger_, "Received UI_AddCommand event");
@@ -296,8 +310,8 @@ void AddCommandRequest::on_event(const event_engine::Event& event) {
message[strings::params][hmi_response::code].asInt());
if (hmi_apis::Common_Result::SUCCESS != ui_result_) {
- (*message_)[strings::msg_params].erase(strings::menu_params);
- }
+ (*message_)[strings::msg_params].erase(strings::menu_params);
+ }
break;
}
case hmi_apis::FunctionID::VR_AddCommand: {
@@ -318,18 +332,18 @@ void AddCommandRequest::on_event(const event_engine::Event& event) {
}
if (!IsPendingResponseExist()) {
+
ApplicationSharedPtr application =
ApplicationManagerImpl::instance()->application(connection_key());
- if (!application) {
- LOG4CXX_ERROR(logger_, "NULL pointer");
- return;
- }
-
if (hmi_apis::Common_Result::REJECTED == ui_result_) {
RemoveCommand();
}
+ smart_objects::SmartObject msg_params(smart_objects::SmartType_Map);
+ msg_params[strings::cmd_id] = (*message_)[strings::msg_params][strings::cmd_id];
+ msg_params[strings::app_id] = application->app_id();
+
mobile_apis::Result::eType result_code = mobile_apis::Result::INVALID_ENUM;
bool result = ((hmi_apis::Common_Result::SUCCESS == ui_result_) &&
@@ -348,6 +362,39 @@ void AddCommandRequest::on_event(const event_engine::Event& event) {
std::max(ui_result_, vr_result_));
}
+ if (BothSend() && hmi_apis::Common_Result::SUCCESS == vr_result_) {
+ if (hmi_apis::Common_Result::SUCCESS != ui_result_ &&
+ hmi_apis::Common_Result::WARNINGS != ui_result_ &&
+ hmi_apis::Common_Result::UNSUPPORTED_RESOURCE != ui_result_) {
+
+ result_code =
+ (ui_result_ == hmi_apis::Common_Result::REJECTED) ?
+ mobile_apis::Result::REJECTED : mobile_apis::Result::GENERIC_ERROR;
+
+ msg_params[strings::grammar_id] = application->get_grammar_id();
+ msg_params[strings::type] = hmi_apis::Common_VRCommandType::Command;
+
+ SendHMIRequest(hmi_apis::FunctionID::VR_DeleteCommand, &msg_params);
+ application->RemoveCommand((*message_)[strings::msg_params]
+ [strings::cmd_id].asUInt());
+ result = false;
+ }
+ }
+
+ if(BothSend() && hmi_apis::Common_Result::SUCCESS == ui_result_ &&
+ hmi_apis::Common_Result::SUCCESS != vr_result_) {
+
+ result_code =
+ (vr_result_ == hmi_apis::Common_Result::REJECTED) ?
+ mobile_apis::Result::REJECTED : mobile_apis::Result::GENERIC_ERROR;
+
+ SendHMIRequest(hmi_apis::FunctionID::UI_DeleteCommand, &msg_params);
+
+ application->RemoveCommand((*message_)[strings::msg_params]
+ [strings::cmd_id].asUInt());
+ result = false;
+ }
+
SendResponse(result, result_code, NULL, &(message[strings::msg_params]));
if (true == result) {
application->UpdateHash();
@@ -360,7 +407,7 @@ bool AddCommandRequest::IsPendingResponseExist() {
}
bool AddCommandRequest::IsWhiteSpaceExist() {
- LOG4CXX_INFO(logger_, "AddCommandRequest::IsWhiteSpaceExist");
+ LOG4CXX_AUTO_TRACE(logger_);
const char* str = NULL;
if ((*message_)[strings::msg_params].keyExists(strings::menu_params)) {
@@ -397,16 +444,42 @@ bool AddCommandRequest::IsWhiteSpaceExist() {
return false;
}
+bool AddCommandRequest::BothSend() const {
+ return send_vr_ && send_ui_;
+}
+
void AddCommandRequest::RemoveCommand() {
- LOG4CXX_INFO(logger_, "AddCommandRequest::RemoveCommand");
+ LOG4CXX_AUTO_TRACE(logger_);
ApplicationSharedPtr app = ApplicationManagerImpl::instance()->application(
connection_key());
if (!app.valid()) {
LOG4CXX_ERROR(logger_, "No application associated with session key");
return;
}
+
+ smart_objects::SmartObject msg_params(smart_objects::SmartType_Map);
+ msg_params[strings::cmd_id] = (*message_)[strings::msg_params][strings::cmd_id];
+ msg_params[strings::app_id] = app->app_id();
+
app->RemoveCommand((*message_)[strings::msg_params]
[strings::cmd_id].asUInt());
+
+ if (BothSend() && !(is_vr_received_ || is_ui_received_)) {
+ // in case we have send bth UI and VR and no one respond
+ // we have nothing to remove from HMI so no DeleteCommand expected
+ return;
+ }
+
+ if (BothSend() && !is_vr_received_) {
+ SendHMIRequest(hmi_apis::FunctionID::UI_DeleteCommand, &msg_params);
+ }
+
+ if (BothSend() && !is_ui_received_) {
+ msg_params[strings::grammar_id] = app->get_grammar_id();
+ msg_params[strings::type] = hmi_apis::Common_VRCommandType::Command;
+ SendHMIRequest(hmi_apis::FunctionID::VR_DeleteCommand, &msg_params);
+ }
+
}
} // namespace commands
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 0c135af076..51684c065b 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
@@ -46,7 +46,7 @@ AddCommandResponse::~AddCommandResponse() {
}
void AddCommandResponse::Run() {
- LOG4CXX_INFO(logger_, "AddCommandResponse::Run");
+ LOG4CXX_AUTO_TRACE(logger_);
ApplicationManagerImpl::instance()->SendMessageToMobile(message_);
}
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 ce6fa3fc51..7e0e6aeca4 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
@@ -47,7 +47,7 @@ AddSubMenuRequest::~AddSubMenuRequest() {
}
void AddSubMenuRequest::Run() {
- LOG4CXX_INFO(logger_, "AddSubMenuRequest::Run");
+ LOG4CXX_AUTO_TRACE(logger_);
ApplicationSharedPtr app = ApplicationManagerImpl::instance()->application(
(*message_)[strings::params][strings::connection_key].asUInt());
@@ -95,7 +95,7 @@ void AddSubMenuRequest::Run() {
}
void AddSubMenuRequest::on_event(const event_engine::Event& event) {
- LOG4CXX_INFO(logger_, "AddSubMenuRequest::on_event");
+ LOG4CXX_AUTO_TRACE(logger_);
const smart_objects::SmartObject& message = event.smart_object();
switch (event.id()) {
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 bcd7df2888..ff37a6a998 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
@@ -47,7 +47,7 @@ AddSubMenuResponse::~AddSubMenuResponse() {
}
void AddSubMenuResponse::Run() {
- LOG4CXX_INFO(logger_, "AddSubMenuResponse::Run");
+ LOG4CXX_AUTO_TRACE(logger_);
ApplicationManagerImpl::instance()->SendMessageToMobile(message_);
}
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 abb5bc7f3c..77d2211157 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
@@ -52,7 +52,7 @@ AlertManeuverRequest::~AlertManeuverRequest() {
}
void AlertManeuverRequest::Run() {
- LOG4CXX_INFO(logger_, "AlertManeuverRequest::Run");
+ LOG4CXX_AUTO_TRACE(logger_);
if ((!(*message_)[strings::msg_params].keyExists(strings::soft_buttons)) &&
(!(*message_)[strings::msg_params].keyExists(strings::tts_chunks))) {
@@ -127,7 +127,7 @@ void AlertManeuverRequest::Run() {
}
void AlertManeuverRequest::on_event(const event_engine::Event& event) {
- LOG4CXX_INFO(logger_, "AlertManeuverRequest::on_event");
+ LOG4CXX_AUTO_TRACE(logger_);
const smart_objects::SmartObject& message = event.smart_object();
mobile_apis::Result::eType result_code = mobile_apis::Result::INVALID_ENUM;
@@ -206,7 +206,7 @@ void AlertManeuverRequest::on_event(const event_engine::Event& event) {
}
bool AlertManeuverRequest::IsWhiteSpaceExist() {
- LOG4CXX_INFO(logger_, "AlertManeuverRequest::IsWhiteSpaceExist");
+ LOG4CXX_AUTO_TRACE(logger_);
const char* str = NULL;
if ((*message_)[strings::msg_params].keyExists(strings::tts_chunks)) {
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 99fcde69a8..8f9c73267f 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
@@ -47,7 +47,7 @@ AlertManeuverResponse::~AlertManeuverResponse() {
}
void AlertManeuverResponse::Run() {
- LOG4CXX_INFO(logger_, "AlertManeuverResponse::Run");
+ LOG4CXX_AUTO_TRACE(logger_);
ApplicationManagerImpl::instance()->SendMessageToMobile(message_);
}
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 c08b7c32d7..ccabe4e177 100644
--- a/src/components/application_manager/src/commands/mobile/alert_request.cc
+++ b/src/components/application_manager/src/commands/mobile/alert_request.cc
@@ -84,7 +84,7 @@ bool AlertRequest::Init() {
}
void AlertRequest::Run() {
- LOG4CXX_INFO(logger_, "AlertRequest::Run");
+ LOG4CXX_AUTO_TRACE(logger_);
uint32_t app_id = (*message_)[strings::params][strings::connection_key]
.asInt();
@@ -116,7 +116,7 @@ void AlertRequest::onTimeOut() {
}
void AlertRequest::on_event(const event_engine::Event& event) {
- LOG4CXX_INFO(logger_, "AlertRequest::on_event");
+ LOG4CXX_AUTO_TRACE(logger_);
const smart_objects::SmartObject& message = event.smart_object();
switch (event.id()) {
@@ -198,20 +198,12 @@ void AlertRequest::on_event(const event_engine::Event& event) {
response_success_ = true;
}
- // If timeout is not set, watchdog will not track request timeout and
- // HMI is responsible for response returning. In this case, if ABORTED will
- // be rerurned from HMI, success should be sent to mobile.
- if (mobile_apis::Result::ABORTED == response_result_ &&
- 0 == default_timeout_) {
- response_success_ = true;
- }
-
- if (mobile_apis::Result::ABORTED == tts_speak_response_ &&
+ if (((mobile_apis::Result::ABORTED == tts_speak_response_ )||
+ (mobile_apis::Result::REJECTED == tts_speak_response_)) &&
(!flag_other_component_sent_)) {
response_success_ = false;
response_result_ = tts_speak_response_;
}
-
SendResponse(response_success_, response_result_,
response_info.empty() ? NULL : response_info.c_str(),
&response_params_);
@@ -332,39 +324,38 @@ void AlertRequest::SendAlertRequest(int32_t app_id) {
}
void AlertRequest::SendSpeakRequest(int32_t app_id) {
-
+ using namespace hmi_apis;
+ using namespace smart_objects;
// crate HMI speak request
- smart_objects::SmartObject msg_params = smart_objects::SmartObject(
- smart_objects::SmartType_Map);
+ SmartObject msg_params = smart_objects::SmartObject(SmartType_Map);
- msg_params[hmi_request::tts_chunks] = smart_objects::SmartObject(
- smart_objects::SmartType_Array);
+ msg_params[hmi_request::tts_chunks] = smart_objects::SmartObject(SmartType_Array);
msg_params[hmi_request::tts_chunks] =
(*message_)[strings::msg_params][strings::tts_chunks];
msg_params[strings::app_id] = app_id;
- msg_params[hmi_request::speak_type] =
- hmi_apis::Common_SpeakType::ALERT;
- SendHMIRequest(hmi_apis::FunctionID::TTS_Speak, &msg_params, true);
+ msg_params[hmi_request::speak_type] = Common_MethodName::ALERT;
+ SendHMIRequest(FunctionID::TTS_Speak, &msg_params, true);
}
void AlertRequest::SendPlayToneNotification(int32_t app_id) {
- LOG4CXX_INFO(logger_, "AlertRequest::SendPlayToneNotification");
+ LOG4CXX_AUTO_TRACE(logger_);
+ using namespace hmi_apis;
+ using namespace smart_objects;
// check playtone parameter
if ((*message_)[strings::msg_params].keyExists(strings::play_tone)) {
if ((*message_)[strings::msg_params][strings::play_tone].asBool()) {
// crate HMI basic communication playtone request
- smart_objects::SmartObject msg_params = smart_objects::SmartObject(
- smart_objects::SmartType_Map);
-
- CreateHMINotification(hmi_apis::FunctionID::BasicCommunication_PlayTone,
- msg_params);
+ SmartObject msg_params = smart_objects::SmartObject(SmartType_Map);
+ msg_params[strings::app_id] = app_id;
+ msg_params[strings::method_name] = Common_MethodName::ALERT;
+ CreateHMINotification(FunctionID::BasicCommunication_PlayTone, msg_params);
}
}
}
bool AlertRequest::CheckStringsOfAlertRequest() {
- LOG4CXX_INFO(logger_, "AlertRequest::CheckStringsOfAlertRequest");
+ LOG4CXX_AUTO_TRACE(logger_);
const char* str = NULL;
if ((*message_)[strings::msg_params].keyExists(strings::alert_text1)) {
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 5b8cd6557b..dac086a8b1 100644
--- a/src/components/application_manager/src/commands/mobile/alert_response.cc
+++ b/src/components/application_manager/src/commands/mobile/alert_response.cc
@@ -49,7 +49,7 @@ AlertResponse::~AlertResponse() {
}
void AlertResponse::Run() {
- LOG4CXX_INFO(logger_, "AlertResponse::Run");
+ LOG4CXX_AUTO_TRACE(logger_);
ApplicationManagerImpl::instance()->SendMessageToMobile(message_);
}
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 9780aad7bb..89b2dbaf00 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
@@ -55,7 +55,7 @@ ChangeRegistrationRequest::~ChangeRegistrationRequest() {
}
void ChangeRegistrationRequest::Run() {
- LOG4CXX_INFO(logger_, "ChangeRegistrationRequest::Run");
+ LOG4CXX_AUTO_TRACE(logger_);
ApplicationManagerImpl* instance = ApplicationManagerImpl::instance();
const HMICapabilities& hmi_capabilities = instance->hmi_capabilities();
@@ -166,19 +166,19 @@ void ChangeRegistrationRequest::Run() {
&tts_params, true);
}
-bool ChangeRegistrationRequest::WasAnySuccess(
+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 == ui &&
+ hmi_apis::Common_Result::SUCCESS == vr &&
hmi_apis::Common_Result::SUCCESS == tts;
}
void ChangeRegistrationRequest::on_event(const event_engine::Event& event) {
- LOG4CXX_INFO(logger_, "ChangeRegistrationRequest::on_event");
+ LOG4CXX_AUTO_TRACE(logger_);
const smart_objects::SmartObject& message = event.smart_object();
hmi_apis::FunctionID::eType event_id = event.id();
@@ -237,7 +237,7 @@ void ChangeRegistrationRequest::on_event(const event_engine::Event& event) {
(*message_)[strings::params][strings::function_id] =
mobile_apis::FunctionID::eType::ChangeRegistrationID;
- SendResponse(WasAnySuccess(ui_result_, vr_result_, tts_result_),
+ SendResponse(AllHmiResponsesSuccess(ui_result_, vr_result_, tts_result_),
static_cast<mobile_apis::Result::eType>(greates_result_code),
NULL, &(message[strings::msg_params]));
} else {
@@ -374,21 +374,20 @@ bool ChangeRegistrationRequest::IsWhiteSpaceExist() {
}
mobile_apis::Result::eType ChangeRegistrationRequest::CheckCoincidence() {
- LOG4CXX_INFO(logger_, "ChangeRegistrationRequest::CheckCoincidence");
+ LOG4CXX_AUTO_TRACE(logger_);
const smart_objects::SmartObject& msg_params =
(*message_)[strings::msg_params];
ApplicationManagerImpl::ApplicationListAccessor accessor;
- const std::set<ApplicationSharedPtr> applications = accessor.applications();
- std::set<ApplicationSharedPtr>::const_iterator it = applications.begin();
std::string app_name;
uint32_t app_id = connection_key();
if (msg_params.keyExists(strings::app_name)) {
app_name = msg_params[strings::app_name].asString();
}
- for (; applications.end() != it; ++it) {
+ ApplicationManagerImpl::ApplictionSetConstIt it = accessor.begin();
+ for (; accessor.end() != it; ++it) {
if (app_id == (*it)->app_id()) {
continue;
}
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 13c926ec82..557614f173 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
@@ -47,7 +47,7 @@ ChangeRegistrationResponse::~ChangeRegistrationResponse() {
}
void ChangeRegistrationResponse::Run() {
- LOG4CXX_INFO(logger_, "ChangeRegistrationResponse::Run");
+ LOG4CXX_AUTO_TRACE(logger_);
ApplicationManagerImpl::instance()->SendMessageToMobile(message_);
}
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 583f0a0460..e980068fd7 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
@@ -53,7 +53,7 @@ CreateInteractionChoiceSetRequest::~CreateInteractionChoiceSetRequest() {
}
void CreateInteractionChoiceSetRequest::Run() {
- LOG4CXX_INFO(logger_, "CreateInteractionChoiceSetRequest::Run");
+ LOG4CXX_AUTO_TRACE(logger_);
ApplicationSharedPtr app = ApplicationManagerImpl::instance()->application(
(*message_)[strings::params][strings::connection_key].asUInt());
@@ -114,7 +114,7 @@ void CreateInteractionChoiceSetRequest::Run() {
mobile_apis::Result::eType CreateInteractionChoiceSetRequest::CheckChoiceSet(
ApplicationConstSharedPtr app) {
- LOG4CXX_INFO(logger_, "CreateInteractionChoiceSetRequest::CheckChoiceSet");
+ LOG4CXX_AUTO_TRACE(logger_);
const smart_objects::SmartArray* new_choice_set_array =
(*message_)[strings::msg_params][strings::choice_set].asArray();
@@ -141,7 +141,8 @@ mobile_apis::Result::eType CreateInteractionChoiceSetRequest::CheckChoiceSet(
}
// Check new choice set params along with already registered choice sets
- const ChoiceSetMap& app_choice_set_map = app->choice_set_map();
+ const DataAccessor<ChoiceSetMap> accessor = app->choice_set_map();
+ const ChoiceSetMap& app_choice_set_map = accessor.GetData();
ChoiceSetMap::const_iterator it = app_choice_set_map.begin();
ChoiceSetMap::const_iterator itEnd = app_choice_set_map.end();
for (; it != itEnd; ++it) {
@@ -257,7 +258,7 @@ bool CreateInteractionChoiceSetRequest::compareStr(
bool CreateInteractionChoiceSetRequest::IsWhiteSpaceExist(
const smart_objects::SmartObject& choice_set) {
- LOG4CXX_INFO(logger_, "CreateInteractionChoiceSetRequest::IsWhiteSpaceExist");
+ LOG4CXX_AUTO_TRACE(logger_);
const char* str = NULL;
str = choice_set[strings::menu_name].asCharArray();
@@ -316,21 +317,21 @@ bool CreateInteractionChoiceSetRequest::IsWhiteSpaceExist(
void CreateInteractionChoiceSetRequest::SendVRAddCommandRequest(
application_manager::ApplicationSharedPtr const app) {
- smart_objects::SmartObject* choice_set = &(*message_)[strings::msg_params];
+ smart_objects::SmartObject& choice_set = (*message_)[strings::msg_params];
- for (size_t j = 0; j < (*choice_set)[strings::choice_set].length(); ++j) {
+ for (size_t j = 0; j < choice_set[strings::choice_set].length(); ++j) {
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] =
- (*choice_set)[strings::choice_set][j][strings::choice_id];
+ choice_set[strings::choice_set][j][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][j][strings::vr_commands];
+ choice_set[strings::choice_set][j][strings::vr_commands];
msg_params[strings::type] = hmi_apis::Common_VRCommandType::Choice;
- msg_params[strings::grammar_id] = (*choice_set)[strings::grammar_id];
+ msg_params[strings::grammar_id] = choice_set[strings::grammar_id];
SendHMIRequest(hmi_apis::FunctionID::VR_AddCommand, &msg_params);
}
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 8d6ea1b348..bc81206088 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
@@ -49,7 +49,7 @@ CreateInteractionChoiceSetResponse::~CreateInteractionChoiceSetResponse() {
}
void CreateInteractionChoiceSetResponse::Run() {
- LOG4CXX_INFO(logger_, "CreateInteractionChoiceSetResponse::Run");
+ LOG4CXX_AUTO_TRACE(logger_);
// check if response false
if (true == (*message_)[strings::msg_params].keyExists(strings::success)) {
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 3c3ee88203..e76422d50e 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
@@ -55,7 +55,7 @@ DeleteCommandRequest::~DeleteCommandRequest() {
}
void DeleteCommandRequest::Run() {
- LOG4CXX_INFO(logger_, "DeleteCommandRequest::Run");
+ LOG4CXX_AUTO_TRACE(logger_);
ApplicationSharedPtr application = ApplicationManagerImpl::instance()->application(
(*message_)[strings::params][strings::connection_key].asUInt());
@@ -109,7 +109,7 @@ void DeleteCommandRequest::Run() {
}
void DeleteCommandRequest::on_event(const event_engine::Event& event) {
- LOG4CXX_INFO(logger_, "DeleteCommandRequest::on_event");
+ LOG4CXX_AUTO_TRACE(logger_);
const smart_objects::SmartObject& message = event.smart_object();
switch (event.id()) {
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 812e587430..75178bcb4d 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
@@ -46,7 +46,7 @@ DeleteCommandResponse::~DeleteCommandResponse() {
}
void DeleteCommandResponse::Run() {
- LOG4CXX_INFO(logger_, "DeleteCommandResponse::Run");
+ LOG4CXX_AUTO_TRACE(logger_);
ApplicationManagerImpl::instance()->SendMessageToMobile(message_);
}
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 ca5a4395fc..4c753871ce 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
@@ -49,7 +49,7 @@ DeleteFileRequest::~DeleteFileRequest() {
}
void DeleteFileRequest::Run() {
- LOG4CXX_INFO(logger_, "DeleteFileRequest::Run");
+ LOG4CXX_AUTO_TRACE(logger_);
ApplicationSharedPtr application =
ApplicationManagerImpl::instance()->application(connection_key());
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 81470ccf6b..1bbb18313f 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
@@ -47,7 +47,7 @@ DeleteFileResponse::~DeleteFileResponse() {
}
void DeleteFileResponse::Run() {
- LOG4CXX_INFO(logger_, "DeleteFileResponse::Run");
+ LOG4CXX_AUTO_TRACE(logger_);
uint32_t app_id = (*message_)[strings::params][strings::connection_key]
.asUInt();
ApplicationSharedPtr app =
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 1fcd4b33d8..6c61bfd2a2 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
@@ -50,7 +50,7 @@ DeleteInteractionChoiceSetRequest::~DeleteInteractionChoiceSetRequest() {
}
void DeleteInteractionChoiceSetRequest::Run() {
- LOG4CXX_INFO(logger_, "DeleteInteractionChoiceSetRequest::Run");
+ LOG4CXX_AUTO_TRACE(logger_);
ApplicationSharedPtr app = ApplicationManagerImpl::instance()->application(
(*message_)[strings::params][strings::connection_key].asUInt());
@@ -94,8 +94,9 @@ void DeleteInteractionChoiceSetRequest::Run() {
bool DeleteInteractionChoiceSetRequest::ChoiceSetInUse(ApplicationConstSharedPtr app) {
if (app->is_perform_interaction_active()) {
// retrieve stored choice sets for perform interaction
- const PerformChoiceSetMap& choice_set_map = app
- ->performinteraction_choice_set_map();
+ const DataAccessor<PerformChoiceSetMap> accessor =
+ app->performinteraction_choice_set_map();
+ const PerformChoiceSetMap& choice_set_map = accessor.GetData();
PerformChoiceSetMap::const_iterator it = choice_set_map.begin();
for (; choice_set_map.end() != it; ++it) {
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 d260add7cc..f9ee513b94 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
@@ -50,7 +50,7 @@ DeleteInteractionChoiceSetResponse::~DeleteInteractionChoiceSetResponse() {
}
void DeleteInteractionChoiceSetResponse::Run() {
- LOG4CXX_INFO(logger_, "DeleteInteractionChoiceSetResponse::Run");
+ LOG4CXX_AUTO_TRACE(logger_);
// check if response false
if (true == (*message_)[strings::msg_params].keyExists(strings::success)) {
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 d91e742687..6b6bd3fbda 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
@@ -48,7 +48,7 @@ DeleteSubMenuRequest::~DeleteSubMenuRequest() {
}
void DeleteSubMenuRequest::Run() {
- LOG4CXX_INFO(logger_, "DeleteSubMenuRequest::Run");
+ LOG4CXX_AUTO_TRACE(logger_);
ApplicationSharedPtr app = ApplicationManagerImpl::instance()->application(
(*message_)[strings::params][strings::connection_key].asUInt());
@@ -77,9 +77,10 @@ void DeleteSubMenuRequest::Run() {
}
void DeleteSubMenuRequest::DeleteSubMenuVRCommands(ApplicationConstSharedPtr app) {
- LOG4CXX_INFO(logger_, "DeleteSubMenuRequest::DeleteSubMenuVRCommands");
+ LOG4CXX_AUTO_TRACE(logger_);
- const CommandsMap& commands = app->commands_map();
+ const DataAccessor<CommandsMap> accessor = app->commands_map();
+ const CommandsMap& commands = accessor.GetData();
CommandsMap::const_iterator it = commands.begin();
for (; commands.end() != it; ++it) {
@@ -104,14 +105,16 @@ void DeleteSubMenuRequest::DeleteSubMenuVRCommands(ApplicationConstSharedPtr app
}
void DeleteSubMenuRequest::DeleteSubMenuUICommands(ApplicationSharedPtr const app) {
- LOG4CXX_INFO(logger_, "DeleteSubMenuRequest::DeleteSubMenuUICommands");
+ LOG4CXX_AUTO_TRACE(logger_);
- const CommandsMap& commands = app->commands_map();
+ const DataAccessor<CommandsMap> accessor(app->commands_map());
+ const CommandsMap& commands = accessor.GetData();
CommandsMap::const_iterator it = commands.begin();
while (commands.end() != it) {
-
if (!(*it->second).keyExists(strings::menu_params)) {
+ LOG4CXX_ERROR(logger_, "menu_params not exist");
+ ++it;
continue;
}
@@ -122,9 +125,7 @@ void DeleteSubMenuRequest::DeleteSubMenuUICommands(ApplicationSharedPtr const ap
smart_objects::SmartType_Map);
msg_params[strings::app_id] = app->app_id();
msg_params[strings::cmd_id] = (*it->second)[strings::cmd_id].asInt();
-
app->RemoveCommand((*it->second)[strings::cmd_id].asInt());
-
it = commands.begin(); // Can not relay on
// iterators after erase was called
@@ -136,7 +137,7 @@ void DeleteSubMenuRequest::DeleteSubMenuUICommands(ApplicationSharedPtr const ap
}
void DeleteSubMenuRequest::on_event(const event_engine::Event& event) {
- LOG4CXX_INFO(logger_, "DeleteSubMenuRequest::on_event");
+ LOG4CXX_AUTO_TRACE(logger_);
const smart_objects::SmartObject& message = event.smart_object();
switch (event.id()) {
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 0a25a11610..05795e5908 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
@@ -46,7 +46,7 @@ DeleteSubMenuResponse::~DeleteSubMenuResponse() {
}
void DeleteSubMenuResponse::Run() {
- LOG4CXX_INFO(logger_, "DeleteSubMenuResponse::Run");
+ LOG4CXX_AUTO_TRACE(logger_);
ApplicationManagerImpl::instance()->SendMessageToMobile(message_);
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 75016c05fb..7b5cf5fd9a 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
@@ -48,7 +48,7 @@ DiagnosticMessageRequest::~DiagnosticMessageRequest() {
}
void DiagnosticMessageRequest::Run() {
- LOG4CXX_INFO(logger_, "DiagnosticMessageRequest::Run");
+ LOG4CXX_AUTO_TRACE(logger_);
ApplicationSharedPtr app = ApplicationManagerImpl::instance()->application(
connection_key());
@@ -68,7 +68,7 @@ void DiagnosticMessageRequest::Run() {
}
void DiagnosticMessageRequest::on_event(const event_engine::Event& event) {
- LOG4CXX_INFO(logger_, "DiagnosticMessageRequest::on_event");
+ LOG4CXX_AUTO_TRACE(logger_);
const smart_objects::SmartObject& message = event.smart_object();
switch (event.id()) {
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 2a8b234fff..9c399a00c8 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
@@ -46,7 +46,7 @@ DiagnosticMessageResponse::~DiagnosticMessageResponse() {
}
void DiagnosticMessageResponse::Run() {
- LOG4CXX_INFO(logger_, "DiagnosticMessageResponse::Run");
+ LOG4CXX_AUTO_TRACE(logger_);
ApplicationManagerImpl::instance()->SendMessageToMobile(message_);
}
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 140f43128d..749b19a520 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
@@ -47,7 +47,7 @@ DialNumberRequest::~DialNumberRequest() {
}
void DialNumberRequest::Run() {
- LOG4CXX_INFO(logger_, "DialNumberRequest::Run");
+ LOG4CXX_AUTO_TRACE(logger_);
SendResponse(false, mobile_apis::Result::UNSUPPORTED_REQUEST);
}
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 eedc9f813e..78a867a6d8 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
@@ -47,13 +47,13 @@ EndAudioPassThruRequest::~EndAudioPassThruRequest() {
}
void EndAudioPassThruRequest::Run() {
- LOG4CXX_INFO(logger_, "EndAudioPassThruRequest::Run");
+ LOG4CXX_AUTO_TRACE(logger_);
SendHMIRequest(hmi_apis::FunctionID::UI_EndAudioPassThru, NULL, true);
}
void EndAudioPassThruRequest::on_event(const event_engine::Event& event) {
- LOG4CXX_INFO(logger_, "EndAudioPassThruRequest::on_event");
+ LOG4CXX_AUTO_TRACE(logger_);
const smart_objects::SmartObject& message = event.smart_object();
switch (event.id()) {
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 128d921f9f..0ac1a00bd4 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
@@ -47,7 +47,7 @@ EndAudioPassThruResponse::~EndAudioPassThruResponse() {
}
void EndAudioPassThruResponse::Run() {
- LOG4CXX_INFO(logger_, "EndAudioPassThruResponse::Run");
+ LOG4CXX_AUTO_TRACE(logger_);
ApplicationManagerImpl::instance()->SendMessageToMobile(message_);
}
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 9a81f94db1..8e2a0222f7 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
@@ -48,7 +48,7 @@ GetDTCsRequest::~GetDTCsRequest() {
}
void GetDTCsRequest::Run() {
- LOG4CXX_INFO(logger_, "GetDTCsRequest::Run");
+ LOG4CXX_AUTO_TRACE(logger_);
ApplicationSharedPtr app = ApplicationManagerImpl::instance()->application(
(*message_)[strings::params][strings::connection_key].asUInt());
@@ -82,7 +82,7 @@ void GetDTCsRequest::Run() {
}
void GetDTCsRequest::on_event(const event_engine::Event& event) {
- LOG4CXX_INFO(logger_, "GetDTCsRequest::on_event");
+ LOG4CXX_AUTO_TRACE(logger_);
const smart_objects::SmartObject& message = event.smart_object();
switch (event.id()) {
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 2ed7a92952..523711c975 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
@@ -46,7 +46,7 @@ GetDTCsResponse::~GetDTCsResponse() {
}
void GetDTCsResponse::Run() {
- LOG4CXX_INFO(logger_, "GetDTCsResponse::Run");
+ LOG4CXX_AUTO_TRACE(logger_);
ApplicationManagerImpl::instance()->SendMessageToMobile(message_);
}
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 a3d08a15ff..546b14853c 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
@@ -54,7 +54,7 @@ GetVehicleDataRequest::~GetVehicleDataRequest() {
}
void GetVehicleDataRequest::Run() {
- LOG4CXX_INFO(logger_, "GetVehicleDataRequest::Run");
+ LOG4CXX_AUTO_TRACE(logger_);
int32_t app_id = (*message_)[strings::params][strings::connection_key].asUInt();
ApplicationSharedPtr app = ApplicationManagerImpl::instance()->application(app_id);
@@ -213,7 +213,7 @@ GetVehicleDataRequest::~GetVehicleDataRequest() {
}
void GetVehicleDataRequest::Run() {
- LOG4CXX_INFO(logger_, "GetVehicleDataRequest::Run");
+ LOG4CXX_AUTO_TRACE(logger_);
int32_t app_id = (*message_)[strings::params][strings::connection_key].asUInt();
ApplicationSharedPtr app = ApplicationManagerImpl::instance()->application(app_id);
@@ -260,7 +260,7 @@ void GetVehicleDataRequest::Run() {
}
void GetVehicleDataRequest::on_event(const event_engine::Event& event) {
- LOG4CXX_INFO(logger_, "GetVehicleDataRequest::on_event");
+ LOG4CXX_AUTO_TRACE(logger_);
smart_objects::SmartObject message = event.smart_object();
switch (event.id()) {
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 d9087fdc61..5491e9b1aa 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
@@ -47,7 +47,7 @@ GetVehicleDataResponse::~GetVehicleDataResponse() {
}
void GetVehicleDataResponse::Run() {
- LOG4CXX_INFO(logger_, "GetVehicleDataResponse::Run");
+ LOG4CXX_AUTO_TRACE(logger_);
ApplicationManagerImpl::instance()->SendMessageToMobile(message_);
}
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 d0fa71d466..427443e3e9 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
@@ -50,7 +50,7 @@ ListFilesRequest::~ListFilesRequest() {
}
void ListFilesRequest::Run() {
- LOG4CXX_INFO(logger_, "ListFilesRequest::Run");
+ LOG4CXX_AUTO_TRACE(logger_);
ApplicationSharedPtr application =
ApplicationManagerImpl::instance()->application(connection_key());
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 6ffbec1ac4..42bd1e6f07 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
@@ -47,7 +47,7 @@ ListFilesResponse::~ListFilesResponse() {
}
void ListFilesResponse::Run() {
- LOG4CXX_INFO(logger_, "ListFilesResponse::Run");
+ LOG4CXX_AUTO_TRACE(logger_);
ApplicationManagerImpl::instance()->SendMessageToMobile(message_);
}
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 ebd0d6aac1..e3e51faa6e 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
@@ -47,7 +47,7 @@ OnAppInterfaceUnregisteredNotification::~OnAppInterfaceUnregisteredNotification(
}
void OnAppInterfaceUnregisteredNotification::Run() {
- LOG4CXX_INFO(logger_, "OnAppInterfaceUnregisteredNotification::Run");
+ LOG4CXX_AUTO_TRACE(logger_);
SendNotification();
}
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 2515f591b1..d1329bf8ea 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
@@ -45,7 +45,7 @@ OnAudioPassThruNotification::~OnAudioPassThruNotification() {
}
void OnAudioPassThruNotification::Run() {
- LOG4CXX_INFO(logger_, "OnAudioPassThruNotification::Run");
+ LOG4CXX_AUTO_TRACE(logger_);
SendNotification();
}
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 55b9b8818d..62cf11d76d 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
@@ -51,7 +51,7 @@ OnButtonEventNotification::~OnButtonEventNotification() {
}
void OnButtonEventNotification::Run() {
- LOG4CXX_INFO(logger_, "OnButtonEventNotification::Run");
+ LOG4CXX_AUTO_TRACE(logger_);
const uint32_t btn_id =
static_cast<uint32_t>(
@@ -124,18 +124,19 @@ void OnButtonEventNotification::Run() {
}
void OnButtonEventNotification::SendButtonEvent(ApplicationConstSharedPtr app) {
- smart_objects::SmartObject* on_btn_event = new smart_objects::SmartObject();
-
- if (!on_btn_event) {
+ if (!app) {
LOG4CXX_ERROR_EXT(logger_, "OnButtonEvent NULL pointer");
return;
}
- if (!app) {
+ smart_objects::SmartObjectSPtr on_btn_event = new smart_objects::SmartObject();
+
+ if (!on_btn_event) {
LOG4CXX_ERROR_EXT(logger_, "OnButtonEvent NULL pointer");
return;
}
+
(*on_btn_event)[strings::params][strings::connection_key] = app->app_id();
(*on_btn_event)[strings::params][strings::function_id] =
@@ -152,7 +153,7 @@ void OnButtonEventNotification::SendButtonEvent(ApplicationConstSharedPtr app) {
(*message_)[strings::msg_params][strings::custom_button_id];
}
- message_.reset(on_btn_event);
+ message_ = on_btn_event;
SendNotification();
}
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 cfafc7af1c..86fe664f86 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
@@ -51,7 +51,7 @@ OnButtonPressNotification::~OnButtonPressNotification() {
}
void OnButtonPressNotification::Run() {
- LOG4CXX_INFO(logger_, "OnButtonPressNotification::Run");
+ LOG4CXX_AUTO_TRACE(logger_);
const uint32_t btn_id =
static_cast<uint32_t>(
@@ -124,18 +124,19 @@ void OnButtonPressNotification::Run() {
}
void OnButtonPressNotification::SendButtonPress(ApplicationConstSharedPtr app) {
- smart_objects::SmartObject* on_btn_press = new smart_objects::SmartObject();
-
- if (!on_btn_press) {
+ if (!app) {
LOG4CXX_ERROR_EXT(logger_, "OnButtonPress NULL pointer");
return;
}
- if (!app) {
+ smart_objects::SmartObjectSPtr on_btn_press = new smart_objects::SmartObject();
+
+ if (!on_btn_press) {
LOG4CXX_ERROR_EXT(logger_, "OnButtonPress NULL pointer");
return;
}
+
(*on_btn_press)[strings::params][strings::connection_key] = app->app_id();
(*on_btn_press)[strings::params][strings::function_id] =
@@ -152,7 +153,7 @@ void OnButtonPressNotification::SendButtonPress(ApplicationConstSharedPtr app) {
(*message_)[strings::msg_params][strings::custom_button_id];
}
- message_.reset(on_btn_press);
+ message_ = on_btn_press;
SendNotification();
}
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 8342d05a45..9bba1851f6 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
@@ -47,7 +47,7 @@ OnCommandNotification::~OnCommandNotification() {
}
void OnCommandNotification::Run() {
- LOG4CXX_INFO(logger_, "OnCommandNotification::Run");
+ LOG4CXX_AUTO_TRACE(logger_);
ApplicationSharedPtr app = ApplicationManagerImpl::instance()->application(
(*message_)[strings::msg_params][strings::app_id].asInt());
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 fc92c17e94..e9145520f4 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
@@ -51,7 +51,7 @@ OnDriverDistractionNotification::~OnDriverDistractionNotification() {
}
void OnDriverDistractionNotification::Run() {
- LOG4CXX_INFO(logger_, "OnDriverDistractionNotification::Run");
+ LOG4CXX_AUTO_TRACE(logger_);
SendNotification();
}
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 b9ee1339bb..10f3eb1ab6 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
@@ -37,7 +37,6 @@
#include "application_manager/application_impl.h"
#include "interfaces/MOBILE_API.h"
#include <string>
-#include <sstream>
namespace application_manager {
@@ -54,7 +53,7 @@ OnHashChangeNotification::~OnHashChangeNotification() {
}
void OnHashChangeNotification::Run() {
- LOG4CXX_INFO(logger_, "OnHashChangeNotification::Run");
+ LOG4CXX_AUTO_TRACE(logger_);
(*message_)[strings::params][strings::message_type] =
static_cast<int32_t>(application_manager::MessageType::kNotification);
@@ -62,10 +61,13 @@ void OnHashChangeNotification::Run() {
int32_t app_id;
app_id = (*message_)[strings::params][strings::connection_key].asInt();
ApplicationSharedPtr app = ApplicationManagerImpl::instance()->application(app_id);
- std::stringstream stream;
- stream << app->curHash();
- (*message_)[strings::msg_params][strings::hash_id] = stream.str();
- SendNotification();
+ if (app) {
+ (*message_)[strings::msg_params][strings::hash_id] = app->curHash();
+ SendNotification();
+ } else {
+ LOG4CXX_WARN(logger_, "Application with app_id " << app_id << " does not exist");
+ }
+
}
} //namespace mobile
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 9c03c0f623..e4a2d7c340 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
@@ -49,16 +49,17 @@ OnHMIStatusNotification::~OnHMIStatusNotification() {
}
void OnHMIStatusNotification::Run() {
- LOG4CXX_INFO(logger_, "OnHMIStatusNotification::Run");
+ LOG4CXX_AUTO_TRACE(logger_);
(*message_)[strings::params][strings::message_type] = static_cast<int32_t> (
application_manager::MessageType::kNotification);
ApplicationSharedPtr app = ApplicationManagerImpl::instance()->application(
- (*message_)[strings::params][strings::connection_key].asUInt());
+ connection_key());
if (!app.valid()) {
LOG4CXX_ERROR(logger_, "OnHMIStatusNotification application doesn't exist");
return;
}
+
mobile_apis::HMILevel::eType hmi_level =
static_cast<mobile_apis::HMILevel::eType>(
(*message_)[strings::msg_params][strings::hmi_level].asInt());
@@ -74,7 +75,8 @@ void OnHMIStatusNotification::Run() {
(mobile_apis::HMILevel::HMI_LIMITED == hmi_level)) {
if (!(app->tts_properties_in_full())) {
app->set_tts_properties_in_full(true);
- LOG4CXX_INFO(logger_, "OnHMIStatusNotification AddAppToTTSGlobalPropertiesList");
+ LOG4CXX_INFO(logger_,
+ "OnHMIStatusNotification AddAppToTTSGlobalPropertiesList");
ApplicationManagerImpl::instance()->AddAppToTTSGlobalPropertiesList(
app->app_id());
}
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
new file mode 100644
index 0000000000..443175a5ee
--- /dev/null
+++ b/src/components/application_manager/src/commands/mobile/on_hmi_status_notification_from_mobile.cc
@@ -0,0 +1,81 @@
+/*
+
+ Copyright (c) 2013, Ford Motor Company
+ All rights reserved.
+
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions are met:
+
+ Redistributions of source code must retain the above copyright notice, this
+ list of conditions and the following disclaimer.
+
+ Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions and the following
+ disclaimer in the documentation and/or other materials provided with the
+ distribution.
+
+ Neither the name of the Ford Motor Company nor the names of its contributors
+ may be used to endorse or promote products derived from this software
+ without specific prior written permission.
+
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+ LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include "application_manager/commands/mobile/on_hmi_status_notification_from_mobile.h"
+#include "application_manager/application_manager_impl.h"
+#include "application_manager/message_helper.h"
+#include "application_manager/message.h"
+#include "interfaces/MOBILE_API.h"
+
+namespace application_manager {
+namespace commands {
+
+bool OnHMIStatusNotificationFromMobile::is_apps_requested_ = false;
+
+OnHMIStatusNotificationFromMobile::OnHMIStatusNotificationFromMobile(
+ const MessageSharedPtr& message)
+ : CommandNotificationFromMobileImpl(message) {
+}
+
+OnHMIStatusNotificationFromMobile::~OnHMIStatusNotificationFromMobile() {
+}
+
+void OnHMIStatusNotificationFromMobile::Run() {
+ LOG4CXX_AUTO_TRACE(logger_);
+
+ (*message_)[strings::params][strings::message_type] = static_cast<int32_t> (
+ application_manager::MessageType::kNotification);
+ ApplicationSharedPtr app = ApplicationManagerImpl::instance()->application(
+ connection_key());
+ if (!app.valid()) {
+ LOG4CXX_ERROR(logger_,
+ "OnHMIStatusNotificationFromMobile application doesn't exist");
+ return;
+ }
+
+ // In case if this notification will be received from mobile side, it will
+ // mean, that app is in foreground on mobile. This should trigger remote
+ // apps list query for SDL 4.0 app
+ if (is_apps_requested_) {
+ LOG4CXX_DEBUG(logger_, "Remote apps list had been requested already.");
+ return;
+ }
+ if (ProtocolVersion::kV4 == app->protocol_version()) {
+ MessageHelper::SendQueryApps(connection_key());
+ is_apps_requested_ = true;
+ }
+}
+
+} // namespace commands
+
+} // namespace application_manager
diff --git a/src/components/application_manager/src/commands/mobile/on_keyboard_input_notification.cc b/src/components/application_manager/src/commands/mobile/on_keyboard_input_notification.cc
index 969885ab16..b8c6d6f114 100644
--- a/src/components/application_manager/src/commands/mobile/on_keyboard_input_notification.cc
+++ b/src/components/application_manager/src/commands/mobile/on_keyboard_input_notification.cc
@@ -51,7 +51,7 @@ OnKeyBoardInputNotification::~OnKeyBoardInputNotification() {
}
void OnKeyBoardInputNotification::Run() {
- LOG4CXX_INFO(logger_, "OnKeyBoardInputNotification::Run");
+ LOG4CXX_AUTO_TRACE(logger_);
const std::vector<ApplicationSharedPtr>& applications =
ApplicationManagerImpl::instance()->applications_with_navi();
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 f550df8748..43b1b5b921 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
@@ -46,7 +46,7 @@ OnLanguageChangeNotification::~OnLanguageChangeNotification() {
}
void OnLanguageChangeNotification::Run() {
- LOG4CXX_INFO(logger_, "OnLanguageChangeNotification::Run");
+ LOG4CXX_AUTO_TRACE(logger_);
SendNotification();
}
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 37c81085eb..62ea1af1fc 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
@@ -48,7 +48,7 @@ OnPermissionsChangeNotification::~OnPermissionsChangeNotification() {
}
void OnPermissionsChangeNotification::Run() {
- LOG4CXX_INFO(logger_, "OnPermissionsChangeNotification::Run");
+ LOG4CXX_AUTO_TRACE(logger_);
(*message_)[strings::params][strings::message_type] =
static_cast<int32_t>(application_manager::MessageType::kNotification);
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 ebf98cd7e8..7e5c381bef 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
@@ -50,7 +50,7 @@ OnSystemRequestNotification::~OnSystemRequestNotification() {
}
void OnSystemRequestNotification::Run() {
- LOG4CXX_INFO(logger_, "OnSystemRequestNotification::Run");
+ LOG4CXX_AUTO_TRACE(logger_);
mobile_apis::RequestType::eType request_type = static_cast<mobile_apis::RequestType::eType>
((*message_)[strings::msg_params][strings::request_type].asInt());
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 05494c6144..99a5d665db 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
@@ -49,7 +49,7 @@ OnTBTClientStateNotification::~OnTBTClientStateNotification() {
}
void OnTBTClientStateNotification::Run() {
- LOG4CXX_INFO(logger_, "OnTBTClientStateNotification::Run");
+ LOG4CXX_AUTO_TRACE(logger_);
(*message_)[strings::params][strings::message_type] =
static_cast<int32_t>(application_manager::MessageType::kNotification);
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 250faa8f38..6db54289eb 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
@@ -50,7 +50,7 @@ OnTouchEventNotification::~OnTouchEventNotification() {
}
void OnTouchEventNotification::Run() {
- LOG4CXX_INFO(logger_, "OnTouchEventNotification::Run");
+ LOG4CXX_AUTO_TRACE(logger_);
const std::vector<ApplicationSharedPtr>& applications =
ApplicationManagerImpl::instance()->applications_with_navi();
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 420c42f30c..044bb16b40 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
@@ -50,7 +50,7 @@ OnVehicleDataNotification::~OnVehicleDataNotification() {
}
void OnVehicleDataNotification::Run() {
- LOG4CXX_INFO(logger_, "OnVehicleDataNotification::Run");
+ LOG4CXX_AUTO_TRACE(logger_);
const VehicleData& vehicle_data = MessageHelper::vehicle_data();
VehicleData::const_iterator it = vehicle_data.begin();
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 a730995f5d..b3d57d6be0 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
@@ -55,7 +55,7 @@ PerformAudioPassThruRequest::~PerformAudioPassThruRequest() {
}
void PerformAudioPassThruRequest::onTimeOut() {
- LOG4CXX_INFO(logger_, "PerformAudioPassThruRequest::onTimeOut");
+ LOG4CXX_AUTO_TRACE(logger_);
if (ApplicationManagerImpl::instance()->end_audio_pass_thru()) {
ApplicationManagerImpl::instance()->StopAudioPassThru(connection_key());
@@ -73,7 +73,7 @@ bool PerformAudioPassThruRequest::Init() {
}
void PerformAudioPassThruRequest::Run() {
- LOG4CXX_INFO(logger_, "PerformAudioPassThruRequest::Run");
+ LOG4CXX_AUTO_TRACE(logger_);
ApplicationSharedPtr app =
ApplicationManagerImpl::instance()->application(connection_key());
@@ -111,7 +111,7 @@ void PerformAudioPassThruRequest::Run() {
}
void PerformAudioPassThruRequest::on_event(const event_engine::Event& event) {
- LOG4CXX_INFO(logger_, "PerformAudioPassThruRequest::on_event");
+ LOG4CXX_AUTO_TRACE(logger_);
const smart_objects::SmartObject& message = event.smart_object();
switch (event.id()) {
@@ -177,8 +177,10 @@ void PerformAudioPassThruRequest::on_event(const event_engine::Event& event) {
void PerformAudioPassThruRequest::SendSpeakRequest() {
// crate HMI TTS speak request
- smart_objects::SmartObject msg_params = smart_objects::SmartObject(
- smart_objects::SmartType_Map);
+ using namespace hmi_apis;
+ using namespace smart_objects;
+
+ SmartObject msg_params = smart_objects::SmartObject(SmartType_Map);
if ((*message_)[str::msg_params].keyExists(str::initial_prompt) &&
(0 < (*message_)[str::msg_params][str::initial_prompt].length())) {
@@ -192,8 +194,9 @@ void PerformAudioPassThruRequest::SendSpeakRequest() {
}
// app_id
msg_params[strings::app_id] = connection_key();
+ msg_params[hmi_request::speak_type] = Common_MethodName::AUDIO_PASS_THRU;
is_active_tts_speak_ = true;
- SendHMIRequest(hmi_apis::FunctionID::TTS_Speak, &msg_params, true);
+ SendHMIRequest(FunctionID::TTS_Speak, &msg_params, true);
}
}
@@ -260,7 +263,7 @@ void PerformAudioPassThruRequest::StartMicrophoneRecording() {
}
bool PerformAudioPassThruRequest::IsWhiteSpaceExist() {
- LOG4CXX_INFO(logger_, "PerformAudioPassThruRequest::IsWhiteSpaceExist");
+ LOG4CXX_AUTO_TRACE(logger_);
const char* str = NULL;
if ((*message_)[strings::msg_params].keyExists(strings::initial_prompt)) {
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 a10eaac9f3..585383889d 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
@@ -48,7 +48,7 @@ PerformAudioPassThruResponse::~PerformAudioPassThruResponse() {
}
void PerformAudioPassThruResponse::Run() {
- LOG4CXX_INFO(logger_, "PerformAudioPassThruResponse::Run");
+ LOG4CXX_AUTO_TRACE(logger_);
ApplicationManagerImpl::instance()->SendMessageToMobile(message_);
}
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 12514626a6..949fcab015 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
@@ -49,11 +49,11 @@ namespace commands {
PerformInteractionRequest::PerformInteractionRequest(
const MessageSharedPtr& message)
: CommandRequestImpl(message),
- timer_("PerformInteractionReq", this, &PerformInteractionRequest::onTimer),
vr_perform_interaction_code_(mobile_apis::Result::INVALID_ENUM),
interaction_mode_(mobile_apis::InteractionMode::INVALID_ENUM),
- ui_response_recived(false),
- vr_response_recived(false) {
+ ui_response_recived_(false),
+ vr_response_recived_(false),
+ app_pi_was_active_before_(false) {
subscribe_on_event(hmi_apis::FunctionID::UI_OnResetTimeout);
subscribe_on_event(hmi_apis::FunctionID::VR_OnCommand);
@@ -63,10 +63,6 @@ PerformInteractionRequest::PerformInteractionRequest(
PerformInteractionRequest::~PerformInteractionRequest() {
}
-void PerformInteractionRequest::onTimer() {
- LOG4CXX_INFO(logger_, "PerformInteractionRequest::onTimer");
-}
-
bool PerformInteractionRequest::Init() {
/* Timeout in milliseconds.
@@ -75,19 +71,19 @@ bool PerformInteractionRequest::Init() {
default_timeout_ =
(*message_)[strings::msg_params][strings::timeout].asUInt();
}
- mobile_apis::InteractionMode::eType mode =
- static_cast<mobile_apis::InteractionMode::eType>(
+
+ interaction_mode_ = static_cast<mobile_apis::InteractionMode::eType>(
(*message_)[strings::msg_params][strings::interaction_mode].asInt());
- if (mobile_apis::InteractionMode::BOTH == mode ||
- mobile_apis::InteractionMode::MANUAL_ONLY == mode) {
- default_timeout_ *= 2;
- }
+ if (mobile_apis::InteractionMode::BOTH == interaction_mode_ ||
+ mobile_apis::InteractionMode::MANUAL_ONLY == interaction_mode_) {
+ default_timeout_ *= 2;
+ }
return true;
}
void PerformInteractionRequest::Run() {
- LOG4CXX_INFO(logger_, "PerformInteractionRequest::Run");
+ LOG4CXX_AUTO_TRACE(logger_);
ApplicationSharedPtr app =
ApplicationManagerImpl::instance()->application(connection_key());
@@ -98,52 +94,51 @@ void PerformInteractionRequest::Run() {
return;
}
+ if (app->is_perform_interaction_active()) {
+ LOG4CXX_INFO(logger_, "Application has active PerformInteraction");
+ app_pi_was_active_before_ = true;
+ }
+
+ smart_objects::SmartObject& msg_params = (*message_)[strings::msg_params];
mobile_apis::LayoutMode::eType interaction_layout =
mobile_apis::LayoutMode::INVALID_ENUM;
- if ((*message_)[strings::msg_params].keyExists(
- hmi_request::interaction_layout)) {
+
+ if (msg_params.keyExists(hmi_request::interaction_layout)) {
interaction_layout = static_cast<mobile_apis::LayoutMode::eType>(
- (*message_)[strings::msg_params][hmi_request::interaction_layout].asInt());
+ msg_params[hmi_request::interaction_layout].asInt());
}
- if ((mobile_apis::InteractionMode::VR_ONLY ==
- static_cast<mobile_apis::InteractionMode::eType>(
- (*message_)[strings::msg_params][strings::interaction_mode].asInt())) &&
+ if ((mobile_apis::InteractionMode::VR_ONLY == interaction_mode_) &&
(mobile_apis::LayoutMode::KEYBOARD == interaction_layout)) {
- LOG4CXX_ERROR_EXT(
- logger_,
- "PerformInteraction contains InteractionMode = VR_ONLY and "
- "interactionLayout=KEYBOARD");
+ LOG4CXX_ERROR_EXT(logger_, "PerformInteraction contains InteractionMode"
+ "=VR_ONLY and interactionLayout=KEYBOARD");
SendResponse(false, mobile_apis::Result::INVALID_DATA);
return;
}
- if ((0 == (*message_)
- [strings::msg_params][strings::interaction_choice_set_id_list].length()) &&
- (mobile_apis::InteractionMode::BOTH ==
- static_cast<mobile_apis::InteractionMode::eType>(
- (*message_)[strings::msg_params][strings::interaction_mode].asInt()))) {
- LOG4CXX_ERROR_EXT(
- logger_,
- "interactionChoiceSetIDList is empty and InteractionMode=BOTH");
- SendResponse(false, mobile_apis::Result::INVALID_DATA);
- return;
- }
+ const size_t choice_set_id_list_length =
+ msg_params[strings::interaction_choice_set_id_list].length();
- if ((0 == (*message_)
- [strings::msg_params][strings::interaction_choice_set_id_list].length()) &&
- (mobile_apis::LayoutMode::KEYBOARD != interaction_layout)) {
- LOG4CXX_ERROR_EXT(
- logger_,
- "interactionChoiceSetIDList is empty and without parameter"
- "interactionLayout=KEYBOARD");
- SendResponse(false, mobile_apis::Result::INVALID_DATA);
- return;
+ if (0 == choice_set_id_list_length) {
+ if (mobile_apis::LayoutMode::KEYBOARD == interaction_layout) {
+ if (mobile_apis::InteractionMode::BOTH == interaction_mode_) {
+ LOG4CXX_ERROR_EXT(logger_,"interactionChoiceSetIDList is empty,"
+ " InteractionMode=BOTH and"
+ " interactionLayout=KEYBOARD");
+ SendResponse(false, mobile_apis::Result::INVALID_DATA);
+ return;
+ }
+ } else {
+ LOG4CXX_ERROR_EXT(logger_,"interactionChoiceSetIDList is empty"
+ " and interactionLayout!=KEYBOARD");
+ SendResponse(false, mobile_apis::Result::INVALID_DATA);
+ return;
+ }
}
- if ((*message_)[strings::msg_params].keyExists(strings::vr_help)) {
+ if (msg_params.keyExists(strings::vr_help)) {
if (mobile_apis::Result::SUCCESS != MessageHelper::VerifyImageVrHelpItems(
- (*message_)[strings::msg_params][strings::vr_help], app)) {
+ msg_params[strings::vr_help], app)) {
LOG4CXX_ERROR_EXT(
logger_,
"MessageHelper::VerifyImageVrHelpItems return INVALID_DATA!");
@@ -153,7 +148,7 @@ void PerformInteractionRequest::Run() {
}
smart_objects::SmartObject& choice_list =
- (*message_)[strings::msg_params][strings::interaction_choice_set_id_list];
+ msg_params[strings::interaction_choice_set_id_list];
for (size_t i = 0; i < choice_list.length(); ++i) {
if (!app->FindChoiceSet(choice_list[i].asInt())) {
@@ -170,67 +165,31 @@ void PerformInteractionRequest::Run() {
return;
}
- int32_t mode =
- (*message_)[strings::msg_params][strings::interaction_mode].asInt();
-
- app->set_perform_interaction_mode(mode);
-
- interaction_mode_ = static_cast<mobile_apis::InteractionMode::eType>(mode);
-
switch (interaction_mode_) {
case mobile_apis::InteractionMode::BOTH: {
LOG4CXX_INFO(logger_, "Interaction Mode: BOTH");
- if (!CheckChoiceSetVRSynonyms(app)) {
- return;
- }
-
- if (!CheckChoiceSetMenuNames(app)) {
+ if (!CheckChoiceSetVRSynonyms(app) ||
+ !CheckChoiceSetMenuNames(app) ||
+ !CheckVrHelpItemPositions(app)) {
return;
}
-
- if (!CheckVrHelpItemPositions(app)) {
- return;
- }
-
- app->set_perform_interaction_active(correlation_id());
- SendVRPerformInteractionRequest(app);
- SendUIPerformInteractionRequest(app);
break;
}
case mobile_apis::InteractionMode::MANUAL_ONLY: {
LOG4CXX_INFO(logger_, "Interaction Mode: MANUAL_ONLY");
-
- if (!CheckChoiceSetVRSynonyms(app)) {
- return;
- }
-
- if (!CheckChoiceSetMenuNames(app)) {
- return;
- }
-
- if (!CheckVrHelpItemPositions(app)) {
+ if (!CheckChoiceSetVRSynonyms(app) ||
+ !CheckChoiceSetMenuNames(app) ||
+ !CheckVrHelpItemPositions(app)) {
return;
}
-
- app->set_perform_interaction_active(correlation_id());
- SendVRPerformInteractionRequest(app);
- SendUIPerformInteractionRequest(app);
break;
}
case mobile_apis::InteractionMode::VR_ONLY: {
LOG4CXX_INFO(logger_, "Interaction Mode: VR_ONLY");
- if (!CheckChoiceSetVRSynonyms(app)) {
- return;
- }
-
- if (!CheckVrHelpItemPositions(app)) {
+ if (!CheckChoiceSetVRSynonyms(app) ||
+ !CheckVrHelpItemPositions(app)) {
return;
}
-
- // TODO(DK): need to implement timeout
- app->set_perform_interaction_active(correlation_id());
- SendVRPerformInteractionRequest(app);
- SendUIPerformInteractionRequest(app);
break;
}
default: {
@@ -239,27 +198,32 @@ void PerformInteractionRequest::Run() {
}
}
- // TODO(DK): need to implement timeout TTS speak request.
+ app->set_perform_interaction_mode(static_cast<int32_t>(interaction_mode_));
+ app->set_perform_interaction_active(true);
+ SendVRPerformInteractionRequest(app);
+ SendUIPerformInteractionRequest(app);
}
void PerformInteractionRequest::on_event(const event_engine::Event& event) {
- LOG4CXX_INFO(logger_, "PerformInteractionRequest::on_event");
+ LOG4CXX_AUTO_TRACE(logger_);
switch (event.id()) {
case hmi_apis::FunctionID::UI_OnResetTimeout: {
LOG4CXX_INFO(logger_, "Received UI_OnResetTimeout event");
ApplicationManagerImpl::instance()->updateRequestTimeout(connection_key(),
- correlation_id(),
- default_timeout());
+ correlation_id(),
+ default_timeout());
break;
}
case hmi_apis::FunctionID::UI_PerformInteraction: {
LOG4CXX_INFO(logger_, "Received UI_PerformInteraction event");
+ ui_response_recived_ = true;
ProcessPerformInteractionResponse(event.smart_object());
break;
}
case hmi_apis::FunctionID::VR_PerformInteraction: {
- LOG4CXX_INFO(logger_, "Received TTS_PerformInteraction");
+ LOG4CXX_INFO(logger_, "Received VR_PerformInteraction");
+ vr_response_recived_ = true;
ProcessVRResponse(event.smart_object());
break;
}
@@ -271,11 +235,11 @@ void PerformInteractionRequest::on_event(const event_engine::Event& event) {
}
void PerformInteractionRequest::onTimeOut() {
- LOG4CXX_INFO(logger_, "PerformInteractionRequest::onTimeOut");
+ LOG4CXX_AUTO_TRACE(logger_);
switch (interaction_mode_) {
case mobile_apis::InteractionMode::BOTH: {
- if (true == vr_response_recived) {
+ if (true == vr_response_recived_) {
unsubscribe_from_event(hmi_apis::FunctionID::UI_PerformInteraction);
DisablePerformInteraction();
CommandRequestImpl::onTimeOut();
@@ -308,37 +272,56 @@ void PerformInteractionRequest::onTimeOut() {
void PerformInteractionRequest::ProcessVRResponse(
const smart_objects::SmartObject& message) {
- LOG4CXX_INFO(logger_, "PerformInteractionRequest::ProcessVRResponse");
- const uint32_t app_id = connection_key();
- ApplicationSharedPtr app = ApplicationManagerImpl::instance()->application(app_id);
+ LOG4CXX_AUTO_TRACE(logger_);
+ using namespace mobile_apis;
+ using namespace mobile_apis::Result;
+ using namespace smart_objects;
+
+ ApplicationSharedPtr app =
+ ApplicationManagerImpl::instance()->application(connection_key());
+
if (!app.get()) {
LOG4CXX_ERROR(logger_, "NULL pointer");
return;
}
- vr_response_recived = true;
- vr_perform_interaction_code_ = static_cast<mobile_apis::Result::eType>(
+ vr_perform_interaction_code_ = static_cast<eType>(
message[strings::params][hmi_response::code].asInt());
- if (mobile_apis::Result::ABORTED == vr_perform_interaction_code_ ||
- mobile_apis::Result::TIMED_OUT == vr_perform_interaction_code_) {
+ if (ABORTED == vr_perform_interaction_code_ ||
+ TIMED_OUT == vr_perform_interaction_code_) {
LOG4CXX_INFO(logger_, "VR response aborted");
- if (mobile_apis::InteractionMode::VR_ONLY == interaction_mode_) {
+ if (InteractionMode::VR_ONLY == interaction_mode_) {
LOG4CXX_INFO(logger_, "Aborted or Timeout Send Close Popup");
TerminatePerformInteraction();
SendResponse(false, vr_perform_interaction_code_);
return;
} else {
LOG4CXX_INFO(logger_, "Update timeout for UI");
- ApplicationManagerImpl::instance()->updateRequestTimeout(connection_key(),
- correlation_id(),
- default_timeout());
+ ApplicationManagerImpl::instance()->
+ updateRequestTimeout(connection_key(),
+ correlation_id(),
+ default_timeout());
return;
}
}
- smart_objects::SmartObject msg_params =
- smart_objects::SmartObject(smart_objects::SmartType_Map);
- smart_objects::SmartObject* ptr_msg_params = NULL;
+ if (REJECTED == vr_perform_interaction_code_) {
+ LOG4CXX_INFO(logger_, "VR had been rejected.");
+ TerminatePerformInteraction();
+ SendResponse(false, vr_perform_interaction_code_);
+ return;
+ }
+
+ if (SUCCESS == vr_perform_interaction_code_ &&
+ InteractionMode::MANUAL_ONLY == interaction_mode_) {
+ LOG4CXX_INFO(logger_, "VR response SUCCESS in MANUAL_ONLY mode " <<
+ "Wait for UI response");
+ // in case MANUAL_ONLY mode VR.PI SUCCESS just return
+ return;
+ }
+
+ SmartObject msg_params = SmartObject(SmartType_Map);
+ SmartObject* ptr_msg_params = NULL;
if (message[strings::msg_params].keyExists(strings::choice_id)) {
if (CheckChoiceIDFromResponse(
app, message[strings::msg_params][strings::choice_id].asInt())) {
@@ -348,22 +331,21 @@ void PerformInteractionRequest::ProcessVRResponse(
} else {
LOG4CXX_ERROR(logger_, "Wrong choiceID was received from HMI");
TerminatePerformInteraction();
- SendResponse(false, mobile_apis::Result::GENERIC_ERROR,
- "Wrong choiceID was received from HMI");
+ SendResponse(false, GENERIC_ERROR,"Wrong choiceID was received from HMI");
return;
}
}
- mobile_apis::Result::eType result_code = mobile_apis::Result::INVALID_ENUM;
- if (mobile_apis::Result::UNSUPPORTED_RESOURCE ==
- vr_perform_interaction_code_) {
+ eType result_code = INVALID_ENUM;
+
+ if (UNSUPPORTED_RESOURCE == vr_perform_interaction_code_) {
LOG4CXX_INFO(logger_, "VR response WARNINGS");
- result_code = mobile_apis::Result::WARNINGS;
+ result_code = WARNINGS;
} else {
LOG4CXX_INFO(logger_, "VR response SUCCESS");
- result_code = mobile_apis::Result::SUCCESS;
+ result_code = SUCCESS;
msg_params[strings::trigger_source] =
- static_cast<int32_t>(mobile_apis::TriggerSource::TS_VR);
+ static_cast<int32_t>(TriggerSource::TS_VR);
ptr_msg_params = &msg_params;
}
TerminatePerformInteraction();
@@ -372,60 +354,57 @@ void PerformInteractionRequest::ProcessVRResponse(
void PerformInteractionRequest::ProcessPerformInteractionResponse(
const smart_objects::SmartObject& message) {
- LOG4CXX_INFO(logger_,
- "PerformInteractionRequest::ProcessPerformInteractionResponse");
- const uint32_t app_id = connection_key();
- ApplicationSharedPtr app = ApplicationManagerImpl::instance()->application(app_id);
+ LOG4CXX_AUTO_TRACE(logger_);
+
+ ApplicationSharedPtr app =
+ ApplicationManagerImpl::instance()->application(connection_key());
if (!app.get()) {
LOG4CXX_ERROR(logger_, "NULL pointer");
return;
}
- ui_response_recived = true;
+
+ bool result = false;
+ std::string info;
smart_objects::SmartObject msg_params =
smart_objects::SmartObject(smart_objects::SmartType_Map);
- msg_params = message[strings::msg_params];
- bool result = false;
mobile_apis::Result::eType result_code =
GetMobileResultCode(static_cast<hmi_apis::Common_Result::eType>(
message[strings::params][hmi_response::code].asUInt()));
- if ((mobile_apis::Result::SUCCESS == result_code) ||
- (mobile_apis::Result::UNSUPPORTED_RESOURCE == result_code)) {
- if (message[strings::msg_params].keyExists(strings::choice_id) &&
- !(CheckChoiceIDFromResponse(
- app, message[strings::msg_params][strings::choice_id].asInt()))) {
- DisablePerformInteraction();
- SendResponse(false, mobile_apis::Result::GENERIC_ERROR,
- "Wrong choiceID was received from HMI");
- return;
- }
- if (message[strings::msg_params].keyExists(strings::manual_text_entry)) {
- msg_params[strings::trigger_source] = mobile_apis::TriggerSource::TS_KEYBOARD;
- } else {
- msg_params[strings::trigger_source] = mobile_apis::TriggerSource::TS_MENU;
- }
- DisablePerformInteraction();
+ if (mobile_apis::Result::SUCCESS == result_code) {
+ result = true;
+ }
+
+ if (mobile_apis::Result::UNSUPPORTED_RESOURCE == result_code) {
result = true;
- } else if (mobile_apis::Result::REJECTED == result_code) {
- LOG4CXX_ERROR(logger_, "Request was rejected");
+ result_code = mobile_apis::Result::WARNINGS;
+ info = "Unsupported phoneme type was sent in an item";
}
- const char* return_info = NULL;
if (result) {
- if (mobile_apis::Result::UNSUPPORTED_RESOURCE == result_code) {
- result_code = mobile_apis::Result::WARNINGS;
- return_info =
- std::string("Unsupported phoneme type sent in any item").c_str();
+ // result code must be GENERIC_ERROR in case wrong choice_id
+ if (message[strings::msg_params].keyExists(strings::choice_id)) {
+ if (!CheckChoiceIDFromResponse(app, message[strings::msg_params]
+ [strings::choice_id].asInt())) {
+ result_code = mobile_apis::Result::GENERIC_ERROR;
+ info = "Wrong choiceID was received from HMI";
+ } else {
+ msg_params = message[strings::msg_params];
+ msg_params[strings::trigger_source] = mobile_apis::TriggerSource::TS_MENU;
+ if (message[strings::msg_params].keyExists(strings::manual_text_entry)) {
+ msg_params[strings::trigger_source] = mobile_apis::TriggerSource::TS_KEYBOARD;
+ }
+ }
}
}
- if (mobile_apis::Result::TIMED_OUT == result_code) {
- DisablePerformInteraction();
- }
+ DisablePerformInteraction();
- SendResponse(result, result_code, return_info, &(msg_params));
+ const char* return_info = (info.empty()) ? NULL : info.c_str();
+ const smart_objects::SmartObject* response_params = (msg_params.empty()) ? NULL : &msg_params;
+ SendResponse(result, result_code, return_info, response_params);
}
void PerformInteractionRequest::SendUIPerformInteractionRequest(
@@ -565,6 +544,7 @@ void PerformInteractionRequest::SendVRPerformInteractionRequest(
smart_objects::SmartObject item(smart_objects::SmartType_Map);
// Since there is no custom data from application side, SDL should
// construct prompt and append delimiter to each item
+ item[strings::type] = hmi_apis::Common_SpeechCapabilities::SC_TEXT;
item[strings::text] = vr_commands[0].asString() +
profile::Profile::instance()->tts_delimiter();
msg_params[strings::help_prompt][index++] = item;
@@ -744,15 +724,16 @@ void PerformInteractionRequest::DisablePerformInteraction() {
return;
}
- if (app->is_perform_interaction_active()) {
- app->set_perform_interaction_active(0);
+ if (app->is_perform_interaction_active() &&
+ (!app_pi_was_active_before_)) {
+ app->set_perform_interaction_active(false);
app->set_perform_interaction_mode(-1);
app->DeletePerformInteractionChoiceSetMap();
}
}
bool PerformInteractionRequest::IsWhiteSpaceExist() {
- LOG4CXX_INFO(logger_, "PerformInteractionRequest::IsWhiteSpaceExist");
+ LOG4CXX_AUTO_TRACE(logger_);
const char* str = NULL;
str = (*message_)[strings::msg_params][strings::initial_text].asCharArray();
@@ -847,9 +828,10 @@ void PerformInteractionRequest::TerminatePerformInteraction() {
bool PerformInteractionRequest::CheckChoiceIDFromResponse(
ApplicationSharedPtr app, int32_t choice_id) {
- LOG4CXX_INFO(logger_, "PerformInteractionRequest::CheckChoiceIDFromResponse");
- const PerformChoiceSetMap& choice_set_map = app
- ->performinteraction_choice_set_map();
+ LOG4CXX_AUTO_TRACE(logger_);
+ const DataAccessor<PerformChoiceSetMap> accessor =
+ app->performinteraction_choice_set_map();
+ const PerformChoiceSetMap& choice_set_map = accessor.GetData();
for (PerformChoiceSetMap::const_iterator it = choice_set_map.begin();
choice_set_map.end() != it; ++it) {
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 4ceb4ce3b3..59d706926d 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
@@ -47,7 +47,7 @@ PerformInteractionResponse::~PerformInteractionResponse() {
}
void PerformInteractionResponse::Run() {
- LOG4CXX_INFO(logger_, "PerformInteractionResponse::Run");
+ LOG4CXX_AUTO_TRACE(logger_);
ApplicationManagerImpl::instance()->SendMessageToMobile(message_);
}
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 1da7e08e47..88743e3668 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
@@ -55,7 +55,7 @@ PutFileRequest::~PutFileRequest() {
}
void PutFileRequest::Run() {
- LOG4CXX_INFO(logger_, "PutFileRequest::Run");
+ LOG4CXX_AUTO_TRACE(logger_);
ApplicationSharedPtr application =
ApplicationManagerImpl::instance()->application(connection_key());
@@ -224,7 +224,7 @@ void PutFileRequest::Run() {
break;
}
default:
- LOG4CXX_INFO(logger_, "Save in unsuccessful. Result = " << save_result);
+ LOG4CXX_WARN(logger_, "Save in unsuccessful. Result = " << save_result);
SendResponse(false, save_result, "Can't save file", &response_params);
break;
}
@@ -232,7 +232,7 @@ void PutFileRequest::Run() {
void PutFileRequest::SendOnPutFileNotification() {
LOG4CXX_INFO(logger_, "SendOnPutFileNotification" );
- smart_objects::SmartObject* notification = new smart_objects::SmartObject(
+ smart_objects::SmartObjectSPtr notification = new smart_objects::SmartObject(
smart_objects::SmartType_Map);
smart_objects::SmartObject& message = *notification;
@@ -250,7 +250,7 @@ void PutFileRequest::SendOnPutFileNotification() {
message[strings::msg_params][strings::length] = length_;
message[strings::msg_params][strings::persistent_file] = is_persistent_file_;
message[strings::msg_params][strings::file_type] = file_type_;
- ApplicationManagerImpl::instance()->ManageHMICommand(&message);
+ ApplicationManagerImpl::instance()->ManageHMICommand(notification);
}
} // namespace commands
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 4ab950d7a8..52598fda16 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
@@ -48,7 +48,7 @@ PutFileResponse::~PutFileResponse() {
}
void PutFileResponse::Run() {
- LOG4CXX_INFO(logger_, "PutFileResponse::Run");
+ LOG4CXX_AUTO_TRACE(logger_);
uint32_t app_id = (*message_)[strings::params][strings::connection_key]
.asUInt();
ApplicationSharedPtr app = ApplicationManagerImpl::instance()->application(app_id);
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 1de080df4c..5a066aab4d 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
@@ -49,7 +49,7 @@ ReadDIDRequest::~ReadDIDRequest() {
}
void ReadDIDRequest::Run() {
- LOG4CXX_INFO(logger_, "ReadDIDRequest::Run");
+ LOG4CXX_AUTO_TRACE(logger_);
uint32_t app_id = (*message_)[strings::params][strings::connection_key]
.asUInt();
@@ -96,7 +96,7 @@ void ReadDIDRequest::Run() {
}
void ReadDIDRequest::on_event(const event_engine::Event& event) {
- LOG4CXX_INFO(logger_, "ReadDIDRequest::on_event");
+ LOG4CXX_AUTO_TRACE(logger_);
const smart_objects::SmartObject& message = event.smart_object();
switch (event.id()) {
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 888b590758..1133fe89ed 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
@@ -46,7 +46,7 @@ ReadDIDResponse::~ReadDIDResponse() {
}
void ReadDIDResponse::Run() {
- LOG4CXX_INFO(logger_, "ReadDIDResponse::Run");
+ LOG4CXX_AUTO_TRACE(logger_);
ApplicationManagerImpl::instance()->SendMessageToMobile(message_);
}
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 f62e0d4b84..0c4070611c 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
@@ -1,6 +1,6 @@
-/*
+/*
- Copyright (c) 2013, Ford Motor Company
+ Copyright (c) 2015, Ford Motor Company
All rights reserved.
Redistribution and use in source and binary forms, with or without
@@ -116,6 +116,18 @@ struct CheckMissedTypes {
const policy::StringArray& policy_app_types_;
std::string& log_;
};
+
+struct IsSameNickname {
+ IsSameNickname(const std::string& app_id):
+ app_id_(app_id) {
+ }
+ bool operator()(const policy::StringArray::value_type nickname) const {
+ return !strcasecmp(app_id_.c_str(), nickname.c_str());
+ }
+
+private:
+ const std::string& app_id_;
+};
}
namespace application_manager {
@@ -124,14 +136,15 @@ namespace commands {
RegisterAppInterfaceRequest::RegisterAppInterfaceRequest(
const MessageSharedPtr& message)
- : CommandRequestImpl(message) {
+ : CommandRequestImpl(message),
+ result_checking_app_hmi_type_(mobile_apis::Result::INVALID_ENUM) {
}
RegisterAppInterfaceRequest::~RegisterAppInterfaceRequest() {
}
bool RegisterAppInterfaceRequest::Init() {
- LOG4CXX_INFO(logger_, "RegisterAppInterfaceRequest::Init");
+ LOG4CXX_AUTO_TRACE(logger_);
return true;
}
@@ -139,8 +152,9 @@ void RegisterAppInterfaceRequest::Run() {
LOG4CXX_INFO(logger_, "RegisterAppInterfaceRequest::Run " << connection_key());
// Fix problem with SDL and HMI HTML. This problem is not actual for HMI PASA.
- // Flag conditional compilation "CUSTOMER_PASA" is used in order to exclude hit code
+ // Flag conditional compilation specific to customer is used in order to exclude hit code
// to RTC
+ // FIXME(EZamakhov): on shutdown - get freez
if (true == profile::Profile::instance()->launch_hmi()) {
// wait till HMI started
while (!ApplicationManagerImpl::instance()->IsHMICooperating()) {
@@ -189,13 +203,6 @@ void RegisterAppInterfaceRequest::Run() {
return;
}
- mobile_apis::Result::eType restriction_result = CheckRestrictions();
- if (mobile_apis::Result::SUCCESS != restriction_result) {
- LOG4CXX_ERROR_EXT(logger_, "Param names restrictions check failed.");
- SendResponse(false, restriction_result);
- return;
- }
-
if (IsWhiteSpaceExist()) {
LOG4CXX_INFO(logger_,
"Incoming register app interface has contains \t\n \\t \\n");
@@ -254,7 +261,7 @@ void RegisterAppInterfaceRequest::Run() {
if (mobile_apis::AppHMIType::NAVIGATION ==
static_cast<mobile_apis::AppHMIType::eType>(
app_type.getElement(i).asUInt())) {
- app->set_allowed_support_navigation(true);
+ app->set_is_navi(true);
}
if (mobile_apis::AppHMIType::COMMUNICATION ==
static_cast<mobile_apis::AppHMIType::eType>(
@@ -281,38 +288,12 @@ void RegisterAppInterfaceRequest::Run() {
device_info);
SendRegisterAppInterfaceResponseToMobile();
-
- MessageHelper::SendLockScreenIconUrlNotification(
- (*message_)[strings::params][strings::connection_key].asInt());
-
- policy::PolicyHandler::instance()->PTExchangeAtRegistration(mobile_app_id);
- }
-}
-
-void RegisterAppInterfaceRequest::on_event(const event_engine::Event& event) {
- LOG4CXX_INFO(logger_, "RegisterAppInterfaceRequest::on_event");
- switch (event.id()) {
- case hmi_apis::FunctionID::TTS_Speak: {
- const smart_objects::SmartObject& message = event.smart_object();
-
- mobile_apis::Result::eType tts_result =
- static_cast<mobile_apis::Result::eType>(
- message[strings::params][hmi_response::code].asInt());
-
- SendRegisterAppInterfaceResponseToMobile(tts_result);
- break;
- }
- default: {
- LOG4CXX_ERROR(logger_, "Received unknown event" << event.id());
- break;
- }
}
}
void RegisterAppInterfaceRequest::SendRegisterAppInterfaceResponseToMobile(
mobile_apis::Result::eType result) {
- smart_objects::SmartObject* params = new smart_objects::SmartObject(
- smart_objects::SmartType_Map);
+ smart_objects::SmartObject response_params(smart_objects::SmartType_Map);
ApplicationManagerImpl* app_manager = ApplicationManagerImpl::instance();
const HMICapabilities& hmi_capabilities = app_manager->hmi_capabilities();
@@ -320,14 +301,12 @@ void RegisterAppInterfaceRequest::SendRegisterAppInterfaceResponseToMobile(
ApplicationSharedPtr application =
ApplicationManagerImpl::instance()->application(key);
- if (!application.valid()) {
+ if (!application) {
LOG4CXX_ERROR(logger_, "There is no application for such connection key" <<
key);
return;
}
- smart_objects::SmartObject& response_params = *params;
-
response_params[strings::sync_msg_version][strings::major_version] =
APIVersion::kAPIV3;
response_params[strings::sync_msg_version][strings::minor_version] =
@@ -467,17 +446,17 @@ void RegisterAppInterfaceRequest::SendRegisterAppInterfaceResponseToMobile(
}
ResumeCtrl& resumer = ApplicationManagerImpl::instance()->resume_controller();
- uint32_t hash_id = 0;
+ std::string hash_id = "";
- const char* add_info = "";
- const bool resumption = (*message_)[strings::msg_params].keyExists(strings::hash_id);
+ std::string add_info("");
+ bool resumption = (*message_)[strings::msg_params].keyExists(strings::hash_id);
bool need_restore_vr = resumption;
if (resumption) {
- hash_id = (*message_)[strings::msg_params][strings::hash_id].asUInt();
+ hash_id = (*message_)[strings::msg_params][strings::hash_id].asString();
if (!resumer.CheckApplicationHash(application, hash_id)) {
- LOG4CXX_WARN(logger_, "Hash does not matches");
+ LOG4CXX_WARN(logger_, "Hash does not match");
result = mobile_apis::Result::RESUME_FAILED;
- add_info = "Hash does not matches";
+ add_info = "Hash does not match";
need_restore_vr = false;
} else if (!resumer.CheckPersistenceFilesForResumption(application)) {
LOG4CXX_WARN(logger_, "Persistent data is missed");
@@ -488,8 +467,16 @@ void RegisterAppInterfaceRequest::SendRegisterAppInterfaceResponseToMobile(
add_info = " Resume Succeed";
}
}
+ if ((mobile_apis::Result::SUCCESS == result) &&
+ (mobile_apis::Result::INVALID_ENUM != result_checking_app_hmi_type_)) {
+ add_info += response_info_;
+ result = result_checking_app_hmi_type_;
+ }
- SendResponse(true, result, add_info, params);
+ // in case application exist in resumption we need to send resumeVrgrammars
+ if (false == resumption) {
+ resumption = resumer.IsApplicationSaved(application->mobile_app_id());
+ }
MessageHelper::SendOnAppRegisteredNotificationToHMI(*(application.get()),
resumption,
@@ -497,6 +484,7 @@ void RegisterAppInterfaceRequest::SendRegisterAppInterfaceResponseToMobile(
MessageHelper::SendChangeRegistrationRequestToHMI(application);
+ SendResponse(true, result, add_info.c_str(), &response_params);
if (result != mobile_apis::Result::RESUME_FAILED) {
resumer.StartResumption(application, hash_id);
} else {
@@ -506,17 +494,17 @@ void RegisterAppInterfaceRequest::SendRegisterAppInterfaceResponseToMobile(
mobile_apis::Result::eType
RegisterAppInterfaceRequest::CheckCoincidence() {
- LOG4CXX_TRACE_ENTER(logger_);
+ LOG4CXX_AUTO_TRACE(logger_);
const smart_objects::SmartObject& msg_params =
(*message_)[strings::msg_params];
ApplicationManagerImpl::ApplicationListAccessor accessor;
- const std::set<ApplicationSharedPtr> applications = accessor.applications();
- std::set<ApplicationSharedPtr>::const_iterator it = applications.begin();
+ ApplicationManagerImpl::ApplictionSetConstIt it =
+ accessor.begin();
const std::string app_name = msg_params[strings::app_name].asString();
- for (; applications.end() != it; ++it) {
+ for (; accessor.end() != it; ++it) {
// name check
const std::string& cur_name = (*it)->name();
@@ -577,9 +565,10 @@ mobile_apis::Result::eType RegisterAppInterfaceRequest::CheckWithPolicyData() {
}
if (!app_nicknames.empty()) {
- policy::StringArray::const_iterator it = std::find(
- app_nicknames.begin(), app_nicknames.end(),
+ IsSameNickname compare(
message[strings::msg_params][strings::app_name].asString());
+ 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.");
@@ -608,7 +597,7 @@ mobile_apis::Result::eType RegisterAppInterfaceRequest::CheckWithPolicyData() {
if (!log.empty()) {
response_info_ = "Following AppHMITypes are not present in policy "
"table:" + log;
- result = mobile_apis::Result::WARNINGS;
+ result_checking_app_hmi_type_ = mobile_apis::Result::WARNINGS;
}
}
// Replace AppHMITypes in request with values allowed by policy table
@@ -661,91 +650,22 @@ void RegisterAppInterfaceRequest::FillDeviceInfo(
}
}
-mobile_apis::Result::eType RegisterAppInterfaceRequest::CheckRestrictions() const {
-
- LOG4CXX_INFO(logger_, "RegisterAppInterfaceRequest::CheckRestrictions");
-
- const smart_objects::SmartObject& msg_params =
- (*message_)[strings::msg_params];
-
- const std::string& app_name = msg_params[strings::app_name].asString();
-
- if (ClearParamName(app_name).empty()) {
- printf("Application name is empty.\n");
- return mobile_apis::Result::INVALID_DATA;
- }
-
- if ((app_name[0] == '\n') ||
- ((app_name[0] == '\\') && (app_name[1] == 'n'))) {
-
- printf("Application name has invalid characters.");
- return mobile_apis::Result::INVALID_DATA;
- }
-
- if (msg_params.keyExists(strings::tts_name)) {
-
- const smart_objects::SmartArray* tts =
- msg_params[strings::tts_name].asArray();
-
- smart_objects::SmartArray::const_iterator it = tts->begin();
- smart_objects::SmartArray::const_iterator it_end = tts->end();
-
- for (; it != it_end; ++it) {
-
- const std::string& tts_name = (*it)[strings::text].asString();
-
- if (ClearParamName(tts_name).empty()) {
- printf("TTS value is empty.");
- return mobile_apis::Result::INVALID_DATA;
- }
-
- if ((tts_name[0] == '\n') ||
- ((tts_name[0] == '\\') && (tts_name[1] == 'n'))) {
-
- printf("TTS value(s) has invalid characters.");
- return mobile_apis::Result::INVALID_DATA;
- }
- }
- }
-
- return mobile_apis::Result::SUCCESS;
-}
-
-std::string
-RegisterAppInterfaceRequest::ClearParamName(std::string param_name) const {
-
- // Expecting for chars different from newlines and spaces in the appName
- //
- // There is an agreement, that "\n" is not allowed symbols, so we have to
- // check for this case also
-
- std::string newline = "\\n";
- while (std::string::npos != param_name.find(newline)) {
- param_name.erase(param_name.find(newline), newline.length());
- }
-
- std::string::iterator param_name_new_end =
- std::remove_if(param_name.begin(), param_name.end(), ::isspace);
-
- return std::string(param_name.begin(), param_name_new_end);
-}
-
bool RegisterAppInterfaceRequest::IsApplicationWithSameAppIdRegistered() {
LOG4CXX_INFO(logger_, "RegisterAppInterfaceRequest::"
"IsApplicationWithSameAppIdRegistered");
const std::string mobile_app_id = (*message_)[strings::msg_params]
- [strings::app_id].asString();
+ [strings::app_id].asString();
ApplicationManagerImpl::ApplicationListAccessor accessor;
- const std::set<ApplicationSharedPtr> applications = accessor.applications();
+ const ApplicationManagerImpl::ApplictionSet applications = accessor.applications();
- std::set<ApplicationSharedPtr>::const_iterator it = applications.begin();
- std::set<ApplicationSharedPtr>::const_iterator it_end = applications.end();
+ ApplicationManagerImpl::ApplictionSetConstIt it = applications.begin();
+ ApplicationManagerImpl::ApplictionSetConstIt it_end = applications.end();
for (; it != it_end; ++it) {
- if (mobile_app_id == (*it)->mobile_app_id()->asString()) {
+ if (!strcasecmp(mobile_app_id.c_str(),(*it)->mobile_app_id().c_str())) {
return true;
}
}
@@ -754,7 +674,7 @@ bool RegisterAppInterfaceRequest::IsApplicationWithSameAppIdRegistered() {
}
bool RegisterAppInterfaceRequest::IsWhiteSpaceExist() {
- LOG4CXX_INFO(logger_, "RegisterAppInterfaceRequest::IsWhiteSpaceExist");
+ LOG4CXX_AUTO_TRACE(logger_);
const char* str = NULL;
str = (*message_)[strings::msg_params][strings::app_name].asCharArray();
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 fe6f3a925a..25de8d3ef4 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
@@ -42,7 +42,7 @@ namespace application_manager {
namespace commands {
void RegisterAppInterfaceResponse::Run() {
- LOG4CXX_INFO(logger_, "RegisterAppInterfaceResponse::Run");
+ LOG4CXX_AUTO_TRACE(logger_);
mobile_apis::Result::eType result_code = mobile_apis::Result::INVALID_ENUM;
bool success = (*message_)[strings::msg_params][strings::success].asBool();
@@ -67,7 +67,7 @@ void RegisterAppInterfaceResponse::Run() {
application(connection_key);
if (app.valid()) {
policy::PolicyHandler *policy_handler = policy::PolicyHandler::instance();
- std::string mobile_app_id = app->mobile_app_id()->asString();
+ std::string mobile_app_id = app->mobile_app_id();
policy_handler->AddApplication(mobile_app_id);
SetHeartBeatTimeout(connection_key, mobile_app_id);
}
@@ -75,10 +75,11 @@ void RegisterAppInterfaceResponse::Run() {
void RegisterAppInterfaceResponse::SetHeartBeatTimeout(
uint32_t connection_key, const std::string& mobile_app_id) {
- LOG4CXX_TRACE_ENTER(logger_);
+ LOG4CXX_AUTO_TRACE(logger_);
policy::PolicyHandler *policy_handler = policy::PolicyHandler::instance();
if (policy_handler->PolicyEnabled()) {
- const int32_t timeout = policy_handler->HeartBeatTimeout(mobile_app_id);
+ const int32_t timeout = policy_handler->HeartBeatTimeout(mobile_app_id) /
+ date_time::DateTime::MILLISECONDS_IN_SECOND;
if (timeout > 0) {
application_manager::ApplicationManagerImpl::instance()->
connection_handler()->SetHeartBeatTimeout(connection_key, timeout);
@@ -86,7 +87,6 @@ void RegisterAppInterfaceResponse::SetHeartBeatTimeout(
} else {
LOG4CXX_INFO(logger_, "Policy is turn off");
}
- LOG4CXX_TRACE_EXIT(logger_);
}
} // namespace commands
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 5e62b789d8..9f6e84b55b 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
@@ -58,7 +58,7 @@ ResetGlobalPropertiesRequest::~ResetGlobalPropertiesRequest() {
}
void ResetGlobalPropertiesRequest::Run() {
- LOG4CXX_INFO(logger_, "ResetGlobalPropertiesRequest::Run");
+ LOG4CXX_AUTO_TRACE(logger_);
uint32_t app_id = (*message_)[strings::params][strings::connection_key].asUInt();
ApplicationSharedPtr app = ApplicationManagerImpl::instance()->application(app_id);
@@ -125,7 +125,7 @@ void ResetGlobalPropertiesRequest::Run() {
smart_objects::SmartType_Map);
if (vr_help_title_items) {
- smart_objects::SmartObject* vr_help = MessageHelper::CreateAppVrHelp(app);
+ smart_objects::SmartObjectSPtr vr_help = MessageHelper::CreateAppVrHelp(app);
if (!vr_help) {
return;
}
@@ -236,7 +236,7 @@ bool ResetGlobalPropertiesRequest::ResetVrHelpTitleItems(
}
void ResetGlobalPropertiesRequest::on_event(const event_engine::Event& event) {
- LOG4CXX_INFO(logger_, "ResetGlobalPropertiesRequest::on_event");
+ LOG4CXX_AUTO_TRACE(logger_);
const smart_objects::SmartObject& message = event.smart_object();
switch (event.id()) {
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 aeacabf9d5..8e562956ae 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
@@ -47,7 +47,7 @@ ResetGlobalPropertiesResponse::~ResetGlobalPropertiesResponse() {
}
void ResetGlobalPropertiesResponse::Run() {
- LOG4CXX_INFO(logger_, "ResetGlobalPropertiesResponse::Run");
+ LOG4CXX_AUTO_TRACE(logger_);
ApplicationManagerImpl::instance()->SendMessageToMobile(message_);
}
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 5b3cfa67ac..10f080e0e7 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
@@ -68,7 +68,7 @@ bool ScrollableMessageRequest::Init() {
}
void ScrollableMessageRequest::Run() {
- LOG4CXX_INFO(logger_, "ScrollableMessageRequest::Run");
+ LOG4CXX_AUTO_TRACE(logger_);
ApplicationSharedPtr app = application_manager::ApplicationManagerImpl::instance()
->application((*message_)[strings::params][strings::connection_key].asUInt());
@@ -113,7 +113,7 @@ void ScrollableMessageRequest::Run() {
}
void ScrollableMessageRequest::on_event(const event_engine::Event& event) {
- LOG4CXX_INFO(logger_, "ScrollableMessageRequest::on_event");
+ LOG4CXX_AUTO_TRACE(logger_);
const smart_objects::SmartObject& message = event.smart_object();
switch (event.id()) {
@@ -133,8 +133,7 @@ void ScrollableMessageRequest::on_event(const event_engine::Event& event) {
HMICapabilities& hmi_capabilities =
ApplicationManagerImpl::instance()->hmi_capabilities();
bool result = false;
- if (mobile_apis::Result::SUCCESS == result_code ||
- mobile_apis::Result::ABORTED == result_code) {
+ if (mobile_apis::Result::SUCCESS == result_code) {
result = true;
} else if ((mobile_apis::Result::UNSUPPORTED_RESOURCE == result_code) &&
hmi_capabilities.is_ui_cooperating()) {
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 d9692359d0..212a3ba912 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
@@ -46,7 +46,7 @@ ScrollableMessageResponse::ScrollableMessageResponse(
}
void ScrollableMessageResponse::Run() {
- LOG4CXX_INFO(logger_, "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 =
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 b5c2e8a9a5..b77b4afd0f 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
@@ -46,17 +46,39 @@ SendLocationRequest::~SendLocationRequest() {
}
void SendLocationRequest::Run() {
- LOG4CXX_INFO(logger_, "SendLocationRequest::Run");
+ using namespace hmi_apis;
+ LOG4CXX_AUTO_TRACE(logger_);
ApplicationSharedPtr app = application_manager::ApplicationManagerImpl::instance()
->application(connection_key());
if (!app) {
- LOG4CXX_ERROR_EXT(
- logger_, "An application " << app->name() << " is not registered.");
+ LOG4CXX_ERROR_EXT(logger_,
+ "An application with connection key " << connection_key()
+ << " is not registered.");
SendResponse(false, mobile_apis::Result::APPLICATION_NOT_REGISTERED);
return;
}
+ const smart_objects::SmartObject& msg_params = (*message_)[strings::msg_params];
+
+ std::list<Common_TextFieldName::eType> fields_to_check;
+ if (msg_params.keyExists(strings::location_name)) {
+ fields_to_check.push_back(Common_TextFieldName::locationName);
+ }
+ if (msg_params.keyExists(strings::location_description)) {
+ fields_to_check.push_back(Common_TextFieldName::locationDescription);
+ }
+ if (msg_params.keyExists(strings::address_lines)) {
+ fields_to_check.push_back(Common_TextFieldName::addressLines);
+ }
+ if (msg_params.keyExists(strings::phone_number)) {
+ fields_to_check.push_back(Common_TextFieldName::phoneNumber);
+ }
+
+ if (!CheckHMICapabilities(fields_to_check)) {
+ SendResponse(false, mobile_apis::Result::UNSUPPORTED_RESOURCE);
+ return;
+ }
if (IsWhiteSpaceExist()) {
LOG4CXX_ERROR(logger_, "Strings contain invalid characters");
@@ -90,7 +112,10 @@ void SendLocationRequest::on_event(const event_engine::Event& event) {
mobile_apis::Result::eType result_code = GetMobileResultCode(
static_cast<hmi_apis::Common_Result::eType>(
message[strings::params][hmi_response::code].asUInt()));
- bool result = mobile_apis::Result::SUCCESS == result_code;
+ bool result =
+ mobile_apis::Result::SUCCESS == result_code ||
+ mobile_apis::Result::WARNINGS == result_code ||
+ mobile_apis::Result::UNSUPPORTED_RESOURCE == result_code ;
SendResponse(result, result_code, NULL, &(message[strings::msg_params]));
break;
}
@@ -161,6 +186,39 @@ bool SendLocationRequest::IsWhiteSpaceExist() {
return false;
}
+bool SendLocationRequest::CheckHMICapabilities(std::list<hmi_apis::Common_TextFieldName::eType>& fields_names) {
+ using namespace smart_objects;
+ using namespace hmi_apis;
+
+ ApplicationManagerImpl* instance = ApplicationManagerImpl::instance();
+ const HMICapabilities& hmi_capabilities = instance->hmi_capabilities();
+ if (!hmi_capabilities.is_ui_cooperating()) {
+ LOG4CXX_ERROR_EXT(logger_, "UI is not supported.");
+ return false;
+ }
+ const size_t size_before = fields_names.size();
+ if (hmi_capabilities.display_capabilities()) {
+ const SmartObject disp_cap = (*hmi_capabilities.display_capabilities());
+ const SmartObject& text_fields = disp_cap.getElement(hmi_response::text_fields);
+ const size_t len = text_fields.length();
+ for (size_t i = 0; i < len; ++i) {
+ const SmartObject& text_field = text_fields[i];
+ const Common_TextFieldName::eType filed_name =
+ static_cast<Common_TextFieldName::eType>(text_field.getElement(strings::name).asInt());
+ const std::list<Common_TextFieldName::eType>::iterator it =
+ std::find(fields_names.begin(), fields_names.end(), filed_name);
+ if (it != fields_names.end()) {
+ fields_names.erase(it);
+ }
+ }
+ }
+ if (fields_names.size() == size_before) {
+ LOG4CXX_ERROR_EXT(logger_, "Some fields are not supported by capabilities");
+ return false;
+ }
+ return true;
+}
+
} // namespace commands
} // namespace application_manager
diff --git a/src/components/application_manager/src/commands/mobile/send_location_response.cc b/src/components/application_manager/src/commands/mobile/send_location_response.cc
index a13b67dc06..32756c999d 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
@@ -48,7 +48,7 @@ SendLocationResponse::~SendLocationResponse() {
}
void SendLocationResponse::Run() {
- LOG4CXX_INFO(logger_, "SendLocationResponse::Run");
+ LOG4CXX_AUTO_TRACE(logger_);
ApplicationManagerImpl::instance()->SendMessageToMobile(message_);
}
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
new file mode 100644
index 0000000000..9851bce3f2
--- /dev/null
+++ b/src/components/application_manager/src/commands/mobile/set_app_icon_request.cc
@@ -0,0 +1,235 @@
+/*
+
+ Copyright (c) 2013, Ford Motor Company
+ All rights reserved.
+
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions are met:
+
+ Redistributions of source code must retain the above copyright notice, this
+ list of conditions and the following disclaimer.
+
+ Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions and the following
+ disclaimer in the documentation and/or other materials provided with the
+ distribution.
+
+ Neither the name of the Ford Motor Company nor the names of its contributors
+ may be used to endorse or promote products derived from this software
+ without specific prior written permission.
+
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+ LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include "application_manager/commands/mobile/set_app_icon_request.h"
+#include "application_manager/application_manager_impl.h"
+#include "application_manager/application_impl.h"
+#include "config_profile/profile.h"
+#include "interfaces/MOBILE_API.h"
+#include "interfaces/HMI_API.h"
+#include "utils/file_system.h"
+
+namespace application_manager {
+
+namespace commands {
+
+SetAppIconRequest::SetAppIconRequest(const MessageSharedPtr& message)
+ : CommandRequestImpl(message) {
+}
+
+SetAppIconRequest::~SetAppIconRequest() {
+}
+
+void SetAppIconRequest::Run() {
+ LOG4CXX_AUTO_TRACE(logger_);
+
+ ApplicationSharedPtr app =
+ ApplicationManagerImpl::instance()->application(connection_key());
+
+ if (!app) {
+ LOG4CXX_ERROR(logger_, "Application is not registered");
+ SendResponse(false, mobile_apis::Result::APPLICATION_NOT_REGISTERED);
+ return;
+ }
+
+ const std::string& sync_file_name =
+ (*message_)[strings::msg_params][strings::sync_file_name].asString();
+
+ std::string full_file_path =
+ file_system::CurrentWorkingDirectory() + "/" +
+ profile::Profile::instance()->app_storage_folder() + "/";
+ full_file_path += app->folder_name();
+ full_file_path += "/";
+ full_file_path += sync_file_name;
+
+ if (!file_system::FileExists(full_file_path)) {
+ LOG4CXX_ERROR(logger_, "No such file " << full_file_path);
+ SendResponse(false, mobile_apis::Result::INVALID_DATA);
+ return;
+ }
+
+ CopyToIconStorage(full_file_path);
+
+ smart_objects::SmartObject msg_params = smart_objects::SmartObject(
+ smart_objects::SmartType_Map);
+
+ msg_params[strings::app_id] = app->app_id();
+ msg_params[strings::sync_file_name] = smart_objects::SmartObject(
+ smart_objects::SmartType_Map);
+
+// Panasonic requres unchanged path value without encoded special characters
+ const std::string full_file_path_for_hmi = file_system::ConvertPathForURL(
+ full_file_path);
+
+ msg_params[strings::sync_file_name][strings::value] = full_file_path_for_hmi;
+
+ // TODO(VS): research why is image_type hardcoded
+ msg_params[strings::sync_file_name][strings::image_type] =
+ static_cast<int32_t> (SetAppIconRequest::ImageType::DYNAMIC);
+
+ // for further use in on_event function
+ (*message_)[strings::msg_params][strings::sync_file_name] =
+ msg_params[strings::sync_file_name];
+
+ SendHMIRequest(hmi_apis::FunctionID::UI_SetAppIcon, &msg_params, true);
+}
+
+void SetAppIconRequest::CopyToIconStorage(
+ const std::string& path_to_file) const {
+ if (!profile::Profile::instance()->enable_protocol_4()) {
+ LOG4CXX_WARN(logger_,
+ "Icon copying skipped, since protocol ver. 4 is not enabled.");
+ return;
+ }
+
+ std::vector<uint8_t> file_content;
+ if(!file_system::ReadBinaryFile(path_to_file, file_content)) {
+ LOG4CXX_ERROR(logger_, "Can't read icon file: " << path_to_file);
+ return;
+ }
+
+ const std::string icon_storage =
+ profile::Profile::instance()->app_icons_folder();
+ const uint64_t storage_max_size =
+ static_cast<uint64_t>(
+ profile::Profile::instance()->app_icons_folder_max_size());
+ const uint64_t file_size = file_system::FileSize(path_to_file);
+ const uint64_t storage_size = static_cast<uint64_t>(
+ file_system::DirectorySize(icon_storage));
+ if (storage_max_size < (file_size + storage_size)) {
+ RemoveOldestIcons(icon_storage,
+ profile::Profile::instance()->
+ app_icons_amount_to_remove());
+ }
+ ApplicationConstSharedPtr app =
+ application_manager::ApplicationManagerImpl::instance()->
+ application(connection_key());
+
+ if (!app) {
+ LOG4CXX_ERROR(logger_, "Can't get application for connection key: "
+ << connection_key());
+ return;
+ }
+
+ const std::string icon_path =
+ icon_storage + "/" + app->mobile_app_id();
+ if (!file_system::CreateFile(icon_path)) {
+ LOG4CXX_ERROR(logger_, "Can't create icon: " << icon_path);
+ return;
+ }
+
+ if (!file_system::Write(icon_path, file_content)) {
+ LOG4CXX_ERROR(logger_, "Can't write icon: " << icon_path);
+ return;
+ }
+
+ LOG4CXX_DEBUG(logger_, "Icon was successfully copied from :" << path_to_file
+ << " to " << icon_path);
+
+ return;
+}
+
+void SetAppIconRequest::RemoveOldestIcons(const std::string& storage,
+ const uint32_t icons_amount) const {
+ if (!icons_amount) {
+ LOG4CXX_DEBUG(logger_,
+ "No icons will be deleted, since amount of files is zero.");
+ return;
+ }
+ const std::vector<std::string> icons_list = file_system::ListFiles(storage);
+ std::map<uint64_t, std::string> icon_modification_time;
+ std::vector<std::string>::const_iterator it = icons_list.begin();
+ for (;it != icons_list.end(); ++it) {
+ const std::string file_name = *it;
+ const std::string file_path = storage + "/" + file_name;
+ if (!file_system::FileExists(file_path)) {
+ continue;
+ }
+ const uint64_t time = file_system::GetFileModificationTime(file_path);
+ icon_modification_time[time] = file_name;
+ }
+
+ for (size_t counter = 0; counter < icons_amount; ++counter) {
+ const std::string file_name = icon_modification_time.begin()->second;
+ const std::string file_path = storage + "/" + file_name;
+ if (!file_system::DeleteFile(file_path)) {
+ LOG4CXX_DEBUG(logger_, "Error while deleting icon " << file_path);
+ }
+ LOG4CXX_DEBUG(logger_, "Old icon " << file_path
+ << " was deleted successfully.");
+ }
+}
+
+void SetAppIconRequest::on_event(const event_engine::Event& event) {
+ LOG4CXX_AUTO_TRACE(logger_);
+ const smart_objects::SmartObject& message = event.smart_object();
+
+ switch (event.id()) {
+ case hmi_apis::FunctionID::UI_SetAppIcon: {
+ mobile_apis::Result::eType result_code =
+ static_cast<mobile_apis::Result::eType>(
+ message[strings::params][hmi_response::code].asInt());
+
+ bool result = mobile_apis::Result::SUCCESS == result_code;
+
+ if (result) {
+ ApplicationSharedPtr app =
+ ApplicationManagerImpl::instance()->application(connection_key());
+
+ if (!message_.valid() || !app.valid()) {
+ LOG4CXX_ERROR(logger_, "NULL pointer.");
+ return;
+ }
+
+ const std::string path = (*message_)[strings::msg_params]
+ [strings::sync_file_name]
+ [strings::value].asString();
+ app->set_app_icon_path(path);
+
+ LOG4CXX_INFO(logger_,
+ "Icon path was set to '" << app->app_icon_path() << "'");
+ }
+
+ SendResponse(result, result_code, NULL, &(message[strings::msg_params]));
+ break;
+ }
+ default: {
+ LOG4CXX_ERROR(logger_, "Received unknown event" << event.id());
+ return;
+ }
+ }
+}
+
+} // namespace commands
+
+} // namespace application_manager
diff --git a/src/components/application_manager/src/commands/mobile/set_app_icon_response.cc b/src/components/application_manager/src/commands/mobile/set_app_icon_response.cc
new file mode 100644
index 0000000000..563490bd46
--- /dev/null
+++ b/src/components/application_manager/src/commands/mobile/set_app_icon_response.cc
@@ -0,0 +1,56 @@
+/*
+
+ Copyright (c) 2013, Ford Motor Company
+ All rights reserved.
+
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions are met:
+
+ Redistributions of source code must retain the above copyright notice, this
+ list of conditions and the following disclaimer.
+
+ Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions and the following
+ disclaimer in the documentation and/or other materials provided with the
+ distribution.
+
+ Neither the name of the Ford Motor Company nor the names of its contributors
+ may be used to endorse or promote products derived from this software
+ without specific prior written permission.
+
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+ LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include "application_manager/commands/mobile/set_app_icon_response.h"
+#include "application_manager/application_manager_impl.h"
+
+namespace application_manager {
+
+namespace commands {
+
+SetAppIconResponse::SetAppIconResponse(const MessageSharedPtr& message)
+ : CommandResponseImpl(message) {
+}
+
+SetAppIconResponse::~SetAppIconResponse() {
+}
+
+void SetAppIconResponse::Run() {
+ LOG4CXX_AUTO_TRACE(logger_);
+
+ ApplicationManagerImpl::instance()->SendMessageToMobile(message_);
+}
+
+} // namespace commands
+
+} // namespace application_manager
diff --git a/src/components/application_manager/src/commands/mobile/set_display_layout_request.cc b/src/components/application_manager/src/commands/mobile/set_display_layout_request.cc
index 60a2583287..b59a631d8d 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
@@ -49,7 +49,7 @@ SetDisplayLayoutRequest::~SetDisplayLayoutRequest() {
}
void SetDisplayLayoutRequest::Run() {
- LOG4CXX_INFO(logger_, "SetDisplayLayoutRequest::Run");
+ LOG4CXX_AUTO_TRACE(logger_);
ApplicationConstSharedPtr app = ApplicationManagerImpl::instance()
->application(connection_key());
@@ -66,7 +66,7 @@ void SetDisplayLayoutRequest::Run() {
}
void SetDisplayLayoutRequest::on_event(const event_engine::Event& event) {
- LOG4CXX_INFO(logger_, "SetDisplayLayoutRequest::on_event");
+ LOG4CXX_AUTO_TRACE(logger_);
const smart_objects::SmartObject& message = event.smart_object();
switch (event.id()) {
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 51f8c1f35b..3844b3bf05 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
@@ -48,7 +48,7 @@ SetDisplayLayoutResponse::~SetDisplayLayoutResponse() {
}
void SetDisplayLayoutResponse::Run() {
- LOG4CXX_INFO(logger_, "SetDisplayLayoutResponse::Run");
+ LOG4CXX_AUTO_TRACE(logger_);
ApplicationManagerImpl::instance()->SendMessageToMobile(message_);
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 f7216c818c..ff46e041ff 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
@@ -59,7 +59,7 @@ SetGlobalPropertiesRequest::~SetGlobalPropertiesRequest() {
}
void SetGlobalPropertiesRequest::Run() {
- LOG4CXX_INFO(logger_, "SetGlobalPropertiesRequest::Run");
+ LOG4CXX_AUTO_TRACE(logger_);
const smart_objects::SmartObject& msg_params =
(*message_)[strings::msg_params];
@@ -197,7 +197,8 @@ void SetGlobalPropertiesRequest::Run() {
SendHMIRequest(hmi_apis::FunctionID::UI_SetGlobalProperties,
&params, true);
} else if (!is_vr_help_title_present && !is_vr_help_present) {
- const CommandsMap& cmdMap = app->commands_map();
+ const DataAccessor<CommandsMap> accessor = app->commands_map();
+ const CommandsMap& cmdMap = accessor.GetData();
CommandsMap::const_iterator command_it = cmdMap.begin();
int32_t index = 0;
@@ -304,7 +305,7 @@ bool SetGlobalPropertiesRequest::CheckVrHelpItemsOrder() {
}
void SetGlobalPropertiesRequest::on_event(const event_engine::Event& event) {
- LOG4CXX_INFO(logger_, "SetGlobalPropertiesRequest::on_event");
+ LOG4CXX_AUTO_TRACE(logger_);
const smart_objects::SmartObject& message = event.smart_object();
ApplicationSharedPtr app = ApplicationManagerImpl::instance()->application(CommandRequestImpl::connection_key());
@@ -383,7 +384,7 @@ bool SetGlobalPropertiesRequest::ValidateConditionalMandatoryParameters(
}
bool SetGlobalPropertiesRequest::IsWhiteSpaceExist() {
- LOG4CXX_INFO(logger_, "SetGlobalPropertiesRequest::IsWhiteSpaceExist");
+ LOG4CXX_AUTO_TRACE(logger_);
const char* str;
const smart_objects::SmartObject& msg_params =
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 5f0b62fb4d..759333385d 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
@@ -48,7 +48,7 @@ SetGlobalPropertiesResponse::~SetGlobalPropertiesResponse() {
}
void SetGlobalPropertiesResponse::Run() {
- LOG4CXX_INFO(logger_, "SetGlobalPropertiesResponse::Run");
+ LOG4CXX_AUTO_TRACE(logger_);
ApplicationManagerImpl::instance()->SendMessageToMobile(message_);
}
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 c9b2eb5ef5..536bb755ed 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
@@ -49,7 +49,7 @@ SetMediaClockRequest::~SetMediaClockRequest() {
}
void SetMediaClockRequest::Run() {
- LOG4CXX_INFO(logger_, "SetMediaClockRequest::Run");
+ LOG4CXX_AUTO_TRACE(logger_);
ApplicationSharedPtr app =
ApplicationManagerImpl::instance()->application(connection_key());
@@ -81,7 +81,7 @@ void SetMediaClockRequest::Run() {
}
void SetMediaClockRequest::on_event(const event_engine::Event& event) {
- LOG4CXX_INFO(logger_, "SetMediaClockRequest::on_event");
+ LOG4CXX_AUTO_TRACE(logger_);
const smart_objects::SmartObject& message = event.smart_object();
switch (event.id()) {
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 73923b0021..da6f204da4 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
@@ -47,7 +47,7 @@ SetMediaClockTimerResponse::~SetMediaClockTimerResponse() {
}
void SetMediaClockTimerResponse::Run() {
- LOG4CXX_INFO(logger_, "SetMediaClockTimerResponse::Run");
+ LOG4CXX_AUTO_TRACE(logger_);
ApplicationManagerImpl::instance()->SendMessageToMobile(message_);
}
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 f4e70c53ac..1e861d14ce 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
@@ -51,7 +51,7 @@ ShowConstantTBTRequest::~ShowConstantTBTRequest() {
}
void ShowConstantTBTRequest::Run() {
- LOG4CXX_INFO(logger_, "ShowConstantTBTRequest::Run");
+ LOG4CXX_AUTO_TRACE(logger_);
ApplicationSharedPtr app = ApplicationManagerImpl::instance()->application(
(*message_)[strings::params][strings::connection_key].asUInt());
@@ -175,7 +175,7 @@ void ShowConstantTBTRequest::Run() {
void ShowConstantTBTRequest::on_event(const event_engine::Event& event) {
- LOG4CXX_INFO(logger_, "ShowConstantTBTRequest::on_event");
+ LOG4CXX_AUTO_TRACE(logger_);
const smart_objects::SmartObject& message = event.smart_object();
switch (event.id()) {
@@ -206,7 +206,7 @@ void ShowConstantTBTRequest::on_event(const event_engine::Event& event) {
}
bool ShowConstantTBTRequest::IsWhiteSpaceExist() {
- LOG4CXX_INFO(logger_, "ShowConstantTBTRequest::IsWhiteSpaceExist");
+ LOG4CXX_AUTO_TRACE(logger_);
const char* str = NULL;
if ((*message_)[strings::msg_params].keyExists(strings::turn_icon)) {
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 d5539d148c..e45cd760df 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
@@ -48,7 +48,7 @@ ShowConstantTBTResponse::~ShowConstantTBTResponse() {
}
void ShowConstantTBTResponse::Run() {
- LOG4CXX_INFO(logger_, "ShowConstantTBTResponse::Run");
+ LOG4CXX_AUTO_TRACE(logger_);
ApplicationManagerImpl::instance()->SendMessageToMobile(message_);
}
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 eeef60101e..0a136e0ac2 100644
--- a/src/components/application_manager/src/commands/mobile/show_request.cc
+++ b/src/components/application_manager/src/commands/mobile/show_request.cc
@@ -50,7 +50,7 @@ ShowRequest::~ShowRequest() {
}
void ShowRequest::Run() {
- LOG4CXX_INFO(logger_, "ShowRequest::Run");
+ LOG4CXX_AUTO_TRACE(logger_);
ApplicationSharedPtr app = application_manager::ApplicationManagerImpl::instance()
->application(
@@ -216,7 +216,7 @@ void ShowRequest::Run() {
}
void ShowRequest::on_event(const event_engine::Event& event) {
- LOG4CXX_INFO(logger_, "ShowRequest::on_event");
+ LOG4CXX_AUTO_TRACE(logger_);
const smart_objects::SmartObject& message = event.smart_object();
switch (event.id()) {
@@ -251,7 +251,7 @@ void ShowRequest::on_event(const event_engine::Event& event) {
}
bool ShowRequest::CheckStringsOfShowRequest() {
- LOG4CXX_INFO(logger_, "ShowRequest::CheckStringsOfShowRequest");
+ LOG4CXX_AUTO_TRACE(logger_);
const char* str;
if ((*message_)[strings::msg_params].keyExists(strings::main_field_4)) {
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 1f9c59c6fc..0c46cdd83c 100644
--- a/src/components/application_manager/src/commands/mobile/show_response.cc
+++ b/src/components/application_manager/src/commands/mobile/show_response.cc
@@ -48,7 +48,7 @@ ShowResponse::~ShowResponse() {
}
void ShowResponse::Run() {
- LOG4CXX_INFO(logger_, "ShowResponse::Run");
+ LOG4CXX_AUTO_TRACE(logger_);
ApplicationManagerImpl::instance()->SendMessageToMobile(message_);
}
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 52f3c7dee7..78a9bb6aac 100644
--- a/src/components/application_manager/src/commands/mobile/slider_request.cc
+++ b/src/components/application_manager/src/commands/mobile/slider_request.cc
@@ -60,7 +60,7 @@ bool SliderRequest::Init() {
}
void SliderRequest::Run() {
- LOG4CXX_INFO(logger_, "SliderRequest::Run");
+ LOG4CXX_AUTO_TRACE(logger_);
ApplicationSharedPtr application =
application_manager::ApplicationManagerImpl::instance()->application(
@@ -110,7 +110,7 @@ void SliderRequest::Run() {
}
void SliderRequest::on_event(const event_engine::Event& event) {
- LOG4CXX_INFO(logger_, "SliderRequest::on_event");
+ LOG4CXX_AUTO_TRACE(logger_);
const smart_objects::SmartObject& message = event.smart_object();
const event_engine::Event::EventID event_id = event.id();
@@ -131,18 +131,16 @@ void SliderRequest::on_event(const event_engine::Event& event) {
const int response_code =
message[strings::params][hmi_response::code].asInt();
-
smart_objects::SmartObject response_msg_params = message[strings::msg_params];
- if (response_code == hmi_apis::Common_Result::ABORTED) {
+ if (response_code == hmi_apis::Common_Result::ABORTED &&
+ message[strings::params][strings::data].keyExists(strings::slider_position)) {
//Copy slider_position info to msg_params section
- response_msg_params[strings::slider_position] =
+ response_msg_params[strings::slider_position] =
message[strings::params][strings::data][strings::slider_position];
}
const bool is_response_success =
- (mobile_apis::Result::SUCCESS == response_code) ||
- //Aborted has slider_position data
- (mobile_apis::Result::ABORTED == response_code);
+ (mobile_apis::Result::SUCCESS == response_code);
SendResponse(is_response_success,
mobile_apis::Result::eType(response_code),
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 bfb6b0a1e6..7f0c10b068 100644
--- a/src/components/application_manager/src/commands/mobile/slider_response.cc
+++ b/src/components/application_manager/src/commands/mobile/slider_response.cc
@@ -46,7 +46,7 @@ SliderResponse::~SliderResponse() {
}
void SliderResponse::Run() {
- LOG4CXX_INFO(logger_, "SliderResponse::Run");
+ LOG4CXX_AUTO_TRACE(logger_);
ApplicationManagerImpl::instance()->SendMessageToMobile(message_);
}
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 de37e8b49e..b2f112a64a 100644
--- a/src/components/application_manager/src/commands/mobile/speak_request.cc
+++ b/src/components/application_manager/src/commands/mobile/speak_request.cc
@@ -49,7 +49,7 @@ SpeakRequest::~SpeakRequest() {
}
void SpeakRequest::Run() {
- LOG4CXX_INFO(logger_, "SpeakRequest::Run");
+ LOG4CXX_AUTO_TRACE(logger_);
ApplicationSharedPtr app = application_manager::ApplicationManagerImpl::instance()
->application(connection_key());
@@ -70,13 +70,13 @@ void SpeakRequest::Run() {
(*message_)[strings::msg_params][strings::app_id] = app->app_id();
(*message_)[strings::msg_params][hmi_request::speak_type] =
- hmi_apis::Common_SpeakType::SPEAK;
+ hmi_apis::Common_MethodName::SPEAK;
SendHMIRequest(hmi_apis::FunctionID::TTS_Speak,
&message_->getElement(strings::msg_params), true);
}
void SpeakRequest::on_event(const event_engine::Event& event) {
- LOG4CXX_INFO(logger_, "SpeakRequest::on_event");
+ LOG4CXX_AUTO_TRACE(logger_);
switch (event.id()) {
case hmi_apis::FunctionID::TTS_Speak: {
LOG4CXX_INFO(logger_, "Received TTS_Speak event");
@@ -100,7 +100,7 @@ void SpeakRequest::on_event(const event_engine::Event& event) {
void SpeakRequest::ProcessTTSSpeakResponse(
const smart_objects::SmartObject& message) {
- LOG4CXX_INFO(logger_, "SpeakRequest::ProcessTTSSpeakResponse");
+ LOG4CXX_AUTO_TRACE(logger_);
ApplicationSharedPtr application = ApplicationManagerImpl::instance()->application(
connection_key());
@@ -134,7 +134,7 @@ void SpeakRequest::ProcessTTSSpeakResponse(
}
bool SpeakRequest::IsWhiteSpaceExist() {
- LOG4CXX_INFO(logger_, "SpeakRequest::IsWhiteSpaceExist");
+ LOG4CXX_AUTO_TRACE(logger_);
const char* str = NULL;
if ((*message_)[strings::msg_params].keyExists(strings::tts_chunks)) {
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 92b85bbb84..d99b1d0952 100644
--- a/src/components/application_manager/src/commands/mobile/speak_response.cc
+++ b/src/components/application_manager/src/commands/mobile/speak_response.cc
@@ -48,7 +48,7 @@ SpeakResponse::~SpeakResponse() {
}
void SpeakResponse::Run() {
- LOG4CXX_INFO(logger_, "SpeakResponse::Run");
+ LOG4CXX_AUTO_TRACE(logger_);
ApplicationManagerImpl::instance()->SendMessageToMobile(message_);
}
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 b6a4d8a28e..abd0662547 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
@@ -48,7 +48,7 @@ SubscribeButtonRequest::~SubscribeButtonRequest() {
}
void SubscribeButtonRequest::Run() {
- LOG4CXX_INFO(logger_, "SubscribeButtonRequest::Run");
+ LOG4CXX_AUTO_TRACE(logger_);
ApplicationSharedPtr app =
ApplicationManagerImpl::instance()->application(connection_key());
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 6253f8ca3d..a3452ef19f 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
@@ -46,7 +46,7 @@ SubscribeButtonResponse::~SubscribeButtonResponse() {
}
void SubscribeButtonResponse::Run() {
- LOG4CXX_INFO(logger_, "SubscribeButtonResponse::Run");
+ LOG4CXX_AUTO_TRACE(logger_);
// check if response false
if (true == (*message_)[strings::msg_params].keyExists(strings::success)) {
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 35595c2df6..1640f0b497 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
@@ -84,7 +84,7 @@ namespace {
#endif // #ifdef HMI_DBUS_API
void SubscribeVehicleDataRequest::Run() {
- LOG4CXX_INFO(logger_, "SubscribeVehicleDataRequest::Run");
+ LOG4CXX_AUTO_TRACE(logger_);
ApplicationSharedPtr app = ApplicationManagerImpl::instance()->application(
CommandRequestImpl::connection_key());
@@ -172,7 +172,7 @@ void SubscribeVehicleDataRequest::Run() {
}
void SubscribeVehicleDataRequest::on_event(const event_engine::Event& event) {
- LOG4CXX_INFO(logger_, "SubscribeVehicleDataRequest::on_event");
+ LOG4CXX_AUTO_TRACE(logger_);
const smart_objects::SmartObject& message = event.smart_object();
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 972a654188..c0554c62eb 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
@@ -48,7 +48,7 @@ SubscribeVehicleDataResponse::~SubscribeVehicleDataResponse() {
}
void SubscribeVehicleDataResponse::Run() {
- LOG4CXX_INFO(logger_, "SubscribeVehicleDataResponse::Run");
+ LOG4CXX_AUTO_TRACE(logger_);
ApplicationManagerImpl::instance()->SendMessageToMobile(message_);
}
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 2765aad8d7..25fbe6e3fd 100644
--- a/src/components/application_manager/src/commands/mobile/system_request.cc
+++ b/src/components/application_manager/src/commands/mobile/system_request.cc
@@ -40,6 +40,8 @@ Copyright (c) 2013, Ford Motor Company
#include "interfaces/MOBILE_API.h"
#include "config_profile/profile.h"
#include "utils/file_system.h"
+#include "formatters/CFormatterJsonBase.hpp"
+#include "json/json.h"
namespace application_manager {
@@ -55,7 +57,7 @@ SystemRequest::~SystemRequest() {
}
void SystemRequest::Run() {
- LOG4CXX_INFO(logger_, "SystemRequest::Run");
+ LOG4CXX_AUTO_TRACE(logger_);
ApplicationSharedPtr application =
ApplicationManagerImpl::instance()->application(connection_key());
@@ -66,12 +68,14 @@ void SystemRequest::Run() {
return;
}
- mobile_apis::RequestType::eType request_type =
+ const mobile_apis::RequestType::eType request_type =
static_cast<mobile_apis::RequestType::eType>(
(*message_)[strings::msg_params][strings::request_type].asInt());
if (!(*message_)[strings::params].keyExists(strings::binary_data) &&
- mobile_apis::RequestType::PROPRIETARY == request_type) {
+ (mobile_apis::RequestType::PROPRIETARY == request_type ||
+ mobile_apis::RequestType::QUERY_APPS == request_type)) {
+
LOG4CXX_ERROR(logger_, "Binary data empty");
SendResponse(false, mobile_apis::Result::INVALID_DATA);
@@ -83,6 +87,18 @@ void SystemRequest::Run() {
binary_data = (*message_)[strings::params][strings::binary_data].asBinary();
}
+ if (mobile_apis::RequestType::QUERY_APPS == request_type) {
+ using namespace NsSmartDeviceLink::NsJSONHandler::Formatters;
+
+ smart_objects::SmartObject sm_object;
+ CFormatterJsonBase::jsonValueToObj(Json::Value(
+ std::string(binary_data.begin(),
+ binary_data.end())),
+ sm_object);
+ ApplicationManagerImpl::instance()->ProcessQueryApp(sm_object);
+ return;
+ }
+
std::string file_path = profile::Profile::instance()->system_files_path();
if (!file_system::CreateDirectoryRecursively(file_path)) {
LOG4CXX_ERROR(logger_, "Cann't create folder.");
@@ -125,7 +141,7 @@ void SystemRequest::Run() {
}
if (mobile_apis::RequestType::PROPRIETARY != request_type) {
- msg_params[strings::app_id] = (application->mobile_app_id())->asString();
+ msg_params[strings::app_id] = (application->mobile_app_id());
}
msg_params[strings::request_type] =
(*message_)[strings::msg_params][strings::request_type];
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 e77ab08450..8b4fdafd1b 100644
--- a/src/components/application_manager/src/commands/mobile/system_response.cc
+++ b/src/components/application_manager/src/commands/mobile/system_response.cc
@@ -46,7 +46,7 @@ SystemResponse::~SystemResponse() {
}
void SystemResponse::Run() {
- LOG4CXX_INFO(logger_, "SystemResponse::Run");
+ LOG4CXX_AUTO_TRACE(logger_);
ApplicationManagerImpl::instance()->SendMessageToMobile(message_);
}
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 a07cfcd8f0..6199818dbe 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
@@ -40,7 +40,7 @@ namespace application_manager {
namespace commands {
void UnregisterAppInterfaceRequest::Run() {
- LOG4CXX_INFO(logger_, "UnregisterAppInterfaceRequest::Run");
+ LOG4CXX_AUTO_TRACE(logger_);
ApplicationManagerImpl* app_manager = ApplicationManagerImpl::instance();
diff --git a/src/components/application_manager/src/commands/mobile/unregister_app_interface_response.cc b/src/components/application_manager/src/commands/mobile/unregister_app_interface_response.cc
index 8ef0eb3ed0..49d9276d35 100644
--- a/src/components/application_manager/src/commands/mobile/unregister_app_interface_response.cc
+++ b/src/components/application_manager/src/commands/mobile/unregister_app_interface_response.cc
@@ -38,7 +38,7 @@ namespace application_manager {
namespace commands {
void UnregisterAppInterfaceResponse::Run() {
- LOG4CXX_INFO(logger_, "UnregisterAppInterfaceResponse::Run");
+ LOG4CXX_AUTO_TRACE(logger_);
SendResponse((*message_)[strings::msg_params][strings::success].asBool());
}
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 f22d1c0a2f..08a27dedfa 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
@@ -50,7 +50,7 @@ UnsubscribeButtonRequest::~UnsubscribeButtonRequest() {
}
void UnsubscribeButtonRequest::Run() {
- LOG4CXX_INFO(logger_, "UnsubscribeButtonRequest::Run");
+ LOG4CXX_AUTO_TRACE(logger_);
ApplicationSharedPtr app = ApplicationManagerImpl::instance()->application(
(*message_)[str::params][str::connection_key].asUInt());
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 1331eac27f..8bece66157 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
@@ -47,7 +47,7 @@ UnsubscribeButtonResponse::~UnsubscribeButtonResponse() {
}
void UnsubscribeButtonResponse::Run() {
- LOG4CXX_INFO(logger_, "UnsubscribeButtonResponse::Run");
+ LOG4CXX_AUTO_TRACE(logger_);
namespace smart_objects = NsSmartDeviceLink::NsSmartObjects;
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 fc7145078f..7d05ce328f 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
@@ -88,7 +88,7 @@ namespace {
#endif // #ifdef HMI_DBUS_API
void UnsubscribeVehicleDataRequest::Run() {
- LOG4CXX_INFO(logger_, "UnsubscribeVehicleDataRequest::Run");
+ LOG4CXX_AUTO_TRACE(logger_);
ApplicationSharedPtr app = ApplicationManagerImpl::instance()->application(
CommandRequestImpl::connection_key());
@@ -176,7 +176,7 @@ void UnsubscribeVehicleDataRequest::Run() {
}
void UnsubscribeVehicleDataRequest::on_event(const event_engine::Event& event) {
- LOG4CXX_INFO(logger_, "UnsubscribeVehicleDataRequest::on_event");
+ LOG4CXX_AUTO_TRACE(logger_);
const smart_objects::SmartObject& message = event.smart_object();
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 60f7077da7..87b2e6e5e1 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
@@ -45,7 +45,7 @@ UnsubscribeVehicleDataResponse::~UnsubscribeVehicleDataResponse() {
}
void UnsubscribeVehicleDataResponse::Run() {
- LOG4CXX_INFO(logger_, "UnsubscribeVehicleDataResponse::Run");
+ LOG4CXX_AUTO_TRACE(logger_);
namespace smart_objects = NsSmartDeviceLink::NsSmartObjects;
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 9447772568..650e698bf4 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
@@ -51,7 +51,7 @@ UpdateTurnListRequest::~UpdateTurnListRequest() {
}
void UpdateTurnListRequest::Run() {
- LOG4CXX_INFO(logger_, "UpdateTurnListRequest::Run");
+ LOG4CXX_AUTO_TRACE(logger_);
ApplicationSharedPtr app = ApplicationManagerImpl::instance()->application(
(*message_)[strings::params][strings::connection_key].asUInt());
@@ -141,7 +141,7 @@ void UpdateTurnListRequest::Run() {
}
void UpdateTurnListRequest::on_event(const event_engine::Event& event) {
- LOG4CXX_INFO(logger_, "UpdateTurnListRequest::on_event");
+ LOG4CXX_AUTO_TRACE(logger_);
const smart_objects::SmartObject& message = event.smart_object();
switch (event.id()) {
@@ -188,7 +188,7 @@ bool UpdateTurnListRequest::CheckTurnListArray() {
}
bool UpdateTurnListRequest::IsWhiteSpaceExist() {
- LOG4CXX_INFO(logger_, "UpdateTurnListRequest::IsWhiteSpaceExist");
+ LOG4CXX_AUTO_TRACE(logger_);
const char* str = NULL;
if ((*message_)[strings::msg_params].keyExists(strings::turn_list)) {
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 ec1e0bce8a..26e5c460d3 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
@@ -47,7 +47,7 @@ UpdateTurnListResponse::~UpdateTurnListResponse() {
}
void UpdateTurnListResponse::Run() {
- LOG4CXX_INFO(logger_, "UpdateTurnListResponse::Run");
+ LOG4CXX_AUTO_TRACE(logger_);
ApplicationManagerImpl::instance()->SendMessageToMobile(message_);
}