summaryrefslogtreecommitdiff
path: root/src/components/application_manager/src
diff options
context:
space:
mode:
authorJustin Dickow <jjdickow@gmail.com>2015-01-26 11:15:48 -0500
committerJustin Dickow <jjdickow@gmail.com>2015-01-26 11:15:48 -0500
commit46ed776c537131e72747538488b213cf45f23e22 (patch)
tree4cad1abf411addfd72ab591c93edeb5d225d9a39 /src/components/application_manager/src
parenta24079cb8de5563376dcf782cdb9fe3cae063841 (diff)
downloadsdl_core-46ed776c537131e72747538488b213cf45f23e22.tar.gz
Latest internal release - last bulk merge before pull request and gitflow!?
Smoke tested on Ubuntu 12.04 Signed-off-by: Justin Dickow <jjdickow@gmail.com>
Diffstat (limited to 'src/components/application_manager/src')
-rw-r--r--src/components/application_manager/src/application_data_impl.cc57
-rw-r--r--src/components/application_manager/src/application_impl.cc33
-rw-r--r--src/components/application_manager/src/application_manager_impl.cc439
-rw-r--r--src/components/application_manager/src/commands/command_impl.cc2
-rw-r--r--src/components/application_manager/src/commands/command_request_impl.cc12
-rw-r--r--src/components/application_manager/src/commands/hmi/activate_app_request.cc17
-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.cc3
-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.cc26
-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.cc4
-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.cc4
-rw-r--r--src/components/application_manager/src/commands/hmi/on_exit_all_applications_notification.cc8
-rw-r--r--src/components/application_manager/src/commands/hmi/on_exit_application_notification.cc4
-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.cc4
-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.cc4
-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.cc4
-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_to_hmi.cc2
-rw-r--r--src/components/application_manager/src/commands/hmi/sdl_activate_app_request.cc4
-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_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_icon_request.cc4
-rw-r--r--src/components/application_manager/src/commands/hmi/ui_set_icon_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.cc4
-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.cc16
-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.cc14
-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.cc14
-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.cc9
-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.cc14
-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.cc2
-rw-r--r--src/components/application_manager/src/commands/mobile/on_button_press_notification.cc2
-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.cc15
-rw-r--r--src/components/application_manager/src/commands/mobile/on_hmi_status_notification.cc2
-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.cc8
-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.cc31
-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.cc4
-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.cc112
-rw-r--r--src/components/application_manager/src/commands/mobile/register_app_interface_response.cc5
-rw-r--r--src/components/application_manager/src/commands/mobile/reset_global_properties_request.cc4
-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.cc4
-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.cc2
-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_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_icon_request.cc9
-rw-r--r--src/components/application_manager/src/commands/mobile/set_icon_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.cc4
-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.cc8
-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.cc2
-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
-rw-r--r--src/components/application_manager/src/hmi_capabilities.cc2
-rw-r--r--src/components/application_manager/src/message.cc2
-rw-r--r--src/components/application_manager/src/message_helper.cc253
-rw-r--r--src/components/application_manager/src/mobile_message_handler.cc5
-rw-r--r--src/components/application_manager/src/policies/policy_event_observer.cc25
-rw-r--r--src/components/application_manager/src/policies/policy_handler.cc400
-rw-r--r--src/components/application_manager/src/request_controller.cc435
-rw-r--r--src/components/application_manager/src/request_info.cc72
-rw-r--r--src/components/application_manager/src/resume_ctrl.cpp948
-rw-r--r--src/components/application_manager/src/usage_statistics.cc2
321 files changed, 1868 insertions, 2274 deletions
diff --git a/src/components/application_manager/src/application_data_impl.cc b/src/components/application_manager/src/application_data_impl.cc
index e5fb6d4eab..56fc88ffe3 100644
--- a/src/components/application_manager/src/application_data_impl.cc
+++ b/src/components/application_manager/src/application_data_impl.cc
@@ -1,4 +1,4 @@
-/*
+/**
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
@@ -32,10 +32,8 @@
#include "application_manager/application_data_impl.h"
#include "application_manager/smart_object_keys.h"
-#include "utils/logger.h"
namespace application_manager {
-CREATE_LOGGERPTR_GLOBAL(logger_, "ApplicationDataImpl")
InitialApplicationDataImpl::InitialApplicationDataImpl()
: app_types_(NULL),
@@ -279,30 +277,6 @@ const NsSmartDeviceLink::NsSmartObjects::SmartObject* DynamicApplicationDataImpl
return menu_icon_;
}
-void DynamicApplicationDataImpl::load_global_properties(
- const smart_objects::SmartObject& properties_so) {
- SetGlobalProperties(properties_so.getElement(strings::vr_help_title),
- &DynamicApplicationData::set_vr_help_title);
-
- SetGlobalProperties(properties_so.getElement(strings::vr_help),
- &DynamicApplicationData::set_vr_help);
-
- SetGlobalProperties(properties_so.getElement(strings::timeout_prompt),
- &DynamicApplicationData::set_timeout_prompt);
-
- SetGlobalProperties(properties_so.getElement(strings::help_prompt),
- &DynamicApplicationData::set_help_prompt);
-
- SetGlobalProperties(properties_so.getElement(strings::keyboard_properties),
- &DynamicApplicationData::set_keyboard_props);
-
- SetGlobalProperties(properties_so.getElement(strings::menu_title),
- &DynamicApplicationData::set_menu_title);
-
- SetGlobalProperties(properties_so.getElement(strings::menu_icon),
- &DynamicApplicationData::set_menu_icon);
-}
-
void DynamicApplicationDataImpl::set_help_prompt(
const smart_objects::SmartObject& help_prompt) {
if (help_prompt_) {
@@ -394,31 +368,15 @@ void DynamicApplicationDataImpl::set_menu_icon(
menu_icon_= new smart_objects::SmartObject(menu_icon);
}
-void DynamicApplicationDataImpl::SetGlobalProperties(
- const smart_objects::SmartObject& param,
- void (DynamicApplicationData::*callback)(
- const NsSmartDeviceLink::NsSmartObjects::SmartObject&)) {
-
- smart_objects::SmartType so_type = param.getType();
- if (so_type != smart_objects::SmartType::SmartType_Invalid &&
- so_type != smart_objects::SmartType::SmartType_Null) {
- if (callback) {
- (this->*callback)(param);
- }
- } else {
- LOG4CXX_WARN(logger_, "Invalid or Null smart object");
- }
-}
void DynamicApplicationDataImpl::AddCommand(
uint32_t cmd_id, const smart_objects::SmartObject& command) {
- sync_primitives::AutoLock lock(commands_lock_);
commands_[cmd_id] = new smart_objects::SmartObject(command);
}
void DynamicApplicationDataImpl::RemoveCommand(uint32_t cmd_id) {
- sync_primitives::AutoLock lock(commands_lock_);
CommandsMap::iterator it = commands_.find(cmd_id);
+
if (commands_.end() != it) {
delete it->second;
commands_.erase(it);
@@ -427,7 +385,6 @@ void DynamicApplicationDataImpl::RemoveCommand(uint32_t cmd_id) {
smart_objects::SmartObject* DynamicApplicationDataImpl::FindCommand(
uint32_t cmd_id) {
- sync_primitives::AutoLock lock(commands_lock_);
CommandsMap::const_iterator it = commands_.find(cmd_id);
if (it != commands_.end()) {
return it->second;
@@ -439,12 +396,10 @@ smart_objects::SmartObject* DynamicApplicationDataImpl::FindCommand(
// TODO(VS): Create common functions for processing collections
void DynamicApplicationDataImpl::AddSubMenu(
uint32_t menu_id, const smart_objects::SmartObject& menu) {
- sync_primitives::AutoLock lock(sub_menu_lock_);
sub_menu_[menu_id] = new smart_objects::SmartObject(menu);
}
void DynamicApplicationDataImpl::RemoveSubMenu(uint32_t menu_id) {
- sync_primitives::AutoLock lock(sub_menu_lock_);
SubMenuMap::iterator it = sub_menu_.find(menu_id);
if (sub_menu_.end() != it) {
@@ -455,7 +410,6 @@ void DynamicApplicationDataImpl::RemoveSubMenu(uint32_t menu_id) {
smart_objects::SmartObject* DynamicApplicationDataImpl::FindSubMenu(
uint32_t menu_id) const {
- sync_primitives::AutoLock lock(sub_menu_lock_);
SubMenuMap::const_iterator it = sub_menu_.find(menu_id);
if (it != sub_menu_.end()) {
return it->second;
@@ -466,7 +420,6 @@ smart_objects::SmartObject* DynamicApplicationDataImpl::FindSubMenu(
bool DynamicApplicationDataImpl::IsSubMenuNameAlreadyExist(
const std::string& name) {
- sync_primitives::AutoLock lock(sub_menu_lock_);
for (SubMenuMap::iterator it = sub_menu_.begin();
sub_menu_.end() != it;
++it) {
@@ -480,12 +433,10 @@ bool DynamicApplicationDataImpl::IsSubMenuNameAlreadyExist(
void DynamicApplicationDataImpl::AddChoiceSet(
uint32_t choice_set_id, const smart_objects::SmartObject& choice_set) {
- sync_primitives::AutoLock lock(choice_set_map_lock_);
choice_set_map_[choice_set_id] = new smart_objects::SmartObject(choice_set);
}
void DynamicApplicationDataImpl::RemoveChoiceSet(uint32_t choice_set_id) {
- sync_primitives::AutoLock lock(choice_set_map_lock_);
ChoiceSetMap::iterator it = choice_set_map_.find(choice_set_id);
if (choice_set_map_.end() != it) {
@@ -496,7 +447,6 @@ void DynamicApplicationDataImpl::RemoveChoiceSet(uint32_t choice_set_id) {
smart_objects::SmartObject* DynamicApplicationDataImpl::FindChoiceSet(
uint32_t choice_set_id) {
- sync_primitives::AutoLock lock(choice_set_map_lock_);
ChoiceSetMap::const_iterator it = choice_set_map_.find(choice_set_id);
if (it != choice_set_map_.end()) {
return it->second;
@@ -507,13 +457,11 @@ smart_objects::SmartObject* DynamicApplicationDataImpl::FindChoiceSet(
void DynamicApplicationDataImpl::AddPerformInteractionChoiceSet(
uint32_t choice_set_id, const smart_objects::SmartObject& vr_commands) {
- sync_primitives::AutoLock lock(performinteraction_choice_set_lock_);
performinteraction_choice_set_map_[choice_set_id] =
new smart_objects::SmartObject(vr_commands);
}
void DynamicApplicationDataImpl::DeletePerformInteractionChoiceSetMap() {
- sync_primitives::AutoLock lock(performinteraction_choice_set_lock_);
PerformChoiceSetMap::iterator it = performinteraction_choice_set_map_.begin();
for (; performinteraction_choice_set_map_.end() != it; ++it) {
delete it->second;
@@ -524,7 +472,6 @@ void DynamicApplicationDataImpl::DeletePerformInteractionChoiceSetMap() {
smart_objects::SmartObject*
DynamicApplicationDataImpl::FindPerformInteractionChoiceSet(
uint32_t choice_set_id) const {
- sync_primitives::AutoLock lock(performinteraction_choice_set_lock_);
PerformChoiceSetMap::const_iterator it = performinteraction_choice_set_map_
.find(choice_set_id);
diff --git a/src/components/application_manager/src/application_impl.cc b/src/components/application_manager/src/application_impl.cc
index c4eb7347cb..f52467f751 100644
--- a/src/components/application_manager/src/application_impl.cc
+++ b/src/components/application_manager/src/application_impl.cc
@@ -1,4 +1,4 @@
-/*
+/**
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
@@ -35,7 +35,6 @@
#include <stdlib.h>
#include "application_manager/application_impl.h"
#include "application_manager/message_helper.h"
-#include "application_manager/application_manager_impl.h"
#include "config_profile/profile.h"
#include "interfaces/MOBILE_API.h"
#include "utils/file_system.h"
@@ -149,7 +148,7 @@ bool ApplicationImpl::IsFullscreen() const {
}
bool ApplicationImpl::MakeFullscreen() {
- set_hmi_level(mobile_api::HMILevel::HMI_FULL);
+ hmi_level_ = mobile_api::HMILevel::HMI_FULL;
if (is_media_ && !tts_speak_state_) {
audio_streaming_state_ = mobile_api::AudioStreamingState::AUDIBLE;
}
@@ -159,25 +158,6 @@ bool ApplicationImpl::MakeFullscreen() {
}
return true;
}
-void ApplicationImpl::ChangeSupportingAppHMIType() {
- allowed_support_navigation_ = false;
- is_voice_communication_application_ = false;
- const smart_objects::SmartObject& array_app_types = *app_types_;
- uint32_t lenght_app_types = array_app_types.length();
-
- for (uint32_t i = 0; i < lenght_app_types; ++i) {
- if (mobile_apis::AppHMIType::NAVIGATION ==
- static_cast<mobile_apis::AppHMIType::eType>(
- array_app_types[i].asUInt())) {
- allowed_support_navigation_ = true;
- }
- if (mobile_apis::AppHMIType::COMMUNICATION ==
- static_cast<mobile_apis::AppHMIType::eType>(
- array_app_types[i].asUInt())) {
- is_voice_communication_application_ = true;
- }
- }
-}
bool ApplicationImpl::IsAudible() const {
return mobile_api::HMILevel::HMI_FULL == hmi_level_
@@ -185,7 +165,7 @@ bool ApplicationImpl::IsAudible() const {
}
void ApplicationImpl::MakeNotAudible() {
- set_hmi_level(mobile_api::HMILevel::HMI_BACKGROUND);
+ hmi_level_ = mobile_api::HMILevel::HMI_BACKGROUND;
audio_streaming_state_ = mobile_api::AudioStreamingState::NOT_AUDIBLE;
}
@@ -315,7 +295,7 @@ void ApplicationImpl::set_hmi_level(
delete_file_in_none_count_ = 0;
list_files_in_none_count_ = 0;
}
- LOG4CXX_INFO(logger_, "hmi_level = " << hmi_level);
+
hmi_level_ = hmi_level;
usage_report_.RecordHmiStateChanged(hmi_level);
}
@@ -392,7 +372,7 @@ void ApplicationImpl::OnVideoStreamRetry() {
video_stream_retry_timer_->updateTimeOut(time_out);
} else {
LOG4CXX_INFO(logger_, "Stop video streaming retry");
- video_stream_retry_timer_->stop();
+ video_stream_retry_timer_.release();
set_video_stream_retry_active(false);
}
}
@@ -411,7 +391,7 @@ void ApplicationImpl::OnAudioStreamRetry() {
audio_stream_retry_timer_->updateTimeOut(time_out);
} else {
LOG4CXX_INFO(logger_, "Stop audio streaming retry");
- audio_stream_retry_timer_->stop();
+ audio_stream_retry_timer_.release();
set_audio_stream_retry_active(false);
}
}
@@ -676,7 +656,6 @@ uint32_t ApplicationImpl::curHash() const {
}
uint32_t ApplicationImpl::UpdateHash() {
- LOG4CXX_AUTO_TRACE(logger_);
uint32_t new_hash= nextHash();
MessageHelper::SendHashUpdateNotification(app_id());
return new_hash;
diff --git a/src/components/application_manager/src/application_manager_impl.cc b/src/components/application_manager/src/application_manager_impl.cc
index e085855568..6d7fdeec61 100644
--- a/src/components/application_manager/src/application_manager_impl.cc
+++ b/src/components/application_manager/src/application_manager_impl.cc
@@ -55,12 +55,6 @@
#include "usage_statistics/counter.h"
#include <time.h>
-namespace {
- int get_rand_from_range(uint32_t from = 0, int to = RAND_MAX) {
- return std::rand() % to + from;
- }
-}
-
namespace application_manager {
CREATE_LOGGERPTR_GLOBAL(logger_, "ApplicationManager")
@@ -89,7 +83,6 @@ ApplicationManagerImpl::ApplicationManagerImpl()
messages_to_mobile_("AM ToMobile", this),
messages_from_hmi_("AM FromHMI", this),
messages_to_hmi_("AM ToHMI", this),
- audio_pass_thru_messages_("AudioPassThru", this),
hmi_capabilities_(this),
unregister_reason_(mobile_api::AppInterfaceUnregisteredReason::IGNITION_OFF),
resume_ctrl_(this),
@@ -100,10 +93,8 @@ ApplicationManagerImpl::ApplicationManagerImpl()
tts_global_properties_timer_("TTSGLPRTimer",
this,
&ApplicationManagerImpl::OnTimerSendTTSGlobalProperties,
- true),
- is_low_voltage_(false) {
+ true) {
std::srand(std::time(0));
- policy::PolicyHandler::instance()->set_listener(this);
}
ApplicationManagerImpl::~ApplicationManagerImpl() {
@@ -113,14 +104,14 @@ ApplicationManagerImpl::~ApplicationManagerImpl() {
media_manager_ = NULL;
hmi_handler_ = NULL;
connection_handler_ = NULL;
- if(hmi_so_factory_) {
+ if (hmi_so_factory_) {
delete hmi_so_factory_;
- hmi_so_factory_ = NULL;
}
- if(mobile_so_factory_) {
+ hmi_so_factory_ = NULL;
+ if (mobile_so_factory_) {
delete mobile_so_factory_;
- mobile_so_factory_ = NULL;
}
+ mobile_so_factory_ = NULL;
protocol_handler_ = NULL;
media_manager_ = NULL;
LOG4CXX_INFO(logger_, "Destroying Policy Handler");
@@ -484,9 +475,9 @@ ApplicationSharedPtr ApplicationManagerImpl::RegisterApplication(
}
}
- applications_list_lock_.Acquire();
+ sync_primitives::AutoLock lock(applications_list_lock_);
+
application_list_.insert(application);
- applications_list_lock_.Release();
return application;
}
@@ -500,7 +491,6 @@ bool ApplicationManagerImpl::LoadAppDataToHMI(ApplicationSharedPtr app) {
}
bool ApplicationManagerImpl::ActivateApplication(ApplicationSharedPtr app) {
- LOG4CXX_AUTO_TRACE(logger_);
if (!app) {
LOG4CXX_ERROR(logger_, "Null-pointer application received.");
NOTREACHED();
@@ -572,12 +562,8 @@ bool ApplicationManagerImpl::ActivateApplication(ApplicationSharedPtr app) {
mobile_api::HMILevel::eType ApplicationManagerImpl::PutApplicationInFull(
ApplicationSharedPtr app) {
- LOG4CXX_AUTO_TRACE(logger_);
- if (!app) {
- LOG4CXX_ERROR(logger_, "Application pointer invalid");
- NOTREACHED();
- return mobile_api::HMILevel::INVALID_ENUM;
- }
+ DCHECK(app.get())
+
bool is_audio_app = app->IsAudioApplication();
bool does_audio_app_with_same_type_exist =
DoesAudioAppWithSameHMITypeExistInFullOrLimited(app);
@@ -595,6 +581,7 @@ mobile_api::HMILevel::eType ApplicationManagerImpl::PutApplicationInFull(
}
if (mobile_api::HMILevel::HMI_FULL == result) {
+ app->set_hmi_level(result);
MessageHelper::SendActivateAppToHMI(app->app_id());
}
return result;
@@ -704,23 +691,50 @@ void ApplicationManagerImpl::StartAudioPassThruThread(int32_t session_key,
void ApplicationManagerImpl::SendAudioPassThroughNotification(
uint32_t session_key,
- std::vector<uint8_t>& binary_data) {
- LOG4CXX_AUTO_TRACE(logger_);
+ std::vector<uint8_t> binaryData) {
+ LOG4CXX_TRACE_ENTER(logger_);
if (!audio_pass_thru_active_) {
LOG4CXX_ERROR(logger_, "Trying to send PassThroughNotification"
" when PassThrough is not active");
return;
}
+ smart_objects::SmartObject* on_audio_pass = NULL;
+ on_audio_pass = new smart_objects::SmartObject();
+
+ if (NULL == on_audio_pass) {
+ LOG4CXX_ERROR_EXT(logger_, "OnAudioPassThru NULL pointer");
+
+ return;
+ }
+
+ LOG4CXX_INFO_EXT(logger_, "Fill smart object");
- impl::AudioData data;
- data.session_key = session_key;
- data.binary_data = binary_data;
- audio_pass_thru_messages_.PostMessage(data);
+ (*on_audio_pass)[strings::params][strings::message_type] =
+ application_manager::MessageType::kNotification;
+
+ (*on_audio_pass)[strings::params][strings::connection_key] =
+ static_cast<int32_t>(session_key);
+ (*on_audio_pass)[strings::params][strings::function_id] =
+ mobile_apis::FunctionID::OnAudioPassThruID;
+
+ LOG4CXX_INFO_EXT(logger_, "Fill binary data");
+ // binary data
+ (*on_audio_pass)[strings::params][strings::binary_data] =
+ smart_objects::SmartObject(binaryData);
+
+ LOG4CXX_INFO_EXT(logger_, "After fill binary data");
+
+ LOG4CXX_INFO_EXT(logger_, "Send data");
+ CommandSharedPtr command (
+ MobileCommandFactory::CreateCommand(&(*on_audio_pass)));
+ command->Init();
+ command->Run();
+ command->CleanUp();
}
void ApplicationManagerImpl::StopAudioPassThru(int32_t application_key) {
- LOG4CXX_AUTO_TRACE(logger_);
+ LOG4CXX_TRACE_ENTER(logger_);
sync_primitives::AutoLock lock(audio_pass_thru_lock_);
if (NULL != media_manager_) {
media_manager_->StopMicrophoneRecording(application_key);
@@ -747,7 +761,7 @@ std::string ApplicationManagerImpl::GetDeviceName(
void ApplicationManagerImpl::OnMessageReceived(
const ::protocol_handler::RawMessagePtr message) {
- LOG4CXX_AUTO_TRACE(logger_);
+ LOG4CXX_INFO(logger_, "ApplicationManagerImpl::OnMessageReceived");
if (!message) {
LOG4CXX_ERROR(logger_, "Null-pointer message received.");
@@ -765,12 +779,12 @@ void ApplicationManagerImpl::OnMessageReceived(
void ApplicationManagerImpl::OnMobileMessageSent(
const ::protocol_handler::RawMessagePtr message) {
- LOG4CXX_AUTO_TRACE(logger_);
+ LOG4CXX_INFO(logger_, "ApplicationManagerImpl::OnMobileMessageSent");
}
void ApplicationManagerImpl::OnMessageReceived(
hmi_message_handler::MessageSharedPointer message) {
- LOG4CXX_AUTO_TRACE(logger_);
+ LOG4CXX_INFO(logger_, "ApplicationManagerImpl::OnMessageReceived");
if (!message) {
LOG4CXX_ERROR(logger_, "Null-pointer message received.");
@@ -788,7 +802,7 @@ void ApplicationManagerImpl::OnErrorSending(
void ApplicationManagerImpl::OnDeviceListUpdated(
const connection_handler::DeviceMap& device_list) {
- LOG4CXX_AUTO_TRACE(logger_);
+ LOG4CXX_INFO(logger_, "ApplicationManagerImpl::OnDeviceListUpdated");
smart_objects::SmartObject* update_list = new smart_objects::SmartObject;
smart_objects::SmartObject& so_to_send = *update_list;
@@ -799,7 +813,7 @@ void ApplicationManagerImpl::OnDeviceListUpdated(
so_to_send[jhs::S_PARAMS][jhs::S_PROTOCOL_VERSION] = 3;
so_to_send[jhs::S_PARAMS][jhs::S_PROTOCOL_TYPE] = 1;
so_to_send[jhs::S_PARAMS][jhs::S_CORRELATION_ID] = GetNextHMICorrelationID();
- utils::SharedPtr<smart_objects::SmartObject> msg_params = MessageHelper::CreateDeviceListSO(
+ smart_objects::SmartObject* msg_params = MessageHelper::CreateDeviceListSO(
device_list);
if (!msg_params) {
LOG4CXX_WARN(logger_, "Failed to create sub-smart object.");
@@ -899,17 +913,12 @@ uint32_t ApplicationManagerImpl::GenerateGrammarID() {
}
uint32_t ApplicationManagerImpl::GenerateNewHMIAppID() {
- LOG4CXX_TRACE(logger_, "ENTER");
- uint32_t hmi_app_id = get_rand_from_range(1);
- LOG4CXX_DEBUG(logger_, "GenerateNewHMIAppID value is: " << hmi_app_id);
+ uint32_t hmi_app_id = rand();
while (resume_ctrl_.IsHMIApplicationIdExist(hmi_app_id)) {
- LOG4CXX_DEBUG(logger_, "HMI appID " << hmi_app_id << " is exists.");
- hmi_app_id = get_rand_from_range(1);
- LOG4CXX_DEBUG(logger_, "Trying new value: " << hmi_app_id);
+ hmi_app_id = rand();
}
- LOG4CXX_TRACE(logger_, "EXIT");
return hmi_app_id;
}
@@ -1079,21 +1088,6 @@ void ApplicationManagerImpl::OnServiceEndedCallback(const int32_t& session_key,
}
}
-void ApplicationManagerImpl::OnApplicationFloodCallBack(const uint32_t &connection_key) {
- LOG4CXX_AUTO_TRACE(logger_);
- LOG4CXX_DEBUG(logger_, "Unregister flooding application " << connection_key);
-
- MessageHelper::SendOnAppInterfaceUnregisteredNotificationToMobile(
- connection_key,
- mobile_apis::AppInterfaceUnregisteredReason::TOO_MANY_REQUESTS);
-
- const bool resuming = true;
- const bool unexpected_disconnect = false;
- UnregisterApplication(connection_key, mobile_apis::Result::TOO_MANY_PENDING_REQUESTS,
- resuming, unexpected_disconnect);
- // TODO(EZamakhov): increment "removals_for_bad_behaviour" field in policy table
-}
-
void ApplicationManagerImpl::set_hmi_message_handler(
hmi_message_handler::HMIMessageHandler* handler) {
hmi_handler_ = handler;
@@ -1121,7 +1115,7 @@ void ApplicationManagerImpl::StartDevicesDiscovery() {
void ApplicationManagerImpl::SendMessageToMobile(
const utils::SharedPtr<smart_objects::SmartObject> message,
bool final_message) {
- LOG4CXX_AUTO_TRACE(logger_);
+ LOG4CXX_INFO(logger_, "ApplicationManagerImpl::SendMessageToMobile");
if (!message) {
LOG4CXX_ERROR(logger_, "Null-pointer message received.");
@@ -1172,8 +1166,7 @@ void ApplicationManagerImpl::SendMessageToMobile(
// checked against policy permissions
if (msg_to_mobile[strings::params].keyExists(strings::correlation_id)) {
request_ctrl_.terminateMobileRequest(
- msg_to_mobile[strings::params][strings::correlation_id].asInt(),
- msg_to_mobile[strings::params][strings::connection_key].asInt());
+ msg_to_mobile[strings::params][strings::correlation_id].asInt());
} else if (app) {
mobile_apis::FunctionID::eType function_id =
static_cast<mobile_apis::FunctionID::eType>(
@@ -1186,10 +1179,7 @@ void ApplicationManagerImpl::SendMessageToMobile(
smart_objects::SmartMap::iterator iter_end = s_map.map_end();
for (; iter != iter_end; ++iter) {
- if (true == iter->second.asBool()) {
- LOG4CXX_INFO(logger_, "Request's param: " << iter->first);
- params.push_back(iter->first);
- }
+ params.push_back(iter->first);
}
}
const mobile_apis::Result::eType check_result =
@@ -1214,17 +1204,14 @@ void ApplicationManagerImpl::SendMessageToMobile(
bool ApplicationManagerImpl::ManageMobileCommand(
const utils::SharedPtr<smart_objects::SmartObject> message) {
- LOG4CXX_AUTO_TRACE(logger_);
+ LOG4CXX_INFO(logger_, "ApplicationManagerImpl::ManageMobileCommand");
if (!message) {
LOG4CXX_WARN(logger_, "RET Null-pointer message received.");
+ NOTREACHED()
return false;
}
- if (IsLowVoltage()) {
- LOG4CXX_WARN(logger_, "Low Voltage is active");
- return false;
- }
#ifdef DEBUG
MessageHelper::PrintSmartObject(*message);
#endif
@@ -1288,11 +1275,13 @@ bool ApplicationManagerImpl::ManageMobileCommand(
}
if (message_type ==
mobile_apis::messageType::notification) {
- request_ctrl_.addNotification(command);
- if (command->Init()) {
- command->Run();
- if (command->CleanUp()) {
- request_ctrl_.removeNotification(command);
+ commands::CommandNotificationImpl* command_notify =
+ static_cast<commands::CommandNotificationImpl*>(command);
+ request_ctrl_.addNotification(command_notify);
+ if (command_notify->Init()) {
+ command_notify->Run();
+ if (command_notify->CleanUp()) {
+ request_ctrl_.removeNotification(command_notify);
}
// If CleanUp returned false notification should remove it self.
}
@@ -1302,6 +1291,8 @@ bool ApplicationManagerImpl::ManageMobileCommand(
if (message_type ==
mobile_apis::messageType::request) {
+ commands::CommandRequestImpl* command_request =
+ static_cast<commands::CommandRequestImpl*>(command);
// commands will be launched from requesr_ctrl
mobile_apis::HMILevel::eType app_hmi_level = mobile_apis::HMILevel::INVALID_ENUM;
if (app) {
@@ -1310,8 +1301,8 @@ bool ApplicationManagerImpl::ManageMobileCommand(
// commands will be launched from request_ctrl
- const request_controller::RequestController::TResult result =
- request_ctrl_.addMobileRequest(command, app_hmi_level);
+ request_controller::RequestController::TResult result =
+ request_ctrl_.addMobileRequest(command_request, app_hmi_level);
if (result == request_controller::RequestController::SUCCESS) {
LOG4CXX_INFO(logger_, "Perform request");
@@ -1353,10 +1344,7 @@ bool ApplicationManagerImpl::ManageMobileCommand(
connection_key, mobile_api::AppInterfaceUnregisteredReason::
REQUEST_WHILE_IN_NONE_HMI_LEVEL);
- ApplicationSharedPtr app_ptr = application(connection_key);
- if(app_ptr) {
- app_ptr->usage_report().RecordRemovalsForBadBehavior();
- }
+ application(connection_key)->usage_report().RecordRemovalsForBadBehavior();
UnregisterApplication(connection_key, mobile_apis::Result::INVALID_ENUM,
false);
return false;
@@ -1373,7 +1361,7 @@ bool ApplicationManagerImpl::ManageMobileCommand(
void ApplicationManagerImpl::SendMessageToHMI(
const utils::SharedPtr<smart_objects::SmartObject> message) {
- LOG4CXX_AUTO_TRACE(logger_);
+ LOG4CXX_INFO(logger_, "ApplicationManagerImpl::SendMessageToHMI");
if (!message) {
LOG4CXX_WARN(logger_, "Null-pointer message received.");
@@ -1415,17 +1403,14 @@ void ApplicationManagerImpl::SendMessageToHMI(
bool ApplicationManagerImpl::ManageHMICommand(
const utils::SharedPtr<smart_objects::SmartObject> message) {
- LOG4CXX_AUTO_TRACE(logger_);
+ LOG4CXX_INFO(logger_, "ApplicationManagerImpl::ManageHMICommand");
if (!message) {
LOG4CXX_WARN(logger_, "Null-pointer message received.");
+ NOTREACHED();
return false;
}
- if (IsLowVoltage()) {
- LOG4CXX_WARN(logger_, "Low Voltage is active");
- return false;
- }
MessageHelper::PrintSmartObject(*message);
@@ -1455,6 +1440,19 @@ bool ApplicationManagerImpl::ManageHMICommand(
bool ApplicationManagerImpl::Init() {
LOG4CXX_TRACE(logger_, "Init application manager");
+ if (policy::PolicyHandler::instance()->PolicyEnabled()) {
+ if(!policy::PolicyHandler::instance()->LoadPolicyLibrary()) {
+ LOG4CXX_ERROR(logger_, "Policy library is not loaded. Check LD_LIBRARY_PATH");
+ return false;
+ }
+ LOG4CXX_INFO(logger_, "Policy library is loaded, now initing PT");
+ if (!policy::PolicyHandler::instance()->InitPolicyTable()) {
+ LOG4CXX_ERROR(logger_, "Policy table is not initialized.");
+ return false;
+ }
+ } else {
+ LOG4CXX_WARN(logger_, "System is configured to work without policy functionality.");
+ }
const std::string app_storage_folder =
profile::Profile::instance()->app_storage_folder();
if (!file_system::DirectoryExists(app_storage_folder)) {
@@ -1490,19 +1488,6 @@ bool ApplicationManagerImpl::Init() {
"System directory doesn't have read/write permissions");
return false;
}
- if (policy::PolicyHandler::instance()->PolicyEnabled()) {
- if(!policy::PolicyHandler::instance()->LoadPolicyLibrary()) {
- LOG4CXX_ERROR(logger_, "Policy library is not loaded. Check LD_LIBRARY_PATH");
- return false;
- }
- LOG4CXX_INFO(logger_, "Policy library is loaded, now initing PT");
- if (!policy::PolicyHandler::instance()->InitPolicyTable()) {
- LOG4CXX_ERROR(logger_, "Policy table is not initialized.");
- return false;
- }
- } else {
- LOG4CXX_WARN(logger_, "System is configured to work without policy functionality.");
- }
media_manager_ = media_manager::MediaManagerImpl::instance();
return true;
}
@@ -1867,7 +1852,6 @@ void ApplicationManagerImpl::removeNotification(const commands::Command* notific
void ApplicationManagerImpl::updateRequestTimeout(uint32_t connection_key,
uint32_t mobile_correlation_id,
uint32_t new_timeout_value) {
- LOG4CXX_AUTO_TRACE(logger_);
request_ctrl_.updateRequestTimeout(connection_key, mobile_correlation_id,
new_timeout_value);
}
@@ -1894,7 +1878,6 @@ void ApplicationManagerImpl::set_application_id(const int32_t correlation_id,
void ApplicationManagerImpl::SetUnregisterAllApplicationsReason(
mobile_api::AppInterfaceUnregisteredReason::eType reason) {
- LOG4CXX_TRACE(logger_, "reason = " << reason);
unregister_reason_ = reason;
}
@@ -1902,11 +1885,9 @@ void ApplicationManagerImpl::HeadUnitReset(
mobile_api::AppInterfaceUnregisteredReason::eType reason) {
switch (reason) {
case mobile_api::AppInterfaceUnregisteredReason::MASTER_RESET: {
- UnregisterAllApplications();
- policy::PolicyHandler::instance()->ResetPolicyTable();
- policy::PolicyHandler::instance()->UnloadPolicyLibrary();
file_system::remove_directory_content(profile::Profile::instance()->app_storage_folder());
resume_controller().ClearResumptionInfo();
+ policy::PolicyHandler::instance()->ResetPolicyTable();
break;
}
case mobile_api::AppInterfaceUnregisteredReason::FACTORY_DEFAULTS: {
@@ -1920,9 +1901,12 @@ void ApplicationManagerImpl::HeadUnitReset(
}
}
+void ApplicationManagerImpl::HeadUnitSuspend() {
+ LOG4CXX_INFO(logger_, "ApplicationManagerImpl::HeadUnitSuspend");
+}
void ApplicationManagerImpl::SendOnSDLClose() {
- LOG4CXX_AUTO_TRACE(logger_);
+ LOG4CXX_INFO(logger_, "ApplicationManagerImpl::SendOnSDLClose");
// must be sent to PASA HMI on shutdown synchronously
smart_objects::SmartObject* msg = new smart_objects::SmartObject(
@@ -1972,9 +1956,9 @@ void ApplicationManagerImpl::SendOnSDLClose() {
hmi_handler_->SendMessageToHMI(message_to_send);
}
-
void ApplicationManagerImpl::UnregisterAllApplications(bool generated_by_hmi) {
- LOG4CXX_DEBUG(logger_, "Unregister reason " << unregister_reason_);
+ LOG4CXX_INFO(logger_, "ApplicationManagerImpl::UnregisterAllApplications " <<
+ unregister_reason_);
hmi_cooperating_ = false;
@@ -1989,33 +1973,32 @@ void ApplicationManagerImpl::UnregisterAllApplications(bool generated_by_hmi) {
std::set<ApplicationSharedPtr>::iterator it = application_list_.begin();
while (it != application_list_.end()) {
ApplicationSharedPtr app_to_remove = *it;
- MessageHelper::SendOnAppInterfaceUnregisteredNotificationToMobile(
- app_to_remove->app_id(), unregister_reason_);
+ MessageHelper::SendOnAppInterfaceUnregisteredNotificationToMobile(
+ app_to_remove->app_id(), unregister_reason_);
UnregisterApplication(app_to_remove->app_id(),
mobile_apis::Result::INVALID_ENUM, is_ignition_off,
is_unexpected_disconnect);
- connection_handler_->CloseSession(app_to_remove->app_id(),
- connection_handler::kCommon);
+
+ connection_handler_->CloseSession(app_to_remove->app_id());
it = application_list_.begin();
}
if (is_ignition_off) {
- resume_controller().IgnitionOff();
+ resume_controller().IgnitionOff();
}
-
request_ctrl_.terminateAllHMIRequests();
}
void ApplicationManagerImpl::UnregisterApplication(
const uint32_t& app_id, mobile_apis::Result::eType reason,
bool is_resuming, bool is_unexpected_disconnect) {
- LOG4CXX_INFO(logger_, "app_id = " << app_id
- << "; reason = " << reason
- << "; is_resuming = " << is_resuming
- << "; is_unexpected_disconnect = " << is_unexpected_disconnect);
+ LOG4CXX_INFO(logger_,
+ "ApplicationManagerImpl::UnregisterApplication " << app_id);
//remove appID from tts_global_properties_app_list_
RemoveAppFromTTSGlobalPropertiesList(app_id);
+ sync_primitives::AutoLock lock(applications_list_lock_);
+
switch (reason) {
case mobile_apis::Result::SUCCESS:break;
case mobile_apis::Result::DISALLOWED: break;
@@ -2023,10 +2006,7 @@ void ApplicationManagerImpl::UnregisterApplication(
case mobile_apis::Result::INVALID_CERT: break;
case mobile_apis::Result::EXPIRED_CERT: break;
case mobile_apis::Result::TOO_MANY_PENDING_REQUESTS: {
- ApplicationSharedPtr app_ptr = application(app_id);
- if(app_ptr) {
- app_ptr->usage_report().RecordRemovalsForBadBehavior();
- }
+ application(app_id)->usage_report().RecordRemovalsForBadBehavior();
break;
}
default: {
@@ -2036,7 +2016,6 @@ void ApplicationManagerImpl::UnregisterApplication(
}
ApplicationSharedPtr app_to_remove;
- applications_list_lock_.Acquire();
std::set<ApplicationSharedPtr>::const_iterator it = application_list_.begin();
for (; it != application_list_.end(); ++it) {
if ((*it)->app_id() == app_id) {
@@ -2046,15 +2025,12 @@ void ApplicationManagerImpl::UnregisterApplication(
}
if (!app_to_remove) {
LOG4CXX_ERROR(logger_, "Cant find application with app_id = " << app_id);
- applications_list_lock_.Release();
return;
}
application_list_.erase(app_to_remove);
- applications_list_lock_.Release();
+
if (is_resuming) {
- resume_ctrl_.SaveApplication(app_to_remove);
- } else {
- resume_ctrl_.RemoveApplicationFromSaved(app_to_remove);
+ resume_ctrl_.SaveApplication(app_to_remove);
}
if (audio_pass_thru_active_) {
@@ -2075,7 +2051,7 @@ void ApplicationManagerImpl::UnregisterRevokedApplication(
const uint32_t& app_id, mobile_apis::Result::eType reason) {
UnregisterApplication(app_id, reason);
- connection_handler_->CloseSession(app_id, connection_handler::kCommon);
+ connection_handler_->CloseSession(app_id);
if (application_list_.empty()) {
connection_handler_->CloseRevokedConnection(app_id);
@@ -2093,13 +2069,7 @@ void ApplicationManagerImpl::Handle(const impl::MessageFromMobile message) {
}
void ApplicationManagerImpl::Handle(const impl::MessageToMobile message) {
- if (!protocol_handler_) {
- LOG4CXX_WARN(logger_,
- "Protocol Handler is not set; cannot send message to mobile.");
- return;
- }
-
- utils::SharedPtr<protocol_handler::RawMessage> rawMessage;
+ protocol_handler::RawMessage* rawMessage = 0;
if (message->protocol_version() == application_manager::kV1) {
rawMessage = MobileMessageHandler::HandleOutgoingMessageProtocolV1(message);
} else if ((message->protocol_version() == application_manager::kV2) ||
@@ -2108,12 +2078,18 @@ void ApplicationManagerImpl::Handle(const impl::MessageToMobile message) {
} else {
return;
}
-
if (!rawMessage) {
LOG4CXX_ERROR(logger_, "Failed to create raw message.");
return;
}
+ if (!protocol_handler_) {
+ LOG4CXX_WARN(logger_,
+ "Protocol Handler is not set; cannot send message to mobile.");
+ return;
+ }
+
+
bool is_final = message.is_final;
bool close_session = false;
if (is_final) {
@@ -2127,8 +2103,7 @@ void ApplicationManagerImpl::Handle(const impl::MessageToMobile message) {
LOG4CXX_INFO(logger_, "Message for mobile given away");
if (close_session) {
- connection_handler_->CloseSession(message->connection_key(),
- connection_handler::kCommon);
+ connection_handler_->CloseSession(message->connection_key());
}
}
@@ -2154,41 +2129,6 @@ void ApplicationManagerImpl::Handle(const impl::MessageToHmi message) {
LOG4CXX_INFO(logger_, "Message to hmi given away.");
}
-void ApplicationManagerImpl::Handle(const impl::AudioData message) {
- LOG4CXX_INFO(logger_, "Send AudioPassThru notification");
- smart_objects::SmartObject* on_audio_pass = NULL;
- on_audio_pass = new smart_objects::SmartObject();
-
- if (NULL == on_audio_pass) {
- LOG4CXX_ERROR_EXT(logger_, "OnAudioPassThru NULL pointer");
- return;
- }
-
- LOG4CXX_INFO_EXT(logger_, "Fill smart object");
-
- (*on_audio_pass)[strings::params][strings::message_type] =
- application_manager::MessageType::kNotification;
-
- (*on_audio_pass)[strings::params][strings::connection_key] =
- static_cast<int32_t>(message.session_key);
- (*on_audio_pass)[strings::params][strings::function_id] =
- mobile_apis::FunctionID::OnAudioPassThruID;
-
- LOG4CXX_INFO_EXT(logger_, "Fill binary data");
- // binary data
- (*on_audio_pass)[strings::params][strings::binary_data] =
- smart_objects::SmartObject(message.binary_data);
-
- LOG4CXX_INFO_EXT(logger_, "After fill binary data");
-
- LOG4CXX_INFO_EXT(logger_, "Send data");
- CommandSharedPtr command (
- MobileCommandFactory::CreateCommand(&(*on_audio_pass)));
- command->Init();
- command->Run();
- command->CleanUp();
-}
-
mobile_apis::Result::eType ApplicationManagerImpl::CheckPolicyPermissions(
const std::string& policy_app_id,
mobile_apis::HMILevel::eType hmi_level,
@@ -2260,24 +2200,6 @@ mobile_apis::Result::eType ApplicationManagerImpl::CheckPolicyPermissions(
return mobile_api::Result::SUCCESS;
}
-
-void ApplicationManagerImpl::OnLowVoltage() {
- LOG4CXX_AUTO_TRACE(logger_);
- is_low_voltage_ = true;
- request_ctrl_.OnLowVoltage();
-}
-
-bool ApplicationManagerImpl::IsLowVoltage() {
- LOG4CXX_TRACE(logger_, "result: " << is_low_voltage_);
- return is_low_voltage_;
-}
-
-void ApplicationManagerImpl::OnWakeUp() {
- LOG4CXX_AUTO_TRACE(logger_);
- is_low_voltage_ = false;
- request_ctrl_.OnWakeUp();
-}
-
void ApplicationManagerImpl::Mute(VRTTSSessionChanging changing_state) {
mobile_apis::AudioStreamingState::eType state =
hmi_capabilities_.attenuated_supported()
@@ -2453,12 +2375,11 @@ void ApplicationManagerImpl::OnTimerSendTTSGlobalProperties() {
void ApplicationManagerImpl::AddAppToTTSGlobalPropertiesList(
const uint32_t app_id) {
- LOG4CXX_AUTO_TRACE(logger_);
+ LOG4CXX_INFO(logger_, "ApplicationManagerImpl::AddAppToTTSGlobalPropertiesList");
uint16_t timeout = profile::Profile::instance()->tts_global_properties_timeout();
TimevalStruct current_time = date_time::DateTime::getCurrentTime();
current_time.tv_sec += timeout;
- // please avoid AutoLock usage to avoid deadlock
- tts_global_properties_app_list_lock_.Acquire();
+ sync_primitives::AutoLock lock(tts_global_properties_app_list_lock_);
if (tts_global_properties_app_list_.end() ==
tts_global_properties_app_list_.find(app_id)) {
tts_global_properties_app_list_[app_id] = current_time;
@@ -2466,35 +2387,28 @@ void ApplicationManagerImpl::AddAppToTTSGlobalPropertiesList(
//if add first item need to start timer on one second
if (1 == tts_global_properties_app_list_.size()) {
LOG4CXX_INFO(logger_, "Start tts_global_properties_timer_");
- tts_global_properties_app_list_lock_.Release();
tts_global_properties_timer_.start(1);
- return;
}
- tts_global_properties_app_list_lock_.Release();
}
void ApplicationManagerImpl::RemoveAppFromTTSGlobalPropertiesList(
const uint32_t app_id) {
- LOG4CXX_AUTO_TRACE(logger_);
- // please avoid AutoLock usage to avoid deadlock
- tts_global_properties_app_list_lock_.Acquire();
+ LOG4CXX_INFO(logger_, "ApplicationManagerImpl::RemoveAppFromTTSGlobalPropertiesList");
+ sync_primitives::AutoLock lock(tts_global_properties_app_list_lock_);
std::map<uint32_t, TimevalStruct>::iterator it =
tts_global_properties_app_list_.find(app_id);
if (tts_global_properties_app_list_.end() != it) {
tts_global_properties_app_list_.erase(it);
- if (tts_global_properties_app_list_.empty()) {
+ if (!(tts_global_properties_app_list_.size())) {
LOG4CXX_INFO(logger_, "Stop tts_global_properties_timer_");
- // if container is empty need to stop timer
- tts_global_properties_app_list_lock_.Release();
- tts_global_properties_timer_.pause();
- return;
+ //if container is empty need to stop timer
+ tts_global_properties_timer_.stop();
}
}
- tts_global_properties_app_list_lock_.Release();
}
void ApplicationManagerImpl::CreatePhoneCallAppList() {
- LOG4CXX_AUTO_TRACE(logger_);
+ LOG4CXX_TRACE_ENTER(logger_);
ApplicationManagerImpl::ApplicationListAccessor accessor;
ApplicationManagerImpl::TAppList local_app_list = accessor.applications();
@@ -2522,7 +2436,7 @@ void ApplicationManagerImpl::CreatePhoneCallAppList() {
}
void ApplicationManagerImpl::ResetPhoneCallAppList() {
- LOG4CXX_AUTO_TRACE(logger_);
+ LOG4CXX_TRACE_ENTER(logger_);
ApplicationManagerImpl::ApplicationListAccessor accessor;
ApplicationManagerImpl::TAppList local_app_list = accessor.applications();
@@ -2544,113 +2458,4 @@ void ApplicationManagerImpl::ResetPhoneCallAppList() {
on_phone_call_app_list_.clear();
}
-mobile_apis::AppHMIType::eType ApplicationManagerImpl::StringToAppHMIType(std::string str) {
- LOG4CXX_AUTO_TRACE(logger_);
- if ("DEFAULT" == str) {
- return mobile_apis::AppHMIType::DEFAULT;
- } else if ("COMMUNICATION" == str) {
- return mobile_apis::AppHMIType::COMMUNICATION;
- } else if ("MEDIA" == str) {
- return mobile_apis::AppHMIType::MEDIA;
- } else if ("MESSAGING" == str) {
- return mobile_apis::AppHMIType::MESSAGING;
- } else if ("NAVIGATION" == str) {
- return mobile_apis::AppHMIType::NAVIGATION;
- } else if ("INFORMATION" == str) {
- return mobile_apis::AppHMIType::INFORMATION;
- } else if ("SOCIAL" == str) {
- return mobile_apis::AppHMIType::SOCIAL;
- } else if ("BACKGROUND_PROCESS" == str) {
- return mobile_apis::AppHMIType::BACKGROUND_PROCESS;
- } else if ("TESTING" == str) {
- return mobile_apis::AppHMIType::TESTING;
- } else if ("SYSTEM" == str) {
- return mobile_apis::AppHMIType::SYSTEM;
- } else {
- return mobile_apis::AppHMIType::INVALID_ENUM;
- }
-}
-
-bool ApplicationManagerImpl::CompareAppHMIType (const smart_objects::SmartObject& from_policy,
- const smart_objects::SmartObject& from_application) {
- LOG4CXX_AUTO_TRACE(logger_);
- bool equal = false;
- uint32_t lenght_policy_app_types = from_policy.length();
- uint32_t lenght_application_app_types = from_application.length();
-
- for(uint32_t i = 0; i < lenght_application_app_types; ++i) {
- for(uint32_t k = 0; k < lenght_policy_app_types; ++k) {
- if (from_application[i] == from_policy[k]) {
- equal = true;
- break;
- }
- }
- if(!equal) {
- return false;
- }
- equal = false;
- }
- return true;
-}
-
-void ApplicationManagerImpl::OnUpdateHMIAppType(std::map<std::string, std::vector<std::string> > app_hmi_types) {
- LOG4CXX_AUTO_TRACE(logger_);
-
- sync_primitives::AutoLock lock(applications_list_lock_);
- std::map<std::string, std::vector<std::string> >::iterator it_app_hmi_types_from_policy;
- std::vector<std::string> hmi_types_from_policy;
- smart_objects::SmartObject transform_app_hmi_types(smart_objects::SmartType_Array);
- const smart_objects::SmartObject *save_application_hmi_type = NULL;
- bool flag_diffirence_app_hmi_type = false;
-
- for (TAppListIt it = application_list_.begin();
- it != application_list_.end(); ++it) {
-
- it_app_hmi_types_from_policy =
- app_hmi_types.find(((*it)->mobile_app_id())->asString());
-
- if (it_app_hmi_types_from_policy != app_hmi_types.end() &&
- ((it_app_hmi_types_from_policy->second).size())) {
- flag_diffirence_app_hmi_type = false;
- hmi_types_from_policy = (it_app_hmi_types_from_policy->second);
-
- if(transform_app_hmi_types.length()) {
- transform_app_hmi_types =
- smart_objects::SmartObject(smart_objects::SmartType_Array);
- }
-
- for(uint32_t i = 0; i < hmi_types_from_policy.size(); ++i) {
- transform_app_hmi_types[i] = StringToAppHMIType(hmi_types_from_policy[i]);
- }
-
- save_application_hmi_type = (*it)->app_types();
-
- if (save_application_hmi_type == NULL ||
- ((*save_application_hmi_type).length() != transform_app_hmi_types.length())) {
- flag_diffirence_app_hmi_type = true;
- } else {
- flag_diffirence_app_hmi_type = !(CompareAppHMIType(transform_app_hmi_types,
- *save_application_hmi_type));
- }
-
- if (flag_diffirence_app_hmi_type) {
- (*it)->set_app_types(transform_app_hmi_types);
- (*it)->ChangeSupportingAppHMIType();
- if ((*it)->hmi_level() == mobile_api::HMILevel::HMI_BACKGROUND) {
-
- MessageHelper::SendUIChangeRegistrationRequestToHMI(*it);
- } else if (((*it)->hmi_level() == mobile_api::HMILevel::HMI_FULL) ||
- ((*it)->hmi_level() == mobile_api::HMILevel::HMI_LIMITED)) {
-
- MessageHelper::SendActivateAppToHMI((*it)->app_id(),
- hmi_apis::Common_HMILevel::BACKGROUND,
- false);
- MessageHelper::SendUIChangeRegistrationRequestToHMI(*it);
- (*it)->set_hmi_level(mobile_api::HMILevel::HMI_BACKGROUND);
- MessageHelper::SendHMIStatusNotification(*(*it));
- }
- }
- }
- }
-}
} // namespace application_manager
diff --git a/src/components/application_manager/src/commands/command_impl.cc b/src/components/application_manager/src/commands/command_impl.cc
index 66c0e2c631..86b764c46a 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_request_impl.cc b/src/components/application_manager/src/commands/command_request_impl.cc
index 9967dcc113..5f8757754f 100644
--- a/src/components/application_manager/src/commands/command_request_impl.cc
+++ b/src/components/application_manager/src/commands/command_request_impl.cc
@@ -75,7 +75,7 @@ CommandRequestImpl::CommandRequestImpl(const MessageSharedPtr& message)
CommandRequestImpl::~CommandRequestImpl() {
}
-bool CommandRequestImpl::Init() {
+bool CommandRequestImpl::Init() {
return true;
}
@@ -91,11 +91,10 @@ void CommandRequestImpl::Run() {
}
void CommandRequestImpl::onTimeOut() {
- LOG4CXX_AUTO_TRACE(logger_);
+ LOG4CXX_INFO(logger_, "CommandRequestImpl::onTimeOut");
unsubscribe_from_all_events();
{
- // FIXME (dchmerev@luxoft.com): atomic_xchg fits better
sync_primitives::AutoLock auto_lock(state_lock_);
if (kCompleted == current_state_) {
// don't send timeout if request completed
@@ -206,7 +205,7 @@ void CommandRequestImpl::SendHMIRequest(
const uint32_t hmi_correlation_id =
ApplicationManagerImpl::instance()->GetNextHMICorrelationID();
if (use_events) {
- LOG4CXX_DEBUG(logger_, "subscribe_on_event " << function_id << " " << hmi_correlation_id);
+ LOG4CXX_WARN(logger_, "subscribe_on_event " << function_id << " " << hmi_correlation_id);
subscribe_on_event(function_id, hmi_correlation_id);
}
@@ -386,10 +385,7 @@ bool CommandRequestImpl::CheckAllowedParameters() {
smart_objects::SmartMap::iterator iter_end = s_map.map_end();
for (; iter != iter_end; ++iter) {
- if (true == iter->second.asBool()) {
- LOG4CXX_INFO(logger_, "Request's param: " << iter->first);
- params.push_back(iter->first);
- }
+ params.push_back(iter->first);
}
}
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 5d4d8b352a..29d998640e 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,7 +69,7 @@ namespace application_manager {
void ActivateAppRequest::on_event(const event_engine::Event& event) {
- LOG4CXX_AUTO_TRACE(logger_);
+ LOG4CXX_TRACE_ENTER(logger_);
const smart_objects::SmartObject* response = &(event.smart_object());
const hmi_apis::Common_Result::eType code =
static_cast<hmi_apis::Common_Result::eType>(
@@ -82,15 +82,8 @@ 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 = 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);
- }
-
+ mobile_apis::HMILevel::eType requested_hmi_level = static_cast<mobile_apis::HMILevel::eType>(
+ (*message_)[strings::msg_params][strings::activate_app_hmi_level].asInt());
if (0 == hmi_app_id) {
LOG4CXX_ERROR(logger_, "Error hmi_app_id = "<< hmi_app_id);
return;
@@ -102,10 +95,8 @@ 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 2f63198d82..aba5886097 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 73c9a49def..c11621045e 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_AUTO_TRACE(logger_);
+ LOG4CXX_INFO(logger_, "AddStatisticsInfoNotification::Run");
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 548238f00f..6ac42c7a00 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_AUTO_TRACE(logger_);
+ LOG4CXX_INFO(logger_, "AllowAllAppsRequest::Run");
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 eca9363254..69c52a3269 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_AUTO_TRACE(logger_);
+ LOG4CXX_INFO(logger_, "AllowAllAppsResponse::Run");
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 2f0d4bcc98..302a8c6766 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_AUTO_TRACE(logger_);
+ LOG4CXX_INFO(logger_, "AllowAppRequest::Run");
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 7a7f3dd560..035e41438d 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_AUTO_TRACE(logger_);
+ LOG4CXX_INFO(logger_, "AllowAppResponse::Run");
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 d0251a7276..0d2bcca4f4 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_AUTO_TRACE(logger_);
+ LOG4CXX_INFO(logger_, "BasicCommunicationSystemRequest::Run");
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 6106266d19..dd9f657adc 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_AUTO_TRACE(logger_);
+ LOG4CXX_INFO(logger_, "BasicCommunicationSystemResponse::Run");
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 87cf1aa783..e00b3fdc5a 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_AUTO_TRACE(logger_);
+ LOG4CXX_INFO(logger_, "ButtonGetCapabilitiesRequest::Run");
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 69cfbe49c5..0b67234743 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_AUTO_TRACE(logger_);
+ LOG4CXX_INFO(logger_, "ButtonGetCapabilitiesResponse::Run");
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 352a281348..3cc5818688 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_AUTO_TRACE(logger_);
+ LOG4CXX_INFO(logger_, "ClosePopupRequest::Run");
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 078d24ef2d..fa98be5e02 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_AUTO_TRACE(logger_);
+ LOG4CXX_INFO(logger_, "ClosePopupResponse::Run");
// 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 9024331462..53a084d23e 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_AUTO_TRACE(logger_);
+ LOG4CXX_INFO(logger_, "GetSystemInfoRequest::Run");
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 7cfd1b5797..090b04c3e3 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_AUTO_TRACE(logger_);
+ LOG4CXX_INFO(logger_, "GetSystemInfoResponse::Run");
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 70ca40d1ed..b3d0f60610 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,48 +46,27 @@ GetUrls::~GetUrls() {
}
void GetUrls::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
+ LOG4CXX_INFO(logger_, "GetUrls::Run");
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(), 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;
- }
- }
+ 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;
}
- 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 b446f088bf..f8086affe3 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_AUTO_TRACE(logger_);
+ LOG4CXX_INFO(logger_, "GetUrlsResponse::Run");
(*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 059843355c..9ab4bf5dbb 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_AUTO_TRACE(logger_);
+ LOG4CXX_INFO(logger_, "MixingAudioSupportedRequest::Run");
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 2da8bdc453..4a4fc276de 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_AUTO_TRACE(logger_);
+ LOG4CXX_INFO(logger_, "MixingAudioSupportedResponse::Run");
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 77b3701904..7128231b11 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_AUTO_TRACE(logger_);
+ LOG4CXX_INFO(logger_, "NaviAlertManeuverRequest::Run");
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 49d659777b..823c96211e 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_AUTO_TRACE(logger_);
+ LOG4CXX_INFO(logger_, "NaviAlertManeuverResponse::Run");
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 3908238ada..3c7a7d3ab5 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_AUTO_TRACE(logger_);
+ LOG4CXX_INFO(logger_, "AudioStartStreamRequest::Run");
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 0509028a94..e4cc8f4cc6 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_AUTO_TRACE(logger_);
+ LOG4CXX_INFO(logger_, "AudioStartStreamResponse::Run");
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 ea00d5bc3b..4052769d53 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_AUTO_TRACE(logger_);
+ LOG4CXX_INFO(logger_, "AudioStopStreamRequest::Run");
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 29e6708e19..81a6c62e8d 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_AUTO_TRACE(logger_);
+ LOG4CXX_INFO(logger_, "AudioStopStreamResponse::Run");
}
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 4c00908781..b7a1799427 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_AUTO_TRACE(logger_);
+ LOG4CXX_INFO(logger_, "NaviIsReadyRequest::Run");
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 a3387aec33..8aef42b40d 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_AUTO_TRACE(logger_);
+ LOG4CXX_INFO(logger_, "NaviIsReadyResponse::Run");
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 94d569c4ef..f396a24323 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_AUTO_TRACE(logger_);
+ LOG4CXX_INFO(logger_, "NaviSendLocationRequest::Run");
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 7ec5a5907d..944ced170c 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_AUTO_TRACE(logger_);
+ LOG4CXX_INFO(logger_, "NaviSendLocationResponse::Run");
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 b477dc8dab..9103e1f6c4 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_AUTO_TRACE(logger_);
+ LOG4CXX_INFO(logger_, "NaviShowConstantTBTRequest::Run");
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 58878a3c0c..03c70dd81b 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_AUTO_TRACE(logger_);
+ LOG4CXX_INFO(logger_, "NaviShowConstantTBTResponse::Run");
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 7ee3733e51..cb9dbd61e3 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_AUTO_TRACE(logger_);
+ LOG4CXX_INFO(logger_, "NaviStartStreamRequest::Run");
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 c2de690d63..79d51dcb66 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_AUTO_TRACE(logger_);
+ LOG4CXX_INFO(logger_, "NaviStartStreamResponse::Run");
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 3d74c27535..2f1e14a122 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_AUTO_TRACE(logger_);
+ LOG4CXX_INFO(logger_, "NaviStopStreamRequest::Run");
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 0603df6a65..c368940d5b 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_AUTO_TRACE(logger_);
+ LOG4CXX_INFO(logger_, "NaviStopStreamResponse::Run");
}
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 37037245fa..d0df9ec867 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_AUTO_TRACE(logger_);
+ LOG4CXX_INFO(logger_, "NaviUpdateTurnListRequest::Run");
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 d196db93e9..d93b67bb52 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_AUTO_TRACE(logger_);
+ LOG4CXX_INFO(logger_, "NaviUpdateTurnListResponse::Run");
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 f9645fb2e0..2b7ec13c43 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
@@ -61,9 +61,6 @@ 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);
}
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 506413ce1e..020428d6c0 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_AUTO_TRACE(logger_);
+ LOG4CXX_INFO(logger_, "OnAllowSDLFunctionalityNotification::Run");
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 7e60eaadaf..8152244a9c 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_AUTO_TRACE(logger_);
+ LOG4CXX_INFO(logger_, "OnAppActivatedNotification::Run");
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 892af48079..19dd91ab2a 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.
*
@@ -49,7 +49,7 @@ OnAppDeactivatedNotification::~OnAppDeactivatedNotification() {
}
void OnAppDeactivatedNotification::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
+ LOG4CXX_INFO(logger_, "OnAppDeactivatedNotification::Run");
uint32_t app_id = (*message_)[strings::msg_params][strings::app_id].asUInt();
ApplicationSharedPtr app =
ApplicationManagerImpl::instance()->application(app_id);
@@ -89,13 +89,21 @@ void OnAppDeactivatedNotification::Run() {
app->set_audio_streaming_state(mobile_api::AudioStreamingState::NOT_AUDIBLE);
}
}
- // HMI must send this notification for each active app
- 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);
- }
+ // 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);
+ }
+ }
}
break;
}
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 c786b486f4..26d580e83a 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_AUTO_TRACE(logger_);
+ LOG4CXX_INFO(logger_, "OnAppPermissionChangedNotification::Run");
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 69a18200fa..951a2ebdf1 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_AUTO_TRACE(logger_);
+ LOG4CXX_INFO(logger_, "OnAppPermissionConsentNotification::Run");
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 fa96c01ea0..26bc396db6 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,7 +45,7 @@ OnAppRegisteredNotification::~OnAppRegisteredNotification() {
}
void OnAppRegisteredNotification::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
+ LOG4CXX_INFO(logger_, "OnAppRegisteredNotification::Run");
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 571c6f381c..2bedcb0631 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_AUTO_TRACE(logger_);
+ LOG4CXX_INFO(logger_, "OnAppUnregisteredNotification::Run");
//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 2beffc2bdd..23aceaa7d6 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_AUTO_TRACE(logger_);
+ LOG4CXX_INFO(logger_, "OnButtonEventNotification::Run");
(*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 261aa68ee7..83bcbd7efa 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_AUTO_TRACE(logger_);
+ LOG4CXX_INFO(logger_, "OnButtonPressNotification::Run");
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 5d73c7b80e..537c246f42 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_AUTO_TRACE(logger_);
+ LOG4CXX_INFO(logger_, "OnDeviceChosenNotification::Run");
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 fbb2bcfe93..8af2571b55 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,47 +30,10 @@
* 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 {
@@ -85,12 +48,10 @@ OnDeviceStateChangedNotification::~OnDeviceStateChangedNotification() {
}
void OnDeviceStateChangedNotification::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
+ LOG4CXX_INFO(logger_, "OnDeviceStateChangedNotification::Run");
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()) {
@@ -98,13 +59,6 @@ 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);
}
@@ -113,3 +67,4 @@ 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 947847fb31..d5a8edc48d 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_AUTO_TRACE(logger_);
+ LOG4CXX_INFO(logger_, "OnDriverDistractionNotification::Run");
const hmi_apis::Common_DriverDistractionState::eType state =
static_cast<hmi_apis::Common_DriverDistractionState::eType>(
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 ee34433e62..b284c81f21 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,12 +52,11 @@ OnExitAllApplicationsNotification::~OnExitAllApplicationsNotification() {
}
void OnExitAllApplicationsNotification::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
+ LOG4CXX_INFO(logger_, "OnExitAllApplicationsNotification::Run");
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;
@@ -78,6 +77,7 @@ void OnExitAllApplicationsNotification::Run() {
break;
}
case hmi_apis::Common_ApplicationsCloseReason::SUSPEND: {
+ app_manager->HeadUnitSuspend();
SendOnSDLPersistenceComplete();
return;
}
@@ -93,11 +93,13 @@ void OnExitAllApplicationsNotification::Run() {
mobile_api::AppInterfaceUnregisteredReason::FACTORY_DEFAULTS == mob_reason) {
app_manager->HeadUnitReset(mob_reason);
}
+
kill(getpid(), SIGINT);
}
void OnExitAllApplicationsNotification::SendOnSDLPersistenceComplete() {
- LOG4CXX_AUTO_TRACE(logger_);
+ LOG4CXX_INFO(logger_, ""
+ "OnExitAllApplicationsNotification::SendOnSDLPersistenceComplete");
smart_objects::SmartObject* message =
new smart_objects::SmartObject(smart_objects::SmartType_Map);
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 2afa5bd1c8..f4aed61392 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_AUTO_TRACE(logger_);
+ LOG4CXX_INFO(logger_, "OnExitApplicationNotification::Run");
ApplicationManagerImpl* app_mgr = ApplicationManagerImpl::instance();
ApplicationSharedPtr app_impl = app_mgr->application(
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 83c3e61a0c..f1a590ee04 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_AUTO_TRACE(logger_);
+ LOG4CXX_INFO(logger_, "OnFileRemovedNotification::Run");
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 fc1b72c73a..bc32ab1cf0 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_AUTO_TRACE(logger_);
+ LOG4CXX_INFO(logger_, "OnFindApplications::Run");
// 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 32babf05cc..523013734f 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_AUTO_TRACE(logger_);
+ LOG4CXX_INFO(logger_, "OnIgnitionCycleOverNotification::Run");
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 87db5d4a38..a68ae90796 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_AUTO_TRACE(logger_);
+ LOG4CXX_INFO(logger_, "OnNaviTBTClientStateNotification::Run");
// 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 9cee8801e7..9bd9099c75 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_AUTO_TRACE(logger_);
+ LOG4CXX_INFO(logger_, "OnPhoneCallNotification::Run");
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 9820bb02ad..e05b38d456 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_AUTO_TRACE(logger_);
+ LOG4CXX_INFO(logger_, "OnPlayToneNotification::Run");
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 56c544888a..b3f5803d44 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_AUTO_TRACE(logger_);
+ LOG4CXX_INFO(logger_, "OnPolicyUpdate::Run");
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 cf0297df01..2fecbec9c7 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_AUTO_TRACE(logger_);
+ LOG4CXX_INFO(logger_, "OnPutFileNotification::Run");
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 f1ac8b6d3c..783aa4af40 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_AUTO_TRACE(logger_);
+ LOG4CXX_INFO(logger_, "OnReadyNotification::Run");
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 a5ea29c6d2..1e517f35de 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_AUTO_TRACE(logger_);
+ LOG4CXX_INFO(logger_, "OnReceivedPolicyUpdate::Run");
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 163b525628..e0dae8f045 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_AUTO_TRACE(logger_);
+ LOG4CXX_INFO(logger_, "OnRecordStartdNotification::Run");
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 8e00c3447c..70868b826f 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_AUTO_TRACE(logger_);
+ LOG4CXX_INFO(logger_, "OnResumeAudioSourceNotification::Run");
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 c393219134..70240b4bf6 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 20010111fd..1fda4986e4 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_AUTO_TRACE(logger_);
+ LOG4CXX_INFO(logger_, "OnSDLConsentNeededNotification::Run");
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 afe0ffeabc..d71413ef85 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 6f867adbcd..fc5ffed42c 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_AUTO_TRACE(logger_);
+ LOG4CXX_INFO(logger_, "OnStartDeviceDiscovery::Run");
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 7db0053e2d..6e4e65987e 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 8dbd1e13e4..5a5c12b907 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_AUTO_TRACE(logger_);
+ LOG4CXX_INFO(logger_, "OnSystemContextNotification::Run");
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 09a96cc797..bac3d37359 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_AUTO_TRACE(logger_);
+ LOG4CXX_INFO(logger_, "OnSystemErrorNotification::Run");
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 fb5a9abc43..ec8460d581 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_AUTO_TRACE(logger_);
+ LOG4CXX_INFO(logger_, "OnSystemInfoChangedNotification::Run");
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 a77bd24766..e3d0ea511d 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_AUTO_TRACE(logger_);
+ LOG4CXX_INFO(logger_, "OnSystemRequestNotification::Run");
smart_objects::SmartObject& params = (*message_)[strings::params];
smart_objects::SmartObject& msg_params = (*message_)[strings::msg_params];
@@ -60,8 +60,7 @@ void OnSystemRequestNotification::Run() {
params[strings::function_id] =
static_cast<int32_t>(mobile_apis::FunctionID::eType::OnSystemRequestID);
- const std::string app_id = msg_params[strings::app_id].asString();
- LOG4CXX_DEBUG(logger_, "Received OnSystemRequest for " << app_id );
+ std::string app_id = msg_params[strings::app_id].asString();
if (strings::default_app_id == app_id) {
PolicyHandler* policy_handler = PolicyHandler::instance();
@@ -82,8 +81,7 @@ void OnSystemRequestNotification::Run() {
ApplicationSharedPtr app =
ApplicationManagerImpl::instance()->application_by_policy_id(app_id);
if (!app.valid()) {
- LOG4CXX_WARN(logger_, "Application with id " << app_id
- << " is not registered.");
+ LOG4CXX_WARN(logger_, "Application with such id is not yet 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 f3fbeb4e6f..60c0dca10a 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_AUTO_TRACE(logger_);
+ LOG4CXX_INFO(logger_, "OnTTSLanguageChangeNotification::Run");
HMICapabilities& hmi_capabilities =
ApplicationManagerImpl::instance()->hmi_capabilities();
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 96089384c4..047a5d985d 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_AUTO_TRACE(logger_);
+ LOG4CXX_INFO(logger_, "OnTTSResetTimeoutNotification::Run");
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 8213474c09..519fc290d9 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_AUTO_TRACE(logger_);
+ LOG4CXX_INFO(logger_, "OnTTSStartedNotification::Run");
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 c812c84af5..b3e3683f32 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_AUTO_TRACE(logger_);
+ LOG4CXX_INFO(logger_, "OnTTSStoppedNotification::Run");
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 d8fe1ebdea..4ed5839e5f 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_AUTO_TRACE(logger_);
+ LOG4CXX_INFO(logger_, "OnUICommandNotification::Run");
(*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 9dcfe01e60..45ff7425b7 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_AUTO_TRACE(logger_);
+ LOG4CXX_INFO(logger_, "OnUIKeyBoardInputNotification::Run");
//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 c8408b2e46..5756f50eb5 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_AUTO_TRACE(logger_);
+ LOG4CXX_INFO(logger_, "OnUILanguageChangeNotification::Run");
HMICapabilities& hmi_capabilities =
ApplicationManagerImpl::instance()->hmi_capabilities();
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 96f65839c1..357bfc4cb3 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_AUTO_TRACE(logger_);
+ LOG4CXX_INFO(logger_, "OnUIResetTimeoutNotification::Run");
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 00e0e4d2c6..7868e81193 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_AUTO_TRACE(logger_);
+ LOG4CXX_INFO(logger_, "OnUITouchEventNotification::Run");
//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 8716fb4165..a5b84748ef 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_AUTO_TRACE(logger_);
+ LOG4CXX_INFO(logger_, "OnUpdateDeviceList::Run");
}
} // 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 f1e515e2f2..be0c4ebb60 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_AUTO_TRACE(logger_);
+ LOG4CXX_INFO(logger_, "OnVIAccPedalPositionNotification::Run");
// 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 0dd5361f74..688a5c1fb1 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_AUTO_TRACE(logger_);
+ LOG4CXX_INFO(logger_, "OnVIBeltStatusNotification::Run");
// 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 27c902c880..e80a2edcf3 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_AUTO_TRACE(logger_);
+ LOG4CXX_INFO(logger_, "OnVIBodyInformationNotification::Run");
// 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 07b96f1011..4669398da1 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_AUTO_TRACE(logger_);
+ LOG4CXX_INFO(logger_, "OnVIDeviceStatusNotification::Run");
// 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 57a8f9c6ef..8b61d0af21 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_AUTO_TRACE(logger_);
+ LOG4CXX_INFO(logger_, "OnVIDriverBrakingNotification::Run");
// 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 7509884497..1b0989b1ec 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_AUTO_TRACE(logger_);
+ LOG4CXX_INFO(logger_, "OnVIEngineTorqueNotification::Run");
// 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 64dd411bdd..f7a9213598 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_AUTO_TRACE(logger_);
+ LOG4CXX_INFO(logger_, "OnVIExternalTemperatureNotification::Run");
// 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 59ecab0abc..97d797b630 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_AUTO_TRACE(logger_);
+ LOG4CXX_INFO(logger_, "OnVIFuelLevelNotification::Run");
// 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 faa8a0522a..0024f17a80 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_AUTO_TRACE(logger_);
+ LOG4CXX_INFO(logger_, "OnVIFuelLevelStateNotification::Run");
// 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 df582418cb..5b7ec72977 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_AUTO_TRACE(logger_);
+ LOG4CXX_INFO(logger_, "OnVIGpsDataNotification::Run");
// 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 01a0a725ef..355c00f0c9 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_AUTO_TRACE(logger_);
+ LOG4CXX_INFO(logger_, "OnVIHeadLampStatusNotification::Run");
// 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 b13d50fc1c..17240bce6c 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_AUTO_TRACE(logger_);
+ LOG4CXX_INFO(logger_, "OnVIInstantFuelConsumptionNotification::Run");
// 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 71870522ce..1caaecb442 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_AUTO_TRACE(logger_);
+ LOG4CXX_INFO(logger_, "OnVIMyKeyNotification::Run");
// 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 5db3ef3bb3..02127a1389 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_AUTO_TRACE(logger_);
+ LOG4CXX_INFO(logger_, "OnVIOdometerNotification::Run");
// 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 1739f4809b..4692191cb3 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_AUTO_TRACE(logger_);
+ LOG4CXX_INFO(logger_, "OnVIPrndlNotification::Run");
// 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 336847ced0..b16421903a 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_AUTO_TRACE(logger_);
+ LOG4CXX_INFO(logger_, "OnVIRpmNotification::Run");
// 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 ad38bf50a5..6bc1e8b2cf 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_AUTO_TRACE(logger_);
+ LOG4CXX_INFO(logger_, "OnVISpeedNotification::Run");
// 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 4fd70bf169..853b4eeea3 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_AUTO_TRACE(logger_);
+ LOG4CXX_INFO(logger_, "OnVISteeringWheelAngleNotification::Run");
// 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 fda6e6e28d..01ac7e9f8c 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_AUTO_TRACE(logger_);
+ LOG4CXX_INFO(logger_, "OnVITirePressureNotification::Run");
// 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 15ccf940b8..eda88ef602 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_AUTO_TRACE(logger_);
+ LOG4CXX_INFO(logger_, "OnVIVehicleDataNotification::Run");
// 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 aa1683c5fb..546dc0d3cf 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_AUTO_TRACE(logger_);
+ LOG4CXX_INFO(logger_, "OnVIVinNotification::Run");
// 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 0d27f42388..101427df0a 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_AUTO_TRACE(logger_);
+ LOG4CXX_INFO(logger_, "OnVIWiperStatusNotification::Run");
// 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 bcd02196a8..99842b8524 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_AUTO_TRACE(logger_);
+ LOG4CXX_INFO(logger_, "OnVRCommandNotification::Run");
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 c7de53b780..92e7cb7b23 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_AUTO_TRACE(logger_);
+ LOG4CXX_INFO(logger_, "OnVRLanguageChangeNotification::Run");
HMICapabilities& hmi_capabilities =
ApplicationManagerImpl::instance()->hmi_capabilities();
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 6e56dd29c0..72f6767e8c 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_AUTO_TRACE(logger_);
+ LOG4CXX_INFO(logger_, "OnVRStartedNotification::Run");
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 442968ea1e..46274a3b2e 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_AUTO_TRACE(logger_);
+ LOG4CXX_INFO(logger_, "OnVRStoppedNotification::Run");
ApplicationManagerImpl::instance()->set_vr_session_started(false);
ApplicationManagerImpl::instance()->Unmute(kVRSessionChanging);
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 82b36be0f0..242118a417 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/sdl_activate_app_request.cc b/src/components/application_manager/src/commands/hmi/sdl_activate_app_request.cc
index 0b8a190c3e..72abf233ce 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.
*
@@ -45,7 +45,7 @@ SDLActivateAppRequest::~SDLActivateAppRequest() {
}
void SDLActivateAppRequest::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
+ LOG4CXX_INFO(logger_, "SDLActivateAppRequest::Run");
policy::PolicyHandler::instance()->OnActivateApp(
(*message_)[strings::msg_params][strings::app_id].asUInt(),
(*message_)[strings::params][strings::correlation_id].asInt());
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 6c7a0b5355..46eb402f41 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_AUTO_TRACE(logger_);
+ LOG4CXX_INFO(logger_, "SDLActivateAppResponse::Run");
(*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 a6649b2579..7eb5a268ac 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_AUTO_TRACE(logger_);
+ LOG4CXX_INFO(logger_, "SDLGetListOfPermissionsRequest::Run");
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 5d5e75e5c7..da474cb128 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_AUTO_TRACE(logger_);
+ LOG4CXX_INFO(logger_, "SDLGetListOfPermissionsResponse::Run");
(*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 dd977d99f0..cc5fbc63ae 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_AUTO_TRACE(logger_);
+ LOG4CXX_INFO(logger_, "SDLGetStatusUpdateRequest::Run");
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 ab1c57e9af..08d8d315a5 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_AUTO_TRACE(logger_);
+ LOG4CXX_INFO(logger_, "SDLGetStatusUpdateResponse::Run");
(*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 cdd5c16ed0..047d6bf846 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_AUTO_TRACE(logger_);
+ LOG4CXX_INFO(logger_, "SDLGetUserFriendlyMessageRequest::Run");
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 8cc1b2d629..c849204cc3 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_AUTO_TRACE(logger_);
+ LOG4CXX_INFO(logger_, "SDLGetUserFriendlyMessageResponse::Run");
(*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 b9c5aaa086..4779e106c5 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_AUTO_TRACE(logger_);
+ LOG4CXX_INFO(logger_, "SDLPolicyUpdate::Run");
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 bc7c6e0d74..a3db3a9047 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_AUTO_TRACE(logger_);
+ LOG4CXX_INFO(logger_, "SDLPolicyUpdateResponse::Run");
// 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 dd127ec43f..638503d162 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_AUTO_TRACE(logger_);
+ LOG4CXX_INFO(logger_, "TTSChangeRegistrationRequest::Run");
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 03b51e5db7..67e48b4ed5 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_AUTO_TRACE(logger_);
+ LOG4CXX_INFO(logger_, "TTSChangeRegistratioResponse::Run");
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 fb3dedc1c0..59cf50b38d 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_AUTO_TRACE(logger_);
+ LOG4CXX_INFO(logger_, "TTSGetCapabilitiesRequest::Run");
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 53a1bd3916..f7309822d8 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_AUTO_TRACE(logger_);
+ LOG4CXX_INFO(logger_, "TTSGetCapabilitiesResponse::Run");
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 6d4e4f465a..9f2fe7134a 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_AUTO_TRACE(logger_);
+ LOG4CXX_INFO(logger_, "TTSGetLanguageRequest::Run");
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 6c2122557b..e26fa87739 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_AUTO_TRACE(logger_);
+ LOG4CXX_INFO(logger_, "TTSGetLanguageResponse::Run");
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 5251832bc1..08c1d82448 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_AUTO_TRACE(logger_);
+ LOG4CXX_INFO(logger_, "TTSGetSupportedLanguagesRequest::Run");
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 a5d022a6cb..aa041f66b3 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_AUTO_TRACE(logger_);
+ LOG4CXX_INFO(logger_, "TTSGetSupportedLanguagesResponse::Run");
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 3a50cfef90..7733de4887 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_AUTO_TRACE(logger_);
+ LOG4CXX_INFO(logger_, "TTSIsReadyRequest::Run");
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 dd8eab7534..fb3cb4858f 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_AUTO_TRACE(logger_);
+ LOG4CXX_INFO(logger_, "TTSIsReadyResponse::Run");
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 ce330c355f..04f1380d91 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_AUTO_TRACE(logger_);
+ LOG4CXX_INFO(logger_, "TTSSetGlobalPropertiesRequest::Run");
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 70dc46d6a6..c90655186f 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_AUTO_TRACE(logger_);
+ LOG4CXX_INFO(logger_, "TTSSetGlobalPropertiesResponse::Run");
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 79fbde2c4f..9b4bd68585 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_AUTO_TRACE(logger_);
+ LOG4CXX_INFO(logger_, "TTSSpeakRequest::Run");
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 ff60115e70..9b9e43dbe8 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_AUTO_TRACE(logger_);
+ LOG4CXX_INFO(logger_, "TTSSpeakResponse::Run");
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 32aaec27e7..107cb7933b 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_AUTO_TRACE(logger_);
+ LOG4CXX_INFO(logger_, "TTSStopSpeakingRequest::Run");
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 b32cf52bb5..9bd4f89660 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_AUTO_TRACE(logger_);
+ LOG4CXX_INFO(logger_, "TTSStopSpeakingResponse::Run");
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 ed9f7979a1..9aa5d2e2d3 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_AUTO_TRACE(logger_);
+ LOG4CXX_INFO(logger_, "UIAddCommandRequest::Run");
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 13b2ab1b2b..21b34e0637 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_AUTO_TRACE(logger_);
+ LOG4CXX_INFO(logger_, "UIAddCommandResponse::Run");
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 667499584f..7a9c5c6fed 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 54247dbbce..af88de2b48 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_AUTO_TRACE(logger_);
+ LOG4CXX_INFO(logger_, "UIAddSubmenuResponse::Run");
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 c706d5fdba..f8c9ed5708 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_AUTO_TRACE(logger_);
+ LOG4CXX_INFO(logger_, "UIAlertRequest::Run");
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 8c9ddef7ac..289b90d290 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_AUTO_TRACE(logger_);
+ LOG4CXX_INFO(logger_, "UIAlertResponse::Run");
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 67c9be6cb5..fbba2b4023 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_AUTO_TRACE(logger_);
+ LOG4CXX_INFO(logger_, "UIChangeRegistrationRequest::Run");
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 1d59d66d74..16447077dd 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_AUTO_TRACE(logger_);
+ LOG4CXX_INFO(logger_, "UIChangeRegistratioResponse::Run");
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 7d5532f30f..23fb4c67f5 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_AUTO_TRACE(logger_);
+ LOG4CXX_INFO(logger_, "UIDeleteCommandRequest::Run");
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 2fb94a63a3..0ac32877c4 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_AUTO_TRACE(logger_);
+ LOG4CXX_INFO(logger_, "UIDeleteCommandResponse::Run");
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 e945139639..41f356b981 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_AUTO_TRACE(logger_);
+ LOG4CXX_INFO(logger_, "UIDeleteSubmenuRequest::Run");
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 89a5a19a0b..5a3359b722 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_AUTO_TRACE(logger_);
+ LOG4CXX_INFO(logger_, "UIDeleteSubmenuResponse::Run");
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 b87e1d89b8..4c93f9235b 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_AUTO_TRACE(logger_);
+ LOG4CXX_INFO(logger_, "UIEndAudioPassThruRequest::Run");
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 8f5d92b78f..e560ae293a 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_AUTO_TRACE(logger_);
+ LOG4CXX_INFO(logger_, "UIEndAudioPassThruResponse::Run");
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 74ee67e884..b9f1b6917c 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_AUTO_TRACE(logger_);
+ LOG4CXX_INFO(logger_, "UIGetCapabilitiesRequest::Run");
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 7ebc5ffcc9..0663bf033e 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_AUTO_TRACE(logger_);
+ LOG4CXX_INFO(logger_, "UIGetCapabilitiesResponse::Run");
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 1b22a9b58f..ffca242d43 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_AUTO_TRACE(logger_);
+ LOG4CXX_INFO(logger_, "UIGetLanguageRequest::Run");
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 cba85d91e7..20435d788b 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_AUTO_TRACE(logger_);
+ LOG4CXX_INFO(logger_, "UIGetLanguageResponse::Run");
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 5cd0c09e65..455486ef6c 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_AUTO_TRACE(logger_);
+ LOG4CXX_INFO(logger_, "UIGetSupportedLanguagesRequest::Run");
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 2057f3cbb2..8492cfca5b 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_AUTO_TRACE(logger_);
+ LOG4CXX_INFO(logger_, "UIGetSupportedLanguagesResponse::Run");
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 94df3cec7d..50d0ddd95a 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_AUTO_TRACE(logger_);
+ LOG4CXX_INFO(logger_, "UIIsReadyRequest::Run");
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 9edf77080e..97d11b6022 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_AUTO_TRACE(logger_);
+ LOG4CXX_INFO(logger_, "UIIsReadyResponse::Run");
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 3cf7722b24..cf77703a9b 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_AUTO_TRACE(logger_);
+ LOG4CXX_INFO(logger_, "UIPerformAudioPassThruRequest::Run");
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 c8a488e44d..36d4c507b5 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_AUTO_TRACE(logger_);
+ LOG4CXX_INFO(logger_, "UIPerformAudioPassThruResponse::Run");
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 2b1f5ce484..09f98ec036 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_AUTO_TRACE(logger_);
+ LOG4CXX_INFO(logger_, "UIPerformInteractionRequest::Run");
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 25237525da..2f5f6ead57 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_AUTO_TRACE(logger_);
+ LOG4CXX_INFO(logger_, "UIPerformInteractionResponse::Run");
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 911c840ce4..ac34dd236f 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_AUTO_TRACE(logger_);
+ LOG4CXX_INFO(logger_, "UIScrollableMessageRequest::Run");
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 58c793c3b6..182d512c8c 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_AUTO_TRACE(logger_);
+ LOG4CXX_INFO(logger_, "UIScrollableMessageResponse::Run");
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_display_layout_request.cc b/src/components/application_manager/src/commands/hmi/ui_set_display_layout_request.cc
index df9f6cf2a6..3dea853486 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_AUTO_TRACE(logger_);
+ LOG4CXX_INFO(logger_, "UiSetDisplayLayoutRequest::Run");
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 f23cc92642..f381a4db28 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_AUTO_TRACE(logger_);
+ LOG4CXX_INFO(logger_, "UiSetDisplayLayoutResponse::Run");
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 39a0e865df..e538866c1b 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_AUTO_TRACE(logger_);
+ LOG4CXX_INFO(logger_, "UISetGlobalPropertiesRequest::Run");
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 23173961fb..67023533c9 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_AUTO_TRACE(logger_);
+ LOG4CXX_INFO(logger_, "UISetGlobalPropertiesResponse::Run");
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_icon_request.cc b/src/components/application_manager/src/commands/hmi/ui_set_icon_request.cc
index 6cb4af4d47..b587a3028e 100644
--- a/src/components/application_manager/src/commands/hmi/ui_set_icon_request.cc
+++ b/src/components/application_manager/src/commands/hmi/ui_set_icon_request.cc
@@ -1,4 +1,4 @@
-/*
+/**
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
@@ -44,7 +44,7 @@ UISetIconRequest::~UISetIconRequest() {
}
void UISetIconRequest::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
+ LOG4CXX_INFO(logger_, "UISetIconRequest::Run");
SendRequest();
}
diff --git a/src/components/application_manager/src/commands/hmi/ui_set_icon_response.cc b/src/components/application_manager/src/commands/hmi/ui_set_icon_response.cc
index 44a40965a6..f4565baaf1 100644
--- a/src/components/application_manager/src/commands/hmi/ui_set_icon_response.cc
+++ b/src/components/application_manager/src/commands/hmi/ui_set_icon_response.cc
@@ -1,4 +1,4 @@
-/*
+/**
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
@@ -45,7 +45,7 @@ UISetIconResponse::~UISetIconResponse() {
}
void UISetIconResponse::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
+ LOG4CXX_INFO(logger_, "UISetIconResponse::Run");
event_engine::Event event(hmi_apis::FunctionID::UI_SetAppIcon);
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 272ff561aa..1eb218013b 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_AUTO_TRACE(logger_);
+ LOG4CXX_INFO(logger_, "UISetMediaClockTimerRequest::Run");
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 ae878bd694..ee67862a1a 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_AUTO_TRACE(logger_);
+ LOG4CXX_INFO(logger_, "UISetMediaClockTimerResponse::Run");
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 65b9894902..841c8a62fa 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_AUTO_TRACE(logger_);
+ LOG4CXX_INFO(logger_, "UIShowRequest::Run");
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 8d348e6086..c95cbbd2ba 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_AUTO_TRACE(logger_);
+ LOG4CXX_INFO(logger_, "UIShowResponse::Run");
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 c8d3242d98..fc7203c0ea 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_AUTO_TRACE(logger_);
+ LOG4CXX_INFO(logger_, "UISliderRequest::Run");
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 7837117ebd..8d2522e224 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_AUTO_TRACE(logger_);
+ LOG4CXX_INFO(logger_, "UISliderResponse::Run");
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 72f65d1a2e..955f4b19c6 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_AUTO_TRACE(logger_);
+ LOG4CXX_INFO(logger_, "UpdateAppListRequest::Run");
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 308bce3ad2..d5db0b4ea8 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_AUTO_TRACE(logger_);
+ LOG4CXX_INFO(logger_, "UpdateAppListResponse::Run");
// 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 696e2f85c4..1f632378b4 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_AUTO_TRACE(logger_);
+ LOG4CXX_INFO(logger_, "UpdateDeviceListRequest::Run");
sync_primitives::AutoLock auto_lock(wait_hmi_lock);
// Fix problem with SDL and HMI HTML. This problem is not actual for HMI PASA.
- // Flag conditional compilation for specific customer is used in order to exclude
+ // Flag conditional compilation "CUSTOMER_PASA" is used in order to exclude
// hit code to RTC
if (true == profile::Profile::instance()->launch_hmi()) {
if (!ApplicationManagerImpl::instance()->IsHMICooperating()) {
- LOG4CXX_INFO(logger_, "Wait for HMI Cooperation");
+ LOG4CXX_INFO(logger_, "MY Wait for HMI Cooperation");
subscribe_on_event(hmi_apis::FunctionID::BasicCommunication_OnReady);
termination_condition_.Wait(auto_lock);
- LOG4CXX_DEBUG(logger_, "HMI Cooperation OK");
+ LOG4CXX_INFO(logger_, "MY HMI Cooperation OK");
}
}
@@ -68,7 +68,7 @@ void UpdateDeviceListRequest::Run() {
}
void UpdateDeviceListRequest::on_event(const event_engine::Event& event) {
- LOG4CXX_AUTO_TRACE(logger_);
+ LOG4CXX_INFO(logger_, "UpdateDeviceListRequest::on_event");
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 b3e0f9a309..85ef57404c 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_AUTO_TRACE(logger_);
+ LOG4CXX_INFO(logger_, "UpdateDeviceListResponse::Run");
// 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 b03e595e9c..7d47f84ce3 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_AUTO_TRACE(logger_);
+ LOG4CXX_INFO(logger_, "UpdateSDLRequest::Run");
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 d9c8b6102f..d2be2c655c 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_AUTO_TRACE(logger_);
+ LOG4CXX_INFO(logger_, "UpdateSDLResponse::Run");
(*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 eb9a9841be..45d44e4475 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_AUTO_TRACE(logger_);
+ LOG4CXX_INFO(logger_, "VIDiagnosticMessageRequest::Run");
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 4183395e99..d83869b279 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_AUTO_TRACE(logger_);
+ LOG4CXX_INFO(logger_, "VIDiagnosticMessageResponse::Run");
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 a89252ada2..5289816fb5 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_AUTO_TRACE(logger_);
+ LOG4CXX_INFO(logger_, "VIGetDTCsRequest::Run");
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 c44f5213d2..0cacc51d6c 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_AUTO_TRACE(logger_);
+ LOG4CXX_INFO(logger_, "VIGetDTCsResponse::Run");
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 37d5ede4b0..40b2ca9fed 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_AUTO_TRACE(logger_);
+ LOG4CXX_INFO(logger_, "VIGetVehicleDataRequest::Run");
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 574d552018..73444a19bd 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.
*
@@ -47,7 +47,7 @@ VIGetVehicleDataResponse::~VIGetVehicleDataResponse() {
}
void VIGetVehicleDataResponse::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
+ LOG4CXX_INFO(logger_, "VIGetVehicleDataResponse::Run");
smart_objects::SmartObject* result_so = new smart_objects::SmartObject(
smart_objects::SmartType_Map);
if (!result_so) {
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 11dd26dfad..4c46de950e 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_AUTO_TRACE(logger_);
+ LOG4CXX_INFO(logger_, "VIGetVehicleTypeRequest::Run");
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 2b5f6b96be..18c0136d12 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_AUTO_TRACE(logger_);
+ LOG4CXX_INFO(logger_, "VIGetVehicleTypeResponse::Run");
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 aae05e0fcc..074d6f6022 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_AUTO_TRACE(logger_);
+ LOG4CXX_INFO(logger_, "VIIsReadyRequest::Run");
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 4a79a6d9b9..e7c9c180c2 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_AUTO_TRACE(logger_);
+ LOG4CXX_INFO(logger_, "VIIsReadyResponse::Run");
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 92a105dde4..1485b471c4 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_AUTO_TRACE(logger_);
+ LOG4CXX_INFO(logger_, "VIReadDIDRequest::Run");
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 675b944272..ddd9f3c540 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_AUTO_TRACE(logger_);
+ LOG4CXX_INFO(logger_, "VIReadDIDResponse::Run");
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 5ad4daea94..38950a2a2b 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_AUTO_TRACE(logger_);
+ LOG4CXX_INFO(logger_, "VISubscribeVehicleDataRequest::Run");
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 91d9c85382..bd67294fbb 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_AUTO_TRACE(logger_);
+ LOG4CXX_INFO(logger_, "VISubscribeVehicleDataResponse::Run");
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 7c12cbe6f1..0af87c2a2e 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_AUTO_TRACE(logger_);
+ LOG4CXX_INFO(logger_, "VIUnsubscribeVehicleDataRequest::Run");
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 124b7dacbd..22231b4a61 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_AUTO_TRACE(logger_);
+ LOG4CXX_INFO(logger_, "VIUnsubscribeVehicleDataResponse::Run");
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 c900df1678..a74ece95da 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_AUTO_TRACE(logger_);
+ LOG4CXX_INFO(logger_, "VRAddCommandRequest::Run");
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 3d34b5c65a..513ccdace2 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_AUTO_TRACE(logger_);
+ LOG4CXX_INFO(logger_, "VRAddCommandResponse::Run");
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 fe8ee69021..bd7c1e7841 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_AUTO_TRACE(logger_);
+ LOG4CXX_INFO(logger_, "VRChangeRegistrationRequest::Run");
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 5bd2fb853a..92a36d23f6 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 e3052ae208..0241be6308 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_AUTO_TRACE(logger_);
+ LOG4CXX_INFO(logger_, "VRDeleteCommandRequest::Run");
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 8954b1d1b9..c5a13126b0 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_AUTO_TRACE(logger_);
+ LOG4CXX_INFO(logger_, "VRDeleteCommandResponse::Run");
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 58d0a4b3e4..8b1d4ae0b4 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_AUTO_TRACE(logger_);
+ LOG4CXX_INFO(logger_, "VRGetCapabilitiesRequest::Run");
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 5ca1d86190..de6fdd7a93 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_AUTO_TRACE(logger_);
+ LOG4CXX_INFO(logger_, "VRGetCapabilitiesResponse::Run");
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 0b98979418..9f4aeb9797 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_AUTO_TRACE(logger_);
+ LOG4CXX_INFO(logger_, "VRGetLanguageRequest::Run");
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 62127bdf9b..acbd24fbbf 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_AUTO_TRACE(logger_);
+ LOG4CXX_INFO(logger_, "VRGetLanguageResponse::Run");
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 aea97da02d..e43d88430d 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_AUTO_TRACE(logger_);
+ LOG4CXX_INFO(logger_, "VRGetSupportedLanguagesRequest::Run");
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 b1ea89a460..d2cc148a09 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_AUTO_TRACE(logger_);
+ LOG4CXX_INFO(logger_, "VRGetSupportedLanguagesResponse::Run");
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 a5a3a2b62e..944cfcbb3c 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_AUTO_TRACE(logger_);
+ LOG4CXX_INFO(logger_, "VRIsReadyRequest::Run");
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 a0de7ae33a..8cf5e66ee7 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_AUTO_TRACE(logger_);
+ LOG4CXX_INFO(logger_, "VRIsReadyResponse::Run");
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 1791bab57a..6de32dc5b5 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_AUTO_TRACE(logger_);
+ LOG4CXX_INFO(logger_, "VRPerformInteractionRequest::Run");
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 8fc22ce872..fea09b9f29 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_AUTO_TRACE(logger_);
+ LOG4CXX_INFO(logger_, "VRPerformInteractionResponse::Run");
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 d68eb20848..35cc619895 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_AUTO_TRACE(logger_);
+ LOG4CXX_INFO(logger_, "AddCommandRequest::onTimeOut");
RemoveCommand();
CommandRequestImpl::onTimeOut();
}
void AddCommandRequest::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
+ LOG4CXX_INFO(logger_, "AddCommandRequest::Run");
ApplicationSharedPtr app = ApplicationManagerImpl::instance()->application(
(*message_)[strings::params][strings::connection_key].asUInt());
@@ -198,8 +198,7 @@ bool AddCommandRequest::CheckCommandName(ApplicationConstSharedPtr app) {
return false;
}
- const DataAccessor<CommandsMap> accessor = app->commands_map();
- const CommandsMap& commands = accessor.GetData();
+ const CommandsMap& commands = app->commands_map();
CommandsMap::const_iterator i = commands.begin();
uint32_t saved_parent_id = 0;
uint32_t parent_id = 0;
@@ -236,8 +235,7 @@ bool AddCommandRequest::CheckCommandVRSynonym(ApplicationConstSharedPtr app) {
return false;
}
- const DataAccessor<CommandsMap> accessor = app->commands_map();
- const CommandsMap& commands = accessor.GetData();
+ const CommandsMap& commands = app->commands_map();
CommandsMap::const_iterator it = commands.begin();
for (; commands.end() != it; ++it) {
@@ -286,7 +284,7 @@ bool AddCommandRequest::CheckCommandParentId(ApplicationConstSharedPtr app) {
}
void AddCommandRequest::on_event(const event_engine::Event& event) {
- LOG4CXX_AUTO_TRACE(logger_);
+ LOG4CXX_INFO(logger_, "AddCommandRequest::on_event");
const smart_objects::SmartObject& message = event.smart_object();
@@ -362,7 +360,7 @@ bool AddCommandRequest::IsPendingResponseExist() {
}
bool AddCommandRequest::IsWhiteSpaceExist() {
- LOG4CXX_AUTO_TRACE(logger_);
+ LOG4CXX_INFO(logger_, "AddCommandRequest::IsWhiteSpaceExist");
const char* str = NULL;
if ((*message_)[strings::msg_params].keyExists(strings::menu_params)) {
@@ -400,7 +398,7 @@ bool AddCommandRequest::IsWhiteSpaceExist() {
}
void AddCommandRequest::RemoveCommand() {
- LOG4CXX_AUTO_TRACE(logger_);
+ LOG4CXX_INFO(logger_, "AddCommandRequest::RemoveCommand");
ApplicationSharedPtr app = ApplicationManagerImpl::instance()->application(
connection_key());
if (!app.valid()) {
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 51684c065b..0c135af076 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_AUTO_TRACE(logger_);
+ LOG4CXX_INFO(logger_, "AddCommandResponse::Run");
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 7e0e6aeca4..ce6fa3fc51 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_AUTO_TRACE(logger_);
+ LOG4CXX_INFO(logger_, "AddSubMenuRequest::Run");
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_AUTO_TRACE(logger_);
+ LOG4CXX_INFO(logger_, "AddSubMenuRequest::on_event");
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 ff37a6a998..bcd7df2888 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_AUTO_TRACE(logger_);
+ LOG4CXX_INFO(logger_, "AddSubMenuResponse::Run");
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 77d2211157..abb5bc7f3c 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_AUTO_TRACE(logger_);
+ LOG4CXX_INFO(logger_, "AlertManeuverRequest::Run");
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_AUTO_TRACE(logger_);
+ LOG4CXX_INFO(logger_, "AlertManeuverRequest::on_event");
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_AUTO_TRACE(logger_);
+ LOG4CXX_INFO(logger_, "AlertManeuverRequest::IsWhiteSpaceExist");
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 8f9c73267f..99fcde69a8 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_AUTO_TRACE(logger_);
+ LOG4CXX_INFO(logger_, "AlertManeuverResponse::Run");
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 aef393da41..c08b7c32d7 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_AUTO_TRACE(logger_);
+ LOG4CXX_INFO(logger_, "AlertRequest::Run");
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_AUTO_TRACE(logger_);
+ LOG4CXX_INFO(logger_, "AlertRequest::on_event");
const smart_objects::SmartObject& message = event.smart_object();
switch (event.id()) {
@@ -206,9 +206,7 @@ void AlertRequest::on_event(const event_engine::Event& event) {
response_success_ = true;
}
- if (
- ((mobile_apis::Result::ABORTED == tts_speak_response_ )||
- (mobile_apis::Result::REJECTED == tts_speak_response_)) &&
+ if (mobile_apis::Result::ABORTED == tts_speak_response_ &&
(!flag_other_component_sent_)) {
response_success_ = false;
response_result_ = tts_speak_response_;
@@ -350,7 +348,7 @@ void AlertRequest::SendSpeakRequest(int32_t app_id) {
}
void AlertRequest::SendPlayToneNotification(int32_t app_id) {
- LOG4CXX_AUTO_TRACE(logger_);
+ LOG4CXX_INFO(logger_, "AlertRequest::SendPlayToneNotification");
// check playtone parameter
if ((*message_)[strings::msg_params].keyExists(strings::play_tone)) {
@@ -358,7 +356,7 @@ void AlertRequest::SendPlayToneNotification(int32_t app_id) {
// crate HMI basic communication playtone request
smart_objects::SmartObject msg_params = smart_objects::SmartObject(
smart_objects::SmartType_Map);
- msg_params[strings::app_id] = app_id;
+
CreateHMINotification(hmi_apis::FunctionID::BasicCommunication_PlayTone,
msg_params);
}
@@ -366,7 +364,7 @@ void AlertRequest::SendPlayToneNotification(int32_t app_id) {
}
bool AlertRequest::CheckStringsOfAlertRequest() {
- LOG4CXX_AUTO_TRACE(logger_);
+ LOG4CXX_INFO(logger_, "AlertRequest::CheckStringsOfAlertRequest");
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 dac086a8b1..5b8cd6557b 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_AUTO_TRACE(logger_);
+ LOG4CXX_INFO(logger_, "AlertResponse::Run");
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 bf82f6c1b3..9780aad7bb 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_AUTO_TRACE(logger_);
+ LOG4CXX_INFO(logger_, "ChangeRegistrationRequest::Run");
ApplicationManagerImpl* instance = ApplicationManagerImpl::instance();
const HMICapabilities& hmi_capabilities = instance->hmi_capabilities();
@@ -166,19 +166,19 @@ void ChangeRegistrationRequest::Run() {
&tts_params, true);
}
-bool ChangeRegistrationRequest::AllHmiResponsesSuccess(
+bool ChangeRegistrationRequest::WasAnySuccess(
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_AUTO_TRACE(logger_);
+ LOG4CXX_INFO(logger_, "ChangeRegistrationRequest::on_event");
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(AllHmiResponsesSuccess(ui_result_, vr_result_, tts_result_),
+ SendResponse(WasAnySuccess(ui_result_, vr_result_, tts_result_),
static_cast<mobile_apis::Result::eType>(greates_result_code),
NULL, &(message[strings::msg_params]));
} else {
@@ -374,7 +374,7 @@ bool ChangeRegistrationRequest::IsWhiteSpaceExist() {
}
mobile_apis::Result::eType ChangeRegistrationRequest::CheckCoincidence() {
- LOG4CXX_AUTO_TRACE(logger_);
+ LOG4CXX_INFO(logger_, "ChangeRegistrationRequest::CheckCoincidence");
const smart_objects::SmartObject& msg_params =
(*message_)[strings::msg_params];
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 557614f173..13c926ec82 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_AUTO_TRACE(logger_);
+ LOG4CXX_INFO(logger_, "ChangeRegistrationResponse::Run");
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 ceef586e33..583f0a0460 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_AUTO_TRACE(logger_);
+ LOG4CXX_INFO(logger_, "CreateInteractionChoiceSetRequest::Run");
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_AUTO_TRACE(logger_);
+ LOG4CXX_INFO(logger_, "CreateInteractionChoiceSetRequest::CheckChoiceSet");
const smart_objects::SmartArray* new_choice_set_array =
(*message_)[strings::msg_params][strings::choice_set].asArray();
@@ -141,8 +141,7 @@ mobile_apis::Result::eType CreateInteractionChoiceSetRequest::CheckChoiceSet(
}
// Check new choice set params along with already registered choice sets
- const DataAccessor<ChoiceSetMap> accessor = app->choice_set_map();
- const ChoiceSetMap& app_choice_set_map = accessor.GetData();
+ const ChoiceSetMap& app_choice_set_map = app->choice_set_map();
ChoiceSetMap::const_iterator it = app_choice_set_map.begin();
ChoiceSetMap::const_iterator itEnd = app_choice_set_map.end();
for (; it != itEnd; ++it) {
@@ -258,7 +257,7 @@ bool CreateInteractionChoiceSetRequest::compareStr(
bool CreateInteractionChoiceSetRequest::IsWhiteSpaceExist(
const smart_objects::SmartObject& choice_set) {
- LOG4CXX_AUTO_TRACE(logger_);
+ LOG4CXX_INFO(logger_, "CreateInteractionChoiceSetRequest::IsWhiteSpaceExist");
const char* str = NULL;
str = choice_set[strings::menu_name].asCharArray();
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 bc81206088..8d6ea1b348 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_AUTO_TRACE(logger_);
+ LOG4CXX_INFO(logger_, "CreateInteractionChoiceSetResponse::Run");
// 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 e76422d50e..3c3ee88203 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_AUTO_TRACE(logger_);
+ LOG4CXX_INFO(logger_, "DeleteCommandRequest::Run");
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_AUTO_TRACE(logger_);
+ LOG4CXX_INFO(logger_, "DeleteCommandRequest::on_event");
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 75178bcb4d..812e587430 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_AUTO_TRACE(logger_);
+ LOG4CXX_INFO(logger_, "DeleteCommandResponse::Run");
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 4c753871ce..ca5a4395fc 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_AUTO_TRACE(logger_);
+ LOG4CXX_INFO(logger_, "DeleteFileRequest::Run");
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 1bbb18313f..81470ccf6b 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_AUTO_TRACE(logger_);
+ LOG4CXX_INFO(logger_, "DeleteFileResponse::Run");
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 6c61bfd2a2..1fcd4b33d8 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_AUTO_TRACE(logger_);
+ LOG4CXX_INFO(logger_, "DeleteInteractionChoiceSetRequest::Run");
ApplicationSharedPtr app = ApplicationManagerImpl::instance()->application(
(*message_)[strings::params][strings::connection_key].asUInt());
@@ -94,9 +94,8 @@ void DeleteInteractionChoiceSetRequest::Run() {
bool DeleteInteractionChoiceSetRequest::ChoiceSetInUse(ApplicationConstSharedPtr app) {
if (app->is_perform_interaction_active()) {
// retrieve stored choice sets for perform interaction
- const DataAccessor<PerformChoiceSetMap> accessor =
- app->performinteraction_choice_set_map();
- const PerformChoiceSetMap& choice_set_map = accessor.GetData();
+ const PerformChoiceSetMap& choice_set_map = app
+ ->performinteraction_choice_set_map();
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 f9ee513b94..d260add7cc 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_AUTO_TRACE(logger_);
+ LOG4CXX_INFO(logger_, "DeleteInteractionChoiceSetResponse::Run");
// 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 48d98114cb..d91e742687 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_AUTO_TRACE(logger_);
+ LOG4CXX_INFO(logger_, "DeleteSubMenuRequest::Run");
ApplicationSharedPtr app = ApplicationManagerImpl::instance()->application(
(*message_)[strings::params][strings::connection_key].asUInt());
@@ -77,10 +77,9 @@ void DeleteSubMenuRequest::Run() {
}
void DeleteSubMenuRequest::DeleteSubMenuVRCommands(ApplicationConstSharedPtr app) {
- LOG4CXX_AUTO_TRACE(logger_);
+ LOG4CXX_INFO(logger_, "DeleteSubMenuRequest::DeleteSubMenuVRCommands");
- const DataAccessor<CommandsMap> accessor = app->commands_map();
- const CommandsMap& commands = accessor.GetData();
+ const CommandsMap& commands = app->commands_map();
CommandsMap::const_iterator it = commands.begin();
for (; commands.end() != it; ++it) {
@@ -105,10 +104,9 @@ void DeleteSubMenuRequest::DeleteSubMenuVRCommands(ApplicationConstSharedPtr app
}
void DeleteSubMenuRequest::DeleteSubMenuUICommands(ApplicationSharedPtr const app) {
- LOG4CXX_AUTO_TRACE(logger_);
+ LOG4CXX_INFO(logger_, "DeleteSubMenuRequest::DeleteSubMenuUICommands");
- const DataAccessor<CommandsMap> accessor = app->commands_map();
- const CommandsMap& commands = accessor.GetData();
+ const CommandsMap& commands = app->commands_map();
CommandsMap::const_iterator it = commands.begin();
while (commands.end() != it) {
@@ -138,7 +136,7 @@ void DeleteSubMenuRequest::DeleteSubMenuUICommands(ApplicationSharedPtr const ap
}
void DeleteSubMenuRequest::on_event(const event_engine::Event& event) {
- LOG4CXX_AUTO_TRACE(logger_);
+ LOG4CXX_INFO(logger_, "DeleteSubMenuRequest::on_event");
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 05795e5908..0a25a11610 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_AUTO_TRACE(logger_);
+ LOG4CXX_INFO(logger_, "DeleteSubMenuResponse::Run");
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 7b5cf5fd9a..75016c05fb 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_AUTO_TRACE(logger_);
+ LOG4CXX_INFO(logger_, "DiagnosticMessageRequest::Run");
ApplicationSharedPtr app = ApplicationManagerImpl::instance()->application(
connection_key());
@@ -68,7 +68,7 @@ void DiagnosticMessageRequest::Run() {
}
void DiagnosticMessageRequest::on_event(const event_engine::Event& event) {
- LOG4CXX_AUTO_TRACE(logger_);
+ LOG4CXX_INFO(logger_, "DiagnosticMessageRequest::on_event");
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 9c399a00c8..2a8b234fff 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_AUTO_TRACE(logger_);
+ LOG4CXX_INFO(logger_, "DiagnosticMessageResponse::Run");
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 749b19a520..140f43128d 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_AUTO_TRACE(logger_);
+ LOG4CXX_INFO(logger_, "DialNumberRequest::Run");
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 78a867a6d8..eedc9f813e 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_AUTO_TRACE(logger_);
+ LOG4CXX_INFO(logger_, "EndAudioPassThruRequest::Run");
SendHMIRequest(hmi_apis::FunctionID::UI_EndAudioPassThru, NULL, true);
}
void EndAudioPassThruRequest::on_event(const event_engine::Event& event) {
- LOG4CXX_AUTO_TRACE(logger_);
+ LOG4CXX_INFO(logger_, "EndAudioPassThruRequest::on_event");
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 0ac1a00bd4..128d921f9f 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_AUTO_TRACE(logger_);
+ LOG4CXX_INFO(logger_, "EndAudioPassThruResponse::Run");
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 8e2a0222f7..9a81f94db1 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_AUTO_TRACE(logger_);
+ LOG4CXX_INFO(logger_, "GetDTCsRequest::Run");
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_AUTO_TRACE(logger_);
+ LOG4CXX_INFO(logger_, "GetDTCsRequest::on_event");
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 523711c975..2ed7a92952 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_AUTO_TRACE(logger_);
+ LOG4CXX_INFO(logger_, "GetDTCsResponse::Run");
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 546b14853c..a3d08a15ff 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_AUTO_TRACE(logger_);
+ LOG4CXX_INFO(logger_, "GetVehicleDataRequest::Run");
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_AUTO_TRACE(logger_);
+ LOG4CXX_INFO(logger_, "GetVehicleDataRequest::Run");
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_AUTO_TRACE(logger_);
+ LOG4CXX_INFO(logger_, "GetVehicleDataRequest::on_event");
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 5491e9b1aa..d9087fdc61 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_AUTO_TRACE(logger_);
+ LOG4CXX_INFO(logger_, "GetVehicleDataResponse::Run");
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 427443e3e9..d0fa71d466 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_AUTO_TRACE(logger_);
+ LOG4CXX_INFO(logger_, "ListFilesRequest::Run");
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 42bd1e6f07..6ffbec1ac4 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_AUTO_TRACE(logger_);
+ LOG4CXX_INFO(logger_, "ListFilesResponse::Run");
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 e3e51faa6e..ebd0d6aac1 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_AUTO_TRACE(logger_);
+ LOG4CXX_INFO(logger_, "OnAppInterfaceUnregisteredNotification::Run");
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 d1329bf8ea..2515f591b1 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_AUTO_TRACE(logger_);
+ LOG4CXX_INFO(logger_, "OnAudioPassThruNotification::Run");
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 fbc3bcf29e..55b9b8818d 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_AUTO_TRACE(logger_);
+ LOG4CXX_INFO(logger_, "OnButtonEventNotification::Run");
const uint32_t btn_id =
static_cast<uint32_t>(
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 d7139c1b90..cfafc7af1c 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_AUTO_TRACE(logger_);
+ LOG4CXX_INFO(logger_, "OnButtonPressNotification::Run");
const uint32_t btn_id =
static_cast<uint32_t>(
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 9bba1851f6..8342d05a45 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_AUTO_TRACE(logger_);
+ LOG4CXX_INFO(logger_, "OnCommandNotification::Run");
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 e9145520f4..fc92c17e94 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_AUTO_TRACE(logger_);
+ LOG4CXX_INFO(logger_, "OnDriverDistractionNotification::Run");
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 66d50f4871..b9ee1339bb 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
@@ -54,7 +54,7 @@ OnHashChangeNotification::~OnHashChangeNotification() {
}
void OnHashChangeNotification::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
+ LOG4CXX_INFO(logger_, "OnHashChangeNotification::Run");
(*message_)[strings::params][strings::message_type] =
static_cast<int32_t>(application_manager::MessageType::kNotification);
@@ -62,15 +62,10 @@ void OnHashChangeNotification::Run() {
int32_t app_id;
app_id = (*message_)[strings::params][strings::connection_key].asInt();
ApplicationSharedPtr app = ApplicationManagerImpl::instance()->application(app_id);
- if (app) {
- std::stringstream stream;
- stream << app->curHash();
- (*message_)[strings::msg_params][strings::hash_id] = stream.str();
- SendNotification();
- } else {
- LOG4CXX_WARN(logger_, "Application with app_id " << app_id << " does not exist");
- }
-
+ std::stringstream stream;
+ stream << app->curHash();
+ (*message_)[strings::msg_params][strings::hash_id] = stream.str();
+ SendNotification();
}
} //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 9595310061..9c03c0f623 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,7 +49,7 @@ OnHMIStatusNotification::~OnHMIStatusNotification() {
}
void OnHMIStatusNotification::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
+ LOG4CXX_INFO(logger_, "OnHMIStatusNotification::Run");
(*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_keyboard_input_notification.cc b/src/components/application_manager/src/commands/mobile/on_keyboard_input_notification.cc
index b8c6d6f114..969885ab16 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_AUTO_TRACE(logger_);
+ LOG4CXX_INFO(logger_, "OnKeyBoardInputNotification::Run");
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 43b1b5b921..f550df8748 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_AUTO_TRACE(logger_);
+ LOG4CXX_INFO(logger_, "OnLanguageChangeNotification::Run");
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 62ea1af1fc..37c81085eb 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_AUTO_TRACE(logger_);
+ LOG4CXX_INFO(logger_, "OnPermissionsChangeNotification::Run");
(*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 7e5c381bef..ebf98cd7e8 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_AUTO_TRACE(logger_);
+ LOG4CXX_INFO(logger_, "OnSystemRequestNotification::Run");
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 99a5d665db..05494c6144 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_AUTO_TRACE(logger_);
+ LOG4CXX_INFO(logger_, "OnTBTClientStateNotification::Run");
(*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 6db54289eb..250faa8f38 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_AUTO_TRACE(logger_);
+ LOG4CXX_INFO(logger_, "OnTouchEventNotification::Run");
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 044bb16b40..420c42f30c 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_AUTO_TRACE(logger_);
+ LOG4CXX_INFO(logger_, "OnVehicleDataNotification::Run");
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 8ef6cfd6ee..a730995f5d 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_AUTO_TRACE(logger_);
+ LOG4CXX_INFO(logger_, "PerformAudioPassThruRequest::onTimeOut");
if (ApplicationManagerImpl::instance()->end_audio_pass_thru()) {
ApplicationManagerImpl::instance()->StopAudioPassThru(connection_key());
@@ -73,7 +73,7 @@ bool PerformAudioPassThruRequest::Init() {
}
void PerformAudioPassThruRequest::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
+ LOG4CXX_INFO(logger_, "PerformAudioPassThruRequest::Run");
ApplicationSharedPtr app =
ApplicationManagerImpl::instance()->application(connection_key());
@@ -111,7 +111,7 @@ void PerformAudioPassThruRequest::Run() {
}
void PerformAudioPassThruRequest::on_event(const event_engine::Event& event) {
- LOG4CXX_AUTO_TRACE(logger_);
+ LOG4CXX_INFO(logger_, "PerformAudioPassThruRequest::on_event");
const smart_objects::SmartObject& message = event.smart_object();
switch (event.id()) {
@@ -260,7 +260,7 @@ void PerformAudioPassThruRequest::StartMicrophoneRecording() {
}
bool PerformAudioPassThruRequest::IsWhiteSpaceExist() {
- LOG4CXX_AUTO_TRACE(logger_);
+ LOG4CXX_INFO(logger_, "PerformAudioPassThruRequest::IsWhiteSpaceExist");
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 585383889d..a10eaac9f3 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_AUTO_TRACE(logger_);
+ LOG4CXX_INFO(logger_, "PerformAudioPassThruResponse::Run");
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 c7e9886ce5..12514626a6 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
@@ -64,7 +64,7 @@ PerformInteractionRequest::~PerformInteractionRequest() {
}
void PerformInteractionRequest::onTimer() {
- LOG4CXX_AUTO_TRACE(logger_);
+ LOG4CXX_INFO(logger_, "PerformInteractionRequest::onTimer");
}
bool PerformInteractionRequest::Init() {
@@ -87,7 +87,7 @@ bool PerformInteractionRequest::Init() {
}
void PerformInteractionRequest::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
+ LOG4CXX_INFO(logger_, "PerformInteractionRequest::Run");
ApplicationSharedPtr app =
ApplicationManagerImpl::instance()->application(connection_key());
@@ -243,7 +243,7 @@ void PerformInteractionRequest::Run() {
}
void PerformInteractionRequest::on_event(const event_engine::Event& event) {
- LOG4CXX_AUTO_TRACE(logger_);
+ LOG4CXX_INFO(logger_, "PerformInteractionRequest::on_event");
switch (event.id()) {
case hmi_apis::FunctionID::UI_OnResetTimeout: {
@@ -271,7 +271,7 @@ void PerformInteractionRequest::on_event(const event_engine::Event& event) {
}
void PerformInteractionRequest::onTimeOut() {
- LOG4CXX_AUTO_TRACE(logger_);
+ LOG4CXX_INFO(logger_, "PerformInteractionRequest::onTimeOut");
switch (interaction_mode_) {
case mobile_apis::InteractionMode::BOTH: {
@@ -308,7 +308,7 @@ void PerformInteractionRequest::onTimeOut() {
void PerformInteractionRequest::ProcessVRResponse(
const smart_objects::SmartObject& message) {
- LOG4CXX_AUTO_TRACE(logger_);
+ LOG4CXX_INFO(logger_, "PerformInteractionRequest::ProcessVRResponse");
const uint32_t app_id = connection_key();
ApplicationSharedPtr app = ApplicationManagerImpl::instance()->application(app_id);
if (!app.get()) {
@@ -336,14 +336,6 @@ void PerformInteractionRequest::ProcessVRResponse(
}
}
- if (mobile_apis::Result::SUCCESS == vr_perform_interaction_code_ &&
- mobile_apis::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;
- }
-
smart_objects::SmartObject msg_params =
smart_objects::SmartObject(smart_objects::SmartType_Map);
smart_objects::SmartObject* ptr_msg_params = NULL;
@@ -380,7 +372,8 @@ void PerformInteractionRequest::ProcessVRResponse(
void PerformInteractionRequest::ProcessPerformInteractionResponse(
const smart_objects::SmartObject& message) {
- LOG4CXX_AUTO_TRACE(logger_);
+ LOG4CXX_INFO(logger_,
+ "PerformInteractionRequest::ProcessPerformInteractionResponse");
const uint32_t app_id = connection_key();
ApplicationSharedPtr app = ApplicationManagerImpl::instance()->application(app_id);
if (!app.get()) {
@@ -572,7 +565,6 @@ 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;
@@ -760,7 +752,7 @@ void PerformInteractionRequest::DisablePerformInteraction() {
}
bool PerformInteractionRequest::IsWhiteSpaceExist() {
- LOG4CXX_AUTO_TRACE(logger_);
+ LOG4CXX_INFO(logger_, "PerformInteractionRequest::IsWhiteSpaceExist");
const char* str = NULL;
str = (*message_)[strings::msg_params][strings::initial_text].asCharArray();
@@ -855,10 +847,9 @@ void PerformInteractionRequest::TerminatePerformInteraction() {
bool PerformInteractionRequest::CheckChoiceIDFromResponse(
ApplicationSharedPtr app, int32_t choice_id) {
- LOG4CXX_AUTO_TRACE(logger_);
- const DataAccessor<PerformChoiceSetMap> accessor =
- app->performinteraction_choice_set_map();
- const PerformChoiceSetMap& choice_set_map = accessor.GetData();
+ LOG4CXX_INFO(logger_, "PerformInteractionRequest::CheckChoiceIDFromResponse");
+ const PerformChoiceSetMap& choice_set_map = app
+ ->performinteraction_choice_set_map();
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 59d706926d..4ceb4ce3b3 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_AUTO_TRACE(logger_);
+ LOG4CXX_INFO(logger_, "PerformInteractionResponse::Run");
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 89dd8d456d..1da7e08e47 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_AUTO_TRACE(logger_);
+ LOG4CXX_INFO(logger_, "PutFileRequest::Run");
ApplicationSharedPtr application =
ApplicationManagerImpl::instance()->application(connection_key());
@@ -224,7 +224,7 @@ void PutFileRequest::Run() {
break;
}
default:
- LOG4CXX_WARN(logger_, "Save in unsuccessful. Result = " << save_result);
+ LOG4CXX_INFO(logger_, "Save in unsuccessful. Result = " << save_result);
SendResponse(false, save_result, "Can't save file", &response_params);
break;
}
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 52598fda16..4ab950d7a8 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_AUTO_TRACE(logger_);
+ LOG4CXX_INFO(logger_, "PutFileResponse::Run");
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 5a066aab4d..1de080df4c 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_AUTO_TRACE(logger_);
+ LOG4CXX_INFO(logger_, "ReadDIDRequest::Run");
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_AUTO_TRACE(logger_);
+ LOG4CXX_INFO(logger_, "ReadDIDRequest::on_event");
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 1133fe89ed..888b590758 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_AUTO_TRACE(logger_);
+ LOG4CXX_INFO(logger_, "ReadDIDResponse::Run");
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 1d81ab6b20..b214f1e805 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
@@ -124,15 +124,14 @@ namespace commands {
RegisterAppInterfaceRequest::RegisterAppInterfaceRequest(
const MessageSharedPtr& message)
- : CommandRequestImpl(message),
- result_checking_app_hmi_type_(mobile_apis::Result::INVALID_ENUM) {
+ : CommandRequestImpl(message) {
}
RegisterAppInterfaceRequest::~RegisterAppInterfaceRequest() {
}
bool RegisterAppInterfaceRequest::Init() {
- LOG4CXX_AUTO_TRACE(logger_);
+ LOG4CXX_INFO(logger_, "RegisterAppInterfaceRequest::Init");
return true;
}
@@ -140,9 +139,8 @@ 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 specific to customer is used in order to exclude hit code
+ // Flag conditional compilation "CUSTOMER_PASA" 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()) {
@@ -191,6 +189,13 @@ 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");
@@ -276,11 +281,16 @@ 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_AUTO_TRACE(logger_);
+ LOG4CXX_INFO(logger_, "RegisterAppInterfaceRequest::on_event");
switch (event.id()) {
case hmi_apis::FunctionID::TTS_Speak: {
const smart_objects::SmartObject& message = event.smart_object();
@@ -459,8 +469,8 @@ void RegisterAppInterfaceRequest::SendRegisterAppInterfaceResponseToMobile(
ResumeCtrl& resumer = ApplicationManagerImpl::instance()->resume_controller();
uint32_t hash_id = 0;
- std::string add_info("");
- bool resumption = (*message_)[strings::msg_params].keyExists(strings::hash_id);
+ const char* add_info = "";
+ const 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();
@@ -478,17 +488,8 @@ 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.c_str(), params);
- // in case application exist in resumption we need to send resumeVrgrammars
- if (false == resumption) {
- resumption = resumer.IsApplicationSaved(application->mobile_app_id()->asString());
- }
+ SendResponse(true, result, add_info, params);
MessageHelper::SendOnAppRegisteredNotificationToHMI(*(application.get()),
resumption,
@@ -505,7 +506,7 @@ void RegisterAppInterfaceRequest::SendRegisterAppInterfaceResponseToMobile(
mobile_apis::Result::eType
RegisterAppInterfaceRequest::CheckCoincidence() {
- LOG4CXX_AUTO_TRACE(logger_);
+ LOG4CXX_TRACE_ENTER(logger_);
const smart_objects::SmartObject& msg_params =
(*message_)[strings::msg_params];
@@ -607,7 +608,7 @@ mobile_apis::Result::eType RegisterAppInterfaceRequest::CheckWithPolicyData() {
if (!log.empty()) {
response_info_ = "Following AppHMITypes are not present in policy "
"table:" + log;
- result_checking_app_hmi_type_ = mobile_apis::Result::WARNINGS;
+ result = mobile_apis::Result::WARNINGS;
}
}
// Replace AppHMITypes in request with values allowed by policy table
@@ -660,6 +661,75 @@ 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::"
@@ -684,7 +754,7 @@ bool RegisterAppInterfaceRequest::IsApplicationWithSameAppIdRegistered() {
}
bool RegisterAppInterfaceRequest::IsWhiteSpaceExist() {
- LOG4CXX_AUTO_TRACE(logger_);
+ LOG4CXX_INFO(logger_, "RegisterAppInterfaceRequest::IsWhiteSpaceExist");
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 4bf3dbf913..fe6f3a925a 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_AUTO_TRACE(logger_);
+ LOG4CXX_INFO(logger_, "RegisterAppInterfaceResponse::Run");
mobile_apis::Result::eType result_code = mobile_apis::Result::INVALID_ENUM;
bool success = (*message_)[strings::msg_params][strings::success].asBool();
@@ -75,7 +75,7 @@ void RegisterAppInterfaceResponse::Run() {
void RegisterAppInterfaceResponse::SetHeartBeatTimeout(
uint32_t connection_key, const std::string& mobile_app_id) {
- LOG4CXX_AUTO_TRACE(logger_);
+ LOG4CXX_TRACE_ENTER(logger_);
policy::PolicyHandler *policy_handler = policy::PolicyHandler::instance();
if (policy_handler->PolicyEnabled()) {
const int32_t timeout = policy_handler->HeartBeatTimeout(mobile_app_id);
@@ -86,6 +86,7 @@ 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 df224f9f3c..5e62b789d8 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_AUTO_TRACE(logger_);
+ LOG4CXX_INFO(logger_, "ResetGlobalPropertiesRequest::Run");
uint32_t app_id = (*message_)[strings::params][strings::connection_key].asUInt();
ApplicationSharedPtr app = ApplicationManagerImpl::instance()->application(app_id);
@@ -236,7 +236,7 @@ bool ResetGlobalPropertiesRequest::ResetVrHelpTitleItems(
}
void ResetGlobalPropertiesRequest::on_event(const event_engine::Event& event) {
- LOG4CXX_AUTO_TRACE(logger_);
+ LOG4CXX_INFO(logger_, "ResetGlobalPropertiesRequest::on_event");
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 8e562956ae..aeacabf9d5 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_AUTO_TRACE(logger_);
+ LOG4CXX_INFO(logger_, "ResetGlobalPropertiesResponse::Run");
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 e91d389016..5b3cfa67ac 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_AUTO_TRACE(logger_);
+ LOG4CXX_INFO(logger_, "ScrollableMessageRequest::Run");
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_AUTO_TRACE(logger_);
+ LOG4CXX_INFO(logger_, "ScrollableMessageRequest::on_event");
const smart_objects::SmartObject& message = event.smart_object();
switch (event.id()) {
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 212a3ba912..d9692359d0 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_AUTO_TRACE(logger_);
+ LOG4CXX_INFO(logger_, "ScrollableMessageResponse::Run");
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 b47161612b..b5c2e8a9a5 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,7 +46,7 @@ SendLocationRequest::~SendLocationRequest() {
}
void SendLocationRequest::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
+ LOG4CXX_INFO(logger_, "SendLocationRequest::Run");
ApplicationSharedPtr app = application_manager::ApplicationManagerImpl::instance()
->application(connection_key());
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 32756c999d..a13b67dc06 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_AUTO_TRACE(logger_);
+ LOG4CXX_INFO(logger_, "SendLocationResponse::Run");
ApplicationManagerImpl::instance()->SendMessageToMobile(message_);
}
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 b59a631d8d..60a2583287 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_AUTO_TRACE(logger_);
+ LOG4CXX_INFO(logger_, "SetDisplayLayoutRequest::Run");
ApplicationConstSharedPtr app = ApplicationManagerImpl::instance()
->application(connection_key());
@@ -66,7 +66,7 @@ void SetDisplayLayoutRequest::Run() {
}
void SetDisplayLayoutRequest::on_event(const event_engine::Event& event) {
- LOG4CXX_AUTO_TRACE(logger_);
+ LOG4CXX_INFO(logger_, "SetDisplayLayoutRequest::on_event");
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 3844b3bf05..51f8c1f35b 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_AUTO_TRACE(logger_);
+ LOG4CXX_INFO(logger_, "SetDisplayLayoutResponse::Run");
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 ff46e041ff..f7216c818c 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_AUTO_TRACE(logger_);
+ LOG4CXX_INFO(logger_, "SetGlobalPropertiesRequest::Run");
const smart_objects::SmartObject& msg_params =
(*message_)[strings::msg_params];
@@ -197,8 +197,7 @@ void SetGlobalPropertiesRequest::Run() {
SendHMIRequest(hmi_apis::FunctionID::UI_SetGlobalProperties,
&params, true);
} else if (!is_vr_help_title_present && !is_vr_help_present) {
- const DataAccessor<CommandsMap> accessor = app->commands_map();
- const CommandsMap& cmdMap = accessor.GetData();
+ const CommandsMap& cmdMap = app->commands_map();
CommandsMap::const_iterator command_it = cmdMap.begin();
int32_t index = 0;
@@ -305,7 +304,7 @@ bool SetGlobalPropertiesRequest::CheckVrHelpItemsOrder() {
}
void SetGlobalPropertiesRequest::on_event(const event_engine::Event& event) {
- LOG4CXX_AUTO_TRACE(logger_);
+ LOG4CXX_INFO(logger_, "SetGlobalPropertiesRequest::on_event");
const smart_objects::SmartObject& message = event.smart_object();
ApplicationSharedPtr app = ApplicationManagerImpl::instance()->application(CommandRequestImpl::connection_key());
@@ -384,7 +383,7 @@ bool SetGlobalPropertiesRequest::ValidateConditionalMandatoryParameters(
}
bool SetGlobalPropertiesRequest::IsWhiteSpaceExist() {
- LOG4CXX_AUTO_TRACE(logger_);
+ LOG4CXX_INFO(logger_, "SetGlobalPropertiesRequest::IsWhiteSpaceExist");
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 759333385d..5f0b62fb4d 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_AUTO_TRACE(logger_);
+ LOG4CXX_INFO(logger_, "SetGlobalPropertiesResponse::Run");
ApplicationManagerImpl::instance()->SendMessageToMobile(message_);
}
diff --git a/src/components/application_manager/src/commands/mobile/set_icon_request.cc b/src/components/application_manager/src/commands/mobile/set_icon_request.cc
index 248367e9b3..4b06730752 100644
--- a/src/components/application_manager/src/commands/mobile/set_icon_request.cc
+++ b/src/components/application_manager/src/commands/mobile/set_icon_request.cc
@@ -51,7 +51,7 @@ SetIconRequest::~SetIconRequest() {
}
void SetIconRequest::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
+ LOG4CXX_INFO(logger_, "SetIconRequest::Run");
ApplicationSharedPtr app =
ApplicationManagerImpl::instance()->application(connection_key());
@@ -102,7 +102,7 @@ void SetIconRequest::Run() {
}
void SetIconRequest::on_event(const event_engine::Event& event) {
- LOG4CXX_AUTO_TRACE(logger_);
+ LOG4CXX_INFO(logger_, "SetIconRequest::on_event");
const smart_objects::SmartObject& message = event.smart_object();
switch (event.id()) {
@@ -117,11 +117,6 @@ void SetIconRequest::on_event(const event_engine::Event& event) {
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();
diff --git a/src/components/application_manager/src/commands/mobile/set_icon_response.cc b/src/components/application_manager/src/commands/mobile/set_icon_response.cc
index 632677a4fc..f1580823d1 100644
--- a/src/components/application_manager/src/commands/mobile/set_icon_response.cc
+++ b/src/components/application_manager/src/commands/mobile/set_icon_response.cc
@@ -46,7 +46,7 @@ SetIconResponse::~SetIconResponse() {
}
void SetIconResponse::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
+ LOG4CXX_INFO(logger_, "SetIconResponse::Run");
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 536bb755ed..c9b2eb5ef5 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_AUTO_TRACE(logger_);
+ LOG4CXX_INFO(logger_, "SetMediaClockRequest::Run");
ApplicationSharedPtr app =
ApplicationManagerImpl::instance()->application(connection_key());
@@ -81,7 +81,7 @@ void SetMediaClockRequest::Run() {
}
void SetMediaClockRequest::on_event(const event_engine::Event& event) {
- LOG4CXX_AUTO_TRACE(logger_);
+ LOG4CXX_INFO(logger_, "SetMediaClockRequest::on_event");
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 da6f204da4..73923b0021 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_AUTO_TRACE(logger_);
+ LOG4CXX_INFO(logger_, "SetMediaClockTimerResponse::Run");
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 1e861d14ce..f4e70c53ac 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_AUTO_TRACE(logger_);
+ LOG4CXX_INFO(logger_, "ShowConstantTBTRequest::Run");
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_AUTO_TRACE(logger_);
+ LOG4CXX_INFO(logger_, "ShowConstantTBTRequest::on_event");
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_AUTO_TRACE(logger_);
+ LOG4CXX_INFO(logger_, "ShowConstantTBTRequest::IsWhiteSpaceExist");
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 e45cd760df..d5539d148c 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_AUTO_TRACE(logger_);
+ LOG4CXX_INFO(logger_, "ShowConstantTBTResponse::Run");
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 0a136e0ac2..eeef60101e 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_AUTO_TRACE(logger_);
+ LOG4CXX_INFO(logger_, "ShowRequest::Run");
ApplicationSharedPtr app = application_manager::ApplicationManagerImpl::instance()
->application(
@@ -216,7 +216,7 @@ void ShowRequest::Run() {
}
void ShowRequest::on_event(const event_engine::Event& event) {
- LOG4CXX_AUTO_TRACE(logger_);
+ LOG4CXX_INFO(logger_, "ShowRequest::on_event");
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_AUTO_TRACE(logger_);
+ LOG4CXX_INFO(logger_, "ShowRequest::CheckStringsOfShowRequest");
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 0c46cdd83c..1f9c59c6fc 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_AUTO_TRACE(logger_);
+ LOG4CXX_INFO(logger_, "ShowResponse::Run");
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 4a0a72ee49..52f3c7dee7 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_AUTO_TRACE(logger_);
+ LOG4CXX_INFO(logger_, "SliderRequest::Run");
ApplicationSharedPtr application =
application_manager::ApplicationManagerImpl::instance()->application(
@@ -110,7 +110,7 @@ void SliderRequest::Run() {
}
void SliderRequest::on_event(const event_engine::Event& event) {
- LOG4CXX_AUTO_TRACE(logger_);
+ LOG4CXX_INFO(logger_, "SliderRequest::on_event");
const smart_objects::SmartObject& message = event.smart_object();
const event_engine::Event::EventID event_id = event.id();
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 7f0c10b068..bfb6b0a1e6 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_AUTO_TRACE(logger_);
+ LOG4CXX_INFO(logger_, "SliderResponse::Run");
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 7878e9645b..de37e8b49e 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_AUTO_TRACE(logger_);
+ LOG4CXX_INFO(logger_, "SpeakRequest::Run");
ApplicationSharedPtr app = application_manager::ApplicationManagerImpl::instance()
->application(connection_key());
@@ -76,7 +76,7 @@ void SpeakRequest::Run() {
}
void SpeakRequest::on_event(const event_engine::Event& event) {
- LOG4CXX_AUTO_TRACE(logger_);
+ LOG4CXX_INFO(logger_, "SpeakRequest::on_event");
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_AUTO_TRACE(logger_);
+ LOG4CXX_INFO(logger_, "SpeakRequest::ProcessTTSSpeakResponse");
ApplicationSharedPtr application = ApplicationManagerImpl::instance()->application(
connection_key());
@@ -134,7 +134,7 @@ void SpeakRequest::ProcessTTSSpeakResponse(
}
bool SpeakRequest::IsWhiteSpaceExist() {
- LOG4CXX_AUTO_TRACE(logger_);
+ LOG4CXX_INFO(logger_, "SpeakRequest::IsWhiteSpaceExist");
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 d99b1d0952..92b85bbb84 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_AUTO_TRACE(logger_);
+ LOG4CXX_INFO(logger_, "SpeakResponse::Run");
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 abd0662547..b6a4d8a28e 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_AUTO_TRACE(logger_);
+ LOG4CXX_INFO(logger_, "SubscribeButtonRequest::Run");
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 a3452ef19f..6253f8ca3d 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_AUTO_TRACE(logger_);
+ LOG4CXX_INFO(logger_, "SubscribeButtonResponse::Run");
// 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 1640f0b497..35595c2df6 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_AUTO_TRACE(logger_);
+ LOG4CXX_INFO(logger_, "SubscribeVehicleDataRequest::Run");
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_AUTO_TRACE(logger_);
+ LOG4CXX_INFO(logger_, "SubscribeVehicleDataRequest::on_event");
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 c0554c62eb..972a654188 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_AUTO_TRACE(logger_);
+ LOG4CXX_INFO(logger_, "SubscribeVehicleDataResponse::Run");
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 1f5ea52e54..2765aad8d7 100644
--- a/src/components/application_manager/src/commands/mobile/system_request.cc
+++ b/src/components/application_manager/src/commands/mobile/system_request.cc
@@ -55,7 +55,7 @@ SystemRequest::~SystemRequest() {
}
void SystemRequest::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
+ LOG4CXX_INFO(logger_, "SystemRequest::Run");
ApplicationSharedPtr application =
ApplicationManagerImpl::instance()->application(connection_key());
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 8b4fdafd1b..e77ab08450 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_AUTO_TRACE(logger_);
+ LOG4CXX_INFO(logger_, "SystemResponse::Run");
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 6199818dbe..a07cfcd8f0 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_AUTO_TRACE(logger_);
+ LOG4CXX_INFO(logger_, "UnregisterAppInterfaceRequest::Run");
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 49d9276d35..8ef0eb3ed0 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_AUTO_TRACE(logger_);
+ LOG4CXX_INFO(logger_, "UnregisterAppInterfaceResponse::Run");
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 08a27dedfa..f22d1c0a2f 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_AUTO_TRACE(logger_);
+ LOG4CXX_INFO(logger_, "UnsubscribeButtonRequest::Run");
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 8bece66157..1331eac27f 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_AUTO_TRACE(logger_);
+ LOG4CXX_INFO(logger_, "UnsubscribeButtonResponse::Run");
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 7d05ce328f..fc7145078f 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_AUTO_TRACE(logger_);
+ LOG4CXX_INFO(logger_, "UnsubscribeVehicleDataRequest::Run");
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_AUTO_TRACE(logger_);
+ LOG4CXX_INFO(logger_, "UnsubscribeVehicleDataRequest::on_event");
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 87b2e6e5e1..60f7077da7 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_AUTO_TRACE(logger_);
+ LOG4CXX_INFO(logger_, "UnsubscribeVehicleDataResponse::Run");
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 650e698bf4..9447772568 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_AUTO_TRACE(logger_);
+ LOG4CXX_INFO(logger_, "UpdateTurnListRequest::Run");
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_AUTO_TRACE(logger_);
+ LOG4CXX_INFO(logger_, "UpdateTurnListRequest::on_event");
const smart_objects::SmartObject& message = event.smart_object();
switch (event.id()) {
@@ -188,7 +188,7 @@ bool UpdateTurnListRequest::CheckTurnListArray() {
}
bool UpdateTurnListRequest::IsWhiteSpaceExist() {
- LOG4CXX_AUTO_TRACE(logger_);
+ LOG4CXX_INFO(logger_, "UpdateTurnListRequest::IsWhiteSpaceExist");
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 26e5c460d3..ec1e0bce8a 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_AUTO_TRACE(logger_);
+ LOG4CXX_INFO(logger_, "UpdateTurnListResponse::Run");
ApplicationManagerImpl::instance()->SendMessageToMobile(message_);
}
diff --git a/src/components/application_manager/src/hmi_capabilities.cc b/src/components/application_manager/src/hmi_capabilities.cc
index 14213558d3..5a3ce71ec6 100644
--- a/src/components/application_manager/src/hmi_capabilities.cc
+++ b/src/components/application_manager/src/hmi_capabilities.cc
@@ -1,4 +1,4 @@
-/*
+/**
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
diff --git a/src/components/application_manager/src/message.cc b/src/components/application_manager/src/message.cc
index bb500687dd..832016e874 100644
--- a/src/components/application_manager/src/message.cc
+++ b/src/components/application_manager/src/message.cc
@@ -1,4 +1,4 @@
-/*
+/**
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
diff --git a/src/components/application_manager/src/message_helper.cc b/src/components/application_manager/src/message_helper.cc
index 8ac9de416e..d0d967b8ab 100644
--- a/src/components/application_manager/src/message_helper.cc
+++ b/src/components/application_manager/src/message_helper.cc
@@ -383,16 +383,41 @@ smart_objects::SmartObject* MessageHelper::GetHashUpdateNotification(
return message;
}
+smart_objects::SmartObject* MessageHelper::GetLockScreenIconUrlNotification(const uint32_t connection_key) {
+ ApplicationSharedPtr app = ApplicationManagerImpl::instance()->application(connection_key);
+ DCHECK(app.get());
+
+ smart_objects::SmartObject* message = new smart_objects::SmartObject(smart_objects::SmartType_Map);
+ (*message)[strings::params][strings::function_id] = mobile_apis::FunctionID::OnSystemRequestID;
+ (*message)[strings::params][strings::connection_key] = connection_key;
+ (*message)[strings::params][strings::message_type] = mobile_apis::messageType::notification;
+ (*message)[strings::params][strings::protocol_type] = commands::CommandImpl::mobile_protocol_type_;
+ (*message)[strings::params][strings::protocol_version] = commands::CommandImpl::protocol_version_;
+
+ (*message)[strings::msg_params][strings::request_type] = mobile_apis::RequestType::LOCK_SCREEN_ICON_URL;
+
+ (*message)[strings::msg_params][strings::url] =
+ "http://www.livioconnect.com/wp-content/uploads/2012/03/icon-Livio-Connect.png";
+
+ return message;
+}
+
+void MessageHelper::SendLockScreenIconUrlNotification(const uint32_t connection_key) {
+ LOG4CXX_INFO(logger_, "SendLockScreenIconUrlNotification");
+
+ smart_objects::SmartObject* so = GetLockScreenIconUrlNotification(connection_key);
+ PrintSmartObject(*so);
+ DCHECK(ApplicationManagerImpl::instance()->ManageMobileCommand(so));
+}
+
void MessageHelper::SendHashUpdateNotification(const uint32_t app_id) {
- LOG4CXX_AUTO_TRACE(logger_);
+ LOG4CXX_INFO(logger_, "SendHashUpdateNotification");
smart_objects::SmartObject* so = GetHashUpdateNotification(app_id);
if (so) {
PrintSmartObject(*so);
if (!ApplicationManagerImpl::instance()->ManageMobileCommand(so)) {
LOG4CXX_ERROR_EXT(logger_, "Failed to send HashUpdate notification.");
- } else {
- ApplicationManagerImpl::instance()->resume_controller().ApplicationsDataUpdated();
}
}
}
@@ -448,7 +473,6 @@ std::string MessageHelper::StringifiedHMILevel(
std::string MessageHelper::StringifiedFunctionID(
mobile_apis::FunctionID::eType function_id) {
- LOG4CXX_AUTO_TRACE(logger_);
using namespace NsSmartDeviceLink::NsSmartObjects;
const char* str = 0;
if (EnumConversionHelper<mobile_apis::FunctionID::eType>::EnumToCString(
@@ -498,7 +522,6 @@ static std::map<std::string, uint16_t> vehicle_data_args = create_get_vehicle_da
#endif
void MessageHelper::CreateGetVehicleDataRequest(uint32_t correlation_id, const std::vector<std::string>& params) {
- LOG4CXX_AUTO_TRACE(logger_);
#ifdef HMI_DBUS_API
for (std::vector<std::string>::const_iterator it = params.begin();
it != params.end(); it++) {
@@ -538,8 +561,10 @@ smart_objects::SmartObject* MessageHelper::CreateBlockedByPoliciesResponse(
mobile_apis::FunctionID::eType function_id,
mobile_apis::Result::eType result, uint32_t correlation_id,
uint32_t connection_key) {
- LOG4CXX_AUTO_TRACE(logger_);
smart_objects::SmartObject* response = new smart_objects::SmartObject;
+ if (!response) {
+ return NULL;
+ }
(*response)[strings::params][strings::function_id] =
static_cast<int>(function_id);
@@ -559,10 +584,13 @@ smart_objects::SmartObject* MessageHelper::CreateBlockedByPoliciesResponse(
smart_objects::SmartObject* MessageHelper::CreateDeviceListSO(
const connection_handler::DeviceMap& devices) {
- LOG4CXX_AUTO_TRACE(logger_);
smart_objects::SmartObject* device_list_so = new smart_objects::SmartObject(
smart_objects::SmartType_Map);
+ if (NULL == device_list_so) {
+ return NULL;
+ }
+
(*device_list_so)[strings::device_list] = smart_objects::SmartObject(
smart_objects::SmartType_Array);
smart_objects::SmartObject& list_so = (*device_list_so)[strings::device_list];
@@ -579,14 +607,13 @@ smart_objects::SmartObject* MessageHelper::CreateDeviceListSO(
policy::PolicyHandler::instance()->GetUserConsentForDevice(it->second.mac_address());
list_so[index][strings::isSDLAllowed] =
policy::DeviceConsent::kDeviceAllowed == device_consent;
- ++index;
}
+ ++index;
return device_list_so;
}
smart_objects::SmartObject* MessageHelper::CreateModuleInfoSO(
uint32_t function_id) {
- LOG4CXX_AUTO_TRACE(logger_);
smart_objects::SmartObject* module_info = new smart_objects::SmartObject(
smart_objects::SmartType_Map);
smart_objects::SmartObject& object = *module_info;
@@ -601,7 +628,6 @@ smart_objects::SmartObject* MessageHelper::CreateModuleInfoSO(
smart_objects::SmartObject* MessageHelper::CreateSetAppIcon(
const std::string& path_to_icon, uint32_t app_id) {
- LOG4CXX_AUTO_TRACE(logger_);
smart_objects::SmartObject* set_icon = new smart_objects::SmartObject(
smart_objects::SmartType_Map);
@@ -620,40 +646,34 @@ smart_objects::SmartObject* MessageHelper::CreateSetAppIcon(
}
bool MessageHelper::SendIVISubscribtions(const uint32_t app_id) {
- LOG4CXX_AUTO_TRACE(logger_);
+ LOG4CXX_INFO(logger_, " MessageHelper::SendIVISubscribtions ");
- bool result = true;
+ bool succes = true;
ApplicationSharedPtr app = ApplicationManagerImpl::instance()->application(
app_id);
+ DCHECK(app.get());
- if (!app.valid()) {
- LOG4CXX_ERROR(logger_, "Invalid application " << app_id);
- return result;
- }
-
- SmartObjectList requests = GetIVISubscriptionRequests(app);
+ SmartObjectList requests = GetIVISubscribtionRequests(app_id);
for (SmartObjectList::const_iterator it = requests.begin();
it != requests.end(); ++it) {
if (!ApplicationManagerImpl::instance()->ManageHMICommand(*it)) {
- result = false;
+ succes = false;
}
}
- return result;
+ return succes;
}
-MessageHelper::SmartObjectList MessageHelper::GetIVISubscriptionRequests(
- ApplicationSharedPtr app) {
- LOG4CXX_AUTO_TRACE(logger_);
+MessageHelper::SmartObjectList MessageHelper::GetIVISubscribtionRequests(
+ const uint32_t app_id) {
+ LOG4CXX_INFO(logger_, " MessageHelper::GetIVISubscribtionRequests ");
- SmartObjectList hmi_requests;
- if (!app.valid()) {
- LOG4CXX_ERROR(logger_, "Invalid application pointer ");
- return hmi_requests;
- }
+ ApplicationSharedPtr app = ApplicationManagerImpl::instance()->application(
+ app_id);
+ DCHECK(app);
smart_objects::SmartObject msg_params = smart_objects::SmartObject(
smart_objects::SmartType_Map);
- msg_params[strings::app_id] = app->app_id();
+ msg_params[strings::app_id] = app_id;
const VehicleData& vehicle_data = MessageHelper::vehicle_data_;
VehicleData::const_iterator ivi_it = vehicle_data.begin();
const std::set<uint32_t>& subscribes = app->SubscribesIVI();
@@ -666,6 +686,7 @@ MessageHelper::SmartObjectList MessageHelper::GetIVISubscriptionRequests(
}
}
+ SmartObjectList hmi_requests;
#ifdef HMI_JSON_API
smart_objects::SmartObject* request = MessageHelper::CreateModuleInfoSO(
hmi_apis::FunctionID::VehicleInfo_SubscribeVehicleData);
@@ -689,7 +710,6 @@ MessageHelper::SmartObjectList MessageHelper::GetIVISubscriptionRequests(
}
void MessageHelper::SendAppDataToHMI(ApplicationConstSharedPtr app) {
- LOG4CXX_AUTO_TRACE(logger_);
uint32_t id = app->app_id();
utils::SharedPtr<smart_objects::SmartObject> set_app_icon(
@@ -709,7 +729,7 @@ void MessageHelper::SendAppDataToHMI(ApplicationConstSharedPtr app) {
so_to_send[strings::msg_params] = smart_objects::SmartObject(
smart_objects::SmartType_Map);
- utils::SharedPtr<smart_objects::SmartObject> msg_params = MessageHelper::CreateSetAppIcon(
+ smart_objects::SmartObject* msg_params = MessageHelper::CreateSetAppIcon(
app->app_icon_path(), id);
if (msg_params) {
@@ -724,10 +744,7 @@ void MessageHelper::SendAppDataToHMI(ApplicationConstSharedPtr app) {
}
void MessageHelper::SendGlobalPropertiesToHMI(ApplicationConstSharedPtr app) {
- if (!app.valid()) {
- LOG4CXX_ERROR(logger_, "Invalid application");
- return;
- }
+ DCHECK(app.get());
SmartObjectList requests = CreateGlobalPropertiesRequestsToHMI(app);
for (SmartObjectList::const_iterator it = requests.begin();
@@ -738,13 +755,9 @@ void MessageHelper::SendGlobalPropertiesToHMI(ApplicationConstSharedPtr app) {
MessageHelper::SmartObjectList MessageHelper::CreateGlobalPropertiesRequestsToHMI(
ApplicationConstSharedPtr app) {
- LOG4CXX_AUTO_TRACE(logger_);
SmartObjectList requests;
- if (!app.valid()) {
- LOG4CXX_ERROR(logger_, "Invalid application");
- return requests;
- }
+ DCHECK(app.get());
// UI global properties
@@ -830,7 +843,6 @@ MessageHelper::SmartObjectList MessageHelper::CreateGlobalPropertiesRequestsToHM
void MessageHelper::SendTTSGlobalProperties(
ApplicationSharedPtr app, bool default_help_prompt) {
- LOG4CXX_AUTO_TRACE(logger_);
if (!app.valid()) {
return;
}
@@ -853,8 +865,7 @@ void MessageHelper::SendTTSGlobalProperties(
msg_params[strings::help_prompt] = smart_objects::SmartObject(
smart_objects::SmartType_Array);
if (default_help_prompt) {
- const DataAccessor<CommandsMap> accessor = app->commands_map();
- const CommandsMap& commands = accessor.GetData();
+ const CommandsMap& commands = app->commands_map();
CommandsMap::const_iterator it = commands.begin();
uint32_t index = 0;
for (; commands.end() != it; ++it) {
@@ -900,8 +911,7 @@ smart_objects::SmartObject* MessageHelper::CreateAppVrHelp(
}
// copy all app VR commands
- const DataAccessor<CommandsMap> cmd_accessor = app->commands_map();
- const CommandsMap& commands = cmd_accessor.GetData();
+ const CommandsMap& commands = app->commands_map();
CommandsMap::const_iterator it = commands.begin();
for (; commands.end() != it; ++it) {
@@ -915,16 +925,12 @@ smart_objects::SmartObject* MessageHelper::CreateAppVrHelp(
MessageHelper::SmartObjectList MessageHelper::CreateShowRequestToHMI(
ApplicationConstSharedPtr app) {
+ DCHECK(app.get());
SmartObjectList requests;
- if (!app) {
- LOG4CXX_ERROR(logger_, "Invalid application");
- return requests;
- }
-
+ smart_objects::SmartObject* ui_show = new smart_objects::SmartObject(
+ smart_objects::SmartType_Map);
if (app->show_command()) {
- smart_objects::SmartObject* ui_show = new smart_objects::SmartObject(
- smart_objects::SmartType_Map);
(*ui_show)[strings::params][strings::function_id] =
static_cast<int>(hmi_apis::FunctionID::UI_Show);
(*ui_show)[strings::params][strings::message_type] =
@@ -960,12 +966,14 @@ void MessageHelper::SendShowConstantTBTRequestToHMI(
return;
}
+ smart_objects::SmartObject* navi_show_tbt = new smart_objects::SmartObject(
+ smart_objects::SmartType_Map);
+
+ if (!navi_show_tbt) {
+ return;
+ }
+
if (app->tbt_show_command()) {
- utils::SharedPtr<smart_objects::SmartObject> navi_show_tbt = new smart_objects::SmartObject(
- smart_objects::SmartType_Map);
- if (!navi_show_tbt) {
- return;
- }
(*navi_show_tbt)[strings::params][strings::function_id] =
static_cast<int>(hmi_apis::FunctionID::Navigation_ShowConstantTBT);
(*navi_show_tbt)[strings::params][strings::message_type] =
@@ -994,15 +1002,10 @@ void MessageHelper::SendAddCommandRequestToHMI(ApplicationConstSharedPtr app) {
MessageHelper::SmartObjectList MessageHelper::CreateAddCommandRequestToHMI(
ApplicationConstSharedPtr app) {
+ DCHECK(app.get());
SmartObjectList requests;
- if (!app.valid()) {
- LOG4CXX_ERROR(logger_, "Invalid application");
- return requests;
- }
-
- const DataAccessor<CommandsMap> accessor = app->commands_map();
- const CommandsMap& commands = accessor.GetData();
+ const CommandsMap& commands = app->commands_map();
CommandsMap::const_iterator i = commands.begin();
for (; commands.end() != i; ++i) {
// UI Interface
@@ -1051,8 +1054,7 @@ MessageHelper::SmartObjectList MessageHelper::CreateAddCommandRequestToHMI(
}
smart_objects::SmartObject* MessageHelper::CreateChangeRegistration(
- int32_t function_id, int32_t language, uint32_t app_id,
- const smart_objects::SmartObject* app_types) {
+ int32_t function_id, int32_t language, uint32_t app_id) {
smart_objects::SmartObject* command = new smart_objects::SmartObject(
smart_objects::SmartType_Map);
if (!command) {
@@ -1077,31 +1079,10 @@ smart_objects::SmartObject* MessageHelper::CreateChangeRegistration(
msg_params[strings::language] = language;
msg_params[strings::app_id] = app_id;
- if (app_types != NULL) {
- msg_params[strings::app_hmi_type] = *app_types;
- }
-
params[strings::msg_params] = msg_params;
return command;
}
-void MessageHelper::SendUIChangeRegistrationRequestToHMI(ApplicationConstSharedPtr app) {
- if (!app.valid()) {
- LOG4CXX_ERROR(logger_, "Application is not valid");
- return;
- }
-
- if (NULL != app->app_types()) {
- smart_objects::SmartObject* ui_command = CreateChangeRegistration(
- hmi_apis::FunctionID::UI_ChangeRegistration, app->ui_language(),
- app->app_id(), app->app_types());
-
- if (ui_command) {
- ApplicationManagerImpl::instance()->ManageHMICommand(ui_command);
- }
- }
-}
-
void MessageHelper::SendChangeRegistrationRequestToHMI(ApplicationConstSharedPtr app) {
if (!app.valid()) {
return;
@@ -1217,11 +1198,7 @@ bool MessageHelper::CreateHMIApplicationStruct(ApplicationConstSharedPtr app,
}
void MessageHelper::SendAddSubMenuRequestToHMI(ApplicationConstSharedPtr app) {
- if (!app.valid()) {
- LOG4CXX_ERROR(logger_, "Invalid application");
- return;
- }
-
+ DCHECK(app.get());
SmartObjectList requests = CreateAddSubMenuRequestToHMI(app);
for (SmartObjectList::iterator it = requests.begin(); it != requests.end();
++it) {
@@ -1232,8 +1209,7 @@ void MessageHelper::SendAddSubMenuRequestToHMI(ApplicationConstSharedPtr app) {
MessageHelper::SmartObjectList MessageHelper::CreateAddSubMenuRequestToHMI(
ApplicationConstSharedPtr app) {
SmartObjectList requsets;
- const DataAccessor<SubMenuMap> accessor = app->sub_menu_map();
- const SubMenuMap& sub_menu = accessor.GetData();
+ const SubMenuMap& sub_menu = app->sub_menu_map();
SubMenuMap::const_iterator i = sub_menu.begin();
for (; sub_menu.end() != i; ++i) {
smart_objects::SmartObject* ui_sub_menu = new smart_objects::SmartObject(
@@ -1292,19 +1268,18 @@ void MessageHelper::SendOnAppUnregNotificationToHMI(
}
void MessageHelper::SendActivateAppToHMI(uint32_t const app_id,
- hmi_apis::Common_HMILevel::eType level,
- bool send_policy_priority) {
+ hmi_apis::Common_HMILevel::eType level) {
+ smart_objects::SmartObject* message = new smart_objects::SmartObject(
+ smart_objects::SmartType_Map);
+
application_manager::ApplicationConstSharedPtr app =
application_manager::ApplicationManagerImpl::instance()
->application(app_id);
- if (!app) {
+ if (!app.valid()) {
LOG4CXX_WARN(logger_, "Invalid app_id: " << app_id);
return;
}
- utils::SharedPtr<smart_objects::SmartObject> message = new smart_objects::SmartObject(
- smart_objects::SmartType_Map);
-
(*message)[strings::params][strings::function_id] =
hmi_apis::FunctionID::BasicCommunication_ActivateApp;
(*message)[strings::params][strings::message_type] = MessageType::kRequest;
@@ -1312,25 +1287,23 @@ void MessageHelper::SendActivateAppToHMI(uint32_t const app_id,
ApplicationManagerImpl::instance()->GetNextHMICorrelationID();
(*message)[strings::msg_params][strings::app_id] = app_id;
- if (send_policy_priority) {
- std::string priority;
- // TODO(KKolodiy): need remove method policy_manager
+ std::string priority;
+ // TODO(KKolodiy): need remove method policy_manager
- policy::PolicyHandler::instance()->GetPriority(
+ policy::PolicyHandler::instance()->GetPriority(
app->mobile_app_id()->asString(), &priority);
- // According SDLAQ-CRS-2794
- // SDL have to send ActivateApp without "proirity" parameter to HMI.
- // in case of unconsented device
- std::string mac_adress;
- connection_handler::DeviceHandle device_handle = app->device();
- connection_handler::ConnectionHandlerImpl::instance()->
- GetDataOnDeviceID(device_handle, NULL, NULL, &mac_adress, NULL);
-
- policy::DeviceConsent consent =
- policy::PolicyHandler::instance()->GetUserConsentForDevice(mac_adress);
- if (!priority.empty() && (policy::DeviceConsent::kDeviceAllowed == consent)) {
- (*message)[strings::msg_params][strings::priority] = GetPriorityCode(priority);
- }
+ // According SDLAQ-CRS-2794
+ // SDL have to send ActivateApp without "proirity" parameter to HMI.
+ // in case of unconsented device
+ std::string mac_adress;
+ connection_handler::DeviceHandle device_handle = app->device();
+ connection_handler::ConnectionHandlerImpl::instance()->
+ GetDataOnDeviceID(device_handle, NULL, NULL, &mac_adress, NULL);
+
+ policy::DeviceConsent consent =
+ policy::PolicyHandler::instance()->GetUserConsentForDevice(mac_adress);
+ if (!priority.empty() && (policy::DeviceConsent::kDeviceAllowed == consent)) {
+ (*message)[strings::msg_params]["priority"] = GetPriorityCode(priority);
}
// We haven't send HMI level to HMI in case it FULL.
@@ -1344,17 +1317,17 @@ void MessageHelper::SendActivateAppToHMI(uint32_t const app_id,
void MessageHelper::SendOnResumeAudioSourceToHMI(const uint32_t app_id) {
LOG4CXX_WARN(logger_, "SendOnResumeAudioSourceToHMI app_id: " << app_id);
+
+ smart_objects::SmartObject* message = new smart_objects::SmartObject(
+ smart_objects::SmartType_Map);
application_manager::ApplicationConstSharedPtr app =
application_manager::ApplicationManagerImpl::instance()
->application(app_id);
- if (!app) {
+ if (!app.valid()) {
LOG4CXX_WARN(logger_, "Invalid app_id: " << app_id);
return;
}
- utils::SharedPtr<smart_objects::SmartObject> message = new smart_objects::SmartObject(
- smart_objects::SmartType_Map);
-
(*message)[strings::params][strings::function_id] =
hmi_apis::FunctionID::BasicCommunication_OnResumeAudioSource;
(*message)[strings::params][strings::message_type] = MessageType::kNotification;
@@ -1399,7 +1372,6 @@ void MessageHelper::GetDeviceInfoForApp(uint32_t connection_key,
void MessageHelper::SendSDLActivateAppResponse(policy::AppPermissions& permissions,
uint32_t correlation_id) {
- LOG4CXX_AUTO_TRACE(logger_);
smart_objects::SmartObject* message = new smart_objects::SmartObject(
smart_objects::SmartType_Map);
if (!message) {
@@ -1446,6 +1418,15 @@ void MessageHelper::SendSDLActivateAppResponse(policy::AppPermissions& permissio
if (permissions.appRevoked || !permissions.isSDLAllowed) {
return;
}
+
+ // Send HMI status notification to mobile
+ ApplicationSharedPtr app = ApplicationManagerImpl::instance()
+ ->application_by_policy_id(permissions.application_id);
+ if (app) {
+ ApplicationManagerImpl::instance()->ActivateApplication(app);
+ } else {
+ LOG4CXX_WARN(logger_, "Unable to find app_id: " << permissions.application_id);
+ }
}
void MessageHelper::SendOnSDLConsentNeeded(
@@ -1625,7 +1606,7 @@ smart_objects::SmartObject* MessageHelper::CreateNegativeResponse(
}
void MessageHelper::SendNaviStartStream(int32_t connection_key) {
- LOG4CXX_AUTO_TRACE(logger_);
+ LOG4CXX_INFO(logger_, "MessageHelper::SendNaviStartStream");
smart_objects::SmartObject* start_stream = new smart_objects::SmartObject(
smart_objects::SmartType_Map);
@@ -1841,10 +1822,10 @@ void MessageHelper::SendPolicySnapshotNotification(
void MessageHelper::SendOnPermissionsChangeNotification(
uint32_t connection_key, const policy::Permissions& permissions) {
- utils::SharedPtr<smart_objects::SmartObject> notification = new smart_objects::SmartObject(
+ smart_objects::SmartObject* notification = new smart_objects::SmartObject(
smart_objects::SmartType_Map);
smart_objects::SmartObject& content = *notification;
-
+ ;
content[strings::params][strings::function_id] =
mobile_apis::FunctionID::OnPermissionsChangeID;
content[strings::params][strings::message_type] =
@@ -1855,7 +1836,7 @@ void MessageHelper::SendOnPermissionsChangeNotification(
commands::CommandImpl::protocol_version_;
content[strings::params][strings::connection_key] = connection_key;
- utils::SharedPtr<smart_objects::SmartObject> p_msg_params = new smart_objects::SmartObject(
+ smart_objects::SmartObject* p_msg_params = new smart_objects::SmartObject(
smart_objects::SmartType_Map);
smart_objects::SmartObject& msg_params = *p_msg_params;
@@ -2207,17 +2188,6 @@ bool MessageHelper::VerifySoftButtonString(const std::string& str) {
return true;
}
-bool MessageHelper::CheckWithPolicy(
- int system_action, const std::string& app_mobile_id) {
- bool result = true;
- policy::PolicyHandler* policy_handler = policy::PolicyHandler::instance();
- if (NULL != policy_handler && policy_handler->PolicyEnabled()) {
- result = policy_handler->CheckKeepContext(system_action, app_mobile_id) ||
- policy_handler->CheckStealFocus(system_action, app_mobile_id);
- }
- return result;
-}
-
mobile_apis::Result::eType MessageHelper::ProcessSoftButtons(
smart_objects::SmartObject& message_params, ApplicationConstSharedPtr app) {
if (!message_params.keyExists(strings::soft_buttons)) {
@@ -2245,14 +2215,17 @@ mobile_apis::Result::eType MessageHelper::ProcessSoftButtons(
smart_objects::SmartObject soft_buttons = smart_objects::SmartObject(
smart_objects::SmartType_Array);
+ policy::PolicyHandler* policy_handler = policy::PolicyHandler::instance();
+ std::string app_mobile_id = app->mobile_app_id()->asString();
uint32_t j = 0;
size_t size = request_soft_buttons.length();
for (uint32_t i = 0; i < size; ++i) {
- const int system_action = request_soft_buttons[i][strings::system_action].asInt();
-
- if (!CheckWithPolicy(system_action, app->mobile_app_id()->asString()))
+ int system_action = request_soft_buttons[i][strings::system_action].asInt();
+ if (!policy_handler->CheckKeepContext(system_action, app_mobile_id) ||
+ !policy_handler->CheckStealFocus(system_action, app_mobile_id)) {
return mobile_apis::Result::DISALLOWED;
+ }
switch (request_soft_buttons[i][strings::type].asInt()) {
case mobile_apis::SoftButtonType::SBT_IMAGE: {
diff --git a/src/components/application_manager/src/mobile_message_handler.cc b/src/components/application_manager/src/mobile_message_handler.cc
index cc2acfc30a..22260e214e 100644
--- a/src/components/application_manager/src/mobile_message_handler.cc
+++ b/src/components/application_manager/src/mobile_message_handler.cc
@@ -78,7 +78,6 @@ MobileMessageHandler::HandleIncomingMessageProtocolV1(
message->data_size()));
if (outgoing_message->json_message().empty()) {
- delete outgoing_message;
return NULL;
}
@@ -146,8 +145,6 @@ MobileMessageHandler::HandleOutgoingMessageProtocolV1(
protocol_handler::RawMessage* result = new protocol_handler::RawMessage(
message->connection_key(), 1, rawMessage, messageString.length() + 1);
- delete [] rawMessage;
-
return result;
}
@@ -219,8 +216,6 @@ MobileMessageHandler::HandleOutgoingMessageProtocolV2(
dataForSending,
dataForSendingSize);
- delete [] dataForSending;
-
return msgToProtocolHandler;
}
} // namespace application_manager
diff --git a/src/components/application_manager/src/policies/policy_event_observer.cc b/src/components/application_manager/src/policies/policy_event_observer.cc
index 09f97dd3f1..488097761a 100644
--- a/src/components/application_manager/src/policies/policy_event_observer.cc
+++ b/src/components/application_manager/src/policies/policy_event_observer.cc
@@ -32,31 +32,20 @@
#include "application_manager/policies/policy_event_observer.h"
#include "application_manager/smart_object_keys.h"
-#include "application_manager/policies/policy_handler.h"
#include "utils/date_time.h"
+#include "policy/policy_manager.h"
#include "smart_objects/smart_object.h"
namespace policy {
namespace smart_objects = NsSmartDeviceLink::NsSmartObjects;
using namespace application_manager;
-class PolicyHandler;
-CREATE_LOGGERPTR_GLOBAL(logger_, "PolicyHandler")
-
-PolicyEventObserver::PolicyEventObserver(PolicyHandler* const policy_handler)
- : policy_handler_(policy_handler) {
-}
-
-void PolicyEventObserver::set_policy_handler(policy::PolicyHandler* const policy_handler) {
- LOG4CXX_AUTO_TRACE(logger_);
- sync_primitives::AutoLock auto_lock(policy_handler_lock_);
- LOG4CXX_DEBUG(logger_, "Set policy handler " << policy_handler);
- policy_handler_ = policy_handler;
+PolicyEventObserver::PolicyEventObserver(utils::SharedPtr<PolicyManager> policy_manager)
+ : policy_manager_(policy_manager) {
}
void PolicyEventObserver::on_event(const event_engine::Event& event) {
- sync_primitives::AutoLock auto_lock(policy_handler_lock_);
- if (!policy_handler_) {
+ if (!policy_manager_) {
return;
}
const smart_objects::SmartObject& message = event.smart_object();
@@ -78,7 +67,7 @@ void PolicyEventObserver::on_event(const event_engine::Event& event) {
break;
}
case hmi_apis::FunctionID::BasicCommunication_OnReady: {
- policy_handler_->OnSystemReady();
+ policy_manager_->OnSystemReady();
unsubscribe_from_event(hmi_apis::FunctionID::BasicCommunication_OnReady);
break;
}
@@ -99,8 +88,8 @@ void PolicyEventObserver::ProcessOdometerEvent(const smart_objects::SmartObject&
const int kSecondsInDay = 60 * 60 * 24;
int days_after_epoch = current_time.tv_sec / kSecondsInDay;
- if (policy_handler_) {
- policy_handler_->PTUpdatedAt(
+ if(policy_manager_) {
+ policy_manager_->PTUpdatedAt(
message[strings::msg_params][strings::odometer].asInt(),
days_after_epoch);
}
diff --git a/src/components/application_manager/src/policies/policy_handler.cc b/src/components/application_manager/src/policies/policy_handler.cc
index 285fda961a..0033743e75 100644
--- a/src/components/application_manager/src/policies/policy_handler.cc
+++ b/src/components/application_manager/src/policies/policy_handler.cc
@@ -1,5 +1,5 @@
/*
- Copyright (c) 2014, Ford Motor Company
+ Copyright (c) 2013, Ford Motor Company
All rights reserved.
Redistribution and use in source and binary forms, with or without
@@ -35,11 +35,9 @@
#include <algorithm>
#include <vector>
#include "application_manager/smart_object_keys.h"
-
#include "application_manager/policies/policy_handler.h"
-
-#include "application_manager/policies/delegates/app_permission_delegate.h"
-
+#include "application_manager/policies/pt_exchange_handler_impl.h"
+#include "application_manager/policies/pt_exchange_handler_ext.h"
#include "application_manager/application_manager_impl.h"
#include "application_manager/message_helper.h"
#include "policy/policy_manager_impl.h"
@@ -57,7 +55,6 @@
namespace policy {
#define POLICY_LIB_CHECK(return_value) {\
- sync_primitives::AutoReadLock lock(policy_manager_lock_); \
if (!policy_manager_) {\
LOG4CXX_WARN(logger_, "The shared library of policy is not loaded");\
return return_value;\
@@ -65,7 +62,6 @@ namespace policy {
}
#define POLICY_LIB_CHECK_VOID() {\
- sync_primitives::AutoReadLock lock(policy_manager_lock_); \
if (!policy_manager_) {\
LOG4CXX_WARN(logger_, "The shared library of policy is not loaded");\
return;\
@@ -86,7 +82,6 @@ struct DeactivateApplication {
app->set_hmi_level(mobile_apis::HMILevel::HMI_NONE);
application_manager::MessageHelper::SendActivateAppToHMI(
app->app_id(), hmi_apis::Common_HMILevel::NONE);
- application_manager::MessageHelper::SendHMIStatusNotification(*app.get());
}
}
@@ -95,8 +90,9 @@ struct DeactivateApplication {
};
struct SDLAlowedNotification {
- SDLAlowedNotification(const connection_handler::DeviceHandle& device_id,
- PolicyManager* policy_manager)
+ explicit SDLAlowedNotification(
+ const connection_handler::DeviceHandle& device_id,
+ utils::SharedPtr<PolicyManager> policy_manager)
: device_id_(device_id),
policy_manager_(policy_manager){}
@@ -125,7 +121,7 @@ struct SDLAlowedNotification {
return ;
}
if (app->hmi_level() == default_mobile_hmi) {
- LOG4CXX_DEBUG(logger_, "Application already in default hmi state.");
+ LOG4CXX_INFO(logger_, "Application already in default hmi state.");
} else {
app->set_hmi_level(default_mobile_hmi);
application_manager::MessageHelper::SendHMIStatusNotification(*app);
@@ -135,7 +131,7 @@ struct SDLAlowedNotification {
}
private:
connection_handler::DeviceHandle device_id_;
- PolicyManager* policy_manager_;
+ utils::SharedPtr<PolicyManager> policy_manager_;
};
struct LinkAppToDevice {
@@ -212,11 +208,13 @@ const std::string PolicyHandler::kLibrary = "libPolicy.so";
PolicyHandler::PolicyHandler()
- : AsyncRunner("PolicyHandler async runner thread"),
- dl_handle_(0),
+ : dl_handle_(0),
+// EXTENDED_POLICY
+ exchange_handler_(new PTExchangeHandlerImpl(this)),
+ on_ignition_check_done_(false),
last_activated_app_id_(0),
- listener_(NULL),
- app_to_device_link_lock_(true),
+ registration_in_progress(false),
+ is_user_requested_policy_table_update_(false),
statistic_manager_impl_(new StatisticManagerImpl()) {
}
@@ -225,8 +223,6 @@ PolicyHandler::~PolicyHandler() {
}
bool PolicyHandler::LoadPolicyLibrary() {
- LOG4CXX_AUTO_TRACE(logger_);
- sync_primitives::AutoWriteLock lock(policy_manager_lock_);
if (!PolicyEnabled()) {
LOG4CXX_WARN(logger_, "System is configured to work without policy "
"functionality.");
@@ -239,7 +235,7 @@ bool PolicyHandler::LoadPolicyLibrary() {
if (error_string == NULL) {
if (CreateManager()) {
policy_manager_->set_listener(this);
- event_observer_= new PolicyEventObserver(this);
+ event_observer_= new PolicyEventObserver(policy_manager_);
}
} else {
LOG4CXX_ERROR(logger_, error_string);
@@ -261,22 +257,22 @@ bool PolicyHandler::CreateManager() {
} else {
LOG4CXX_WARN(logger_, error_string);
}
- return policy_manager_.valid();
+ return policy_manager_;
}
bool PolicyHandler::InitPolicyTable() {
- LOG4CXX_AUTO_TRACE(logger_);
+ LOG4CXX_TRACE(logger_, "Init policy table from preloaded.");
POLICY_LIB_CHECK(false);
// Subscribing to notification for system readiness to be able to get system
// info necessary for policy table
- event_observer_->subscribe_on_event(
+ event_observer_.get()->subscribe_on_event(
hmi_apis::FunctionID::BasicCommunication_OnReady);
std::string preloaded_file =
profile::Profile::instance()->preloaded_pt_file();
if (file_system::FileExists(preloaded_file)) {
return policy_manager_->InitPT(preloaded_file);
}
- LOG4CXX_FATAL(logger_, "The file which contains preloaded PT is not exist");
+ LOG4CXX_WARN(logger_, "The file which contains preloaded PT is not exist");
return false;
}
@@ -293,7 +289,7 @@ bool PolicyHandler::ResetPolicyTable() {
}
bool PolicyHandler::ClearUserConsent() {
- LOG4CXX_AUTO_TRACE(logger_);
+ LOG4CXX_INFO(logger_, "Removing user consent records in policy table.");
POLICY_LIB_CHECK(false);
return policy_manager_->ResetUserConsent();
}
@@ -363,10 +359,56 @@ uint32_t PolicyHandler::GetAppIdForSending() {
return selected_app_id;
}
-void PolicyHandler::OnAppPermissionConsent(const uint32_t connection_key,
- const PermissionConsent& permissions) {
- LOG4CXX_AUTO_TRACE(logger_);
- AsyncRun(new AppPermissionDelegate(connection_key, permissions));
+DeviceConsent PolicyHandler::GetDeviceForSending(DeviceParams& device_params) {
+ POLICY_LIB_CHECK(kDeviceDisallowed);
+ uint32_t app_id = 0;
+ uint32_t app_id_previous = 0;
+ while (true) {
+ app_id = GetAppIdForSending();
+ if (!app_id) {
+ LOG4CXX_WARN(logger_,
+ "There is no appropriate application for sending PTS.");
+ return kDeviceDisallowed;
+ }
+
+ // If only one application is available, return its device params
+ if (app_id == app_id_previous) {
+ return kDeviceDisallowed;
+ }
+
+ app_id_previous = app_id;
+ application_manager::MessageHelper::GetDeviceInfoForApp(app_id,
+ &device_params);
+
+ DeviceConsent consent = policy_manager_->GetUserConsentForDevice(
+ device_params.device_mac_address);
+ switch (consent) {
+ case kDeviceAllowed:
+ return consent;
+ case kDeviceDisallowed:
+ continue;
+ case kDeviceHasNoConsent:
+ return consent;
+ default:
+ LOG4CXX_WARN(logger_, "Consent result is not impelemented.");
+ return consent;
+ }
+ }
+ return kDeviceDisallowed;
+}
+
+const std::string PolicyHandler::ConvertUpdateStatus(PolicyTableStatus status) {
+ switch (status) {
+ case policy::StatusUpdatePending:
+ return "UPDATING";
+ case policy::StatusUpdateRequired:
+ return "UPDATE_NEEDED";
+ case policy::StatusUpToDate:
+ return "UP_TO_DATE";
+ default: {
+ return "UNKNOWN";
+ }
+ }
}
void PolicyHandler::OnDeviceConsentChanged(const std::string& device_id,
@@ -406,38 +448,23 @@ void PolicyHandler::OnDeviceConsentChanged(const std::string& device_id,
}
}
-void PolicyHandler::OnPTExchangeNeeded() {
- POLICY_LIB_CHECK_VOID();
- policy_manager_->ForcePTExchange();
-}
-
-void PolicyHandler::GetAvailableApps(std::queue<std::string>& apps) {
- LOG4CXX_INFO(logger_, "GetAvailable apps");
- application_manager::ApplicationManagerImpl::ApplicationListAccessor accessor;
- const ApplicationList app_list = accessor.applications();
- ApplicationList::const_iterator iter = app_list.begin();
-
- for (;app_list.end() != iter; ++iter) {
- LOG4CXX_INFO(logger_, "one more app");
- apps.push((*iter)->mobile_app_id()->asString());
- }
-}
-
void PolicyHandler::AddApplication(const std::string& application_id) {
+ // TODO (AGaliuzov): remove this workaround during refactoring.
+ registration_in_progress = true;
POLICY_LIB_CHECK_VOID();
policy_manager_->AddApplication(application_id);
}
void PolicyHandler::SetDeviceInfo(std::string& device_id,
const DeviceInfo& device_info) {
- LOG4CXX_AUTO_TRACE(logger_);
+ LOG4CXX_INFO(logger_, "SetDeviceInfo");
POLICY_LIB_CHECK_VOID();
policy_manager_->SetDeviceInfo(device_id, device_info);
}
-void PolicyHandler::OnAppPermissionConsentInternal(
- const uint32_t connection_key, PermissionConsent &permissions) {
- LOG4CXX_AUTO_TRACE(logger_);
+void PolicyHandler::OnAppPermissionConsent(const uint32_t connection_key,
+ PermissionConsent &permissions) {
+ LOG4CXX_INFO(logger_, "OnAppPermissionConsent");
POLICY_LIB_CHECK_VOID();
if (connection_key) {
application_manager::ApplicationSharedPtr app =
@@ -461,7 +488,6 @@ void PolicyHandler::OnAppPermissionConsentInternal(
return;
}
- sync_primitives::AutoLock lock(app_to_device_link_lock_);
if (!app_to_device_link_.size()) {
LOG4CXX_WARN(logger_, "There are no applications previously stored for "
"setting common permissions.");
@@ -505,7 +531,7 @@ void PolicyHandler::OnAppPermissionConsentInternal(
void PolicyHandler::OnGetUserFriendlyMessage(
const std::vector<std::string>& message_codes, const std::string& language,
uint32_t correlation_id) {
- LOG4CXX_AUTO_TRACE(logger_);
+ LOG4CXX_INFO(logger_, "OnGetUserFriendlyMessage");
POLICY_LIB_CHECK_VOID();
std::vector<UserFriendlyMessage> result = policy_manager_
->GetUserFriendlyMessages(message_codes, language);
@@ -516,12 +542,11 @@ void PolicyHandler::OnGetUserFriendlyMessage(
void PolicyHandler::OnGetListOfPermissions(const uint32_t connection_key,
const uint32_t correlation_id) {
- LOG4CXX_AUTO_TRACE(logger_);
+ LOG4CXX_INFO(logger_, "OnGetListOfPermissions");
POLICY_LIB_CHECK_VOID();
// If no specific app was passed, get permissions for all currently registered
// applications
if (!connection_key) {
- sync_primitives::AutoLock lock(app_to_device_link_lock_);
LinkAppToDevice linker(app_to_device_link_);
application_manager::ApplicationManagerImpl::ApplicationListAccessor accessor;
const ApplicationList app_list = accessor.applications();
@@ -579,20 +604,22 @@ void PolicyHandler::OnGetListOfPermissions(const uint32_t connection_key,
}
void PolicyHandler::OnGetStatusUpdate(const uint32_t correlation_id) {
- LOG4CXX_AUTO_TRACE(logger_);
+ LOG4CXX_INFO(logger_, "OnGetStatusUpdate");
POLICY_LIB_CHECK_VOID();
+ policy::PolicyTableStatus status = policy_manager_->GetPolicyTableStatus();
application_manager::MessageHelper::SendGetStatusUpdateResponse(
- policy_manager_->GetPolicyTableStatus(), correlation_id);
+ ConvertUpdateStatus(status), correlation_id);
}
-void PolicyHandler::OnUpdateStatusChanged(const std::string& status) {
- LOG4CXX_AUTO_TRACE(logger_);
- application_manager::MessageHelper::SendOnStatusUpdate(status);
+void PolicyHandler::OnUpdateStatusChanged(PolicyTableStatus status) {
+ LOG4CXX_INFO(logger_, "OnUpdateStatusChanged");
+ application_manager::MessageHelper::SendOnStatusUpdate(
+ ConvertUpdateStatus(status));
}
std::string PolicyHandler::OnCurrentDeviceIdUpdateRequired(
const std::string& policy_app_id) {
- LOG4CXX_AUTO_TRACE(logger_);
+ LOG4CXX_INFO(logger_, "OnCurrentDeviceIdUpdateRequired");
application_manager::ApplicationSharedPtr app =
application_manager::ApplicationManagerImpl::instance()
->application_by_policy_id(policy_app_id);
@@ -609,7 +636,7 @@ std::string PolicyHandler::OnCurrentDeviceIdUpdateRequired(
}
void PolicyHandler::OnSystemInfoChanged(const std::string& language) {
- LOG4CXX_AUTO_TRACE(logger_);
+ LOG4CXX_INFO(logger_, "OnSystemInfoChanged");
POLICY_LIB_CHECK_VOID();
policy_manager_->SetSystemLanguage(language);
}
@@ -617,13 +644,13 @@ void PolicyHandler::OnSystemInfoChanged(const std::string& language) {
void PolicyHandler::OnGetSystemInfo(const std::string& ccpu_version,
const std::string& wers_country_code,
const std::string& language) {
- LOG4CXX_AUTO_TRACE(logger_);
+ LOG4CXX_INFO(logger_, "OnGetSystemInfo");
POLICY_LIB_CHECK_VOID();
policy_manager_->SetSystemInfo(ccpu_version, wers_country_code, language);
}
void PolicyHandler::OnSystemInfoUpdateRequired() {
- LOG4CXX_AUTO_TRACE(logger_);
+ LOG4CXX_INFO(logger_, "OnSystemInfoUpdateRequired");
POLICY_LIB_CHECK_VOID();
application_manager::MessageHelper::SendGetSystemInfoRequest();
}
@@ -672,7 +699,7 @@ void PolicyHandler::OnAppRevoked(const std::string& policy_app_id) {
void PolicyHandler::OnPendingPermissionChange(
const std::string& policy_app_id) {
- LOG4CXX_DEBUG(logger_, "PolicyHandler::OnPendingPermissionChange for "
+ LOG4CXX_INFO(logger_, "PolicyHandler::OnPendingPermissionChange for "
<< policy_app_id);
POLICY_LIB_CHECK_VOID();
application_manager::ApplicationSharedPtr app =
@@ -701,15 +728,15 @@ void PolicyHandler::OnPendingPermissionChange(
SendOnAppPermissionsChangedNotification(app->app_id(), permissions);
policy_manager_->RemovePendingPermissionChanges(policy_app_id);
- break;
}
+ break;
}
case mobile_apis::HMILevel::HMI_BACKGROUND: {
if (permissions.isAppPermissionsRevoked) {
application_manager::MessageHelper::
SendOnAppPermissionsChangedNotification(app->app_id(), permissions);
- policy_manager_->RemovePendingPermissionChanges(policy_app_id);
+ policy_manager_->RemovePendingPermissionChanges(policy_app_id);
}
break;
}
@@ -736,15 +763,11 @@ void PolicyHandler::OnPendingPermissionChange(
}
}
-bool PolicyHandler::SendMessageToSDK(const BinaryMessage& pt_string,
- const std::string& url) {
- LOG4CXX_AUTO_TRACE(logger_);
+bool PolicyHandler::SendMessageToSDK(const BinaryMessage& pt_string) {
+ LOG4CXX_INFO(logger_, "PolicyHandler::SendMessageToSDK");
POLICY_LIB_CHECK(false);
- if (last_used_app_ids_.empty()) {
- LOG4CXX_WARN(logger_, "last_used_app_ids_ is empty");
- return false;
- }
+ std::string url;
uint32_t app_id = last_used_app_ids_.back();
application_manager::ApplicationSharedPtr app =
@@ -763,13 +786,15 @@ bool PolicyHandler::SendMessageToSDK(const BinaryMessage& pt_string,
" has no application id.");
return false;
}
+ url = policy_manager_->GetUpdateUrl(PolicyServiceTypes::POLICY);
- LOG4CXX_DEBUG(logger_, "Update url is " << url << " for application "
+ LOG4CXX_INFO(logger_, "Update url is " << url << " for application "
<< application_manager::ApplicationManagerImpl::instance()
->application(app_id)->name());
- application_manager::MessageHelper::SendPolicySnapshotNotification(
- app_id, pt_string, url, 0);
+ application_manager::MessageHelper::SendPolicySnapshotNotification(app_id,
+ pt_string,
+ url, 0);
return true;
}
@@ -778,16 +803,24 @@ bool PolicyHandler::ReceiveMessageFromSDK(const std::string& file,
const BinaryMessage& pt_string) {
POLICY_LIB_CHECK(false);
+ if (policy_manager_->GetPolicyTableStatus() !=
+ PolicyTableStatus::StatusUpdatePending) {
+ LOG4CXX_WARN(logger_, "PTU processing skipped, since current status is "
+ "different from pending.");
+ return false;
+ }
+
bool ret = policy_manager_->LoadPT(file, pt_string);
LOG4CXX_INFO(logger_, "Policy table is saved: " << std::boolalpha << ret);
if (ret) {
LOG4CXX_INFO(logger_, "PTU was successful.");
+ exchange_handler_->Stop();
policy_manager_->CleanupUnpairedDevices();
int32_t correlation_id =
application_manager::ApplicationManagerImpl::instance()
->GetNextHMICorrelationID();
- event_observer_->subscribe_on_event(
+ event_observer_.get()->subscribe_on_event(
#ifdef HMI_DBUS_API
hmi_apis::FunctionID::VehicleInfo_GetOdometer, correlation_id
#else
@@ -806,25 +839,54 @@ bool PolicyHandler::ReceiveMessageFromSDK(const std::string& file,
}
bool PolicyHandler::UnloadPolicyLibrary() {
- LOG4CXX_AUTO_TRACE(logger_);
- LOG4CXX_DEBUG(logger_, "policy_manager_ = " << policy_manager_);
+ LOG4CXX_TRACE(logger_, "enter. policy_manager_ = " << policy_manager_);
bool ret = true;
- AsyncRunner::Stop();
- sync_primitives::AutoWriteLock lock(policy_manager_lock_);
if (policy_manager_) {
- policy_manager_.reset();
+ policy_manager_.release();
}
if (dl_handle_) {
ret = (dlclose(dl_handle_) == 0);
dl_handle_ = 0;
}
+ exchange_handler_->Stop();
LOG4CXX_TRACE(logger_, "exit");
return ret;
}
+void PolicyHandler::StartPTExchange(bool skip_device_selection) {
+ LOG4CXX_INFO(logger_, "PolicyHandler::StartPTExchange");
+ POLICY_LIB_CHECK_VOID();
+
+ if (policy_manager_->GetPolicyTableStatus() ==
+ PolicyTableStatus::StatusUpdatePending) {
+ LOG4CXX_INFO(logger_, "Starting exchange skipped, since another exchange "
+ "is in progress.");
+ return;
+ }
+
+ if (!skip_device_selection) {
+ DeviceParams device_params;
+ DeviceConsent consent = GetDeviceForSending(device_params);
+ switch (consent) {
+ case kDeviceHasNoConsent:
+ // Send OnSDLConsentNeeded to HMI for user consent on device usage
+ pending_device_handles_.push_back(device_params.device_handle);
+ application_manager::MessageHelper::SendOnSDLConsentNeeded(
+ device_params);
+ return;
+ case kDeviceDisallowed:
+ return;
+ default:
+ break;
+ }
+ }
+
+ exchange_handler_->Start();
+}
+
void PolicyHandler::OnAllowSDLFunctionalityNotification(bool is_allowed,
uint32_t device_id) {
- LOG4CXX_AUTO_TRACE(logger_);
+ LOG4CXX_INFO(logger_, "OnAllowSDLFunctionalityNotification");
POLICY_LIB_CHECK_VOID();
// Device ids, need to be changed
std::set<uint32_t> device_ids;
@@ -882,17 +944,26 @@ void PolicyHandler::OnAllowSDLFunctionalityNotification(bool is_allowed,
pending_device_handles_.erase(it);
}
+// EXTENDED_POLICY
+ // Skip device selection, since user already consented device usage
+ StartPTExchange(true);
}
void PolicyHandler::OnIgnitionCycleOver() {
- LOG4CXX_AUTO_TRACE(logger_);
+ LOG4CXX_INFO(logger_, "OnIgnitionCycleOver");
POLICY_LIB_CHECK_VOID();
policy_manager_->IncrementIgnitionCycles();
}
+void PolicyHandler::KmsChanged(int kms) {
+ LOG4CXX_INFO(logger_, "PolicyHandler::KmsChanged " << kms << " kilometers");
+ POLICY_LIB_CHECK_VOID();
+ PTExchangeAtOdometer(kms);
+}
+
void PolicyHandler::OnActivateApp(uint32_t connection_key,
uint32_t correlation_id) {
- LOG4CXX_AUTO_TRACE(logger_);
+ LOG4CXX_INFO(logger_, "OnActivateApp");
application_manager::ApplicationSharedPtr app =
application_manager::ApplicationManagerImpl::instance()->application(
@@ -905,7 +976,6 @@ void PolicyHandler::OnActivateApp(uint32_t connection_key,
AppPermissions permissions(policy_app_id);
- sync_primitives::AutoReadLock lock(policy_manager_lock_);
if (!policy_manager_) {
LOG4CXX_WARN(logger_, "The shared library of policy is not loaded");
if (!PolicyEnabled()) {
@@ -920,36 +990,84 @@ void PolicyHandler::OnActivateApp(uint32_t connection_key,
policy_app_id);
permissions.isSDLAllowed = true;
+
+ if (permissions.isSDLAllowed &&
+ PolicyTableStatus::StatusUpdateRequired ==
+ policy_manager_->GetPolicyTableStatus()) {
+ StartPTExchange();
+ }
policy_manager_->RemovePendingPermissionChanges(policy_app_id);
}
+
+ bool is_app_activated = false;
// If application is revoked it should not be activated
// In this case we need to activate application
if (false == permissions.appRevoked && true == permissions.isSDLAllowed) {
- LOG4CXX_INFO(logger_, "Application will be activated");
- if (application_manager::ApplicationManagerImpl::instance()->ActivateApplication(app)) {
- application_manager::MessageHelper::SendHMIStatusNotification(*(app.get()));
- }
- } else {
- LOG4CXX_INFO(logger_, "Application should not be activated");
+ is_app_activated =
+ application_manager::ApplicationManagerImpl::instance()->
+ ActivateApplication(app);
}
last_activated_app_id_ = connection_key;
application_manager::MessageHelper::SendSDLActivateAppResponse(permissions,
correlation_id);
+ if (is_app_activated) {
+ application_manager::MessageHelper::SendHMIStatusNotification(*app.get());
+ }
+}
+
+void PolicyHandler::PTExchangeAtRegistration(const std::string& app_id) {
+ LOG4CXX_INFO(logger_, "PTExchangeAtIgnition");
+ POLICY_LIB_CHECK_VOID();
+
+ if (policy_manager_->IsAppInUpdateList(app_id)) {
+ StartPTExchange();
+ } else if (false == on_ignition_check_done_) { // TODO(AG): add cond. var to handle this case.
+ TimevalStruct current_time = date_time::DateTime::getCurrentTime();
+ const int kSecondsInDay = 60 * 60 * 24;
+ int days = current_time.tv_sec / kSecondsInDay;
+
+ LOG4CXX_INFO(
+ logger_,
+ "\nIgnition cycles exceeded: " << std::boolalpha <<
+ policy_manager_->ExceededIgnitionCycles()
+ << "\nDays exceeded: " << std::boolalpha
+ << policy_manager_->ExceededDays(days)
+ << "\nStatusUpdateRequired: " << std::boolalpha
+ << (policy_manager_->GetPolicyTableStatus() == StatusUpdateRequired));
+ if (policy_manager_->ExceededIgnitionCycles()
+ || policy_manager_->ExceededDays(days)
+ || policy_manager_->GetPolicyTableStatus() == StatusUpdateRequired) {
+ StartPTExchange();
+ }
+ }
+ on_ignition_check_done_ = true;
}
-void PolicyHandler::KmsChanged(int kilometers) {
- LOG4CXX_DEBUG(logger_, "PolicyHandler::KmsChanged " << kilometers << " kilometers");
+void PolicyHandler::PTExchangeAtOdometer(int kilometers) {
POLICY_LIB_CHECK_VOID();
- policy_manager_->KmsChanged(kilometers);
+ if (policy_manager_->ExceededKilometers(kilometers)) {
+ LOG4CXX_INFO(logger_, "Enough kilometers passed to send for PT update.");
+ StartPTExchange();
+ }
}
void PolicyHandler::PTExchangeAtUserRequest(uint32_t correlation_id) {
LOG4CXX_TRACE(logger_, "PT exchange at user request");
POLICY_LIB_CHECK_VOID();
- std::string update_status = policy_manager_->ForcePTExchange();
- application_manager::MessageHelper::SendUpdateSDLResponse(update_status,
- correlation_id);
+ policy::PolicyTableStatus status = policy_manager_->GetPolicyTableStatus();
+ if (status != policy::StatusUpdatePending) {
+ OnPTExchangeNeeded();
+ status = policy::StatusUpdatePending;
+ } else {
+ is_user_requested_policy_table_update_ = true;
+ }
+ application_manager::MessageHelper::SendUpdateSDLResponse(
+ ConvertUpdateStatus(status), correlation_id);
+}
+
+void PolicyHandler::OnPTExchangeNeeded() {
+ StartPTExchange();
}
void PolicyHandler::OnPermissionsUpdated(const std::string& policy_app_id,
@@ -958,7 +1076,7 @@ void PolicyHandler::OnPermissionsUpdated(const std::string& policy_app_id,
application_manager::ApplicationSharedPtr app =
application_manager::ApplicationManagerImpl::instance()
->application_by_policy_id(policy_app_id);
- LOG4CXX_AUTO_TRACE(logger_);
+
if (!app.valid()) {
LOG4CXX_WARN(
logger_,
@@ -969,7 +1087,7 @@ void PolicyHandler::OnPermissionsUpdated(const std::string& policy_app_id,
application_manager::MessageHelper::SendOnPermissionsChangeNotification(
app->app_id(), permissions);
- LOG4CXX_DEBUG(
+ LOG4CXX_INFO(
logger_,
"Notification sent for application_id:" << policy_app_id
<< " and connection_key " << app->app_id());
@@ -986,7 +1104,7 @@ void PolicyHandler::OnPermissionsUpdated(const std::string& policy_app_id,
return;
}
if (current_hmi_level == hmi_level) {
- LOG4CXX_DEBUG(logger_, "Application already in default hmi state.");
+ LOG4CXX_INFO(logger_, "Application already in default hmi state.");
return;
}
switch (current_hmi_level) {
@@ -998,14 +1116,16 @@ void PolicyHandler::OnPermissionsUpdated(const std::string& policy_app_id,
// sent on response receiving.
if (mobile_apis::HMILevel::HMI_FULL == hmi_level) {
application_manager::MessageHelper::SendActivateAppToHMI(app->app_id());
- } else {
- // Set application hmi level
- app->set_hmi_level(hmi_level);
- // If hmi Level is full, it will be seted after ActivateApp response
- application_manager::MessageHelper::SendHMIStatusNotification(*app.get());
+ break;
+ }
+
+ // Set application hmi level
+ app->set_hmi_level(hmi_level);
+
+ // Send notification to mobile
+ application_manager::MessageHelper::SendHMIStatusNotification(*app.get());
}
break;
- }
default:
LOG4CXX_WARN(logger_, "Application " << policy_app_id << " is running."
"HMI level won't be changed.");
@@ -1013,33 +1133,6 @@ void PolicyHandler::OnPermissionsUpdated(const std::string& policy_app_id,
}
}
-bool PolicyHandler::SaveSnapshot(const BinaryMessage& pt_string,
- std::string& snap_path) {
- using namespace profile;
-
- const std::string& policy_snapshot_file_name = Profile::instance()->policies_snapshot_file_name();
- const std::string& system_files_path = Profile::instance()->system_files_path();
- snap_path = system_files_path + '/' + policy_snapshot_file_name;
-
- bool result = false;
- if (file_system::CreateDirectoryRecursively(system_files_path)) {
- result = file_system::WriteBinaryFile(snap_path, pt_string);
- }
-
- if (!result) {
- LOG4CXX_ERROR(logger_, "Failed to write snapshot file to " << snap_path);
- }
-
- return result;
-}
-
-void PolicyHandler::OnSnapshotCreated(const BinaryMessage& pt_string,
- const std::vector<int>& retry_delay_seconds,
- int timeout_exchange) {
- using namespace application_manager;
- SendMessageToSDK(pt_string, policy_manager_->GetUpdateUrl(POLICY));
-}
-
bool PolicyHandler::GetPriority(const std::string& policy_app_id,
std::string* priority) {
POLICY_LIB_CHECK(false);
@@ -1079,9 +1172,9 @@ bool PolicyHandler::GetInitialAppData(const std::string& application_id,
return policy_manager_->GetInitialAppData(application_id, nicknames, app_hmi_types);
}
-void PolicyHandler::GetUpdateUrls(int service_type, EndpointUrls& end_points) {
- POLICY_LIB_CHECK_VOID();
- policy_manager_->GetUpdateUrls(service_type, end_points);
+EndpointUrls PolicyHandler::GetUpdateUrls(int service_type) {
+ POLICY_LIB_CHECK(EndpointUrls());
+ return policy_manager_->GetUpdateUrls(service_type);
}
void PolicyHandler::ResetRetrySequence() {
@@ -1104,18 +1197,14 @@ void PolicyHandler::OnExceededTimeout() {
policy_manager_->OnExceededTimeout();
}
-void PolicyHandler::OnSystemReady() {
- POLICY_LIB_CHECK_VOID();
- policy_manager_->OnSystemReady();
-}
-
-void PolicyHandler::PTUpdatedAt(int kilometers, int days_after_epoch) {
- POLICY_LIB_CHECK_VOID();
- policy_manager_->PTUpdatedAt(kilometers, days_after_epoch);
+BinaryMessageSptr PolicyHandler::RequestPTUpdate() {
+ POLICY_LIB_CHECK(BinaryMessageSptr());
+ return policy_manager_->RequestPTUpdate();
}
-void PolicyHandler::set_listener(PolicyHandlerObserver* listener) {
- listener_ = listener;
+const std::vector<int> PolicyHandler::RetrySequenceDelaysSeconds() {
+ POLICY_LIB_CHECK(std::vector<int>());
+ return policy_manager_->RetrySequenceDelaysSeconds();
}
utils::SharedPtr<usage_statistics::StatisticsManager>
@@ -1173,15 +1262,22 @@ std::string PolicyHandler::GetAppName(const std::string& policy_app_id) {
return app->name();
}
-void PolicyHandler::OnUpdateHMIAppType(std::map<std::string, StringArray> app_hmi_types) {
- LOG4CXX_AUTO_TRACE(logger_);
- if (listener_) {
- listener_->OnUpdateHMIAppType(app_hmi_types);
+void PolicyHandler::OnUserRequestedUpdateCheckRequired() {
+ LOG4CXX_INFO(logger_, "OnUserRequestedUpdateCheckRequired");
+ POLICY_LIB_CHECK_VOID();
+ policy::PolicyTableStatus status = policy_manager_->GetPolicyTableStatus();
+ if (is_user_requested_policy_table_update_ &&
+ status != policy::StatusUpdatePending) {
+ is_user_requested_policy_table_update_ = false;
+ OnPTExchangeNeeded();
+ return;
}
+ LOG4CXX_WARN(logger_, "There is another pending update is present."
+ "User-requested update is postponed.");
}
void PolicyHandler::RemoveDevice(const std::string& device_id) {
- LOG4CXX_AUTO_TRACE(logger_);
+ LOG4CXX_INFO(logger_, "PolicyHandler::RemoveDevice");
POLICY_LIB_CHECK_VOID();
policy_manager_->MarkUnpairedDevice(device_id);
@@ -1196,7 +1292,7 @@ bool PolicyHandler::IsApplicationRevoked(const std::string& app_id) {
}
void PolicyHandler::OnUpdateRequestSentToMobile() {
- LOG4CXX_AUTO_TRACE(logger_);
+ LOG4CXX_INFO(logger_, "OnUpdateRequestSentToMobile");
POLICY_LIB_CHECK_VOID();
policy_manager_->OnUpdateStarted();
}
diff --git a/src/components/application_manager/src/request_controller.cc b/src/components/application_manager/src/request_controller.cc
index 37499b326c..5faabde458 100644
--- a/src/components/application_manager/src/request_controller.cc
+++ b/src/components/application_manager/src/request_controller.cc
@@ -49,61 +49,70 @@ RequestController::RequestController()
: pool_state_(UNDEFINED),
pool_size_(profile::Profile::instance()->thread_pool_size()),
pending_request_set_lock_(true),
- timer_("RequestCtrlTimer", this, &RequestController::onTimer, true),
- is_low_voltage_(false) {
- LOG4CXX_AUTO_TRACE(logger_);
+ timer_("RequestCtrlTimer", this, &RequestController::onTimer, true)
+{
+ LOG4CXX_INFO(logger_, "RequestController::RequestController()");
InitializeThreadpool();
timer_.start(dafault_sleep_time_);
+ LOG4CXX_DEBUG(logger_," Create timer thread ; timer thread = " << timer_.thread_->thread_handle());
}
RequestController::~RequestController() {
- LOG4CXX_AUTO_TRACE(logger_);
+ LOG4CXX_TRACE_ENTER(logger_);
if (pool_state_ != TPoolState::STOPPED) {
DestroyThreadpool();
}
+
+ pool_.clear();
+ mobile_request_list_.clear();
+ pending_request_set_.clear();
}
-void RequestController::InitializeThreadpool() {
- LOG4CXX_AUTO_TRACE(logger_);
+void RequestController::InitializeThreadpool()
+{
+ LOG4CXX_TRACE_ENTER(logger_);
// TODO: Consider lazy loading threads instead of creating all at once
pool_state_ = TPoolState::STARTED;
- char name[50];
for (uint32_t i = 0; i < pool_size_; i++) {
- snprintf(name, sizeof(name)/sizeof(name[0]), "AM Pool %d", i);
+ char name [50];
+ snprintf(name, sizeof(name)/sizeof(name[0]),
+ "AM Pool %d", i);
pool_.push_back(threads::CreateThread(name, new Worker(this)));
pool_[i]->start();
- LOG4CXX_DEBUG(logger_, "Request thread initialized: " << name);
+ LOG4CXX_INFO(logger_, "Request thread initialized: " << name);
}
}
void RequestController::DestroyThreadpool() {
- LOG4CXX_AUTO_TRACE(logger_);
+ LOG4CXX_TRACE_ENTER(logger_);
{
- sync_primitives::AutoLock auto_lock(mobile_request_list_lock_);
+ sync_primitives::AutoLock auto_lock (mobile_request_list_lock_);
pool_state_ = TPoolState::STOPPED;
- LOG4CXX_DEBUG(logger_, "Broadcasting STOP signal to all threads...");
- cond_var_.Broadcast(); // notify all threads we are shutting down
+ LOG4CXX_INFO(logger_, "Broadcasting STOP signal to all threads...");
+ cond_var_.Broadcast(); // notify all threads we are shutting down
}
- for (size_t i = 0; i < pool_.size(); i++) {
- Thread* thread = pool_[i];
- thread->join();
- delete thread->delegate();
- threads::DeleteThread(thread);
+ for (uint32_t i = 0; i < pool_size_; i++) {
+ pool_[i]->stop();
+ threads::DeleteThread(pool_[i]);
}
- pool_.clear();
+ LOG4CXX_INFO(logger_, "Threads exited from the thread pool " << pool_size_);
}
RequestController::TResult RequestController::addMobileRequest(
- const RequestPtr request,
+ const MobileRequestPtr& request,
const mobile_apis::HMILevel::eType& hmi_level) {
+ LOG4CXX_TRACE_ENTER(logger_);
if (!request.valid()) {
- LOG4CXX_ERROR(logger_, "Null Pointer request");
+ LOG4CXX_INFO(logger_, "Null Pointer request");
+ LOG4CXX_TRACE_EXIT(logger_);
cond_var_.NotifyOne();
return INVALID_DATA;
}
- LOG4CXX_DEBUG(logger_, "ENTER correlation_id : " << request->correlation_id()
- << "connection_key : " << request->connection_key());
+ TResult result = SUCCESS;
+ const commands::CommandRequestImpl* request_impl =
+ static_cast<commands::CommandRequestImpl*>(request.get());
+ LOG4CXX_DEBUG(logger_, "addMobileRequest " << request_impl->correlation_id());
const uint32_t& app_hmi_level_none_time_scale =
profile::Profile::instance()->app_hmi_level_none_time_scale();
@@ -119,239 +128,206 @@ RequestController::TResult RequestController::addMobileRequest(
const uint32_t& pending_requests_amount =
profile::Profile::instance()->pending_requests_amount();
- if (!CheckHMILevelTimeScaleMaxRequest(mobile_apis::HMILevel::HMI_NONE,
- request->connection_key(),
+ if (!checkHMILevelTimeScaleMaxRequest(mobile_apis::HMILevel::HMI_NONE,
+ request_impl->connection_key(),
app_hmi_level_none_time_scale,
app_hmi_level_none_max_request_per_time_scale)) {
LOG4CXX_ERROR(logger_, "Too many application requests in hmi level NONE");
- return RequestController::NONE_HMI_LEVEL_MANY_REQUESTS;
- }
- if (!CheckTimeScaleMaxRequest(request->connection_key(),
- app_time_scale,
- max_request_per_time_scale)) {
+ result = RequestController::NONE_HMI_LEVEL_MANY_REQUESTS;
+ } else if (!checkTimeScaleMaxRequest(
+ request_impl->connection_key(),
+ app_time_scale, max_request_per_time_scale)) {
LOG4CXX_ERROR(logger_, "Too many application requests");
- return RequestController::TOO_MANY_REQUESTS;
- }
- if (!CheckPendingRequestsAmount(pending_requests_amount)) {
+ result = RequestController::TOO_MANY_REQUESTS;
+ } else if (pending_requests_amount == mobile_request_list_.size()) {
LOG4CXX_ERROR(logger_, "Too many pending request");
- return RequestController::TOO_MANY_PENDING_REQUESTS;
+ result = RequestController::TOO_MANY_PENDING_REQUESTS;
}
{
- AutoLock auto_lock_list(mobile_request_list_lock_);
- AutoLock auto_lock_set(pending_request_set_lock_);
+ AutoLock auto_lock(mobile_request_list_lock_);
+
mobile_request_list_.push_back(request);
- LOG4CXX_DEBUG(logger_,
- "new mobile_request_list_ size is " << mobile_request_list_.size()
- << ", pending_request_set_ size is " << pending_request_set_.size());
- // wake up one thread that is waiting for a task to be available
+ LOG4CXX_INFO(logger_, "mobile_request_list_ size is "
+ << mobile_request_list_.size()
+ << " pending_request_set_ size is "
+ << pending_request_set_.size()
+ );
}
+
+ // wake up one thread that is waiting for a task to be available
cond_var_.NotifyOne();
- return SUCCESS;
+ LOG4CXX_TRACE_EXIT(logger_);
+ return result;
}
RequestController::TResult RequestController::addHMIRequest(
const RequestPtr request) {
+ LOG4CXX_TRACE_ENTER(logger_);
DCHECK(request.valid());
- if (!request.valid()) {
- LOG4CXX_ERROR(logger_, "HMI request pointer is invalid");
- return RequestController::INVALID_DATA;
- }
- LOG4CXX_DEBUG(logger_, "ENTER addHMIRequest : " << request->correlation_id());
+ LOG4CXX_DEBUG(logger_, "addHMIRequest " << request->correlation_id());
- const uint32_t timeout_in_seconds =
- request->default_timeout() / date_time::DateTime::MILLISECONDS_IN_SECOND;
+ uint32_t timeout_in_seconds = request->default_timeout()/date_time::DateTime::MILLISECONDS_IN_SECOND;
RequestInfoPtr request_info_ptr =
new HMIRequestInfo(request,
timeout_in_seconds);
if (0 != timeout_in_seconds) {
- AutoLock auto_lock(pending_request_set_lock_);
+ pending_request_set_lock_.Acquire();
pending_request_set_.insert(request_info_ptr);
LOG4CXX_INFO(logger_, "pending_request_set_ size is "
<< pending_request_set_.size());
UpdateTimer();
+ pending_request_set_lock_.Release();
} else {
LOG4CXX_INFO(logger_, "Default timeout was set to 0."
"RequestController will not track timeout of this request.");
}
+ LOG4CXX_TRACE_EXIT(logger_);
return RequestController::SUCCESS;
}
void RequestController::addNotification(const RequestPtr ptr) {
- LOG4CXX_AUTO_TRACE(logger_);
+ LOG4CXX_TRACE_ENTER(logger_);
notification_list_.push_back(ptr);
+ LOG4CXX_TRACE_EXIT(logger_);
}
void RequestController::removeNotification(const commands::Command* notification) {
- LOG4CXX_AUTO_TRACE(logger_);
+ LOG4CXX_TRACE_ENTER(logger_);
std::list<RequestPtr>::iterator it = notification_list_.begin();
- for (; notification_list_.end() != it; ) {
+ for (; notification_list_.end() != it; ++it) {
if (it->get() == notification) {
- notification_list_.erase(it++);
+ notification_list_.erase(it);
break;
- } else {
- ++it;
}
}
+ LOG4CXX_TRACE_EXIT(logger_);
}
void RequestController::terminateMobileRequest(
- const uint32_t& mobile_correlation_id,
- const uint32_t& connection_key) {
+ const uint32_t& mobile_correlation_id) {
+ LOG4CXX_TRACE_ENTER(logger_);
+
AutoLock auto_lock(pending_request_set_lock_);
- LOG4CXX_TRACE(logger_, "ENTER corr_id = " << mobile_correlation_id
- << " connection_key = " << connection_key);
RequestInfoSet::iterator it = pending_request_set_.begin();
for (; pending_request_set_.end() != it; ++it) {
- RequestInfoPtr request_info = (*it);
- if ((false == request_info.valid()) ||
- RequestInfo::MobileRequest != request_info->requst_type()||
- connection_key != request_info->app_id()) {
+ RequestInfo* mobile_request_info = it->get();
+ if (NULL == mobile_request_info) {
continue;
}
- if (mobile_correlation_id == request_info->requestId()) {
- request_info->request()->CleanUp();
+ if (mobile_correlation_id == mobile_request_info->requestId()) {
+ mobile_request_info->request()->CleanUp();
pending_request_set_.erase(it);
LOG4CXX_INFO(logger_, "Mobile request terminated: " << mobile_correlation_id <<
" pending_request_set_ size : " << pending_request_set_.size());
UpdateTimer();
+ LOG4CXX_TRACE_EXIT(logger_);
return;
}
}
LOG4CXX_INFO(logger_, "Mobile request NOT terminated: " << mobile_correlation_id <<
" pending_request_set_ size : " << pending_request_set_.size());
+ LOG4CXX_TRACE_EXIT(logger_);
}
void RequestController::terminateHMIRequest(const uint32_t &correlation_id) {
+ LOG4CXX_TRACE_ENTER(logger_);
AutoLock auto_lock(pending_request_set_lock_);
- LOG4CXX_TRACE(logger_, "ENTER correlation_id = " << correlation_id);
RequestInfoSet::iterator it = pending_request_set_.begin();
for (; pending_request_set_.end() != it; ++it) {
- RequestInfoPtr request_info = (*it);
- if ((false == request_info.valid()) ||
- RequestInfo::HMIRequest != request_info->requst_type() ||
- (0 != request_info->app_id())) {
+ RequestInfo* hmi_request_info = it->get();
+ if (NULL == hmi_request_info) {
continue;
}
- if (correlation_id == request_info->requestId()) {
- request_info->request()->CleanUp();
+ if (correlation_id == hmi_request_info->requestId()) {
+ hmi_request_info->request()->CleanUp();
pending_request_set_.erase(it);
LOG4CXX_DEBUG(logger_, "HMI request terminated: " << correlation_id);
UpdateTimer();
+ LOG4CXX_TRACE_EXIT(logger_);
return;
}
}
LOG4CXX_INFO(logger_, "HMI request NOT terminated: " << correlation_id <<
" pending_request_set_ size : " << pending_request_set_.size());
+ LOG4CXX_TRACE_EXIT(logger_);
}
void RequestController::terminateAppRequests(
const uint32_t& app_id) {
- LOG4CXX_INFO(logger_, "ENTER terminate all app requests : " << app_id
- << " mobile_request_list_ size is : " << mobile_request_list_.size()
- << " pending_request_set_ size is : " << pending_request_set_.size());
-
- AutoLock mobile_requests_auto_lock(mobile_request_list_lock_);
- std::list<RequestPtr>::iterator request_it = mobile_request_list_.begin();
- while (mobile_request_list_.end() != request_it) {
- RequestPtr request = (*request_it);
- if ((request.valid()) && (request->connection_key() == app_id)) {
- mobile_request_list_.erase(request_it++);
- } else {
- ++request_it;
- }
- }
+ LOG4CXX_TRACE_ENTER(logger_);
AutoLock auto_lock(pending_request_set_lock_);
RequestInfoSet::iterator it = pending_request_set_.begin();
while (pending_request_set_.end() != it) {
- RequestInfoPtr request_info = (*it);
- if ((false == request_info.valid()) ||
- RequestInfo::MobileRequest != request_info->requst_type()) {
+ RequestInfo* mobile_request_info = it->get();
+ if (NULL == mobile_request_info) {
++it;
continue;
}
- if (request_info->app_id() == app_id) {
- request_info->request()->CleanUp();
+ if (mobile_request_info->app_id() == app_id) {
+ mobile_request_info->request()->CleanUp();
pending_request_set_.erase(it++);
+ LOG4CXX_INFO(logger_, "terminated all app requests : " << app_id);
} else {
++it;
}
}
-
- LOG4CXX_INFO(logger_, "EXIT terminate all app requests : " << app_id
- << " mobile_request_list_ size is : " << mobile_request_list_.size()
- << " pending_request_set_ size is : " << pending_request_set_.size());
-
UpdateTimer();
+ LOG4CXX_TRACE_EXIT(logger_);
}
void RequestController::terminateAllHMIRequests() {
- LOG4CXX_AUTO_TRACE(logger_);
+ LOG4CXX_TRACE_ENTER(logger_);
AutoLock auto_lock(pending_request_set_lock_);
RequestInfoSet::iterator it = pending_request_set_.begin();
while (pending_request_set_.end() != it) {
- RequestInfoPtr request_info = (*it);
- if ((false == request_info.valid()) ||
- RequestInfo::HMIRequest != request_info->requst_type()) {
+ RequestInfo* hmi_request_info = it->get();
+ if (NULL == hmi_request_info) {
++it;
continue;
}
- request_info->request()->CleanUp();
+ hmi_request_info->request()->CleanUp();
pending_request_set_.erase(it++);
LOG4CXX_INFO(logger_, "HMI request terminated: ");
}
-}
-void RequestController::terminateAllMobileRequests() {
- LOG4CXX_AUTO_TRACE(logger_);
- AutoLock auto_lock(pending_request_set_lock_);
- RequestInfoSet::iterator it = pending_request_set_.begin();
- while (pending_request_set_.end() != it) {
- RequestInfoPtr request_info = (*it);
- if ((false == request_info.valid()) ||
- RequestInfo::MobileRequest != request_info->requst_type()) {
- ++it;
- continue;
- }
- request_info->request()->CleanUp();
- LOG4CXX_INFO(logger_, "Mobile request terminated: "
- << request_info->requestId());
- pending_request_set_.erase(it++);
- }
- UpdateTimer();
+ LOG4CXX_TRACE_EXIT(logger_);
}
void RequestController::updateRequestTimeout(
const uint32_t& app_id,
const uint32_t& mobile_correlation_id,
const uint32_t& new_timeout) {
- LOG4CXX_TRACE(logger_, " ENTER app_id : " << app_id
- << " mobile_correlation_id : " << mobile_correlation_id
- << " new_timeout : " << new_timeout);
+
+ LOG4CXX_TRACE_ENTER(logger_);
+
AutoLock auto_lock(pending_request_set_lock_);
RequestInfoSet::iterator it = pending_request_set_.begin();
+ RequestInfo* mobile_request_info = NULL;
RequestInfoPtr request_info;
for (; pending_request_set_.end() != it; ++it) {
request_info = *it;
if (false == request_info.valid()) {
- LOG4CXX_ERROR(logger_, "Invalid request pointer in pending_request_set_");
+ LOG4CXX_ERROR(logger_, "Invalid request, can't update timeout");
continue;
}
- if (RequestInfo::MobileRequest != request_info->requst_type()) {
+ mobile_request_info = request_info.get();
+ if (NULL == mobile_request_info) {
continue;
}
- if (app_id == request_info->app_id() &&
- mobile_correlation_id == request_info->requestId()) {
+ if (app_id == mobile_request_info->app_id() &&
+ mobile_correlation_id == mobile_request_info->requestId()) {
break;
}
}
if (it != pending_request_set_.end()) {
+ DCHECK(mobile_request_info);
DCHECK(request_info.valid());
uint32_t timeout_in_seconds = new_timeout/date_time::DateTime::MILLISECONDS_IN_SECOND;
- request_info->updateTimeOut(timeout_in_seconds);
+ mobile_request_info->updateTimeOut(timeout_in_seconds);
pending_request_set_.erase(it);
pending_request_set_.insert(request_info);
// erase and insert need to update ordering of set
@@ -363,67 +339,33 @@ void RequestController::updateRequestTimeout(
} else {
LOG4CXX_ERROR(logger_, "Can't find request with "
<< " app_id " << app_id
- << " mobile_correlation_id " << mobile_correlation_id);
+ << " mobile_correlation_id " << mobile_correlation_id );
}
}
-void RequestController::OnLowVoltage() {
- LOG4CXX_AUTO_TRACE(logger_);
- is_low_voltage_ = true;
-}
-
-void RequestController::OnWakeUp() {
- LOG4CXX_AUTO_TRACE(logger_);
- terminateAllHMIRequests();
- terminateAllMobileRequests();
- is_low_voltage_ = false;
- LOG4CXX_DEBUG(logger_, "Terminate old requests done");
-}
-
-bool RequestController::IsLowVoltage() {
- LOG4CXX_TRACE(logger_, "result: " << is_low_voltage_);
- return is_low_voltage_;
-}
-
void RequestController::onTimer() {
+ LOG4CXX_TRACE_ENTER(logger_);
AutoLock auto_lock(pending_request_set_lock_);
- LOG4CXX_TRACE(logger_, "ENTER pending_request_set_ size :"
- << pending_request_set_.size());
RequestInfoSet::iterator probably_expired = pending_request_set_.begin();
- while (probably_expired != pending_request_set_.end()) {
+ while (pending_request_set_.end() != probably_expired) {
RequestInfoPtr request = *probably_expired;
- if (false == request.valid()) {
- LOG4CXX_ERROR(logger_, "Invalid pointer in pending_request_set_");
- pending_request_set_.erase(probably_expired);
- probably_expired = pending_request_set_.begin();
- continue;
- }
if (request->timeout_sec() == 0) {
- // FIXME(EZamakhov): inf loop on true
- LOG4CXX_DEBUG(logger_, "Ignore " << request->requestId());
+ LOG4CXX_INFO(logger_, "Ignore " << request->requestId());
++probably_expired;
// This request should not be observed for TIME_OUT
continue;
}
if (request->isExpired()) {
- LOG4CXX_INFO(logger_, "Timeout for "
- << (RequestInfo::HMIRequest == request->requst_type() ? "HMI": "Mobile")
- << " request. id: " << request->requestId()
- << " connection_key: " << request->app_id() << " is expired");
-
- // Mobile Requests will be erased by TIME_OUT response;
+ pending_request_set_.erase(probably_expired);
request->request()->onTimeOut();
- if (RequestInfo::HMIRequest == request->requst_type()) {
- pending_request_set_.erase(probably_expired);
- }
- // If request is ersed by response probably_expired iterator is invalid
- // If request timeout updated, set probably_expired iterator is invalid too.
- probably_expired = pending_request_set_.begin();
- } else {
- ++probably_expired;
+ request->request()->CleanUp();
+ LOG4CXX_INFO(logger_, "Timeout for request id " << request->requestId() << " expired");
+ probably_expired = pending_request_set_.begin();
+ break;
}
}
UpdateTimer();
+ LOG4CXX_TRACE_EXIT(logger_);
}
RequestController::Worker::Worker(RequestController* requestController)
@@ -435,14 +377,14 @@ RequestController::Worker::~Worker() {
}
void RequestController::Worker::threadMain() {
- LOG4CXX_AUTO_TRACE(logger_);
+ LOG4CXX_TRACE_ENTER(logger_);
sync_primitives::AutoLock auto_lock(thread_lock_);
while (!stop_flag_) {
// Try to pick a request
sync_primitives::AutoLock auto_lock(request_controller_->mobile_request_list_lock_);
while ((request_controller_->pool_state_ != TPoolState::STOPPED) &&
- (request_controller_->mobile_request_list_.empty())) {
+ (request_controller_->mobile_request_list_.empty())) {
// Wait until there is a task in the queue
// Unlock mutex while wait, then lock it back when signaled
LOG4CXX_INFO(logger_, "Unlocking and waiting");
@@ -455,24 +397,19 @@ void RequestController::Worker::threadMain() {
break;
}
- if (request_controller_->mobile_request_list_.empty()) {
- LOG4CXX_WARN(logger_, "Mobile request list is empty");
- break;
- }
+ MobileRequestPtr request(request_controller_->mobile_request_list_.front());
- RequestPtr request(request_controller_->mobile_request_list_.front());
request_controller_->mobile_request_list_.pop_front();
- bool init_res = request->Init(); // to setup specific default timeout
+ bool init_res = request->Init(); // to setup specific default timeout
- const uint32_t timeout_in_seconds =
- request->default_timeout() / date_time::DateTime::MILLISECONDS_IN_SECOND;
+ uint32_t timeout_in_seconds = request->default_timeout()/date_time::DateTime::MILLISECONDS_IN_SECOND;
RequestInfoPtr request_info_ptr(new MobileRequestInfo(request,
timeout_in_seconds));
request_controller_->pending_request_set_lock_.Acquire();
request_controller_->pending_request_set_.insert(request_info_ptr);
if (0 != timeout_in_seconds) {
- LOG4CXX_INFO(logger_, "Execute MobileRequest corr_id = " << request_info_ptr->requestId() <<
+ LOG4CXX_INFO(logger_, "Add Request " << request_info_ptr->requestId() <<
" with timeout: " << timeout_in_seconds);
request_controller_->UpdateTimer();
} else {
@@ -483,128 +420,94 @@ void RequestController::Worker::threadMain() {
AutoUnlock unlock(auto_lock);
// execute
- if ((false == request_controller_->IsLowVoltage()) &&
- request->CheckPermissions() && init_res) {
+ if (request->CheckPermissions() && init_res) {
request->Run();
}
}
+
}
-void RequestController::Worker::exitThreadMain() {
+bool RequestController::Worker::exitThreadMain() {
stop_flag_ = true;
+ sync_primitives::AutoLock auto_lock(thread_lock_);
// setup stop flag and whit while threadMain will be finished correctly
- // FIXME (dchmerev@luxoft.com): There is no waiting
+ // FIXME (dchmerev@luxoft.com): There is no wating
+ return true;
}
-bool RequestController::CheckTimeScaleMaxRequest(
+bool RequestController::checkTimeScaleMaxRequest(
const uint32_t& app_id,
const uint32_t& app_time_scale,
const uint32_t& max_request_per_time_scale) {
- LOG4CXX_AUTO_TRACE(logger_);
- if (max_request_per_time_scale > 0
- && app_time_scale > 0) {
+ LOG4CXX_TRACE_ENTER(logger_);
+ {
AutoLock auto_lock(pending_request_set_lock_);
TimevalStruct end = date_time::DateTime::getCurrentTime();
- TimevalStruct start = {0, 0};
+ TimevalStruct start;
start.tv_sec = end.tv_sec - app_time_scale;
TimeScale scale(start, end, app_id);
- const uint32_t count = std::count_if(pending_request_set_.begin(),
- pending_request_set_.end(), scale);
- if (count >= max_request_per_time_scale) {
- LOG4CXX_WARN(logger_, "Processing requests count " << count <<
- " exceed application limit " << max_request_per_time_scale);
- return false;
+ uint32_t count = 0;
+
+ count = count_if (pending_request_set_.begin(), pending_request_set_.end(), scale);
+ if (count == max_request_per_time_scale ) {
+ LOG4CXX_ERROR(logger_, "Requests count " << count <<
+ " exceed application limit " << max_request_per_time_scale);
+ return true;
}
- LOG4CXX_DEBUG(logger_, "Requests count " << count);
- } else {
- LOG4CXX_DEBUG(logger_, "CheckTimeScaleMaxRequest disabled");
}
return true;
}
-bool RequestController::CheckHMILevelTimeScaleMaxRequest(
+bool RequestController::checkHMILevelTimeScaleMaxRequest(
const mobile_apis::HMILevel::eType& hmi_level,
const uint32_t& app_id,
const uint32_t& app_time_scale,
const uint32_t& max_request_per_time_scale) {
- LOG4CXX_AUTO_TRACE(logger_);
- if (max_request_per_time_scale > 0 &&
- app_time_scale > 0) {
- AutoLock auto_lock(pending_request_set_lock_);
- TimevalStruct end = date_time::DateTime::getCurrentTime();
- TimevalStruct start = {0, 0};
- start.tv_sec = end.tv_sec - app_time_scale;
-
- HMILevelTimeScale scale(start, end, app_id, hmi_level);
- const uint32_t count = std::count_if(pending_request_set_.begin(),
- pending_request_set_.end(), scale);
- if (count >= max_request_per_time_scale) {
- LOG4CXX_WARN(logger_, "Processing requests count " << count
- << " exceed application limit " << max_request_per_time_scale
- << " in hmi level " << hmi_level);
- return false;
- }
- LOG4CXX_DEBUG(logger_, "Requests count " << count);
- } else {
- LOG4CXX_DEBUG(logger_, "CheckHMILevelTimeScaleMaxRequest disabled");
- }
- return true;
-}
-
-bool RequestController::CheckPendingRequestsAmount(
- const uint32_t& pending_requests_amount) {
- LOG4CXX_AUTO_TRACE(logger_);
- if (pending_requests_amount > 0) {
- AutoLock auto_lock(mobile_request_list_lock_);
- const size_t pending_requests_size = mobile_request_list_.size();
- const bool available_to_add =
- pending_requests_amount > pending_requests_size;
- if(!available_to_add) {
- LOG4CXX_WARN(logger_, "Pending requests count " << pending_requests_size
- << " exceed application limit " << pending_requests_amount);
+ LOG4CXX_TRACE_ENTER(logger_);
+ {
+ AutoLock auto_lock(pending_request_set_lock_);
+ TimevalStruct end = date_time::DateTime::getCurrentTime();
+ TimevalStruct start;
+ start.tv_sec = end.tv_sec - app_time_scale;
+
+ HMILevelTimeScale scale(start, end, app_id, hmi_level);
+ uint32_t count = 0;
+
+ count = count_if (pending_request_set_.begin(), pending_request_set_.end(), scale);
+ if (count == max_request_per_time_scale ) {
+ LOG4CXX_ERROR(logger_, "Requests count " << count
+ << " exceed application limit " << max_request_per_time_scale
+ << " in hmi level " << hmi_level);
+ return false;
+ }
}
- return available_to_add;
- }
- LOG4CXX_DEBUG(logger_, "CheckPendingRequestsAmount disabled");
return true;
}
void RequestController::UpdateTimer() {
- LOG4CXX_AUTO_TRACE(logger_);
- if(pending_request_set_.empty()) {
- LOG4CXX_DEBUG(logger_, "Sleep for default sleep time "
- << dafault_sleep_time_ << " secs");
- timer_.updateTimeOut(dafault_sleep_time_);
- return;
- }
-
+ LOG4CXX_TRACE_ENTER(logger_);
+ uint32_t sleep_time = dafault_sleep_time_;
RequestInfoSet::iterator it = pending_request_set_.begin();
+
while (it != pending_request_set_.end()) {
RequestInfoPtr request = *it;
DCHECK(request.valid());
- // This request should not be observed for TIME_OUT
- if (0 != request->timeout_sec()) {
- const TimevalStruct current_time = date_time::DateTime::getCurrentTime();
- const TimevalStruct end_time = request->end_time();
- if (current_time < end_time) {
- const uint64_t secs = end_time.tv_sec - current_time.tv_sec;
- LOG4CXX_DEBUG(logger_, "Sleep for " << secs << " secs");
- // Timeout for bigger than 5 minutes is a mistake
- DCHECK(secs < 300);
- timer_.updateTimeOut(secs);
- } else {
- LOG4CXX_DEBUG(logger_, "Request is expired: "
- << end_time.tv_sec << " - "
- << current_time.tv_sec << " >= "
- << request->timeout_sec());
- timer_.updateTimeOut(0);
- }
- return;
+ if (0 == request->timeout_sec()) {
+ ++it;
+ // This request should not be observed for TIME_OUT
+ continue;
}
- ++it;
+ sleep_time = request->end_time().tv_sec -
+ date_time::DateTime::getCurrentTime().tv_sec;
+ break;
}
+ timer_.updateTimeOut(sleep_time);
+ LOG4CXX_INFO(logger_, "Sleep for: " << sleep_time);
+ LOG4CXX_TRACE_EXIT(logger_);
}
+
} // namespace request_controller
+
} // namespace application_manager
diff --git a/src/components/application_manager/src/request_info.cc b/src/components/application_manager/src/request_info.cc
index 82c962a553..0b448c9e47 100644
--- a/src/components/application_manager/src/request_info.cc
+++ b/src/components/application_manager/src/request_info.cc
@@ -1,34 +1,34 @@
-/*
- * \file request_info.h
- * \brief request information structure source file.
- *
- * Copyright (c) 2014, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+/**
+* \file request_info.h
+* \brief request information structure source file.
+*
+* Copyright (c) 2014, Ford Motor Company
+* All rights reserved.
+*
+* Redistribution and use in source and binary forms, with or without
+* modification, are permitted provided that the following conditions are met:
+*
+* Redistributions of source code must retain the above copyright notice, this
+* list of conditions and the following disclaimer.
+*
+* Redistributions in binary form must reproduce the above copyright notice,
+* this list of conditions and the following
+* disclaimer in the documentation and/or other materials provided with the
+* distribution.
+*
+* Neither the name of the Ford Motor Company nor the names of its contributors
+* may be used to endorse or promote products derived from this software
+* without specific prior written permission.
+*
+* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*/
@@ -41,26 +41,24 @@ namespace request_controller {
HMIRequestInfo::HMIRequestInfo(
RequestPtr request,
const uint64_t timeout_sec):
- RequestInfo(HMIRequest, timeout_sec),
+ RequestInfo(timeout_sec),
request_(request) {
correlation_id_ = request_->correlation_id();
- app_id_ = 0;
}
HMIRequestInfo::HMIRequestInfo(
RequestPtr request,
const TimevalStruct &start_time,
const uint64_t timeout_sec):
- RequestInfo(HMIRequest, start_time, timeout_sec),
+ RequestInfo(start_time, timeout_sec),
request_(request) {
correlation_id_ = request_->correlation_id();
- app_id_ = 0;
}
MobileRequestInfo::MobileRequestInfo(
RequestPtr request,
const uint64_t timeout_sec):
- RequestInfo(MobileRequest, timeout_sec),
+ RequestInfo(timeout_sec),
request_(request) {
mobile_correlation_id_ = request_.get()->correlation_id();
app_id_ = request_.get()->connection_key();
@@ -70,7 +68,7 @@ MobileRequestInfo::MobileRequestInfo(
RequestPtr request,
const TimevalStruct &start_time,
const uint64_t timeout_sec):
- RequestInfo(MobileRequest, start_time, timeout_sec),
+ RequestInfo(start_time, timeout_sec),
request_(request) {
mobile_correlation_id_ = request_.get()->correlation_id();
app_id_ = request_.get()->connection_key();
diff --git a/src/components/application_manager/src/resume_ctrl.cpp b/src/components/application_manager/src/resume_ctrl.cpp
index cdbba3905c..cdbd6dc1cf 100644
--- a/src/components/application_manager/src/resume_ctrl.cpp
+++ b/src/components/application_manager/src/resume_ctrl.cpp
@@ -1,5 +1,4 @@
-#include <fstream>
-#include <algorithm>
+#include <fstream>
#include "application_manager/resume_ctrl.h"
#include "config_profile/profile.h"
@@ -24,106 +23,102 @@ namespace Formatters = NsSmartDeviceLink::NsJSONHandler::Formatters;
ResumeCtrl::ResumeCtrl(ApplicationManagerImpl* app_mngr)
: app_mngr_(app_mngr),
- restore_hmi_level_timer_("RsmCtrlRstore",
- this, &ResumeCtrl::ApplicationResumptiOnTimer),
- save_persistent_data_timer_("RsmCtrlPercist",
- this, &ResumeCtrl::SaveDataOnTimer, true),
- is_data_saved(true) {
- save_persistent_data_timer_.start(profile::Profile::instance()->app_resumption_save_persistent_data_timeout());
+ timer_("ResumeCtrl", this, &ResumeCtrl::onTimer) {
}
void ResumeCtrl::SaveAllApplications() {
- LOG4CXX_AUTO_TRACE(logger_);
+ LOG4CXX_INFO(logger_, "ResumeCtrl::SaveApplications()");
DCHECK(app_mngr_);
- if (app_mngr_) {
- ApplicationManagerImpl::ApplicationListAccessor accessor;
- ApplicationManagerImpl::TAppList apps(accessor.applications());
- std::for_each(apps.begin(),
- apps.end(),
- std::bind1st(std::mem_fun(&ResumeCtrl::SaveApplication), this));
- } else {
- LOG4CXX_FATAL(logger_, "Application manager object is NULL.");
+
+ std::set<ApplicationSharedPtr>::iterator it =
+ app_mngr_->application_list_.begin();
+ std::set<ApplicationSharedPtr>::iterator it_end =
+ app_mngr_->application_list_.end();
+ for (; it != it_end; ++it) {
+ SaveApplication(*it);
}
}
void ResumeCtrl::SaveApplication(ApplicationConstSharedPtr application) {
+ LOG4CXX_INFO(logger_, "ResumeCtrl::SaveApplication");
+
DCHECK(application.get());
- if (!application) {
- LOG4CXX_FATAL(logger_, "Application object is NULL.");
- return;
- }
+ Json::Value* json_app = NULL;
const std::string& m_app_id = application->mobile_app_id()->asString();
- LOG4CXX_TRACE(logger_, "ENTER app_id : " << application->app_id()
- << " mobile app_id : " << m_app_id);
-
- const uint32_t hash = application->curHash();
- const uint32_t grammar_id = application->get_grammar_id();
-
- LOG4CXX_INFO(logger_, "hash = " << hash);
- LOG4CXX_INFO(logger_, "grammar_id = " << grammar_id);
-
- Json::Value& json_app = GetFromSavedOrAppend(m_app_id);
-
- json_app[strings::device_mac] =
- MessageHelper::GetDeviceMacAddressForHandle(application->device());
- json_app[strings::app_id] = m_app_id;
- json_app[strings::grammar_id] = grammar_id;
- json_app[strings::connection_key] = application->app_id();
- json_app[strings::hmi_app_id] = application->hmi_app_id();
- json_app[strings::hmi_level] =
- static_cast<int32_t> (application->hmi_level());
- json_app[strings::ign_off_count] = 0;
- json_app[strings::hash_id] = hash;
- json_app[strings::application_commands] =
- GetApplicationCommands(application);
- json_app[strings::application_submenus] =
- GetApplicationSubMenus(application);
- json_app[strings::application_choise_sets] =
- GetApplicationInteractionChoiseSets(application);
- json_app[strings::application_global_properties] =
- GetApplicationGlobalProperties(application);
- json_app[strings::application_subscribtions] =
- GetApplicationSubscriptions(application);
- json_app[strings::application_files] = GetApplicationFiles(application);
- json_app[strings::time_stamp] = (uint32_t)time(NULL);
- json_app[strings::audio_streaming_state] = application->audio_streaming_state();
- LOG4CXX_DEBUG(logger_, "SaveApplication : " << json_app.toStyledString());
+ Json::Value::iterator it = GetSavedApplications().begin();
+ for (; it != GetSavedApplications().end(); ++it) {
+ if (m_app_id == (*it)[strings::app_id].asString()) {
+ json_app = &(*it);
+ LOG4CXX_INFO(logger_, "ResumeCtrl Application with this id "
+ "already exist ( update info )."
+ "mobile app_id = " << m_app_id);
+ break;
+ }
+ }
+
+ if (json_app == NULL) {
+ LOG4CXX_INFO(logger_, "ResumeCtrl Application with this ID does not"
+ "exist. Add new. mobile app_id = " << m_app_id);
+ json_app = &(GetSavedApplications().append(Json::Value()));
+ }
+
+ uint32_t hash = application->curHash();
+ uint32_t grammar_id = application->get_grammar_id();
+
+ LOG4CXX_INFO(logger_, "Hash = " << hash);
+ (*json_app)[strings::device_mac] =
+ MessageHelper::GetDeviceMacAddressForHandle(application->device());
+ (*json_app)[strings::app_id] = m_app_id;
+ (*json_app)[strings::grammar_id] = grammar_id;
+ (*json_app)[strings::connection_key] = application->app_id();
+ (*json_app)[strings::hmi_app_id] = application->hmi_app_id();
+ (*json_app)[strings::hmi_level] =
+ static_cast<int32_t> (application->hmi_level());
+ (*json_app)[strings::ign_off_count] = 0;
+ (*json_app)[strings::hash_id] = hash;
+ (*json_app)[strings::application_commands] =
+ GetApplicationCommands(application);
+ (*json_app)[strings::application_submenus] =
+ GetApplicationSubMenus(application);
+ (*json_app)[strings::application_choise_sets] =
+ GetApplicationInteractionChoiseSets(application);
+ (*json_app)[strings::application_global_properties] =
+ GetApplicationGlobalProperties(application);
+ (*json_app)[strings::application_subscribtions] =
+ GetApplicationSubscriptions(application);
+ (*json_app)[strings::application_files] = GetApplicationFiles(application);
+ (*json_app)[strings::time_stamp] = (uint32_t)time(NULL);
+ (*json_app)[strings::audio_streaming_state] = application->audio_streaming_state();
}
void ResumeCtrl::on_event(const event_engine::Event& event) {
- LOG4CXX_TRACE(logger_, "Response from HMI command");
+ LOG4CXX_INFO(logger_, "ResumeCtrl::on_event ");
}
bool ResumeCtrl::RestoreApplicationHMILevel(ApplicationSharedPtr application) {
- LOG4CXX_AUTO_TRACE(logger_);
- using namespace mobile_apis;
- if (!application) {
+ if (false == application.valid()) {
LOG4CXX_ERROR(logger_, " RestoreApplicationHMILevel() application pointer in invalid");
return false;
}
- LOG4CXX_DEBUG(logger_, "ENTER app_id : " << application->app_id());
+ Json::Value::iterator it = GetSavedApplications().begin();
+ for (;it != GetSavedApplications().end(); ++it) {
+ const std::string& saved_m_app_id = (*it)[strings::app_id].asString();
- const int idx = GetObjectIndex(application->mobile_app_id()->asString());
- if (-1 != idx) {
- const Json::Value& json_app = GetSavedApplications()[idx];
- if (json_app.isMember(strings::audio_streaming_state) &&
- json_app.isMember(strings::hmi_level)) {
+ if (saved_m_app_id == application->mobile_app_id()->asString()) {
- const AudioStreamingState::eType audio_streaming_state =
- static_cast<mobile_apis::AudioStreamingState::eType>(
- json_app[strings::audio_streaming_state].asInt());
+ mobile_apis::HMILevel::eType saved_hmi_level;
+ //mobile_apis::HMILevel::eType restored_hmi_level;
- application->set_audio_streaming_state(audio_streaming_state);
+ mobile_apis::AudioStreamingState::eType audio_streaming_state =
+ static_cast<mobile_apis::AudioStreamingState::eType>
+ ((*it)[strings::audio_streaming_state].asInt());
+ application->set_audio_streaming_state(audio_streaming_state);
+ saved_hmi_level = static_cast<mobile_apis::HMILevel::eType>(
+ (*it)[strings::hmi_level].asInt());
- const HMILevel::eType saved_hmi_level =
- static_cast<mobile_apis::HMILevel::eType>(
- json_app[strings::hmi_level].asInt());
- LOG4CXX_DEBUG(logger_, "Saved HMI Level is : " << saved_hmi_level);
return SetupHMILevel(application, saved_hmi_level, audio_streaming_state);
- } else {
- LOG4CXX_FATAL(logger_, "There are some unknown keys among the stored apps");
}
}
LOG4CXX_INFO(logger_, "Failed to restore application HMILevel");
@@ -131,11 +126,12 @@ bool ResumeCtrl::RestoreApplicationHMILevel(ApplicationSharedPtr application) {
}
bool ResumeCtrl::SetupDefaultHMILevel(ApplicationSharedPtr application) {
+ LOG4CXX_TRACE_ENTER(logger_);
if (false == application.valid()) {
LOG4CXX_ERROR(logger_, "SetupDefaultHMILevel application pointer is invalid");
return false;
}
- LOG4CXX_TRACE(logger_, "ENTER app_id : " << application->app_id());
+
mobile_apis::HMILevel::eType default_hmi = mobile_apis::HMILevel::HMI_NONE;
if (policy::PolicyHandler::instance()->PolicyEnabled()) {
@@ -161,23 +157,21 @@ bool ResumeCtrl::SetupDefaultHMILevel(ApplicationSharedPtr application) {
<< policy_app_id);
}
}
- bool result = SetupHMILevel(application, default_hmi,
- mobile_apis::AudioStreamingState::NOT_AUDIBLE, false);
- return result;
+
+ return SetupHMILevel(application, default_hmi,
+ mobile_apis::AudioStreamingState::NOT_AUDIBLE, false);
}
bool ResumeCtrl::SetupHMILevel(ApplicationSharedPtr application,
mobile_apis::HMILevel::eType hmi_level,
mobile_apis::AudioStreamingState::eType audio_streaming_state,
bool check_policy) {
+
if (false == application.valid()) {
- LOG4CXX_ERROR(logger_, "Application pointer in invalid");
+ LOG4CXX_ERROR(logger_, "SetupHMILevel() application pointer in invalid");
return false;
}
- LOG4CXX_TRACE(logger_, " ENTER Params : ( " << application->app_id()
- << "," << hmi_level
- << "," << audio_streaming_state
- << "," << check_policy << " )");
+
const std::string device_id =
MessageHelper::GetDeviceMacAddressForHandle(application->device());
@@ -194,6 +188,7 @@ bool ResumeCtrl::SetupHMILevel(ApplicationSharedPtr application,
(hmi_level != mobile_apis::HMILevel::HMI_NONE)) {
LOG4CXX_WARN(logger_, "Hmi level " << hmi_level << " should not be set to "
<< application->mobile_app_id()->asString() << " " << application->hmi_level());
+
return false;
}
@@ -241,9 +236,10 @@ bool ResumeCtrl::SetupHMILevel(ApplicationSharedPtr application,
if (hmi_level != mobile_apis::HMILevel::HMI_FULL) {
application->set_hmi_level(hmi_level);
- MessageHelper::SendHMIStatusNotification(*(application.get()));
- // HMI status for full wil be get after ActivateApp response
}
+
+ MessageHelper::SendHMIStatusNotification(*(application.get()));
+
LOG4CXX_INFO(logger_, "Set up application "
<< application->mobile_app_id()->asString()
<< " to HMILevel " << hmi_level);
@@ -251,122 +247,271 @@ bool ResumeCtrl::SetupHMILevel(ApplicationSharedPtr application,
}
bool ResumeCtrl::RestoreApplicationData(ApplicationSharedPtr application) {
- LOG4CXX_AUTO_TRACE(logger_);
- if (!application.valid()) {
- LOG4CXX_ERROR(logger_, "Application pointer in invalid");
+ LOG4CXX_INFO(logger_, "RestoreApplicationData");
+ DCHECK(application.get());
+
+ Json::Value::iterator it = GetSavedApplications().begin();
+ for (; it != GetSavedApplications().end(); ++it) {
+ const std::string& saved_m_app_id = (*it)[strings::app_id].asString();
+ if (saved_m_app_id == application->mobile_app_id()->asString()) {
+ break;
+ }
+ }
+
+ if (it == GetSavedApplications().end()) {
+ LOG4CXX_WARN(logger_, "Application not saved");
return false;
}
- LOG4CXX_DEBUG(logger_, "ENTER app_id : " << application->app_id());
+ Json::Value& saved_app = *it;
+ MessageHelper::SmartObjectList requests;
+
+ LOG4CXX_INFO(logger_, saved_app.toStyledString());
+ Json::Value& app_commands = saved_app[strings::application_commands];
+ Json::Value& app_submenus = saved_app[strings::application_submenus];
+ Json::Value& app_choise_sets = saved_app[strings::application_choise_sets];
+ Json::Value& global_properties = saved_app[strings::application_global_properties];
+ Json::Value& subscribtions = saved_app[strings::application_subscribtions];
+ Json::Value& application_files = saved_app[strings::application_files];
+ uint32_t app_grammar_id = saved_app[strings::grammar_id].asUInt();
+ application->set_grammar_id(app_grammar_id);
+
+
+ // files
+ for (Json::Value::iterator json_it = application_files.begin();
+ json_it != application_files.end(); ++json_it) {
+ Json::Value& file_data = *json_it;
+
+ bool is_persistent = file_data[strings::persistent_file].asBool();
+ if (is_persistent) {
+ AppFile file;
+ file.is_persistent = is_persistent;
+ file.is_download_complete = file_data[strings::is_download_complete].asBool();
+ file.file_name = file_data[strings::sync_file_name].asString();
+ file.file_type = static_cast<mobile_apis::FileType::eType> (
+ file_data[strings::file_type].asInt());
+ LOG4CXX_INFO(logger_, "RestoreApplicationData file " << file.file_name);
+ application->AddFile(file);
+ }
+ }
+ //add submenus
+ for (Json::Value::iterator json_it = app_submenus.begin();
+ json_it != app_submenus.end(); ++json_it) {
+ Json::Value& json_submenu = *json_it;
+ smart_objects::SmartObject message = smart_objects::SmartObject(
+ smart_objects::SmartType::SmartType_Map);
+ Formatters::CFormatterJsonBase::jsonValueToObj(json_submenu, message);
+ application->AddSubMenu(message[strings::menu_id].asUInt(), message);
+ }
+ requests = MessageHelper::CreateAddSubMenuRequestToHMI(application);
- const int idx = GetObjectIndex(application->mobile_app_id()->asString());
- if (-1 == idx) {
- LOG4CXX_WARN(logger_, "Application not saved");
- return false;
+ for (MessageHelper::SmartObjectList::iterator it = requests.begin();
+ it != requests.end(); ++it) {
+ ProcessHMIRequest(*it, true);
}
- const Json::Value& saved_app = GetSavedApplications()[idx];
- if(saved_app.isMember(strings::grammar_id)) {
- const uint32_t app_grammar_id = saved_app[strings::grammar_id].asUInt();
- application->set_grammar_id(app_grammar_id);
+ //add commands
+ for (Json::Value::iterator json_it = app_commands.begin();
+ json_it != app_commands.end(); ++json_it) {
+ Json::Value& json_command = *json_it;
+ smart_objects::SmartObject message = smart_objects::SmartObject(
+ smart_objects::SmartType::SmartType_Map);
+ Formatters::CFormatterJsonBase::jsonValueToObj(json_command, message);
+ application->AddCommand(message[strings::cmd_id].asUInt(), message);
+ }
+
+ requests = MessageHelper::CreateAddCommandRequestToHMI(application);
+
+ for (MessageHelper::SmartObjectList::iterator it = requests.begin();
+ it != requests.end(); ++it) {
+ ProcessHMIRequest(*it, true);
+ }
- AddFiles(application, saved_app);
- AddSubmenues(application, saved_app);
- AddCommands(application, saved_app);
- AddChoicesets(application, saved_app);
- SetGlobalProperties(application, saved_app);
- AddSubscriptions(application, saved_app);
+ //add choisets
+ for (Json::Value::iterator json_it = app_choise_sets.begin();
+ json_it != app_choise_sets.end(); ++json_it) {
+ Json::Value& json_choiset = *json_it;
+ smart_objects::SmartObject msg_param = smart_objects::SmartObject(
+ smart_objects::SmartType::SmartType_Map);
+ Formatters::CFormatterJsonBase::jsonValueToObj(json_choiset , msg_param);
+ const int32_t choice_set_id = msg_param
+ [strings::interaction_choice_set_id].asInt();
+ uint32_t choice_grammar_id = msg_param[strings::grammar_id].asUInt();
+ application->AddChoiceSet(choice_set_id, msg_param);
+
+ for (size_t j = 0; j < msg_param[strings::choice_set].length(); ++j) {
+ smart_objects::SmartObject choise_params = smart_objects::SmartObject(
+ smart_objects::SmartType_Map);
+ choise_params[strings::app_id] = application->app_id();
+ choise_params[strings::cmd_id] =
+ msg_param[strings::choice_set][j][strings::choice_id];
+ choise_params[strings::vr_commands] = smart_objects::SmartObject(
+ smart_objects::SmartType_Array);
+ choise_params[strings::vr_commands] =
+ msg_param[strings::choice_set][j][strings::vr_commands];
+
+ choise_params[strings::type] = hmi_apis::Common_VRCommandType::Choice;
+ choise_params[strings::grammar_id] = choice_grammar_id;
+ SendHMIRequest(hmi_apis::FunctionID::VR_AddCommand, &choise_params);
+ }
+ }
+
+ //setglobal properties
+ if (!global_properties.isNull()) {
+ smart_objects::SmartObject properties_so = smart_objects::SmartObject(
+ smart_objects::SmartType::SmartType_Map);
+ Formatters::CFormatterJsonBase::jsonValueToObj(global_properties , properties_so);
+
+ const smart_objects::SmartObject& vr_help_title =
+ properties_so.getElement(strings::vr_help_title);
+ if (vr_help_title.getType() != smart_objects::SmartType::SmartType_Invalid &&
+ vr_help_title.getType() != smart_objects::SmartType::SmartType_Null) {
+ application->set_vr_help_title(vr_help_title);
+ }
+
+ const smart_objects::SmartObject& vr_help =
+ properties_so.getElement(strings::vr_help);
+ if (vr_help.getType() != smart_objects::SmartType::SmartType_Invalid &&
+ vr_help.getType() != smart_objects::SmartType::SmartType_Null) {
+ application->set_vr_help(vr_help);
+ }
+
+ const smart_objects::SmartObject& timeout_prompt =
+ properties_so.getElement(strings::timeout_prompt);
+ if (timeout_prompt.getType() != smart_objects::SmartType::SmartType_Invalid &&
+ timeout_prompt.getType() != smart_objects::SmartType::SmartType_Null) {
+ application->set_timeout_prompt(timeout_prompt);
+ }
+
+ const smart_objects::SmartObject& help_prompt =
+ properties_so.getElement(strings::help_prompt);
+ if (help_prompt.getType() != smart_objects::SmartType::SmartType_Invalid &&
+ help_prompt.getType() != smart_objects::SmartType::SmartType_Null) {
+ application->set_help_prompt(help_prompt);
+ }
+
+ const smart_objects::SmartObject& keyboard_properties =
+ properties_so.getElement(strings::keyboard_properties);
+ if (keyboard_properties.getType() != smart_objects::SmartType::SmartType_Invalid &&
+ keyboard_properties.getType() != smart_objects::SmartType::SmartType_Null) {
+ application->set_keyboard_props(keyboard_properties);
+ }
+
+ const smart_objects::SmartObject& menu_title =
+ properties_so.getElement(strings::menu_title);
+ if (menu_title.getType() != smart_objects::SmartType::SmartType_Invalid &&
+ menu_title.getType() != smart_objects::SmartType::SmartType_Null) {
+ application->set_menu_title(menu_title);
+ }
+
+ const smart_objects::SmartObject& menu_icon =
+ properties_so.getElement(strings::menu_icon);
+ if (menu_icon.getType() != smart_objects::SmartType::SmartType_Invalid &&
+ menu_icon.getType() != smart_objects::SmartType::SmartType_Null) {
+ application->set_menu_icon(menu_icon);
+ }
+
+ MessageHelper::SendGlobalPropertiesToHMI(application);
+ }
+
+ //subscribes
+ if (!subscribtions.isNull()) {
+ Json::Value& subscribtions_buttons = subscribtions[strings::application_buttons];
+ Json::Value& subscribtions_ivi= subscribtions[strings::application_vehicle_info];
+ for (Json::Value::iterator json_it = subscribtions_buttons.begin();
+ json_it != subscribtions_buttons.end(); ++json_it) {
+ mobile_apis::ButtonName::eType btn;
+ btn = static_cast<mobile_apis::ButtonName::eType>((*json_it).asInt());
+ application->SubscribeToButton(btn);
+ }
+
+ for (Json::Value::iterator json_it = subscribtions_ivi.begin();
+ json_it != subscribtions_ivi.end(); ++json_it) {
+ VehicleDataType ivi;
+ ivi = static_cast<VehicleDataType>((*json_it).asInt());
+ LOG4CXX_INFO(logger_, "VehicleDataType :" << ivi);
+#ifdef ENABLE_LOG
+ bool result =
+#endif
+ application->SubscribeToIVI(ivi);
+ LOG4CXX_INFO(logger_, "result = :" << result);
+ }
+ requests = MessageHelper::GetIVISubscribtionRequests(application->app_id());
+
+ for (MessageHelper::SmartObjectList::iterator it = requests.begin();
+ it != requests.end(); ++it) {
+ ProcessHMIRequest(*it,true);
+ }
}
return true;
}
bool ResumeCtrl::IsHMIApplicationIdExist(uint32_t hmi_app_id) {
- LOG4CXX_TRACE(logger_, "ENTER hmi_app_id :" << hmi_app_id);
+ LOG4CXX_INFO(logger_, "ResumeCtrl::IsHMIApplicationIdExist " << hmi_app_id);
for (Json::Value::iterator it = GetSavedApplications().begin();
it != GetSavedApplications().end(); ++it) {
- if ((*it).isMember(strings::hmi_app_id)) {
- if ((*it)[strings::hmi_app_id].asUInt() == hmi_app_id) {
- return true;
- }
+ if ((*it)[strings::hmi_app_id].asUInt() == hmi_app_id) {
+ return true;
}
}
- ApplicationManagerImpl::ApplicationListAccessor accessor;
- std::set<ApplicationSharedPtr>::iterator it = accessor.applications().begin();
- std::set<ApplicationSharedPtr>::iterator it_end = accessor.applications().end();
+ std::set<ApplicationSharedPtr>::iterator it =
+ app_mngr_->application_list_.begin();
+ std::set<ApplicationSharedPtr>::iterator it_end =
+ app_mngr_->application_list_.end();
for (;it != it_end; ++it) {
if (hmi_app_id == (*it)->hmi_app_id()) {
- LOG4CXX_TRACE(logger_, "EXIT result = true");
return true;
}
}
- LOG4CXX_TRACE(logger_, "EXIT result = false");
+
return false;
}
bool ResumeCtrl::IsApplicationSaved(const std::string& mobile_app_id) {
- LOG4CXX_TRACE(logger_, "ENTER mobile_app_id :" << mobile_app_id);
bool result = false;
for (Json::Value::iterator it = GetSavedApplications().begin();
it != GetSavedApplications().end(); ++it) {
- if ((*it).isMember(strings::app_id)) {
- if ((*it)[strings::app_id].asString() == mobile_app_id) {
- result = true;
- }
+ if ((*it)[strings::app_id].asString() == mobile_app_id) {
+ result = true;
}
}
- LOG4CXX_TRACE(logger_, "EXIT mobile_app_id :" <<
- mobile_app_id <<
- " result: " <<
- (result ? "true" : "false"));
+ LOG4CXX_INFO(logger_, "IsApplicationSaved " << mobile_app_id << " : " << (result?"true":"false"));
return result;
}
uint32_t ResumeCtrl::GetHMIApplicationID(const std::string& mobile_app_id) {
- LOG4CXX_AUTO_TRACE(logger_);
uint32_t hmi_app_id = 0;
-
- const int idx = GetObjectIndex(mobile_app_id);
- if (-1 == idx) {
- LOG4CXX_WARN(logger_, "Application not saved");
- return hmi_app_id;
+ for (Json::Value::iterator it = GetSavedApplications().begin();
+ it != GetSavedApplications().end(); ++it) {
+ if ((*it)[strings::app_id].asString() == mobile_app_id) {
+ hmi_app_id = (*it)[strings::hmi_app_id].asUInt();
+ }
}
- const Json::Value& json_app = GetSavedApplications()[idx];
- if (json_app.isMember(strings::app_id)) {
- hmi_app_id = json_app[strings::hmi_app_id].asUInt();
- }
- LOG4CXX_DEBUG(logger_, "hmi_app_id :" << hmi_app_id);
return hmi_app_id;
}
bool ResumeCtrl::RemoveApplicationFromSaved(ApplicationConstSharedPtr application) {
- if (false == application.valid()) {
- LOG4CXX_ERROR(logger_, "Application pointer in invalid");
- return false;
- }
- LOG4CXX_TRACE(logger_, "ENTER app_id :" << application->app_id()
- << "; mobile_app_id " << application->mobile_app_id()->asString());
+ LOG4CXX_INFO(logger_, "ResumeCtrl::RemoveApplicationFromSaved ");
+ DCHECK(application.get());
bool result = false;
std::vector<Json::Value> temp;
for (Json::Value::iterator it = GetSavedApplications().begin();
it != GetSavedApplications().end(); ++it) {
- if ((*it).isMember(strings::app_id)) {
- const std::string& saved_m_app_id = (*it)[strings::app_id].asString();
+ const std::string& saved_m_app_id = (*it)[strings::app_id].asString();
- if (saved_m_app_id != application->mobile_app_id()->asString()) {
- temp.push_back((*it));
- } else {
- result = true;
- }
+ if (saved_m_app_id != application->mobile_app_id()->asString()) {
+ temp.push_back((*it));
+ } else {
+ result = true;
}
}
if (false == result) {
- LOG4CXX_TRACE(logger_, "EXIT result: " << (result ? "true" : "false"));
return result;
}
@@ -375,147 +520,163 @@ bool ResumeCtrl::RemoveApplicationFromSaved(ApplicationConstSharedPtr applicatio
it != temp.end(); ++it) {
GetSavedApplications().append((*it));
}
- LOG4CXX_TRACE(logger_, "EXIT result: " << (result ? "true" : "false"));
return result;
}
void ResumeCtrl::IgnitionOff() {
- LOG4CXX_AUTO_TRACE(logger_);
+ LOG4CXX_INFO(logger_, "ResumeCtrl::IgnitionOff()");
Json::Value to_save;
for (Json::Value::iterator it = GetSavedApplications().begin();
it != GetSavedApplications().end(); ++it) {
- if ((*it).isMember(strings::ign_off_count)) {
- const uint32_t ign_off_count = (*it)[strings::ign_off_count].asUInt();
- if (ign_off_count < kApplicationLifes) {
- (*it)[strings::ign_off_count] = ign_off_count + 1;
- to_save.append(*it);
- }
- } else {
- LOG4CXX_FATAL(logger_, "Unknown key among saved applications");
- return;
+ uint32_t ign_off_count = (*it)[strings::ign_off_count].asUInt();
+ if (ign_off_count < kApplicationLifes) {
+ ign_off_count++;
+ (*it)[strings::ign_off_count] = ign_off_count;
+ to_save.append(*it);
}
}
SetSavedApplication(to_save);
}
-
bool ResumeCtrl::StartResumption(ApplicationSharedPtr application,
uint32_t hash) {
- LOG4CXX_AUTO_TRACE(logger_);
- if (!application) {
+ LOG4CXX_INFO(logger_, "ResumeCtrl::StartResumption");
+ if (!application.valid()) {
LOG4CXX_WARN(logger_, "Application not exist");
return false;
}
- LOG4CXX_DEBUG(logger_, " Resume app_id = " << application->app_id()
+
+ LOG4CXX_INFO(logger_, " app_id = " << application->app_id()
<< " hmi_app_id = " << application->hmi_app_id()
- << " mobile_id = " << application->mobile_app_id()->asString()
- << "recieved hash = " << hash);
+ << " mobile_id = "
+ << application->mobile_app_id()->asString());
- const int idx = GetObjectIndex(application->mobile_app_id()->asString());
- if (-1 == idx) {
- LOG4CXX_WARN(logger_, "Application not saved");
- MessageHelper::SendHMIStatusNotification(*application);
- return false;
- }
+ Json::Value::iterator it = GetSavedApplications().begin();
+ ApplicationManagerImpl::ApplicationListAccessor accessor;
+ for (; it != GetSavedApplications().end(); ++it) {
+ const std::string& saved_m_app_id = (*it)[strings::app_id].asString();
+
+ if (saved_m_app_id == application->mobile_app_id()->asString()) {
- const Json::Value& json_app = GetSavedApplications()[idx];
- if (json_app.isMember(strings::hash_id) && json_app.isMember(strings::time_stamp)) {
- const uint32_t saved_hash = json_app[strings::hash_id].asUInt();
+ uint32_t saved_hash = (*it)[strings::hash_id].asUInt();
+ uint32_t time_stamp= (*it)[strings::time_stamp].asUInt();
- if (saved_hash == hash) {
- RestoreApplicationData(application);
+ if (hash == saved_hash) {
+ RestoreApplicationData(application);
+ }
+
+ application->UpdateHash();
+ if (!timer_.isRunning() && accessor.applications().size() > 1) {
+ RestoreApplicationHMILevel(application);
+ RemoveApplicationFromSaved(application);
+ } else {
+ sync_primitives::AutoLock auto_lock(queue_lock_);
+ SetupDefaultHMILevel(application);
+ waiting_for_timer_.insert(std::make_pair(application->app_id(),
+ time_stamp));
+ timer_.start(kTimeStep);
+ }
+ return true;
}
- application->UpdateHash();
- RestoreHmiLevel(json_app[strings::time_stamp].asUInt(), application);
- return true;
- } else {
- LOG4CXX_INFO(logger_, "There are some unknown keys in the dictionary.");
}
+ LOG4CXX_INFO(logger_, "ResumeCtrl::Application wasn't saved");
+ MessageHelper::SendHMIStatusNotification(*application);
return false;
}
-void ResumeCtrl::RestoreHmiLevel(uint32_t time_stamp,
- ApplicationSharedPtr application) {
- ApplicationManagerImpl::ApplicationListAccessor accessor;
- if (!restore_hmi_level_timer_.isRunning() &&
- accessor.applications().size() > 1) {
- // resume in case there is already registered app
- RestoreApplicationHMILevel(application);
- RemoveApplicationFromSaved(application);
- } else {
- // please avoid AutoLock usage to avoid deadlock
- SetupDefaultHMILevel(application);
- InsertToTimerQueue(application->app_id(), time_stamp);
- // woun't start timer if it is active already
- LOG4CXX_DEBUG(logger_, "Application " << application->app_id() << " inserted to timer queue. "
- << "timer started for " << profile::Profile::instance()->app_resuming_timeout());
- restore_hmi_level_timer_.start(profile::Profile::instance()->app_resuming_timeout());
- }
-}
-
bool ResumeCtrl::StartResumptionOnlyHMILevel(ApplicationSharedPtr application) {
- LOG4CXX_AUTO_TRACE(logger_);
+ LOG4CXX_INFO(logger_, "ResumeCtrl::StartResumptionOnlyHMILevel");
if (!application.valid()) {
- LOG4CXX_WARN(logger_, "Application do not exists");
+ LOG4CXX_WARN(logger_, "Application not exist");
return false;
}
- LOG4CXX_DEBUG(logger_, "ENTER app_id = " << application->app_id()
+ LOG4CXX_INFO(logger_, "app_id = " << application->app_id()
<< "mobile_id = "
<< application->mobile_app_id()->asString());
- const int idx = GetObjectIndex(application->mobile_app_id()->asString());
- if (-1 == idx) {
- LOG4CXX_WARN(logger_, "Application not saved");
- MessageHelper::SendHMIStatusNotification(*application);
- return false;
- }
-
- const Json::Value& json = GetSavedApplications()[idx];
- if (json.isMember(strings::time_stamp)) {
- const uint32_t time_stamp = json[strings::time_stamp].asUInt();
- RestoreHmiLevel(time_stamp, application);
- return true;
- } else {
- LOG4CXX_FATAL(logger_, "The key " << strings::time_stamp <<
- " doesn't exists among saved apps.");
+ Json::Value::iterator it = GetSavedApplications().begin();
+ ApplicationManagerImpl::ApplicationListAccessor accessor;
+ for (; it != GetSavedApplications().end(); ++it) {
+ const std::string& saved_m_app_id = (*it)[strings::app_id].asString();
+ if (saved_m_app_id == application->mobile_app_id()->asString()) {
+ uint32_t time_stamp= (*it)[strings::time_stamp].asUInt();
+ if (!timer_.isRunning() && accessor.applications().size() > 1) {
+ // resume in case there is already registered app
+ RestoreApplicationHMILevel(application);
+ RemoveApplicationFromSaved(application);
+ } else {
+ sync_primitives::AutoLock auto_lock(queue_lock_);
+ SetupDefaultHMILevel(application);
+ waiting_for_timer_.insert(std::make_pair(application->app_id(),
+ time_stamp));
+ // woun't start timer if it is active already
+ timer_.start(kTimeStep);
+ }
+ return true;
+ }
}
LOG4CXX_INFO(logger_, "ResumeCtrl::Application wasn't saved");
MessageHelper::SendHMIStatusNotification(*application);
- LOG4CXX_TRACE(logger_, "EXIT false");
return false;
}
bool ResumeCtrl::CheckPersistenceFilesForResumption(ApplicationSharedPtr application) {
- LOG4CXX_AUTO_TRACE(logger_);
+ LOG4CXX_INFO(logger_, "CheckPersistenceFilesForResumption");
+ DCHECK(application.get());
- if (!application.valid()) {
- LOG4CXX_WARN(logger_, "Application do not exists");
- return false;
+ Json::Value::iterator it = GetSavedApplications().begin();
+ for (; it != GetSavedApplications().end(); ++it) {
+ const std::string& saved_m_app_id = (*it)[strings::app_id].asString();
+
+ if (saved_m_app_id == application->mobile_app_id()->asString()) {
+ break;
+ }
}
- LOG4CXX_DEBUG(logger_, "Process app_id = " << application->app_id());
- const int idx = GetObjectIndex(application->mobile_app_id()->asString());
- if (-1 == idx) {
+ if (it == GetSavedApplications().end()) {
LOG4CXX_WARN(logger_, "Application not saved");
return false;
}
- const Json::Value& saved_app = GetSavedApplications()[idx];
-
- if (!saved_app.isMember(strings::application_commands) ||
- !saved_app.isMember(strings::application_choise_sets)) {
- return false;
+ Json::Value& saved_app = *it;
+ MessageHelper::SmartObjectList requests;
+
+ LOG4CXX_INFO(logger_, saved_app.toStyledString());
+ Json::Value& app_commands = saved_app[strings::application_commands];
+ Json::Value& app_choise_sets = saved_app[strings::application_choise_sets];
+
+ //add commands
+ for (Json::Value::iterator json_it = app_commands.begin();
+ json_it != app_commands.end(); ++json_it) {
+ Json::Value& json_command = *json_it;
+ smart_objects::SmartObject message =
+ smart_objects::SmartObject(smart_objects::SmartType::SmartType_Map);
+ Formatters::CFormatterJsonBase::jsonValueToObj(json_command, message);
+ mobile_apis::Result::eType verification_result =
+ MessageHelper::VerifyImageFiles(message, application);
+ if (verification_result == mobile_apis::Result::INVALID_DATA) {
+ LOG4CXX_WARN(logger_, "app_commands missed icons");
+ return false;
+ }
}
- if (!CheckIcons(application, saved_app[strings::application_commands])) {
- return false;
- }
- if (!CheckIcons(application, saved_app[strings::application_choise_sets])) {
- return false;
+ //add choice sets
+ for (Json::Value::iterator json_it = app_choise_sets.begin();
+ json_it != app_choise_sets.end(); ++json_it) {
+ Json::Value& json_choiset = *json_it;
+ smart_objects::SmartObject msg_param =
+ smart_objects::SmartObject(smart_objects::SmartType::SmartType_Map);
+ Formatters::CFormatterJsonBase::jsonValueToObj(json_choiset , msg_param);
+ mobile_apis::Result::eType verification_result =
+ MessageHelper::VerifyImageFiles(msg_param, application);
+ if (verification_result == mobile_apis::Result::INVALID_DATA) {
+ LOG4CXX_WARN(logger_, "app_choise_sets missed icons");
+ return false;
+ }
}
return true;
@@ -523,39 +684,26 @@ bool ResumeCtrl::CheckPersistenceFilesForResumption(ApplicationSharedPtr applica
bool ResumeCtrl::CheckApplicationHash(ApplicationSharedPtr application,
uint32_t hash) {
- if (!application) {
- LOG4CXX_ERROR(logger_, "Application pointer is invalid");
- return false;
- }
-
- LOG4CXX_DEBUG(logger_, "ENTER app_id : " << application->app_id()
- << " hash : " << hash);
-
- const int idx = GetObjectIndex(application->mobile_app_id()->asString());
- if (-1 == idx) {
- LOG4CXX_WARN(logger_, "Application not saved");
- return false;
- }
-
- const Json::Value& json_app = GetSavedApplications()[idx];
-
- if (json_app.isMember(strings::hash_id)) {
- const uint32_t saved_hash = json_app[strings::hash_id].asUInt();
-
- LOG4CXX_TRACE(logger_, "Found saved application : " << json_app.toStyledString());
- LOG4CXX_INFO(logger_, "received hash = " << hash);
- LOG4CXX_INFO(logger_, "saved hash = " << saved_hash);
- if (hash == saved_hash) {
- return true;
+ Json::Value::iterator it = GetSavedApplications().begin();
+ for (; it != GetSavedApplications().end(); ++it) {
+ std::string saved_m_app_id = (*it)[strings::app_id].asString();
+
+ if (saved_m_app_id == application->mobile_app_id()->asString()) {
+ uint32_t saved_hash = (*it)[strings::hash_id].asUInt();
+ LOG4CXX_INFO(logger_, "received hash = " << hash);
+ LOG4CXX_INFO(logger_, "saved hash = " << saved_hash);
+ if (hash == saved_hash) {
+ return true;
+ }
}
}
return false;
}
-void ResumeCtrl::ApplicationResumptiOnTimer() {
- LOG4CXX_TRACE(logger_, "ENTER waiting for resumption HMI_Level count is :"
- << waiting_for_timer_.size());
+void ResumeCtrl::onTimer() {
+ LOG4CXX_INFO(logger_, "ResumeCtrl::onTimer() size is "
+ << waiting_for_timer_.size());
sync_primitives::AutoLock auto_lock(queue_lock_);
std::multiset<application_timestamp, TimeStampComparator>::iterator it=
@@ -574,26 +722,13 @@ void ResumeCtrl::ApplicationResumptiOnTimer() {
}
waiting_for_timer_.clear();
- LOG4CXX_TRACE(logger_, "EXIT");
-}
-
-void ResumeCtrl::SaveDataOnTimer() {
- LOG4CXX_AUTO_TRACE(logger_);
- if (waiting_for_timer_.size() > 0) {
- LOG4CXX_INFO(logger_, "There are some applications, that are waiting for resumption HMILevel. Data should not be saved");
- return;
- }
- if (false == is_data_saved) {
- SaveAllApplications();
- is_data_saved = true;
- resumption::LastState::instance()->SaveToFileSystem();
- }
}
bool ResumeCtrl::IsDeviceMacAddressEqual(ApplicationSharedPtr application,
const std::string& saved_device_mac) {
const std::string device_mac =
MessageHelper::GetDeviceMacAddressForHandle(application->device());
+
return device_mac == saved_device_mac;
}
@@ -606,28 +741,27 @@ void ResumeCtrl::SetSavedApplication(Json::Value& apps_json) {
}
void ResumeCtrl::ClearResumptionInfo() {
- LOG4CXX_AUTO_TRACE(logger_);
- Json::Value empty_json;
+ Json::Value empty_json;
- SetSavedApplication(empty_json);
- resumption::LastState::instance()->SaveToFileSystem();
+ SetSavedApplication(empty_json);
+ resumption::LastState::instance()->SaveToFileSystem();
}
Json::Value ResumeCtrl::GetApplicationCommands(
ApplicationConstSharedPtr application) {
DCHECK(application.get());
- LOG4CXX_TRACE(logger_, "ENTER app_id:"
+ LOG4CXX_INFO(logger_, "ResumeCtrl::GetApplicationCommands "
<< application->app_id());
Json::Value result;
- const DataAccessor<CommandsMap> accessor = application->commands_map();
- const CommandsMap& commands = accessor.GetData();
+ const CommandsMap& commands = application->commands_map();
CommandsMap::const_iterator it = commands.begin();
for (;it != commands.end(); ++it) {
smart_objects::SmartObject* so = it->second;
Json::Value curr;
Formatters::CFormatterJsonBase::objToJsonValue(*so, curr);
result.append(curr);
+ LOG4CXX_INFO(logger_, "Converted:" << curr.toStyledString());
}
return result;
}
@@ -635,18 +769,18 @@ Json::Value ResumeCtrl::GetApplicationCommands(
Json::Value ResumeCtrl::GetApplicationSubMenus(
ApplicationConstSharedPtr application) {
DCHECK(application.get());
- LOG4CXX_TRACE(logger_, "ENTER app_id:"
+ LOG4CXX_INFO(logger_, "ResumeCtrl::GetApplicationCommands "
<< application->app_id());
Json::Value result;
- const DataAccessor<SubMenuMap> accessor = application->sub_menu_map();
- const SubMenuMap& sub_menus = accessor.GetData();
+ const SubMenuMap& sub_menus = application->sub_menu_map();
SubMenuMap::const_iterator it = sub_menus.begin();
for (;it != sub_menus.end(); ++it) {
smart_objects::SmartObject* so = it->second;
Json::Value curr;
Formatters::CFormatterJsonBase::objToJsonValue(*so, curr);
result.append(curr);
+ LOG4CXX_INFO(logger_, "Converted:" << curr.toStyledString());
}
return result;
}
@@ -654,18 +788,18 @@ Json::Value ResumeCtrl::GetApplicationSubMenus(
Json::Value ResumeCtrl::GetApplicationInteractionChoiseSets(
ApplicationConstSharedPtr application) {
DCHECK(application.get());
- LOG4CXX_TRACE(logger_, "ENTER app_id:"
+ LOG4CXX_INFO(logger_, "ResumeCtrl::GetApplicationInteractionChoiseSets "
<< application->app_id());
Json::Value result;
- const DataAccessor<ChoiceSetMap> accessor = application->choice_set_map();
- const ChoiceSetMap& choices = accessor.GetData();
+ const ChoiceSetMap& choices = application->choice_set_map();
ChoiceSetMap::const_iterator it = choices.begin();
for ( ;it != choices.end(); ++it) {
smart_objects::SmartObject* so = it->second;
Json::Value curr;
Formatters::CFormatterJsonBase::objToJsonValue(*so, curr);
result.append(curr);
+ LOG4CXX_INFO(logger_, "Converted:" << curr.toStyledString());
}
return result;
}
@@ -673,9 +807,10 @@ Json::Value ResumeCtrl::GetApplicationInteractionChoiseSets(
Json::Value ResumeCtrl::GetApplicationGlobalProperties(
ApplicationConstSharedPtr application) {
DCHECK(application.get());
- LOG4CXX_TRACE(logger_, "ENTER app_id:"
+ LOG4CXX_INFO(logger_, "ResumeCtrl::GetApplicationGlobalProperties "
<< application->app_id());
+ Json::Value result;
const smart_objects::SmartObject* help_promt = application->help_prompt();
const smart_objects::SmartObject* timeout_prompt = application->timeout_prompt();
const smart_objects::SmartObject* vr_help = application->vr_help();
@@ -694,24 +829,27 @@ Json::Value ResumeCtrl::GetApplicationGlobalProperties(
sgp[strings::keyboard_properties] = JsonFromSO(keyboard_props);
sgp[strings::menu_title] = JsonFromSO(menu_title);
sgp[strings::menu_icon] = JsonFromSO(menu_icon);
+
return sgp;
}
Json::Value ResumeCtrl::GetApplicationSubscriptions(
ApplicationConstSharedPtr application) {
- LOG4CXX_AUTO_TRACE(logger_);
DCHECK(application.get());
- Json::Value result;
- if (!application) {
- LOG4CXX_DEBUG(logger_, "ENTER app_id:" << application->app_id());
+ LOG4CXX_INFO(logger_, "ResumeCtrl::GetApplicationSubscriptions "
+ << application->app_id());
- Append(application->SubscribedButtons().begin(),
- application->SubscribedButtons().end(),
- strings::application_buttons, result);
+ Json::Value result;
+ std::set<mobile_apis::ButtonName::eType>::iterator it_button ;
+ std::set<uint32_t>::iterator it_vehicle;
- Append(application->SubscribedButtons().begin(),
- application->SubscribedButtons().end(),
- strings::application_vehicle_info, result);
+ for (it_button = application->SubscribedButtons().begin() ;
+ it_button != application->SubscribedButtons().end(); ++it_button) {
+ result[strings::application_buttons].append(*it_button);
+ }
+ for (it_vehicle = application->SubscribesIVI().begin();
+ it_vehicle != application->SubscribesIVI().end(); ++it_vehicle) {
+ result[strings::application_vehicle_info].append(*it_vehicle);
}
return result;
}
@@ -719,7 +857,7 @@ Json::Value ResumeCtrl::GetApplicationSubscriptions(
Json::Value ResumeCtrl::GetApplicationFiles(
ApplicationConstSharedPtr application) {
DCHECK(application.get());
- LOG4CXX_TRACE(logger_, "ENTER app_id:"
+ LOG4CXX_INFO(logger_, "ResumeCtrl::GetApplicationFiles "
<< application->app_id());
Json::Value result;
@@ -742,8 +880,8 @@ Json::Value ResumeCtrl::GetApplicationFiles(
Json::Value ResumeCtrl::GetApplicationShow(
ApplicationConstSharedPtr application) {
DCHECK(application.get());
- LOG4CXX_TRACE(logger_, "ENTER app_id:"
- << application->app_id());
+ LOG4CXX_INFO(logger_, "ResumeCtrl::GetApplicationShow "
+ << application->app_id());
Json::Value result;
const smart_objects::SmartObject* show_so = application->show_command();
@@ -764,7 +902,6 @@ Json::Value ResumeCtrl::JsonFromSO(const smart_objects::SmartObject *so) {
bool ResumeCtrl::ProcessHMIRequest(smart_objects::SmartObject* request,
bool use_events) {
- LOG4CXX_AUTO_TRACE(logger_);
if (use_events) {
const hmi_apis::FunctionID::eType function_id =
static_cast<hmi_apis::FunctionID::eType>(
@@ -781,207 +918,10 @@ bool ResumeCtrl::ProcessHMIRequest(smart_objects::SmartObject* request,
return false;
}
-void ResumeCtrl::InsertToTimerQueue(uint32_t app_id, uint32_t time_stamp) {
- LOG4CXX_AUTO_TRACE(logger_);
- sync_primitives::AutoLock autolock(queue_lock_);
- LOG4CXX_DEBUG(logger_,"After queue_lock_ Accure");
- waiting_for_timer_.insert(std::make_pair(app_id, time_stamp));
-}
-
-void ResumeCtrl::AddFiles(ApplicationSharedPtr application, const Json::Value& saved_app) {
- LOG4CXX_AUTO_TRACE(logger_);
- if (saved_app.isMember(strings::application_files)) {
- const Json::Value& application_files = saved_app[strings::application_files];
- for (Json::Value::iterator json_it = application_files.begin();
- json_it != application_files.end(); ++json_it) {
- const Json::Value& file_data = *json_it;
-
- const bool is_persistent = file_data.isMember(strings::persistent_file) &&
- file_data[strings::persistent_file].asBool();
- if (is_persistent) {
- AppFile file;
- file.is_persistent = is_persistent;
- file.is_download_complete = file_data[strings::is_download_complete].asBool();
- file.file_name = file_data[strings::sync_file_name].asString();
- file.file_type = static_cast<mobile_apis::FileType::eType> (
- file_data[strings::file_type].asInt());
- application->AddFile(file);
- }
- }
- } else {
- LOG4CXX_FATAL(logger_, "application_files section is not exists");
- }
-}
-
-void ResumeCtrl::AddSubmenues(ApplicationSharedPtr application, const Json::Value& saved_app) {
- LOG4CXX_AUTO_TRACE(logger_);
- if (saved_app.isMember(strings::application_submenus)) {
- const Json::Value& app_submenus = saved_app[strings::application_submenus];
- for (Json::Value::iterator json_it = app_submenus.begin();
- json_it != app_submenus.end(); ++json_it) {
- const Json::Value& json_submenu = *json_it;
- smart_objects::SmartObject message(smart_objects::SmartType::SmartType_Map);
- Formatters::CFormatterJsonBase::jsonValueToObj(json_submenu, message);
- application->AddSubMenu(message[strings::menu_id].asUInt(), message);
- }
-
- ProcessHMIRequests(MessageHelper::CreateAddSubMenuRequestToHMI(application));
- } else {
- LOG4CXX_FATAL(logger_, "application_submenus section is not exists");
- }
-}
-
-void ResumeCtrl::AddCommands(ApplicationSharedPtr application, const Json::Value& saved_app) {
- LOG4CXX_AUTO_TRACE(logger_);
- if (saved_app.isMember(strings::application_commands)) {
- const Json::Value& app_commands = saved_app[strings::application_commands];
- for (Json::Value::iterator json_it = app_commands.begin();
- json_it != app_commands.end(); ++json_it) {
- const Json::Value& json_command = *json_it;
- smart_objects::SmartObject message(smart_objects::SmartType::SmartType_Map);
- Formatters::CFormatterJsonBase::jsonValueToObj(json_command, message);
- application->AddCommand(message[strings::cmd_id].asUInt(), message);
- }
-
- ProcessHMIRequests(MessageHelper::CreateAddCommandRequestToHMI(application));
- } else {
- LOG4CXX_FATAL(logger_, "application_commands section is not exists");
- }
-}
-
-void ResumeCtrl::AddChoicesets(ApplicationSharedPtr application, const Json::Value& saved_app) {
- if(saved_app.isMember(strings::application_choise_sets)) {
- const Json::Value& app_choise_sets = saved_app[strings::application_choise_sets];
- for (Json::Value::iterator json_it = app_choise_sets.begin();
- json_it != app_choise_sets.end(); ++json_it) {
- const Json::Value& json_choiset = *json_it;
- smart_objects::SmartObject msg_param(smart_objects::SmartType::SmartType_Map);
- Formatters::CFormatterJsonBase::jsonValueToObj(json_choiset , msg_param);
- const int32_t choice_set_id = msg_param
- [strings::interaction_choice_set_id].asInt();
- uint32_t choice_grammar_id = msg_param[strings::grammar_id].asUInt();
- application->AddChoiceSet(choice_set_id, msg_param);
-
- const size_t size = msg_param[strings::choice_set].length();
- for (size_t j = 0; j < size; ++j) {
- smart_objects::SmartObject choise_params(smart_objects::SmartType_Map);
- choise_params[strings::app_id] = application->app_id();
- choise_params[strings::cmd_id] =
- msg_param[strings::choice_set][j][strings::choice_id];
- choise_params[strings::vr_commands] = smart_objects::SmartObject(
- smart_objects::SmartType_Array);
- choise_params[strings::vr_commands] =
- msg_param[strings::choice_set][j][strings::vr_commands];
-
- choise_params[strings::type] = hmi_apis::Common_VRCommandType::Choice;
- choise_params[strings::grammar_id] = choice_grammar_id;
- SendHMIRequest(hmi_apis::FunctionID::VR_AddCommand, &choise_params);
- }
- }
- } else {
- LOG4CXX_FATAL(logger_, "There is no any choicesets");
- }
-}
-
-void ResumeCtrl::SetGlobalProperties(ApplicationSharedPtr application, const Json::Value& saved_app) {
- const Json::Value& global_properties = saved_app[strings::application_global_properties];
- if (!global_properties.isNull()) {
- smart_objects::SmartObject properties_so(smart_objects::SmartType::SmartType_Map);
- Formatters::CFormatterJsonBase::jsonValueToObj(global_properties , properties_so);
- application->load_global_properties(properties_so);
- MessageHelper::SendGlobalPropertiesToHMI(application);
- }
-}
-
-void ResumeCtrl::AddSubscriptions(ApplicationSharedPtr application, const Json::Value& saved_app) {
- if (saved_app.isMember(strings::application_subscribtions)) {
- const Json::Value& subscribtions = saved_app[strings::application_subscribtions];
-
- if (subscribtions.isMember(strings::application_buttons)) {
- const Json::Value& subscribtions_buttons = subscribtions[strings::application_buttons];
- mobile_apis::ButtonName::eType btn;
- for (Json::Value::iterator json_it = subscribtions_buttons.begin();
- json_it != subscribtions_buttons.end(); ++json_it) {
- btn = static_cast<mobile_apis::ButtonName::eType>((*json_it).asInt());
- application->SubscribeToButton(btn);
- }
- }
- if (subscribtions.isMember(strings::application_vehicle_info)) {
- const Json::Value& subscribtions_ivi= subscribtions[strings::application_vehicle_info];
- VehicleDataType ivi;
- for (Json::Value::iterator json_it = subscribtions_ivi.begin();
- json_it != subscribtions_ivi.end(); ++json_it) {
- ivi = static_cast<VehicleDataType>((*json_it).asInt());
- application->SubscribeToIVI(ivi);
- }
- }
-
- ProcessHMIRequests(MessageHelper::GetIVISubscriptionRequests(application));
- }
-}
-
-void ResumeCtrl::ProcessHMIRequests(const MessageHelper::SmartObjectList& requests) {
- for (MessageHelper::SmartObjectList::const_iterator it = requests.begin(),
- total = requests.end();
- it != total; ++it) {
- ProcessHMIRequest(*it, true);
- }
-}
-
-bool ResumeCtrl::CheckIcons(ApplicationSharedPtr application,
- const Json::Value& json_object) {
- LOG4CXX_AUTO_TRACE(logger_);
- bool result = true;
- if (!json_object.isNull()) {
- Json::Value::const_iterator json_it = json_object.begin();
- for (;json_it != json_object.end() && result; ++json_it) {
- const Json::Value& json_command = *json_it;
- if (!json_command.isNull()) {
- smart_objects::SmartObject message(smart_objects::SmartType::SmartType_Map);
- Formatters::CFormatterJsonBase::jsonValueToObj(json_command, message);
-
- result = (mobile_apis::Result::INVALID_DATA ==
- MessageHelper::VerifyImageFiles(message, application));
- } else {
- LOG4CXX_WARN(logger_, "Invalid json object");
- }
- }
- } else {
- LOG4CXX_WARN(logger_, "Passed json object is null");
- }
- return result;
-}
-
-Json::Value& ResumeCtrl::GetFromSavedOrAppend(const std::string& mobile_app_id) {
- LOG4CXX_AUTO_TRACE(logger_);
- for (Json::Value::iterator it = GetSavedApplications().begin();
- it != GetSavedApplications().end(); ++it) {
- if (mobile_app_id == (*it)[strings::app_id].asString()) {
- return *it;
- }
- }
-
- return GetSavedApplications().append(Json::Value());
-}
-
-int ResumeCtrl::GetObjectIndex(const std::string& mobile_app_id) {
-
- const Json::Value& apps = GetSavedApplications();
-
- const Json::ArrayIndex size = apps.size();
- Json::ArrayIndex idx = apps.size();
- for (; idx != size; ++idx) {
- if (mobile_app_id == apps[idx][strings::app_id].asString()) {
- return idx;
- }
- }
- return -1;
-}
-
void ResumeCtrl::SendHMIRequest(
const hmi_apis::FunctionID::eType& function_id,
const smart_objects::SmartObject* msg_params, bool use_events) {
- LOG4CXX_AUTO_TRACE(logger_);
+
NsSmartDeviceLink::NsSmartObjects::SmartObject* result =
MessageHelper::CreateModuleInfoSO(function_id);
int32_t hmi_correlation_id =
diff --git a/src/components/application_manager/src/usage_statistics.cc b/src/components/application_manager/src/usage_statistics.cc
index ad986d2223..44ab164538 100644
--- a/src/components/application_manager/src/usage_statistics.cc
+++ b/src/components/application_manager/src/usage_statistics.cc
@@ -1,4 +1,4 @@
-/*
+/**
* Copyright (c) 2014, Ford Motor Company
* All rights reserved.
*