summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.gitignore1
-rw-r--r--CMakeLists.txt340
-rw-r--r--src/3rd_party-static/MessageBroker/CMakeLists.txt2
-rw-r--r--src/3rd_party-static/MessageBroker/src/client/mb_controller.cpp6
-rw-r--r--src/3rd_party-static/MessageBroker/src/lib_messagebroker/websocket_handler.cpp5
-rw-r--r--src/3rd_party-static/jsoncpp/src/lib_json/json_reader.cpp2
-rw-r--r--src/3rd_party/CMakeLists.txt4
-rw-r--r--src/3rd_party/apache-log4cxx-0.10.0/autom4te.cache/requests88
-rwxr-xr-xsrc/3rd_party/apache-log4cxx-0.10.0/configure285
-rw-r--r--src/3rd_party/apache-log4cxx-cmake/CMakeLists.txt13
-rw-r--r--src/3rd_party/apr-1.5.0/include/apr.h28
-rw-r--r--src/3rd_party/dbus-cmake/CMakeLists.txt13
-rw-r--r--src/appMain/CMakeLists.txt1
-rw-r--r--src/appMain/life_cycle.cc54
-rw-r--r--src/appMain/life_cycle.h1
-rw-r--r--src/appMain/main.cc18
-rw-r--r--src/appMain/sdl_preloaded_pt.json385
-rw-r--r--src/appMain/smartDeviceLink.ini29
-rw-r--r--src/components/HMI/app/AppViews.js11
-rw-r--r--src/components/HMI/app/SDLApp.js4
-rw-r--r--src/components/HMI/app/controller/sdl/AppController.js6
-rw-r--r--src/components/HMI/app/controller/sdl/Controller.js31
-rw-r--r--src/components/HMI/app/controller/sdl/RPCController.js108
-rw-r--r--src/components/HMI/app/model/media/CDModel.js2
-rw-r--r--src/components/HMI/app/model/sdl/MediaModel.js12
-rw-r--r--src/components/HMI/app/model/sdl/Model.js1
-rw-r--r--src/components/HMI/app/model/sdl/NonMediaModel.js10
-rw-r--r--src/components/HMI/app/view/WarningView.js17
-rw-r--r--src/components/HMI/app/view/home/controlButtons.js5
-rw-r--r--src/components/HMI/app/view/home/statusMediaView.js2
-rw-r--r--src/components/HMI/app/view/infoView.js16
-rw-r--r--src/components/HMI/app/view/media/common/LeftMenuView.js1
-rw-r--r--src/components/HMI/app/view/media/sdl/controllsView.js4
-rw-r--r--src/components/HMI/app/view/media/sdlmediaView.js4
-rw-r--r--src/components/HMI/app/view/mediaView.js2
-rw-r--r--src/components/HMI/app/view/sdl/ExitAppView.js22
-rw-r--r--src/components/HMI/app/view/sdl/TTSPopUp.js34
-rw-r--r--src/components/HMI/app/view/sdl/shared/interactionChoicesView.js14
-rw-r--r--src/components/HMI/css/buttonControls.css10
-rw-r--r--src/components/HMI/css/general.css41
-rw-r--r--src/components/HMI/css/info.css4
-rw-r--r--src/components/HMI/css/media.css43
-rw-r--r--src/components/HMI/css/sdl.css44
-rw-r--r--src/components/HMI/ffw/BasicCommunicationRPC.js22
-rw-r--r--src/components/HMI/ffw/NavigationRPC.js56
-rw-r--r--src/components/HMI/ffw/RPCClient.js49
-rw-r--r--src/components/HMI/ffw/RPCObserver.js235
-rw-r--r--src/components/HMI/ffw/TTSRPC.js64
-rw-r--r--src/components/HMI/ffw/UIRPC.js172
-rw-r--r--src/components/HMI/ffw/VRRPC.js29
-rw-r--r--src/components/application_manager/CMakeLists.txt6
-rw-r--r--src/components/application_manager/include/application_manager/application.h13
-rw-r--r--src/components/application_manager/include/application_manager/application_data_impl.h43
-rw-r--r--src/components/application_manager/include/application_manager/application_impl.h9
-rw-r--r--src/components/application_manager/include/application_manager/application_manager_impl.h117
-rw-r--r--src/components/application_manager/include/application_manager/commands/command.h2
-rw-r--r--src/components/application_manager/include/application_manager/commands/command_impl.h2
-rw-r--r--src/components/application_manager/include/application_manager/commands/command_request_impl.h2
-rw-r--r--src/components/application_manager/include/application_manager/commands/hmi/activate_app_request.h4
-rw-r--r--src/components/application_manager/include/application_manager/commands/hmi/activate_app_response.h2
-rw-r--r--src/components/application_manager/include/application_manager/commands/hmi/add_statistics_info_notification.h2
-rw-r--r--src/components/application_manager/include/application_manager/commands/hmi/allow_all_apps_request.h2
-rw-r--r--src/components/application_manager/include/application_manager/commands/hmi/allow_all_apps_response.h2
-rw-r--r--src/components/application_manager/include/application_manager/commands/hmi/allow_app_request.h2
-rw-r--r--src/components/application_manager/include/application_manager/commands/hmi/allow_app_response.h2
-rw-r--r--src/components/application_manager/include/application_manager/commands/hmi/basic_communication_system_request.h2
-rw-r--r--src/components/application_manager/include/application_manager/commands/hmi/basic_communication_system_response.h2
-rw-r--r--src/components/application_manager/include/application_manager/commands/hmi/button_get_capabilities_request.h2
-rw-r--r--src/components/application_manager/include/application_manager/commands/hmi/button_get_capabilities_response.h2
-rw-r--r--src/components/application_manager/include/application_manager/commands/hmi/close_popup_request.h2
-rw-r--r--src/components/application_manager/include/application_manager/commands/hmi/close_popup_response.h2
-rw-r--r--src/components/application_manager/include/application_manager/commands/hmi/get_system_info_request.h2
-rw-r--r--src/components/application_manager/include/application_manager/commands/hmi/get_system_info_response.h2
-rw-r--r--src/components/application_manager/include/application_manager/commands/hmi/get_urls.h2
-rw-r--r--src/components/application_manager/include/application_manager/commands/hmi/get_urls_response.h2
-rw-r--r--src/components/application_manager/include/application_manager/commands/hmi/mixing_audio_supported_request.h2
-rw-r--r--src/components/application_manager/include/application_manager/commands/hmi/mixing_audio_supported_response.h2
-rw-r--r--src/components/application_manager/include/application_manager/commands/hmi/navi_alert_maneuver_request.h2
-rw-r--r--src/components/application_manager/include/application_manager/commands/hmi/navi_alert_maneuver_response.h2
-rw-r--r--src/components/application_manager/include/application_manager/commands/hmi/navi_audio_start_stream_request.h2
-rw-r--r--src/components/application_manager/include/application_manager/commands/hmi/navi_is_ready_request.h2
-rw-r--r--src/components/application_manager/include/application_manager/commands/hmi/navi_is_ready_response.h2
-rw-r--r--src/components/application_manager/include/application_manager/commands/hmi/navi_send_location_request.h2
-rw-r--r--src/components/application_manager/include/application_manager/commands/hmi/navi_send_location_response.h2
-rw-r--r--src/components/application_manager/include/application_manager/commands/hmi/navi_show_constant_tbt_request.h2
-rw-r--r--src/components/application_manager/include/application_manager/commands/hmi/navi_show_constant_tbt_response.h2
-rw-r--r--src/components/application_manager/include/application_manager/commands/hmi/navi_start_stream_request.h2
-rw-r--r--src/components/application_manager/include/application_manager/commands/hmi/navi_update_turn_list_request.h2
-rw-r--r--src/components/application_manager/include/application_manager/commands/hmi/navi_update_turn_list_response.h2
-rw-r--r--src/components/application_manager/include/application_manager/commands/hmi/on_allow_sdl_functionality_notification.h2
-rw-r--r--src/components/application_manager/include/application_manager/commands/hmi/on_app_activated_notification.h2
-rw-r--r--src/components/application_manager/include/application_manager/commands/hmi/on_app_deactivated_notification.h2
-rw-r--r--src/components/application_manager/include/application_manager/commands/hmi/on_app_permission_changed_notification.h2
-rw-r--r--src/components/application_manager/include/application_manager/commands/hmi/on_app_permission_consent_notification.h2
-rw-r--r--src/components/application_manager/include/application_manager/commands/hmi/on_app_registered_notification.h2
-rw-r--r--src/components/application_manager/include/application_manager/commands/hmi/on_app_unregistered_notification.h2
-rw-r--r--src/components/application_manager/include/application_manager/commands/hmi/on_button_event_notification.h2
-rw-r--r--src/components/application_manager/include/application_manager/commands/hmi/on_button_press_notification.h2
-rw-r--r--src/components/application_manager/include/application_manager/commands/hmi/on_device_chosen_notification.h2
-rw-r--r--src/components/application_manager/include/application_manager/commands/hmi/on_device_state_changed_notification.h2
-rw-r--r--src/components/application_manager/include/application_manager/commands/hmi/on_driver_distraction_notification.h2
-rw-r--r--src/components/application_manager/include/application_manager/commands/hmi/on_exit_all_applications_notification.h2
-rw-r--r--src/components/application_manager/include/application_manager/commands/hmi/on_exit_application_notification.h2
-rw-r--r--src/components/application_manager/include/application_manager/commands/hmi/on_file_removed_notification.h2
-rw-r--r--src/components/application_manager/include/application_manager/commands/hmi/on_find_applications.h2
-rw-r--r--src/components/application_manager/include/application_manager/commands/hmi/on_ignition_cycle_over_notification.h2
-rw-r--r--src/components/application_manager/include/application_manager/commands/hmi/on_navi_tbt_client_state_notification.h2
-rw-r--r--src/components/application_manager/include/application_manager/commands/hmi/on_play_tone_notification.h2
-rw-r--r--src/components/application_manager/include/application_manager/commands/hmi/on_policy_update.h2
-rw-r--r--src/components/application_manager/include/application_manager/commands/hmi/on_put_file_notification.h2
-rw-r--r--src/components/application_manager/include/application_manager/commands/hmi/on_ready_notification.h2
-rw-r--r--src/components/application_manager/include/application_manager/commands/hmi/on_received_policy_update.h2
-rw-r--r--src/components/application_manager/include/application_manager/commands/hmi/on_record_start_notification.h2
-rw-r--r--src/components/application_manager/include/application_manager/commands/hmi/on_resume_audio_source_notification.h2
-rw-r--r--src/components/application_manager/include/application_manager/commands/hmi/on_sdl_close_notification.h2
-rw-r--r--src/components/application_manager/include/application_manager/commands/hmi/on_sdl_consent_needed_notification.h2
-rw-r--r--src/components/application_manager/include/application_manager/commands/hmi/on_sdl_persistence_complete_notification.h2
-rw-r--r--src/components/application_manager/include/application_manager/commands/hmi/on_start_device_discovery.h2
-rw-r--r--src/components/application_manager/include/application_manager/commands/hmi/on_status_update_notification.h2
-rw-r--r--src/components/application_manager/include/application_manager/commands/hmi/on_system_context_notification.h2
-rw-r--r--src/components/application_manager/include/application_manager/commands/hmi/on_system_error_notification.h2
-rw-r--r--src/components/application_manager/include/application_manager/commands/hmi/on_system_info_changed_notification.h2
-rw-r--r--src/components/application_manager/include/application_manager/commands/hmi/on_system_request_notification.h2
-rw-r--r--src/components/application_manager/include/application_manager/commands/hmi/on_tts_language_change_notification.h2
-rw-r--r--src/components/application_manager/include/application_manager/commands/hmi/on_tts_reset_timeout_notification.h2
-rw-r--r--src/components/application_manager/include/application_manager/commands/hmi/on_tts_started_notification.h2
-rw-r--r--src/components/application_manager/include/application_manager/commands/hmi/on_tts_stopped_notification.h2
-rw-r--r--src/components/application_manager/include/application_manager/commands/hmi/on_ui_command_notification.h2
-rw-r--r--src/components/application_manager/include/application_manager/commands/hmi/on_ui_keyboard_input_notification.h2
-rw-r--r--src/components/application_manager/include/application_manager/commands/hmi/on_ui_language_change_notification.h2
-rw-r--r--src/components/application_manager/include/application_manager/commands/hmi/on_ui_reset_timeout_notification.h2
-rw-r--r--src/components/application_manager/include/application_manager/commands/hmi/on_ui_touch_event_notification.h2
-rw-r--r--src/components/application_manager/include/application_manager/commands/hmi/on_update_device_list.h2
-rw-r--r--src/components/application_manager/include/application_manager/commands/hmi/on_vi_acc_pedal_position_notification.h2
-rw-r--r--src/components/application_manager/include/application_manager/commands/hmi/on_vi_belt_status_notification.h2
-rw-r--r--src/components/application_manager/include/application_manager/commands/hmi/on_vi_body_information_notification.h2
-rw-r--r--src/components/application_manager/include/application_manager/commands/hmi/on_vi_device_status_notification.h2
-rw-r--r--src/components/application_manager/include/application_manager/commands/hmi/on_vi_driver_braking_notification.h2
-rw-r--r--src/components/application_manager/include/application_manager/commands/hmi/on_vi_engine_torque_notification.h2
-rw-r--r--src/components/application_manager/include/application_manager/commands/hmi/on_vi_external_temperature_notification.h2
-rw-r--r--src/components/application_manager/include/application_manager/commands/hmi/on_vi_fuel_level_notification.h2
-rw-r--r--src/components/application_manager/include/application_manager/commands/hmi/on_vi_fuel_level_state_notification.h2
-rw-r--r--src/components/application_manager/include/application_manager/commands/hmi/on_vi_gps_data_notification.h2
-rw-r--r--src/components/application_manager/include/application_manager/commands/hmi/on_vi_head_lamp_status_notification.h2
-rw-r--r--src/components/application_manager/include/application_manager/commands/hmi/on_vi_instant_fuel_consumption_notification.h2
-rw-r--r--src/components/application_manager/include/application_manager/commands/hmi/on_vi_my_key_notification.h2
-rw-r--r--src/components/application_manager/include/application_manager/commands/hmi/on_vi_odometer_notification.h2
-rw-r--r--src/components/application_manager/include/application_manager/commands/hmi/on_vi_prndl_notification.h2
-rw-r--r--src/components/application_manager/include/application_manager/commands/hmi/on_vi_rpm_notification.h2
-rw-r--r--src/components/application_manager/include/application_manager/commands/hmi/on_vi_speed_notification.h2
-rw-r--r--src/components/application_manager/include/application_manager/commands/hmi/on_vi_steering_wheel_angle_notification.h2
-rw-r--r--src/components/application_manager/include/application_manager/commands/hmi/on_vi_tire_pressure_notification.h2
-rw-r--r--src/components/application_manager/include/application_manager/commands/hmi/on_vi_vehicle_data_notification.h2
-rw-r--r--src/components/application_manager/include/application_manager/commands/hmi/on_vi_vin_notification.h2
-rw-r--r--src/components/application_manager/include/application_manager/commands/hmi/on_vi_wiper_status_notification.h2
-rw-r--r--src/components/application_manager/include/application_manager/commands/hmi/on_vr_command_notification.h2
-rw-r--r--src/components/application_manager/include/application_manager/commands/hmi/on_vr_language_change_notification.h2
-rw-r--r--src/components/application_manager/include/application_manager/commands/hmi/on_vr_started_notification.h2
-rw-r--r--src/components/application_manager/include/application_manager/commands/hmi/on_vr_stopped_notification.h2
-rw-r--r--src/components/application_manager/include/application_manager/commands/hmi/request_from_hmi.h2
-rw-r--r--src/components/application_manager/include/application_manager/commands/hmi/request_to_hmi.h2
-rw-r--r--src/components/application_manager/include/application_manager/commands/hmi/response_from_hmi.h2
-rw-r--r--src/components/application_manager/include/application_manager/commands/hmi/sdl_activate_app_request.h2
-rw-r--r--src/components/application_manager/include/application_manager/commands/hmi/sdl_activate_app_response.h2
-rw-r--r--src/components/application_manager/include/application_manager/commands/hmi/sdl_get_list_of_permissions_request.h2
-rw-r--r--src/components/application_manager/include/application_manager/commands/hmi/sdl_get_list_of_permissions_response.h2
-rw-r--r--src/components/application_manager/include/application_manager/commands/hmi/sdl_get_status_update_request.h2
-rw-r--r--src/components/application_manager/include/application_manager/commands/hmi/sdl_get_status_update_response.h2
-rw-r--r--src/components/application_manager/include/application_manager/commands/hmi/sdl_get_user_friendly_message_request.h2
-rw-r--r--src/components/application_manager/include/application_manager/commands/hmi/sdl_get_user_friendly_message_response.h2
-rw-r--r--src/components/application_manager/include/application_manager/commands/hmi/sdl_policy_update.h2
-rw-r--r--src/components/application_manager/include/application_manager/commands/hmi/sdl_policy_update_response.h2
-rw-r--r--src/components/application_manager/include/application_manager/commands/hmi/tts_change_registration_request.h2
-rw-r--r--src/components/application_manager/include/application_manager/commands/hmi/tts_change_registration_response.h2
-rw-r--r--src/components/application_manager/include/application_manager/commands/hmi/tts_get_capabilities_request.h2
-rw-r--r--src/components/application_manager/include/application_manager/commands/hmi/tts_get_capabilities_response.h2
-rw-r--r--src/components/application_manager/include/application_manager/commands/hmi/tts_get_language_request.h2
-rw-r--r--src/components/application_manager/include/application_manager/commands/hmi/tts_get_language_response.h2
-rw-r--r--src/components/application_manager/include/application_manager/commands/hmi/tts_get_supported_languages_request.h2
-rw-r--r--src/components/application_manager/include/application_manager/commands/hmi/tts_get_supported_languages_response.h2
-rw-r--r--src/components/application_manager/include/application_manager/commands/hmi/tts_is_ready_request.h2
-rw-r--r--src/components/application_manager/include/application_manager/commands/hmi/tts_is_ready_response.h2
-rw-r--r--src/components/application_manager/include/application_manager/commands/hmi/tts_set_global_properties_request.h2
-rw-r--r--src/components/application_manager/include/application_manager/commands/hmi/tts_set_global_properties_response.h2
-rw-r--r--src/components/application_manager/include/application_manager/commands/hmi/tts_speak_request.h2
-rw-r--r--src/components/application_manager/include/application_manager/commands/hmi/tts_speak_response.h2
-rw-r--r--src/components/application_manager/include/application_manager/commands/hmi/tts_stop_speaking_request.h2
-rw-r--r--src/components/application_manager/include/application_manager/commands/hmi/tts_stop_speaking_response.h2
-rw-r--r--src/components/application_manager/include/application_manager/commands/hmi/ui_add_command_request.h2
-rw-r--r--src/components/application_manager/include/application_manager/commands/hmi/ui_add_command_response.h2
-rw-r--r--src/components/application_manager/include/application_manager/commands/hmi/ui_add_submenu_request.h2
-rw-r--r--src/components/application_manager/include/application_manager/commands/hmi/ui_add_submenu_response.h2
-rw-r--r--src/components/application_manager/include/application_manager/commands/hmi/ui_alert_request.h2
-rw-r--r--src/components/application_manager/include/application_manager/commands/hmi/ui_alert_response.h2
-rw-r--r--src/components/application_manager/include/application_manager/commands/hmi/ui_change_registration_request.h2
-rw-r--r--src/components/application_manager/include/application_manager/commands/hmi/ui_change_registration_response.h2
-rw-r--r--src/components/application_manager/include/application_manager/commands/hmi/ui_delete_command_request.h2
-rw-r--r--src/components/application_manager/include/application_manager/commands/hmi/ui_delete_command_response.h2
-rw-r--r--src/components/application_manager/include/application_manager/commands/hmi/ui_delete_submenu_request.h2
-rw-r--r--src/components/application_manager/include/application_manager/commands/hmi/ui_delete_submenu_response.h2
-rw-r--r--src/components/application_manager/include/application_manager/commands/hmi/ui_end_audio_pass_thru_request.h2
-rw-r--r--src/components/application_manager/include/application_manager/commands/hmi/ui_end_audio_pass_thru_response.h2
-rw-r--r--src/components/application_manager/include/application_manager/commands/hmi/ui_get_capabilities_request.h2
-rw-r--r--src/components/application_manager/include/application_manager/commands/hmi/ui_get_capabilities_response.h2
-rw-r--r--src/components/application_manager/include/application_manager/commands/hmi/ui_get_language_request.h2
-rw-r--r--src/components/application_manager/include/application_manager/commands/hmi/ui_get_language_response.h2
-rw-r--r--src/components/application_manager/include/application_manager/commands/hmi/ui_get_supported_languages_request.h2
-rw-r--r--src/components/application_manager/include/application_manager/commands/hmi/ui_get_supported_languages_response.h2
-rw-r--r--src/components/application_manager/include/application_manager/commands/hmi/ui_is_ready_request.h2
-rw-r--r--src/components/application_manager/include/application_manager/commands/hmi/ui_is_ready_response.h2
-rw-r--r--src/components/application_manager/include/application_manager/commands/hmi/ui_perform_audio_pass_thru_request.h2
-rw-r--r--src/components/application_manager/include/application_manager/commands/hmi/ui_perform_audio_pass_thru_response.h2
-rw-r--r--src/components/application_manager/include/application_manager/commands/hmi/ui_perform_interaction_request.h2
-rw-r--r--src/components/application_manager/include/application_manager/commands/hmi/ui_perform_interaction_response.h2
-rw-r--r--src/components/application_manager/include/application_manager/commands/hmi/ui_scrollable_message_request.h2
-rw-r--r--src/components/application_manager/include/application_manager/commands/hmi/ui_scrollable_message_response.h2
-rw-r--r--src/components/application_manager/include/application_manager/commands/hmi/ui_set_display_layout_response.h2
-rw-r--r--src/components/application_manager/include/application_manager/commands/hmi/ui_set_global_properties_request.h2
-rw-r--r--src/components/application_manager/include/application_manager/commands/hmi/ui_set_global_properties_response.h2
-rw-r--r--src/components/application_manager/include/application_manager/commands/hmi/ui_set_icon_request.h2
-rw-r--r--src/components/application_manager/include/application_manager/commands/hmi/ui_set_icon_response.h2
-rw-r--r--src/components/application_manager/include/application_manager/commands/hmi/ui_set_media_clock_timer_request.h2
-rw-r--r--src/components/application_manager/include/application_manager/commands/hmi/ui_set_media_clock_timer_response.h2
-rw-r--r--src/components/application_manager/include/application_manager/commands/hmi/ui_show_request.h2
-rw-r--r--src/components/application_manager/include/application_manager/commands/hmi/ui_show_response.h2
-rw-r--r--src/components/application_manager/include/application_manager/commands/hmi/ui_slider_request.h2
-rw-r--r--src/components/application_manager/include/application_manager/commands/hmi/ui_slider_response.h2
-rw-r--r--src/components/application_manager/include/application_manager/commands/hmi/update_app_list_request.h2
-rw-r--r--src/components/application_manager/include/application_manager/commands/hmi/update_app_list_response.h2
-rw-r--r--src/components/application_manager/include/application_manager/commands/hmi/update_device_list_request.h2
-rw-r--r--src/components/application_manager/include/application_manager/commands/hmi/update_device_list_response.h2
-rw-r--r--src/components/application_manager/include/application_manager/commands/hmi/update_sdl_request.h2
-rw-r--r--src/components/application_manager/include/application_manager/commands/hmi/update_sdl_response.h2
-rw-r--r--src/components/application_manager/include/application_manager/commands/hmi/vi_diagnostic_message_request.h2
-rw-r--r--src/components/application_manager/include/application_manager/commands/hmi/vi_diagnostic_message_response.h2
-rw-r--r--src/components/application_manager/include/application_manager/commands/hmi/vi_get_dtcs_request.h2
-rw-r--r--src/components/application_manager/include/application_manager/commands/hmi/vi_get_dtcs_response.h2
-rw-r--r--src/components/application_manager/include/application_manager/commands/hmi/vi_get_vehicle_data_request.h2
-rw-r--r--src/components/application_manager/include/application_manager/commands/hmi/vi_get_vehicle_data_request_template.h2
-rw-r--r--src/components/application_manager/include/application_manager/commands/hmi/vi_get_vehicle_data_response.h2
-rw-r--r--src/components/application_manager/include/application_manager/commands/hmi/vi_get_vehicle_data_response_template.h2
-rw-r--r--src/components/application_manager/include/application_manager/commands/hmi/vi_get_vehicle_type_request.h2
-rw-r--r--src/components/application_manager/include/application_manager/commands/hmi/vi_get_vehicle_type_response.h2
-rw-r--r--src/components/application_manager/include/application_manager/commands/hmi/vi_is_ready_request.h2
-rw-r--r--src/components/application_manager/include/application_manager/commands/hmi/vi_is_ready_response.h2
-rw-r--r--src/components/application_manager/include/application_manager/commands/hmi/vi_read_did_request.h2
-rw-r--r--src/components/application_manager/include/application_manager/commands/hmi/vi_read_did_response.h2
-rw-r--r--src/components/application_manager/include/application_manager/commands/hmi/vi_subscribe_vehicle_data_request.h2
-rw-r--r--src/components/application_manager/include/application_manager/commands/hmi/vi_subscribe_vehicle_data_request_template.h2
-rw-r--r--src/components/application_manager/include/application_manager/commands/hmi/vi_subscribe_vehicle_data_response.h2
-rw-r--r--src/components/application_manager/include/application_manager/commands/hmi/vi_subscribe_vehicle_data_response_template.h2
-rw-r--r--src/components/application_manager/include/application_manager/commands/hmi/vi_unsubscribe_vehicle_data_request.h2
-rw-r--r--src/components/application_manager/include/application_manager/commands/hmi/vi_unsubscribe_vehicle_data_request_template.h2
-rw-r--r--src/components/application_manager/include/application_manager/commands/hmi/vi_unsubscribe_vehicle_data_response.h2
-rw-r--r--src/components/application_manager/include/application_manager/commands/hmi/vi_unsubscribe_vehicle_data_response_template.h2
-rw-r--r--src/components/application_manager/include/application_manager/commands/hmi/vr_add_command_request.h2
-rw-r--r--src/components/application_manager/include/application_manager/commands/hmi/vr_add_command_response.h2
-rw-r--r--src/components/application_manager/include/application_manager/commands/hmi/vr_change_registration_request.h2
-rw-r--r--src/components/application_manager/include/application_manager/commands/hmi/vr_change_registration_response.h2
-rw-r--r--src/components/application_manager/include/application_manager/commands/hmi/vr_delete_command_request.h2
-rw-r--r--src/components/application_manager/include/application_manager/commands/hmi/vr_delete_command_response.h2
-rw-r--r--src/components/application_manager/include/application_manager/commands/hmi/vr_get_capabilities_request.h2
-rw-r--r--src/components/application_manager/include/application_manager/commands/hmi/vr_get_capabilities_response.h2
-rw-r--r--src/components/application_manager/include/application_manager/commands/hmi/vr_get_language_request.h2
-rw-r--r--src/components/application_manager/include/application_manager/commands/hmi/vr_get_language_response.h2
-rw-r--r--src/components/application_manager/include/application_manager/commands/hmi/vr_get_supported_languages_request.h2
-rw-r--r--src/components/application_manager/include/application_manager/commands/hmi/vr_get_supported_languages_response.h2
-rw-r--r--src/components/application_manager/include/application_manager/commands/hmi/vr_is_ready_request.h2
-rw-r--r--src/components/application_manager/include/application_manager/commands/hmi/vr_is_ready_response.h2
-rw-r--r--src/components/application_manager/include/application_manager/commands/hmi/vr_perform_interaction_request.h2
-rw-r--r--src/components/application_manager/include/application_manager/commands/hmi/vr_perform_interaction_response.h2
-rw-r--r--src/components/application_manager/include/application_manager/commands/mobile/change_registration_request.h4
-rw-r--r--src/components/application_manager/include/application_manager/commands/mobile/generic_response.h2
-rw-r--r--src/components/application_manager/include/application_manager/commands/mobile/register_app_interface_request.h19
-rw-r--r--src/components/application_manager/include/application_manager/commands/mobile/scrollable_message_response.h2
-rw-r--r--src/components/application_manager/include/application_manager/commands/mobile/send_location_response.h2
-rw-r--r--src/components/application_manager/include/application_manager/commands/mobile/set_media_clock_timer_response.h2
-rw-r--r--src/components/application_manager/include/application_manager/commands/mobile/show_response.h2
-rw-r--r--src/components/application_manager/include/application_manager/commands/mobile/slider_response.h2
-rw-r--r--src/components/application_manager/include/application_manager/commands/mobile/speak_response.h2
-rw-r--r--src/components/application_manager/include/application_manager/hmi_capabilities.h2
-rw-r--r--src/components/application_manager/include/application_manager/message.h2
-rw-r--r--src/components/application_manager/include/application_manager/message_helper.h35
-rw-r--r--src/components/application_manager/include/application_manager/policies/policy_event_observer.h10
-rw-r--r--src/components/application_manager/include/application_manager/policies/policy_handler.h98
-rw-r--r--src/components/application_manager/include/application_manager/request_controller.h50
-rw-r--r--src/components/application_manager/include/application_manager/request_info.h78
-rw-r--r--src/components/application_manager/include/application_manager/resume_ctrl.h135
-rw-r--r--src/components/application_manager/include/application_manager/time_metric_observer.h2
-rw-r--r--src/components/application_manager/include/application_manager/usage_statistics.h2
-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
-rw-r--r--src/components/application_manager/test/CMakeLists.txt5
-rw-r--r--src/components/application_manager/test/mock/include/application_manager/application.h13
-rw-r--r--src/components/application_manager/test/mock/include/application_manager/application_data_impl.h43
-rw-r--r--src/components/application_manager/test/mock/include/application_manager/application_impl.h9
-rw-r--r--src/components/application_manager/test/mock/include/application_manager/application_manager_impl.h19
-rw-r--r--src/components/application_manager/test/mock/include/application_manager/commands/command.h2
-rw-r--r--src/components/application_manager/test/mock/include/application_manager/commands/command_impl.h2
-rw-r--r--src/components/application_manager/test/mock/include/application_manager/commands/command_request_impl.h2
-rw-r--r--src/components/application_manager/test/mock/include/application_manager/commands/hmi/activate_app_request.h4
-rw-r--r--src/components/application_manager/test/mock/include/application_manager/commands/hmi/activate_app_response.h2
-rw-r--r--src/components/application_manager/test/mock/include/application_manager/commands/hmi/add_statistics_info_notification.h2
-rw-r--r--src/components/application_manager/test/mock/include/application_manager/commands/hmi/allow_all_apps_request.h2
-rw-r--r--src/components/application_manager/test/mock/include/application_manager/commands/hmi/allow_all_apps_response.h2
-rw-r--r--src/components/application_manager/test/mock/include/application_manager/commands/hmi/allow_app_request.h2
-rw-r--r--src/components/application_manager/test/mock/include/application_manager/commands/hmi/allow_app_response.h2
-rw-r--r--src/components/application_manager/test/mock/include/application_manager/commands/hmi/basic_communication_system_request.h2
-rw-r--r--src/components/application_manager/test/mock/include/application_manager/commands/hmi/basic_communication_system_response.h2
-rw-r--r--src/components/application_manager/test/mock/include/application_manager/commands/hmi/button_get_capabilities_request.h2
-rw-r--r--src/components/application_manager/test/mock/include/application_manager/commands/hmi/button_get_capabilities_response.h2
-rw-r--r--src/components/application_manager/test/mock/include/application_manager/commands/hmi/close_popup_request.h2
-rw-r--r--src/components/application_manager/test/mock/include/application_manager/commands/hmi/close_popup_response.h2
-rw-r--r--src/components/application_manager/test/mock/include/application_manager/commands/hmi/get_system_info_request.h2
-rw-r--r--src/components/application_manager/test/mock/include/application_manager/commands/hmi/get_system_info_response.h2
-rw-r--r--src/components/application_manager/test/mock/include/application_manager/commands/hmi/get_urls.h2
-rw-r--r--src/components/application_manager/test/mock/include/application_manager/commands/hmi/get_urls_response.h2
-rw-r--r--src/components/application_manager/test/mock/include/application_manager/commands/hmi/mixing_audio_supported_request.h2
-rw-r--r--src/components/application_manager/test/mock/include/application_manager/commands/hmi/mixing_audio_supported_response.h2
-rw-r--r--src/components/application_manager/test/mock/include/application_manager/commands/hmi/navi_alert_maneuver_request.h2
-rw-r--r--src/components/application_manager/test/mock/include/application_manager/commands/hmi/navi_alert_maneuver_response.h2
-rw-r--r--src/components/application_manager/test/mock/include/application_manager/commands/hmi/navi_audio_start_stream_request.h2
-rw-r--r--src/components/application_manager/test/mock/include/application_manager/commands/hmi/navi_is_ready_request.h2
-rw-r--r--src/components/application_manager/test/mock/include/application_manager/commands/hmi/navi_is_ready_response.h2
-rw-r--r--src/components/application_manager/test/mock/include/application_manager/commands/hmi/navi_send_location_request.h2
-rw-r--r--src/components/application_manager/test/mock/include/application_manager/commands/hmi/navi_send_location_response.h2
-rw-r--r--src/components/application_manager/test/mock/include/application_manager/commands/hmi/navi_show_constant_tbt_request.h2
-rw-r--r--src/components/application_manager/test/mock/include/application_manager/commands/hmi/navi_show_constant_tbt_response.h2
-rw-r--r--src/components/application_manager/test/mock/include/application_manager/commands/hmi/navi_start_stream_request.h2
-rw-r--r--src/components/application_manager/test/mock/include/application_manager/commands/hmi/navi_update_turn_list_request.h2
-rw-r--r--src/components/application_manager/test/mock/include/application_manager/commands/hmi/navi_update_turn_list_response.h2
-rw-r--r--src/components/application_manager/test/mock/include/application_manager/commands/hmi/on_allow_sdl_functionality_notification.h2
-rw-r--r--src/components/application_manager/test/mock/include/application_manager/commands/hmi/on_app_activated_notification.h2
-rw-r--r--src/components/application_manager/test/mock/include/application_manager/commands/hmi/on_app_deactivated_notification.h2
-rw-r--r--src/components/application_manager/test/mock/include/application_manager/commands/hmi/on_app_permission_changed_notification.h2
-rw-r--r--src/components/application_manager/test/mock/include/application_manager/commands/hmi/on_app_permission_consent_notification.h2
-rw-r--r--src/components/application_manager/test/mock/include/application_manager/commands/hmi/on_app_registered_notification.h2
-rw-r--r--src/components/application_manager/test/mock/include/application_manager/commands/hmi/on_app_unregistered_notification.h2
-rw-r--r--src/components/application_manager/test/mock/include/application_manager/commands/hmi/on_button_event_notification.h2
-rw-r--r--src/components/application_manager/test/mock/include/application_manager/commands/hmi/on_button_press_notification.h2
-rw-r--r--src/components/application_manager/test/mock/include/application_manager/commands/hmi/on_device_chosen_notification.h2
-rw-r--r--src/components/application_manager/test/mock/include/application_manager/commands/hmi/on_device_state_changed_notification.h2
-rw-r--r--src/components/application_manager/test/mock/include/application_manager/commands/hmi/on_driver_distraction_notification.h2
-rw-r--r--src/components/application_manager/test/mock/include/application_manager/commands/hmi/on_exit_all_applications_notification.h2
-rw-r--r--src/components/application_manager/test/mock/include/application_manager/commands/hmi/on_exit_application_notification.h2
-rw-r--r--src/components/application_manager/test/mock/include/application_manager/commands/hmi/on_file_removed_notification.h2
-rw-r--r--src/components/application_manager/test/mock/include/application_manager/commands/hmi/on_find_applications.h2
-rw-r--r--src/components/application_manager/test/mock/include/application_manager/commands/hmi/on_ignition_cycle_over_notification.h2
-rw-r--r--src/components/application_manager/test/mock/include/application_manager/commands/hmi/on_navi_tbt_client_state_notification.h2
-rw-r--r--src/components/application_manager/test/mock/include/application_manager/commands/hmi/on_play_tone_notification.h2
-rw-r--r--src/components/application_manager/test/mock/include/application_manager/commands/hmi/on_policy_update.h2
-rw-r--r--src/components/application_manager/test/mock/include/application_manager/commands/hmi/on_put_file_notification.h2
-rw-r--r--src/components/application_manager/test/mock/include/application_manager/commands/hmi/on_ready_notification.h2
-rw-r--r--src/components/application_manager/test/mock/include/application_manager/commands/hmi/on_received_policy_update.h2
-rw-r--r--src/components/application_manager/test/mock/include/application_manager/commands/hmi/on_record_start_notification.h2
-rw-r--r--src/components/application_manager/test/mock/include/application_manager/commands/hmi/on_resume_audio_source_notification.h2
-rw-r--r--src/components/application_manager/test/mock/include/application_manager/commands/hmi/on_sdl_close_notification.h2
-rw-r--r--src/components/application_manager/test/mock/include/application_manager/commands/hmi/on_sdl_consent_needed_notification.h2
-rw-r--r--src/components/application_manager/test/mock/include/application_manager/commands/hmi/on_sdl_persistence_complete_notification.h2
-rw-r--r--src/components/application_manager/test/mock/include/application_manager/commands/hmi/on_start_device_discovery.h2
-rw-r--r--src/components/application_manager/test/mock/include/application_manager/commands/hmi/on_status_update_notification.h2
-rw-r--r--src/components/application_manager/test/mock/include/application_manager/commands/hmi/on_system_context_notification.h2
-rw-r--r--src/components/application_manager/test/mock/include/application_manager/commands/hmi/on_system_error_notification.h2
-rw-r--r--src/components/application_manager/test/mock/include/application_manager/commands/hmi/on_system_info_changed_notification.h2
-rw-r--r--src/components/application_manager/test/mock/include/application_manager/commands/hmi/on_system_request_notification.h2
-rw-r--r--src/components/application_manager/test/mock/include/application_manager/commands/hmi/on_tts_language_change_notification.h2
-rw-r--r--src/components/application_manager/test/mock/include/application_manager/commands/hmi/on_tts_reset_timeout_notification.h2
-rw-r--r--src/components/application_manager/test/mock/include/application_manager/commands/hmi/on_tts_started_notification.h2
-rw-r--r--src/components/application_manager/test/mock/include/application_manager/commands/hmi/on_tts_stopped_notification.h2
-rw-r--r--src/components/application_manager/test/mock/include/application_manager/commands/hmi/on_ui_command_notification.h2
-rw-r--r--src/components/application_manager/test/mock/include/application_manager/commands/hmi/on_ui_keyboard_input_notification.h2
-rw-r--r--src/components/application_manager/test/mock/include/application_manager/commands/hmi/on_ui_language_change_notification.h2
-rw-r--r--src/components/application_manager/test/mock/include/application_manager/commands/hmi/on_ui_reset_timeout_notification.h2
-rw-r--r--src/components/application_manager/test/mock/include/application_manager/commands/hmi/on_ui_touch_event_notification.h2
-rw-r--r--src/components/application_manager/test/mock/include/application_manager/commands/hmi/on_update_device_list.h2
-rw-r--r--src/components/application_manager/test/mock/include/application_manager/commands/hmi/on_vi_acc_pedal_position_notification.h2
-rw-r--r--src/components/application_manager/test/mock/include/application_manager/commands/hmi/on_vi_belt_status_notification.h2
-rw-r--r--src/components/application_manager/test/mock/include/application_manager/commands/hmi/on_vi_body_information_notification.h2
-rw-r--r--src/components/application_manager/test/mock/include/application_manager/commands/hmi/on_vi_device_status_notification.h2
-rw-r--r--src/components/application_manager/test/mock/include/application_manager/commands/hmi/on_vi_driver_braking_notification.h2
-rw-r--r--src/components/application_manager/test/mock/include/application_manager/commands/hmi/on_vi_engine_torque_notification.h2
-rw-r--r--src/components/application_manager/test/mock/include/application_manager/commands/hmi/on_vi_external_temperature_notification.h2
-rw-r--r--src/components/application_manager/test/mock/include/application_manager/commands/hmi/on_vi_fuel_level_notification.h2
-rw-r--r--src/components/application_manager/test/mock/include/application_manager/commands/hmi/on_vi_fuel_level_state_notification.h2
-rw-r--r--src/components/application_manager/test/mock/include/application_manager/commands/hmi/on_vi_gps_data_notification.h2
-rw-r--r--src/components/application_manager/test/mock/include/application_manager/commands/hmi/on_vi_head_lamp_status_notification.h2
-rw-r--r--src/components/application_manager/test/mock/include/application_manager/commands/hmi/on_vi_instant_fuel_consumption_notification.h2
-rw-r--r--src/components/application_manager/test/mock/include/application_manager/commands/hmi/on_vi_my_key_notification.h2
-rw-r--r--src/components/application_manager/test/mock/include/application_manager/commands/hmi/on_vi_odometer_notification.h2
-rw-r--r--src/components/application_manager/test/mock/include/application_manager/commands/hmi/on_vi_prndl_notification.h2
-rw-r--r--src/components/application_manager/test/mock/include/application_manager/commands/hmi/on_vi_rpm_notification.h2
-rw-r--r--src/components/application_manager/test/mock/include/application_manager/commands/hmi/on_vi_speed_notification.h2
-rw-r--r--src/components/application_manager/test/mock/include/application_manager/commands/hmi/on_vi_steering_wheel_angle_notification.h2
-rw-r--r--src/components/application_manager/test/mock/include/application_manager/commands/hmi/on_vi_tire_pressure_notification.h2
-rw-r--r--src/components/application_manager/test/mock/include/application_manager/commands/hmi/on_vi_vehicle_data_notification.h2
-rw-r--r--src/components/application_manager/test/mock/include/application_manager/commands/hmi/on_vi_vin_notification.h2
-rw-r--r--src/components/application_manager/test/mock/include/application_manager/commands/hmi/on_vi_wiper_status_notification.h2
-rw-r--r--src/components/application_manager/test/mock/include/application_manager/commands/hmi/on_vr_command_notification.h2
-rw-r--r--src/components/application_manager/test/mock/include/application_manager/commands/hmi/on_vr_language_change_notification.h2
-rw-r--r--src/components/application_manager/test/mock/include/application_manager/commands/hmi/on_vr_started_notification.h2
-rw-r--r--src/components/application_manager/test/mock/include/application_manager/commands/hmi/on_vr_stopped_notification.h2
-rw-r--r--src/components/application_manager/test/mock/include/application_manager/commands/hmi/request_from_hmi.h2
-rw-r--r--src/components/application_manager/test/mock/include/application_manager/commands/hmi/request_to_hmi.h2
-rw-r--r--src/components/application_manager/test/mock/include/application_manager/commands/hmi/response_from_hmi.h2
-rw-r--r--src/components/application_manager/test/mock/include/application_manager/commands/hmi/sdl_activate_app_request.h2
-rw-r--r--src/components/application_manager/test/mock/include/application_manager/commands/hmi/sdl_activate_app_response.h2
-rw-r--r--src/components/application_manager/test/mock/include/application_manager/commands/hmi/sdl_get_list_of_permissions_request.h2
-rw-r--r--src/components/application_manager/test/mock/include/application_manager/commands/hmi/sdl_get_list_of_permissions_response.h2
-rw-r--r--src/components/application_manager/test/mock/include/application_manager/commands/hmi/sdl_get_status_update_request.h2
-rw-r--r--src/components/application_manager/test/mock/include/application_manager/commands/hmi/sdl_get_status_update_response.h2
-rw-r--r--src/components/application_manager/test/mock/include/application_manager/commands/hmi/sdl_get_user_friendly_message_request.h2
-rw-r--r--src/components/application_manager/test/mock/include/application_manager/commands/hmi/sdl_get_user_friendly_message_response.h2
-rw-r--r--src/components/application_manager/test/mock/include/application_manager/commands/hmi/sdl_policy_update.h2
-rw-r--r--src/components/application_manager/test/mock/include/application_manager/commands/hmi/sdl_policy_update_response.h2
-rw-r--r--src/components/application_manager/test/mock/include/application_manager/commands/hmi/tts_change_registration_request.h2
-rw-r--r--src/components/application_manager/test/mock/include/application_manager/commands/hmi/tts_change_registration_response.h2
-rw-r--r--src/components/application_manager/test/mock/include/application_manager/commands/hmi/tts_get_capabilities_request.h2
-rw-r--r--src/components/application_manager/test/mock/include/application_manager/commands/hmi/tts_get_capabilities_response.h2
-rw-r--r--src/components/application_manager/test/mock/include/application_manager/commands/hmi/tts_get_language_request.h2
-rw-r--r--src/components/application_manager/test/mock/include/application_manager/commands/hmi/tts_get_language_response.h2
-rw-r--r--src/components/application_manager/test/mock/include/application_manager/commands/hmi/tts_get_supported_languages_request.h2
-rw-r--r--src/components/application_manager/test/mock/include/application_manager/commands/hmi/tts_get_supported_languages_response.h2
-rw-r--r--src/components/application_manager/test/mock/include/application_manager/commands/hmi/tts_is_ready_request.h2
-rw-r--r--src/components/application_manager/test/mock/include/application_manager/commands/hmi/tts_is_ready_response.h2
-rw-r--r--src/components/application_manager/test/mock/include/application_manager/commands/hmi/tts_set_global_properties_request.h2
-rw-r--r--src/components/application_manager/test/mock/include/application_manager/commands/hmi/tts_set_global_properties_response.h2
-rw-r--r--src/components/application_manager/test/mock/include/application_manager/commands/hmi/tts_speak_request.h2
-rw-r--r--src/components/application_manager/test/mock/include/application_manager/commands/hmi/tts_speak_response.h2
-rw-r--r--src/components/application_manager/test/mock/include/application_manager/commands/hmi/tts_stop_speaking_request.h2
-rw-r--r--src/components/application_manager/test/mock/include/application_manager/commands/hmi/tts_stop_speaking_response.h2
-rw-r--r--src/components/application_manager/test/mock/include/application_manager/commands/hmi/ui_add_command_request.h2
-rw-r--r--src/components/application_manager/test/mock/include/application_manager/commands/hmi/ui_add_command_response.h2
-rw-r--r--src/components/application_manager/test/mock/include/application_manager/commands/hmi/ui_add_submenu_request.h2
-rw-r--r--src/components/application_manager/test/mock/include/application_manager/commands/hmi/ui_add_submenu_response.h2
-rw-r--r--src/components/application_manager/test/mock/include/application_manager/commands/hmi/ui_alert_request.h2
-rw-r--r--src/components/application_manager/test/mock/include/application_manager/commands/hmi/ui_alert_response.h2
-rw-r--r--src/components/application_manager/test/mock/include/application_manager/commands/hmi/ui_change_registration_request.h2
-rw-r--r--src/components/application_manager/test/mock/include/application_manager/commands/hmi/ui_change_registration_response.h2
-rw-r--r--src/components/application_manager/test/mock/include/application_manager/commands/hmi/ui_delete_command_request.h2
-rw-r--r--src/components/application_manager/test/mock/include/application_manager/commands/hmi/ui_delete_command_response.h2
-rw-r--r--src/components/application_manager/test/mock/include/application_manager/commands/hmi/ui_delete_submenu_request.h2
-rw-r--r--src/components/application_manager/test/mock/include/application_manager/commands/hmi/ui_delete_submenu_response.h2
-rw-r--r--src/components/application_manager/test/mock/include/application_manager/commands/hmi/ui_end_audio_pass_thru_request.h2
-rw-r--r--src/components/application_manager/test/mock/include/application_manager/commands/hmi/ui_end_audio_pass_thru_response.h2
-rw-r--r--src/components/application_manager/test/mock/include/application_manager/commands/hmi/ui_get_capabilities_request.h2
-rw-r--r--src/components/application_manager/test/mock/include/application_manager/commands/hmi/ui_get_capabilities_response.h2
-rw-r--r--src/components/application_manager/test/mock/include/application_manager/commands/hmi/ui_get_language_request.h2
-rw-r--r--src/components/application_manager/test/mock/include/application_manager/commands/hmi/ui_get_language_response.h2
-rw-r--r--src/components/application_manager/test/mock/include/application_manager/commands/hmi/ui_get_supported_languages_request.h2
-rw-r--r--src/components/application_manager/test/mock/include/application_manager/commands/hmi/ui_get_supported_languages_response.h2
-rw-r--r--src/components/application_manager/test/mock/include/application_manager/commands/hmi/ui_is_ready_request.h2
-rw-r--r--src/components/application_manager/test/mock/include/application_manager/commands/hmi/ui_is_ready_response.h2
-rw-r--r--src/components/application_manager/test/mock/include/application_manager/commands/hmi/ui_perform_audio_pass_thru_request.h2
-rw-r--r--src/components/application_manager/test/mock/include/application_manager/commands/hmi/ui_perform_audio_pass_thru_response.h2
-rw-r--r--src/components/application_manager/test/mock/include/application_manager/commands/hmi/ui_perform_interaction_request.h2
-rw-r--r--src/components/application_manager/test/mock/include/application_manager/commands/hmi/ui_perform_interaction_response.h2
-rw-r--r--src/components/application_manager/test/mock/include/application_manager/commands/hmi/ui_scrollable_message_request.h2
-rw-r--r--src/components/application_manager/test/mock/include/application_manager/commands/hmi/ui_scrollable_message_response.h2
-rw-r--r--src/components/application_manager/test/mock/include/application_manager/commands/hmi/ui_set_display_layout_response.h2
-rw-r--r--src/components/application_manager/test/mock/include/application_manager/commands/hmi/ui_set_global_properties_request.h2
-rw-r--r--src/components/application_manager/test/mock/include/application_manager/commands/hmi/ui_set_global_properties_response.h2
-rw-r--r--src/components/application_manager/test/mock/include/application_manager/commands/hmi/ui_set_icon_request.h2
-rw-r--r--src/components/application_manager/test/mock/include/application_manager/commands/hmi/ui_set_icon_response.h2
-rw-r--r--src/components/application_manager/test/mock/include/application_manager/commands/hmi/ui_set_media_clock_timer_request.h2
-rw-r--r--src/components/application_manager/test/mock/include/application_manager/commands/hmi/ui_set_media_clock_timer_response.h2
-rw-r--r--src/components/application_manager/test/mock/include/application_manager/commands/hmi/ui_show_request.h2
-rw-r--r--src/components/application_manager/test/mock/include/application_manager/commands/hmi/ui_show_response.h2
-rw-r--r--src/components/application_manager/test/mock/include/application_manager/commands/hmi/ui_slider_request.h2
-rw-r--r--src/components/application_manager/test/mock/include/application_manager/commands/hmi/ui_slider_response.h2
-rw-r--r--src/components/application_manager/test/mock/include/application_manager/commands/hmi/update_app_list_request.h2
-rw-r--r--src/components/application_manager/test/mock/include/application_manager/commands/hmi/update_app_list_response.h2
-rw-r--r--src/components/application_manager/test/mock/include/application_manager/commands/hmi/update_device_list_request.h2
-rw-r--r--src/components/application_manager/test/mock/include/application_manager/commands/hmi/update_device_list_response.h2
-rw-r--r--src/components/application_manager/test/mock/include/application_manager/commands/hmi/update_sdl_request.h2
-rw-r--r--src/components/application_manager/test/mock/include/application_manager/commands/hmi/update_sdl_response.h2
-rw-r--r--src/components/application_manager/test/mock/include/application_manager/commands/hmi/vi_diagnostic_message_request.h2
-rw-r--r--src/components/application_manager/test/mock/include/application_manager/commands/hmi/vi_diagnostic_message_response.h2
-rw-r--r--src/components/application_manager/test/mock/include/application_manager/commands/hmi/vi_get_dtcs_request.h2
-rw-r--r--src/components/application_manager/test/mock/include/application_manager/commands/hmi/vi_get_dtcs_response.h2
-rw-r--r--src/components/application_manager/test/mock/include/application_manager/commands/hmi/vi_get_vehicle_data_request.h2
-rw-r--r--src/components/application_manager/test/mock/include/application_manager/commands/hmi/vi_get_vehicle_data_request_template.h2
-rw-r--r--src/components/application_manager/test/mock/include/application_manager/commands/hmi/vi_get_vehicle_data_response.h2
-rw-r--r--src/components/application_manager/test/mock/include/application_manager/commands/hmi/vi_get_vehicle_data_response_template.h2
-rw-r--r--src/components/application_manager/test/mock/include/application_manager/commands/hmi/vi_get_vehicle_type_request.h2
-rw-r--r--src/components/application_manager/test/mock/include/application_manager/commands/hmi/vi_get_vehicle_type_response.h2
-rw-r--r--src/components/application_manager/test/mock/include/application_manager/commands/hmi/vi_is_ready_request.h2
-rw-r--r--src/components/application_manager/test/mock/include/application_manager/commands/hmi/vi_is_ready_response.h2
-rw-r--r--src/components/application_manager/test/mock/include/application_manager/commands/hmi/vi_read_did_request.h2
-rw-r--r--src/components/application_manager/test/mock/include/application_manager/commands/hmi/vi_read_did_response.h2
-rw-r--r--src/components/application_manager/test/mock/include/application_manager/commands/hmi/vi_subscribe_vehicle_data_request.h2
-rw-r--r--src/components/application_manager/test/mock/include/application_manager/commands/hmi/vi_subscribe_vehicle_data_request_template.h2
-rw-r--r--src/components/application_manager/test/mock/include/application_manager/commands/hmi/vi_subscribe_vehicle_data_response.h2
-rw-r--r--src/components/application_manager/test/mock/include/application_manager/commands/hmi/vi_subscribe_vehicle_data_response_template.h2
-rw-r--r--src/components/application_manager/test/mock/include/application_manager/commands/hmi/vi_unsubscribe_vehicle_data_request.h2
-rw-r--r--src/components/application_manager/test/mock/include/application_manager/commands/hmi/vi_unsubscribe_vehicle_data_request_template.h2
-rw-r--r--src/components/application_manager/test/mock/include/application_manager/commands/hmi/vi_unsubscribe_vehicle_data_response.h2
-rw-r--r--src/components/application_manager/test/mock/include/application_manager/commands/hmi/vi_unsubscribe_vehicle_data_response_template.h2
-rw-r--r--src/components/application_manager/test/mock/include/application_manager/commands/hmi/vr_add_command_request.h2
-rw-r--r--src/components/application_manager/test/mock/include/application_manager/commands/hmi/vr_add_command_response.h2
-rw-r--r--src/components/application_manager/test/mock/include/application_manager/commands/hmi/vr_change_registration_request.h2
-rw-r--r--src/components/application_manager/test/mock/include/application_manager/commands/hmi/vr_change_registration_response.h2
-rw-r--r--src/components/application_manager/test/mock/include/application_manager/commands/hmi/vr_delete_command_request.h2
-rw-r--r--src/components/application_manager/test/mock/include/application_manager/commands/hmi/vr_delete_command_response.h2
-rw-r--r--src/components/application_manager/test/mock/include/application_manager/commands/hmi/vr_get_capabilities_request.h2
-rw-r--r--src/components/application_manager/test/mock/include/application_manager/commands/hmi/vr_get_capabilities_response.h2
-rw-r--r--src/components/application_manager/test/mock/include/application_manager/commands/hmi/vr_get_language_request.h2
-rw-r--r--src/components/application_manager/test/mock/include/application_manager/commands/hmi/vr_get_language_response.h2
-rw-r--r--src/components/application_manager/test/mock/include/application_manager/commands/hmi/vr_get_supported_languages_request.h2
-rw-r--r--src/components/application_manager/test/mock/include/application_manager/commands/hmi/vr_get_supported_languages_response.h2
-rw-r--r--src/components/application_manager/test/mock/include/application_manager/commands/hmi/vr_is_ready_request.h2
-rw-r--r--src/components/application_manager/test/mock/include/application_manager/commands/hmi/vr_is_ready_response.h2
-rw-r--r--src/components/application_manager/test/mock/include/application_manager/commands/hmi/vr_perform_interaction_request.h2
-rw-r--r--src/components/application_manager/test/mock/include/application_manager/commands/hmi/vr_perform_interaction_response.h2
-rw-r--r--src/components/application_manager/test/mock/include/application_manager/commands/mobile/change_registration_request.h4
-rw-r--r--src/components/application_manager/test/mock/include/application_manager/commands/mobile/generic_response.h2
-rw-r--r--src/components/application_manager/test/mock/include/application_manager/commands/mobile/register_app_interface_request.h19
-rw-r--r--src/components/application_manager/test/mock/include/application_manager/commands/mobile/scrollable_message_response.h2
-rw-r--r--src/components/application_manager/test/mock/include/application_manager/commands/mobile/send_location_response.h2
-rw-r--r--src/components/application_manager/test/mock/include/application_manager/commands/mobile/set_media_clock_timer_response.h2
-rw-r--r--src/components/application_manager/test/mock/include/application_manager/commands/mobile/show_response.h2
-rw-r--r--src/components/application_manager/test/mock/include/application_manager/commands/mobile/slider_response.h2
-rw-r--r--src/components/application_manager/test/mock/include/application_manager/commands/mobile/speak_response.h2
-rw-r--r--src/components/application_manager/test/mock/include/application_manager/hmi_capabilities.h2
-rw-r--r--src/components/application_manager/test/mock/include/application_manager/message.h2
-rw-r--r--src/components/application_manager/test/mock/include/application_manager/message_helper.h23
-rw-r--r--src/components/application_manager/test/mock/include/application_manager/policies/policy_event_observer.h10
-rw-r--r--src/components/application_manager/test/mock/include/application_manager/policies/policy_handler.h98
-rw-r--r--src/components/application_manager/test/mock/include/application_manager/request_controller.h50
-rw-r--r--src/components/application_manager/test/mock/include/application_manager/request_info.h78
-rw-r--r--src/components/application_manager/test/mock/include/application_manager/resume_ctrl.h135
-rw-r--r--src/components/application_manager/test/mock/include/application_manager/time_metric_observer.h2
-rw-r--r--src/components/application_manager/test/mock/include/application_manager/usage_statistics.h2
-rw-r--r--src/components/config_profile/include/config_profile/ini_file.h2
-rw-r--r--src/components/config_profile/include/config_profile/profile.h19
-rw-r--r--src/components/config_profile/src/ini_file.cc66
-rw-r--r--src/components/config_profile/src/profile.cc94
-rw-r--r--src/components/connection_handler/include/connection_handler/connection.h3
-rw-r--r--src/components/connection_handler/include/connection_handler/connection_handler.h13
-rw-r--r--src/components/connection_handler/include/connection_handler/connection_handler_impl.h15
-rw-r--r--src/components/connection_handler/include/connection_handler/connection_handler_observer.h7
-rw-r--r--src/components/connection_handler/include/connection_handler/heartbeat_monitor.h2
-rw-r--r--src/components/connection_handler/src/connection.cc19
-rw-r--r--src/components/connection_handler/src/connection_handler_impl.cc60
-rw-r--r--src/components/connection_handler/src/device.cc4
-rw-r--r--src/components/connection_handler/src/heartbeat_monitor.cc11
-rw-r--r--src/components/dbus/include/dbus/message_descriptions.h62
-rw-r--r--src/components/dbus/include/dbus/schema.h62
-rw-r--r--src/components/dbus/src/schema.cc2
-rw-r--r--src/components/formatters/include/formatters/formatter_json_rpc.h2
-rw-r--r--src/components/formatters/include/formatters/generic_json_formatter.h2
-rw-r--r--src/components/formatters/include/formatters/meta_formatter.h2
-rw-r--r--src/components/formatters/src/formatter_json_rpc.cc2
-rw-r--r--src/components/formatters/src/generic_json_formatter.cc2
-rw-r--r--src/components/formatters/src/meta_formatter.cc2
-rw-r--r--src/components/hmi_message_handler/include/hmi_message_handler/hmi_message_adapter.h2
-rw-r--r--src/components/hmi_message_handler/include/hmi_message_handler/hmi_message_handler.h2
-rw-r--r--src/components/hmi_message_handler/include/hmi_message_handler/hmi_message_handler_impl.h2
-rw-r--r--src/components/hmi_message_handler/include/hmi_message_handler/hmi_message_observer.h2
-rw-r--r--src/components/hmi_message_handler/include/hmi_message_handler/hmi_message_sender.h2
-rw-r--r--src/components/hmi_message_handler/include/hmi_message_handler/messagebroker_adapter.h2
-rw-r--r--src/components/hmi_message_handler/include/hmi_message_handler/mqueue_adapter.h65
-rw-r--r--src/components/hmi_message_handler/src/dbus_message_adapter.cc4
-rw-r--r--src/components/hmi_message_handler/src/hmi_message_adapter.cc2
-rw-r--r--src/components/hmi_message_handler/src/hmi_message_handler_impl.cc2
-rw-r--r--src/components/hmi_message_handler/src/messagebroker_adapter.cc12
-rw-r--r--src/components/hmi_message_handler/src/mqueue_adapter.cc83
-rw-r--r--src/components/include/protocol/common.h2
-rw-r--r--src/components/include/protocol/service_type.h2
-rw-r--r--src/components/include/protocol_handler/session_observer.h7
-rw-r--r--src/components/include/transport_manager/transport_adapter/device.h2
-rw-r--r--src/components/include/transport_manager/transport_adapter/transport_adapter.h8
-rw-r--r--src/components/include/transport_manager/transport_manager.h6
-rw-r--r--src/components/include/transport_manager/transport_manager_listener.h2
-rw-r--r--src/components/include/utils/atomic.h8
-rw-r--r--src/components/include/utils/conditional_variable.h4
-rw-r--r--src/components/include/utils/date_time.h64
-rw-r--r--src/components/include/utils/lock.h28
-rw-r--r--src/components/include/utils/logger.h22
-rw-r--r--src/components/include/utils/logger_status.h2
-rw-r--r--src/components/include/utils/macro.h25
-rw-r--r--src/components/include/utils/memory_barrier.h2
-rw-r--r--src/components/include/utils/message_queue.h2
-rw-r--r--src/components/include/utils/prioritized_queue.h2
-rw-r--r--src/components/include/utils/shared_ptr.h3
-rw-r--r--src/components/include/utils/threads/message_loop_thread.h52
-rw-r--r--src/components/include/utils/threads/thread.h124
-rw-r--r--src/components/include/utils/threads/thread_delegate.h63
-rw-r--r--src/components/include/utils/timer_thread.h110
-rw-r--r--src/components/interfaces/CMakeLists.txt3
-rw-r--r--src/components/interfaces/HMI_API.xml16
-rw-r--r--src/components/interfaces/MOBILE_API.xml174
-rw-r--r--src/components/interfaces/QT_HMI_API.xml16
-rw-r--r--src/components/media_manager/include/media_manager/audio/a2dp_source_player_adapter.h67
-rw-r--r--src/components/media_manager/include/media_manager/audio/audio_stream_sender_thread.h3
-rw-r--r--src/components/media_manager/include/media_manager/audio/from_mic_recorder_adapter.h60
-rw-r--r--src/components/media_manager/include/media_manager/audio/from_mic_to_file_recorder_thread.h66
-rw-r--r--src/components/media_manager/include/media_manager/audio/pipe_audio_streamer_adapter.h62
-rw-r--r--src/components/media_manager/include/media_manager/audio/socket_audio_streamer_adapter.h62
-rw-r--r--src/components/media_manager/include/media_manager/media_manager.h62
-rw-r--r--src/components/media_manager/include/media_manager/media_manager_impl.h60
-rw-r--r--src/components/media_manager/include/media_manager/pipe_streamer_adapter.h62
-rw-r--r--src/components/media_manager/include/media_manager/socket_streamer_adapter.h64
-rw-r--r--src/components/media_manager/include/media_manager/video/pipe_video_streamer_adapter.h62
-rw-r--r--src/components/media_manager/include/media_manager/video/socket_video_streamer_adapter.h62
-rw-r--r--src/components/media_manager/include/media_manager/video/video_stream_to_file_adapter.h62
-rw-r--r--src/components/media_manager/src/audio/a2dp_source_player_adapter.cc106
-rw-r--r--src/components/media_manager/src/audio/audio_stream_sender_thread.cc17
-rw-r--r--src/components/media_manager/src/audio/from_mic_recorder_adapter.cc80
-rw-r--r--src/components/media_manager/src/audio/from_mic_recorder_listener.cc7
-rw-r--r--src/components/media_manager/src/audio/from_mic_to_file_recorder_thread.cc99
-rw-r--r--src/components/media_manager/src/audio/pipe_audio_streamer_adapter.cc4
-rw-r--r--src/components/media_manager/src/audio/socket_audio_streamer_adapter.cc4
-rw-r--r--src/components/media_manager/src/media_adapter_impl.cc66
-rw-r--r--src/components/media_manager/src/media_manager_impl.cc76
-rw-r--r--src/components/media_manager/src/pipe_streamer_adapter.cc66
-rw-r--r--src/components/media_manager/src/socket_streamer_adapter.cc31
-rw-r--r--src/components/media_manager/src/streamer_listener.cc4
-rw-r--r--src/components/media_manager/src/video/pipe_video_streamer_adapter.cc4
-rw-r--r--src/components/media_manager/src/video/socket_video_streamer_adapter.cc4
-rw-r--r--src/components/media_manager/src/video/video_stream_to_file_adapter.cc22
-rw-r--r--src/components/media_manager/test/media_adapter_impl_test.cc60
-rw-r--r--src/components/policy/src/policy/CMakeLists.txt1
-rw-r--r--src/components/policy/src/policy/include/policy/cache_manager.h160
-rw-r--r--src/components/policy/src/policy/include/policy/cache_manager_interface.h75
-rw-r--r--src/components/policy/src/policy/include/policy/policy_helper.h3
-rw-r--r--src/components/policy/src/policy/include/policy/policy_listener.h28
-rw-r--r--src/components/policy/src/policy/include/policy/policy_manager.h68
-rw-r--r--src/components/policy/src/policy/include/policy/policy_manager_impl.h82
-rw-r--r--src/components/policy/src/policy/include/policy/pt_ext_representation.h6
-rw-r--r--src/components/policy/src/policy/include/policy/pt_representation.h3
-rw-r--r--src/components/policy/src/policy/include/policy/sql_pt_ext_queries.h7
-rw-r--r--src/components/policy/src/policy/include/policy/sql_pt_ext_representation.h8
-rw-r--r--src/components/policy/src/policy/include/policy/sql_pt_representation.h3
-rw-r--r--src/components/policy/src/policy/include/policy/update_status_manager.h74
-rw-r--r--src/components/policy/src/policy/qdb_wrapper/include/qdb_wrapper/sql_database.h2
-rw-r--r--src/components/policy/src/policy/qdb_wrapper/include/qdb_wrapper/sql_error.h2
-rw-r--r--src/components/policy/src/policy/qdb_wrapper/include/qdb_wrapper/sql_query.h2
-rw-r--r--src/components/policy/src/policy/qdb_wrapper/src/sql_database.cc2
-rw-r--r--src/components/policy/src/policy/qdb_wrapper/src/sql_error.cc2
-rw-r--r--src/components/policy/src/policy/qdb_wrapper/src/sql_query.cc2
-rw-r--r--src/components/policy/src/policy/sqlite_wrapper/include/sqlite_wrapper/sql_database.h8
-rw-r--r--src/components/policy/src/policy/sqlite_wrapper/include/sqlite_wrapper/sql_error.h2
-rw-r--r--src/components/policy/src/policy/sqlite_wrapper/include/sqlite_wrapper/sql_query.h2
-rw-r--r--src/components/policy/src/policy/sqlite_wrapper/src/sql_database.cc7
-rw-r--r--src/components/policy/src/policy/sqlite_wrapper/src/sql_error.cc2
-rw-r--r--src/components/policy/src/policy/sqlite_wrapper/src/sql_query.cc2
-rw-r--r--src/components/policy/src/policy/src/cache_manager.cc555
-rw-r--r--src/components/policy/src/policy/src/policy_helper.cc38
-rw-r--r--src/components/policy/src/policy/src/policy_manager_impl.cc349
-rw-r--r--src/components/policy/src/policy/src/policy_table.cc2
-rw-r--r--src/components/policy/src/policy/src/sql_pt_ext_queries.cc26
-rw-r--r--src/components/policy/src/policy/src/sql_pt_ext_representation.cc101
-rw-r--r--src/components/policy/src/policy/src/sql_pt_queries.cc13
-rw-r--r--src/components/policy/src/policy/src/sql_pt_representation.cc88
-rw-r--r--src/components/policy/src/policy/src/update_status_manager.cc111
-rw-r--r--src/components/policy/src/policy/usage_statistics/include/usage_statistics/counter.h10
-rw-r--r--src/components/policy/src/policy/usage_statistics/src/counter.cc30
-rw-r--r--src/components/policy/test/CMakeLists.txt3
-rw-r--r--src/components/policy/test/generated_code_test.cc6
-rw-r--r--src/components/policy/test/generated_code_with_sqlite_test.cc58
-rw-r--r--src/components/policy/test/include.cmake6
-rw-r--r--src/components/policy/test/include/mock_cache_manager.h32
-rw-r--r--src/components/policy/test/include/mock_policy_listener.h14
-rw-r--r--src/components/policy/test/include/mock_pt_ext_representation.h2
-rw-r--r--src/components/policy/test/include/mock_pt_representation.h4
-rw-r--r--src/components/policy/test/include/mock_update_status_manager.h6
-rw-r--r--src/components/policy/test/log4cxx.properties14
-rw-r--r--src/components/policy/test/policy_manager_impl_stress_test.cc4
-rw-r--r--src/components/policy/test/policy_manager_impl_test.cc80
-rw-r--r--src/components/policy/test/qdb_wrapper/sql_database_test.cc58
-rw-r--r--src/components/policy/test/sdl_preloaded_pt.json3874
-rw-r--r--src/components/policy/test/sql_pt_ext_representation_test.cc2
-rw-r--r--src/components/policy/test/sqlite_wrapper/sql_database_test.cc13
-rw-r--r--src/components/policy/test/usage_statistics_test.cc31
-rw-r--r--src/components/protocol/src/raw_message.cc2
-rw-r--r--src/components/protocol_handler/CMakeLists.txt1
-rw-r--r--src/components/protocol_handler/include/protocol_handler/protocol_handler_impl.h76
-rw-r--r--src/components/protocol_handler/include/protocol_handler/protocol_packet.h108
-rw-r--r--src/components/protocol_handler/src/protocol_handler_impl.cc286
-rw-r--r--src/components/protocol_handler/src/protocol_packet.cc319
-rw-r--r--src/components/qt_hmi/References/Work/bananasnacks/qtquick2applicationviewer/qtquick2applicationviewer.h2
-rw-r--r--src/components/qt_hmi/qml_model_qt5/controls/SoftButton.qml8
-rw-r--r--src/components/qt_hmi/qml_model_qt5/hmi_api/UI.qml15
-rw-r--r--src/components/qt_hmi/qml_model_qt5/hmi_api/VR.qml64
-rw-r--r--src/components/qt_hmi/qml_model_qt5/models/DataStorage.qml3
-rw-r--r--src/components/qt_hmi/qml_model_qt5/models/MediaClockModel.qml37
-rw-r--r--src/components/qt_hmi/qml_model_qt5/popups/InteractionPopup.qml22
-rw-r--r--src/components/qt_hmi/qml_model_qt5/popups/TTSPopUp.qml8
-rw-r--r--src/components/qt_hmi/qml_model_qt5/popups/VRPopUp.qml66
-rw-r--r--src/components/qt_hmi/qml_model_qt5/views/SDLPlayerOptionsListView.qml1
-rw-r--r--src/components/qt_hmi/qml_model_qt5/views/ScrollableMessageView.qml4
-rw-r--r--src/components/qt_hmi/qml_plugins/dbus_adapter/dbus_controller.cc2
-rw-r--r--src/components/qt_hmi/qml_plugins/dbus_adapter/dbus_controller.h2
-rw-r--r--src/components/qt_hmi/qml_plugins/dbus_adapter/dbus_plugin.cc2
-rw-r--r--src/components/qt_hmi/qml_plugins/dbus_adapter/dbus_plugin.h2
-rw-r--r--src/components/qt_hmi/qml_plugins/dbus_adapter/hmi_proxy.cc2
-rw-r--r--src/components/qt_hmi/qml_plugins/dbus_adapter/hmi_proxy.h2
-rw-r--r--src/components/qt_hmi/qml_plugins/dbus_adapter/metatype.h2
-rw-r--r--src/components/qt_hmi/qml_plugins/dbus_adapter/optional_argument.h2
-rw-r--r--src/components/qt_hmi/qml_plugins/dbus_adapter/qml_dbus_common.h2
-rw-r--r--src/components/qt_hmi/qml_plugins/dbus_adapter/qt_version.h2
-rw-r--r--src/components/qt_hmi/qml_plugins/dbus_adapter/stream_qvariant.cc2
-rw-r--r--src/components/qt_hmi/qml_plugins/dbus_adapter/stream_qvariant.h2
-rw-r--r--src/components/qt_hmi/qml_plugins/hw_buttons/attributed_mouse_event.cc2
-rw-r--r--src/components/qt_hmi/qml_plugins/hw_buttons/attributed_mouse_event.h2
-rw-r--r--src/components/qt_hmi/qml_plugins/hw_buttons/hmi_hwbuttons.cc2
-rw-r--r--src/components/qt_hmi/qml_plugins/hw_buttons/hmi_hwbuttons.h2
-rw-r--r--src/components/qt_hmi/qml_plugins/hw_buttons/masked_container.cc2
-rw-r--r--src/components/qt_hmi/qml_plugins/hw_buttons/masked_container.h2
-rw-r--r--src/components/qt_hmi/qml_plugins/hw_buttons/qt_version.h2
-rw-r--r--src/components/qt_hmi/qml_plugins/log4cxx/log4cxx_plugin.cc2
-rw-r--r--src/components/qt_hmi/qml_plugins/log4cxx/log4cxx_plugin.h2
-rw-r--r--src/components/qt_hmi/qml_plugins/named_pipe_notifier/named_pipe_notifier.cc2
-rw-r--r--src/components/qt_hmi/qml_plugins/named_pipe_notifier/named_pipe_notifier.h2
-rw-r--r--src/components/qt_hmi/qml_plugins/named_pipe_notifier/named_pipe_notifier_plugin.cc2
-rw-r--r--src/components/qt_hmi/qml_plugins/named_pipe_notifier/named_pipe_notifier_plugin.h2
-rw-r--r--src/components/qt_hmi/qml_plugins/named_pipe_notifier/qt_version.h2
-rw-r--r--src/components/resumption/src/last_state.cc2
-rw-r--r--src/components/rpc_base/include/rpc_base/gtest_support.h2
-rw-r--r--src/components/rpc_base/include/rpc_base/rpc_base.h6
-rw-r--r--src/components/rpc_base/include/rpc_base/rpc_base_dbus_inl.h2
-rw-r--r--src/components/rpc_base/include/rpc_base/rpc_base_inl.h81
-rw-r--r--src/components/rpc_base/include/rpc_base/rpc_base_json_inl.h8
-rw-r--r--src/components/rpc_base/include/rpc_base/rpc_message.h62
-rw-r--r--src/components/rpc_base/include/rpc_base/validation_report.h2
-rw-r--r--src/components/rpc_base/src/rpc_base/rpc_base.cc2
-rw-r--r--src/components/security_manager/include/security_manager/security_manager_impl.h2
-rw-r--r--src/components/smart_objects/include/smart_objects/number_schema_item.h24
-rw-r--r--src/components/time_tester/include/time_tester/application_manager_observer.h60
-rw-r--r--src/components/time_tester/include/time_tester/json_keys.h2
-rw-r--r--src/components/time_tester/include/time_tester/protocol_handler_observer.h60
-rw-r--r--src/components/time_tester/include/time_tester/time_manager.h62
-rw-r--r--src/components/time_tester/include/time_tester/transport_manager_observer.h60
-rw-r--r--src/components/time_tester/src/application_manager_observer.cc60
-rw-r--r--src/components/time_tester/src/time_manager.cc97
-rw-r--r--src/components/time_tester/src/transport_manager_observer.cc60
-rw-r--r--src/components/transport_manager/CMakeLists.txt2
-rw-r--r--src/components/transport_manager/include/transport_manager/bluetooth/bluetooth_connection_factory.h2
-rw-r--r--src/components/transport_manager/include/transport_manager/bluetooth/bluetooth_device.h7
-rw-r--r--src/components/transport_manager/include/transport_manager/bluetooth/bluetooth_device_scanner.h6
-rw-r--r--src/components/transport_manager/include/transport_manager/bluetooth/bluetooth_socket_connection.h2
-rw-r--r--src/components/transport_manager/include/transport_manager/bluetooth/bluetooth_transport_adapter.h2
-rw-r--r--src/components/transport_manager/include/transport_manager/tcp/dnssd_service_browser.h6
-rw-r--r--src/components/transport_manager/include/transport_manager/tcp/tcp_client_listener.h32
-rw-r--r--src/components/transport_manager/include/transport_manager/tcp/tcp_connection_factory.h7
-rw-r--r--src/components/transport_manager/include/transport_manager/tcp/tcp_device.h6
-rw-r--r--src/components/transport_manager/include/transport_manager/tcp/tcp_socket_connection.h2
-rw-r--r--src/components/transport_manager/include/transport_manager/tcp/tcp_transport_adapter.h2
-rw-r--r--src/components/transport_manager/include/transport_manager/transport_adapter/client_connection_listener.h4
-rw-r--r--src/components/transport_manager/include/transport_manager/transport_adapter/connection.h2
-rw-r--r--src/components/transport_manager/include/transport_manager/transport_adapter/device_scanner.h2
-rw-r--r--src/components/transport_manager/include/transport_manager/transport_adapter/server_connection_factory.h2
-rw-r--r--src/components/transport_manager/include/transport_manager/transport_adapter/threaded_socket_connection.h10
-rw-r--r--src/components/transport_manager/include/transport_manager/transport_adapter/transport_adapter_impl.h27
-rw-r--r--src/components/transport_manager/include/transport_manager/transport_manager_impl.h23
-rw-r--r--src/components/transport_manager/include/transport_manager/usb/libusb/platform_usb_device.h2
-rw-r--r--src/components/transport_manager/include/transport_manager/usb/libusb/usb_connection.h2
-rw-r--r--src/components/transport_manager/include/transport_manager/usb/libusb/usb_handler.h20
-rw-r--r--src/components/transport_manager/include/transport_manager/usb/qnx/platform_usb_device.h2
-rw-r--r--src/components/transport_manager/include/transport_manager/usb/qnx/usb_connection.h8
-rw-r--r--src/components/transport_manager/include/transport_manager/usb/qnx/usb_handler.h2
-rw-r--r--src/components/transport_manager/include/transport_manager/usb/usb_aoa_adapter.h2
-rw-r--r--src/components/transport_manager/include/transport_manager/usb/usb_connection_factory.h4
-rw-r--r--src/components/transport_manager/include/transport_manager/usb/usb_control_transfer.h2
-rw-r--r--src/components/transport_manager/include/transport_manager/usb/usb_device_scanner.h7
-rw-r--r--src/components/transport_manager/src/bluetooth/bluetooth_connection_factory.cc2
-rw-r--r--src/components/transport_manager/src/bluetooth/bluetooth_device.cc7
-rw-r--r--src/components/transport_manager/src/bluetooth/bluetooth_device_scanner.cc70
-rw-r--r--src/components/transport_manager/src/bluetooth/bluetooth_socket_connection.cc5
-rw-r--r--src/components/transport_manager/src/bluetooth/bluetooth_transport_adapter.cc2
-rw-r--r--src/components/transport_manager/src/tcp/dnssd_service_browser.cc44
-rw-r--r--src/components/transport_manager/src/tcp/tcp_client_listener.cc117
-rw-r--r--src/components/transport_manager/src/tcp/tcp_connection_factory.cc2
-rw-r--r--src/components/transport_manager/src/tcp/tcp_device.cc34
-rw-r--r--src/components/transport_manager/src/tcp/tcp_socket_connection.cc7
-rw-r--r--src/components/transport_manager/src/tcp/tcp_transport_adapter.cc6
-rw-r--r--src/components/transport_manager/src/transport_adapter/threaded_socket_connection.cc72
-rw-r--r--src/components/transport_manager/src/transport_adapter/transport_adapter_impl.cc159
-rw-r--r--src/components/transport_manager/src/transport_manager_default.cc4
-rw-r--r--src/components/transport_manager/src/transport_manager_impl.cc70
-rw-r--r--src/components/transport_manager/src/usb/libusb/platform_usb_device.cc2
-rw-r--r--src/components/transport_manager/src/usb/libusb/usb_connection.cc3
-rw-r--r--src/components/transport_manager/src/usb/libusb/usb_handler.cc52
-rw-r--r--src/components/transport_manager/src/usb/qnx/platform_usb_device.cc2
-rw-r--r--src/components/transport_manager/src/usb/qnx/usb_connection.cc15
-rw-r--r--src/components/transport_manager/src/usb/qnx/usb_handler.cc2
-rw-r--r--src/components/transport_manager/src/usb/usb_aoa_adapter.cc2
-rw-r--r--src/components/transport_manager/src/usb/usb_connection_factory.cc2
-rw-r--r--src/components/transport_manager/src/usb/usb_device_scanner.cc84
-rw-r--r--src/components/utils/CMakeLists.txt5
-rw-r--r--src/components/utils/include/utils/back_trace.h6
-rw-r--r--src/components/utils/include/utils/bitstream.h2
-rw-r--r--src/components/utils/include/utils/file_system.h2
-rw-r--r--src/components/utils/include/utils/log_message_loop_thread.h1
-rw-r--r--src/components/utils/include/utils/resource_usage.h2
-rw-r--r--src/components/utils/include/utils/signals.h72
-rw-r--r--src/components/utils/include/utils/singleton.h2
-rw-r--r--src/components/utils/include/utils/stl_utils.h2
-rw-r--r--src/components/utils/include/utils/system.h2
-rw-r--r--src/components/utils/include/utils/threads/pulse_thread_delegate.h4
-rw-r--r--src/components/utils/include/utils/threads/thread_manager.h5
-rw-r--r--src/components/utils/include/utils/threads/thread_validator.h8
-rw-r--r--src/components/utils/src/appenders_loader.cc2
-rw-r--r--src/components/utils/src/back_trace.cc4
-rw-r--r--src/components/utils/src/bitstream.cc2
-rw-r--r--src/components/utils/src/conditional_variable_posix.cc11
-rw-r--r--src/components/utils/src/date_time.cc68
-rw-r--r--src/components/utils/src/file_system.cc6
-rw-r--r--src/components/utils/src/lock_posix.cc43
-rw-r--r--src/components/utils/src/logger_status.cc2
-rw-r--r--src/components/utils/src/resource_usage.cc6
-rw-r--r--src/components/utils/src/signals_linux.cc83
-rw-r--r--src/components/utils/src/system.cc2
-rw-r--r--src/components/utils/src/threads/posix_thread.cc251
-rw-r--r--src/components/utils/src/threads/pulse_thread_delegate.cc4
-rw-r--r--src/components/utils/src/threads/thread_validator.cc8
-rw-r--r--src/components/utils/test/CMakeLists.txt1
-rw-r--r--src/components/utils/test/date_time_test.cc60
-rw-r--r--test/CMakeLists.txt1
-rw-r--r--test/components/application_manager/CMakeLists.txt2
-rw-r--r--test/components/application_manager/generated_factory.h2
-rw-r--r--test/components/connection_handler/CMakeLists.txt1
-rw-r--r--test/components/connection_handler/include/connection_handler/heart_beat_monitor_test.h30
-rw-r--r--test/components/include/protocol_handler/control_message_matcher.h45
-rw-r--r--test/components/include/protocol_handler/protocol_handler_mock.h2
-rw-r--r--test/components/include/protocol_handler/protocol_observer_mock.h4
-rw-r--r--test/components/include/protocol_handler/session_observer_mock.h2
-rw-r--r--test/components/include/transport_manager/transport_manager_mock.h2
-rw-r--r--test/components/protocol_handler/CMakeLists.txt3
-rw-r--r--test/components/protocol_handler/include/protocol_handler/protocol_handler_mock.h32
-rw-r--r--test/components/protocol_handler/include/protocol_handler/protocol_handler_tm_test.h192
-rw-r--r--test/components/security_manager/CMakeLists.txt1
-rw-r--r--test/components/security_manager/include/security_manager/security_manager_mock.h2
-rw-r--r--test/components/security_manager/include/security_manager/security_manager_test.h4
-rw-r--r--test/components/transport_manager/CMakeLists.txt1
-rw-r--r--test/components/transport_manager/include/transport_manager/mock_transport_adapter_listener.h1
-rw-r--r--test/components/transport_manager/include/transport_manager/raw_message_matcher.h3
-rw-r--r--test/components/transport_manager/src/test_tcp_transport_adapter.cc2
-rw-r--r--test/test_suit.cc2
1158 files changed, 8867 insertions, 12219 deletions
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000000..567609b123
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1 @@
+build/
diff --git a/CMakeLists.txt b/CMakeLists.txt
index fe20f7edf9..a9d8be65b4 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -38,16 +38,19 @@ set (HMI "web" CACHE STRING "HMI type")
option(HMI2 "Use Qt HMI" OFF)
option(EXTENDED_MEDIA_MODE "Turn on and off extended Madia Manager features relates to PulseAudio A2DP and GStreamer" OFF)
option(BUILD_SHARED_LIBS "Build all libraries as shared (if ON) or static (if OFF)" OFF)
-option(BUILD_BT_SUPPORT "Bluetooth support" ON)
+option(BUILD_BT_SUPPORT "Bluetooth support" OFF)
option(BUILD_USB_SUPPORT "libusb support" OFF)
+option(BUILD_AOA_SUPPORT "libaoa support" OFF)
+option(BUILD_MME_SUPPORT "Apple devices support" OFF)
option(BUILD_AVAHI_SUPPORT "libavahi support" OFF)
+option(BUILD_RWLOCK_SUPPORT "rwlocks support" OFF)
option(BUILD_BACKTRACE_SUPPORT "backtrace support" ON)
option(BUILD_TESTS "Possibility to build and run tests" OFF)
option(TIME_TESTER "Enable profiling time test util" ON)
option(ENABLE_LOG "Logging feature" ON)
option(ENABLE_GCOV "gcov code coverage feature" OFF)
-option(ENABLE_SANITIZE "Sanitize tool" OFF)
option(ENABLE_SECURITY "Security Ford protocol protection" ON)
+option(EXTENDED_POLICY_FLAG "Build with specific features and extended functionality" OFF)
set(OS_TYPE_OPTION "$ENV{OS_TYPE}")
set(DEBUG_OPTION "$ENV{DEBUG}")
@@ -59,8 +62,24 @@ set(ENABLE_LOG_OPTION "$ENV{ENABLE_LOG}")
set(ARCH_TYPE_OPTION "$ENV{ARCH_TYPE}")
set(POLICY_OPTION "$ENV{POLICY_TYPE}")
set(SECURITY_OPTION "$ENV{SECURITY_MODE}")
-set(SNAPSHOT_TAG "$ENV{SNAPSHOT_TAG}")
+add_custom_target(pasa-tarball
+ COMMAND ${CMAKE_SOURCE_DIR}/tools/Utils/export-customer-specific.sh ${CMAKE_SOURCE_DIR} ${CMAKE_BINARY_DIR} pasa
+ COMMAND tar -cz -C /tmp/PASA -f ${CMAKE_BINARY_DIR}/pasa.tar.gz .
+ DEPENDS HMI_API MOBILE_API v4_protocol_v1_2_no_extra
+)
+
+add_custom_target(ford-tarball
+ COMMAND ${CMAKE_SOURCE_DIR}/tools/Utils/export-customer-specific.sh ${CMAKE_SOURCE_DIR} ${CMAKE_BINARY_DIR} FORD
+ COMMAND tar -czv -C /tmp/FORD -f ${CMAKE_BINARY_DIR}/ford.tar.gz .
+ DEPENDS HMI_API MOBILE_API v4_protocol_v1_2_no_extra
+)
+
+add_custom_target(genivi-tarball
+ COMMAND ${CMAKE_SOURCE_DIR}/tools/Utils/export-customer-specific.sh ${CMAKE_SOURCE_DIR} ${CMAKE_BINARY_DIR} genivi
+ COMMAND tar -czv -C /tmp/GENIVI -f ${CMAKE_BINARY_DIR}/genivi.tar.gz .
+ DEPENDS HMI_API MOBILE_API v4_protocol_v1_2_no_extra
+)
if (ARCH_TYPE_OPTION)
if (NOT (${ARCH_TYPE_OPTION} STREQUAL "x86") AND NOT (${ARCH_TYPE_OPTION} STREQUAL "armv7"))
@@ -131,6 +150,12 @@ if (ENABLE_LOG_OPTION)
endif()
endif()
+if (POLICY_OPTION)
+ if (${POLICY_OPTION} STREQUAL "EXTENDED_POLICY")
+ message(STATUS "Jenkins integration: Extended policy is used")
+ set (EXTENDED_POLICY_FLAG ON)
+ endif()
+endif()
if (SECURITY_OPTION)
if (${SECURITY_OPTION} STREQUAL "SEC_OFF")
@@ -139,25 +164,8 @@ if (SECURITY_OPTION)
endif()
endif()
-#Jenkins integration section end
-
-add_custom_target(pasa-tarball
- COMMAND ${CMAKE_SOURCE_DIR}/tools/Utils/export-customer-specific.sh ${CMAKE_SOURCE_DIR} ${CMAKE_BINARY_DIR} pasa
- COMMAND tar -cz -C /tmp/PASA -f ${CMAKE_BINARY_DIR}/pasa.tar.gz .
- DEPENDS HMI_API MOBILE_API v4_protocol_v1_2_no_extra
-)
-
-add_custom_target(ford-tarball
- COMMAND ${CMAKE_SOURCE_DIR}/tools/Utils/export-customer-specific.sh ${CMAKE_SOURCE_DIR} ${CMAKE_BINARY_DIR} ford
- COMMAND tar -cz -C /tmp/FORD -f ${CMAKE_BINARY_DIR}/ford.tar.gz .
- DEPENDS HMI_API MOBILE_API v4_protocol_v1_2_no_extra
-)
-
-add_custom_target(genivi-tarball
- COMMAND ${CMAKE_SOURCE_DIR}/tools/Utils/export-customer-specific.sh ${CMAKE_SOURCE_DIR} ${CMAKE_BINARY_DIR} genivi
- COMMAND tar -cz -C /tmp/GENIVI -f ${CMAKE_BINARY_DIR}/genivi.tar.gz .
-)
+#Jenkins integration section end
project (${PROJECT})
@@ -169,16 +177,17 @@ set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/cmake/Modules/")
# flag is handled by CMake
set(CMAKE_INSTALL_PREFIX ${CMAKE_CURRENT_BINARY_DIR})
set(ARCHIVE_OUTPUT_DIRECTORY ./bin)
-set(CMAKE_CXX_FLAGS "-fPIC -std=gnu++0x -Wall -Werror -Wuninitialized -Wvla")
-if(ENABLE_SANITIZE)
- set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fsanitize=address")
-endif()
-if(ENABLE_GCOV)
+set(CMAKE_CXX_FLAGS "-fPIC -g3 -ggdb3 -std=gnu++0x -Wall -Werror -Wuninitialized")
+if (ENABLE_GCOV)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} --coverage")
add_definitions(-DGCOV_ENABLED)
endif()
-set(CMAKE_CXX_FLAGS_RELEASE " -DNDEBUG -s -O2")
-set(CMAKE_CXX_FLAGS_DEBUG " -DDEBUG -g3 -ggdb3")
+set(CMAKE_CXX_FLAGS_RELEASE "-fPIC -s -O2") #It will be appended to CMAKE_CXX_FLAGS in release
+
+#include_directories(
+# ../../../src/components/policy/
+# ../../../src/components/rpc_base/
+#)
if (CMAKE_SYSTEM_NAME STREQUAL "Linux")
add_definitions(-DOS_LINUX)
@@ -210,6 +219,10 @@ if (BUILD_AVAHI_SUPPORT)
message(STATUS "Avahi support is enabled")
endif()
+if (BUILD_RWLOCK_SUPPORT)
+ add_definitions(-DRWLOCK_SUPPORT)
+endif()
+
if (BUILD_BACKTRACE_SUPPORT)
add_definitions(-DBACKTRACE_SUPPORT)
endif()
@@ -226,6 +239,16 @@ endif()
# TODO(AK): check current OS here
add_definitions(-DOS_POSIX)
+# FIXME(DC): weird logic
+IF(CMAKE_C_FLAGS_DEBUG)
+ SET( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DDEBUG" )
+ add_definitions(-DDEBUG)
+ELSE (CMAKE_C_FLAGS_DEBUG)
+ SET( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DRELEASE" )
+ add_definitions(-DRELEASE)
+ENDIF(CMAKE_C_FLAGS_DEBUG)
+
+
if (EXTENDED_MEDIA_MODE)
add_definitions(-DEXTENDED_MEDIA_MODE)
# required to find 'glibconfig.h'
@@ -377,219 +400,66 @@ set(3RD_PARTY_BINARY_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/src/3rd_party)
set (install-3rd_party_logger_var "")
set (install-3rd_party_dbus_var "")
-
-if(NO_REBUILD_3RD_PARTY)
- set(NO_REBUILD_3RD_PARTY_LOGGER ON)
- set(NO_REBUILD_3RD_PARTY_DBUS ON)
-endif()
-
-if(FORCE_3RD_PARTY)
- if(NO_REBUILD_3RD_PARTY)
- message(FATAL_ERROR "Please don't turn on both FORCE_3RD_PARTY and NO_REBUILD_3RD_PARTY at the same time.")
- else()
- set(FORCE_3RD_PARTY_LOGGER ON)
- set(FORCE_3RD_PARTY_DBUS ON)
- endif()
-endif()
+set (is_logger_actual 1)
+set (is_dbus_actual 1)
+set (is_git_folder 1)
+execute_process(
+ COMMAND /bin/bash -c "cd ${CMAKE_CURRENT_SOURCE_DIR} && git log . 1>/dev/null 2>&1; if [ $? == 0 ]; then exit 0; else exit 1; fi"
+ RESULT_VARIABLE is_git_folder
+)
if(ENABLE_LOG)
- if(NO_REBUILD_3RD_PARTY_LOGGER)
- message(STATUS "Not rebuilding logger.")
+ #build logger
+ if(is_git_folder EQUAL 0)
+ execute_process(
+ COMMAND /bin/bash -c "cd ${CMAKE_CURRENT_SOURCE_DIR} && grep .commit_hash ${3RD_PARTY_INSTALL_PREFIX_ARCH}/lib/liblog4cxx.so 1>/dev/null 2>&1; if [ $? == 0 ]; then VAR1=\$(readelf -p .commit_hash ${3RD_PARTY_INSTALL_PREFIX_ARCH}/lib/liblog4cxx.so 2>/dev/null); VAR1=\$(echo $VAR1 | awk '{print \$NF}'); VAR2=\$(git log --pretty=\"format:%H\" -1 ${3RD_PARTY_SOURCE_DIRECTORY}/apache-log4cxx-0.10.0); if [[ \$VAR1 == \$VAR2 ]]; then exit 0; else exit 1; fi; else exit 1; fi"
+ RESULT_VARIABLE is_logger_actual
+ )
+ endif()
+ if(is_logger_actual EQUAL 0)
+ message(STATUS "Logger is actual.")
else()
- if(FORCE_3RD_PARTY_LOGGER)
- message(STATUS "Force to rebuild logger.")
-
- #build logger
- add_custom_target(3rd_party_logger
- make
- WORKING_DIRECTORY ${3RD_PARTY_BINARY_DIRECTORY}
- )
-
- #install logger
- #install either to default place with sudo or non-default plase without sudo.
- #to install with sudo to non-default place use manual installation
- add_custom_target(install-3rd_party_logger
- COMMAND /bin/bash -c \"USE_DEFAULT_3RD_PARTY_PATH=${USE_DEFAULT_3RD_PARTY_PATH}\;
- if [ \\$$USE_DEFAULT_3RD_PARTY_PATH == "true" ]\; then
- sudo -k \;
- sudo make install\;
- else
- make install\;
- fi\"
- DEPENDS 3rd_party_logger
- WORKING_DIRECTORY ${3RD_PARTY_BINARY_DIRECTORY}
- )
- else()
- #build logger
- add_custom_target(3rd_party_logger
- COMMAND /bin/bash -c \"cd ${CMAKE_CURRENT_SOURCE_DIR} &&
- grep .commit_hash ${3RD_PARTY_INSTALL_PREFIX_ARCH}/lib/liblog4cxx.so 1>/dev/null 2>&1\;
- if [ \\$$? == 0 ]\; then
- VAR1=\\$$\( readelf -p .commit_hash ${3RD_PARTY_INSTALL_PREFIX_ARCH}/lib/liblog4cxx.so 2>/dev/null\)\;
- VAR1=\\$$\(echo \\$$VAR1 | awk '{print \\$$NF}'\)\;
- VAR2=-1\;
- cd ${CMAKE_CURRENT_SOURCE_DIR}\;
- git log . 1>/dev/null 2>&1\;
- if [ \\$$? == 0 ]; then
- VAR2=\\$$\(git log --pretty=\"format:%H\" -1 ${3RD_PARTY_SOURCE_DIRECTORY}/apache-log4cxx-0.10.0\)\;
- fi\;
- if [ \\$$VAR1 != \\$$VAR2 ]\; then
- echo " Need to rebuild logger. " \;
- cd ${3RD_PARTY_BINARY_DIRECTORY}\;
- make\;
- else
- echo " Logger is actual. " \;
- fi\;
- else
- echo " Need to build logger. " \;
- cd ${3RD_PARTY_BINARY_DIRECTORY}\;
- make\;
- fi\"
- WORKING_DIRECTORY ${3RD_PARTY_BINARY_DIRECTORY}
- )
-
- #install logger
- #install either to default place with sudo or non-default plase without sudo.
- #to install with sudo to non-default place use manual installation
- add_custom_target(install-3rd_party_logger
- COMMAND /bin/bash -c \"cd ${CMAKE_CURRENT_SOURCE_DIR} &&
- grep .commit_hash ${3RD_PARTY_INSTALL_PREFIX_ARCH}/lib/liblog4cxx.so 1>/dev/null 2>&1\;
- if [ \\$$? == 0 ]\; then
- VAR1=\\$$\( readelf -p .commit_hash ${3RD_PARTY_INSTALL_PREFIX_ARCH}/lib/liblog4cxx.so 2>/dev/null\)\;
- VAR1=\\$$\(echo \\$$VAR1 | awk '{print \\$$NF}'\)\;
- VAR2=-1\;
- cd ${CMAKE_CURRENT_SOURCE_DIR}\;
- git log . 1>/dev/null 2>&1\;
- if [ \\$$? == 0 ]; then
- VAR2=\\$$\(git log --pretty=\"format:%H\" -1 ${3RD_PARTY_SOURCE_DIRECTORY}/apache-log4cxx-0.10.0\)\;
- fi\;
- if [ \\$$VAR1 != \\$$VAR2 ]\; then
- USE_DEFAULT_3RD_PARTY_PATH=${USE_DEFAULT_3RD_PARTY_PATH}\;
- if [ \\$$USE_DEFAULT_3RD_PARTY_PATH == "true" ]\; then
- cd ${3RD_PARTY_BINARY_DIRECTORY}\;
- sudo -k \;
- sudo make install\;
- else
- cd ${3RD_PARTY_BINARY_DIRECTORY}\;
- make install\;
- fi\;
- fi\;
- else
- USE_DEFAULT_3RD_PARTY_PATH=${USE_DEFAULT_3RD_PARTY_PATH}\;
- if [ \\$$USE_DEFAULT_3RD_PARTY_PATH == "true" ]\; then
- cd ${3RD_PARTY_BINARY_DIRECTORY}\;
- sudo -k \;
- sudo make install\;
- else
- cd ${3RD_PARTY_BINARY_DIRECTORY}\;
- make install\;
- fi\;
- fi\"
- DEPENDS 3rd_party_logger
- WORKING_DIRECTORY ${3RD_PARTY_BINARY_DIRECTORY}
- )
- endif()
-
+ message(STATUS "Need to rebuild logger.")
+
+ add_custom_target(3rd_party_logger
+ make
+ WORKING_DIRECTORY ${3RD_PARTY_BINARY_DIRECTORY}
+ )
+ #install logger
+ #install either to default place with sudo or none-default plase without sudo.
+ #to install with sudo to none-default place use manual installation
+ add_custom_target(install-3rd_party_logger
+ COMMAND /bin/bash -c \"if [ ! ${is_logger_actual} == 0 ]\; then USE_DEFAULT_3RD_PARTY_PATH=${USE_DEFAULT_3RD_PARTY_PATH}\; if [[ \\$$USE_DEFAULT_3RD_PARTY_PATH == "true" ]]\; then sudo make install\; else make install\; fi\; fi\"
+ DEPENDS 3rd_party_logger
+ WORKING_DIRECTORY ${3RD_PARTY_BINARY_DIRECTORY}
+ )
set (install-3rd_party_logger_var "install-3rd_party_logger")
endif()
endif()
if (HMIADAPTER STREQUAL "dbus")
- if(NO_REBUILD_3RD_PARTY_DBUS)
- message(STATUS "Not rebuilding D-Bus.")
+#build d-bus
+ execute_process(
+ COMMAND /bin/bash -c "grep .commit_hash ${3RD_PARTY_INSTALL_PREFIX_ARCH}/lib/libdbus-1.so 1>/dev/null 2>&1; if [ $? == 0 ]; then VAR1=\$(readelf -p .commit_hash ${3RD_PARTY_INSTALL_PREFIX_ARCH}/lib/libdbus-1.so 2>/dev/null); VAR1=\$(echo $VAR1 | awk '{print \$NF}'); VAR2=\$(git log --pretty=\"format:%H\" -1 ${3RD_PARTY_SOURCE_DIRECTORY}/dbus-1.7.8); if [[ \$VAR1 == \$VAR2 ]]; then exit 0; else exit 1; fi; else exit 1; fi"
+ RESULT_VARIABLE is_dbus_actual
+ )
+ if(is_dbus_actual EQUAL 0)
+ message(STATUS "D-Bus is actual.")
else()
- if(FORCE_3RD_PARTY_DBUS)
- message(STATUS "Force to rebuild D-Bus.")
-
- #build d-bus
- add_custom_target(3rd_party_dbus
- make
- WORKING_DIRECTORY ${3RD_PARTY_BINARY_DIRECTORY}
- )
-
- #install d-bus
- #install either to default place with sudo or non-default plase without sudo.
- #to install with sudo to non-default place use manual installation
- add_custom_target(install-3rd_party_dbus
- COMMAND /bin/bash -c \"USE_DEFAULT_3RD_PARTY_PATH=${USE_DEFAULT_3RD_PARTY_PATH}\;
- if [ \\$$USE_DEFAULT_3RD_PARTY_PATH == "true" ]\; then
- sudo -k \;
- sudo make install\;
- else
- make install\;
- fi\"
- DEPENDS 3rd_party_dbus
- WORKING_DIRECTORY ${3RD_PARTY_BINARY_DIRECTORY}
- )
- else()
- #build d-bus
- add_custom_target(3rd_party_dbus
- COMMAND /bin/bash -c \"grep .commit_hash ${3RD_PARTY_INSTALL_PREFIX_ARCH}/lib/libdbus-1.so 1>/dev/null 2>&1\;
- if [ \\$$? == 0 ]\; then
- VAR1=\\$$\(readelf -p .commit_hash ${3RD_PARTY_INSTALL_PREFIX_ARCH}/lib/libdbus-1.so 2>/dev/null\)\;
- VAR1=\\$$\(echo \\$$VAR1 | awk '{print \\$$NF}'\)\;
- VAR2=-1\;
- cd ${CMAKE_CURRENT_SOURCE_DIR}\;
- git log . 1>/dev/null 2>&1\;
- if [ \\$$? == 0 ]; then
- VAR2=\\$$\(git log --pretty=\"format:%H\" -1 ${3RD_PARTY_SOURCE_DIRECTORY}/dbus-1.7.8\)\;
- fi\;
- if [ \\$$VAR1 != \\$$VAR2 ]\; then
- echo " Need to rebuild D-Bus. " \;
- cd ${3RD_PARTY_BINARY_DIRECTORY}\;
- make\;
- else
- echo " D-Bus is actual. " \;
- fi\;
- else
- echo " Need to build D-Bus. " \;
- cd ${3RD_PARTY_BINARY_DIRECTORY}\;
- make\;
- fi\"
- WORKING_DIRECTORY ${3RD_PARTY_BINARY_DIRECTORY}
- )
-
- #install d-bus
- #install either to default place with sudo or non-default plase without sudo.
- #to install with sudo to non-default place use manual installation
- add_custom_target(install-3rd_party_dbus
- COMMAND /bin/bash -c \"grep .commit_hash ${3RD_PARTY_INSTALL_PREFIX_ARCH}/lib/libdbus-1.so 1>/dev/null 2>&1\;
- if [ \\$$? == 0 ]\; then
- VAR1=\\$$\(readelf -p .commit_hash ${3RD_PARTY_INSTALL_PREFIX_ARCH}/lib/libdbus-1.so 2>/dev/null\)\;
- VAR1=\\$$\(echo \\$$VAR1 | awk '{print \\$$NF}'\)\;
- VAR2=-1\;
- cd ${CMAKE_CURRENT_SOURCE_DIR}\;
- git log . 1>/dev/null 2>&1\;
- if [ \\$$? == 0 ]; then
- VAR2=\\$$\(git log --pretty=\"format:%H\" -1 ${3RD_PARTY_SOURCE_DIRECTORY}/dbus-1.7.8\)\;
- fi\;
- if [ \\$$VAR1 != \\$$VAR2 ]\; then
- USE_DEFAULT_3RD_PARTY_PATH=${USE_DEFAULT_3RD_PARTY_PATH}\;
- if [ \\$$USE_DEFAULT_3RD_PARTY_PATH == "true" ]\; then
- cd ${3RD_PARTY_BINARY_DIRECTORY}\;
- sudo -k \;
- sudo make install\;
- else
- cd ${3RD_PARTY_BINARY_DIRECTORY}\;
- make install\;
- fi\;
- fi\;
- else
- USE_DEFAULT_3RD_PARTY_PATH=${USE_DEFAULT_3RD_PARTY_PATH}\;
- if [ \\$$USE_DEFAULT_3RD_PARTY_PATH == "true" ]\; then
- cd ${3RD_PARTY_BINARY_DIRECTORY}\;
- sudo -k \;
- sudo make install\;
- else
- cd ${3RD_PARTY_BINARY_DIRECTORY}\;
- make install\;
- fi\;
- fi\"
- DEPENDS 3rd_party_dbus
- WORKING_DIRECTORY ${3RD_PARTY_BINARY_DIRECTORY}
- )
- endif()
-
+ message(STATUS "Need to rebuild D-Bus.")
+
+ add_custom_target(3rd_party_dbus
+ make
+ WORKING_DIRECTORY ${3RD_PARTY_BINARY_DIRECTORY}
+ )
+ #install d-bus
+ #install either to default place with sudo or none default plase without sudo.
+ #to install with sudo to none default place use manual installation
+ add_custom_target(install-3rd_party_dbus
+ COMMAND /bin/bash -c \"if [ ! ${is_dbus_actual} == 0 ]\; then USE_DEFAULT_3RD_PARTY_PATH=${USE_DEFAULT_3RD_PARTY_PATH}\; if [[ \\$$USE_DEFAULT_3RD_PARTY_PATH == "true" ]]\; then sudo make install\; else make install\; fi\; fi\"
+ DEPENDS 3rd_party_dbus
+ WORKING_DIRECTORY ${3RD_PARTY_BINARY_DIRECTORY}
+ )
set (install-3rd_party_dbus_var "install-3rd_party_dbus")
endif()
endif()
@@ -601,10 +471,6 @@ add_custom_target(install-3rd_party
WORKING_DIRECTORY ${3RD_PARTY_BINARY_DIRECTORY}
)
-if(ENABLE_LOG)
- include_directories ( ${LOG4CXX_INCLUDE_DIRECTORY} )
-endif()
-
if(ENABLE_SECURITY)
add_definitions(-DENABLE_SECURITY)
set(SecurityManagerLibrary SecurityManager)
@@ -646,7 +512,7 @@ add_subdirectory(./src/plugins)
if(BUILD_TESTS)
# Directory test is deprecated. Use src/components/<name>/test
include(Dart)
- add_subdirectory(./test)
+ #add_subdirectory(./test)
endif()
# Building documentation
diff --git a/src/3rd_party-static/MessageBroker/CMakeLists.txt b/src/3rd_party-static/MessageBroker/CMakeLists.txt
index 87a0fe2a2a..f2095ae36e 100644
--- a/src/3rd_party-static/MessageBroker/CMakeLists.txt
+++ b/src/3rd_party-static/MessageBroker/CMakeLists.txt
@@ -29,8 +29,6 @@ set (MESSAGE_BROKER_SERVER_SOURCES
)
add_library("MessageBroker" ${MESSAGE_BROKER_SOURCES})
-target_link_libraries(MessageBroker Utils)
-
add_library("MessageBrokerClient" ${MESSAGE_BROKER_CLIENT_SOURCES})
target_link_libraries("MessageBrokerClient" "MessageBroker")
diff --git a/src/3rd_party-static/MessageBroker/src/client/mb_controller.cpp b/src/3rd_party-static/MessageBroker/src/client/mb_controller.cpp
index c37a62dbb8..bd8b0e3ed8 100644
--- a/src/3rd_party-static/MessageBroker/src/client/mb_controller.cpp
+++ b/src/3rd_party-static/MessageBroker/src/client/mb_controller.cpp
@@ -311,12 +311,6 @@ namespace NsMessageBroker
return false;
}
- if (root.isMember("result") && root.isMember("error"))
- {
- /* message can't contain simultaneously result and error*/
- return false;
- }
-
if (root.isMember("method"))
{
if (!root["method"].isString())
diff --git a/src/3rd_party-static/MessageBroker/src/lib_messagebroker/websocket_handler.cpp b/src/3rd_party-static/MessageBroker/src/lib_messagebroker/websocket_handler.cpp
index b9c97f7ff9..7713899b8c 100644
--- a/src/3rd_party-static/MessageBroker/src/lib_messagebroker/websocket_handler.cpp
+++ b/src/3rd_party-static/MessageBroker/src/lib_messagebroker/websocket_handler.cpp
@@ -229,9 +229,8 @@ namespace NsMessageBroker
unsigned char hash[20] = {0xb3, 0x7a, 0x4f, 0x2c, 0xc0, 0x62, 0x4f, 0x16, 0x90, 0xf6, 0x46, 0x06, 0xcf, 0x38, 0x59, 0x45, 0xb2, 0xbe, 0xc4, 0xea};
int accept_len;
- strncpy(accept_buf, key.c_str(), MAX_WEBSOCKET_04_KEY_LEN + 37);
- strncpy(accept_buf + key.length(), websocket_magic_guid_04,
- MAX_WEBSOCKET_04_KEY_LEN + 37 - strlen(key.c_str()));
+ strcpy(accept_buf, key.c_str());
+ strcpy(accept_buf + key.length(), websocket_magic_guid_04);
SHA1((unsigned char *)accept_buf, key.length() + strlen(websocket_magic_guid_04), hash);
diff --git a/src/3rd_party-static/jsoncpp/src/lib_json/json_reader.cpp b/src/3rd_party-static/jsoncpp/src/lib_json/json_reader.cpp
index d0abe34811..9bc6f23275 100644
--- a/src/3rd_party-static/jsoncpp/src/lib_json/json_reader.cpp
+++ b/src/3rd_party-static/jsoncpp/src/lib_json/json_reader.cpp
@@ -576,7 +576,7 @@ Reader::decodeNumber( Token &token )
: Value::maxLargestUInt;
Value::LargestUInt threshold = maxIntegerValue / 10;
Value::UInt lastDigitThreshold = Value::UInt( maxIntegerValue % 10 );
- assert(lastDigitThreshold <= 9 );
+ assert( lastDigitThreshold >=0 && lastDigitThreshold <= 9 );
Value::LargestUInt value = 0;
while ( current < token.end_ )
{
diff --git a/src/3rd_party/CMakeLists.txt b/src/3rd_party/CMakeLists.txt
index c7965992f4..57c30a63c8 100644
--- a/src/3rd_party/CMakeLists.txt
+++ b/src/3rd_party/CMakeLists.txt
@@ -44,7 +44,7 @@ if(ENABLE_LOG)
set(LOG4CXX_LIBS_DIRECTORY ${3RD_PARTY_INSTALL_PREFIX_ARCH}/lib PARENT_SCOPE)
endif()
-if(ENABLE_LOG)
+if(ENABLE_LOG AND NOT (${is_logger_actual} EQUAL 0))
# --- libapr-1
add_subdirectory(apr-cmake)
@@ -64,7 +64,7 @@ if(HMI_DBUS_API)
set(DBUS_LIBS_DIRECTORY ${3RD_PARTY_INSTALL_PREFIX_ARCH}/lib PARENT_SCOPE)
endif()
-if(HMI_DBUS_API)
+if(HMI_DBUS_API AND NOT (${is_dbus_actual} EQUAL 0))
add_subdirectory(dbus-cmake)
endif()
diff --git a/src/3rd_party/apache-log4cxx-0.10.0/autom4te.cache/requests b/src/3rd_party/apache-log4cxx-0.10.0/autom4te.cache/requests
index 05b8c843c5..4230a26bbf 100644
--- a/src/3rd_party/apache-log4cxx-0.10.0/autom4te.cache/requests
+++ b/src/3rd_party/apache-log4cxx-0.10.0/autom4te.cache/requests
@@ -15,63 +15,63 @@
'configure.in'
],
{
- 'AC_DEFINE_TRACE_LITERAL' => 1,
- 'AC_CONFIG_LINKS' => 1,
- 'AM_SILENT_RULES' => 1,
- 'AM_PROG_CC_C_O' => 1,
- 'AC_INIT' => 1,
- '_LT_AC_TAGCONFIG' => 1,
- 'AM_PROG_MOC' => 1,
- '_AM_MAKEFILE_INCLUDE' => 1,
- 'm4_pattern_forbid' => 1,
- 'AM_PROG_CXX_C_O' => 1,
+ 'AM_MAKEFILE_INCLUDE' => 1,
+ 'AC_CONFIG_HEADERS' => 1,
+ 'sinclude' => 1,
'_AM_SUBST_NOTMAKE' => 1,
- 'AC_SUBST' => 1,
- 'AM_PROG_AR' => 1,
- 'AM_ENABLE_MULTILIB' => 1,
- 'AC_CANONICAL_SYSTEM' => 1,
+ 'AM_GNU_GETTEXT' => 1,
'_AM_COND_ELSE' => 1,
+ 'AC_REQUIRE_AUX_FILE' => 1,
+ 'AC_CONFIG_LINKS' => 1,
+ 'm4_sinclude' => 1,
'AM_AUTOMAKE_VERSION' => 1,
- 'AM_XGETTEXT_OPTION' => 1,
- 'AC_FC_PP_SRCEXT' => 1,
- 'AM_MAKEFILE_INCLUDE' => 1,
- '_AM_COND_IF' => 1,
+ 'AM_PROG_CC_C_O' => 1,
+ 'LT_SUPPORTED_TAG' => 1,
+ 'AC_CANONICAL_TARGET' => 1,
+ 'AM_SILENT_RULES' => 1,
+ 'AM_PROG_F77_C_O' => 1,
+ 'AC_SUBST' => 1,
+ 'm4_pattern_forbid' => 1,
+ 'AM_MAINTAINER_MODE' => 1,
+ 'AC_CONFIG_LIBOBJ_DIR' => 1,
'AM_INIT_AUTOMAKE' => 1,
+ 'AC_FC_FREEFORM' => 1,
+ 'AM_POT_TOOLS' => 1,
+ 'AC_CANONICAL_HOST' => 1,
+ 'LT_INIT' => 1,
+ 'AC_CONFIG_AUX_DIR' => 1,
+ 'LT_CONFIG_LTDL_DIR' => 1,
+ '_AM_MAKEFILE_INCLUDE' => 1,
+ 'AC_FC_PP_SRCEXT' => 1,
+ 'AC_CANONICAL_SYSTEM' => 1,
+ '_LT_AC_TAGCONFIG' => 1,
+ 'AM_PATH_GUILE' => 1,
'AC_CONFIG_FILES' => 1,
- 'AC_CONFIG_HEADERS' => 1,
- 'include' => 1,
+ 'AC_LIBSOURCE' => 1,
'AC_CANONICAL_BUILD' => 1,
- 'AM_POT_TOOLS' => 1,
- 'sinclude' => 1,
- 'AC_FC_PP_DEFINE' => 1,
+ 'AC_INIT' => 1,
'AC_SUBST_TRACE' => 1,
- '_m4_warn' => 1,
+ 'AM_PROG_AR' => 1,
'm4_include' => 1,
'AM_GNU_GETTEXT_INTL_SUBDIR' => 1,
- 'm4_sinclude' => 1,
- 'AM_MAINTAINER_MODE' => 1,
- '_AM_COND_ENDIF' => 1,
- 'AC_CONFIG_AUX_DIR' => 1,
- 'LT_CONFIG_LTDL_DIR' => 1,
- 'AM_NLS' => 1,
- 'AC_REQUIRE_AUX_FILE' => 1,
- 'AC_LIBSOURCE' => 1,
- 'AC_CANONICAL_TARGET' => 1,
- 'AM_PROG_F77_C_O' => 1,
- 'AC_CANONICAL_HOST' => 1,
+ 'AH_OUTPUT' => 1,
+ 'AC_FC_PP_DEFINE' => 1,
+ 'AC_DEFINE_TRACE_LITERAL' => 1,
+ 'm4_pattern_allow' => 1,
'AM_CONDITIONAL' => 1,
+ '_AM_COND_ENDIF' => 1,
+ '_AM_COND_IF' => 1,
+ 'AM_PROG_MOC' => 1,
+ 'AM_PROG_CXX_C_O' => 1,
'AC_CONFIG_SUBDIRS' => 1,
- 'AC_FC_FREEFORM' => 1,
- 'LT_SUPPORTED_TAG' => 1,
+ 'include' => 1,
'AM_PROG_FC_C_O' => 1,
- 'AM_GNU_GETTEXT' => 1,
- 'AC_CONFIG_LIBOBJ_DIR' => 1,
- 'm4_pattern_allow' => 1,
- 'AM_PATH_GUILE' => 1,
- 'AH_OUTPUT' => 1,
- 'AC_FC_SRCEXT' => 1,
+ 'AM_XGETTEXT_OPTION' => 1,
+ 'AM_NLS' => 1,
+ 'AM_ENABLE_MULTILIB' => 1,
'AC_PROG_LIBTOOL' => 1,
- 'LT_INIT' => 1
+ '_m4_warn' => 1,
+ 'AC_FC_SRCEXT' => 1
}
], 'Autom4te::Request' )
);
diff --git a/src/3rd_party/apache-log4cxx-0.10.0/configure b/src/3rd_party/apache-log4cxx-0.10.0/configure
index 83ae6de8ae..02ec84a747 100755
--- a/src/3rd_party/apache-log4cxx-0.10.0/configure
+++ b/src/3rd_party/apache-log4cxx-0.10.0/configure
@@ -1,11 +1,9 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.68.
+# Generated by GNU Autoconf 2.69.
#
#
-# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
-# 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software
-# Foundation, Inc.
+# Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
#
#
# This configure script is free software; the Free Software Foundation
@@ -134,6 +132,31 @@ export LANGUAGE
# CDPATH.
(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
+# Use a proper internal environment variable to ensure we don't fall
+ # into an infinite loop, continuously re-executing ourselves.
+ if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then
+ _as_can_reexec=no; export _as_can_reexec;
+ # We cannot yet assume a decent shell, so we have to provide a
+# neutralization value for shells without unset; and this also
+# works around shells that cannot unset nonexistent variables.
+# Preserve -v and -x to the replacement shell.
+BASH_ENV=/dev/null
+ENV=/dev/null
+(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
+case $- in # ((((
+ *v*x* | *x*v* ) as_opts=-vx ;;
+ *v* ) as_opts=-v ;;
+ *x* ) as_opts=-x ;;
+ * ) as_opts= ;;
+esac
+exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
+# Admittedly, this is quite paranoid, since all the known shells bail
+# out after a failed `exec'.
+$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
+as_fn_exit 255
+ fi
+ # We don't want this to propagate to other subprocesses.
+ { _as_can_reexec=; unset _as_can_reexec;}
if test "x$CONFIG_SHELL" = x; then
as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :
emulate sh
@@ -167,7 +190,8 @@ if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then :
else
exitcode=1; echo positional parameters were not saved.
fi
-test x\$exitcode = x0 || exit 1"
+test x\$exitcode = x0 || exit 1
+test -x / || exit 1"
as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
@@ -212,21 +236,25 @@ IFS=$as_save_IFS
if test "x$CONFIG_SHELL" != x; then :
- # We cannot yet assume a decent shell, so we have to provide a
- # neutralization value for shells without unset; and this also
- # works around shells that cannot unset nonexistent variables.
- # Preserve -v and -x to the replacement shell.
- BASH_ENV=/dev/null
- ENV=/dev/null
- (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
- export CONFIG_SHELL
- case $- in # ((((
- *v*x* | *x*v* ) as_opts=-vx ;;
- *v* ) as_opts=-v ;;
- *x* ) as_opts=-x ;;
- * ) as_opts= ;;
- esac
- exec "$CONFIG_SHELL" $as_opts "$as_myself" ${1+"$@"}
+ export CONFIG_SHELL
+ # We cannot yet assume a decent shell, so we have to provide a
+# neutralization value for shells without unset; and this also
+# works around shells that cannot unset nonexistent variables.
+# Preserve -v and -x to the replacement shell.
+BASH_ENV=/dev/null
+ENV=/dev/null
+(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
+case $- in # ((((
+ *v*x* | *x*v* ) as_opts=-vx ;;
+ *v* ) as_opts=-v ;;
+ *x* ) as_opts=-x ;;
+ * ) as_opts= ;;
+esac
+exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
+# Admittedly, this is quite paranoid, since all the known shells bail
+# out after a failed `exec'.
+$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
+exit 255
fi
if test x$as_have_required = xno; then :
@@ -328,6 +356,14 @@ $as_echo X"$as_dir" |
} # as_fn_mkdir_p
+
+# as_fn_executable_p FILE
+# -----------------------
+# Test if FILE is an executable regular file.
+as_fn_executable_p ()
+{
+ test -f "$1" && test -x "$1"
+} # as_fn_executable_p
# as_fn_append VAR VALUE
# ----------------------
# Append the text in VALUE to the end of the definition contained in VAR. Take
@@ -449,6 +485,10 @@ as_cr_alnum=$as_cr_Letters$as_cr_digits
chmod +x "$as_me.lineno" ||
{ $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
+ # If we had to re-execute with $CONFIG_SHELL, we're ensured to have
+ # already done that, so ensure we don't try to do so again and fall
+ # in an infinite loop. This has already happened in practice.
+ _as_can_reexec=no; export _as_can_reexec
# Don't try to exec as it changes $[0], causing all sort of problems
# (the dirname of $[0] is not the place where we might find the
# original and so on. Autoconf is especially sensitive to this).
@@ -483,16 +523,16 @@ if (echo >conf$$.file) 2>/dev/null; then
# ... but there are two gotchas:
# 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
# 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
- # In both cases, we have to default to `cp -p'.
+ # In both cases, we have to default to `cp -pR'.
ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
- as_ln_s='cp -p'
+ as_ln_s='cp -pR'
elif ln conf$$.file conf$$ 2>/dev/null; then
as_ln_s=ln
else
- as_ln_s='cp -p'
+ as_ln_s='cp -pR'
fi
else
- as_ln_s='cp -p'
+ as_ln_s='cp -pR'
fi
rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
rmdir conf$$.dir 2>/dev/null
@@ -504,28 +544,8 @@ else
as_mkdir_p=false
fi
-if test -x / >/dev/null 2>&1; then
- as_test_x='test -x'
-else
- if ls -dL / >/dev/null 2>&1; then
- as_ls_L_option=L
- else
- as_ls_L_option=
- fi
- as_test_x='
- eval sh -c '\''
- if test -d "$1"; then
- test -d "$1/.";
- else
- case $1 in #(
- -*)set "./$1";;
- esac;
- case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
- ???[sx]*):;;*)false;;esac;fi
- '\'' sh
- '
-fi
-as_executable_p=$as_test_x
+as_test_x='test -x'
+as_executable_p=as_fn_executable_p
# Sed expression to map a string onto a valid CPP name.
as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
@@ -1392,8 +1412,6 @@ target=$target_alias
if test "x$host_alias" != x; then
if test "x$build_alias" = x; then
cross_compiling=maybe
- $as_echo "$as_me: WARNING: if you wanted to set the --build type, don't use --host.
- If a cross compiler is detected then cross compile mode will be used" >&2
elif test "x$build_alias" != "x$host_alias"; then
cross_compiling=yes
fi
@@ -1675,9 +1693,9 @@ test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
configure
-generated by GNU Autoconf 2.68
+generated by GNU Autoconf 2.69
-Copyright (C) 2010 Free Software Foundation, Inc.
+Copyright (C) 2012 Free Software Foundation, Inc.
This configure script is free software; the Free Software Foundation
gives unlimited permission to copy, distribute and modify it.
_ACEOF
@@ -1753,7 +1771,7 @@ $as_echo "$ac_try_echo"; } >&5
test ! -s conftest.err
} && test -s conftest$ac_exeext && {
test "$cross_compiling" = yes ||
- $as_test_x conftest$ac_exeext
+ test -x conftest$ac_exeext
}; then :
ac_retval=0
else
@@ -2138,7 +2156,7 @@ $as_echo "$ac_try_echo"; } >&5
test ! -s conftest.err
} && test -s conftest$ac_exeext && {
test "$cross_compiling" = yes ||
- $as_test_x conftest$ac_exeext
+ test -x conftest$ac_exeext
}; then :
ac_retval=0
else
@@ -2222,7 +2240,7 @@ $as_echo "$ac_try_echo"; } >&5
test ! -s conftest.err
} && test -s conftest$ac_exeext && {
test "$cross_compiling" = yes ||
- $as_test_x conftest$ac_exeext
+ test -x conftest$ac_exeext
}; then :
ac_retval=0
else
@@ -2399,7 +2417,7 @@ This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
It was created by $as_me, which was
-generated by GNU Autoconf 2.68. Invocation command line was
+generated by GNU Autoconf 2.69. Invocation command line was
$ $0 $@
@@ -2957,7 +2975,7 @@ case $as_dir/ in #((
# by default.
for ac_prog in ginstall scoinst install; do
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
if test $ac_prog = install &&
grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
# AIX install. It has an incompatible calling convention.
@@ -3126,7 +3144,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_AWK="$ac_prog"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -3260,7 +3278,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_STRIP="${ac_tool_prefix}strip"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -3300,7 +3318,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_ac_ct_STRIP="strip"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -3513,7 +3531,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_CC="${ac_tool_prefix}gcc"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -3553,7 +3571,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_ac_ct_CC="gcc"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -3606,7 +3624,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_CC="${ac_tool_prefix}cc"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -3647,7 +3665,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
ac_prog_rejected=yes
continue
@@ -3705,7 +3723,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -3749,7 +3767,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_ac_ct_CC="$ac_prog"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -4195,8 +4213,7 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <stdarg.h>
#include <stdio.h>
-#include <sys/types.h>
-#include <sys/stat.h>
+struct stat;
/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
struct buf { int x; };
FILE * (*rcsopen) (struct buf *, struct stat *, int);
@@ -4463,7 +4480,7 @@ do
for ac_prog in grep ggrep; do
for ac_exec_ext in '' $ac_executable_extensions; do
ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
- { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
+ as_fn_executable_p "$ac_path_GREP" || continue
# Check for GNU ac_path_GREP and select it if it is found.
# Check for GNU $ac_path_GREP
case `"$ac_path_GREP" --version 2>&1` in
@@ -4529,7 +4546,7 @@ do
for ac_prog in egrep; do
for ac_exec_ext in '' $ac_executable_extensions; do
ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
- { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
+ as_fn_executable_p "$ac_path_EGREP" || continue
# Check for GNU ac_path_EGREP and select it if it is found.
# Check for GNU $ac_path_EGREP
case `"$ac_path_EGREP" --version 2>&1` in
@@ -4997,7 +5014,7 @@ ia64-*-hpux*)
;;
*-*-irix6*)
# Find out which ABI we are using.
- echo '#line 5000 "configure"' > conftest.$ac_ext
+ echo '#line 5017 "configure"' > conftest.$ac_ext
if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
(eval $ac_compile) 2>&5
ac_status=$?
@@ -5458,7 +5475,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -5502,7 +5519,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_ac_ct_CXX="$ac_prog"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -5942,7 +5959,7 @@ ac_compile='$F77 -c $FFLAGS conftest.$ac_ext >&5'
ac_link='$F77 -o conftest$ac_exeext $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_f77_compiler_gnu
if test -n "$ac_tool_prefix"; then
- for ac_prog in g77 xlf f77 frt pgf77 cf77 fort77 fl32 af77 xlf90 f90 pgf90 pghpf epcf90 gfortran g95 xlf95 f95 fort ifort ifc efc pgfortran pgf95 lf95 ftn
+ for ac_prog in g77 xlf f77 frt pgf77 cf77 fort77 fl32 af77 xlf90 f90 pgf90 pghpf epcf90 gfortran g95 xlf95 f95 fort ifort ifc efc pgfortran pgf95 lf95 ftn nagfor
do
# Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
set dummy $ac_tool_prefix$ac_prog; ac_word=$2
@@ -5960,7 +5977,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_F77="$ac_tool_prefix$ac_prog"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -5986,7 +6003,7 @@ fi
fi
if test -z "$F77"; then
ac_ct_F77=$F77
- for ac_prog in g77 xlf f77 frt pgf77 cf77 fort77 fl32 af77 xlf90 f90 pgf90 pghpf epcf90 gfortran g95 xlf95 f95 fort ifort ifc efc pgfortran pgf95 lf95 ftn
+ for ac_prog in g77 xlf f77 frt pgf77 cf77 fort77 fl32 af77 xlf90 f90 pgf90 pghpf epcf90 gfortran g95 xlf95 f95 fort ifort ifc efc pgfortran pgf95 lf95 ftn nagfor
do
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
@@ -6004,7 +6021,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_ac_ct_F77="$ac_prog"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -6566,7 +6583,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_AR="${ac_tool_prefix}ar"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -6606,7 +6623,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_ac_ct_AR="ar"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -6658,7 +6675,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -6698,7 +6715,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_ac_ct_RANLIB="ranlib"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -6750,7 +6767,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_STRIP="${ac_tool_prefix}strip"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -6790,7 +6807,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_ac_ct_STRIP="strip"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -7103,11 +7120,11 @@ else
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:7106: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:7123: $lt_compile\"" >&5)
(eval "$lt_compile" 2>conftest.err)
ac_status=$?
cat conftest.err >&5
- echo "$as_me:7110: \$? = $ac_status" >&5
+ echo "$as_me:7127: \$? = $ac_status" >&5
if (exit $ac_status) && test -s "$ac_outfile"; then
# The compiler can only warn and ignore the option if not recognized
# So say no if there are warnings other than the usual output.
@@ -7371,11 +7388,11 @@ else
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:7374: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:7391: $lt_compile\"" >&5)
(eval "$lt_compile" 2>conftest.err)
ac_status=$?
cat conftest.err >&5
- echo "$as_me:7378: \$? = $ac_status" >&5
+ echo "$as_me:7395: \$? = $ac_status" >&5
if (exit $ac_status) && test -s "$ac_outfile"; then
# The compiler can only warn and ignore the option if not recognized
# So say no if there are warnings other than the usual output.
@@ -7475,11 +7492,11 @@ else
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:7478: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:7495: $lt_compile\"" >&5)
(eval "$lt_compile" 2>out/conftest.err)
ac_status=$?
cat out/conftest.err >&5
- echo "$as_me:7482: \$? = $ac_status" >&5
+ echo "$as_me:7499: \$? = $ac_status" >&5
if (exit $ac_status) && test -s out/conftest2.$ac_objext
then
# The compiler can only warn and ignore the option if not recognized
@@ -9466,7 +9483,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<EOF
-#line 9469 "configure"
+#line 9486 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@@ -9566,7 +9583,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<EOF
-#line 9569 "configure"
+#line 9586 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@@ -11842,11 +11859,11 @@ else
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:11845: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:11862: $lt_compile\"" >&5)
(eval "$lt_compile" 2>conftest.err)
ac_status=$?
cat conftest.err >&5
- echo "$as_me:11849: \$? = $ac_status" >&5
+ echo "$as_me:11866: \$? = $ac_status" >&5
if (exit $ac_status) && test -s "$ac_outfile"; then
# The compiler can only warn and ignore the option if not recognized
# So say no if there are warnings other than the usual output.
@@ -11946,11 +11963,11 @@ else
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:11949: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:11966: $lt_compile\"" >&5)
(eval "$lt_compile" 2>out/conftest.err)
ac_status=$?
cat out/conftest.err >&5
- echo "$as_me:11953: \$? = $ac_status" >&5
+ echo "$as_me:11970: \$? = $ac_status" >&5
if (exit $ac_status) && test -s out/conftest2.$ac_objext
then
# The compiler can only warn and ignore the option if not recognized
@@ -13534,11 +13551,11 @@ else
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:13537: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:13554: $lt_compile\"" >&5)
(eval "$lt_compile" 2>conftest.err)
ac_status=$?
cat conftest.err >&5
- echo "$as_me:13541: \$? = $ac_status" >&5
+ echo "$as_me:13558: \$? = $ac_status" >&5
if (exit $ac_status) && test -s "$ac_outfile"; then
# The compiler can only warn and ignore the option if not recognized
# So say no if there are warnings other than the usual output.
@@ -13638,11 +13655,11 @@ else
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:13641: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:13658: $lt_compile\"" >&5)
(eval "$lt_compile" 2>out/conftest.err)
ac_status=$?
cat out/conftest.err >&5
- echo "$as_me:13645: \$? = $ac_status" >&5
+ echo "$as_me:13662: \$? = $ac_status" >&5
if (exit $ac_status) && test -s out/conftest2.$ac_objext
then
# The compiler can only warn and ignore the option if not recognized
@@ -15812,11 +15829,11 @@ else
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:15815: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:15832: $lt_compile\"" >&5)
(eval "$lt_compile" 2>conftest.err)
ac_status=$?
cat conftest.err >&5
- echo "$as_me:15819: \$? = $ac_status" >&5
+ echo "$as_me:15836: \$? = $ac_status" >&5
if (exit $ac_status) && test -s "$ac_outfile"; then
# The compiler can only warn and ignore the option if not recognized
# So say no if there are warnings other than the usual output.
@@ -16080,11 +16097,11 @@ else
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:16083: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:16100: $lt_compile\"" >&5)
(eval "$lt_compile" 2>conftest.err)
ac_status=$?
cat conftest.err >&5
- echo "$as_me:16087: \$? = $ac_status" >&5
+ echo "$as_me:16104: \$? = $ac_status" >&5
if (exit $ac_status) && test -s "$ac_outfile"; then
# The compiler can only warn and ignore the option if not recognized
# So say no if there are warnings other than the usual output.
@@ -16184,11 +16201,11 @@ else
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:16187: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:16204: $lt_compile\"" >&5)
(eval "$lt_compile" 2>out/conftest.err)
ac_status=$?
cat out/conftest.err >&5
- echo "$as_me:16191: \$? = $ac_status" >&5
+ echo "$as_me:16208: \$? = $ac_status" >&5
if (exit $ac_status) && test -s out/conftest2.$ac_objext
then
# The compiler can only warn and ignore the option if not recognized
@@ -18871,7 +18888,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -18915,7 +18932,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_ac_ct_CXX="$ac_prog"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -19410,7 +19427,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_path_DOXYGEN="$as_dir/$ac_word$ac_exec_ext"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -19457,7 +19474,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_path_DOT="$as_dir/$ac_word$ac_exec_ext"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -19914,7 +19931,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -19954,7 +19971,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_ac_ct_RANLIB="ranlib"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -20044,7 +20061,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_IODBC_CONFIG="yes"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -20884,16 +20901,16 @@ if (echo >conf$$.file) 2>/dev/null; then
# ... but there are two gotchas:
# 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
# 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
- # In both cases, we have to default to `cp -p'.
+ # In both cases, we have to default to `cp -pR'.
ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
- as_ln_s='cp -p'
+ as_ln_s='cp -pR'
elif ln conf$$.file conf$$ 2>/dev/null; then
as_ln_s=ln
else
- as_ln_s='cp -p'
+ as_ln_s='cp -pR'
fi
else
- as_ln_s='cp -p'
+ as_ln_s='cp -pR'
fi
rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
rmdir conf$$.dir 2>/dev/null
@@ -20953,28 +20970,16 @@ else
as_mkdir_p=false
fi
-if test -x / >/dev/null 2>&1; then
- as_test_x='test -x'
-else
- if ls -dL / >/dev/null 2>&1; then
- as_ls_L_option=L
- else
- as_ls_L_option=
- fi
- as_test_x='
- eval sh -c '\''
- if test -d "$1"; then
- test -d "$1/.";
- else
- case $1 in #(
- -*)set "./$1";;
- esac;
- case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
- ???[sx]*):;;*)false;;esac;fi
- '\'' sh
- '
-fi
-as_executable_p=$as_test_x
+
+# as_fn_executable_p FILE
+# -----------------------
+# Test if FILE is an executable regular file.
+as_fn_executable_p ()
+{
+ test -f "$1" && test -x "$1"
+} # as_fn_executable_p
+as_test_x='test -x'
+as_executable_p=as_fn_executable_p
# Sed expression to map a string onto a valid CPP name.
as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
@@ -20996,7 +21001,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
# values after options handling.
ac_log="
This file was extended by $as_me, which was
-generated by GNU Autoconf 2.68. Invocation command line was
+generated by GNU Autoconf 2.69. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
CONFIG_HEADERS = $CONFIG_HEADERS
@@ -21053,10 +21058,10 @@ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
ac_cs_version="\\
config.status
-configured by $0, generated by GNU Autoconf 2.68,
+configured by $0, generated by GNU Autoconf 2.69,
with options \\"\$ac_cs_config\\"
-Copyright (C) 2010 Free Software Foundation, Inc.
+Copyright (C) 2012 Free Software Foundation, Inc.
This config.status script is free software; the Free Software Foundation
gives unlimited permission to copy, distribute and modify it."
@@ -21135,7 +21140,7 @@ fi
_ACEOF
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
if \$ac_cs_recheck; then
- set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
+ set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
shift
\$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
CONFIG_SHELL='$SHELL'
diff --git a/src/3rd_party/apache-log4cxx-cmake/CMakeLists.txt b/src/3rd_party/apache-log4cxx-cmake/CMakeLists.txt
index a3dd48d1f7..bac9aa6df4 100644
--- a/src/3rd_party/apache-log4cxx-cmake/CMakeLists.txt
+++ b/src/3rd_party/apache-log4cxx-cmake/CMakeLists.txt
@@ -65,18 +65,7 @@ add_custom_command(OUTPUT ${LOG4CXX_BUILD_DIRECTORY}/Makefile
)
add_custom_target(liblog4cxx ALL make
- COMMAND /bin/bash -c \"
- cd ${CMAKE_CURRENT_SOURCE_DIR}\;
- git log . 1>/dev/null 2>&1\;
- if [ \\$$? == 0 ]; then
- grep \\".commit_hash\\" ${LOG4CXX_LIBS_DIRECTORY}/liblog4cxx.so 1>/dev/null 2>&1\;
- if [ ! \\\$$? == 0 ]\; then
- cd ${CMAKE_CURRENT_SOURCE_DIR} &&
- git log --pretty=\\"format:%H\\" -1 ${LOG4CXX_SOURCE_DIRECTORY} > /tmp/commit_hash 2>/dev/null &&
- echo \\"Adding .commit_hash section\\" &&
- ${objcopy} --add-section .commit_hash=/tmp/commit_hash ${LOG4CXX_LIBS_DIRECTORY}/liblog4cxx.so ${LOG4CXX_LIBS_DIRECTORY}/liblog4cxx.so 1>/dev/null 2>&1\;
- fi;
- fi\"
+ COMMAND /bin/bash -c \"if [ ${is_git_folder} == 0 ]; then grep \\".commit_hash\\" ${LOG4CXX_LIBS_DIRECTORY}/liblog4cxx.so 1>/dev/null 2>&1\; if [ ! \\\$$? == 0 ]\; then cd ${CMAKE_CURRENT_SOURCE_DIR} && git log --pretty=\\"format:%H\\" -1 ${LOG4CXX_SOURCE_DIRECTORY} > /tmp/commit_hash 2>/dev/null && echo \\"Adding .commit_hash section\\" && ${objcopy} --add-section .commit_hash=/tmp/commit_hash ${LOG4CXX_LIBS_DIRECTORY}/liblog4cxx.so ${LOG4CXX_LIBS_DIRECTORY}/liblog4cxx.so 1>/dev/null 2>&1\; fi; fi\"
DEPENDS ${LOG4CXX_BUILD_DIRECTORY}/Makefile
WORKING_DIRECTORY ${LOG4CXX_BUILD_DIRECTORY}
)
diff --git a/src/3rd_party/apr-1.5.0/include/apr.h b/src/3rd_party/apr-1.5.0/include/apr.h
index 3b0e3d0e52..acf69814a6 100644
--- a/src/3rd_party/apr-1.5.0/include/apr.h
+++ b/src/3rd_party/apr-1.5.0/include/apr.h
@@ -80,7 +80,7 @@
#define APR_HAVE_LIMITS_H 1
#define APR_HAVE_NETDB_H 1
#define APR_HAVE_NETINET_IN_H 1
-#define APR_HAVE_NETINET_SCTP_H 0
+#define APR_HAVE_NETINET_SCTP_H 1
#define APR_HAVE_NETINET_SCTP_UIO_H 0
#define APR_HAVE_NETINET_TCP_H 1
#define APR_HAVE_PROCESS_H 0
@@ -260,7 +260,7 @@ extern "C" {
#define APR_HAVE_MEMCHR 1
#define APR_HAVE_STRUCT_RLIMIT 1
#define APR_HAVE_UNION_SEMUN 0
-#define APR_HAVE_SCTP 0
+#define APR_HAVE_SCTP 1
#define APR_HAVE_IOVEC 1
/* APR Feature Macros */
@@ -276,7 +276,7 @@ extern "C" {
#define APR_HAS_UNICODE_FS 0
#define APR_HAS_PROC_INVOKED 0
#define APR_HAS_USER 1
-#define APR_HAS_LARGE_FILES 0
+#define APR_HAS_LARGE_FILES 1
#define APR_HAS_XTHREAD_FILES 0
#define APR_HAS_OS_UUID 1
@@ -314,7 +314,7 @@ typedef unsigned short apr_uint16_t;
typedef int apr_int32_t;
typedef unsigned int apr_uint32_t;
-#define APR_SIZEOF_VOIDP 8
+#define APR_SIZEOF_VOIDP 4
/*
* Darwin 10's default compiler (gcc42) builds for both 64 and
@@ -349,15 +349,15 @@ typedef unsigned int apr_uint32_t;
#define UINT64_C(v) (v ## ULL)
#endif
#else
- typedef long apr_int64_t;
- typedef unsigned long apr_uint64_t;
+ typedef long long apr_int64_t;
+ typedef unsigned long long apr_uint64_t;
#endif
typedef size_t apr_size_t;
typedef ssize_t apr_ssize_t;
-typedef off_t apr_off_t;
+typedef off64_t apr_off_t;
typedef socklen_t apr_socklen_t;
-typedef ino_t apr_ino_t;
+typedef unsigned long apr_ino_t;
#if APR_SIZEOF_VOIDP == 8
typedef apr_uint64_t apr_uintptr_t;
@@ -530,25 +530,25 @@ typedef apr_uint32_t apr_uintptr_t;
* configure.in.
*/
-#define APR_SSIZE_T_FMT "ld"
+#define APR_SSIZE_T_FMT "d"
/* And APR_SIZE_T_FMT */
-#define APR_SIZE_T_FMT "lu"
+#define APR_SIZE_T_FMT "u"
/* And APR_OFF_T_FMT */
-#define APR_OFF_T_FMT "ld"
+#define APR_OFF_T_FMT APR_INT64_T_FMT
/* And APR_PID_T_FMT */
#define APR_PID_T_FMT "d"
/* And APR_INT64_T_FMT */
-#define APR_INT64_T_FMT "ld"
+#define APR_INT64_T_FMT "lld"
/* And APR_UINT64_T_FMT */
-#define APR_UINT64_T_FMT "lu"
+#define APR_UINT64_T_FMT "llu"
/* And APR_UINT64_T_HEX_FMT */
-#define APR_UINT64_T_HEX_FMT "lx"
+#define APR_UINT64_T_HEX_FMT "llx"
/*
* Ensure we work with universal binaries on Darwin
diff --git a/src/3rd_party/dbus-cmake/CMakeLists.txt b/src/3rd_party/dbus-cmake/CMakeLists.txt
index 141335414c..baa23adc5f 100644
--- a/src/3rd_party/dbus-cmake/CMakeLists.txt
+++ b/src/3rd_party/dbus-cmake/CMakeLists.txt
@@ -63,18 +63,7 @@ add_custom_command(OUTPUT ${DBUS_BUILD_DIRECTORY}/Makefile
)
add_custom_target(dbus ALL make
- COMMAND /bin/bash -c \"
- cd ${CMAKE_CURRENT_SOURCE_DIR}\;
- git log . 1>/dev/null 2>&1\;
- if [ \\$$? == 0 ]; then
- grep \\".commit_hash\\" ${DBUS_BUILD_DIRECTORY}/dbus/.libs/libdbus-1.so 1>/dev/null 2>&1\;
- if [ ! \\\$$? == 0 ]\; then
- cd ${CMAKE_CURRENT_SOURCE_DIR} &&
- git log --pretty=\\"format:%H\\" -1 ${DBUS_SOURCE_DIRECTORY} > /tmp/commit_hash 2>/dev/null &&
- echo \\"Adding .commit_hash section\\" &&
- ${objcopy} --add-section .commit_hash=/tmp/commit_hash ${DBUS_BUILD_DIRECTORY}/dbus/.libs/libdbus-1.so ${DBUS_BUILD_DIRECTORY}/dbus/.libs/libdbus-1.so 1>/dev/null 2>&1\;
- fi;
- fi\"
+ COMMAND /bin/bash -c \"grep \\".commit_hash\\" ${DBUS_BUILD_DIRECTORY}/dbus/.libs/libdbus-1.so 1>/dev/null 2>&1\; if [ ! \\\$$? == 0 ]\; then cd ${CMAKE_CURRENT_SOURCE_DIR} && git log --pretty=\\"format:%H\\" -1 ${DBUS_SOURCE_DIRECTORY} > /tmp/commit_hash 2>/dev/null && echo \\"Adding .commit_hash section\\" && ${objcopy} --add-section .commit_hash=/tmp/commit_hash ${DBUS_BUILD_DIRECTORY}/dbus/.libs/libdbus-1.so ${DBUS_BUILD_DIRECTORY}/dbus/.libs/libdbus-1.so 1>/dev/null 2>&1\; fi\"
DEPENDS ${DBUS_BUILD_DIRECTORY}/Makefile
WORKING_DIRECTORY ${DBUS_BUILD_DIRECTORY}
)
diff --git a/src/appMain/CMakeLists.txt b/src/appMain/CMakeLists.txt
index c322aa0025..7e23cdc6a0 100644
--- a/src/appMain/CMakeLists.txt
+++ b/src/appMain/CMakeLists.txt
@@ -182,7 +182,6 @@ include_directories (
./main_test.cc
${CMAKE_SOURCE_DIR}/src/components/utils/test/date_time_test.cc
${CMAKE_SOURCE_DIR}/src/components/utils/test/file_system_test.cc
- ${CMAKE_SOURCE_DIR}/src/components/utils/test/messagemeter_test.cc
${CMAKE_SOURCE_DIR}/src/components/media_manager/test/media_adapter_impl_test.cc
${AM_TEST_DIR}/command_impl_test.cc
)
diff --git a/src/appMain/life_cycle.cc b/src/appMain/life_cycle.cc
index 912abb0356..8d4926510b 100644
--- a/src/appMain/life_cycle.cc
+++ b/src/appMain/life_cycle.cc
@@ -40,9 +40,7 @@
#include "security_manager/crypto_manager_impl.h"
#endif // ENABLE_SECURITY
-#ifdef ENABLE_LOG
-#include "utils/log_message_loop_thread.h"
-#endif
+#include "utils/threads/thread_manager.h"
using threads::Thread;
@@ -53,7 +51,7 @@ CREATE_LOGGERPTR_GLOBAL(logger_, "appMain")
namespace {
void NameMessageBrokerThread(const System::Thread& thread,
const std::string& name) {
- Thread::SetNameForId(thread.GetId(), name);
+ Thread::SetNameForId(Thread::Id(thread.GetId()), name);
}
} // namespace
@@ -94,9 +92,7 @@ bool LifeCycle::StartComponents() {
DCHECK(transport_manager_ != NULL);
protocol_handler_ =
- new protocol_handler::ProtocolHandlerImpl(transport_manager_,
- profile::Profile::instance()->message_frequency_time(),
- profile::Profile::instance()->message_frequency_count());
+ new protocol_handler::ProtocolHandlerImpl(transport_manager_);
DCHECK(protocol_handler_ != NULL);
connection_handler_ =
@@ -340,35 +336,27 @@ bool LifeCycle::InitMessageSystem() {
#endif // MQUEUE_HMIADAPTER
namespace {
-
void sig_handler(int sig) {
- // Do nothing
- }
-
- void agony(int sig) {
-// these actions are not signal safe
-// (in case logger is on)
-// but they cannot be moved to a separate thread
-// because the application most probably will crash as soon as this handler returns
-//
-// the application is anyway about to crash
- LOG4CXX_FATAL(logger_, "Stopping application due to segmentation fault");
-#ifdef ENABLE_LOG
- logger::LogMessageLoopThread::destroy();
-#endif
+ MessageQueue<threads::ThreadManager::ThreadDesc>& threads = ::threads::ThreadManager::instance()->threads_to_terminate;
+ threads.Shutdown();
}
-
-} // namespace
+}
void LifeCycle::Run() {
- // First, register signal handlers
+ // First, register signal handler
::utils::SubscribeToTerminateSignal(&sig_handler);
- ::utils::SubscribeToFaultSignal(&agony);
- // Now wait for any signal
- pause();
+ // Then run main loop until signal caught
+ MessageQueue<threads::ThreadManager::ThreadDesc>& threads = ::threads::ThreadManager::instance()->threads_to_terminate;
+ while(!threads.IsShuttingDown()) {
+ while (!threads.empty()) {
+ ::threads::ThreadManager::ThreadDesc desc = threads.pop();
+ pthread_join(desc.handle, NULL);
+ delete desc.delegate;
+ }
+ threads.wait();
+ }
}
-
void LifeCycle::StopComponents() {
if (!components_started_) {
LOG4CXX_TRACE(logger_, "exit");
@@ -380,14 +368,11 @@ void LifeCycle::StopComponents() {
protocol_handler_->RemoveProtocolObserver(app_manager_);
app_manager_->Stop();
- LOG4CXX_INFO(logger_, "Stopping Protocol Handler");
+ LOG4CXX_INFO(logger_, "Destroying Media Manager");
protocol_handler_->RemoveProtocolObserver(media_manager_);
#ifdef ENABLE_SECURITY
protocol_handler_->RemoveProtocolObserver(security_manager_);
#endif // ENABLE_SECURITY
- protocol_handler_->Stop();
-
- LOG4CXX_INFO(logger_, "Destroying Media Manager");
media_manager_->SetProtocolHandler(NULL);
media_manager::MediaManagerImpl::destroy();
@@ -441,9 +426,6 @@ void LifeCycle::StopComponents() {
mb_adapter_->unregisterController();
mb_adapter_->Close();
mb_adapter_->exitReceivingThread();
- if (mb_adapter_thread_) {
- mb_adapter_thread_->Join();
- }
delete mb_adapter_;
}
if (mb_adapter_thread_) {
diff --git a/src/appMain/life_cycle.h b/src/appMain/life_cycle.h
index d3554710a7..3494575680 100644
--- a/src/appMain/life_cycle.h
+++ b/src/appMain/life_cycle.h
@@ -86,7 +86,6 @@ class LifeCycle : public utils::Singleton<LifeCycle> {
void Run();
void StopComponents();
-
private:
LifeCycle();
transport_manager::TransportManager* transport_manager_;
diff --git a/src/appMain/main.cc b/src/appMain/main.cc
index 27e0eef2a3..331b0397ee 100644
--- a/src/appMain/main.cc
+++ b/src/appMain/main.cc
@@ -176,7 +176,10 @@ int32_t main(int32_t argc, char** argv) {
#ifdef __QNX__
if (profile::Profile::instance()->enable_policy()) {
if (!utils::System("./init_policy.sh").Execute(true)) {
- LOG4CXX_FATAL(logger_, "Failed to init policy database");
+ LOG4CXX_ERROR(logger_, "Failed initialization of policy database");
+#ifdef ENABLE_LOG
+ logger::LogMessageLoopThread::destroy();
+#endif
DEINIT_LOGGER();
exit(EXIT_FAILURE);
}
@@ -184,8 +187,10 @@ int32_t main(int32_t argc, char** argv) {
#endif // __QNX__
if (!main_namespace::LifeCycle::instance()->StartComponents()) {
- LOG4CXX_FATAL(logger_, "Failed to start components");
main_namespace::LifeCycle::instance()->StopComponents();
+#ifdef ENABLE_LOG
+ logger::LogMessageLoopThread::destroy();
+#endif
DEINIT_LOGGER();
exit(EXIT_FAILURE);
}
@@ -194,7 +199,7 @@ int32_t main(int32_t argc, char** argv) {
// Third-Party components initialization.
if (!main_namespace::LifeCycle::instance()->InitMessageSystem()) {
- LOG4CXX_FATAL(logger_, "Failed to init message system");
+ main_namespace::LifeCycle::instance()->StopComponents();
DEINIT_LOGGER();
exit(EXIT_FAILURE);
}
@@ -206,8 +211,10 @@ int32_t main(int32_t argc, char** argv) {
#ifndef NO_HMI
if (!InitHmi()) {
- LOG4CXX_FATAL(logger_, "Failed to init HMI");
main_namespace::LifeCycle::instance()->StopComponents();
+#ifdef ENABLE_LOG
+ logger::LogMessageLoopThread::destroy();
+#endif
DEINIT_LOGGER();
exit(EXIT_FAILURE);
}
@@ -223,6 +230,9 @@ int32_t main(int32_t argc, char** argv) {
main_namespace::LifeCycle::instance()->StopComponents();
LOG4CXX_INFO(logger_, "Application successfully stopped");
+#ifdef ENABLE_LOG
+ logger::LogMessageLoopThread::destroy();
+#endif
DEINIT_LOGGER();
return EXIT_SUCCESS;
diff --git a/src/appMain/sdl_preloaded_pt.json b/src/appMain/sdl_preloaded_pt.json
index 39697d0c74..52b7684b06 100644
--- a/src/appMain/sdl_preloaded_pt.json
+++ b/src/appMain/sdl_preloaded_pt.json
@@ -14,15 +14,11 @@
"endpoints": {
"0x07": {
"default": ["http://policies.telematics.ford.com/api/policies"]
- },
- "0x04": {
- "default": ["http://ivsu.software.ford.com/api/getsoftwareupdates"]
}
},
"notifications_per_minute_by_priority": {
"EMERGENCY": 60,
"NAVIGATION": 15,
- "VOICECOM": 20,
"COMMUNICATION": 6,
"NORMAL": 4,
"NONE": 0
@@ -112,13 +108,11 @@
},
"OnButtonEvent": {
"hmi_levels": ["FULL",
- "LIMITED",
- "BACKGROUND"]
+ "LIMITED"]
},
"OnButtonPress": {
"hmi_levels": ["FULL",
- "LIMITED",
- "BACKGROUND"]
+ "LIMITED"]
},
"OnCommand": {
"hmi_levels": ["BACKGROUND",
@@ -189,8 +183,7 @@
"ResetGlobalProperties": {
"hmi_levels": ["BACKGROUND",
"FULL",
- "LIMITED",
- "NONE"]
+ "LIMITED"]
},
"ScrollableMessage": {
"hmi_levels": ["FULL"]
@@ -210,13 +203,11 @@
"SetGlobalProperties": {
"hmi_levels": ["BACKGROUND",
"FULL",
- "LIMITED",
- "NONE"]
+ "LIMITED"]
},
"SetMediaClockTimer": {
"hmi_levels": ["FULL",
- "LIMITED",
- "BACKGROUND"]
+ "LIMITED"]
},
"Show": {
"hmi_levels": ["BACKGROUND",
@@ -438,39 +429,6 @@
}
}
},
- "PropriataryData-2": {
- "rpcs": {
- "DiagnosticMessage": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED"]
- },
- "GetDTCs": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED"]
- },
- "ReadDID": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED"]
- }
- }
- },
- "ProprietaryData-3": {
- "rpcs": {
- "GetDTCs": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED"]
- },
- "ReadDID": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED"]
- }
- }
- },
"Emergency-1": {
"rpcs": {
"GetVehicleData": {
@@ -530,246 +488,6 @@
}
}
},
- "Base-6": {
- "rpcs": {
- "AddCommand": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED"]
- },
- "AddSubMenu": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED"]
- },
- "Alert": {
- "hmi_levels": ["FULL",
- "LIMITED"]
- },
- "ChangeRegistration": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"]
- },
- "CreateInteractionChoiceSet": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED"]
- },
- "DeleteCommand": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED"]
- },
- "DeleteFile": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"]
- },
- "DeleteInteractionChoiceSet": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED"]
- },
- "DeleteSubMenu": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED"]
- },
- "EncodedSyncPData": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"]
- },
- "EndAudioPassThru": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED"]
- },
- "GenericResponse": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED"]
- },
- "ListFiles": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"]
- },
- "OnAppInterfaceUnregistered": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"]
- },
- "OnAudioPassThru": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED"]
- },
- "OnButtonEvent": {
- "hmi_levels": ["FULL",
- "LIMITED"]
- },
- "OnButtonPress": {
- "hmi_levels": ["FULL",
- "LIMITED"]
- },
- "OnCommand": {
- "hmi_levels": ["FULL",
- "LIMITED"]
- },
- "OnDriverDistraction": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED"]
- },
- "OnEncodedSyncPData": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"]
- },
- "OnHMIStatus": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"]
- },
- "OnLanguageChange": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"]
- },
- "OnPermissionsChange": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"]
- },
- "OnSyncPData": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"]
- },
- "OnTBTClientState": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED"]
- },
- "PerformAudioPassThru": {
- "hmi_levels": ["FULL",
- "LIMITED"]
- },
- "PerformInteraction": {
- "hmi_levels": ["FULL",
- "LIMITED"]
- },
- "PutFile": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"]
- },
- "RegisterAppInterface": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"]
- },
- "ResetGlobalProperties": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED"]
- },
- "ScrollableMessage": {
- "hmi_levels": ["FULL"]
- },
- "SetAppIcon": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"]
- },
- "SetDisplayLayout": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"]
- },
- "SetGlobalProperties": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED"]
- },
- "SetMediaClockTimer": {
- "hmi_levels": ["FULL"]
- },
- "Show": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED"]
- },
- "Slider": {
- "hmi_levels": ["FULL"]
- },
- "Speak": {
- "hmi_levels": ["FULL",
- "LIMITED"]
- },
- "SubscribeButton": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED"]
- },
- "SyncPData": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"]
- },
- "UnregisterAppInterface": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"]
- },
- "UnsubscribeButton": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED"]
- }
- }
- },
- "OnKeyboardInputOnlyGroup": {
- "rpcs": {
- "OnKeyboardInput": {
- "hmi_levels": ["FULL"]
- }
- }
- },
- "OnTouchEventOnlyGroup": {
- "rpcs": {
- "OnTouchEvent": {
- "hmi_levels": ["FULL"]
- }
- }
- },
- "DiagnosticMessageOnly": {
- "rpcs": {
- "DiagnosticMessage": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED"]
- }
- }
- },
"DataConsent-2": {
"user_consent_prompt": "DataConsent",
"rpcs": null
@@ -854,18 +572,6 @@
"LIMITED",
"NONE"]
},
- "ResetGlobalProperties": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"]
- },
- "SetGlobalProperties": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"]
- },
"SetAppIcon": {
"hmi_levels": ["BACKGROUND",
"FULL",
@@ -891,32 +597,10 @@
"NONE"]
}
}
- },
- "SendLocation": {
- "rpcs": {
- "SendLocation": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED"]
- }
- }
- },
- "BackgroundAPT": {
- "rpcs": {
- "EndAudioPassThru": {
- "hmi_levels": ["BACKGROUND"]
- },
- "OnAudioPassThru": {
- "hmi_levels": ["BACKGROUND"]
- },
- "PerformAudioPassThru": {
- "hmi_levels": ["BACKGROUND"]
- }
- }
}
},
"consumer_friendly_messages": {
- "version": "001.001.021",
+ "version": "001.001.019",
"messages": {
"AppPermissions": {
"languages": {
@@ -961,8 +645,7 @@
"es-mx": {
"tts": "%appName% solicita el uso de la siguiente información y permisos del vehículo: %functionalGroupLabels%. Si presiona Sí, acepta que %vehicleMake% no se hará responsable por los daños o pérdidas de privacidad relacionados con el uso que %appName% haga de sus datos. Presione Sí para permitir y No para denegar.",
"line1": "¿Otorgar permiso(s)",
- "line2": "solicitado(s)?",
- "textBody": "%appName% solicita el uso de la siguiente información y permisos del vehículo: %functionalGroupLabels%. \n\nSi presiona Sí, acepta que %vehicleMake% no se hará responsable por los daños o pérdidas de privacidad relacionados con el uso que %appName% haga de sus datos. Presione Sí para permitir y No para denegar. Puede cambiar estos permisos y consultar descripciones detalladas en el menú de configuración de las aplicaciones móviles."
+ "line2": "solicitado(s)?"
},
"fr-ca": {
"tts": "%appName% demande d’utiliser les informations du véhicule et les permissions suivantes : %functionalGroupLabels%. Si vous appuyez sur Oui, vous acceptez que %vehicleMake% ne sera pas responsable des dommages ou des pertes de confidentialité reliées à l’utilisation de vos données par %appName%. Veuillez appuyer sur Oui pour autoriser ou sur Non pour refuser.",
@@ -1190,8 +873,7 @@
},
"es-mx": {
"tts": "Esta versión de %appName% no tiene autorización y no funcionará con SYNC.",
- "line1": "no autorizada",
- "textBody": "Esta versión de %appName% no tiene autorización y no funcionará con SYNC."
+ "line1": "no autorizada"
},
"fr-ca": {
"tts": "Cette version de %appName% n’est pas autorisée et ne fonctionnera pas avec SYNC.",
@@ -1279,8 +961,7 @@
},
"es-mx": {
"tts": "Esta versión de %appName% no es compatible con SYNC.",
- "line1": "no compatible",
- "textBody": "Esta versión de %appName% no es compatible con SYNC."
+ "line1": "no compatible"
},
"fr-ca": {
"tts": "Cette version de %appName% n’est pas prise en charge par SYNC.",
@@ -1336,27 +1017,27 @@
"DataConsent": {
"languages": {
"en-gb": {
- "textBody": "Would you like to enable Mobile Apps on SYNC? To use Mobile Apps with SYNC, SYNC will communicate with Ford at least once per month using your mobile device’s data plan. Standard rates may apply. SYNC will send your VIN and SYNC module number to Ford U.S. \r\n\r\nUpdates are about the size of an email, and the occurrence of updates depends on your vehicle usage and when a new app is found on your device. To turn on or off, visit the SYNC Settings menu. See your Owner Guide for more information."
+ "textBody": "Would you like to enable Mobile Apps on SYNC? To use Mobile Apps with SYNC, SYNC will communicate with Ford at least once per month using your mobile device’s data plan. Standard rates may apply. SYNC will send your VIN and SYNC module number to Ford U.S. Updates are about the size of an email, and the occurrence of updates depends on your vehicle usage and when a new app is found on your device. To turn on or off, visit the SYNC Settings menu. See your Owner Guide for more information."
},
"en-us": {
"line1": "Enable Mobile Apps",
"line2": "on SYNC? (Uses Data)",
- "textBody": "Would you like to enable Mobile Apps on SYNC?\r\n\r\nTo use Mobile Apps with SYNC, SYNC will communicate with Ford at least once per month using your mobile device’s data plan. Standard rates may apply. SYNC will send your VIN and SYNC module number to Ford U.S.\r\n\r\nUpdates are about the size of an email, and the occurrence of updates depends on your vehicle usage and when a new app is found on your device. To turn on or off, visit the SYNC Settings menu. See your Owner Guide for more information."
+ "textBody": "Would you like to enable Mobile Apps on SYNC?\n\nTo use Mobile Apps with SYNC, SYNC will communicate with Ford at least once per month using your mobile device’s data plan. Standard rates may apply. SYNC will send your VIN and SYNC module number to Ford U.S.\n\nUpdates are about the size of an email, and the occurrence of updates depends on your vehicle usage and when a new app is found on your device. To turn on or off, visit the SYNC Settings menu. See your Owner Guide for more information."
},
- "es-mx": {
- "textBody": "Para usar aplicaciones móviles con SYNC, este debe comunicarse con Ford al menos una vez al mes a través del plan de datos de su dispositivo móvil. Pueden aplicar tarifas normales. SYNC enviará su VIN y el número de módulo de SYNC a Ford de Estados Unidos de América. \n\nLas actualizaciones tienen el tamaño aproximado de un mensaje de correo electrónico, y la frecuencia de las actualizaciones depende del uso de su vehículo y de si se encuentran nuevas aplicaciones en su dispositivo. Para obtener más información, consulte la Guía del propietario. \n\nPresione Sí para permitir y No para denegar."
+ "es-en": {
+ "textBody": "Para usar aplicaciones móviles con SYNC, este debe comunicarse con Ford al menos una vez al mes a través del plan de datos de su dispositivo móvil. Pueden aplicar tarifas normales. SYNC enviará su VIN y el número de módulo de SYNC a Ford de Estados Unidos de América. Las actualizaciones tienen el tamaño aproximado de un mensaje de correo electrónico, y la frecuencia de las actualizaciones depende del uso de su vehículo y de si se encuentran nuevas aplicaciones en su dispositivo. Para obtener más información, consulte la Guía del propietario. /r Presione Sí para permitir y No para denegar."
},
"fr-ca": {
- "textBody": "Pour utiliser AppLink, SYNC devra communiquer avec Ford au moins une fois par mois en utilisant le forfait de données de votre appareil mobile. Les tarifs réguliers peuvent s’appliquer. SYNC enverra votre NIV et le numéro de votre module SYNC à Ford États-Unis. Les mises à jour ont la taille d’un courriel et la fréquence des mises à jour dépend de l’utilisation de votre véhicule et si une nouvelle application se trouve sur votre appareil. Consultez le Guide de l’utilisateur pour obtenir d’autres renseignements.\r\n\r\nVeuillez appuyer sur Oui pour autoriser ou sur Non pour refuser."
+ "textBody": "Pour utiliser AppLink, SYNC devra communiquer avec Ford au moins une fois par mois en utilisant le forfait de données de votre appareil mobile. Les tarifs réguliers peuvent s’appliquer. SYNC enverra votre NIV et le numéro de votre module SYNC à Ford États-Unis. Les mises à jour ont la taille d’un courriel et la fréquence des mises à jour dépend de l’utilisation de votre véhicule et si une nouvelle application se trouve sur votre appareil. Consultez le Guide de l’utilisateur pour obtenir d’autres renseignements. /r Veuillez appuyer sur Oui pour autoriser ou sur Non pour refuser."
}
}
},
"DataConsentHelp": {
"languages": {
"en-us": {
- "textBody": "By enabling mobile apps, you consent to allowing SYNC to communicate with Ford at least once per month using your mobile device’s data plan. Disabling will stop all data usage, but you will not be able to use mobile apps on SYNC. See your Owner Guide for more information."
+ "textBody": "Updates are about the size of an email, and the occurrence of updates depends on your vehicle usage and when a new app is found on your device. See your Owner Guide for more information."
},
- "es-mx": {
+ "es-en": {
"textBody": "Las actualizaciones tienen el tamaño aproximado de un mensaje de correo electrónico, y la frecuencia de las actualizaciones depende del uso de su vehículo y de si se encuentran nuevas aplicaciones en su dispositivo. Para obtener más información, consulte la Guía del propietario."
},
"fr-ca": {
@@ -1391,7 +1072,7 @@
"tts": "Disabling automatic updates will also disable sync mobile apps. You will not be able to use any mobile apps with SYNC. Please press yes to confirm or no to cancel.",
"line1": "Disable Auto-Updates",
"line2": "and Mobile Apps?",
- "textBody": "If you disable, you will not be able to use any mobile apps with SYNC and your vehicle will stop receiving mobile app permission updates via your device`s data plan. Please press yes to disable mobile apps or no to cancel."
+ "textBody": "Disabling automatic updates will also disable sync mobile apps. You will not be able to use any mobile apps with SYNC. Please press yes to confirm or no to cancel."
},
"es-en": {
"tts": "Si se desactivan las actualizaciones automáticas, también se desactivarán las aplicaciones móviles de SYNC. No podrá usar ninguna aplicación móvil con SYNC. Presione Sí para confirmar o No para cancelar.",
@@ -1407,8 +1088,7 @@
"es-mx": {
"tts": "Si se desactivan las actualizaciones automáticas, también se desactivarán las aplicaciones móviles de SYNC. No podrá usar ninguna aplicación móvil con SYNC. Presione Sí para confirmar o No para cancelar.",
"line1": "¿Deshab. actualiz.",
- "line2": "autom. y aplic. móv.?",
- "textBody": "Si se desactivan las actualizaciones automáticas, también se desactivarán las aplicaciones móviles de SYNC. No podrá usar ninguna aplicación móvil con SYNC. Presione Sí para confirmar o No para cancelar."
+ "line2": "autom. y aplic. móv.?"
},
"fr-ca": {
"tts": "La désactivation des mises à jour automatiques désactivera aussi les applications mobiles SYNC. Vous ne pourrez pas utiliser d’application mobile avec SYNC. Veuillez appuyer sur Oui pour confirmer ou sur Non pour annuler.",
@@ -1508,8 +1188,7 @@
},
"es-mx": {
"tts": "Las aplicaciones pueden acceder a las siguientes características del manejo: Consumo de combustible, MyKey, Estado del cinturón de seguridad.",
- "label": "Características del manejo",
- "textBody": "Las aplicaciones pueden acceder a las siguientes características del manejo: Consumo de combustible, MyKey, Estado del cinturón de seguridad."
+ "label": "Características del manejo"
},
"fr-ca": {
"tts": "Une application peut accéder aux caractéristiques de conduite suivantes: Consommation de carburant, MyKey, État des ceintures de sécurité.",
@@ -1597,8 +1276,7 @@
},
"es-mx": {
"tts": "Las aplicaciones pueden acceder al GPS y a la velocidad del vehículo.",
- "label": "GPS y velocidad",
- "textBody": "Las aplicaciones pueden acceder al GPS y a la velocidad del vehículo."
+ "label": "GPS y velocidad"
},
"fr-ca": {
"tts": "Une application peut accéder au GPS et à la vitesse du véhicule.",
@@ -1686,8 +1364,7 @@
},
"es-mx": {
"tts": "Las aplicaciones pueden enviar notificaciones cuando se ejecutan en segundo plano.",
- "label": "Notificaciones tipo Push",
- "textBody": "Las aplicaciones pueden enviar notificaciones cuando se ejecutan en segundo plano."
+ "label": "Notificaciones tipo Push"
},
"fr-ca": {
"tts": "Une application peut envoyer des avis lorsqu’elle fonctionne en arrière-plan.",
@@ -1766,8 +1443,7 @@
"line1": "Desact. actual."
},
"es-mx": {
- "line1": "Deshab. actual.",
- "textBody": "Deshab. actual."
+ "line1": "Deshab. actual."
},
"fr-ca": {
"line1": "Désactiver MAJ",
@@ -1889,7 +1565,7 @@
},
"en-us": {
"line1": "Request Update",
- "textBody": "Select `Update now` to receive app permissions for your SYNC-enabled mobile apps. This may enable additional functionality depending on the app and your settings. If your phone has a working data connection, an update should complete in less than 1 minute."
+ "textBody": "Select `Update now` to receive app authorization information for your SYNC-enabled mobile apps. This may enable additional functionality depending on the app and your settings. If your phone has a working data connection, an update should complete in less than 1 minute."
},
"es-en": {
"line1": "Solicit. actualiz.",
@@ -1899,8 +1575,7 @@
"line1": "Solicitar actual."
},
"es-mx": {
- "line1": "Solicit. actualiz.",
- "textBody": "Solicit. actualiz."
+ "line1": "Solicit. actualiz."
},
"fr-ca": {
"line1": "Demander MAJ",
@@ -1968,8 +1643,7 @@
"line1": "Actu. necesaria"
},
"es-mx": {
- "line1": "Actualiz. neces.",
- "textBody": "Actualiz. neces."
+ "line1": "Actualiz. neces."
},
"fr-ca": {
"line1": "Màj requise",
@@ -2037,8 +1711,7 @@
"line1": "Actualizando..."
},
"es-mx": {
- "line1": "Actualizando...",
- "textBody": "Actualizando..."
+ "line1": "Actualizando..."
},
"fr-ca": {
"line1": "MAJ en cours...",
@@ -2106,8 +1779,7 @@
"line1": "Actualizada"
},
"es-mx": {
- "line1": "Actualizado",
- "textBody": "Actualizado"
+ "line1": "Actualizado"
},
"fr-ca": {
"line1": "Déjà à jour",
@@ -2183,8 +1855,7 @@
},
"es-mx": {
"tts": "Las aplicaciones pueden acceder a la siguiente información del vehículo: Nivel de combustible, Economía de combustible, RPM del motor, Cuentakilómetros, Número de identificación del vehículo, Temperatura externa, Posición del cambio, Presión de los neumáticos.",
- "label": "Información del vehículo",
- "textBody": "Las aplicaciones pueden acceder a la siguiente información del vehículo: Nivel de combustible, Economía de combustible, RPM del motor, Cuentakilómetros, Número de identificación del vehículo, Temperatura externa, Posición del cambio, Presión de los neumáticos."
+ "label": "Información del vehículo"
},
"fr-ca": {
"tts": "Une application peut accéder aux informations suivantes du véhicule: Niveau de carburant, Économie de carburant, Au régime du moteur, Odomètre, NIV, Température extérieure, Position d’embrayage, Pression des pneus.",
diff --git a/src/appMain/smartDeviceLink.ini b/src/appMain/smartDeviceLink.ini
index 0868a108ee..c30255da40 100644
--- a/src/appMain/smartDeviceLink.ini
+++ b/src/appMain/smartDeviceLink.ini
@@ -40,23 +40,11 @@ HMICapabilities = hmi_capabilities.json
MaxCmdID = 2000000000
; Default request timeout in milliseconds
DefaultTimeout = 10000
-
-# Timeout in seconds for resumption Application HMILevel
-# and resolving conflicts in case if multiple applications initiate resumption
-ApplicationResumingTimeout = 3
-
-# Timeout in seconds for pereodical saving resumption persisten data
-AppSavePersistentDataTimeout = 10 #seconds
AppDirectoryQuota = 104857600
-; Allowed requests amount in HMI level NONE during time scale.
-; If value is 0 check will be skipped
AppHMILevelNoneTimeScaleMaxRequests = 100
AppHMILevelNoneRequestsTimeScale = 10
-; Allowed requests amount during time scale.
-; If value is 0 check will be skipped
AppTimeScaleMaxRequests = 1000
AppRequestsTimeScale = 10
-; Allowed pending requests amount. If value is 0 check will be skipped
PendingRequestsAmount = 5000
HeartBeatTimeout = 7
SupportedDiagModes = 0x01, 0x02, 0x03, 0x05, 0x06, 0x07, 0x09, 0x0A, 0x18, 0x19, 0x22, 0x3E
@@ -67,7 +55,7 @@ ReadDIDRequest = 5, 1
GetVehicleDataRequest = 5, 1
[MEDIA MANAGER]
-; where 3 is a number of retries and 1 is a timeout in seconds for request frequency
+; where 3 is a number of retries and 1 is a timeout in seconds for request frequency
StartStreamRetry = 3, 1
EnableRedecoding = false
VideoStreamConsumer = socket
@@ -141,13 +129,9 @@ ForceProtectedService = Non
ForceUnprotectedService = Non
[Policy]
-EnablePolicy = false
+EnablePolicy = true
PreloadedPT = sdl_preloaded_pt.json
PathToSnapshot = sdl_snapshot.json
-; Number of attempts to open policy DB
-AttemptsToOpenPolicyDB = 5
-; Timeout between attempts during opening DB in milliseconds
-OpenAttemptTimeoutMs = 500
[TransportManager]
TCPAdapterPort = 12345
@@ -163,15 +147,6 @@ IAPSystemConfig = /fs/mp/etc/mm/ipod.cfg
IAP2SystemConfig = /fs/mp/etc/mm/iap2.cfg
IAP2HubConnectAttempts = 3
-[ProtocolHandler]
-; Packet with payload bigger than next value will be marked as a malformed
-; 1488 = 1500 - 12 = TCP MTU - header size
-MaximumPayloadSize = 1488
-; Application shall send less #FrequencyCount messages per #FrequencyTime mSecs
-; Frequency check could be disable by setting FrequencyTime to Zero
-FrequencyCount = 1000
-FrequencyTime = 1000
-
[ApplicationManager]
ApplicationListUpdateTimeout = 2
; Max allowed threads for handling mobile requests. Currently max allowed is 2
diff --git a/src/components/HMI/app/AppViews.js b/src/components/HMI/app/AppViews.js
index ec31c13399..19f1b4879a 100644
--- a/src/components/HMI/app/AppViews.js
+++ b/src/components/HMI/app/AppViews.js
@@ -37,15 +37,9 @@ SDL.AppViews = Em.ContainerView.extend( {
elementId: 'app',
childViews: [
- SDL.HomeView,
SDL.MediaView,
- SDL.NavigationAppView,
SDL.InfoView,
- SDL.PhoneView,
- SDL.ClimateView,
- SDL.NavigationView,
SDL.ControlButtons,
- SDL.SettingsView,
SDL.TurnByTurnView,
SDL.TBTTurnList,
SDL.OptionsView,
@@ -54,12 +48,7 @@ SDL.AppViews = Em.ContainerView.extend( {
SDL.VRHelpListView,
SDL.ScrollableMessage,
SDL.SliderView,
- SDL.StatusClimateView,
- SDL.StatusMediaView,
- SDL.StatusNavigationView,
SDL.StatusInfoView,
- SDL.StatusPhoneView,
- SDL.TopControls,
SDL.BottomControls,
SDL.TTSPopUp,
SDL.AlertPopUp,
diff --git a/src/components/HMI/app/SDLApp.js b/src/components/HMI/app/SDLApp.js
index bbe4644008..c1f40ad588 100644
--- a/src/components/HMI/app/SDLApp.js
+++ b/src/components/HMI/app/SDLApp.js
@@ -48,7 +48,7 @@ SDL = Em.Application.create( {
helpMode: false,
// determine home view {string}
- homeView: 'home',
+ homeView: 'info_view',
/** Set language for localization */
localization: 'eng',
@@ -77,4 +77,4 @@ SDL = Em.Application.create( {
/** container for all views */
SDL.views = SDL.AppViews.create().appendTo('body');
}
-}); \ No newline at end of file
+});
diff --git a/src/components/HMI/app/controller/sdl/AppController.js b/src/components/HMI/app/controller/sdl/AppController.js
index 8f37fa51f0..784e7e8d1c 100644
--- a/src/components/HMI/app/controller/sdl/AppController.js
+++ b/src/components/HMI/app/controller/sdl/AppController.js
@@ -107,10 +107,11 @@ SDL.SDLAppController = Em.Object.create({
*/
VRPerformAction: function (element) {
+ SDL.SDLController.vrInteractionResponse(SDL.SDLModel.resultCode["SUCCESS"], element.commandID);
+
if (SDL.SDLModel.VRActive) {
SDL.SDLModel.toggleProperty('VRActive');
}
- SDL.SDLController.vrInteractionResponse(SDL.SDLModel.resultCode["SUCCESS"], element.commandID);
},
/**
@@ -143,9 +144,6 @@ SDL.SDLAppController = Em.Object.create({
*/
onVRCommand: function (element) {
- if (SDL.SDLModel.VRActive) {
- SDL.SDLModel.toggleProperty('VRActive');
- }
FFW.VR.onCommand(element.commandID, element.appID);
},
diff --git a/src/components/HMI/app/controller/sdl/Controller.js b/src/components/HMI/app/controller/sdl/Controller.js
index a6dc92fc0d..76fbb7e059 100644
--- a/src/components/HMI/app/controller/sdl/Controller.js
+++ b/src/components/HMI/app/controller/sdl/Controller.js
@@ -55,7 +55,7 @@ SDL.SDLController = Em.Object
*/
sysContext: function() {
- if (SDL.SDLModel.VRActive) {
+ if (SDL.VRPopUp.VRActive) {
return 'VRSESSION';
}
if (SDL.AlertPopUp.active) {
@@ -78,7 +78,7 @@ SDL.SDLController = Em.Object
}.property('SDL.OptionsView.active',
'SDL.SliderView.active',
'SDL.SDLModel.AudioPassThruState',
- 'SDL.SDLModel.VRActive',
+ 'SDL.VRPopUp.VRActive',
'SDL.AlertPopUp.active',
'SDL.States.info.nonMedia.active',
'SDL.States.media.sdlmedia.active',
@@ -200,9 +200,7 @@ SDL.SDLController = Em.Object
SDL.VRHelpListView.deactivate();
}
}
- } else if (SDL.VRHelpListView.active) {
- SDL.VRHelpListView.deactivate();
- }
+ }
}.observes('SDL.SDLModel.VRActive', 'SDL.SDLModel.interactionData.vrHelp'),
/**
@@ -416,15 +414,6 @@ SDL.SDLController = Em.Object
FFW.BasicCommunication.ExitAllApplications(state);
},
/**
- * OnAwakeSDL from HMI returns SDL to normal operation
- * after OnExitAllApplications(SUSPEND)
- *
- */
- onAwakeSDLNotificationSend: function() {
- FFW.BasicCommunication.OnAwakeSDL();
- },
-
- /**
* Method to sent notification with selected reason of OnSystemRequest
*
* @param {String}
@@ -469,8 +458,6 @@ SDL.SDLController = Em.Object
if (choiceID && SDL.TTSPopUp.active && FFW.TTS.requestId == null) {
SDL.TTSPopUp.DeactivateTTS();
}
-
- SDL.SDLModel.interactionData.helpPrompt = null;
},
/**
* Method to sent notification for Alert
@@ -601,7 +588,7 @@ SDL.SDLController = Em.Object
deviceName: params.deviceName,
appType: params.appType
}));
-
+/*Uncomment to show useless add command buttons
var exitCommand = {
"id": -10,
"params": {
@@ -614,7 +601,7 @@ SDL.SDLController = Em.Object
}
};
- SDL.SDLController.getApplicationModel(params.appID).addCommand(exitCommand);
+ SDL.SDLController.getApplicationModel(params.appID).addCommand(exitCommand);
exitCommand = {
"id": -10,
@@ -629,6 +616,7 @@ SDL.SDLController = Em.Object
};
SDL.SDLController.getApplicationModel(params.appID).addCommand(exitCommand);
+*/
},
/**
* Unregister application
@@ -653,10 +641,6 @@ SDL.SDLController = Em.Object
if (SDL.SDLModel.stateLimited == appID) {
SDL.SDLModel.set('stateLimited', null);
}
-
- if (SDL.VRHelpListView.active) {
- this.showVRHelpItems();
- }
},
/**
* SDL Driver Distraction ON/OFF switcher
@@ -751,9 +735,6 @@ SDL.SDLController = Em.Object
*/
onActivateSDLApp: function(element) {
- if (SDL.SDLModel.VRActive) {
- SDL.SDLModel.toggleProperty('VRActive');
- }
FFW.BasicCommunication.ActivateApp(element.appID);
},
/**
diff --git a/src/components/HMI/app/controller/sdl/RPCController.js b/src/components/HMI/app/controller/sdl/RPCController.js
index 27dd2ec087..d7ab4b2d01 100644
--- a/src/components/HMI/app/controller/sdl/RPCController.js
+++ b/src/components/HMI/app/controller/sdl/RPCController.js
@@ -72,21 +72,41 @@ SDL.RPCController = Em.Object
capabilitiesCheck: function(key, value) {
if (key == "imageType" && value == "STATIC") {
- SDL.RPCController.capabilityCheckResult = {code: SDL.SDLModel.resultCode['UNSUPPORTED_RESOURCE'], type: value};
+ SDL.RPCController.capabilityCheckResult = 'UNSUPPORTED_RESOURCE';
}
if (key == "type" && value == "PRE_RECORDED") {
- SDL.RPCController.capabilityCheckResult = {code: SDL.SDLModel.resultCode['UNSUPPORTED_RESOURCE'], type: value};
+ SDL.RPCController.capabilityCheckResult = 'UNSUPPORTED_RESOURCE';
}
if (key == "type" && value == "SAPI_PHONEMES") {
- SDL.RPCController.capabilityCheckResult = {code: SDL.SDLModel.resultCode['UNSUPPORTED_RESOURCE'], type: value};
+ SDL.RPCController.capabilityCheckResult = 'UNSUPPORTED_RESOURCE';
}
if (key == "type" && value == "LHPLUS_PHONEMES") {
- SDL.RPCController.capabilityCheckResult = {code: SDL.SDLModel.resultCode['UNSUPPORTED_RESOURCE'], type: value};
+ SDL.RPCController.capabilityCheckResult = 'UNSUPPORTED_RESOURCE';
}
if (key == "type" && value == "SILENCE") {
- SDL.RPCController.capabilityCheckResult = {code: SDL.SDLModel.resultCode['UNSUPPORTED_RESOURCE'], type: value};
+ SDL.RPCController.capabilityCheckResult = 'UNSUPPORTED_RESOURCE';
}
- return value;
+ },
+
+ /**
+ * Method to check supported image type in request
+ *
+ * @param {Object}
+ * array
+ */
+ checkImagesArray: function(array) {
+
+ var error = false;
+ if (array instanceof Array) {
+ for ( var i = 0; i < array.length; i++) {
+ if (array[i].image &&
+ ((array[i].image.imageType !== "DYNAMIC") &&
+ (array[i].image.imageType !== "STATIC"))) {
+
+ }
+ }
+ }
+ return error;
},
/**
@@ -1073,6 +1093,17 @@ SDL.RPCController = Em.Object
return this.resultStruct;
}
+ if ("softButtons" in params) {
+ if (SDL.RPCController
+ .checkImagesArray(params.softButtons)) {
+ this.resultStruct = {
+ "resultCode": SDL.SDLModel.resultCode["INVALID_DATA"],
+ "resultMessage": "Unsupported image type!"
+ };
+
+ return this.resultStruct;
+ }
+ }
if ("turnIcon" in params
&& ((params.turnIcon.imageType !== "DYNAMIC") && (params.turnIcon.imageType !== "STATIC"))) {
this.resultStruct = {
@@ -1152,6 +1183,17 @@ SDL.RPCController = Em.Object
return this.resultStruct;
}
+ if ("softButtons" in params) {
+ if (SDL.RPCController
+ .checkImagesArray(params.softButtons)) {
+ this.resultStruct = {
+ "resultCode": SDL.SDLModel.resultCode["INVALID_DATA"],
+ "resultMessage": "Unsupported image type!"
+ };
+
+ return this.resultStruct;
+ }
+ }
if ("turnList" in params) {
for ( var i = 0; i < params.turnList.length; i++) {
@@ -1235,6 +1277,17 @@ SDL.RPCController = Em.Object
return this.resultStruct;
}
+ if ("softButtons" in params) {
+ if (SDL.RPCController
+ .checkImagesArray(params.softButtons)) {
+ this.resultStruct = {
+ "resultCode": SDL.SDLModel.resultCode["INVALID_DATA"],
+ "resultMessage": "Unsupported image type!"
+ };
+
+ return this.resultStruct;
+ }
+ }
if (params.alertStrings == null) {
this.resultStruct = {
@@ -1369,6 +1422,17 @@ SDL.RPCController = Em.Object
return this.resultStruct;
}
+ if ("softButtons" in params) {
+ if (SDL.RPCController
+ .checkImagesArray(params.softButtons)) {
+ this.resultStruct = {
+ "resultCode": SDL.SDLModel.resultCode["INVALID_DATA"],
+ "resultMessage": "Unsupported image type!"
+ };
+
+ return this.resultStruct;
+ }
+ }
if ("graphic" in params
&& ((params.graphic.imageType !== "DYNAMIC") && (params.graphic.imageType !== "STATIC"))) {
this.resultStruct = {
@@ -1870,6 +1934,16 @@ SDL.RPCController = Em.Object
return this.resultStruct;
}
+ if ("vrHelp" in params) {
+ if (SDL.RPCController.checkImagesArray(params.vrHelp)) {
+ this.resultStruct = {
+ "resultCode": SDL.SDLModel.resultCode["INVALID_DATA"],
+ "resultMessage": "Unsupported image type!"
+ };
+
+ return this.resultStruct;
+ }
+ }
if (params.appID == null) {
this.resultStruct = {
@@ -2204,6 +2278,17 @@ SDL.RPCController = Em.Object
return this.resultStruct;
}
+ if ("softButtons" in params) {
+ if (SDL.RPCController
+ .checkImagesArray(params.softButtons)) {
+ this.resultStruct = {
+ "resultCode": SDL.SDLModel.resultCode["INVALID_DATA"],
+ "resultMessage": "Unsupported image type!"
+ };
+
+ return this.resultStruct;
+ }
+ }
if (params.messageText == null) {
this.resultStruct = {
@@ -2349,6 +2434,17 @@ SDL.RPCController = Em.Object
ShowVrHelp: function(params) {
if (params) {
+ if ("vrHelp" in params) {
+ if (SDL.RPCController
+ .checkImagesArray(params.vrHelp)) {
+ this.resultStruct = {
+ "resultCode": SDL.SDLModel.resultCode["INVALID_DATA"],
+ "resultMessage": "Unsupported image type!"
+ };
+
+ return this.resultStruct;
+ }
+ }
if ("appID" in params) {
if (typeof params.appID != 'number') {
diff --git a/src/components/HMI/app/model/media/CDModel.js b/src/components/HMI/app/model/media/CDModel.js
index 9ded512c5d..43836cb6dc 100644
--- a/src/components/HMI/app/model/media/CDModel.js
+++ b/src/components/HMI/app/model/media/CDModel.js
@@ -40,4 +40,4 @@ SDL.CDModel = Em.Object.create( {
this.set('active', true);
}
-}); \ No newline at end of file
+});
diff --git a/src/components/HMI/app/model/sdl/MediaModel.js b/src/components/HMI/app/model/sdl/MediaModel.js
index 0feceb2119..fa8d8e2a83 100644
--- a/src/components/HMI/app/model/sdl/MediaModel.js
+++ b/src/components/HMI/app/model/sdl/MediaModel.js
@@ -333,15 +333,13 @@ SDL.SDLMediaModel = SDL.SDLAppModel.extend({
}
} else {
- this.appInfo.set('alignment', "text-align:center");
+ //this.appInfo.set('alignment', "text-align:center");
}
- if (params.graphic != null) {
- if (params.graphic.value != "") {
- this.appInfo.set('trackIcon', params.graphic.value);
- } else {
- this.appInfo.set('trackIcon', 'images/sdl/audio_icon.jpg');
- }
+ if (params.graphic && params.graphic.value != '') {
+ this.appInfo.set('trackIcon', params.graphic.value);
+ } else {
+ this.appInfo.set('trackIcon', 'images/sdl/audio_icon.jpg');
}
if ("softButtons" in params) {
diff --git a/src/components/HMI/app/model/sdl/Model.js b/src/components/HMI/app/model/sdl/Model.js
index 4d54e20e5a..a902e649ec 100644
--- a/src/components/HMI/app/model/sdl/Model.js
+++ b/src/components/HMI/app/model/sdl/Model.js
@@ -1224,6 +1224,7 @@ SDL.SDLModel = Em.Object.create({
setTimeout(function(){
if (SDL.SDLModel.vrActiveRequests.vrPerformInteraction) {
SDL.SDLModel.onPrompt(message.params.timeoutPrompt);
+ SDL.SDLModel.interactionData.helpPrompt = null;
}
}, message.params.timeout - 2000); //Magic numer is a platform depended HMI behavior: -2 seconds for timeout prompt
diff --git a/src/components/HMI/app/model/sdl/NonMediaModel.js b/src/components/HMI/app/model/sdl/NonMediaModel.js
index 42ac14bc0c..d9a14b32f2 100644
--- a/src/components/HMI/app/model/sdl/NonMediaModel.js
+++ b/src/components/HMI/app/model/sdl/NonMediaModel.js
@@ -198,12 +198,10 @@ SDL.SDLNonMediaModel = SDL.SDLAppModel.extend({
this.appInfo.set('alignment', "text-align:center");
}
- if (params.graphic != null) {
- if (params.graphic.value != "") {
- this.appInfo.set('mainImage', params.graphic.value);
- } else {
- this.appInfo.set('mainImage', 'images/sdl/audio_icon.jpg');
- }
+ if (params.graphic) {
+ this.appInfo.set('mainImage', params.graphic.value);
+ } else {
+ this.appInfo.set('mainImage', 'images/sdl/audio_icon.jpg');
}
// Magic number is a count of Preset Buttons on HMI = 8
diff --git a/src/components/HMI/app/view/WarningView.js b/src/components/HMI/app/view/WarningView.js
index 8fa40b4547..1db0b6f6c0 100644
--- a/src/components/HMI/app/view/WarningView.js
+++ b/src/components/HMI/app/view/WarningView.js
@@ -88,11 +88,7 @@ SDL.warningView = Em.ContainerView
appLoaded: function() {
var self = this;
- /** Show OK Button after 2 second delay */
- setTimeout(function() {
-
- self.set('isReady', true);
- }, 2000);
+ self.set('isReady', true);
var components = Em.ContainerView.create({
@@ -321,15 +317,8 @@ SDL.warningView = Em.ContainerView
var self = this;
- this._parentView.set('fade', this
- .checkForCCS3AnimationSupport());
-
- setTimeout(function() {
-
- self._parentView.set('hide', true);
- }, 1000);
-
+ self._parentView.set('hide', true);
SDL.RPCController.ConnectToSDL();
}
})
- }); \ No newline at end of file
+ });
diff --git a/src/components/HMI/app/view/home/controlButtons.js b/src/components/HMI/app/view/home/controlButtons.js
index 3b32d47368..cb3ff44ed5 100644
--- a/src/components/HMI/app/view/home/controlButtons.js
+++ b/src/components/HMI/app/view/home/controlButtons.js
@@ -52,8 +52,7 @@ SDL.ControlButtons = Em.ContainerView
'appUILanguagesLabel',
'appTTSVRLanguagesLabel',
'appUILang',
- 'appTTSVRLang',
- 'phoneCall'
+ 'appTTSVRLang'
],
/**
@@ -576,4 +575,4 @@ SDL.ControlButtons = Em.ContainerView
templateName: 'text'
})
})
- }); \ No newline at end of file
+ });
diff --git a/src/components/HMI/app/view/home/statusMediaView.js b/src/components/HMI/app/view/home/statusMediaView.js
index bc94c9e22f..4996b4ce1d 100644
--- a/src/components/HMI/app/view/home/statusMediaView.js
+++ b/src/components/HMI/app/view/home/statusMediaView.js
@@ -96,4 +96,4 @@ SDL.StatusMediaView = Em.ContainerView
SDL.States.goToStates(SDL.MediaController.activeState);
}
}
- }); \ No newline at end of file
+ });
diff --git a/src/components/HMI/app/view/infoView.js b/src/components/HMI/app/view/infoView.js
index 397553d9fa..8740bf455b 100644
--- a/src/components/HMI/app/view/infoView.js
+++ b/src/components/HMI/app/view/infoView.js
@@ -47,13 +47,9 @@ SDL.InfoView = Em.ContainerView.create( {
/** Settings components */
childViews:
[
- 'leftMenu',
- SDL.InfoServicesView,
- SDL.InfoTravelLinkView,
- SDL.InfoCalendarView,
SDL.InfoAppsView,
- SDL.InfoNonMedia,
- SDL.DeviceListView
+ SDL.DeviceListView,
+ SDL.InfoNonMedia
],
/** Left menu */
@@ -82,12 +78,8 @@ SDL.InfoView = Em.ContainerView.create( {
childViews:
[
- 'servicesButton',
- 'travelLinkButton',
- 'calendarButton',
'appsButton',
- 'sdlButton',
- 'goToCD'
+ 'sdlButton'
],
servicesButton: SDL.Button.extend( {
@@ -187,4 +179,4 @@ SDL.InfoView = Em.ContainerView.create( {
} )
} )
} )
-} ); \ No newline at end of file
+} );
diff --git a/src/components/HMI/app/view/media/common/LeftMenuView.js b/src/components/HMI/app/view/media/common/LeftMenuView.js
index ba4495681f..ce44d8a85b 100644
--- a/src/components/HMI/app/view/media/common/LeftMenuView.js
+++ b/src/components/HMI/app/view/media/common/LeftMenuView.js
@@ -40,7 +40,6 @@ SDL.LeftMenuView = Em.ContainerView.extend( {
childViews:
[
'border',
- 'cdButton',
'sdlButton'
],
/** Border decoration */
diff --git a/src/components/HMI/app/view/media/sdl/controllsView.js b/src/components/HMI/app/view/media/sdl/controllsView.js
index 8e73f0ba0e..b7b8f59d7f 100644
--- a/src/components/HMI/app/view/media/sdl/controllsView.js
+++ b/src/components/HMI/app/view/media/sdl/controllsView.js
@@ -38,7 +38,7 @@ SDL.SDLMediaControlls = Em.ContainerView.create( {
[
'info',
'Controls',
- 'tuneButtons'
+ 'tuneButtons' // Uncomment to see preset buttons on sdl screen
],
/**
@@ -235,4 +235,4 @@ SDL.SDLMediaControlls = Em.ContainerView.create( {
} )
} )
} )
-} ); \ No newline at end of file
+} );
diff --git a/src/components/HMI/app/view/media/sdlmediaView.js b/src/components/HMI/app/view/media/sdlmediaView.js
index 78371e7ea7..a880de8a3f 100644
--- a/src/components/HMI/app/view/media/sdlmediaView.js
+++ b/src/components/HMI/app/view/media/sdlmediaView.js
@@ -98,7 +98,7 @@ SDL.sdlView = Em.ContainerView
],
optionsButton: SDL.Button.extend( {
- text: 'Options',
+ text: 'Menu',
templateName: 'arrow',
@@ -107,4 +107,4 @@ SDL.sdlView = Em.ContainerView
})
})
})
- }); \ No newline at end of file
+ });
diff --git a/src/components/HMI/app/view/mediaView.js b/src/components/HMI/app/view/mediaView.js
index 647b593065..c647f999f4 100644
--- a/src/components/HMI/app/view/mediaView.js
+++ b/src/components/HMI/app/view/mediaView.js
@@ -46,4 +46,4 @@ SDL.MediaView = Em.ContainerView.create( {
],
/** Left Menu view component */
leftMenu: SDL.LeftMenuView
-} ); \ No newline at end of file
+} );
diff --git a/src/components/HMI/app/view/sdl/ExitAppView.js b/src/components/HMI/app/view/sdl/ExitAppView.js
index 81e9c7ad5f..4f423f06af 100644
--- a/src/components/HMI/app/view/sdl/ExitAppView.js
+++ b/src/components/HMI/app/view/sdl/ExitAppView.js
@@ -47,9 +47,7 @@ SDL.ExitApp = Em.ContainerView.create( {
[
'exitAppViewLabel',
'exitAppViewTitle',
- 'exitAppViewSelect',
- 'onAwakeSDLLabel',
- 'onAwakeSDLButton'
+ 'exitAppViewSelect'
],
/**
@@ -106,24 +104,6 @@ SDL.ExitApp = Em.ContainerView.create( {
}
} ),
- onAwakeSDLLabel: SDL.Label.extend( {
-
- elementId: 'onAwakeSDLLabel',
-
- classNames: 'onAwakeSDLLabel',
-
- content: 'onAwakeSDL notification send'
- } ),
-
- onAwakeSDLButton: SDL.Button.extend( {
- classNames: 'button onAwakeSDLButton',
- text: 'Send onAwakeSDL',
- action: 'onAwakeSDLNotificationSend',
- target: 'SDL.SDLController',
- buttonAction: true,
- onDown: false
- }),
-
/**
* Trigger function that activates and deactivates tbtClientStateView
*/
diff --git a/src/components/HMI/app/view/sdl/TTSPopUp.js b/src/components/HMI/app/view/sdl/TTSPopUp.js
index be5652ff90..4fc0c7669c 100644
--- a/src/components/HMI/app/view/sdl/TTSPopUp.js
+++ b/src/components/HMI/app/view/sdl/TTSPopUp.js
@@ -45,9 +45,7 @@ SDL.TTSPopUp = Em.ContainerView.create( {
'popUp',
'message',
'okButton',
- 'timerText',
- 'checkBoxLabel',
- 'checkBox'
+ 'timerText'
],
requestId: null,
@@ -88,25 +86,6 @@ SDL.TTSPopUp = Em.ContainerView.create( {
disabledBinding: 'parentView.buttons'
}),
- checkBoxLabel: SDL.Label.extend({
-
- elementId: 'checkBoxLabel',
-
- classNames: 'checkBoxLabel',
-
- content: 'Send response'
- }),
-
- checkBox: Em.Checkbox.extend( {
-
- elementId: 'checkBoxTTS',
-
- classNames: 'checkBoxTTS',
-
- checked: true
-
- }),
-
timerText: SDL.Label.extend({
elementId: 'timerText',
@@ -116,8 +95,6 @@ SDL.TTSPopUp = Em.ContainerView.create( {
contentBinding: 'parentView.timerSeconds'
}),
-
-
resetTimeout: function () {
this.set('timerSeconds', 10);
FFW.TTS.OnResetTimeout(this.appID, "TTS.Speak");
@@ -149,12 +126,9 @@ SDL.TTSPopUp = Em.ContainerView.create( {
DeactivateTTS: function() {
clearInterval(this.timer);
this.set('active', false);
- this.set('timerSeconds', 5);
-
- if (this.checkBox.checked) {
- SDL.SDLController.TTSResponseHandler();
- FFW.TTS.Stopped();
- }
+ this.set('timerSeconds', 10);
+ SDL.SDLController.TTSResponseHandler();
+ FFW.TTS.Stopped();
},
/**
diff --git a/src/components/HMI/app/view/sdl/shared/interactionChoicesView.js b/src/components/HMI/app/view/sdl/shared/interactionChoicesView.js
index 288031ab17..d01165dd14 100644
--- a/src/components/HMI/app/view/sdl/shared/interactionChoicesView.js
+++ b/src/components/HMI/app/view/sdl/shared/interactionChoicesView.js
@@ -86,10 +86,8 @@ SDL.InteractionChoicesView = SDL.SDLAbstractView.create({
],
click: function() {
- if (this._parentView.active) {
- SDL.InteractionChoicesView.timerUpdate();
- SDL.SDLController.onResetTimeout(SDL.SDLAppController.model.appID, "UI.PerformInteraction");
- }
+ SDL.InteractionChoicesView.timerUpdate();
+ SDL.SDLController.onResetTimeout(SDL.SDLAppController.model.appID, "UI.PerformInteraction");
},
naviChoises: Em.ContainerView.extend({
@@ -121,10 +119,8 @@ SDL.InteractionChoicesView = SDL.SDLAbstractView.create({
itemsOnPage: 5,
items: [],
click: function() {
- if (this._parentView.active) {
- SDL.InteractionChoicesView.timerUpdate();
- SDL.SDLController.onResetTimeout(SDL.SDLAppController.model.appID, "UI.PerformInteraction");
- }
+ SDL.InteractionChoicesView.timerUpdate();
+ SDL.SDLController.onResetTimeout(SDL.SDLAppController.model.appID, "UI.PerformInteraction");
}
}),
@@ -147,7 +143,7 @@ SDL.InteractionChoicesView = SDL.SDLAbstractView.create({
* Method updates popup timer when data changes through keyboard
*/
timerUpdate: function (){
- if (this.timeout) {
+ if (this.timeout && this.input.value !== null) {
clearTimeout(this.timer);
var self = this;
this.timer = setTimeout(function () {
diff --git a/src/components/HMI/css/buttonControls.css b/src/components/HMI/css/buttonControls.css
index 39ef852853..b9d3146468 100644
--- a/src/components/HMI/css/buttonControls.css
+++ b/src/components/HMI/css/buttonControls.css
@@ -281,9 +281,7 @@
#buttonControls .ContainerControlls {
left: 34px;
- background:
- url(../images/home/controlButtons/backGroundControllButtons.png)
- no-repeat;
+ background: black no-repeat;
width: 200px;
height: 200px;
}
@@ -406,8 +404,8 @@
-webkit-transition: 0.2s;
border-radius: 8px;
background-color: #1D1D1D;
- border: 1px solid #383737;
- box-shadow: inset 5px 5px 10px #383737, inset -3px -3px 10px black;
+/* border: 1px solid #383737;
+ box-shadow: inset 5px 5px 10px #383737, inset -3px -3px 10px black;*/
-webkit-transition: 0.2s;
font-size: 38px;
line-height: 42px;
@@ -543,4 +541,4 @@
#app_controlButtons .phone_call_button.expand{
left: 156px;
-} \ No newline at end of file
+}
diff --git a/src/components/HMI/css/general.css b/src/components/HMI/css/general.css
index 415545deb9..f09c98c0df 100644
--- a/src/components/HMI/css/general.css
+++ b/src/components/HMI/css/general.css
@@ -16,7 +16,7 @@ html, body {
body {
/*FONT FAMILY*/
- font-family: sans-serif;
+ font-family: helvetica-neue;
/*Defaul font size*/
font-size: 16px;
background-color: #000;
@@ -43,7 +43,7 @@ div {
.ffw-button {
cursor: pointer;
- background: url(../images/common/button.png) repeat-x;
+ background: black;
}
.ffw-button.pressed {
@@ -131,7 +131,7 @@ div {
height: 100px;
z-index: 1;
border-radius: 10 PX;
- top: 8px;
+ top: 330px;
-webkit-transition: opacity 1s ease-in-out;
display: none;
}
@@ -162,24 +162,6 @@ div {
font-size: 30px;
}
-#TTSPopUp .checkBoxLabel {
- color: white;
- top: 106px;
- width: 72px;
- height: 35px;
- left: 25px;
- background-color: rgb(90, 90, 90);
- border-radius: 3px;
- border: 1px solid rgb(255,255,255);
- padding: 2px;
-}
-
-#TTSPopUp .checkBoxTTS {
- top: 118px;
- position: absolute;
- left: 8px;
-}
-
#TTSPopUp .okButton {
right: 52px;
width: 113px;
@@ -595,7 +577,6 @@ div {
#media {
width: 800px;
height: 480px;
- background: url(../images/media/bg.png) no-repeat;
}
/****************************** FOR MEDIA VIEW************************************************/
@@ -811,7 +792,7 @@ margin-top: 90px;
/* List item background */
.list-item.notpressed {
- background-image: url(../images/list/list_item_bg.png);
+ background: rgb(29, 6, 6);
}
.list-item .highLighted {
@@ -901,12 +882,12 @@ margin-top: 90px;
/* List item button background */
.list-item.pressed {
- background-image: url(../images/list/list_item_pressed.png);
+ background: DarkGray;
}
/** Background for pressed button */
.button.pressed {
- background-image: url(../images/list/list_item_pressed.png);
+ background: DarkGray;
}
/* Hide function */
@@ -1003,7 +984,7 @@ margin-top: 90px;
}
.button {
- background-image: url(../images/list/list_item_bg.png);
+ background: rgb(29, 6, 6);
cursor: pointer;
}
@@ -1108,7 +1089,7 @@ margin-top: 90px;
width: 800px;
height: 480px;
z-index: 12001;
- background-image: -webkit-gradient(linear, left bottom, left top, color-stop(0, rgb(218, 218, 218)), color-stop(0.3, rgb(0, 0, 0)));
+ background: black;
}
#warning_view.fr .text {
@@ -1130,7 +1111,6 @@ margin-top: 90px;
font-size: 42px;
font-weight: bold;
top: 20px;
- text-shadow: 1px 1px 3px white;
color: #CC2A2A;
}
@@ -1156,6 +1136,7 @@ margin-top: 90px;
}
#warning_view .components{
+ display: none;
margin-top: 20px;
width: 420px;
}
@@ -1307,7 +1288,7 @@ to {
#wo_popup_denypopup_ok_button {
width: 238px;
height: 48px;
- background: url(../images/common/bt_bg.png) repeat-x;
+ background: gray;
cursor: pointer;
position: relative;
float: left;
@@ -1347,7 +1328,7 @@ to {
}
#wo_popup_yes_button.pressed, #wo_popup_no_button.pressed, #wo_popup_denypopup_ok_button.pressed {
- background: url(../images/common/bt_bg_pressed.png) repeat-x !important;
+ background: gray !important;
}
/* END Welcome Orientation View*/
diff --git a/src/components/HMI/css/info.css b/src/components/HMI/css/info.css
index 34776e6cbf..e212142cdb 100644
--- a/src/components/HMI/css/info.css
+++ b/src/components/HMI/css/info.css
@@ -6,7 +6,7 @@
width: 324px;
height: 48px;
cursor: pointer;
- background: url(../images/common/nav-status-bg.png) no-repeat;
+ background: gray;
z-index: 1;
}
@@ -668,4 +668,4 @@
border-radius: 2px;
top: 269px;
left: 303px;
-} \ No newline at end of file
+}
diff --git a/src/components/HMI/css/media.css b/src/components/HMI/css/media.css
index 85688d5e6b..e8d980479b 100644
--- a/src/components/HMI/css/media.css
+++ b/src/components/HMI/css/media.css
@@ -1,7 +1,7 @@
#media_leftmenu {
z-index: 301;
position: absolute;
- top: 90px;
+ top: 0px;
left: 0px;
width: 150px;
height: 300px;
@@ -55,7 +55,7 @@
left: 0px;
width: 153px;
height: 306px;
- background: url(../images/common/ls_border.png) no-repeat;
+ background: black no-repeat;
}
.media-ls-items {
@@ -73,7 +73,7 @@
}
.media-ls-item.active_state {
- background: url(../images/media/ls-item_bg_act.png) no-repeat !important;
+ background: black no-repeat !important;
}
.media-ls-item>.bg {
@@ -124,19 +124,19 @@
.main-preset-buttons-wraper {
position: relative;
- width: 468px;
+ width: 800px;
height: 100px;
float: left;
- left: 165px;
- top: 290px;
+/* left: 165px;*/
+ top: 350px;
z-index: 503;
}
.main-preset-buttons-wraper .preset-items {
position: relative;
- width: 467px;
+/* width: 467px;
height: 99px;
- border: 1px solid #393939;
+ border: 1px solid #393939;*/
-moz-border-radius: 2px;
-webkit-border-radius: 2px;
z-index: 1;
@@ -148,7 +148,8 @@
vertical-align: top;
border-right: 1px solid #393939;
border-bottom: 1px solid #393939;
- width: 92.6px;
+ border-top: 1px solid #393939;
+ width: 79px;
height: 49px;
cursor: pointer;
}
@@ -314,22 +315,20 @@
{
width: 155px;
height: 98px;
- border-right: 1px solid #393939;
cursor: pointer;
- background: url(../images/media/cd-prev-btn.png) no-repeat;
+ background: black no-repeat;
}
.bc-item-big.prevcd.pressed,.bc-item-big.prevusb.pressed,.bc-item-big.prevsd.pressed,.bc-item-big.prevblue.pressed
{
- background: url(../images/media/cd-prev-btn_pressed.png) no-repeat;
+ background: gray no-repeat;
}
.bc-item-big.playcd {
width: 157px;
height: 98px;
- border-right: 1px solid #393939;
cursor: pointer;
- background: url(../images/media/cd_play_btn.png) no-repeat;
+ background: black no-repeat;
}
.playIcon {
@@ -347,7 +346,7 @@
.bc-item-big.playcd.pressed,.bc-item-big.playusb.pressed,.bc-item-big.playsd.pressed,.bc-item-big.playblue.pressed
{
- background: url(../images/media/cd_play_btn_pressed.png) no-repeat;
+ background: DarkGray no-repeat;
}
.bc-item-big.nextcd,.bc-item-big.nextusb,.bc-item-big.nextsd,.bc-item-big.nextblue
@@ -355,12 +354,12 @@
width: 154px;
height: 98px;
cursor: pointer;
- background: url(../images/media/cd-next-btn.png) no-repeat;
+ background: black no-repeat;
}
.bc-item-big.nextcd.pressed,.bc-item-big.nextusb.pressed,.bc-item-big.nextsd.pressed,.bc-item-big.nextblue.pressed
{
- background: url(../images/media/cd-next-btn_pressed.png) no-repeat;
+ background: DarkGray no-repeat;
}
#bt-bg {
@@ -396,14 +395,12 @@
left: 13px;
width: 468px;
height: 99px;
- background: url("../images/media/btn_bg.png") repeat;
- border: 1px solid #393939;
-webkit-border-radius: 3px;
}
#sdl_view_container .track-info {
left: 165px;
- top: 55px;
+/* top: 55px;*/
}
#sdl_view_container .list-content {
@@ -461,6 +458,7 @@
}
.track-info>.device {
+ display: none;
position: absolute;
top: 30px;
left: 10px;
@@ -471,6 +469,7 @@
}
.divider_o {
+ display: none;
position: absolute;
top: 120px;
left: 0px;
@@ -522,7 +521,7 @@
}
#sdl_view_container .ffw_list_menu {
- top: 90px;
+ /*top: 90px;*/
left: 650px;
width: 140px;
-} \ No newline at end of file
+}
diff --git a/src/components/HMI/css/sdl.css b/src/components/HMI/css/sdl.css
index bd7741163d..303ec2b019 100644
--- a/src/components/HMI/css/sdl.css
+++ b/src/components/HMI/css/sdl.css
@@ -4,7 +4,6 @@
.ffw_list_menu {
left: 440px;
width: 158px;
- border: 1px solid #393939;
overflow: hidden;
}
@@ -15,6 +14,7 @@
.ffw_list_menu .ffw-button {
position: relative;
+ z-index: 300;
height: 49px;
border-bottom: 1px solid #393939;
line-height: 50px;
@@ -70,7 +70,7 @@
}
.sdl-window .back-button {
- top: 80px;
+ /*top: 80px;*/
left: 5px;
width: 48px;
height: 48px;
@@ -84,10 +84,10 @@
}
#info_apps_deviceList_view .deviceListLabel,.sdl-window .caption-text {
- top: 80px;
+ /*top: 80px;*/
left: 75px;
width: 620px;
- background: #393939;
+ background: rgb(29, 6, 6);
overflow: hidden;
text-overflow: ellipsis;
line-height: 50px;
@@ -183,7 +183,7 @@
height: 251px;
border-radius: 2px;
left: 75px;
- top: 150px;
+ top: 51px;
}
/*#sdl_view_container .list-content,*/
@@ -228,7 +228,7 @@
left: 10px;
width: 84px;
height: 50px;
- font-size: 20px;
+ font-size: 12px;
line-height: 50px;
overflow: hidden;
text-overflow: ellipsis;
@@ -236,7 +236,7 @@
}
#sdl_view_container .preset-items {
- width: 468px;
+/* width: 468px; */
}
#sdl_view_container .main-preset-buttons-wraper .preset-item.a3,#sdl_view_container .main-preset-buttons-wraper .preset-item.a6
@@ -245,16 +245,17 @@
}
#sdl_view_container .player_controllsV2 {
- top: 241px !important;
+
+ top: 200px !important;
height: 48px;
}
#sdl_view_container .player_controllsV2 .ffw-button {
- height: 48px;
+/* height: 48px;*/
}
#sdl_view_container .player_controllsV2 img {
- margin-top: -26px;
+/* margin-top: -26px; */
}
/* ScrollableMessage */
@@ -480,7 +481,6 @@
position: absolute;
top: 90px;
right: 10px;
- border: 1px solid #393939;
-webkit-border-radius: 2px;
width: 109px;
height: 109px;
@@ -490,7 +490,6 @@
position: absolute;
top: 70px;
right: 10px;
- border: 1px solid #393939;
-webkit-border-radius: 2px;
width: 109px;
height: 109px;
@@ -601,25 +600,6 @@
background: #393939;
}
-#exitAppView .onAwakeSDLLabel{
- top: 200px;
- width: 600px;
- left: 40px;
- height: 20px;
- padding: 10px;
- background: #535353;
-}
-
-#exitAppView .onAwakeSDLButton{
- right: 268px;
- top: 250px;
- width: 150px;
- height: 19px;
- padding: 10px;
- border-radius: 4px;
- border: 1px solid white;
-}
-
#VehicleInfo .odometrTitle{
top: 180px;
width: 290px;
@@ -1235,4 +1215,4 @@
#media_app_options_view .list-content {
width: 578px;
-} \ No newline at end of file
+}
diff --git a/src/components/HMI/ffw/BasicCommunicationRPC.js b/src/components/HMI/ffw/BasicCommunicationRPC.js
index 0bc2b06233..0fd63b0fc1 100644
--- a/src/components/HMI/ffw/BasicCommunicationRPC.js
+++ b/src/components/HMI/ffw/BasicCommunicationRPC.js
@@ -418,10 +418,6 @@ FFW.BasicCommunication = FFW.RPCObserver
}
if (request.method == "BasicCommunication.UpdateAppList") {
- var message = "Was found " + request.params.applications.length + " apps";
-
- SDL.PopUp.create().appendTo('body').popupActivate(message);
-
this.sendBCResult(SDL.SDLModel.resultCode["SUCCESS"],
request.id,
request.method);
@@ -1004,24 +1000,6 @@ FFW.BasicCommunication = FFW.RPCObserver
},
/**
- * OnAwakeSDL from HMI returns SDL to normal operation
- * after OnExitAllApplications(SUSPEND)
- */
- OnAwakeSDL: function() {
-
- Em.Logger.log("FFW.BasicCommunication.OnAwakeSDL");
-
- // send request
- var JSONMessage = {
- "jsonrpc": "2.0",
- "method": "BasicCommunication.OnAwakeSDL"
- };
- this.client.send(JSONMessage);
- },
-
-
-
- /**
* Used by HMI when User chooses to exit application.
*
* @params {Number}
diff --git a/src/components/HMI/ffw/NavigationRPC.js b/src/components/HMI/ffw/NavigationRPC.js
index a3fb289dc6..5f594079a1 100644
--- a/src/components/HMI/ffw/NavigationRPC.js
+++ b/src/components/HMI/ffw/NavigationRPC.js
@@ -172,24 +172,6 @@ FFW.Navigation = FFW.RPCObserver.create( {
}
case "Navigation.AlertManeuver": {
- // Werify if there is an ansupported data in request
- if (this.errorResponsePull[request.id] != null) {
-
- //Check if there is any available data to process the request
- if ("softButtons" in request.params) {
-
- this.errorResponsePull[request.id].code = SDL.SDLModel.resultCode["WARNINGS"];
- } else {
- //If no available data sent error response and stop process current request
-
- this.sendError(this.errorResponsePull[request.id].code, request.id, request.method,
- "Unsupported " + this.errorResponsePull[request.id].type + " type. Request was not processed.");
- this.errorResponsePull[request.id] = null;
-
- return;
- }
- }
-
this.sendNavigationResult(SDL.SDLModel.resultCode["SUCCESS"],
request.id,
request.method);
@@ -198,12 +180,6 @@ FFW.Navigation = FFW.RPCObserver.create( {
}
case "Navigation.ShowConstantTBT": {
- // Werify if there is an ansupported data in request
- if (this.errorResponsePull[request.id] != null) {
-
- this.errorResponsePull[request.id].code = SDL.SDLModel.resultCode["WARNINGS"];
- }
-
SDL.SDLModel.tbtActivate(request.params);
this.sendNavigationResult(SDL.SDLModel.resultCode["SUCCESS"],
request.id,
@@ -213,24 +189,6 @@ FFW.Navigation = FFW.RPCObserver.create( {
}
case "Navigation.UpdateTurnList": {
- // Werify if there is an ansupported data in request
- if (this.errorResponsePull[request.id] != null) {
-
- //Check if there is any available data to process the request
- if ("turnList" in request.params || "softButtons" in request.params) {
-
- this.errorResponsePull[request.id].code = SDL.SDLModel.resultCode["WARNINGS"];
- } else {
- //If no available data sent error response and stop process current request
-
- this.sendError(this.errorResponsePull[request.id].code, request.id, request.method,
- "Unsupported " + this.errorResponsePull[request.id].type + " type. Request was not processed.");
- this.errorResponsePull[request.id] = null;
-
- return;
- }
- }
-
SDL.SDLModel.tbtTurnListUpdate(request.params);
this.sendNavigationResult(SDL.SDLModel.resultCode["SUCCESS"],
request.id,
@@ -280,12 +238,6 @@ FFW.Navigation = FFW.RPCObserver.create( {
}
case "Navigation.SendLocation": {
- // Werify if there is an ansupported data in request
- if (this.errorResponsePull[request.id] != null) {
-
- this.errorResponsePull[request.id].code = SDL.SDLModel.resultCode["WARNINGS"];
- }
-
this.sendNavigationResult(SDL.SDLModel.resultCode["SUCCESS"],
request.id,
request.method);
@@ -340,14 +292,6 @@ FFW.Navigation = FFW.RPCObserver.create( {
*/
sendNavigationResult: function(resultCode, id, method) {
- if (this.errorResponsePull[id]) {
-
- this.sendError(this.errorResponsePull[id].code, id, method,
- "Unsupported " + this.errorResponsePull[id].type + " type. Available data in request was processed.");
- this.errorResponsePull[id] = null;
- return;
- }
-
Em.Logger.log("FFW.UI." + method + "Response");
if (resultCode === SDL.SDLModel.resultCode["SUCCESS"]) {
diff --git a/src/components/HMI/ffw/RPCClient.js b/src/components/HMI/ffw/RPCClient.js
index 5df06334d2..954dfbe17e 100644
--- a/src/components/HMI/ffw/RPCClient.js
+++ b/src/components/HMI/ffw/RPCClient.js
@@ -129,19 +129,34 @@ FFW.RPCClient = Em.Object
Em.Logger.log("Message received: " + evt.data);
- var jsonObj = JSON.parse(evt.data, SDL.RPCController.capabilitiesCheck);
+ var jsonObj = JSON.parse(evt.data);
+
+ JSON.parse(evt.data, SDL.RPCController.capabilitiesCheck);
+
+ if (jsonObj.method == 'UI.Show' && SDL.RPCController.capabilityCheckResult == 'UNSUPPORTED_RESOURCE' && Object.size(jsonObj.params) != 3 && jsonObj.params.showStrings.length != 0) {
+
+ this.observer.errorResponsePull[jsonObj.id] = SDL.SDLModel.resultCode["WARNINGS"];
+
+ Em.Logger.error('Image of STATIC type is not supported on HMI. Other information was successfully displayed');
- if (SDL.RPCController.capabilityCheckResult != null) {
- this.observer.errorResponsePull[jsonObj.id] = SDL.RPCController.capabilityCheckResult;
SDL.RPCController.capabilityCheckResult = null;
- this.observer.checkImage(jsonObj.params);
- this.observer.checkSoftButtons(jsonObj.params);
- this.observer.checkChoice(jsonObj.params);
- this.observer.checkChunk(jsonObj.params);
- this.observer.checkHelpItems(jsonObj.params);
- this.observer.checkTurnList(jsonObj.params);
+ } else {
+
+ switch (SDL.RPCController.capabilityCheckResult) {
+ case 'UNSUPPORTED_RESOURCE': {
+
+ this.observer.errorResponsePull[jsonObj.id] = SDL.SDLModel.resultCode["UNSUPPORTED_RESOURCE"];
+
+ Em.Logger.error('Unsupported incoming resource! In method ' + jsonObj.method);
+
+ SDL.RPCController.capabilityCheckResult = null;
+
+ break;
+ }
+ }
}
+
// handle component registration
if (jsonObj.id == this.registerRequestId && jsonObj.method == null && typeof jsonObj.result == 'number') {
if (jsonObj.error == null) {
@@ -274,6 +289,22 @@ FFW.RPCClient = Em.Object
if (this.socket.readyState == this.socket.OPEN) {
+ if (this.observer.errorResponsePull[obj.id] && this.observer.errorResponsePull[obj.id] !== 0 && obj.result) {
+ var method = obj.result.method;
+
+ delete obj.result;
+
+ obj.error = {
+ "code": this.observer.errorResponsePull[obj.id],
+ "message": this.observer.errorResponsePull[obj.id] == 21 ? "Image of STATIC type is not supported on HMI. Other information was successfully displayed" : "Unsupported incoming resource!",
+ "data": {
+ "method": method
+ }
+ }
+
+ delete this.observer.errorResponsePull[obj.id];
+ }
+
var strJson = JSON.stringify(obj);
Em.Logger.log(strJson);
diff --git a/src/components/HMI/ffw/RPCObserver.js b/src/components/HMI/ffw/RPCObserver.js
index 76b002aa8b..6f598cbeb0 100644
--- a/src/components/HMI/ffw/RPCObserver.js
+++ b/src/components/HMI/ffw/RPCObserver.js
@@ -71,244 +71,11 @@ FFW.RPCObserver = Em.Object
// parse JSON string and set necessary properties
},
- onRPCRequest: function(request, error) {
+ onRPCRequest: function(request) {
// parse JSON string and send back necessary data
},
- /**
- * Check for unsupported image type
- * Return false if unsupported image type was found and delete unsupported resource
- * @param params
- * @returns {boolean}
- */
- checkImage: function(params){
- if ("graphic" in params) {
- if (params.graphic.imageType === "STATIC") {
- delete params.graphic;
- return false;
- }
- }
- if ("secondaryGraphic" in params) {
- if (params.secondaryGraphic.imageType === "STATIC") {
- delete params.secondaryGraphic;
- return false;
- }
- }
- if ("image" in params) {
- if (params.image.imageType === "STATIC") {
- delete params.image;
- return false;
- }
- }
- if ("secondaryImage" in params) {
- if (params.image.imageType === "STATIC") {
- delete params.image;
- return false;
- }
- }
- if ("turnIcon" in params) {
- if (params.turnIcon.imageType === "STATIC") {
- delete params.turnIcon;
- return false;
- }
- }
- if ("nextTurnIcon" in params) {
- if (params.nextTurnIcon.imageType === "STATIC") {
- delete params.nextTurnIcon;
- return false;
- }
- }
- if ("cmdIcon" in params) {
- if (params.cmdIcon.imageType === "STATIC") {
- delete params.cmdIcon;
- return false;
- }
- }
- if ("menuIcon" in params) {
- if (params.menuIcon.imageType === "STATIC") {
- delete params.menuIcon;
- return false;
- }
- }
- if ("syncFileName" in params) {
- if (params.syncFileName.imageType === "STATIC") {
- delete params.syncFileName;
- return false;
- }
- }
- if ("locationImage" in params) {
- if (params.locationImage.imageType === "STATIC") {
- delete params.locationImage;
- return false;
- }
- }
- return true;
- },
-
- /**
- * Check for unsupported image type
- * If unsupported image type was found delete unsupported resource
- * @param params
- */
- checkSoftButtons: function(params){
-
- if ("softButtons" in params) {
- for (var i = params.softButtons.length-1; i >= 0 ; i--) {
- if (!this.checkImage(params.softButtons[i])) {
- if (!("text" in params.softButtons[i])) {
-
- params.softButtons.splice(i, 1);
- }
- }
- }
-
- if (params.softButtons.length == 0) {
- delete params.softButtons;
- }
- }
- },
-
- /**
- * Check for unsupported image type
- * If unsupported image type was found delete unsupported resource
- * @param params
- */
- checkTurnList: function(params){
-
- if ("turnList" in params) {
- for (var i = params.turnList.length-1; i >= 0 ; i--) {
- if (!this.checkImage(params.turnList[i])) {
- if (!("navigationText" in params.turnList[i])) {
-
- params.turnList.splice(i, 1);
- }
- }
- }
-
- if (params.turnList.length == 0) {
- delete params.turnList;
- }
- }
- },
-
- /**
- * Check for unsupported tts type
- * If unsupported tts type was found delete unsupported resource
- * @param params
- */
- checkChunk: function(params){
-
- if ("ttsName" in params) {
- for (var i = params.ttsName.length-1; i >= 0 ; i--) {
- if (params.ttsName[i].type != "TEXT") {
-
- params.ttsName.splice(i, 1);
- }
- }
-
- if (params.ttsName.length == 0) {
- delete params.ttsName;
- }
- }
- if ("helpPrompt" in params) {
- for (var i = params.helpPrompt.length-1; i >= 0 ; i--) {
- if (params.helpPrompt[i].type != "TEXT") {
-
- params.helpPrompt.splice(i, 1);
- }
- }
-
- if (params.helpPrompt.length == 0) {
- delete params.helpPrompt;
- }
- }
- if ("initialPrompt" in params) {
- for (var i = params.initialPrompt.length-1; i >= 0 ; i--) {
- if (params.initialPrompt[i].type != "TEXT") {
-
- params.initialPrompt.splice(i, 1);
- }
- }
-
- if (params.initialPrompt.length == 0) {
- delete params.initialPrompt;
- }
- }
- if ("timeoutPrompt" in params) {
- for (var i = params.timeoutPrompt.length-1; i >= 0 ; i--) {
- if (params.timeoutPrompt[i].type != "TEXT") {
-
- params.timeoutPrompt.splice(i, 1);
- }
- }
-
- if (params.timeoutPrompt.length == 0) {
- delete params.timeoutPrompt;
- }
- }
- if ("ttsChunks" in params) {
- for (var i = params.ttsChunks.length-1; i >= 0 ; i--) {
- if (params.ttsChunks[i].type != "TEXT") {
-
- params.ttsChunks.splice(i, 1);
- }
- }
-
- if (params.ttsChunks.length == 0) {
- delete params.ttsChunks;
- }
- }
- },
-
- /**
- * Check for unsupported choiceSet type
- * If unsupported choiceSet type was found delete unsupported resource
- * @param params
- */
- checkChoice: function(params){
-
- if ("choiceSet" in params) {
- for (var i = params.choiceSet.length-1; i >= 0 ; i--) {
- if (this.checkImage(params.choiceSet[i])) {
- if (!("menuName" in params.choiceSet[i])
- || !("secondaryText" in params.choiceSet[i])
- || !("tertiaryText" in params.choiceSet[i])) {
-
- params.choiceSet.splice(i, 1);
- }
- }
- }
-
- if (params.choiceSet.length == 0) {
- delete params.choiceSet;
- }
- }
- },
-
- /**
- * Check for unsupported vrHelp type
- * If unsupported vrHelp type was found delete unsupported resource
- * @param params
- */
- checkHelpItems: function(params){
-
- if ("vrHelp" in params) {
- for (var i = params.vrHelp.length-1; i >= 0 ; i--) {
- if (this.checkImage(params.vrHelp[i])) {
- if (!("text" in params.vrHelp[i])) {
-
- params.vrHelp.splice(i, 1);
- }
- }
- }
-
- if (params.vrHelp.length == 0) {
- delete params.vrHelp;
- }
- }
- },
-
validationCheck: function(request) {
if (request && request.method) {
diff --git a/src/components/HMI/ffw/TTSRPC.js b/src/components/HMI/ffw/TTSRPC.js
index 0e0b92acd4..6939aa4938 100644
--- a/src/components/HMI/ffw/TTSRPC.js
+++ b/src/components/HMI/ffw/TTSRPC.js
@@ -151,24 +151,6 @@ FFW.TTS = FFW.RPCObserver.create( {
switch (request.method) {
case "TTS.Speak": {
- // Werify if there is an ansupported data in request
- if (this.errorResponsePull[request.id] != null) {
-
- //Check if there is any available data to process the request
- if ("ttsChunks" in request.params) {
-
- this.errorResponsePull[request.id].code = SDL.SDLModel.resultCode["WARNINGS"];
- } else {
- //If no available data sent error response and stop process current request
-
- this.sendError(this.errorResponsePull[request.id].code, request.id, request.method,
- "Unsupported " + this.errorResponsePull[request.id].type + " type. Request was not processed.");
- this.errorResponsePull[request.id] = null;
-
- return;
- }
- }
-
if (SDL.TTSPopUp.active) {
FFW.TTS.sendError(SDL.SDLModel.resultCode["REJECTED"], request.id, "TTS.Speak", "TTS in progress. Rejected.");
} else {
@@ -180,25 +162,6 @@ FFW.TTS = FFW.RPCObserver.create( {
}
case "TTS.SetGlobalProperties": {
- // Werify if there is an ansupported data in request
- if (this.errorResponsePull[request.id] != null) {
-
- //Check if there is any available data to process the request
- if ("helpPrompt" in request.params
- || "timeoutPrompt" in request.params) {
-
- this.errorResponsePull[request.id].code = SDL.SDLModel.resultCode["WARNINGS"];
- } else {
- //If no available data sent error response and stop process current request
-
- this.sendError(this.errorResponsePull[request.id].code, request.id, request.method,
- "Unsupported " + this.errorResponsePull[request.id].type + " type. Request was not processed.");
- this.errorResponsePull[request.id] = null;
-
- return;
- }
- }
-
SDL.SDLModel.setProperties(request.params);
this.sendTTSResult(SDL.SDLModel.resultCode["SUCCESS"],
@@ -285,25 +248,6 @@ FFW.TTS = FFW.RPCObserver.create( {
}
case "TTS.ChangeRegistration": {
- // Werify if there is an ansupported data in request
- if (this.errorResponsePull[request.id] != null) {
-
- //Check if there is any available data to process the request
- if ("ttsName" in request.params
- || "language" in request.params) {
-
- this.errorResponsePull[request.id].code = SDL.SDLModel.resultCode["WARNINGS"];
- } else {
- //If no available data sent error response and stop process current request
-
- this.sendError(this.errorResponsePull[request.id].code, request.id, request.method,
- "Unsupported " + this.errorResponsePull[request.id].type + " type. Request was not processed.");
- this.errorResponsePull[request.id] = null;
-
- return;
- }
- }
-
SDL.SDLModel.changeRegistrationTTSVR(request.params.language, request.params.appID);
this.sendTTSResult(SDL.SDLModel.resultCode["SUCCESS"],
@@ -384,14 +328,6 @@ FFW.TTS = FFW.RPCObserver.create( {
*/
sendTTSResult: function(resultCode, id, method) {
- if (this.errorResponsePull[id]) {
-
- this.sendError(this.errorResponsePull[id].code, id, method,
- "Unsupported " + this.errorResponsePull[id].type + " type. Available data in request was processed.");
- this.errorResponsePull[id] = null;
- return;
- }
-
Em.Logger.log("FFW." + method + "Response");
if (resultCode === SDL.SDLModel.resultCode["SUCCESS"]) {
diff --git a/src/components/HMI/ffw/UIRPC.js b/src/components/HMI/ffw/UIRPC.js
index ff0aa73013..43ee73a850 100644
--- a/src/components/HMI/ffw/UIRPC.js
+++ b/src/components/HMI/ffw/UIRPC.js
@@ -168,25 +168,6 @@ FFW.UI = FFW.RPCObserver.create({
case "UI.Alert":
{
- // Werify if there is an ansupported data in request
- if (this.errorResponsePull[request.id] != null) {
-
- //Check if there is any available data to process the request
- if (request.params.alertStrings.length > 0
- || "softButtons" in request.params) {
-
- this.errorResponsePull[request.id].code = SDL.SDLModel.resultCode["WARNINGS"];
- } else {
- //If no available data sent error response and stop process current request
-
- this.sendError(this.errorResponsePull[request.id].code, request.id, request.method,
- "Unsupported " + this.errorResponsePull[request.id].type + " type. Request was not processed.");
- this.errorResponsePull[request.id] = null;
-
- return;
- }
- }
-
if (SDL.SDLModel.onUIAlert(request.params, request.id)) {
SDL.SDLController.onSystemContextChange(request.params.appID);
}
@@ -196,28 +177,6 @@ FFW.UI = FFW.RPCObserver.create({
case "UI.Show":
{
- // Werify if there is an ansupported data in request
- if (this.errorResponsePull[request.id] != null) {
-
- //Check if there is any available data to process the request
- if (request.params.showStrings.length > 0
- || "graphic" in request.params
- || "secondaryGraphic" in request.params
- || "softButtons" in request.params
- || "customPresets" in request.params) {
-
- this.errorResponsePull[request.id].code = SDL.SDLModel.resultCode["WARNINGS"];
- } else {
- //If no available data sent error response and stop process current request
-
- this.sendError(this.errorResponsePull[request.id].code, request.id, request.method,
- "Unsupported " + this.errorResponsePull[request.id].type + " type. Request was not processed.");
- this.errorResponsePull[request.id] = null;
-
- return;
- }
- }
-
SDL.TurnByTurnView.deactivate();
SDL.SDLController.getApplicationModel(request.params.appID).onSDLUIShow(request.params);
this.sendUIResult(SDL.SDLModel.resultCode["SUCCESS"], request.id, request.method);
@@ -226,55 +185,21 @@ FFW.UI = FFW.RPCObserver.create({
}
case "UI.SetGlobalProperties":
{
-
- // Werify if there is an ansupported data in request
- if (this.errorResponsePull[request.id] != null) {
-
- //Check if there is any available data to process the request
- if ("menuTitle" in request.params
- || "keyboardProperties" in request.params
- || "vrHelp" in request.params
- || "menuIcon" in request.params) {
-
- this.errorResponsePull[request.id].code = SDL.SDLModel.resultCode["WARNINGS"];
- } else {
- //If no available data sent error response and stop process current request
-
- this.sendError(this.errorResponsePull[request.id].code, request.id, request.method,
- "Unsupported " + this.errorResponsePull[request.id].type + " type. Request was not processed.");
- this.errorResponsePull[request.id] = null;
-
- return;
- }
- }
-
SDL.SDLModel.setProperties(request.params);
this.sendUIResult(SDL.SDLModel.resultCode["SUCCESS"], request.id, request.method);
break;
}
- case "UI.AddCommand":
+ case "UI.ResetGlobalProperties":
{
- // Werify if there is an ansupported data in request
- if (this.errorResponsePull[request.id] != null) {
-
- //Check if there is any available data to process the request
- if ("cmdIcon" in request.params
- || "menuParams" in request.params) {
-
- this.errorResponsePull[request.id].code = SDL.SDLModel.resultCode["WARNINGS"];
- } else {
- //If no available data sent error response and stop process current request
-
- this.sendError(this.errorResponsePull[request.id].code, request.id, request.method,
- "Unsupported " + this.errorResponsePull[request.id].type + " type. Request was not processed.");
- this.errorResponsePull[request.id] = null;
+ this.sendUIResult(SDL.SDLModel.resultCode["SUCCESS"], request.id, request.method);
- return;
- }
- }
+ break;
+ }
+ case "UI.AddCommand":
+ {
SDL.SDLController.getApplicationModel(request.params.appID).addCommand(request);
@@ -305,26 +230,6 @@ FFW.UI = FFW.RPCObserver.create({
case "UI.PerformInteraction":
{
- // Werify if there is an ansupported data in request
- if (this.errorResponsePull[request.id] != null) {
-
- //Check if there is any available data to process the request
- if ("choiceSet" in request.params
- && request.params
- && request.params.interactionLayout != "KEYBOARD") {
-
- this.errorResponsePull[request.id].code = SDL.SDLModel.resultCode["WARNINGS"];
- } else {
- //If no available data sent error response and stop process current request
-
- this.sendError(this.errorResponsePull[request.id].code, request.id, request.method,
- "Unsupported " + this.errorResponsePull[request.id].type + " type. Request was not processed.");
- this.errorResponsePull[request.id] = null;
-
- return;
- }
- }
-
if (SDL.SDLModel.uiPerformInteraction(request)) {
SDL.SDLController.onSystemContextChange();
}
@@ -867,20 +772,6 @@ FFW.UI = FFW.RPCObserver.create({
case "UI.SetAppIcon":
{
- // Werify if there is an ansupported data in request
- if (this.errorResponsePull[request.id] != null) {
-
- //Check if there is any available data to process the request
- if (!("syncFileName" in request.params)) {
-
- this.sendError(this.errorResponsePull[request.id].code, request.id, request.method,
- "Unsupported " + this.errorResponsePull[request.id].type + " type. Request was not processed.");
- this.errorResponsePull[request.id] = null;
-
- return;
- }
- }
-
SDL.SDLModel.onSDLSetAppIcon(request.params, request.id, request.method);
break;
@@ -1429,14 +1320,6 @@ FFW.UI = FFW.RPCObserver.create({
*/
sendUIResult: function (resultCode, id, method) {
- if (this.errorResponsePull[id]) {
-
- this.sendError(this.errorResponsePull[id].code, id, method,
- "Unsupported " + this.errorResponsePull[id].type + " type. Available data in request was processed.");
- this.errorResponsePull[id] = null;
- return;
- }
-
Em.Logger.log("FFW." + method + "Response");
if (resultCode === SDL.SDLModel.resultCode["SUCCESS"]) {
@@ -1468,8 +1351,16 @@ FFW.UI = FFW.RPCObserver.create({
switch (resultCode) {
case SDL.SDLModel.resultCode["SUCCESS"]: {
-
- this.sendUIResult(resultCode, id, 'UI.Alert');
+ // send repsonse
+ var JSONMessage = {
+ "jsonrpc": "2.0",
+ "id": id,
+ "result": {
+ "code": resultCode, // type (enum) from SDL protocol
+ "method": 'UI.Alert'
+ }
+ };
+ this.client.send(JSONMessage);
break;
}
@@ -1503,7 +1394,6 @@ FFW.UI = FFW.RPCObserver.create({
if (resultCode === SDL.SDLModel.resultCode["SUCCESS"]) {
- this.sendUIResult(resultCode, id, 'UI.Alert');
// send repsonse
var JSONMessage = {
"jsonrpc": "2.0",
@@ -1640,36 +1530,6 @@ FFW.UI = FFW.RPCObserver.create({
Em.Logger.log("FFW.UI.PerformInteractionResponse");
- if (this.errorResponsePull[requestID]) {
-
- if (resultCode === SDL.SDLModel.resultCode["SUCCESS"]) {
- // send repsonse
- var JSONMessage = {
- "jsonrpc": "2.0",
- "id": requestID,
- "error": {
- "code": this.errorResponsePull[requestID].code,
- "message": "Unsupported " + this.errorResponsePull[requestID].type + " type. Available data in request was processed.",
- "data": {
- "method": "UI.PerformInteraction"
- }
- }
- };
-
- if (commandID) {
- JSONMessage.error.data.choiceID = commandID;
- }
-
- if (manualTextEntry != null) {
- JSONMessage.error.data.manualTextEntry = manualTextEntry;
- }
- }
-
- this.client.send(JSONMessage);
- this.errorResponsePull[requestID] = null;
- return;
- }
-
if (resultCode === SDL.SDLModel.resultCode["SUCCESS"]) {
// send repsonse
var JSONMessage = {
diff --git a/src/components/HMI/ffw/VRRPC.js b/src/components/HMI/ffw/VRRPC.js
index 55a51b68cb..680c9a87dc 100644
--- a/src/components/HMI/ffw/VRRPC.js
+++ b/src/components/HMI/ffw/VRRPC.js
@@ -247,27 +247,6 @@ FFW.VR = FFW.RPCObserver.create( {
case "VR.PerformInteraction":
{
- // Werify if there is an ansupported data in request
- if (this.errorResponsePull[request.id] != null) {
-
- //Check if there is any available data to process the request
- if ("helpPrompt" in request.params
- || "initialPrompt" in request.params
- || "timeoutPrompt" in request.params
- || "grammarID" in request.params) {
-
- this.errorResponsePull[request.id].code = SDL.SDLModel.resultCode["WARNINGS"];
- } else {
- //If no available data sent error response and stop process current request
-
- this.sendError(this.errorResponsePull[request.id].code, request.id, request.method,
- "Unsupported " + this.errorResponsePull[request.id].type + " type. Request was not processed.");
- this.errorResponsePull[request.id] = null;
-
- return;
- }
- }
-
SDL.SDLModel.vrPerformInteraction(request);
break;
@@ -387,14 +366,6 @@ FFW.VR = FFW.RPCObserver.create( {
*/
sendVRResult: function(resultCode, id, method) {
- if (this.errorResponsePull[id]) {
-
- this.sendError(this.errorResponsePull[id].code, id, method,
- "Unsupported " + this.errorResponsePull[id].type + " type. Available data in request was processed.");
- this.errorResponsePull[id] = null;
- return;
- }
-
Em.Logger.log("FFW." + method + "Response");
if (resultCode === SDL.SDLModel.resultCode["SUCCESS"]) {
diff --git a/src/components/application_manager/CMakeLists.txt b/src/components/application_manager/CMakeLists.txt
index 01e019b680..07d8de458e 100644
--- a/src/components/application_manager/CMakeLists.txt
+++ b/src/components/application_manager/CMakeLists.txt
@@ -35,13 +35,15 @@ file (GLOB SOURCES
set (POLICIES_MANAGER
${AM_SOURCE_DIR}/src/policies/policy_handler.cc
${AM_SOURCE_DIR}/src/policies/policy_event_observer.cc
-${AM_SOURCE_DIR}/src/policies/delegates/app_permission_delegate.cc
-${AM_SOURCE_DIR}/src/policies/delegates/statistics_delegate.cc
)
include_directories(
${COMPONENTS_DIR}/policy/src/policy/policy_table/table_struct
)
+ list(APPEND POLICIES_MANAGER
+ ${AM_SOURCE_DIR}/src/policies/pt_exchange_handler_impl.cc
+ ${AM_SOURCE_DIR}/src/policies/policy_retry_sequence.cc
+ )
file (GLOB EVENT_ENGINE
${AM_SOURCE_DIR}/src/event_engine/*
diff --git a/src/components/application_manager/include/application_manager/application.h b/src/components/application_manager/include/application_manager/application.h
index 4e56bfec94..5f1f598851 100644
--- a/src/components/application_manager/include/application_manager/application.h
+++ b/src/components/application_manager/include/application_manager/application.h
@@ -1,4 +1,4 @@
-/*
+/**
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
@@ -36,7 +36,6 @@
#include <string>
#include <map>
#include "utils/shared_ptr.h"
-#include "utils/data_accessor.h"
#include "interfaces/MOBILE_API.h"
#include "connection_handler/device.h"
#include "application_manager/message.h"
@@ -165,7 +164,6 @@ class DynamicApplicationData {
virtual const smart_objects::SmartObject* menu_title() const = 0;
virtual const smart_objects::SmartObject* menu_icon() const = 0;
- virtual void load_global_properties(const smart_objects::SmartObject& so) = 0;
virtual void set_help_prompt(
const smart_objects::SmartObject& help_prompt) = 0;
virtual void set_timeout_prompt(
@@ -270,7 +268,7 @@ class DynamicApplicationData {
*
* @return ChoiceSet map that is currently in use
*/
- virtual DataAccessor<PerformChoiceSetMap>
+ virtual const PerformChoiceSetMap&
performinteraction_choice_set_map() const = 0;
/*
@@ -287,17 +285,17 @@ class DynamicApplicationData {
/*
* @brief Retrieve application commands
*/
- virtual DataAccessor<CommandsMap> commands_map() const = 0;
+ virtual const CommandsMap& commands_map() const = 0;
/*
* @brief Retrieve application sub menus
*/
- virtual DataAccessor<SubMenuMap> sub_menu_map() const = 0;
+ virtual const SubMenuMap& sub_menu_map() const = 0;
/*
* @brief Retrieve application choice set map
*/
- virtual DataAccessor<ChoiceSetMap> choice_set_map() const = 0;
+ virtual const ChoiceSetMap& choice_set_map() const = 0;
/*
* @brief Sets perform interaction state
@@ -393,7 +391,6 @@ class Application : public virtual InitialApplicationData,
virtual void CloseActiveMessage() = 0;
virtual bool IsFullscreen() const = 0;
virtual bool MakeFullscreen() = 0;
- virtual void ChangeSupportingAppHMIType() = 0;
virtual bool IsAudible() const = 0;
virtual void MakeNotAudible() = 0;
virtual bool allowed_support_navigation() const = 0;
diff --git a/src/components/application_manager/include/application_manager/application_data_impl.h b/src/components/application_manager/include/application_manager/application_data_impl.h
index 494cfb1bce..556eee4349 100644
--- a/src/components/application_manager/include/application_manager/application_data_impl.h
+++ b/src/components/application_manager/include/application_manager/application_data_impl.h
@@ -1,4 +1,4 @@
-/*
+/**
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
@@ -34,7 +34,6 @@
#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_APPLICATION_DATA_IMPL_H_
#include <string>
-#include "utils/lock.h"
#include "smart_objects/smart_object.h"
#include "application_manager/application.h"
#include "interfaces/MOBILE_API.h"
@@ -90,7 +89,6 @@ class DynamicApplicationDataImpl : public virtual Application {
const smart_objects::SmartObject* menu_title() const;
const smart_objects::SmartObject* menu_icon() const;
- void load_global_properties(const smart_objects::SmartObject& properties_so);
void set_help_prompt(const smart_objects::SmartObject& help_prompt);
void set_timeout_prompt(const smart_objects::SmartObject& timeout_prompt);
void set_vr_help_title(const smart_objects::SmartObject& vr_help_title);
@@ -182,7 +180,7 @@ class DynamicApplicationDataImpl : public virtual Application {
*
* @return ChoiceSet map that is currently in use
*/
- inline DataAccessor<PerformChoiceSetMap> performinteraction_choice_set_map() const;
+ inline const PerformChoiceSetMap& performinteraction_choice_set_map() const;
/*
* @brief Retrieves choice set that is currently in use by perform
@@ -198,17 +196,17 @@ class DynamicApplicationDataImpl : public virtual Application {
/*
* @brief Retrieve application commands
*/
- inline DataAccessor<CommandsMap> commands_map() const;
+ inline const CommandsMap& commands_map() const;
/*
* @brief Retrieve application sub menus
*/
- inline DataAccessor<SubMenuMap> sub_menu_map() const;
+ inline const SubMenuMap& sub_menu_map() const;
/*
* @brief Retrieve application choice set map
*/
- inline DataAccessor<ChoiceSetMap> choice_set_map() const;
+ inline const ChoiceSetMap& choice_set_map() const;
/*
* @brief Sets perform interaction state
@@ -281,41 +279,27 @@ class DynamicApplicationDataImpl : public virtual Application {
CommandsMap commands_;
- mutable sync_primitives::Lock commands_lock_;
SubMenuMap sub_menu_;
- mutable sync_primitives::Lock sub_menu_lock_;
ChoiceSetMap choice_set_map_;
- mutable sync_primitives::Lock choice_set_map_lock_;
PerformChoiceSetMap performinteraction_choice_set_map_;
- mutable sync_primitives::Lock performinteraction_choice_set_lock_;
uint32_t is_perform_interaction_active_;
uint32_t perform_interaction_ui_corrid_;
bool is_reset_global_properties_active_;
int32_t perform_interaction_mode_;
private:
- void SetGlobalProperties(const smart_objects::SmartObject& param,
- void (DynamicApplicationData::*callback)(
- const NsSmartDeviceLink::NsSmartObjects::SmartObject&));
DISALLOW_COPY_AND_ASSIGN(DynamicApplicationDataImpl);
};
-DataAccessor<CommandsMap> DynamicApplicationDataImpl::commands_map() const {
- return DataAccessor<CommandsMap>(commands_, commands_lock_);
+const CommandsMap& DynamicApplicationDataImpl::commands_map() const {
+ return commands_;
}
-DataAccessor<SubMenuMap> DynamicApplicationDataImpl::sub_menu_map() const {
- return DataAccessor<SubMenuMap>(sub_menu_, sub_menu_lock_);
+const SubMenuMap& DynamicApplicationDataImpl::sub_menu_map() const {
+ return sub_menu_;
}
-DataAccessor<ChoiceSetMap> DynamicApplicationDataImpl::choice_set_map() const {
- return DataAccessor<ChoiceSetMap>(choice_set_map_, choice_set_map_lock_);
-}
-
-DataAccessor<PerformChoiceSetMap>
-DynamicApplicationDataImpl::performinteraction_choice_set_map() const {
- return DataAccessor<PerformChoiceSetMap>(
- performinteraction_choice_set_map_,
- performinteraction_choice_set_lock_);
+const ChoiceSetMap& DynamicApplicationDataImpl::choice_set_map() const {
+ return choice_set_map_;
}
uint32_t DynamicApplicationDataImpl::is_perform_interaction_active() const {
@@ -330,6 +314,11 @@ bool DynamicApplicationDataImpl::is_reset_global_properties_active() const {
return is_reset_global_properties_active_;
}
+const PerformChoiceSetMap&
+DynamicApplicationDataImpl::performinteraction_choice_set_map() const {
+ return performinteraction_choice_set_map_;
+}
+
inline int32_t DynamicApplicationDataImpl::perform_interaction_mode() const {
return perform_interaction_mode_;
}
diff --git a/src/components/application_manager/include/application_manager/application_impl.h b/src/components/application_manager/include/application_manager/application_impl.h
index fda0837d6b..dadfce0929 100644
--- a/src/components/application_manager/include/application_manager/application_impl.h
+++ b/src/components/application_manager/include/application_manager/application_impl.h
@@ -1,4 +1,4 @@
-/*
+/**
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
@@ -71,11 +71,6 @@ class ApplicationImpl : public virtual InitialApplicationDataImpl,
void CloseActiveMessage();
bool IsFullscreen() const;
bool MakeFullscreen();
-
- /**
- * @brief change supporting COMMUNICATION NAVIGATION
- */
- virtual void ChangeSupportingAppHMIType();
bool IsAudible() const;
void MakeNotAudible();
@@ -156,6 +151,7 @@ class ApplicationImpl : public virtual InitialApplicationDataImpl,
virtual uint32_t nextHash();
virtual uint32_t curHash() const;
+
/**
* @brief Change Hash for current application
* and send notification to mobile
@@ -235,6 +231,7 @@ class ApplicationImpl : public virtual InitialApplicationDataImpl,
UsageStatistics usage_report_;
ProtocolVersion protocol_version_;
bool is_voice_communication_application_;
+
// NAVI retry stream
volatile bool is_video_stream_retry_active_;
volatile bool is_audio_stream_retry_active_;
diff --git a/src/components/application_manager/include/application_manager/application_manager_impl.h b/src/components/application_manager/include/application_manager/application_manager_impl.h
index 3b099cca0a..dacac9e010 100644
--- a/src/components/application_manager/include/application_manager/application_manager_impl.h
+++ b/src/components/application_manager/include/application_manager/application_manager_impl.h
@@ -47,7 +47,7 @@
#include "protocol_handler/protocol_observer.h"
#include "hmi_message_handler/hmi_message_observer.h"
#include "hmi_message_handler/hmi_message_sender.h"
-#include "application_manager/policies/policy_handler_observer.h"
+
#include "media_manager/media_manager_impl.h"
#include "connection_handler/connection_handler_observer.h"
@@ -74,6 +74,10 @@
#include "utils/lock.h"
#include "utils/singleton.h"
+namespace policy {
+class PolicyManager;
+}
+
namespace NsSmartDeviceLink {
namespace NsSmartObjects {
class SmartObject;
@@ -159,26 +163,15 @@ typedef threads::MessageLoopThread<utils::PrioritizedQueue<MessageFromMobile> >
typedef threads::MessageLoopThread<utils::PrioritizedQueue<MessageToMobile> > ToMobileQueue;
typedef threads::MessageLoopThread<utils::PrioritizedQueue<MessageFromHmi> > FromHmiQueue;
typedef threads::MessageLoopThread<utils::PrioritizedQueue<MessageToHmi> > ToHmiQueue;
-
-// AudioPassThru
-typedef struct {
-std::vector<uint8_t> binary_data;
-int32_t session_key;
-} AudioData;
-typedef std::queue<AudioData> RawAudioDataQueue;
-typedef threads::MessageLoopThread<RawAudioDataQueue> AudioPassThruQueue;
}
-
typedef std::vector<std::string> RPCParams;
class ApplicationManagerImpl : public ApplicationManager,
public hmi_message_handler::HMIMessageObserver,
public protocol_handler::ProtocolObserver,
public connection_handler::ConnectionHandlerObserver,
- public policy::PolicyHandlerObserver,
public impl::FromMobileQueue::Handler, public impl::ToMobileQueue::Handler,
public impl::FromHmiQueue::Handler, public impl::ToHmiQueue::Handler,
- public impl::AudioPassThruQueue::Handler,
public utils::Singleton<ApplicationManagerImpl> {
friend class ResumeCtrl;
@@ -310,6 +303,12 @@ class ApplicationManagerImpl : public ApplicationManager,
mobile_api::AppInterfaceUnregisteredReason::eType reason);
/*
+ * @brief Called by HMI on SUSPEND.
+ * SDL must save all persistence data(Resume, Policy)
+ */
+ void HeadUnitSuspend();
+
+ /*
* @brief Closes all registered applications
*/
void UnregisterAllApplications(bool generated_by_hmi = false);
@@ -392,20 +391,6 @@ class ApplicationManagerImpl : public ApplicationManager,
*/
void set_all_apps_allowed(const bool& allowed);
-
- /**
- * @brief Notification from PolicyHandler about PTU.
- * Compares AppHMIType between saved in app and received from PTU. If they are different method sends:
- * UI_ChangeRegistration with list new AppHMIType;
- * ActivateApp with HMI level BACKGROUND;
- * OnHMIStatus notification;
- * for app with HMI level FULL or LIMITED.
- * method sends:
- * UI_ChangeRegistration with list new AppHMIType
- * for app with HMI level BACKGROUND.
- */
- virtual void OnUpdateHMIAppType(std::map<std::string, std::vector<std::string> > app_hmi_types);
-
/*
* @brief Starts audio pass thru thread
*
@@ -427,17 +412,8 @@ class ApplicationManagerImpl : public ApplicationManager,
*/
void StopAudioPassThru(int32_t application_key);
- /*
- * @brief Creates AudioPassThru data chunk and inserts it
- * to audio_pass_thru_messages_
- *
- * @param session_key Id of application for which
- * audio pass thru should be sent
- *
- * @param binary_data AudioPassThru data chunk
- */
void SendAudioPassThroughNotification(uint32_t session_key,
- std::vector<uint8_t>& binary_data);
+ std::vector<uint8_t> binaryData);
std::string GetDeviceName(connection_handler::DeviceHandle handle);
@@ -465,27 +441,31 @@ class ApplicationManagerImpl : public ApplicationManager,
const utils::SharedPtr<smart_objects::SmartObject> message);
/////////////////////////////////////////////////////////
- // Overriden ProtocolObserver method
+ /*
+ * @brief Overriden ProtocolObserver method
+ */
virtual void OnMessageReceived(
- const ::protocol_handler::RawMessagePtr message) OVERRIDE;
+ const ::protocol_handler::RawMessagePtr message);
+
+ /*
+ * @brief Overriden ProtocolObserver method
+ */
virtual void OnMobileMessageSent(
- const ::protocol_handler::RawMessagePtr message) OVERRIDE;
+ const ::protocol_handler::RawMessagePtr message);
- // Overriden HMIMessageObserver method
- void OnMessageReceived(hmi_message_handler::MessageSharedPointer message) OVERRIDE;
- void OnErrorSending(hmi_message_handler::MessageSharedPointer message) OVERRIDE;
+ void OnMessageReceived(hmi_message_handler::MessageSharedPointer message);
+ void OnErrorSending(hmi_message_handler::MessageSharedPointer message);
- // Overriden ConnectionHandlerObserver method
- void OnDeviceListUpdated(const connection_handler::DeviceMap& device_list) OVERRIDE;
+ void OnDeviceListUpdated(const connection_handler::DeviceMap& device_list);
//TODO (EZamakhov): fix all indentations in this file
- void OnFindNewApplicationsRequest() OVERRIDE;
- void RemoveDevice(const connection_handler::DeviceHandle& device_handle) OVERRIDE;
+ virtual void OnFindNewApplicationsRequest();
+ void RemoveDevice(const connection_handler::DeviceHandle& device_handle);
bool OnServiceStartedCallback(
- const connection_handler::DeviceHandle& device_handle,
- const int32_t& session_key, const protocol_handler::ServiceType& type) OVERRIDE;
+ const connection_handler::DeviceHandle& device_handle,
+ const int32_t& session_key, const protocol_handler::ServiceType& type);
void OnServiceEndedCallback(const int32_t& session_key,
- const protocol_handler::ServiceType& type) OVERRIDE;
- void OnApplicationFloodCallBack(const uint32_t& connection_key) OVERRIDE;
+ const protocol_handler::ServiceType& type);
+
/**
* @ Add notification to collection
*
@@ -687,15 +667,6 @@ class ApplicationManagerImpl : public ApplicationManager,
mobile_apis::FunctionID::eType function_id,
const RPCParams& rpc_params,
CommandParametersPermissions* params_permissions = NULL);
- /*
- * @brief Function Should be called when Low Voltage is occured
- */
- void OnLowVoltage();
-
- /*
- * @brief Function Should be called when WakeUp occures after Low Voltage
- */
- void OnWakeUp();
// typedef for Applications list
typedef const std::set<ApplicationSharedPtr> TAppList;
@@ -746,22 +717,6 @@ class ApplicationManagerImpl : public ApplicationManager,
private:
ApplicationManagerImpl();
- /**
- * @brief Method transforms string to AppHMIType
- * @param str contains string AppHMIType
- * @return enum AppHMIType
- */
- mobile_apis::AppHMIType::eType StringToAppHMIType(std::string str);
-
- /**
- * @brief Method compares arrays of app HMI type
- * @param from_policy contains app HMI type from policy
- * @param from_application contains app HMI type from application
- * @return return TRUE if arrays of appHMIType equal, otherwise return FALSE
- */
- bool CompareAppHMIType (const smart_objects::SmartObject& from_policy,
- const smart_objects::SmartObject& from_application);
-
hmi_apis::HMI_API& hmi_so_factory();
mobile_apis::MOBILE_API& mobile_so_factory();
@@ -792,9 +747,6 @@ class ApplicationManagerImpl : public ApplicationManager,
// CALLED ON messages_to_hmi_ thread!
virtual void Handle(const impl::MessageToHmi message) OVERRIDE;
- // CALLED ON audio_pass_thru_messages_ thread!
- virtual void Handle(const impl::AudioData message) OVERRIDE;
-
void SendUpdateAppList(const std::list<uint32_t>& applications_ids);
void OnApplicationListUpdateTimer();
@@ -804,11 +756,6 @@ class ApplicationManagerImpl : public ApplicationManager,
*/
void SendOnSDLClose();
- /*
- * @brief returns true if low voltage state is active
- */
- bool IsLowVoltage();
-
private:
// members
@@ -884,8 +831,6 @@ class ApplicationManagerImpl : public ApplicationManager,
impl::FromHmiQueue messages_from_hmi_;
// Thread that pumps messages being passed to HMI.
impl::ToHmiQueue messages_to_hmi_;
- // Thread that pumps messages audio pass thru to mobile.
- impl::AudioPassThruQueue audio_pass_thru_messages_;
HMICapabilities hmi_capabilities_;
@@ -899,7 +844,6 @@ class ApplicationManagerImpl : public ApplicationManager,
*/
ResumeCtrl resume_ctrl_;
-
#ifdef TIME_TESTER
AMMetricObserver* metric_observer_;
#endif // TIME_TESTER
@@ -916,7 +860,6 @@ class ApplicationManagerImpl : public ApplicationManager,
timer::TimerThread<ApplicationManagerImpl> tts_global_properties_timer_;
- bool is_low_voltage_;
DISALLOW_COPY_AND_ASSIGN(ApplicationManagerImpl);
FRIEND_BASE_SINGLETON_CLASS(ApplicationManagerImpl);
diff --git a/src/components/application_manager/include/application_manager/commands/command.h b/src/components/application_manager/include/application_manager/commands/command.h
index 65eb8c143c..587c3d834c 100644
--- a/src/components/application_manager/include/application_manager/commands/command.h
+++ b/src/components/application_manager/include/application_manager/commands/command.h
@@ -1,4 +1,4 @@
-/*
+/**
Copyright (c) 2014, Ford Motor Company
All rights reserved.
diff --git a/src/components/application_manager/include/application_manager/commands/command_impl.h b/src/components/application_manager/include/application_manager/commands/command_impl.h
index d444298ce7..a34716bd62 100644
--- a/src/components/application_manager/include/application_manager/commands/command_impl.h
+++ b/src/components/application_manager/include/application_manager/commands/command_impl.h
@@ -1,4 +1,4 @@
-/*
+/**
Copyright (c) 2014, Ford Motor Company
All rights reserved.
diff --git a/src/components/application_manager/include/application_manager/commands/command_request_impl.h b/src/components/application_manager/include/application_manager/commands/command_request_impl.h
index 1c33bc4bf0..1bbba5aa0b 100644
--- a/src/components/application_manager/include/application_manager/commands/command_request_impl.h
+++ b/src/components/application_manager/include/application_manager/commands/command_request_impl.h
@@ -1,4 +1,4 @@
-/*
+/**
Copyright (c) 2014, Ford Motor Company
All rights reserved.
diff --git a/src/components/application_manager/include/application_manager/commands/hmi/activate_app_request.h b/src/components/application_manager/include/application_manager/commands/hmi/activate_app_request.h
index 7d1b294c86..3495ce1377 100644
--- a/src/components/application_manager/include/application_manager/commands/hmi/activate_app_request.h
+++ b/src/components/application_manager/include/application_manager/commands/hmi/activate_app_request.h
@@ -1,4 +1,4 @@
-/*
+/**
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
@@ -52,7 +52,7 @@ class ActivateAppRequest : public RequestToHMI, event_engine::EventObserver {
explicit ActivateAppRequest(const MessageSharedPtr& message);
/**
- * @brief Callback for response
+ * @brief Calback for response
*
* @param event - event response
**/
diff --git a/src/components/application_manager/include/application_manager/commands/hmi/activate_app_response.h b/src/components/application_manager/include/application_manager/commands/hmi/activate_app_response.h
index a15d317077..1df9bc095a 100644
--- a/src/components/application_manager/include/application_manager/commands/hmi/activate_app_response.h
+++ b/src/components/application_manager/include/application_manager/commands/hmi/activate_app_response.h
@@ -1,4 +1,4 @@
-/*
+/**
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
diff --git a/src/components/application_manager/include/application_manager/commands/hmi/add_statistics_info_notification.h b/src/components/application_manager/include/application_manager/commands/hmi/add_statistics_info_notification.h
index 1aa3b7a512..1569af434d 100644
--- a/src/components/application_manager/include/application_manager/commands/hmi/add_statistics_info_notification.h
+++ b/src/components/application_manager/include/application_manager/commands/hmi/add_statistics_info_notification.h
@@ -1,4 +1,4 @@
-/*
+/**
* Copyright (c) 2014, Ford Motor Company
* All rights reserved.
*
diff --git a/src/components/application_manager/include/application_manager/commands/hmi/allow_all_apps_request.h b/src/components/application_manager/include/application_manager/commands/hmi/allow_all_apps_request.h
index 3d42b6d5a6..6c2db489ce 100644
--- a/src/components/application_manager/include/application_manager/commands/hmi/allow_all_apps_request.h
+++ b/src/components/application_manager/include/application_manager/commands/hmi/allow_all_apps_request.h
@@ -1,4 +1,4 @@
-/*
+/**
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
diff --git a/src/components/application_manager/include/application_manager/commands/hmi/allow_all_apps_response.h b/src/components/application_manager/include/application_manager/commands/hmi/allow_all_apps_response.h
index ccc8d5ae7d..0eb8184fa8 100644
--- a/src/components/application_manager/include/application_manager/commands/hmi/allow_all_apps_response.h
+++ b/src/components/application_manager/include/application_manager/commands/hmi/allow_all_apps_response.h
@@ -1,4 +1,4 @@
-/*
+/**
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
diff --git a/src/components/application_manager/include/application_manager/commands/hmi/allow_app_request.h b/src/components/application_manager/include/application_manager/commands/hmi/allow_app_request.h
index e90576a7df..91228440a2 100644
--- a/src/components/application_manager/include/application_manager/commands/hmi/allow_app_request.h
+++ b/src/components/application_manager/include/application_manager/commands/hmi/allow_app_request.h
@@ -1,4 +1,4 @@
-/*
+/**
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
diff --git a/src/components/application_manager/include/application_manager/commands/hmi/allow_app_response.h b/src/components/application_manager/include/application_manager/commands/hmi/allow_app_response.h
index 6bedf30a38..5a24ac1a74 100644
--- a/src/components/application_manager/include/application_manager/commands/hmi/allow_app_response.h
+++ b/src/components/application_manager/include/application_manager/commands/hmi/allow_app_response.h
@@ -1,4 +1,4 @@
-/*
+/**
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
diff --git a/src/components/application_manager/include/application_manager/commands/hmi/basic_communication_system_request.h b/src/components/application_manager/include/application_manager/commands/hmi/basic_communication_system_request.h
index 867596f189..d066df813e 100644
--- a/src/components/application_manager/include/application_manager/commands/hmi/basic_communication_system_request.h
+++ b/src/components/application_manager/include/application_manager/commands/hmi/basic_communication_system_request.h
@@ -1,4 +1,4 @@
-/*
+/**
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
diff --git a/src/components/application_manager/include/application_manager/commands/hmi/basic_communication_system_response.h b/src/components/application_manager/include/application_manager/commands/hmi/basic_communication_system_response.h
index 5c174eac85..1948211c48 100644
--- a/src/components/application_manager/include/application_manager/commands/hmi/basic_communication_system_response.h
+++ b/src/components/application_manager/include/application_manager/commands/hmi/basic_communication_system_response.h
@@ -1,4 +1,4 @@
-/*
+/**
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
diff --git a/src/components/application_manager/include/application_manager/commands/hmi/button_get_capabilities_request.h b/src/components/application_manager/include/application_manager/commands/hmi/button_get_capabilities_request.h
index 639800a047..3c9fbac684 100644
--- a/src/components/application_manager/include/application_manager/commands/hmi/button_get_capabilities_request.h
+++ b/src/components/application_manager/include/application_manager/commands/hmi/button_get_capabilities_request.h
@@ -1,4 +1,4 @@
-/*
+/**
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
diff --git a/src/components/application_manager/include/application_manager/commands/hmi/button_get_capabilities_response.h b/src/components/application_manager/include/application_manager/commands/hmi/button_get_capabilities_response.h
index 7cd174477b..067954537d 100644
--- a/src/components/application_manager/include/application_manager/commands/hmi/button_get_capabilities_response.h
+++ b/src/components/application_manager/include/application_manager/commands/hmi/button_get_capabilities_response.h
@@ -1,4 +1,4 @@
-/*
+/**
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
diff --git a/src/components/application_manager/include/application_manager/commands/hmi/close_popup_request.h b/src/components/application_manager/include/application_manager/commands/hmi/close_popup_request.h
index 34722bc4f1..72ff8a2c5b 100644
--- a/src/components/application_manager/include/application_manager/commands/hmi/close_popup_request.h
+++ b/src/components/application_manager/include/application_manager/commands/hmi/close_popup_request.h
@@ -1,4 +1,4 @@
-/*
+/**
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
diff --git a/src/components/application_manager/include/application_manager/commands/hmi/close_popup_response.h b/src/components/application_manager/include/application_manager/commands/hmi/close_popup_response.h
index ce3a6d2936..05318e3cb9 100644
--- a/src/components/application_manager/include/application_manager/commands/hmi/close_popup_response.h
+++ b/src/components/application_manager/include/application_manager/commands/hmi/close_popup_response.h
@@ -1,4 +1,4 @@
-/*
+/**
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
diff --git a/src/components/application_manager/include/application_manager/commands/hmi/get_system_info_request.h b/src/components/application_manager/include/application_manager/commands/hmi/get_system_info_request.h
index 8262dbb6fa..8cb34718a1 100644
--- a/src/components/application_manager/include/application_manager/commands/hmi/get_system_info_request.h
+++ b/src/components/application_manager/include/application_manager/commands/hmi/get_system_info_request.h
@@ -1,4 +1,4 @@
-/*
+/**
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
diff --git a/src/components/application_manager/include/application_manager/commands/hmi/get_system_info_response.h b/src/components/application_manager/include/application_manager/commands/hmi/get_system_info_response.h
index 70983d3ce3..f10c07c52f 100644
--- a/src/components/application_manager/include/application_manager/commands/hmi/get_system_info_response.h
+++ b/src/components/application_manager/include/application_manager/commands/hmi/get_system_info_response.h
@@ -1,4 +1,4 @@
-/*
+/**
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
diff --git a/src/components/application_manager/include/application_manager/commands/hmi/get_urls.h b/src/components/application_manager/include/application_manager/commands/hmi/get_urls.h
index 551ab20431..9241446676 100644
--- a/src/components/application_manager/include/application_manager/commands/hmi/get_urls.h
+++ b/src/components/application_manager/include/application_manager/commands/hmi/get_urls.h
@@ -1,4 +1,4 @@
-/*
+/**
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
diff --git a/src/components/application_manager/include/application_manager/commands/hmi/get_urls_response.h b/src/components/application_manager/include/application_manager/commands/hmi/get_urls_response.h
index 956e5a788e..6b025142e2 100644
--- a/src/components/application_manager/include/application_manager/commands/hmi/get_urls_response.h
+++ b/src/components/application_manager/include/application_manager/commands/hmi/get_urls_response.h
@@ -1,4 +1,4 @@
-/*
+/**
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
diff --git a/src/components/application_manager/include/application_manager/commands/hmi/mixing_audio_supported_request.h b/src/components/application_manager/include/application_manager/commands/hmi/mixing_audio_supported_request.h
index 2957693c9e..905b5b3836 100644
--- a/src/components/application_manager/include/application_manager/commands/hmi/mixing_audio_supported_request.h
+++ b/src/components/application_manager/include/application_manager/commands/hmi/mixing_audio_supported_request.h
@@ -1,4 +1,4 @@
-/*
+/**
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
diff --git a/src/components/application_manager/include/application_manager/commands/hmi/mixing_audio_supported_response.h b/src/components/application_manager/include/application_manager/commands/hmi/mixing_audio_supported_response.h
index e2b5affe34..c8bfe4e156 100644
--- a/src/components/application_manager/include/application_manager/commands/hmi/mixing_audio_supported_response.h
+++ b/src/components/application_manager/include/application_manager/commands/hmi/mixing_audio_supported_response.h
@@ -1,4 +1,4 @@
-/*
+/**
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
diff --git a/src/components/application_manager/include/application_manager/commands/hmi/navi_alert_maneuver_request.h b/src/components/application_manager/include/application_manager/commands/hmi/navi_alert_maneuver_request.h
index 58f85f829a..1e2a39df94 100644
--- a/src/components/application_manager/include/application_manager/commands/hmi/navi_alert_maneuver_request.h
+++ b/src/components/application_manager/include/application_manager/commands/hmi/navi_alert_maneuver_request.h
@@ -1,4 +1,4 @@
-/*
+/**
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
diff --git a/src/components/application_manager/include/application_manager/commands/hmi/navi_alert_maneuver_response.h b/src/components/application_manager/include/application_manager/commands/hmi/navi_alert_maneuver_response.h
index 11f46d5da8..41e0f623f1 100644
--- a/src/components/application_manager/include/application_manager/commands/hmi/navi_alert_maneuver_response.h
+++ b/src/components/application_manager/include/application_manager/commands/hmi/navi_alert_maneuver_response.h
@@ -1,4 +1,4 @@
-/*
+/**
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
diff --git a/src/components/application_manager/include/application_manager/commands/hmi/navi_audio_start_stream_request.h b/src/components/application_manager/include/application_manager/commands/hmi/navi_audio_start_stream_request.h
index 97de7102f7..a321d32dd9 100644
--- a/src/components/application_manager/include/application_manager/commands/hmi/navi_audio_start_stream_request.h
+++ b/src/components/application_manager/include/application_manager/commands/hmi/navi_audio_start_stream_request.h
@@ -1,4 +1,4 @@
-/*
+/**
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
diff --git a/src/components/application_manager/include/application_manager/commands/hmi/navi_is_ready_request.h b/src/components/application_manager/include/application_manager/commands/hmi/navi_is_ready_request.h
index e779ecb699..a31efc7fe4 100644
--- a/src/components/application_manager/include/application_manager/commands/hmi/navi_is_ready_request.h
+++ b/src/components/application_manager/include/application_manager/commands/hmi/navi_is_ready_request.h
@@ -1,4 +1,4 @@
-/*
+/**
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
diff --git a/src/components/application_manager/include/application_manager/commands/hmi/navi_is_ready_response.h b/src/components/application_manager/include/application_manager/commands/hmi/navi_is_ready_response.h
index 3da6933bc3..0fbad35154 100644
--- a/src/components/application_manager/include/application_manager/commands/hmi/navi_is_ready_response.h
+++ b/src/components/application_manager/include/application_manager/commands/hmi/navi_is_ready_response.h
@@ -1,4 +1,4 @@
-/*
+/**
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
diff --git a/src/components/application_manager/include/application_manager/commands/hmi/navi_send_location_request.h b/src/components/application_manager/include/application_manager/commands/hmi/navi_send_location_request.h
index 45474b532a..9c91df648a 100644
--- a/src/components/application_manager/include/application_manager/commands/hmi/navi_send_location_request.h
+++ b/src/components/application_manager/include/application_manager/commands/hmi/navi_send_location_request.h
@@ -1,4 +1,4 @@
-/*
+/**
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
diff --git a/src/components/application_manager/include/application_manager/commands/hmi/navi_send_location_response.h b/src/components/application_manager/include/application_manager/commands/hmi/navi_send_location_response.h
index ef9a605c36..029d903192 100644
--- a/src/components/application_manager/include/application_manager/commands/hmi/navi_send_location_response.h
+++ b/src/components/application_manager/include/application_manager/commands/hmi/navi_send_location_response.h
@@ -1,4 +1,4 @@
-/*
+/**
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
diff --git a/src/components/application_manager/include/application_manager/commands/hmi/navi_show_constant_tbt_request.h b/src/components/application_manager/include/application_manager/commands/hmi/navi_show_constant_tbt_request.h
index b866ce3e1f..5da47e580b 100644
--- a/src/components/application_manager/include/application_manager/commands/hmi/navi_show_constant_tbt_request.h
+++ b/src/components/application_manager/include/application_manager/commands/hmi/navi_show_constant_tbt_request.h
@@ -1,4 +1,4 @@
-/*
+/**
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
diff --git a/src/components/application_manager/include/application_manager/commands/hmi/navi_show_constant_tbt_response.h b/src/components/application_manager/include/application_manager/commands/hmi/navi_show_constant_tbt_response.h
index 3f212985f9..4a26b26b09 100644
--- a/src/components/application_manager/include/application_manager/commands/hmi/navi_show_constant_tbt_response.h
+++ b/src/components/application_manager/include/application_manager/commands/hmi/navi_show_constant_tbt_response.h
@@ -1,4 +1,4 @@
-/*
+/**
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
diff --git a/src/components/application_manager/include/application_manager/commands/hmi/navi_start_stream_request.h b/src/components/application_manager/include/application_manager/commands/hmi/navi_start_stream_request.h
index 5b73e2dbab..f43b992219 100644
--- a/src/components/application_manager/include/application_manager/commands/hmi/navi_start_stream_request.h
+++ b/src/components/application_manager/include/application_manager/commands/hmi/navi_start_stream_request.h
@@ -1,4 +1,4 @@
-/*
+/**
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
diff --git a/src/components/application_manager/include/application_manager/commands/hmi/navi_update_turn_list_request.h b/src/components/application_manager/include/application_manager/commands/hmi/navi_update_turn_list_request.h
index a5e2f8bf37..61beef1b3b 100644
--- a/src/components/application_manager/include/application_manager/commands/hmi/navi_update_turn_list_request.h
+++ b/src/components/application_manager/include/application_manager/commands/hmi/navi_update_turn_list_request.h
@@ -1,4 +1,4 @@
-/*
+/**
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
diff --git a/src/components/application_manager/include/application_manager/commands/hmi/navi_update_turn_list_response.h b/src/components/application_manager/include/application_manager/commands/hmi/navi_update_turn_list_response.h
index 0e15a9175c..9e711b8be9 100644
--- a/src/components/application_manager/include/application_manager/commands/hmi/navi_update_turn_list_response.h
+++ b/src/components/application_manager/include/application_manager/commands/hmi/navi_update_turn_list_response.h
@@ -1,4 +1,4 @@
-/*
+/**
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
diff --git a/src/components/application_manager/include/application_manager/commands/hmi/on_allow_sdl_functionality_notification.h b/src/components/application_manager/include/application_manager/commands/hmi/on_allow_sdl_functionality_notification.h
index 6ec14e35b0..aa549638e4 100644
--- a/src/components/application_manager/include/application_manager/commands/hmi/on_allow_sdl_functionality_notification.h
+++ b/src/components/application_manager/include/application_manager/commands/hmi/on_allow_sdl_functionality_notification.h
@@ -1,4 +1,4 @@
-/*
+/**
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
diff --git a/src/components/application_manager/include/application_manager/commands/hmi/on_app_activated_notification.h b/src/components/application_manager/include/application_manager/commands/hmi/on_app_activated_notification.h
index 011df3832c..a8bdeb6c91 100644
--- a/src/components/application_manager/include/application_manager/commands/hmi/on_app_activated_notification.h
+++ b/src/components/application_manager/include/application_manager/commands/hmi/on_app_activated_notification.h
@@ -1,4 +1,4 @@
-/*
+/**
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
diff --git a/src/components/application_manager/include/application_manager/commands/hmi/on_app_deactivated_notification.h b/src/components/application_manager/include/application_manager/commands/hmi/on_app_deactivated_notification.h
index 8731fc43f1..4c56dc4158 100644
--- a/src/components/application_manager/include/application_manager/commands/hmi/on_app_deactivated_notification.h
+++ b/src/components/application_manager/include/application_manager/commands/hmi/on_app_deactivated_notification.h
@@ -1,4 +1,4 @@
-/*
+/**
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
diff --git a/src/components/application_manager/include/application_manager/commands/hmi/on_app_permission_changed_notification.h b/src/components/application_manager/include/application_manager/commands/hmi/on_app_permission_changed_notification.h
index c6ea82a15c..034efb7a8c 100644
--- a/src/components/application_manager/include/application_manager/commands/hmi/on_app_permission_changed_notification.h
+++ b/src/components/application_manager/include/application_manager/commands/hmi/on_app_permission_changed_notification.h
@@ -1,4 +1,4 @@
-/*
+/**
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
diff --git a/src/components/application_manager/include/application_manager/commands/hmi/on_app_permission_consent_notification.h b/src/components/application_manager/include/application_manager/commands/hmi/on_app_permission_consent_notification.h
index ea36d55b39..a5037820cc 100644
--- a/src/components/application_manager/include/application_manager/commands/hmi/on_app_permission_consent_notification.h
+++ b/src/components/application_manager/include/application_manager/commands/hmi/on_app_permission_consent_notification.h
@@ -1,4 +1,4 @@
-/*
+/**
* Copyright (c) 2014, Ford Motor Company
* All rights reserved.
*
diff --git a/src/components/application_manager/include/application_manager/commands/hmi/on_app_registered_notification.h b/src/components/application_manager/include/application_manager/commands/hmi/on_app_registered_notification.h
index 1ebbfcd483..4364aa9a35 100644
--- a/src/components/application_manager/include/application_manager/commands/hmi/on_app_registered_notification.h
+++ b/src/components/application_manager/include/application_manager/commands/hmi/on_app_registered_notification.h
@@ -1,4 +1,4 @@
-/*
+/**
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
diff --git a/src/components/application_manager/include/application_manager/commands/hmi/on_app_unregistered_notification.h b/src/components/application_manager/include/application_manager/commands/hmi/on_app_unregistered_notification.h
index 96fd19e9bc..d8470af396 100644
--- a/src/components/application_manager/include/application_manager/commands/hmi/on_app_unregistered_notification.h
+++ b/src/components/application_manager/include/application_manager/commands/hmi/on_app_unregistered_notification.h
@@ -1,4 +1,4 @@
-/*
+/**
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
diff --git a/src/components/application_manager/include/application_manager/commands/hmi/on_button_event_notification.h b/src/components/application_manager/include/application_manager/commands/hmi/on_button_event_notification.h
index 0a56d7d924..a4657ea24e 100644
--- a/src/components/application_manager/include/application_manager/commands/hmi/on_button_event_notification.h
+++ b/src/components/application_manager/include/application_manager/commands/hmi/on_button_event_notification.h
@@ -1,4 +1,4 @@
-/*
+/**
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
diff --git a/src/components/application_manager/include/application_manager/commands/hmi/on_button_press_notification.h b/src/components/application_manager/include/application_manager/commands/hmi/on_button_press_notification.h
index ce5f1de8f1..065cdc4a72 100644
--- a/src/components/application_manager/include/application_manager/commands/hmi/on_button_press_notification.h
+++ b/src/components/application_manager/include/application_manager/commands/hmi/on_button_press_notification.h
@@ -1,4 +1,4 @@
-/*
+/**
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
diff --git a/src/components/application_manager/include/application_manager/commands/hmi/on_device_chosen_notification.h b/src/components/application_manager/include/application_manager/commands/hmi/on_device_chosen_notification.h
index 17ba26b7f7..e980bfe41b 100644
--- a/src/components/application_manager/include/application_manager/commands/hmi/on_device_chosen_notification.h
+++ b/src/components/application_manager/include/application_manager/commands/hmi/on_device_chosen_notification.h
@@ -1,4 +1,4 @@
-/*
+/**
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
diff --git a/src/components/application_manager/include/application_manager/commands/hmi/on_device_state_changed_notification.h b/src/components/application_manager/include/application_manager/commands/hmi/on_device_state_changed_notification.h
index b87a6e2d9f..5c12bdfd9f 100644
--- a/src/components/application_manager/include/application_manager/commands/hmi/on_device_state_changed_notification.h
+++ b/src/components/application_manager/include/application_manager/commands/hmi/on_device_state_changed_notification.h
@@ -1,4 +1,4 @@
-/*
+/**
* Copyright (c) 2014, Ford Motor Company
* All rights reserved.
*
diff --git a/src/components/application_manager/include/application_manager/commands/hmi/on_driver_distraction_notification.h b/src/components/application_manager/include/application_manager/commands/hmi/on_driver_distraction_notification.h
index 01a87aae05..77da5cf3b2 100644
--- a/src/components/application_manager/include/application_manager/commands/hmi/on_driver_distraction_notification.h
+++ b/src/components/application_manager/include/application_manager/commands/hmi/on_driver_distraction_notification.h
@@ -1,4 +1,4 @@
-/*
+/**
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
diff --git a/src/components/application_manager/include/application_manager/commands/hmi/on_exit_all_applications_notification.h b/src/components/application_manager/include/application_manager/commands/hmi/on_exit_all_applications_notification.h
index 65d78f60c6..c913509e5e 100644
--- a/src/components/application_manager/include/application_manager/commands/hmi/on_exit_all_applications_notification.h
+++ b/src/components/application_manager/include/application_manager/commands/hmi/on_exit_all_applications_notification.h
@@ -1,4 +1,4 @@
-/*
+/**
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
diff --git a/src/components/application_manager/include/application_manager/commands/hmi/on_exit_application_notification.h b/src/components/application_manager/include/application_manager/commands/hmi/on_exit_application_notification.h
index 479dd3a09c..b78c0e2afe 100644
--- a/src/components/application_manager/include/application_manager/commands/hmi/on_exit_application_notification.h
+++ b/src/components/application_manager/include/application_manager/commands/hmi/on_exit_application_notification.h
@@ -1,4 +1,4 @@
-/*
+/**
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
diff --git a/src/components/application_manager/include/application_manager/commands/hmi/on_file_removed_notification.h b/src/components/application_manager/include/application_manager/commands/hmi/on_file_removed_notification.h
index cc47705c82..b6b46041f8 100644
--- a/src/components/application_manager/include/application_manager/commands/hmi/on_file_removed_notification.h
+++ b/src/components/application_manager/include/application_manager/commands/hmi/on_file_removed_notification.h
@@ -1,4 +1,4 @@
-/*
+/**
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
diff --git a/src/components/application_manager/include/application_manager/commands/hmi/on_find_applications.h b/src/components/application_manager/include/application_manager/commands/hmi/on_find_applications.h
index f9fb9cdb21..2499129b2c 100644
--- a/src/components/application_manager/include/application_manager/commands/hmi/on_find_applications.h
+++ b/src/components/application_manager/include/application_manager/commands/hmi/on_find_applications.h
@@ -1,4 +1,4 @@
-/*
+/**
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
diff --git a/src/components/application_manager/include/application_manager/commands/hmi/on_ignition_cycle_over_notification.h b/src/components/application_manager/include/application_manager/commands/hmi/on_ignition_cycle_over_notification.h
index f8fccdc382..ed0638f3cc 100644
--- a/src/components/application_manager/include/application_manager/commands/hmi/on_ignition_cycle_over_notification.h
+++ b/src/components/application_manager/include/application_manager/commands/hmi/on_ignition_cycle_over_notification.h
@@ -1,4 +1,4 @@
-/*
+/**
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
diff --git a/src/components/application_manager/include/application_manager/commands/hmi/on_navi_tbt_client_state_notification.h b/src/components/application_manager/include/application_manager/commands/hmi/on_navi_tbt_client_state_notification.h
index a657ffcc68..6e42e1a0cd 100644
--- a/src/components/application_manager/include/application_manager/commands/hmi/on_navi_tbt_client_state_notification.h
+++ b/src/components/application_manager/include/application_manager/commands/hmi/on_navi_tbt_client_state_notification.h
@@ -1,4 +1,4 @@
-/*
+/**
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
diff --git a/src/components/application_manager/include/application_manager/commands/hmi/on_play_tone_notification.h b/src/components/application_manager/include/application_manager/commands/hmi/on_play_tone_notification.h
index ceba0528fa..8e463c3276 100644
--- a/src/components/application_manager/include/application_manager/commands/hmi/on_play_tone_notification.h
+++ b/src/components/application_manager/include/application_manager/commands/hmi/on_play_tone_notification.h
@@ -1,4 +1,4 @@
-/*
+/**
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
diff --git a/src/components/application_manager/include/application_manager/commands/hmi/on_policy_update.h b/src/components/application_manager/include/application_manager/commands/hmi/on_policy_update.h
index 81278fb75a..f71de540e5 100644
--- a/src/components/application_manager/include/application_manager/commands/hmi/on_policy_update.h
+++ b/src/components/application_manager/include/application_manager/commands/hmi/on_policy_update.h
@@ -1,4 +1,4 @@
-/*
+/**
* Copyright (c) 2014, Ford Motor Company
* All rights reserved.
*
diff --git a/src/components/application_manager/include/application_manager/commands/hmi/on_put_file_notification.h b/src/components/application_manager/include/application_manager/commands/hmi/on_put_file_notification.h
index bc60284309..839af785be 100644
--- a/src/components/application_manager/include/application_manager/commands/hmi/on_put_file_notification.h
+++ b/src/components/application_manager/include/application_manager/commands/hmi/on_put_file_notification.h
@@ -1,4 +1,4 @@
-/*
+/**
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
diff --git a/src/components/application_manager/include/application_manager/commands/hmi/on_ready_notification.h b/src/components/application_manager/include/application_manager/commands/hmi/on_ready_notification.h
index 24fc52deac..a3e2dd731d 100644
--- a/src/components/application_manager/include/application_manager/commands/hmi/on_ready_notification.h
+++ b/src/components/application_manager/include/application_manager/commands/hmi/on_ready_notification.h
@@ -1,4 +1,4 @@
-/*
+/**
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
diff --git a/src/components/application_manager/include/application_manager/commands/hmi/on_received_policy_update.h b/src/components/application_manager/include/application_manager/commands/hmi/on_received_policy_update.h
index 0eeb28218f..38a4470d22 100644
--- a/src/components/application_manager/include/application_manager/commands/hmi/on_received_policy_update.h
+++ b/src/components/application_manager/include/application_manager/commands/hmi/on_received_policy_update.h
@@ -1,4 +1,4 @@
-/*
+/**
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
diff --git a/src/components/application_manager/include/application_manager/commands/hmi/on_record_start_notification.h b/src/components/application_manager/include/application_manager/commands/hmi/on_record_start_notification.h
index 67cccdd816..81f0b5bdda 100644
--- a/src/components/application_manager/include/application_manager/commands/hmi/on_record_start_notification.h
+++ b/src/components/application_manager/include/application_manager/commands/hmi/on_record_start_notification.h
@@ -1,4 +1,4 @@
-/*
+/**
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
diff --git a/src/components/application_manager/include/application_manager/commands/hmi/on_resume_audio_source_notification.h b/src/components/application_manager/include/application_manager/commands/hmi/on_resume_audio_source_notification.h
index 03f84d0907..c27e2e5ee8 100644
--- a/src/components/application_manager/include/application_manager/commands/hmi/on_resume_audio_source_notification.h
+++ b/src/components/application_manager/include/application_manager/commands/hmi/on_resume_audio_source_notification.h
@@ -1,4 +1,4 @@
-/*
+/**
* Copyright (c) 2014, Ford Motor Company
* All rights reserved.
*
diff --git a/src/components/application_manager/include/application_manager/commands/hmi/on_sdl_close_notification.h b/src/components/application_manager/include/application_manager/commands/hmi/on_sdl_close_notification.h
index 5b9ac04e8f..e6b4418d6d 100644
--- a/src/components/application_manager/include/application_manager/commands/hmi/on_sdl_close_notification.h
+++ b/src/components/application_manager/include/application_manager/commands/hmi/on_sdl_close_notification.h
@@ -1,4 +1,4 @@
-/*
+/**
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
diff --git a/src/components/application_manager/include/application_manager/commands/hmi/on_sdl_consent_needed_notification.h b/src/components/application_manager/include/application_manager/commands/hmi/on_sdl_consent_needed_notification.h
index 4f30873e4e..c9b93a4dcf 100644
--- a/src/components/application_manager/include/application_manager/commands/hmi/on_sdl_consent_needed_notification.h
+++ b/src/components/application_manager/include/application_manager/commands/hmi/on_sdl_consent_needed_notification.h
@@ -1,4 +1,4 @@
-/*
+/**
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
diff --git a/src/components/application_manager/include/application_manager/commands/hmi/on_sdl_persistence_complete_notification.h b/src/components/application_manager/include/application_manager/commands/hmi/on_sdl_persistence_complete_notification.h
index 6f8f3a6e1a..5da06ef34c 100644
--- a/src/components/application_manager/include/application_manager/commands/hmi/on_sdl_persistence_complete_notification.h
+++ b/src/components/application_manager/include/application_manager/commands/hmi/on_sdl_persistence_complete_notification.h
@@ -1,4 +1,4 @@
-/*
+/**
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
diff --git a/src/components/application_manager/include/application_manager/commands/hmi/on_start_device_discovery.h b/src/components/application_manager/include/application_manager/commands/hmi/on_start_device_discovery.h
index bfa14f67fc..3e4dc1daf4 100644
--- a/src/components/application_manager/include/application_manager/commands/hmi/on_start_device_discovery.h
+++ b/src/components/application_manager/include/application_manager/commands/hmi/on_start_device_discovery.h
@@ -1,4 +1,4 @@
-/*
+/**
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
diff --git a/src/components/application_manager/include/application_manager/commands/hmi/on_status_update_notification.h b/src/components/application_manager/include/application_manager/commands/hmi/on_status_update_notification.h
index c123826886..ae85d13713 100644
--- a/src/components/application_manager/include/application_manager/commands/hmi/on_status_update_notification.h
+++ b/src/components/application_manager/include/application_manager/commands/hmi/on_status_update_notification.h
@@ -1,4 +1,4 @@
-/*
+/**
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
diff --git a/src/components/application_manager/include/application_manager/commands/hmi/on_system_context_notification.h b/src/components/application_manager/include/application_manager/commands/hmi/on_system_context_notification.h
index 35d6f49daa..b16df6069e 100644
--- a/src/components/application_manager/include/application_manager/commands/hmi/on_system_context_notification.h
+++ b/src/components/application_manager/include/application_manager/commands/hmi/on_system_context_notification.h
@@ -1,4 +1,4 @@
-/*
+/**
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
diff --git a/src/components/application_manager/include/application_manager/commands/hmi/on_system_error_notification.h b/src/components/application_manager/include/application_manager/commands/hmi/on_system_error_notification.h
index ee7df7acd6..cb3fc12017 100644
--- a/src/components/application_manager/include/application_manager/commands/hmi/on_system_error_notification.h
+++ b/src/components/application_manager/include/application_manager/commands/hmi/on_system_error_notification.h
@@ -1,4 +1,4 @@
-/*
+/**
* Copyright (c) 2014, Ford Motor Company
* All rights reserved.
*
diff --git a/src/components/application_manager/include/application_manager/commands/hmi/on_system_info_changed_notification.h b/src/components/application_manager/include/application_manager/commands/hmi/on_system_info_changed_notification.h
index 9b6c62782c..d0bcadfaac 100644
--- a/src/components/application_manager/include/application_manager/commands/hmi/on_system_info_changed_notification.h
+++ b/src/components/application_manager/include/application_manager/commands/hmi/on_system_info_changed_notification.h
@@ -1,4 +1,4 @@
-/*
+/**
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
diff --git a/src/components/application_manager/include/application_manager/commands/hmi/on_system_request_notification.h b/src/components/application_manager/include/application_manager/commands/hmi/on_system_request_notification.h
index f1d25e24a4..6e3a0eea7f 100644
--- a/src/components/application_manager/include/application_manager/commands/hmi/on_system_request_notification.h
+++ b/src/components/application_manager/include/application_manager/commands/hmi/on_system_request_notification.h
@@ -1,4 +1,4 @@
-/*
+/**
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
diff --git a/src/components/application_manager/include/application_manager/commands/hmi/on_tts_language_change_notification.h b/src/components/application_manager/include/application_manager/commands/hmi/on_tts_language_change_notification.h
index 79ae9b496e..d9b55ac0c1 100644
--- a/src/components/application_manager/include/application_manager/commands/hmi/on_tts_language_change_notification.h
+++ b/src/components/application_manager/include/application_manager/commands/hmi/on_tts_language_change_notification.h
@@ -1,4 +1,4 @@
-/*
+/**
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
diff --git a/src/components/application_manager/include/application_manager/commands/hmi/on_tts_reset_timeout_notification.h b/src/components/application_manager/include/application_manager/commands/hmi/on_tts_reset_timeout_notification.h
index 11cb755544..3bafc920b7 100644
--- a/src/components/application_manager/include/application_manager/commands/hmi/on_tts_reset_timeout_notification.h
+++ b/src/components/application_manager/include/application_manager/commands/hmi/on_tts_reset_timeout_notification.h
@@ -1,4 +1,4 @@
-/*
+/**
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
diff --git a/src/components/application_manager/include/application_manager/commands/hmi/on_tts_started_notification.h b/src/components/application_manager/include/application_manager/commands/hmi/on_tts_started_notification.h
index c7e88ac558..8cb6256074 100644
--- a/src/components/application_manager/include/application_manager/commands/hmi/on_tts_started_notification.h
+++ b/src/components/application_manager/include/application_manager/commands/hmi/on_tts_started_notification.h
@@ -1,4 +1,4 @@
-/*
+/**
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
diff --git a/src/components/application_manager/include/application_manager/commands/hmi/on_tts_stopped_notification.h b/src/components/application_manager/include/application_manager/commands/hmi/on_tts_stopped_notification.h
index bf5dc7fb9e..31fb6fb31c 100644
--- a/src/components/application_manager/include/application_manager/commands/hmi/on_tts_stopped_notification.h
+++ b/src/components/application_manager/include/application_manager/commands/hmi/on_tts_stopped_notification.h
@@ -1,4 +1,4 @@
-/*
+/**
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
diff --git a/src/components/application_manager/include/application_manager/commands/hmi/on_ui_command_notification.h b/src/components/application_manager/include/application_manager/commands/hmi/on_ui_command_notification.h
index b4a0228c78..1d0aaf3078 100644
--- a/src/components/application_manager/include/application_manager/commands/hmi/on_ui_command_notification.h
+++ b/src/components/application_manager/include/application_manager/commands/hmi/on_ui_command_notification.h
@@ -1,4 +1,4 @@
-/*
+/**
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
diff --git a/src/components/application_manager/include/application_manager/commands/hmi/on_ui_keyboard_input_notification.h b/src/components/application_manager/include/application_manager/commands/hmi/on_ui_keyboard_input_notification.h
index 77b771065b..bb0a6a72d3 100644
--- a/src/components/application_manager/include/application_manager/commands/hmi/on_ui_keyboard_input_notification.h
+++ b/src/components/application_manager/include/application_manager/commands/hmi/on_ui_keyboard_input_notification.h
@@ -1,4 +1,4 @@
-/*
+/**
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
diff --git a/src/components/application_manager/include/application_manager/commands/hmi/on_ui_language_change_notification.h b/src/components/application_manager/include/application_manager/commands/hmi/on_ui_language_change_notification.h
index bcb661c89d..85b8f60c4d 100644
--- a/src/components/application_manager/include/application_manager/commands/hmi/on_ui_language_change_notification.h
+++ b/src/components/application_manager/include/application_manager/commands/hmi/on_ui_language_change_notification.h
@@ -1,4 +1,4 @@
-/*
+/**
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
diff --git a/src/components/application_manager/include/application_manager/commands/hmi/on_ui_reset_timeout_notification.h b/src/components/application_manager/include/application_manager/commands/hmi/on_ui_reset_timeout_notification.h
index f97c8768b5..511606d077 100644
--- a/src/components/application_manager/include/application_manager/commands/hmi/on_ui_reset_timeout_notification.h
+++ b/src/components/application_manager/include/application_manager/commands/hmi/on_ui_reset_timeout_notification.h
@@ -1,4 +1,4 @@
-/*
+/**
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
diff --git a/src/components/application_manager/include/application_manager/commands/hmi/on_ui_touch_event_notification.h b/src/components/application_manager/include/application_manager/commands/hmi/on_ui_touch_event_notification.h
index 6d8005e12f..3231d1ca29 100644
--- a/src/components/application_manager/include/application_manager/commands/hmi/on_ui_touch_event_notification.h
+++ b/src/components/application_manager/include/application_manager/commands/hmi/on_ui_touch_event_notification.h
@@ -1,4 +1,4 @@
-/*
+/**
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
diff --git a/src/components/application_manager/include/application_manager/commands/hmi/on_update_device_list.h b/src/components/application_manager/include/application_manager/commands/hmi/on_update_device_list.h
index f56d01a5cc..c0d355c925 100644
--- a/src/components/application_manager/include/application_manager/commands/hmi/on_update_device_list.h
+++ b/src/components/application_manager/include/application_manager/commands/hmi/on_update_device_list.h
@@ -1,4 +1,4 @@
-/*
+/**
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
diff --git a/src/components/application_manager/include/application_manager/commands/hmi/on_vi_acc_pedal_position_notification.h b/src/components/application_manager/include/application_manager/commands/hmi/on_vi_acc_pedal_position_notification.h
index d591ab2be6..04bb3e54bc 100644
--- a/src/components/application_manager/include/application_manager/commands/hmi/on_vi_acc_pedal_position_notification.h
+++ b/src/components/application_manager/include/application_manager/commands/hmi/on_vi_acc_pedal_position_notification.h
@@ -1,4 +1,4 @@
-/*
+/**
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
diff --git a/src/components/application_manager/include/application_manager/commands/hmi/on_vi_belt_status_notification.h b/src/components/application_manager/include/application_manager/commands/hmi/on_vi_belt_status_notification.h
index f901462fdf..3cfb048cdc 100644
--- a/src/components/application_manager/include/application_manager/commands/hmi/on_vi_belt_status_notification.h
+++ b/src/components/application_manager/include/application_manager/commands/hmi/on_vi_belt_status_notification.h
@@ -1,4 +1,4 @@
-/*
+/**
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
diff --git a/src/components/application_manager/include/application_manager/commands/hmi/on_vi_body_information_notification.h b/src/components/application_manager/include/application_manager/commands/hmi/on_vi_body_information_notification.h
index a0bc31778a..b9ecf5a34b 100644
--- a/src/components/application_manager/include/application_manager/commands/hmi/on_vi_body_information_notification.h
+++ b/src/components/application_manager/include/application_manager/commands/hmi/on_vi_body_information_notification.h
@@ -1,4 +1,4 @@
-/*
+/**
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
diff --git a/src/components/application_manager/include/application_manager/commands/hmi/on_vi_device_status_notification.h b/src/components/application_manager/include/application_manager/commands/hmi/on_vi_device_status_notification.h
index 0e24616f3e..925989e8c6 100644
--- a/src/components/application_manager/include/application_manager/commands/hmi/on_vi_device_status_notification.h
+++ b/src/components/application_manager/include/application_manager/commands/hmi/on_vi_device_status_notification.h
@@ -1,4 +1,4 @@
-/*
+/**
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
diff --git a/src/components/application_manager/include/application_manager/commands/hmi/on_vi_driver_braking_notification.h b/src/components/application_manager/include/application_manager/commands/hmi/on_vi_driver_braking_notification.h
index 0290388756..7baea90651 100644
--- a/src/components/application_manager/include/application_manager/commands/hmi/on_vi_driver_braking_notification.h
+++ b/src/components/application_manager/include/application_manager/commands/hmi/on_vi_driver_braking_notification.h
@@ -1,4 +1,4 @@
-/*
+/**
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
diff --git a/src/components/application_manager/include/application_manager/commands/hmi/on_vi_engine_torque_notification.h b/src/components/application_manager/include/application_manager/commands/hmi/on_vi_engine_torque_notification.h
index 8307e5359e..33dd824c6e 100644
--- a/src/components/application_manager/include/application_manager/commands/hmi/on_vi_engine_torque_notification.h
+++ b/src/components/application_manager/include/application_manager/commands/hmi/on_vi_engine_torque_notification.h
@@ -1,4 +1,4 @@
-/*
+/**
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
diff --git a/src/components/application_manager/include/application_manager/commands/hmi/on_vi_external_temperature_notification.h b/src/components/application_manager/include/application_manager/commands/hmi/on_vi_external_temperature_notification.h
index be5b086853..207302a373 100644
--- a/src/components/application_manager/include/application_manager/commands/hmi/on_vi_external_temperature_notification.h
+++ b/src/components/application_manager/include/application_manager/commands/hmi/on_vi_external_temperature_notification.h
@@ -1,4 +1,4 @@
-/*
+/**
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
diff --git a/src/components/application_manager/include/application_manager/commands/hmi/on_vi_fuel_level_notification.h b/src/components/application_manager/include/application_manager/commands/hmi/on_vi_fuel_level_notification.h
index 83e6f845e0..535758db25 100644
--- a/src/components/application_manager/include/application_manager/commands/hmi/on_vi_fuel_level_notification.h
+++ b/src/components/application_manager/include/application_manager/commands/hmi/on_vi_fuel_level_notification.h
@@ -1,4 +1,4 @@
-/*
+/**
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
diff --git a/src/components/application_manager/include/application_manager/commands/hmi/on_vi_fuel_level_state_notification.h b/src/components/application_manager/include/application_manager/commands/hmi/on_vi_fuel_level_state_notification.h
index 42a6b8e0d9..92dffd89b3 100644
--- a/src/components/application_manager/include/application_manager/commands/hmi/on_vi_fuel_level_state_notification.h
+++ b/src/components/application_manager/include/application_manager/commands/hmi/on_vi_fuel_level_state_notification.h
@@ -1,4 +1,4 @@
-/*
+/**
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
diff --git a/src/components/application_manager/include/application_manager/commands/hmi/on_vi_gps_data_notification.h b/src/components/application_manager/include/application_manager/commands/hmi/on_vi_gps_data_notification.h
index 01c2cf60b6..d8f2a768fc 100644
--- a/src/components/application_manager/include/application_manager/commands/hmi/on_vi_gps_data_notification.h
+++ b/src/components/application_manager/include/application_manager/commands/hmi/on_vi_gps_data_notification.h
@@ -1,4 +1,4 @@
-/*
+/**
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
diff --git a/src/components/application_manager/include/application_manager/commands/hmi/on_vi_head_lamp_status_notification.h b/src/components/application_manager/include/application_manager/commands/hmi/on_vi_head_lamp_status_notification.h
index dc80b33ddd..47802e97eb 100644
--- a/src/components/application_manager/include/application_manager/commands/hmi/on_vi_head_lamp_status_notification.h
+++ b/src/components/application_manager/include/application_manager/commands/hmi/on_vi_head_lamp_status_notification.h
@@ -1,4 +1,4 @@
-/*
+/**
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
diff --git a/src/components/application_manager/include/application_manager/commands/hmi/on_vi_instant_fuel_consumption_notification.h b/src/components/application_manager/include/application_manager/commands/hmi/on_vi_instant_fuel_consumption_notification.h
index c4e5accead..fe38412980 100644
--- a/src/components/application_manager/include/application_manager/commands/hmi/on_vi_instant_fuel_consumption_notification.h
+++ b/src/components/application_manager/include/application_manager/commands/hmi/on_vi_instant_fuel_consumption_notification.h
@@ -1,4 +1,4 @@
-/*
+/**
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
diff --git a/src/components/application_manager/include/application_manager/commands/hmi/on_vi_my_key_notification.h b/src/components/application_manager/include/application_manager/commands/hmi/on_vi_my_key_notification.h
index e2d9d91ae1..d636b6e779 100644
--- a/src/components/application_manager/include/application_manager/commands/hmi/on_vi_my_key_notification.h
+++ b/src/components/application_manager/include/application_manager/commands/hmi/on_vi_my_key_notification.h
@@ -1,4 +1,4 @@
-/*
+/**
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
diff --git a/src/components/application_manager/include/application_manager/commands/hmi/on_vi_odometer_notification.h b/src/components/application_manager/include/application_manager/commands/hmi/on_vi_odometer_notification.h
index 7c1c691ac5..1cf4c25878 100644
--- a/src/components/application_manager/include/application_manager/commands/hmi/on_vi_odometer_notification.h
+++ b/src/components/application_manager/include/application_manager/commands/hmi/on_vi_odometer_notification.h
@@ -1,4 +1,4 @@
-/*
+/**
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
diff --git a/src/components/application_manager/include/application_manager/commands/hmi/on_vi_prndl_notification.h b/src/components/application_manager/include/application_manager/commands/hmi/on_vi_prndl_notification.h
index bf2ca83f8f..5a3a136374 100644
--- a/src/components/application_manager/include/application_manager/commands/hmi/on_vi_prndl_notification.h
+++ b/src/components/application_manager/include/application_manager/commands/hmi/on_vi_prndl_notification.h
@@ -1,4 +1,4 @@
-/*
+/**
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
diff --git a/src/components/application_manager/include/application_manager/commands/hmi/on_vi_rpm_notification.h b/src/components/application_manager/include/application_manager/commands/hmi/on_vi_rpm_notification.h
index ebcfe3a86c..80dea2a6e2 100644
--- a/src/components/application_manager/include/application_manager/commands/hmi/on_vi_rpm_notification.h
+++ b/src/components/application_manager/include/application_manager/commands/hmi/on_vi_rpm_notification.h
@@ -1,4 +1,4 @@
-/*
+/**
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
diff --git a/src/components/application_manager/include/application_manager/commands/hmi/on_vi_speed_notification.h b/src/components/application_manager/include/application_manager/commands/hmi/on_vi_speed_notification.h
index 37bf66e4d0..19bffabf4f 100644
--- a/src/components/application_manager/include/application_manager/commands/hmi/on_vi_speed_notification.h
+++ b/src/components/application_manager/include/application_manager/commands/hmi/on_vi_speed_notification.h
@@ -1,4 +1,4 @@
-/*
+/**
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
diff --git a/src/components/application_manager/include/application_manager/commands/hmi/on_vi_steering_wheel_angle_notification.h b/src/components/application_manager/include/application_manager/commands/hmi/on_vi_steering_wheel_angle_notification.h
index bf01b2bf76..0826cb6c6f 100644
--- a/src/components/application_manager/include/application_manager/commands/hmi/on_vi_steering_wheel_angle_notification.h
+++ b/src/components/application_manager/include/application_manager/commands/hmi/on_vi_steering_wheel_angle_notification.h
@@ -1,4 +1,4 @@
-/*
+/**
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
diff --git a/src/components/application_manager/include/application_manager/commands/hmi/on_vi_tire_pressure_notification.h b/src/components/application_manager/include/application_manager/commands/hmi/on_vi_tire_pressure_notification.h
index 1c1e00d893..ba8eceefc3 100644
--- a/src/components/application_manager/include/application_manager/commands/hmi/on_vi_tire_pressure_notification.h
+++ b/src/components/application_manager/include/application_manager/commands/hmi/on_vi_tire_pressure_notification.h
@@ -1,4 +1,4 @@
-/*
+/**
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
diff --git a/src/components/application_manager/include/application_manager/commands/hmi/on_vi_vehicle_data_notification.h b/src/components/application_manager/include/application_manager/commands/hmi/on_vi_vehicle_data_notification.h
index 59da271a04..30ad9d6acc 100644
--- a/src/components/application_manager/include/application_manager/commands/hmi/on_vi_vehicle_data_notification.h
+++ b/src/components/application_manager/include/application_manager/commands/hmi/on_vi_vehicle_data_notification.h
@@ -1,4 +1,4 @@
-/*
+/**
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
diff --git a/src/components/application_manager/include/application_manager/commands/hmi/on_vi_vin_notification.h b/src/components/application_manager/include/application_manager/commands/hmi/on_vi_vin_notification.h
index 06b73c508d..0cb5fb17d2 100644
--- a/src/components/application_manager/include/application_manager/commands/hmi/on_vi_vin_notification.h
+++ b/src/components/application_manager/include/application_manager/commands/hmi/on_vi_vin_notification.h
@@ -1,4 +1,4 @@
-/*
+/**
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
diff --git a/src/components/application_manager/include/application_manager/commands/hmi/on_vi_wiper_status_notification.h b/src/components/application_manager/include/application_manager/commands/hmi/on_vi_wiper_status_notification.h
index 399b38112e..c7a1a6bd62 100644
--- a/src/components/application_manager/include/application_manager/commands/hmi/on_vi_wiper_status_notification.h
+++ b/src/components/application_manager/include/application_manager/commands/hmi/on_vi_wiper_status_notification.h
@@ -1,4 +1,4 @@
-/*
+/**
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
diff --git a/src/components/application_manager/include/application_manager/commands/hmi/on_vr_command_notification.h b/src/components/application_manager/include/application_manager/commands/hmi/on_vr_command_notification.h
index 37bc2556f8..677bc26727 100644
--- a/src/components/application_manager/include/application_manager/commands/hmi/on_vr_command_notification.h
+++ b/src/components/application_manager/include/application_manager/commands/hmi/on_vr_command_notification.h
@@ -1,4 +1,4 @@
-/*
+/**
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
diff --git a/src/components/application_manager/include/application_manager/commands/hmi/on_vr_language_change_notification.h b/src/components/application_manager/include/application_manager/commands/hmi/on_vr_language_change_notification.h
index be408f0aa0..24c60c32d9 100644
--- a/src/components/application_manager/include/application_manager/commands/hmi/on_vr_language_change_notification.h
+++ b/src/components/application_manager/include/application_manager/commands/hmi/on_vr_language_change_notification.h
@@ -1,4 +1,4 @@
-/*
+/**
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
diff --git a/src/components/application_manager/include/application_manager/commands/hmi/on_vr_started_notification.h b/src/components/application_manager/include/application_manager/commands/hmi/on_vr_started_notification.h
index 5ae5ace27b..cc78f010b6 100644
--- a/src/components/application_manager/include/application_manager/commands/hmi/on_vr_started_notification.h
+++ b/src/components/application_manager/include/application_manager/commands/hmi/on_vr_started_notification.h
@@ -1,4 +1,4 @@
-/*
+/**
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
diff --git a/src/components/application_manager/include/application_manager/commands/hmi/on_vr_stopped_notification.h b/src/components/application_manager/include/application_manager/commands/hmi/on_vr_stopped_notification.h
index 311ee8acde..2ee8ad429e 100644
--- a/src/components/application_manager/include/application_manager/commands/hmi/on_vr_stopped_notification.h
+++ b/src/components/application_manager/include/application_manager/commands/hmi/on_vr_stopped_notification.h
@@ -1,4 +1,4 @@
-/*
+/**
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
diff --git a/src/components/application_manager/include/application_manager/commands/hmi/request_from_hmi.h b/src/components/application_manager/include/application_manager/commands/hmi/request_from_hmi.h
index b9b3ec3597..39ebd95819 100644
--- a/src/components/application_manager/include/application_manager/commands/hmi/request_from_hmi.h
+++ b/src/components/application_manager/include/application_manager/commands/hmi/request_from_hmi.h
@@ -1,4 +1,4 @@
- /*
+ /**
Copyright (c) 2014, Ford Motor Company
All rights reserved.
diff --git a/src/components/application_manager/include/application_manager/commands/hmi/request_to_hmi.h b/src/components/application_manager/include/application_manager/commands/hmi/request_to_hmi.h
index fe359182dd..3a9de4b7b5 100644
--- a/src/components/application_manager/include/application_manager/commands/hmi/request_to_hmi.h
+++ b/src/components/application_manager/include/application_manager/commands/hmi/request_to_hmi.h
@@ -1,4 +1,4 @@
-/*
+/**
Copyright (c) 2014, Ford Motor Company
All rights reserved.
diff --git a/src/components/application_manager/include/application_manager/commands/hmi/response_from_hmi.h b/src/components/application_manager/include/application_manager/commands/hmi/response_from_hmi.h
index c888807e96..21497a1335 100644
--- a/src/components/application_manager/include/application_manager/commands/hmi/response_from_hmi.h
+++ b/src/components/application_manager/include/application_manager/commands/hmi/response_from_hmi.h
@@ -1,4 +1,4 @@
-/*
+/**
Copyright (c) 2014, Ford Motor Company
All rights reserved.
diff --git a/src/components/application_manager/include/application_manager/commands/hmi/sdl_activate_app_request.h b/src/components/application_manager/include/application_manager/commands/hmi/sdl_activate_app_request.h
index 2505b39acc..db4a93b0b5 100644
--- a/src/components/application_manager/include/application_manager/commands/hmi/sdl_activate_app_request.h
+++ b/src/components/application_manager/include/application_manager/commands/hmi/sdl_activate_app_request.h
@@ -1,4 +1,4 @@
-/*
+/**
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
diff --git a/src/components/application_manager/include/application_manager/commands/hmi/sdl_activate_app_response.h b/src/components/application_manager/include/application_manager/commands/hmi/sdl_activate_app_response.h
index bf0789e60e..63adc6c0d3 100644
--- a/src/components/application_manager/include/application_manager/commands/hmi/sdl_activate_app_response.h
+++ b/src/components/application_manager/include/application_manager/commands/hmi/sdl_activate_app_response.h
@@ -1,4 +1,4 @@
-/*
+/**
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
diff --git a/src/components/application_manager/include/application_manager/commands/hmi/sdl_get_list_of_permissions_request.h b/src/components/application_manager/include/application_manager/commands/hmi/sdl_get_list_of_permissions_request.h
index 7c8f10529b..5da473b1a7 100644
--- a/src/components/application_manager/include/application_manager/commands/hmi/sdl_get_list_of_permissions_request.h
+++ b/src/components/application_manager/include/application_manager/commands/hmi/sdl_get_list_of_permissions_request.h
@@ -1,4 +1,4 @@
-/*
+/**
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
diff --git a/src/components/application_manager/include/application_manager/commands/hmi/sdl_get_list_of_permissions_response.h b/src/components/application_manager/include/application_manager/commands/hmi/sdl_get_list_of_permissions_response.h
index 452784d92c..5de9fc0ea8 100644
--- a/src/components/application_manager/include/application_manager/commands/hmi/sdl_get_list_of_permissions_response.h
+++ b/src/components/application_manager/include/application_manager/commands/hmi/sdl_get_list_of_permissions_response.h
@@ -1,4 +1,4 @@
-/*
+/**
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
diff --git a/src/components/application_manager/include/application_manager/commands/hmi/sdl_get_status_update_request.h b/src/components/application_manager/include/application_manager/commands/hmi/sdl_get_status_update_request.h
index cb7d37d336..a098e0a113 100644
--- a/src/components/application_manager/include/application_manager/commands/hmi/sdl_get_status_update_request.h
+++ b/src/components/application_manager/include/application_manager/commands/hmi/sdl_get_status_update_request.h
@@ -1,4 +1,4 @@
-/*
+/**
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
diff --git a/src/components/application_manager/include/application_manager/commands/hmi/sdl_get_status_update_response.h b/src/components/application_manager/include/application_manager/commands/hmi/sdl_get_status_update_response.h
index a3fc0862b5..6299cde630 100644
--- a/src/components/application_manager/include/application_manager/commands/hmi/sdl_get_status_update_response.h
+++ b/src/components/application_manager/include/application_manager/commands/hmi/sdl_get_status_update_response.h
@@ -1,4 +1,4 @@
-/*
+/**
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
diff --git a/src/components/application_manager/include/application_manager/commands/hmi/sdl_get_user_friendly_message_request.h b/src/components/application_manager/include/application_manager/commands/hmi/sdl_get_user_friendly_message_request.h
index 96f46cfa3d..b729a16170 100644
--- a/src/components/application_manager/include/application_manager/commands/hmi/sdl_get_user_friendly_message_request.h
+++ b/src/components/application_manager/include/application_manager/commands/hmi/sdl_get_user_friendly_message_request.h
@@ -1,4 +1,4 @@
-/*
+/**
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
diff --git a/src/components/application_manager/include/application_manager/commands/hmi/sdl_get_user_friendly_message_response.h b/src/components/application_manager/include/application_manager/commands/hmi/sdl_get_user_friendly_message_response.h
index 4cf7be56c9..bb7a7f8e20 100644
--- a/src/components/application_manager/include/application_manager/commands/hmi/sdl_get_user_friendly_message_response.h
+++ b/src/components/application_manager/include/application_manager/commands/hmi/sdl_get_user_friendly_message_response.h
@@ -1,4 +1,4 @@
-/*
+/**
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
diff --git a/src/components/application_manager/include/application_manager/commands/hmi/sdl_policy_update.h b/src/components/application_manager/include/application_manager/commands/hmi/sdl_policy_update.h
index 481f37a257..ee2b9865c8 100644
--- a/src/components/application_manager/include/application_manager/commands/hmi/sdl_policy_update.h
+++ b/src/components/application_manager/include/application_manager/commands/hmi/sdl_policy_update.h
@@ -1,4 +1,4 @@
-/*
+/**
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
diff --git a/src/components/application_manager/include/application_manager/commands/hmi/sdl_policy_update_response.h b/src/components/application_manager/include/application_manager/commands/hmi/sdl_policy_update_response.h
index d3f7105523..b6ab925fd6 100644
--- a/src/components/application_manager/include/application_manager/commands/hmi/sdl_policy_update_response.h
+++ b/src/components/application_manager/include/application_manager/commands/hmi/sdl_policy_update_response.h
@@ -1,4 +1,4 @@
-/*
+/**
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
diff --git a/src/components/application_manager/include/application_manager/commands/hmi/tts_change_registration_request.h b/src/components/application_manager/include/application_manager/commands/hmi/tts_change_registration_request.h
index a25309e5d5..a587af950b 100644
--- a/src/components/application_manager/include/application_manager/commands/hmi/tts_change_registration_request.h
+++ b/src/components/application_manager/include/application_manager/commands/hmi/tts_change_registration_request.h
@@ -1,4 +1,4 @@
-/*
+/**
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
diff --git a/src/components/application_manager/include/application_manager/commands/hmi/tts_change_registration_response.h b/src/components/application_manager/include/application_manager/commands/hmi/tts_change_registration_response.h
index 73ad180286..3a9e9fda51 100644
--- a/src/components/application_manager/include/application_manager/commands/hmi/tts_change_registration_response.h
+++ b/src/components/application_manager/include/application_manager/commands/hmi/tts_change_registration_response.h
@@ -1,4 +1,4 @@
-/*
+/**
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
diff --git a/src/components/application_manager/include/application_manager/commands/hmi/tts_get_capabilities_request.h b/src/components/application_manager/include/application_manager/commands/hmi/tts_get_capabilities_request.h
index 543945e8ef..73edd9de73 100644
--- a/src/components/application_manager/include/application_manager/commands/hmi/tts_get_capabilities_request.h
+++ b/src/components/application_manager/include/application_manager/commands/hmi/tts_get_capabilities_request.h
@@ -1,4 +1,4 @@
-/*
+/**
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
diff --git a/src/components/application_manager/include/application_manager/commands/hmi/tts_get_capabilities_response.h b/src/components/application_manager/include/application_manager/commands/hmi/tts_get_capabilities_response.h
index 2fc16d1a40..71f85d68e3 100644
--- a/src/components/application_manager/include/application_manager/commands/hmi/tts_get_capabilities_response.h
+++ b/src/components/application_manager/include/application_manager/commands/hmi/tts_get_capabilities_response.h
@@ -1,4 +1,4 @@
-/*
+/**
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
diff --git a/src/components/application_manager/include/application_manager/commands/hmi/tts_get_language_request.h b/src/components/application_manager/include/application_manager/commands/hmi/tts_get_language_request.h
index e0ae0da0c4..94e38ec473 100644
--- a/src/components/application_manager/include/application_manager/commands/hmi/tts_get_language_request.h
+++ b/src/components/application_manager/include/application_manager/commands/hmi/tts_get_language_request.h
@@ -1,4 +1,4 @@
-/*
+/**
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
diff --git a/src/components/application_manager/include/application_manager/commands/hmi/tts_get_language_response.h b/src/components/application_manager/include/application_manager/commands/hmi/tts_get_language_response.h
index 0d9df07ae6..bd67d64f32 100644
--- a/src/components/application_manager/include/application_manager/commands/hmi/tts_get_language_response.h
+++ b/src/components/application_manager/include/application_manager/commands/hmi/tts_get_language_response.h
@@ -1,4 +1,4 @@
-/*
+/**
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
diff --git a/src/components/application_manager/include/application_manager/commands/hmi/tts_get_supported_languages_request.h b/src/components/application_manager/include/application_manager/commands/hmi/tts_get_supported_languages_request.h
index 136edbb5f4..ff80dd2389 100644
--- a/src/components/application_manager/include/application_manager/commands/hmi/tts_get_supported_languages_request.h
+++ b/src/components/application_manager/include/application_manager/commands/hmi/tts_get_supported_languages_request.h
@@ -1,4 +1,4 @@
-/*
+/**
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
diff --git a/src/components/application_manager/include/application_manager/commands/hmi/tts_get_supported_languages_response.h b/src/components/application_manager/include/application_manager/commands/hmi/tts_get_supported_languages_response.h
index 38e3c673bb..244f223460 100644
--- a/src/components/application_manager/include/application_manager/commands/hmi/tts_get_supported_languages_response.h
+++ b/src/components/application_manager/include/application_manager/commands/hmi/tts_get_supported_languages_response.h
@@ -1,4 +1,4 @@
-/*
+/**
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
diff --git a/src/components/application_manager/include/application_manager/commands/hmi/tts_is_ready_request.h b/src/components/application_manager/include/application_manager/commands/hmi/tts_is_ready_request.h
index 676faabc01..dc58d852ea 100644
--- a/src/components/application_manager/include/application_manager/commands/hmi/tts_is_ready_request.h
+++ b/src/components/application_manager/include/application_manager/commands/hmi/tts_is_ready_request.h
@@ -1,4 +1,4 @@
-/*
+/**
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
diff --git a/src/components/application_manager/include/application_manager/commands/hmi/tts_is_ready_response.h b/src/components/application_manager/include/application_manager/commands/hmi/tts_is_ready_response.h
index 12bb3bb870..375e5a5d1f 100644
--- a/src/components/application_manager/include/application_manager/commands/hmi/tts_is_ready_response.h
+++ b/src/components/application_manager/include/application_manager/commands/hmi/tts_is_ready_response.h
@@ -1,4 +1,4 @@
-/*
+/**
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
diff --git a/src/components/application_manager/include/application_manager/commands/hmi/tts_set_global_properties_request.h b/src/components/application_manager/include/application_manager/commands/hmi/tts_set_global_properties_request.h
index 92a260d77f..b398e0b2d2 100644
--- a/src/components/application_manager/include/application_manager/commands/hmi/tts_set_global_properties_request.h
+++ b/src/components/application_manager/include/application_manager/commands/hmi/tts_set_global_properties_request.h
@@ -1,4 +1,4 @@
-/*
+/**
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
diff --git a/src/components/application_manager/include/application_manager/commands/hmi/tts_set_global_properties_response.h b/src/components/application_manager/include/application_manager/commands/hmi/tts_set_global_properties_response.h
index 0766decf9f..adf0b70276 100644
--- a/src/components/application_manager/include/application_manager/commands/hmi/tts_set_global_properties_response.h
+++ b/src/components/application_manager/include/application_manager/commands/hmi/tts_set_global_properties_response.h
@@ -1,4 +1,4 @@
-/*
+/**
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
diff --git a/src/components/application_manager/include/application_manager/commands/hmi/tts_speak_request.h b/src/components/application_manager/include/application_manager/commands/hmi/tts_speak_request.h
index f5555f6495..326c638f4d 100644
--- a/src/components/application_manager/include/application_manager/commands/hmi/tts_speak_request.h
+++ b/src/components/application_manager/include/application_manager/commands/hmi/tts_speak_request.h
@@ -1,4 +1,4 @@
-/*
+/**
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
diff --git a/src/components/application_manager/include/application_manager/commands/hmi/tts_speak_response.h b/src/components/application_manager/include/application_manager/commands/hmi/tts_speak_response.h
index 541ea0d2ab..e22c549871 100644
--- a/src/components/application_manager/include/application_manager/commands/hmi/tts_speak_response.h
+++ b/src/components/application_manager/include/application_manager/commands/hmi/tts_speak_response.h
@@ -1,4 +1,4 @@
-/*
+/**
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
diff --git a/src/components/application_manager/include/application_manager/commands/hmi/tts_stop_speaking_request.h b/src/components/application_manager/include/application_manager/commands/hmi/tts_stop_speaking_request.h
index 46c464425d..0d82121fd7 100644
--- a/src/components/application_manager/include/application_manager/commands/hmi/tts_stop_speaking_request.h
+++ b/src/components/application_manager/include/application_manager/commands/hmi/tts_stop_speaking_request.h
@@ -1,4 +1,4 @@
-/*
+/**
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
diff --git a/src/components/application_manager/include/application_manager/commands/hmi/tts_stop_speaking_response.h b/src/components/application_manager/include/application_manager/commands/hmi/tts_stop_speaking_response.h
index aab8ca8c5b..b9055bfbe5 100644
--- a/src/components/application_manager/include/application_manager/commands/hmi/tts_stop_speaking_response.h
+++ b/src/components/application_manager/include/application_manager/commands/hmi/tts_stop_speaking_response.h
@@ -1,4 +1,4 @@
-/*
+/**
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
diff --git a/src/components/application_manager/include/application_manager/commands/hmi/ui_add_command_request.h b/src/components/application_manager/include/application_manager/commands/hmi/ui_add_command_request.h
index 6b857818e7..ffd6eeeefd 100644
--- a/src/components/application_manager/include/application_manager/commands/hmi/ui_add_command_request.h
+++ b/src/components/application_manager/include/application_manager/commands/hmi/ui_add_command_request.h
@@ -1,4 +1,4 @@
-/*
+/**
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
diff --git a/src/components/application_manager/include/application_manager/commands/hmi/ui_add_command_response.h b/src/components/application_manager/include/application_manager/commands/hmi/ui_add_command_response.h
index c6a02fdd03..f84b71d0f1 100644
--- a/src/components/application_manager/include/application_manager/commands/hmi/ui_add_command_response.h
+++ b/src/components/application_manager/include/application_manager/commands/hmi/ui_add_command_response.h
@@ -1,4 +1,4 @@
-/*
+/**
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
diff --git a/src/components/application_manager/include/application_manager/commands/hmi/ui_add_submenu_request.h b/src/components/application_manager/include/application_manager/commands/hmi/ui_add_submenu_request.h
index bba9a4c47e..1227de0463 100644
--- a/src/components/application_manager/include/application_manager/commands/hmi/ui_add_submenu_request.h
+++ b/src/components/application_manager/include/application_manager/commands/hmi/ui_add_submenu_request.h
@@ -1,4 +1,4 @@
-/*
+/**
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
diff --git a/src/components/application_manager/include/application_manager/commands/hmi/ui_add_submenu_response.h b/src/components/application_manager/include/application_manager/commands/hmi/ui_add_submenu_response.h
index 0c4afc2fa3..1b3a10729e 100644
--- a/src/components/application_manager/include/application_manager/commands/hmi/ui_add_submenu_response.h
+++ b/src/components/application_manager/include/application_manager/commands/hmi/ui_add_submenu_response.h
@@ -1,4 +1,4 @@
-/*
+/**
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
diff --git a/src/components/application_manager/include/application_manager/commands/hmi/ui_alert_request.h b/src/components/application_manager/include/application_manager/commands/hmi/ui_alert_request.h
index 72cd733eb5..7395eb19e1 100644
--- a/src/components/application_manager/include/application_manager/commands/hmi/ui_alert_request.h
+++ b/src/components/application_manager/include/application_manager/commands/hmi/ui_alert_request.h
@@ -1,4 +1,4 @@
-/*
+/**
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
diff --git a/src/components/application_manager/include/application_manager/commands/hmi/ui_alert_response.h b/src/components/application_manager/include/application_manager/commands/hmi/ui_alert_response.h
index 97eb2ba94b..1d17d98095 100644
--- a/src/components/application_manager/include/application_manager/commands/hmi/ui_alert_response.h
+++ b/src/components/application_manager/include/application_manager/commands/hmi/ui_alert_response.h
@@ -1,4 +1,4 @@
-/*
+/**
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
diff --git a/src/components/application_manager/include/application_manager/commands/hmi/ui_change_registration_request.h b/src/components/application_manager/include/application_manager/commands/hmi/ui_change_registration_request.h
index 8e68dee2ec..51276b7b0f 100644
--- a/src/components/application_manager/include/application_manager/commands/hmi/ui_change_registration_request.h
+++ b/src/components/application_manager/include/application_manager/commands/hmi/ui_change_registration_request.h
@@ -1,4 +1,4 @@
-/*
+/**
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
diff --git a/src/components/application_manager/include/application_manager/commands/hmi/ui_change_registration_response.h b/src/components/application_manager/include/application_manager/commands/hmi/ui_change_registration_response.h
index 50b092639b..edb7574e8d 100644
--- a/src/components/application_manager/include/application_manager/commands/hmi/ui_change_registration_response.h
+++ b/src/components/application_manager/include/application_manager/commands/hmi/ui_change_registration_response.h
@@ -1,4 +1,4 @@
-/*
+/**
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
diff --git a/src/components/application_manager/include/application_manager/commands/hmi/ui_delete_command_request.h b/src/components/application_manager/include/application_manager/commands/hmi/ui_delete_command_request.h
index 9eceb2eb6f..398f78c28f 100644
--- a/src/components/application_manager/include/application_manager/commands/hmi/ui_delete_command_request.h
+++ b/src/components/application_manager/include/application_manager/commands/hmi/ui_delete_command_request.h
@@ -1,4 +1,4 @@
-/*
+/**
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
diff --git a/src/components/application_manager/include/application_manager/commands/hmi/ui_delete_command_response.h b/src/components/application_manager/include/application_manager/commands/hmi/ui_delete_command_response.h
index c4d7ab6cac..bb19811908 100644
--- a/src/components/application_manager/include/application_manager/commands/hmi/ui_delete_command_response.h
+++ b/src/components/application_manager/include/application_manager/commands/hmi/ui_delete_command_response.h
@@ -1,4 +1,4 @@
-/*
+/**
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
diff --git a/src/components/application_manager/include/application_manager/commands/hmi/ui_delete_submenu_request.h b/src/components/application_manager/include/application_manager/commands/hmi/ui_delete_submenu_request.h
index 24bf5878ff..1b3747234b 100644
--- a/src/components/application_manager/include/application_manager/commands/hmi/ui_delete_submenu_request.h
+++ b/src/components/application_manager/include/application_manager/commands/hmi/ui_delete_submenu_request.h
@@ -1,4 +1,4 @@
-/*
+/**
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
diff --git a/src/components/application_manager/include/application_manager/commands/hmi/ui_delete_submenu_response.h b/src/components/application_manager/include/application_manager/commands/hmi/ui_delete_submenu_response.h
index 05d77c82d7..8bbab99468 100644
--- a/src/components/application_manager/include/application_manager/commands/hmi/ui_delete_submenu_response.h
+++ b/src/components/application_manager/include/application_manager/commands/hmi/ui_delete_submenu_response.h
@@ -1,4 +1,4 @@
-/*
+/**
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
diff --git a/src/components/application_manager/include/application_manager/commands/hmi/ui_end_audio_pass_thru_request.h b/src/components/application_manager/include/application_manager/commands/hmi/ui_end_audio_pass_thru_request.h
index 06637fc8d4..9e8e11c1ad 100644
--- a/src/components/application_manager/include/application_manager/commands/hmi/ui_end_audio_pass_thru_request.h
+++ b/src/components/application_manager/include/application_manager/commands/hmi/ui_end_audio_pass_thru_request.h
@@ -1,4 +1,4 @@
-/*
+/**
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
diff --git a/src/components/application_manager/include/application_manager/commands/hmi/ui_end_audio_pass_thru_response.h b/src/components/application_manager/include/application_manager/commands/hmi/ui_end_audio_pass_thru_response.h
index 6d5594f69f..740fc5501d 100644
--- a/src/components/application_manager/include/application_manager/commands/hmi/ui_end_audio_pass_thru_response.h
+++ b/src/components/application_manager/include/application_manager/commands/hmi/ui_end_audio_pass_thru_response.h
@@ -1,4 +1,4 @@
-/*
+/**
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
diff --git a/src/components/application_manager/include/application_manager/commands/hmi/ui_get_capabilities_request.h b/src/components/application_manager/include/application_manager/commands/hmi/ui_get_capabilities_request.h
index ad9a566078..2d0469d6a6 100644
--- a/src/components/application_manager/include/application_manager/commands/hmi/ui_get_capabilities_request.h
+++ b/src/components/application_manager/include/application_manager/commands/hmi/ui_get_capabilities_request.h
@@ -1,4 +1,4 @@
-/*
+/**
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
diff --git a/src/components/application_manager/include/application_manager/commands/hmi/ui_get_capabilities_response.h b/src/components/application_manager/include/application_manager/commands/hmi/ui_get_capabilities_response.h
index ce6ad6f7ef..dc6052e049 100644
--- a/src/components/application_manager/include/application_manager/commands/hmi/ui_get_capabilities_response.h
+++ b/src/components/application_manager/include/application_manager/commands/hmi/ui_get_capabilities_response.h
@@ -1,4 +1,4 @@
-/*
+/**
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
diff --git a/src/components/application_manager/include/application_manager/commands/hmi/ui_get_language_request.h b/src/components/application_manager/include/application_manager/commands/hmi/ui_get_language_request.h
index 7371cd1031..4fca4826be 100644
--- a/src/components/application_manager/include/application_manager/commands/hmi/ui_get_language_request.h
+++ b/src/components/application_manager/include/application_manager/commands/hmi/ui_get_language_request.h
@@ -1,4 +1,4 @@
-/*
+/**
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
diff --git a/src/components/application_manager/include/application_manager/commands/hmi/ui_get_language_response.h b/src/components/application_manager/include/application_manager/commands/hmi/ui_get_language_response.h
index f6536452ce..ea43e3856d 100644
--- a/src/components/application_manager/include/application_manager/commands/hmi/ui_get_language_response.h
+++ b/src/components/application_manager/include/application_manager/commands/hmi/ui_get_language_response.h
@@ -1,4 +1,4 @@
-/*
+/**
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
diff --git a/src/components/application_manager/include/application_manager/commands/hmi/ui_get_supported_languages_request.h b/src/components/application_manager/include/application_manager/commands/hmi/ui_get_supported_languages_request.h
index d0975e68da..cc0e70feae 100644
--- a/src/components/application_manager/include/application_manager/commands/hmi/ui_get_supported_languages_request.h
+++ b/src/components/application_manager/include/application_manager/commands/hmi/ui_get_supported_languages_request.h
@@ -1,4 +1,4 @@
-/*
+/**
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
diff --git a/src/components/application_manager/include/application_manager/commands/hmi/ui_get_supported_languages_response.h b/src/components/application_manager/include/application_manager/commands/hmi/ui_get_supported_languages_response.h
index c888c7b208..15e400687f 100644
--- a/src/components/application_manager/include/application_manager/commands/hmi/ui_get_supported_languages_response.h
+++ b/src/components/application_manager/include/application_manager/commands/hmi/ui_get_supported_languages_response.h
@@ -1,4 +1,4 @@
-/*
+/**
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
diff --git a/src/components/application_manager/include/application_manager/commands/hmi/ui_is_ready_request.h b/src/components/application_manager/include/application_manager/commands/hmi/ui_is_ready_request.h
index 7cb4287244..5e2cb7ef9f 100644
--- a/src/components/application_manager/include/application_manager/commands/hmi/ui_is_ready_request.h
+++ b/src/components/application_manager/include/application_manager/commands/hmi/ui_is_ready_request.h
@@ -1,4 +1,4 @@
-/*
+/**
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
diff --git a/src/components/application_manager/include/application_manager/commands/hmi/ui_is_ready_response.h b/src/components/application_manager/include/application_manager/commands/hmi/ui_is_ready_response.h
index 64106654e9..bc7210f2a8 100644
--- a/src/components/application_manager/include/application_manager/commands/hmi/ui_is_ready_response.h
+++ b/src/components/application_manager/include/application_manager/commands/hmi/ui_is_ready_response.h
@@ -1,4 +1,4 @@
-/*
+/**
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
diff --git a/src/components/application_manager/include/application_manager/commands/hmi/ui_perform_audio_pass_thru_request.h b/src/components/application_manager/include/application_manager/commands/hmi/ui_perform_audio_pass_thru_request.h
index 69566324f2..94bc4827a9 100644
--- a/src/components/application_manager/include/application_manager/commands/hmi/ui_perform_audio_pass_thru_request.h
+++ b/src/components/application_manager/include/application_manager/commands/hmi/ui_perform_audio_pass_thru_request.h
@@ -1,4 +1,4 @@
-/*
+/**
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
diff --git a/src/components/application_manager/include/application_manager/commands/hmi/ui_perform_audio_pass_thru_response.h b/src/components/application_manager/include/application_manager/commands/hmi/ui_perform_audio_pass_thru_response.h
index c3283101f9..04afedfba0 100644
--- a/src/components/application_manager/include/application_manager/commands/hmi/ui_perform_audio_pass_thru_response.h
+++ b/src/components/application_manager/include/application_manager/commands/hmi/ui_perform_audio_pass_thru_response.h
@@ -1,4 +1,4 @@
-/*
+/**
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
diff --git a/src/components/application_manager/include/application_manager/commands/hmi/ui_perform_interaction_request.h b/src/components/application_manager/include/application_manager/commands/hmi/ui_perform_interaction_request.h
index d8e2f6c682..0d63139437 100644
--- a/src/components/application_manager/include/application_manager/commands/hmi/ui_perform_interaction_request.h
+++ b/src/components/application_manager/include/application_manager/commands/hmi/ui_perform_interaction_request.h
@@ -1,4 +1,4 @@
-/*
+/**
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
diff --git a/src/components/application_manager/include/application_manager/commands/hmi/ui_perform_interaction_response.h b/src/components/application_manager/include/application_manager/commands/hmi/ui_perform_interaction_response.h
index 04286897a3..32a87c73c2 100644
--- a/src/components/application_manager/include/application_manager/commands/hmi/ui_perform_interaction_response.h
+++ b/src/components/application_manager/include/application_manager/commands/hmi/ui_perform_interaction_response.h
@@ -1,4 +1,4 @@
-/*
+/**
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
diff --git a/src/components/application_manager/include/application_manager/commands/hmi/ui_scrollable_message_request.h b/src/components/application_manager/include/application_manager/commands/hmi/ui_scrollable_message_request.h
index 06bfadbae7..6f23d3b21c 100644
--- a/src/components/application_manager/include/application_manager/commands/hmi/ui_scrollable_message_request.h
+++ b/src/components/application_manager/include/application_manager/commands/hmi/ui_scrollable_message_request.h
@@ -1,4 +1,4 @@
-/*
+/**
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
diff --git a/src/components/application_manager/include/application_manager/commands/hmi/ui_scrollable_message_response.h b/src/components/application_manager/include/application_manager/commands/hmi/ui_scrollable_message_response.h
index 6d6d09c313..7bf15a0511 100644
--- a/src/components/application_manager/include/application_manager/commands/hmi/ui_scrollable_message_response.h
+++ b/src/components/application_manager/include/application_manager/commands/hmi/ui_scrollable_message_response.h
@@ -1,4 +1,4 @@
-/*
+/**
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
diff --git a/src/components/application_manager/include/application_manager/commands/hmi/ui_set_display_layout_response.h b/src/components/application_manager/include/application_manager/commands/hmi/ui_set_display_layout_response.h
index 3e7a898af0..74df2030e5 100644
--- a/src/components/application_manager/include/application_manager/commands/hmi/ui_set_display_layout_response.h
+++ b/src/components/application_manager/include/application_manager/commands/hmi/ui_set_display_layout_response.h
@@ -1,4 +1,4 @@
-/*
+/**
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
diff --git a/src/components/application_manager/include/application_manager/commands/hmi/ui_set_global_properties_request.h b/src/components/application_manager/include/application_manager/commands/hmi/ui_set_global_properties_request.h
index 8b54e85332..f3f7d0e733 100644
--- a/src/components/application_manager/include/application_manager/commands/hmi/ui_set_global_properties_request.h
+++ b/src/components/application_manager/include/application_manager/commands/hmi/ui_set_global_properties_request.h
@@ -1,4 +1,4 @@
-/*
+/**
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
diff --git a/src/components/application_manager/include/application_manager/commands/hmi/ui_set_global_properties_response.h b/src/components/application_manager/include/application_manager/commands/hmi/ui_set_global_properties_response.h
index b3cb38d49f..bc00397e37 100644
--- a/src/components/application_manager/include/application_manager/commands/hmi/ui_set_global_properties_response.h
+++ b/src/components/application_manager/include/application_manager/commands/hmi/ui_set_global_properties_response.h
@@ -1,4 +1,4 @@
-/*
+/**
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
diff --git a/src/components/application_manager/include/application_manager/commands/hmi/ui_set_icon_request.h b/src/components/application_manager/include/application_manager/commands/hmi/ui_set_icon_request.h
index f78772a8a3..1541aada6b 100644
--- a/src/components/application_manager/include/application_manager/commands/hmi/ui_set_icon_request.h
+++ b/src/components/application_manager/include/application_manager/commands/hmi/ui_set_icon_request.h
@@ -1,4 +1,4 @@
-/*
+/**
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
diff --git a/src/components/application_manager/include/application_manager/commands/hmi/ui_set_icon_response.h b/src/components/application_manager/include/application_manager/commands/hmi/ui_set_icon_response.h
index 288bcc94d2..f125f64282 100644
--- a/src/components/application_manager/include/application_manager/commands/hmi/ui_set_icon_response.h
+++ b/src/components/application_manager/include/application_manager/commands/hmi/ui_set_icon_response.h
@@ -1,4 +1,4 @@
-/*
+/**
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
diff --git a/src/components/application_manager/include/application_manager/commands/hmi/ui_set_media_clock_timer_request.h b/src/components/application_manager/include/application_manager/commands/hmi/ui_set_media_clock_timer_request.h
index 443fc8d1a7..44cbbbfcf9 100644
--- a/src/components/application_manager/include/application_manager/commands/hmi/ui_set_media_clock_timer_request.h
+++ b/src/components/application_manager/include/application_manager/commands/hmi/ui_set_media_clock_timer_request.h
@@ -1,4 +1,4 @@
-/*
+/**
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
diff --git a/src/components/application_manager/include/application_manager/commands/hmi/ui_set_media_clock_timer_response.h b/src/components/application_manager/include/application_manager/commands/hmi/ui_set_media_clock_timer_response.h
index 9358707117..dd46f128d9 100644
--- a/src/components/application_manager/include/application_manager/commands/hmi/ui_set_media_clock_timer_response.h
+++ b/src/components/application_manager/include/application_manager/commands/hmi/ui_set_media_clock_timer_response.h
@@ -1,4 +1,4 @@
-/*
+/**
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
diff --git a/src/components/application_manager/include/application_manager/commands/hmi/ui_show_request.h b/src/components/application_manager/include/application_manager/commands/hmi/ui_show_request.h
index 136a99622b..6f22263e61 100644
--- a/src/components/application_manager/include/application_manager/commands/hmi/ui_show_request.h
+++ b/src/components/application_manager/include/application_manager/commands/hmi/ui_show_request.h
@@ -1,4 +1,4 @@
-/*
+/**
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
diff --git a/src/components/application_manager/include/application_manager/commands/hmi/ui_show_response.h b/src/components/application_manager/include/application_manager/commands/hmi/ui_show_response.h
index 4a9b49253e..a6391fa6c9 100644
--- a/src/components/application_manager/include/application_manager/commands/hmi/ui_show_response.h
+++ b/src/components/application_manager/include/application_manager/commands/hmi/ui_show_response.h
@@ -1,4 +1,4 @@
-/*
+/**
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
diff --git a/src/components/application_manager/include/application_manager/commands/hmi/ui_slider_request.h b/src/components/application_manager/include/application_manager/commands/hmi/ui_slider_request.h
index 8a3b37bfef..5cb31b4a95 100644
--- a/src/components/application_manager/include/application_manager/commands/hmi/ui_slider_request.h
+++ b/src/components/application_manager/include/application_manager/commands/hmi/ui_slider_request.h
@@ -1,4 +1,4 @@
-/*
+/**
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
diff --git a/src/components/application_manager/include/application_manager/commands/hmi/ui_slider_response.h b/src/components/application_manager/include/application_manager/commands/hmi/ui_slider_response.h
index 2384f248aa..aae5408e21 100644
--- a/src/components/application_manager/include/application_manager/commands/hmi/ui_slider_response.h
+++ b/src/components/application_manager/include/application_manager/commands/hmi/ui_slider_response.h
@@ -1,4 +1,4 @@
-/*
+/**
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
diff --git a/src/components/application_manager/include/application_manager/commands/hmi/update_app_list_request.h b/src/components/application_manager/include/application_manager/commands/hmi/update_app_list_request.h
index b606134409..d2307232e3 100644
--- a/src/components/application_manager/include/application_manager/commands/hmi/update_app_list_request.h
+++ b/src/components/application_manager/include/application_manager/commands/hmi/update_app_list_request.h
@@ -1,4 +1,4 @@
-/*
+/**
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
diff --git a/src/components/application_manager/include/application_manager/commands/hmi/update_app_list_response.h b/src/components/application_manager/include/application_manager/commands/hmi/update_app_list_response.h
index 135481cb0b..3e6a1d78a2 100644
--- a/src/components/application_manager/include/application_manager/commands/hmi/update_app_list_response.h
+++ b/src/components/application_manager/include/application_manager/commands/hmi/update_app_list_response.h
@@ -1,4 +1,4 @@
-/*
+/**
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
diff --git a/src/components/application_manager/include/application_manager/commands/hmi/update_device_list_request.h b/src/components/application_manager/include/application_manager/commands/hmi/update_device_list_request.h
index f645d312c5..e9a32e9fc4 100644
--- a/src/components/application_manager/include/application_manager/commands/hmi/update_device_list_request.h
+++ b/src/components/application_manager/include/application_manager/commands/hmi/update_device_list_request.h
@@ -1,4 +1,4 @@
-/*
+/**
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
diff --git a/src/components/application_manager/include/application_manager/commands/hmi/update_device_list_response.h b/src/components/application_manager/include/application_manager/commands/hmi/update_device_list_response.h
index 6ea2c1e528..d4191c8bee 100644
--- a/src/components/application_manager/include/application_manager/commands/hmi/update_device_list_response.h
+++ b/src/components/application_manager/include/application_manager/commands/hmi/update_device_list_response.h
@@ -1,4 +1,4 @@
-/*
+/**
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
diff --git a/src/components/application_manager/include/application_manager/commands/hmi/update_sdl_request.h b/src/components/application_manager/include/application_manager/commands/hmi/update_sdl_request.h
index f84f93f2ed..506c137861 100644
--- a/src/components/application_manager/include/application_manager/commands/hmi/update_sdl_request.h
+++ b/src/components/application_manager/include/application_manager/commands/hmi/update_sdl_request.h
@@ -1,4 +1,4 @@
-/*
+/**
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
diff --git a/src/components/application_manager/include/application_manager/commands/hmi/update_sdl_response.h b/src/components/application_manager/include/application_manager/commands/hmi/update_sdl_response.h
index b0d370ecfd..729483cfa1 100644
--- a/src/components/application_manager/include/application_manager/commands/hmi/update_sdl_response.h
+++ b/src/components/application_manager/include/application_manager/commands/hmi/update_sdl_response.h
@@ -1,4 +1,4 @@
-/*
+/**
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
diff --git a/src/components/application_manager/include/application_manager/commands/hmi/vi_diagnostic_message_request.h b/src/components/application_manager/include/application_manager/commands/hmi/vi_diagnostic_message_request.h
index c60533d2ea..90e1e145c2 100644
--- a/src/components/application_manager/include/application_manager/commands/hmi/vi_diagnostic_message_request.h
+++ b/src/components/application_manager/include/application_manager/commands/hmi/vi_diagnostic_message_request.h
@@ -1,4 +1,4 @@
-/*
+/**
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
diff --git a/src/components/application_manager/include/application_manager/commands/hmi/vi_diagnostic_message_response.h b/src/components/application_manager/include/application_manager/commands/hmi/vi_diagnostic_message_response.h
index 027e007e42..f332a32812 100644
--- a/src/components/application_manager/include/application_manager/commands/hmi/vi_diagnostic_message_response.h
+++ b/src/components/application_manager/include/application_manager/commands/hmi/vi_diagnostic_message_response.h
@@ -1,4 +1,4 @@
-/*
+/**
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
diff --git a/src/components/application_manager/include/application_manager/commands/hmi/vi_get_dtcs_request.h b/src/components/application_manager/include/application_manager/commands/hmi/vi_get_dtcs_request.h
index 170eb895fd..93f046d7d6 100644
--- a/src/components/application_manager/include/application_manager/commands/hmi/vi_get_dtcs_request.h
+++ b/src/components/application_manager/include/application_manager/commands/hmi/vi_get_dtcs_request.h
@@ -1,4 +1,4 @@
-/*
+/**
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
diff --git a/src/components/application_manager/include/application_manager/commands/hmi/vi_get_dtcs_response.h b/src/components/application_manager/include/application_manager/commands/hmi/vi_get_dtcs_response.h
index 3ba4656d5b..9ee7fac44a 100644
--- a/src/components/application_manager/include/application_manager/commands/hmi/vi_get_dtcs_response.h
+++ b/src/components/application_manager/include/application_manager/commands/hmi/vi_get_dtcs_response.h
@@ -1,4 +1,4 @@
-/*
+/**
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
diff --git a/src/components/application_manager/include/application_manager/commands/hmi/vi_get_vehicle_data_request.h b/src/components/application_manager/include/application_manager/commands/hmi/vi_get_vehicle_data_request.h
index 7413b6bf3b..9cb964981c 100644
--- a/src/components/application_manager/include/application_manager/commands/hmi/vi_get_vehicle_data_request.h
+++ b/src/components/application_manager/include/application_manager/commands/hmi/vi_get_vehicle_data_request.h
@@ -1,4 +1,4 @@
-/*
+/**
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
diff --git a/src/components/application_manager/include/application_manager/commands/hmi/vi_get_vehicle_data_request_template.h b/src/components/application_manager/include/application_manager/commands/hmi/vi_get_vehicle_data_request_template.h
index af991186fd..951bf0c334 100644
--- a/src/components/application_manager/include/application_manager/commands/hmi/vi_get_vehicle_data_request_template.h
+++ b/src/components/application_manager/include/application_manager/commands/hmi/vi_get_vehicle_data_request_template.h
@@ -1,4 +1,4 @@
-/*
+/**
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
diff --git a/src/components/application_manager/include/application_manager/commands/hmi/vi_get_vehicle_data_response.h b/src/components/application_manager/include/application_manager/commands/hmi/vi_get_vehicle_data_response.h
index 1f9736b56a..952b0fb4d3 100644
--- a/src/components/application_manager/include/application_manager/commands/hmi/vi_get_vehicle_data_response.h
+++ b/src/components/application_manager/include/application_manager/commands/hmi/vi_get_vehicle_data_response.h
@@ -1,4 +1,4 @@
-/*
+/**
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
diff --git a/src/components/application_manager/include/application_manager/commands/hmi/vi_get_vehicle_data_response_template.h b/src/components/application_manager/include/application_manager/commands/hmi/vi_get_vehicle_data_response_template.h
index 156664cac3..ecd465365a 100644
--- a/src/components/application_manager/include/application_manager/commands/hmi/vi_get_vehicle_data_response_template.h
+++ b/src/components/application_manager/include/application_manager/commands/hmi/vi_get_vehicle_data_response_template.h
@@ -1,4 +1,4 @@
-/*
+/**
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
diff --git a/src/components/application_manager/include/application_manager/commands/hmi/vi_get_vehicle_type_request.h b/src/components/application_manager/include/application_manager/commands/hmi/vi_get_vehicle_type_request.h
index 67d8ae046c..876f7d2e55 100644
--- a/src/components/application_manager/include/application_manager/commands/hmi/vi_get_vehicle_type_request.h
+++ b/src/components/application_manager/include/application_manager/commands/hmi/vi_get_vehicle_type_request.h
@@ -1,4 +1,4 @@
-/*
+/**
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
diff --git a/src/components/application_manager/include/application_manager/commands/hmi/vi_get_vehicle_type_response.h b/src/components/application_manager/include/application_manager/commands/hmi/vi_get_vehicle_type_response.h
index b36b193418..8b632182f0 100644
--- a/src/components/application_manager/include/application_manager/commands/hmi/vi_get_vehicle_type_response.h
+++ b/src/components/application_manager/include/application_manager/commands/hmi/vi_get_vehicle_type_response.h
@@ -1,4 +1,4 @@
-/*
+/**
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
diff --git a/src/components/application_manager/include/application_manager/commands/hmi/vi_is_ready_request.h b/src/components/application_manager/include/application_manager/commands/hmi/vi_is_ready_request.h
index 061681029a..e905cf4c09 100644
--- a/src/components/application_manager/include/application_manager/commands/hmi/vi_is_ready_request.h
+++ b/src/components/application_manager/include/application_manager/commands/hmi/vi_is_ready_request.h
@@ -1,4 +1,4 @@
-/*
+/**
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
diff --git a/src/components/application_manager/include/application_manager/commands/hmi/vi_is_ready_response.h b/src/components/application_manager/include/application_manager/commands/hmi/vi_is_ready_response.h
index 52e00f85da..e13e368b34 100644
--- a/src/components/application_manager/include/application_manager/commands/hmi/vi_is_ready_response.h
+++ b/src/components/application_manager/include/application_manager/commands/hmi/vi_is_ready_response.h
@@ -1,4 +1,4 @@
-/*
+/**
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
diff --git a/src/components/application_manager/include/application_manager/commands/hmi/vi_read_did_request.h b/src/components/application_manager/include/application_manager/commands/hmi/vi_read_did_request.h
index 6520db5e7d..336ad4443a 100644
--- a/src/components/application_manager/include/application_manager/commands/hmi/vi_read_did_request.h
+++ b/src/components/application_manager/include/application_manager/commands/hmi/vi_read_did_request.h
@@ -1,4 +1,4 @@
-/*
+/**
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
diff --git a/src/components/application_manager/include/application_manager/commands/hmi/vi_read_did_response.h b/src/components/application_manager/include/application_manager/commands/hmi/vi_read_did_response.h
index 0855be454b..af66505174 100644
--- a/src/components/application_manager/include/application_manager/commands/hmi/vi_read_did_response.h
+++ b/src/components/application_manager/include/application_manager/commands/hmi/vi_read_did_response.h
@@ -1,4 +1,4 @@
-/*
+/**
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
diff --git a/src/components/application_manager/include/application_manager/commands/hmi/vi_subscribe_vehicle_data_request.h b/src/components/application_manager/include/application_manager/commands/hmi/vi_subscribe_vehicle_data_request.h
index 1eb06c6217..ef14a05f2d 100644
--- a/src/components/application_manager/include/application_manager/commands/hmi/vi_subscribe_vehicle_data_request.h
+++ b/src/components/application_manager/include/application_manager/commands/hmi/vi_subscribe_vehicle_data_request.h
@@ -1,4 +1,4 @@
-/*
+/**
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
diff --git a/src/components/application_manager/include/application_manager/commands/hmi/vi_subscribe_vehicle_data_request_template.h b/src/components/application_manager/include/application_manager/commands/hmi/vi_subscribe_vehicle_data_request_template.h
index fc9b7dd2ea..bcfa2f6f1a 100644
--- a/src/components/application_manager/include/application_manager/commands/hmi/vi_subscribe_vehicle_data_request_template.h
+++ b/src/components/application_manager/include/application_manager/commands/hmi/vi_subscribe_vehicle_data_request_template.h
@@ -1,4 +1,4 @@
-/*
+/**
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
diff --git a/src/components/application_manager/include/application_manager/commands/hmi/vi_subscribe_vehicle_data_response.h b/src/components/application_manager/include/application_manager/commands/hmi/vi_subscribe_vehicle_data_response.h
index b5e2788f32..057fd52e13 100644
--- a/src/components/application_manager/include/application_manager/commands/hmi/vi_subscribe_vehicle_data_response.h
+++ b/src/components/application_manager/include/application_manager/commands/hmi/vi_subscribe_vehicle_data_response.h
@@ -1,4 +1,4 @@
-/*
+/**
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
diff --git a/src/components/application_manager/include/application_manager/commands/hmi/vi_subscribe_vehicle_data_response_template.h b/src/components/application_manager/include/application_manager/commands/hmi/vi_subscribe_vehicle_data_response_template.h
index 64f3c51cbc..740d8c386a 100644
--- a/src/components/application_manager/include/application_manager/commands/hmi/vi_subscribe_vehicle_data_response_template.h
+++ b/src/components/application_manager/include/application_manager/commands/hmi/vi_subscribe_vehicle_data_response_template.h
@@ -1,4 +1,4 @@
-/*
+/**
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
diff --git a/src/components/application_manager/include/application_manager/commands/hmi/vi_unsubscribe_vehicle_data_request.h b/src/components/application_manager/include/application_manager/commands/hmi/vi_unsubscribe_vehicle_data_request.h
index 1320ae477a..18d118fadb 100644
--- a/src/components/application_manager/include/application_manager/commands/hmi/vi_unsubscribe_vehicle_data_request.h
+++ b/src/components/application_manager/include/application_manager/commands/hmi/vi_unsubscribe_vehicle_data_request.h
@@ -1,4 +1,4 @@
-/*
+/**
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
diff --git a/src/components/application_manager/include/application_manager/commands/hmi/vi_unsubscribe_vehicle_data_request_template.h b/src/components/application_manager/include/application_manager/commands/hmi/vi_unsubscribe_vehicle_data_request_template.h
index 9aa529d407..d604d4d536 100644
--- a/src/components/application_manager/include/application_manager/commands/hmi/vi_unsubscribe_vehicle_data_request_template.h
+++ b/src/components/application_manager/include/application_manager/commands/hmi/vi_unsubscribe_vehicle_data_request_template.h
@@ -1,4 +1,4 @@
-/*
+/**
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
diff --git a/src/components/application_manager/include/application_manager/commands/hmi/vi_unsubscribe_vehicle_data_response.h b/src/components/application_manager/include/application_manager/commands/hmi/vi_unsubscribe_vehicle_data_response.h
index 8818709afe..b71b8241f5 100644
--- a/src/components/application_manager/include/application_manager/commands/hmi/vi_unsubscribe_vehicle_data_response.h
+++ b/src/components/application_manager/include/application_manager/commands/hmi/vi_unsubscribe_vehicle_data_response.h
@@ -1,4 +1,4 @@
-/*
+/**
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
diff --git a/src/components/application_manager/include/application_manager/commands/hmi/vi_unsubscribe_vehicle_data_response_template.h b/src/components/application_manager/include/application_manager/commands/hmi/vi_unsubscribe_vehicle_data_response_template.h
index 3dfcc763cb..8730cc0361 100644
--- a/src/components/application_manager/include/application_manager/commands/hmi/vi_unsubscribe_vehicle_data_response_template.h
+++ b/src/components/application_manager/include/application_manager/commands/hmi/vi_unsubscribe_vehicle_data_response_template.h
@@ -1,4 +1,4 @@
-/*
+/**
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
diff --git a/src/components/application_manager/include/application_manager/commands/hmi/vr_add_command_request.h b/src/components/application_manager/include/application_manager/commands/hmi/vr_add_command_request.h
index 9fdc3f776f..3675cfb153 100644
--- a/src/components/application_manager/include/application_manager/commands/hmi/vr_add_command_request.h
+++ b/src/components/application_manager/include/application_manager/commands/hmi/vr_add_command_request.h
@@ -1,4 +1,4 @@
-/*
+/**
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
diff --git a/src/components/application_manager/include/application_manager/commands/hmi/vr_add_command_response.h b/src/components/application_manager/include/application_manager/commands/hmi/vr_add_command_response.h
index 7418ed5865..328e8a2058 100644
--- a/src/components/application_manager/include/application_manager/commands/hmi/vr_add_command_response.h
+++ b/src/components/application_manager/include/application_manager/commands/hmi/vr_add_command_response.h
@@ -1,4 +1,4 @@
-/*
+/**
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
diff --git a/src/components/application_manager/include/application_manager/commands/hmi/vr_change_registration_request.h b/src/components/application_manager/include/application_manager/commands/hmi/vr_change_registration_request.h
index 53584ee970..5e69b4c18b 100644
--- a/src/components/application_manager/include/application_manager/commands/hmi/vr_change_registration_request.h
+++ b/src/components/application_manager/include/application_manager/commands/hmi/vr_change_registration_request.h
@@ -1,4 +1,4 @@
-/*
+/**
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
diff --git a/src/components/application_manager/include/application_manager/commands/hmi/vr_change_registration_response.h b/src/components/application_manager/include/application_manager/commands/hmi/vr_change_registration_response.h
index d71a14da34..f79da44598 100644
--- a/src/components/application_manager/include/application_manager/commands/hmi/vr_change_registration_response.h
+++ b/src/components/application_manager/include/application_manager/commands/hmi/vr_change_registration_response.h
@@ -1,4 +1,4 @@
-/*
+/**
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
diff --git a/src/components/application_manager/include/application_manager/commands/hmi/vr_delete_command_request.h b/src/components/application_manager/include/application_manager/commands/hmi/vr_delete_command_request.h
index 91a5dc7d99..b843f498f8 100644
--- a/src/components/application_manager/include/application_manager/commands/hmi/vr_delete_command_request.h
+++ b/src/components/application_manager/include/application_manager/commands/hmi/vr_delete_command_request.h
@@ -1,4 +1,4 @@
-/*
+/**
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
diff --git a/src/components/application_manager/include/application_manager/commands/hmi/vr_delete_command_response.h b/src/components/application_manager/include/application_manager/commands/hmi/vr_delete_command_response.h
index ad8c82e38c..11a681bd5e 100644
--- a/src/components/application_manager/include/application_manager/commands/hmi/vr_delete_command_response.h
+++ b/src/components/application_manager/include/application_manager/commands/hmi/vr_delete_command_response.h
@@ -1,4 +1,4 @@
-/*
+/**
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
diff --git a/src/components/application_manager/include/application_manager/commands/hmi/vr_get_capabilities_request.h b/src/components/application_manager/include/application_manager/commands/hmi/vr_get_capabilities_request.h
index 676967083f..7771bdd141 100644
--- a/src/components/application_manager/include/application_manager/commands/hmi/vr_get_capabilities_request.h
+++ b/src/components/application_manager/include/application_manager/commands/hmi/vr_get_capabilities_request.h
@@ -1,4 +1,4 @@
-/*
+/**
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
diff --git a/src/components/application_manager/include/application_manager/commands/hmi/vr_get_capabilities_response.h b/src/components/application_manager/include/application_manager/commands/hmi/vr_get_capabilities_response.h
index 8b88eb4e3b..ced60c9d65 100644
--- a/src/components/application_manager/include/application_manager/commands/hmi/vr_get_capabilities_response.h
+++ b/src/components/application_manager/include/application_manager/commands/hmi/vr_get_capabilities_response.h
@@ -1,4 +1,4 @@
-/*
+/**
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
diff --git a/src/components/application_manager/include/application_manager/commands/hmi/vr_get_language_request.h b/src/components/application_manager/include/application_manager/commands/hmi/vr_get_language_request.h
index 9dd9133ffd..955355d06c 100644
--- a/src/components/application_manager/include/application_manager/commands/hmi/vr_get_language_request.h
+++ b/src/components/application_manager/include/application_manager/commands/hmi/vr_get_language_request.h
@@ -1,4 +1,4 @@
-/*
+/**
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
diff --git a/src/components/application_manager/include/application_manager/commands/hmi/vr_get_language_response.h b/src/components/application_manager/include/application_manager/commands/hmi/vr_get_language_response.h
index d9c4fc2126..2bd59b8be2 100644
--- a/src/components/application_manager/include/application_manager/commands/hmi/vr_get_language_response.h
+++ b/src/components/application_manager/include/application_manager/commands/hmi/vr_get_language_response.h
@@ -1,4 +1,4 @@
-/*
+/**
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
diff --git a/src/components/application_manager/include/application_manager/commands/hmi/vr_get_supported_languages_request.h b/src/components/application_manager/include/application_manager/commands/hmi/vr_get_supported_languages_request.h
index 0a010cdfec..79105978b0 100644
--- a/src/components/application_manager/include/application_manager/commands/hmi/vr_get_supported_languages_request.h
+++ b/src/components/application_manager/include/application_manager/commands/hmi/vr_get_supported_languages_request.h
@@ -1,4 +1,4 @@
-/*
+/**
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
diff --git a/src/components/application_manager/include/application_manager/commands/hmi/vr_get_supported_languages_response.h b/src/components/application_manager/include/application_manager/commands/hmi/vr_get_supported_languages_response.h
index dbbe57ba36..38f5056225 100644
--- a/src/components/application_manager/include/application_manager/commands/hmi/vr_get_supported_languages_response.h
+++ b/src/components/application_manager/include/application_manager/commands/hmi/vr_get_supported_languages_response.h
@@ -1,4 +1,4 @@
-/*
+/**
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
diff --git a/src/components/application_manager/include/application_manager/commands/hmi/vr_is_ready_request.h b/src/components/application_manager/include/application_manager/commands/hmi/vr_is_ready_request.h
index e66c9c36a5..ac734638b1 100644
--- a/src/components/application_manager/include/application_manager/commands/hmi/vr_is_ready_request.h
+++ b/src/components/application_manager/include/application_manager/commands/hmi/vr_is_ready_request.h
@@ -1,4 +1,4 @@
-/*
+/**
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
diff --git a/src/components/application_manager/include/application_manager/commands/hmi/vr_is_ready_response.h b/src/components/application_manager/include/application_manager/commands/hmi/vr_is_ready_response.h
index a9b1a68455..4f4f86d84c 100644
--- a/src/components/application_manager/include/application_manager/commands/hmi/vr_is_ready_response.h
+++ b/src/components/application_manager/include/application_manager/commands/hmi/vr_is_ready_response.h
@@ -1,4 +1,4 @@
-/*
+/**
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
diff --git a/src/components/application_manager/include/application_manager/commands/hmi/vr_perform_interaction_request.h b/src/components/application_manager/include/application_manager/commands/hmi/vr_perform_interaction_request.h
index b819fdb927..b71b31baf5 100644
--- a/src/components/application_manager/include/application_manager/commands/hmi/vr_perform_interaction_request.h
+++ b/src/components/application_manager/include/application_manager/commands/hmi/vr_perform_interaction_request.h
@@ -1,4 +1,4 @@
-/*
+/**
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
diff --git a/src/components/application_manager/include/application_manager/commands/hmi/vr_perform_interaction_response.h b/src/components/application_manager/include/application_manager/commands/hmi/vr_perform_interaction_response.h
index ffbbd613e2..fbf5b87cb6 100644
--- a/src/components/application_manager/include/application_manager/commands/hmi/vr_perform_interaction_response.h
+++ b/src/components/application_manager/include/application_manager/commands/hmi/vr_perform_interaction_response.h
@@ -1,4 +1,4 @@
-/*
+/**
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
diff --git a/src/components/application_manager/include/application_manager/commands/mobile/change_registration_request.h b/src/components/application_manager/include/application_manager/commands/mobile/change_registration_request.h
index d36f16a976..3de3e8fc2f 100644
--- a/src/components/application_manager/include/application_manager/commands/mobile/change_registration_request.h
+++ b/src/components/application_manager/include/application_manager/commands/mobile/change_registration_request.h
@@ -105,9 +105,9 @@ class ChangeRegistrationRequest : public CommandRequestImpl {
/*
* @brief Checks result codes
*
- * @return true if all of result codes is success
+ * @return true if one of result codes is success
*/
- bool AllHmiResponsesSuccess(const hmi_apis::Common_Result::eType ui,
+ static bool WasAnySuccess(const hmi_apis::Common_Result::eType ui,
const hmi_apis::Common_Result::eType vr,
const hmi_apis::Common_Result::eType tts);
diff --git a/src/components/application_manager/include/application_manager/commands/mobile/generic_response.h b/src/components/application_manager/include/application_manager/commands/mobile/generic_response.h
index 1fb931d508..c3b39bf917 100644
--- a/src/components/application_manager/include/application_manager/commands/mobile/generic_response.h
+++ b/src/components/application_manager/include/application_manager/commands/mobile/generic_response.h
@@ -1,4 +1,4 @@
-/*
+/**
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
diff --git a/src/components/application_manager/include/application_manager/commands/mobile/register_app_interface_request.h b/src/components/application_manager/include/application_manager/commands/mobile/register_app_interface_request.h
index 14b51777dd..9c1d46368f 100644
--- a/src/components/application_manager/include/application_manager/commands/mobile/register_app_interface_request.h
+++ b/src/components/application_manager/include/application_manager/commands/mobile/register_app_interface_request.h
@@ -99,6 +99,23 @@ class RegisterAppInterfaceRequest : public CommandRequestImpl {
bool IsApplicationWithSameAppIdRegistered();
/*
+ * @brief Check for some request param. names restrictions, e.g. for
+ * newline characters
+ *
+ * return SUCCESS if param name pass the check, otherwise - error code
+ * will be returned
+ */
+ mobile_apis::Result::eType CheckRestrictions() const;
+
+ /*
+ * @brief Removes hidden symbols and spaces
+ *
+ * return cleared copy of param name
+ */
+ std::string ClearParamName(std::string param_name) const;
+
+
+ /*
* @brief Check new application parameters (name, tts, vr) for
* coincidence with already known parameters of registered applications
*
@@ -146,8 +163,6 @@ class RegisterAppInterfaceRequest : public CommandRequestImpl {
bool IsWhiteSpaceExist();
std::string response_info_;
- mobile_apis::Result::eType result_checking_app_hmi_type_;
-
DISALLOW_COPY_AND_ASSIGN(RegisterAppInterfaceRequest);
};
diff --git a/src/components/application_manager/include/application_manager/commands/mobile/scrollable_message_response.h b/src/components/application_manager/include/application_manager/commands/mobile/scrollable_message_response.h
index f0c0ea8f7a..36fd311ad6 100644
--- a/src/components/application_manager/include/application_manager/commands/mobile/scrollable_message_response.h
+++ b/src/components/application_manager/include/application_manager/commands/mobile/scrollable_message_response.h
@@ -1,4 +1,4 @@
-/*
+/**
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
diff --git a/src/components/application_manager/include/application_manager/commands/mobile/send_location_response.h b/src/components/application_manager/include/application_manager/commands/mobile/send_location_response.h
index fe88a2af29..6e18aa5f27 100644
--- a/src/components/application_manager/include/application_manager/commands/mobile/send_location_response.h
+++ b/src/components/application_manager/include/application_manager/commands/mobile/send_location_response.h
@@ -1,4 +1,4 @@
-/*
+/**
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
diff --git a/src/components/application_manager/include/application_manager/commands/mobile/set_media_clock_timer_response.h b/src/components/application_manager/include/application_manager/commands/mobile/set_media_clock_timer_response.h
index 46844bd2f3..e835c17c80 100644
--- a/src/components/application_manager/include/application_manager/commands/mobile/set_media_clock_timer_response.h
+++ b/src/components/application_manager/include/application_manager/commands/mobile/set_media_clock_timer_response.h
@@ -1,4 +1,4 @@
-/*
+/**
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
diff --git a/src/components/application_manager/include/application_manager/commands/mobile/show_response.h b/src/components/application_manager/include/application_manager/commands/mobile/show_response.h
index c327bc3b3a..970b54747e 100644
--- a/src/components/application_manager/include/application_manager/commands/mobile/show_response.h
+++ b/src/components/application_manager/include/application_manager/commands/mobile/show_response.h
@@ -1,4 +1,4 @@
-/*
+/**
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
diff --git a/src/components/application_manager/include/application_manager/commands/mobile/slider_response.h b/src/components/application_manager/include/application_manager/commands/mobile/slider_response.h
index 1888388e7c..b7821adca2 100644
--- a/src/components/application_manager/include/application_manager/commands/mobile/slider_response.h
+++ b/src/components/application_manager/include/application_manager/commands/mobile/slider_response.h
@@ -1,4 +1,4 @@
-/*
+/**
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
diff --git a/src/components/application_manager/include/application_manager/commands/mobile/speak_response.h b/src/components/application_manager/include/application_manager/commands/mobile/speak_response.h
index cbf1ec40de..ef9b8f89d3 100644
--- a/src/components/application_manager/include/application_manager/commands/mobile/speak_response.h
+++ b/src/components/application_manager/include/application_manager/commands/mobile/speak_response.h
@@ -1,4 +1,4 @@
-/*
+/**
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
diff --git a/src/components/application_manager/include/application_manager/hmi_capabilities.h b/src/components/application_manager/include/application_manager/hmi_capabilities.h
index 000242daf0..20a849baee 100644
--- a/src/components/application_manager/include/application_manager/hmi_capabilities.h
+++ b/src/components/application_manager/include/application_manager/hmi_capabilities.h
@@ -1,4 +1,4 @@
-/*
+/**
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
diff --git a/src/components/application_manager/include/application_manager/message.h b/src/components/application_manager/include/application_manager/message.h
index eec6795d7c..d92c89adf1 100644
--- a/src/components/application_manager/include/application_manager/message.h
+++ b/src/components/application_manager/include/application_manager/message.h
@@ -1,4 +1,4 @@
-/*
+/**
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
diff --git a/src/components/application_manager/include/application_manager/message_helper.h b/src/components/application_manager/include/application_manager/message_helper.h
index a4d1fa9f79..2fc69d8162 100644
--- a/src/components/application_manager/include/application_manager/message_helper.h
+++ b/src/components/application_manager/include/application_manager/message_helper.h
@@ -102,6 +102,16 @@ class MessageHelper {
static smart_objects::SmartObject* GetHashUpdateNotification(const uint32_t app_id);
/**
+ * @brief Create OnSystemRequest notification for lock screen icon url
+ */
+ static smart_objects::SmartObject* GetLockScreenIconUrlNotification(const uint32_t connection_key);
+
+ /**
+ * @brief Send the OnSystemRequest notification for lock screen icon url to the mobile device
+ */
+ static void SendLockScreenIconUrlNotification(const uint32_t connection_key);
+
+ /**
* @brief Sends to mobile HashUpdateNotification
*/
static void SendHashUpdateNotification(const uint32_t app_id);
@@ -178,7 +188,7 @@ class MessageHelper {
/**
* @brief Sends IVI subscriptions
*/
- static SmartObjectList GetIVISubscriptionRequests(ApplicationSharedPtr app);
+ static SmartObjectList GetIVISubscribtionRequests(const uint32_t app_id);
static void SendAppDataToHMI(ApplicationConstSharedPtr app);
static void SendGlobalPropertiesToHMI(ApplicationConstSharedPtr app);
@@ -192,11 +202,6 @@ class MessageHelper {
static void SendAddCommandRequestToHMI(ApplicationConstSharedPtr app);
static SmartObjectList CreateAddCommandRequestToHMI(ApplicationConstSharedPtr app);
- /**
- * @brief Sends UI_ChangeRegistration to HMI with list of AppHMIType
- * @param app applicaton instace
- */
- static void SendUIChangeRegistrationRequestToHMI(ApplicationConstSharedPtr app);
static void SendChangeRegistrationRequestToHMI(ApplicationConstSharedPtr app);
static void SendAddVRCommandToHMI(
uint32_t cmd_id, const smart_objects::SmartObject& vr_commands,
@@ -221,15 +226,14 @@ class MessageHelper {
/*
* @brief Creates BasicCommunication.OnAppUnregistered notification
* @param app Application instance
- * @param is_unexpected_disconnect
+ * @param is_unexpected_disconnect
* Indicates if connection was unexpectedly lost by TM or HB
*/
static void SendOnAppUnregNotificationToHMI(ApplicationConstSharedPtr app,
bool is_unexpected_disconnect = false);
static void SendActivateAppToHMI(
uint32_t const app_id,
- hmi_apis::Common_HMILevel::eType level = hmi_apis::Common_HMILevel::FULL,
- bool send_policy_priority = true);
+ hmi_apis::Common_HMILevel::eType level = hmi_apis::Common_HMILevel::FULL);
static void SendOnResumeAudioSourceToHMI(const uint32_t app_id);
@@ -427,16 +431,6 @@ class MessageHelper {
smart_objects::SmartObject& message_params,
ApplicationConstSharedPtr app);
- /**
- * @brief checkWithPolicy allows to check soft button's parameters
- * according to the current policy
- * @param system_action system action
- * @param app_mobile_id policy application id
- * @return
- */
- static bool CheckWithPolicy(int system_action,
- const std::string& app_mobile_id);
-
/*
* @brief subscribe application to softbutton
*
@@ -497,8 +491,7 @@ class MessageHelper {
smart_objects::SmartObject& message);
static smart_objects::SmartObject* CreateChangeRegistration(
- int32_t function_id, int32_t language, uint32_t app_id,
- const smart_objects::SmartObject* app_types = NULL);
+ int32_t function_id, int32_t language, uint32_t app_id);
MessageHelper();
diff --git a/src/components/application_manager/include/application_manager/policies/policy_event_observer.h b/src/components/application_manager/include/application_manager/policies/policy_event_observer.h
index e251170fec..7fdfb4e0ac 100644
--- a/src/components/application_manager/include/application_manager/policies/policy_event_observer.h
+++ b/src/components/application_manager/include/application_manager/policies/policy_event_observer.h
@@ -34,26 +34,26 @@
#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_POLICY_EVENT_OBSERVER_H_
#include "application_manager/event_engine/event_observer.h"
+#include "utils/shared_ptr.h"
namespace policy {
namespace smart_objects = NsSmartDeviceLink::NsSmartObjects;
-class PolicyHandler;
+class PolicyManager;
class PolicyEventObserver :
public application_manager::event_engine::EventObserver {
public:
- explicit PolicyEventObserver(policy::PolicyHandler* const policy_handler);
- void set_policy_handler(policy::PolicyHandler* const policy_handler);
+ PolicyEventObserver(utils::SharedPtr<PolicyManager> policy_manager);
void on_event(const application_manager::event_engine::Event& event);
void subscribe_on_event(
const application_manager::event_engine::Event::EventID& event_id,
int32_t hmi_correlation_id = 0);
private:
- sync_primitives::Lock policy_handler_lock_;
- PolicyHandler* policy_handler_;
+ utils::SharedPtr<PolicyManager> policy_manager_;
void ProcessOdometerEvent(const smart_objects::SmartObject& message);
};
} // namespace policy
+
#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_POLICY_EVENT_OBSERVER_H_
diff --git a/src/components/application_manager/include/application_manager/policies/policy_handler.h b/src/components/application_manager/include/application_manager/policies/policy_handler.h
index 260f2da060..dfc29fe00a 100644
--- a/src/components/application_manager/include/application_manager/policies/policy_handler.h
+++ b/src/components/application_manager/include/application_manager/policies/policy_handler.h
@@ -39,16 +39,10 @@
#include <vector>
#include "policy/policy_manager.h"
#include "application_manager/policies/policy_event_observer.h"
-#include "application_manager/policies/delegates/statistics_delegate.h"
+#include "application_manager/policies/pt_exchange_handler.h"
#include "utils/logger.h"
#include "utils/singleton.h"
-#include "utils/threads/thread.h"
-#include "utils/threads/thread_delegate.h"
-#include "utils/conditional_variable.h"
-#include "utils/rwlock.h"
#include "usage_statistics/statistics_manager.h"
-#include "policy_handler_observer.h"
-#include "utils/threads/async_runner.h"
namespace Json {
class Value;
@@ -60,8 +54,7 @@ typedef std::vector<uint32_t> DeviceHandles;
class PolicyHandler :
public utils::Singleton<PolicyHandler, utils::deleters::Deleter<PolicyHandler> >,
- public PolicyListener,
- public threads::AsyncRunner {
+ public PolicyListener {
public:
virtual ~PolicyHandler();
bool LoadPolicyLibrary();
@@ -69,18 +62,15 @@ class PolicyHandler :
bool InitPolicyTable();
bool ResetPolicyTable();
bool ClearUserConsent();
- bool SendMessageToSDK(const BinaryMessage& pt_string, const std::string& url);
+ bool SendMessageToSDK(const BinaryMessage& pt_string);
bool ReceiveMessageFromSDK(const std::string& file,
const BinaryMessage& pt_string);
bool UnloadPolicyLibrary();
+ void OnPTExchangeNeeded();
void OnPermissionsUpdated(const std::string& policy_app_id,
const Permissions& permissions,
const HMILevel& default_hmi);
- virtual void OnSnapshotCreated(const BinaryMessage& pt_string,
- const std::vector<int>& retry_delay_seconds,
- int timeout_exchange);
-
bool GetPriority(const std::string& policy_app_id, std::string* priority);
void CheckPermissions(const PTString& app_id,
const PTString& hmi_level,
@@ -95,14 +85,13 @@ class PolicyHandler :
bool GetInitialAppData(const std::string& application_id,
StringArray* nicknames = NULL,
StringArray* app_hmi_types = NULL);
- void GetUpdateUrls(int service_type, EndpointUrls& end_points);
+ EndpointUrls GetUpdateUrls(int service_type);
void ResetRetrySequence();
int NextRetryTimeout();
int TimeoutExchange();
void OnExceededTimeout();
- void OnSystemReady();
- void PTUpdatedAt(int kilometers, int days_after_epoch);
- void set_listener(PolicyHandlerObserver* listener);
+ BinaryMessageSptr RequestPTUpdate();
+ const std::vector<int> RetrySequenceDelaysSeconds();
utils::SharedPtr<usage_statistics::StatisticsManager> GetStatisticManager();
@@ -158,6 +147,11 @@ class PolicyHandler :
void OnPendingPermissionChange(const std::string& policy_app_id);
/**
+ * Initializes PT exchange at ignition if need
+ */
+ void PTExchangeAtRegistration(const std::string& app_id);
+
+ /**
* Initializes PT exchange at user request
* @param correlation_id correlation id of request
*/
@@ -177,7 +171,7 @@ class PolicyHandler :
* @param permissions User-changed group permissions consent
*/
void OnAppPermissionConsent(const uint32_t connection_key,
- const PermissionConsent &permissions);
+ PermissionConsent& permissions);
/**
* @brief Get appropriate message parameters and send them with response
@@ -210,7 +204,7 @@ class PolicyHandler :
* @brief Send notification to HMI with changed policy update status
* @param status Current policy update state
*/
- void OnUpdateStatusChanged(const std::string& status);
+ void OnUpdateStatusChanged(policy::PolicyTableStatus status);
/**
* @brief Update currently used device id in policies manager for given
@@ -277,15 +271,11 @@ class PolicyHandler :
std::string GetAppName(const std::string& policy_app_id);
- virtual void OnUpdateHMIAppType(std::map<std::string, StringArray> app_hmi_types);
+ virtual void OnUserRequestedUpdateCheckRequired();
virtual void OnDeviceConsentChanged(const std::string& device_id,
bool is_allowed);
- virtual void OnPTExchangeNeeded();
-
- virtual void GetAvailableApps(std::queue<std::string>& apps);
-
/**
* @brief Allows to add new or update existed application during
* registration process
@@ -324,6 +314,7 @@ class PolicyHandler :
usage_statistics::AppStopwatchId type,
int32_t timespan_seconds);
+
protected:
/**
@@ -331,62 +322,72 @@ protected:
*/
void StartNextRetry();
+ /**
+ * Initializes PT exchange at odometer if need
+ * @param kilometers value from odometer in kilometers
+ */
+ void PTExchangeAtOdometer(int kilometers);
+
+ /**
+ * Starts proccess updating policy table
+ */
+ void StartPTExchange(bool skip_device_selection = false);
+
private:
+ /**
+ * @brief Choose device according to app HMI status and user consent for
+ * device
+ * @param device_info Struct with selected device parameters
+ * @return consent status for selected device
+ */
+ DeviceConsent GetDeviceForSending(DeviceParams& device_params);
/**
- * @brief OnAppPermissionConsentInternal reacts on permission changing
- *
- * @param connection_key connection key
- *
- * @param permissions new permissions.
+ * @brief Convert internal policy update status to appropriate status for HMI
+ * @param status Internal policy update status
+ * @return Converted status for sending to HMI
*/
- void OnAppPermissionConsentInternal(const uint32_t connection_key,
- PermissionConsent& permissions);
+ const std::string ConvertUpdateStatus(policy::PolicyTableStatus status);
+
private:
+
class StatisticManagerImpl: public usage_statistics::StatisticsManager {
//TODO(AKutsan) REMOVE THIS UGLY HOTFIX
virtual void Increment(usage_statistics::GlobalCounterId type) {
-
- PolicyHandler::instance()->AsyncRun(new StatisticsDelegate(type));
+ return PolicyHandler::instance()->Increment(type);
}
virtual void Increment(const std::string& app_id,
usage_statistics::AppCounterId type) {
-
- PolicyHandler::instance()->AsyncRun(new StatisticsDelegate(app_id,
- type));
+ return PolicyHandler::instance()->Increment(app_id, type);
}
virtual void Set(const std::string& app_id,
usage_statistics::AppInfoId type,
const std::string& value) {
-
- PolicyHandler::instance()->AsyncRun(new StatisticsDelegate(app_id,
- type,
- value));
+ return PolicyHandler::instance()->Set(app_id, type, value);
}
virtual void Add(const std::string& app_id,
usage_statistics::AppStopwatchId type,
int32_t timespan_seconds) {
-
- PolicyHandler::instance()->AsyncRun(new StatisticsDelegate(
- app_id, type, timespan_seconds));
+ return PolicyHandler::instance()->Add(app_id, type, timespan_seconds);
}
};
//TODO(AKutsan) REMOVE THIS UGLY HOTFIX
PolicyHandler();
- bool SaveSnapshot(const BinaryMessage& pt_string, std::string& snap_path);
static PolicyHandler* instance_;
static const std::string kLibrary;
- mutable sync_primitives::RWLock policy_manager_lock_;
utils::SharedPtr<PolicyManager> policy_manager_;
void* dl_handle_;
AppIds last_used_app_ids_;
+ utils::SharedPtr<PTExchangeHandler> exchange_handler_;
utils::SharedPtr<PolicyEventObserver> event_observer_;
+ bool on_ignition_check_done_;
uint32_t last_activated_app_id_;
+ bool registration_in_progress;
/**
* @brief Contains device handles, which were sent for user consent to HMI
@@ -395,7 +396,7 @@ private:
inline bool CreateManager();
- PolicyHandlerObserver* listener_;
+ bool is_user_requested_policy_table_update_;
/**
* @brief Application-to-device map is used for getting/setting user consents
@@ -403,12 +404,9 @@ private:
*/
std::map<std::string, std::string> app_to_device_link_;
- // Lock for app to device list
- sync_primitives::Lock app_to_device_link_lock_;
utils::SharedPtr<StatisticManagerImpl> statistic_manager_impl_;
- friend class AppPermissionDelegate;
DISALLOW_COPY_AND_ASSIGN(PolicyHandler);
FRIEND_BASE_SINGLETON_CLASS_WITH_DELETER(PolicyHandler,
diff --git a/src/components/application_manager/include/application_manager/request_controller.h b/src/components/application_manager/include/application_manager/request_controller.h
index efe6b1c4e8..2bc5f54666 100644
--- a/src/components/application_manager/include/application_manager/request_controller.h
+++ b/src/components/application_manager/include/application_manager/request_controller.h
@@ -1,4 +1,4 @@
-/*
+/**
* Copyright (c) 2014, Ford Motor Company
* All rights reserved.
*
@@ -120,7 +120,7 @@ class RequestController {
* @return Result code
*
*/
- TResult addMobileRequest(const RequestPtr request,
+ TResult addMobileRequest(const MobileRequestPtr& request,
const mobile_apis::HMILevel::eType& hmi_level);
@@ -146,7 +146,7 @@ class RequestController {
* @param mobile_corellation_id Active mobile request correlation ID
*
*/
- void terminateMobileRequest(const uint32_t& mobile_correlation_id, const uint32_t& connection_key);
+ void terminateMobileRequest(const uint32_t& mobile_correlation_id);
/**
@@ -177,12 +177,6 @@ class RequestController {
*/
void terminateAllHMIRequests();
-
- /**
- * @brief Terminates all requests from Mobile
- */
- void terminateAllMobileRequests();
-
/**
* @brief Updates request timeout
*
@@ -194,50 +188,30 @@ class RequestController {
const uint32_t& mobile_correlation_id,
const uint32_t& new_timeout);
- /*
- * @brief Function Should be called when Low Voltage is occured
- */
- void OnLowVoltage();
-
- /*
- * @brief Function Should be called when Low Voltage is occured
- */
- void OnWakeUp();
-
- bool IsLowVoltage();
protected:
/**
- * @brief Check if this app is able to add new requests, or limits was exceeded
+ * @brief Checs if this app as able to add new requests, or limits was exceeded
* @param app_id - application id
* @param app_time_scale - time scale (seconds)
- * @param max_request_per_time_scale - maximum count of request that should be allowed for app_time_scale seconds
- * @return True if new request could be added, false otherwise
+ * @param max_request_per_time_scale - maximum count of request that should be allowed for app_time_scale secconds
*/
- bool CheckTimeScaleMaxRequest(const uint32_t& app_id,
+ bool checkTimeScaleMaxRequest(const uint32_t& app_id,
const uint32_t& app_time_scale,
const uint32_t& max_request_per_time_scale);
/**
- * @brief Check if this app is able to add new requests in current hmi_level, or limits was exceeded
+ * @brief Checs if this app as able to add new requests in current hmi_level, or limits was exceeded
* @param hmi_level - hmi level
* @param app_id - application id
* @param app_time_scale - time scale (seconds)
- * @param max_request_per_time_scale - maximum count of request that should be allowed for app_time_scale seconds
- * @return True if new request could be added, false otherwise
+ * @param max_request_per_time_scale - maximum count of request that should be allowed for app_time_scale secconds
*/
- bool CheckHMILevelTimeScaleMaxRequest(const mobile_apis::HMILevel::eType& hmi_level,
+ bool 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);
- /**
- * @brief Check Posibility to add new requests, or limits was exceeded
- * @param pending_requests_amount - maximum count of request that should be allowed for all applications
- * @return True if new request could be added, false otherwise
- */
- bool CheckPendingRequestsAmount(const uint32_t& pending_requests_amount);
-
void onTimer();
/**
@@ -246,7 +220,6 @@ class RequestController {
*/
void UpdateTimer();
-
private:
// Data types
@@ -256,7 +229,7 @@ class RequestController {
Worker(RequestController* requestController);
virtual ~Worker();
virtual void threadMain();
- virtual void exitThreadMain();
+ virtual bool exitThreadMain();
protected:
private:
RequestController* request_controller_;
@@ -269,7 +242,7 @@ class RequestController {
uint32_t pool_size_;
sync_primitives::ConditionalVariable cond_var_;
- std::list<RequestPtr> mobile_request_list_;
+ std::list<MobileRequestPtr> mobile_request_list_;
sync_primitives::Lock mobile_request_list_lock_;
RequestInfoSet pending_request_set_;
@@ -283,7 +256,6 @@ class RequestController {
timer::TimerThread<RequestController> timer_;
static const uint32_t dafault_sleep_time_ = UINT_MAX;
- bool is_low_voltage_;
DISALLOW_COPY_AND_ASSIGN(RequestController);
};
diff --git a/src/components/application_manager/include/application_manager/request_info.h b/src/components/application_manager/include/application_manager/request_info.h
index 13efe07a76..b1409488fd 100644
--- a/src/components/application_manager/include/application_manager/request_info.h
+++ b/src/components/application_manager/include/application_manager/request_info.h
@@ -1,34 +1,34 @@
-/*
- * \file request_info.h
- * \brief request information structure header 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 header 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.
*/
@@ -52,21 +52,19 @@ namespace request_controller {
*
*/
typedef utils::SharedPtr<commands::Command> RequestPtr;
+ typedef utils::SharedPtr<commands::CommandRequestImpl> MobileRequestPtr;
struct RequestInfo {
- enum RequestType {MobileRequest, HMIRequest};
- RequestInfo(const RequestType requst_type, const uint64_t timeout_sec)
+ RequestInfo(const uint64_t timeout_sec)
: timeout_sec_(timeout_sec) {
start_time_ = date_time::DateTime::getCurrentTime();
updateEndTime();
- requst_type_ = requst_type;
}
- RequestInfo(const RequestType requst_type, const TimevalStruct& start_time,const uint64_t timeout_sec)
+ RequestInfo(const TimevalStruct& start_time,const uint64_t timeout_sec)
: start_time_(start_time),
timeout_sec_(timeout_sec) {
updateEndTime();
- requst_type_ = requst_type;
}
virtual ~RequestInfo(){}
@@ -89,8 +87,8 @@ namespace request_controller {
}
bool isExpired() {
- if (date_time::GREATER ==
- date_time::DateTime::compareTime(end_time_, date_time::DateTime::getCurrentTime())) {
+ if ( date_time::GREATER ==
+ date_time::DateTime::compareTime(end_time_, date_time::DateTime::getCurrentTime()) ) {
return false;
}
return true;
@@ -115,9 +113,6 @@ namespace request_controller {
mobile_apis::HMILevel::eType hmi_level() {
return hmi_level_;
}
- RequestType requst_type() const {
- return requst_type_;
- }
protected:
TimevalStruct start_time_;
@@ -125,7 +120,6 @@ namespace request_controller {
TimevalStruct end_time_;
uint32_t app_id_;
mobile_apis::HMILevel::eType hmi_level_;
- RequestType requst_type_;
};
typedef utils::SharedPtr<RequestInfo> RequestInfoPtr;
diff --git a/src/components/application_manager/include/application_manager/resume_ctrl.h b/src/components/application_manager/include/application_manager/resume_ctrl.h
index 9d03fb0577..463df0b867 100644
--- a/src/components/application_manager/include/application_manager/resume_ctrl.h
+++ b/src/components/application_manager/include/application_manager/resume_ctrl.h
@@ -1,4 +1,4 @@
-/*
+/**
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
@@ -137,7 +137,6 @@ class ResumeCtrl: public event_engine::EventObserver {
*/
void IgnitionOff();
-
/**
* @brief Start timer for resumption applications
* Restore D1-D5 data
@@ -193,27 +192,13 @@ class ResumeCtrl: public event_engine::EventObserver {
uint32_t GetHMIApplicationID(const std::string& mobile_app_id);
/**
- * @brief Timer callback for restoring HMI Level
+ * @brief Timer callback function
*
*/
- void ApplicationResumptiOnTimer();
-
-
- /**
- * @brief SaveDataOnTimer :
- * Timer callback for persisting ResumptionData each N seconds
- * N gets from property
- */
- void SaveDataOnTimer();
+ void onTimer();
void ClearResumptionInfo();
- void ApplicationsDataUpdated() {
- is_data_saved = false;
- }
-
- void RestoreHmiLevel(uint32_t time_stamp, ApplicationSharedPtr application);
-
private:
typedef std::pair<uint32_t, uint32_t> application_timestamp;
@@ -275,115 +260,10 @@ class ResumeCtrl: public event_engine::EventObserver {
NsSmartDeviceLink::NsSmartObjects::SmartObject* request = NULL,
bool use_events = false);
- void InsertToTimerQueue(uint32_t app_id, uint32_t time_stamp);
-
- /**
- * @brief AddFiles allows to add files for the application
- * which should be resumed
- *
- * @param application application which will be resumed
- *
- * @param saved_app application specific section from backup file
- */
- void AddFiles(ApplicationSharedPtr application, const Json::Value& saved_app);
-
- /**
- * @brief AddSubmenues allows to add sub menues for the application
- * which should be resumed
- *
- * @param application application which will be resumed
- *
- * @param saved_app application specific section from backup file
- */
- void AddSubmenues(ApplicationSharedPtr application, const Json::Value& saved_app);
-
- /**
- * @brief AddCommands allows to add commands for the application
- * which should be resumed
- *
- * @param application application which will be resumed
- *
- * @param saved_app application specific section from backup file
- */
- void AddCommands(ApplicationSharedPtr application, const Json::Value& saved_app);
-
- /**
- * @brief AddChoicesets allows to add choice sets for the application
- * which should be resumed
- *
- * @param application application which will be resumed
- *
- * @param saved_app application specific section from backup file
- */
- void AddChoicesets(ApplicationSharedPtr application, const Json::Value& saved_app);
-
/**
- * @brief SetGlobalProperties allows to restore global properties.
- *
- * @param application application which will be resumed
- *
- * @param saved_app application specific section from backup file
- */
- void SetGlobalProperties(ApplicationSharedPtr application, const Json::Value& saved_app);
-
- /**
- * @brief AddSubscriptions allows to restore subscriptions
- *
- * @param application application which will be resumed
- *
- * @param saved_app application specific section from backup file
- */
- void AddSubscriptions(ApplicationSharedPtr application, const Json::Value& saved_app);
-
- /**
- * @brief ProcessHMIRequests allows to process obtained requests.
- *
- * @param requests request that should be processed.
- */
- void ProcessHMIRequests(const std::vector<smart_objects::SmartObject*> & requests);
-
- /**
- * @brief CheckIcons allows to check application icons
- *
- * @param application application under resumtion application
- *
- * @param json_object
- *
- * @return true in case icons exists, false otherwise
- */
- bool CheckIcons(ApplicationSharedPtr application, const Json::Value& json_object);
-
- /**
- * @brief GetFromSavedOrAppend allows to get existed record about application
- * or adds the new one.
- *
- * @param mobile_app_id application id.
- *
- * @return the reference to the record in applications array.
+ * @brief Time step to check resumption TIME_OUT
*/
- Json::Value& GetFromSavedOrAppend(const std::string& mobile_app_id);
-
- /**
- * @brief GetObjectIndex allows to obtain specified obbject index from
- * applications arrays.
- *
- * @param mobile_app_id application id that should be found.
- *
- * @return application's index of or -1 if it doesn't exists
- */
- int GetObjectIndex(const std::string& mobile_app_id);
-
- template<typename Iterator>
- Json::Value Append(Iterator first,
- Iterator last,
- const std::string& key,
- Json::Value& result) {
- while (first != last) {
- result[key].append(*first);
- ++first;
- }
- return result;
- }
+ static const uint32_t kTimeStep = 3;
/**
* @brief times of IGN_OFF that zombie application have to be saved.
@@ -398,10 +278,7 @@ class ResumeCtrl: public event_engine::EventObserver {
std::multiset<application_timestamp, TimeStampComparator> waiting_for_timer_;
mutable sync_primitives::Lock queue_lock_;
ApplicationManagerImpl* app_mngr_;
- timer::TimerThread<ResumeCtrl> restore_hmi_level_timer_;
- timer::TimerThread<ResumeCtrl> save_persistent_data_timer_;
- bool is_data_saved;
-
+ timer::TimerThread<ResumeCtrl> timer_;
};
} // namespace application_manager
diff --git a/src/components/application_manager/include/application_manager/time_metric_observer.h b/src/components/application_manager/include/application_manager/time_metric_observer.h
index de3deb8372..780401f6f3 100644
--- a/src/components/application_manager/include/application_manager/time_metric_observer.h
+++ b/src/components/application_manager/include/application_manager/time_metric_observer.h
@@ -1,4 +1,4 @@
-/*
+/**
* Copyright (c) 2014, Ford Motor Company
* All rights reserved.
*
diff --git a/src/components/application_manager/include/application_manager/usage_statistics.h b/src/components/application_manager/include/application_manager/usage_statistics.h
index d6ff1f2c49..dcd57aee34 100644
--- a/src/components/application_manager/include/application_manager/usage_statistics.h
+++ b/src/components/application_manager/include/application_manager/usage_statistics.h
@@ -1,4 +1,4 @@
-/*
+/**
* Copyright (c) 2014, Ford Motor Company
* All rights reserved.
*
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.
*
diff --git a/src/components/application_manager/test/CMakeLists.txt b/src/components/application_manager/test/CMakeLists.txt
index 73f9421732..4d0e7a738f 100644
--- a/src/components/application_manager/test/CMakeLists.txt
+++ b/src/components/application_manager/test/CMakeLists.txt
@@ -10,7 +10,6 @@ set_property(DIRECTORY "" PROPERTY INCLUDE_DIRECTORIES ${the_include_dirs})
include_directories (
${CMAKE_SOURCE_DIR}/src/3rd_party-static/gmock-1.7.0/include
${CMAKE_SOURCE_DIR}/src/3rd_party-static/gmock-1.7.0/gtest/include
- ${COMPONENTS_DIR}/application_manager/include/application_manager/policies
)
set(testSources
@@ -48,6 +47,10 @@ set (AM_SOURCES
include_directories(
${AM_SOURCE_DIR}/policy/src/policy/policy_table/table_struct
)
+ list(APPEND AM_SOURCES
+ ${COMPONENTS_DIR}/application_manager/src/policies/pt_exchange_handler_impl.cc
+ ${COMPONENTS_DIR}/application_manager/src/policies/policy_retry_sequence.cc
+ )
set(testLibraries
gmock
diff --git a/src/components/application_manager/test/mock/include/application_manager/application.h b/src/components/application_manager/test/mock/include/application_manager/application.h
index 4e56bfec94..5f1f598851 100644
--- a/src/components/application_manager/test/mock/include/application_manager/application.h
+++ b/src/components/application_manager/test/mock/include/application_manager/application.h
@@ -1,4 +1,4 @@
-/*
+/**
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
@@ -36,7 +36,6 @@
#include <string>
#include <map>
#include "utils/shared_ptr.h"
-#include "utils/data_accessor.h"
#include "interfaces/MOBILE_API.h"
#include "connection_handler/device.h"
#include "application_manager/message.h"
@@ -165,7 +164,6 @@ class DynamicApplicationData {
virtual const smart_objects::SmartObject* menu_title() const = 0;
virtual const smart_objects::SmartObject* menu_icon() const = 0;
- virtual void load_global_properties(const smart_objects::SmartObject& so) = 0;
virtual void set_help_prompt(
const smart_objects::SmartObject& help_prompt) = 0;
virtual void set_timeout_prompt(
@@ -270,7 +268,7 @@ class DynamicApplicationData {
*
* @return ChoiceSet map that is currently in use
*/
- virtual DataAccessor<PerformChoiceSetMap>
+ virtual const PerformChoiceSetMap&
performinteraction_choice_set_map() const = 0;
/*
@@ -287,17 +285,17 @@ class DynamicApplicationData {
/*
* @brief Retrieve application commands
*/
- virtual DataAccessor<CommandsMap> commands_map() const = 0;
+ virtual const CommandsMap& commands_map() const = 0;
/*
* @brief Retrieve application sub menus
*/
- virtual DataAccessor<SubMenuMap> sub_menu_map() const = 0;
+ virtual const SubMenuMap& sub_menu_map() const = 0;
/*
* @brief Retrieve application choice set map
*/
- virtual DataAccessor<ChoiceSetMap> choice_set_map() const = 0;
+ virtual const ChoiceSetMap& choice_set_map() const = 0;
/*
* @brief Sets perform interaction state
@@ -393,7 +391,6 @@ class Application : public virtual InitialApplicationData,
virtual void CloseActiveMessage() = 0;
virtual bool IsFullscreen() const = 0;
virtual bool MakeFullscreen() = 0;
- virtual void ChangeSupportingAppHMIType() = 0;
virtual bool IsAudible() const = 0;
virtual void MakeNotAudible() = 0;
virtual bool allowed_support_navigation() const = 0;
diff --git a/src/components/application_manager/test/mock/include/application_manager/application_data_impl.h b/src/components/application_manager/test/mock/include/application_manager/application_data_impl.h
index 494cfb1bce..556eee4349 100644
--- a/src/components/application_manager/test/mock/include/application_manager/application_data_impl.h
+++ b/src/components/application_manager/test/mock/include/application_manager/application_data_impl.h
@@ -1,4 +1,4 @@
-/*
+/**
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
@@ -34,7 +34,6 @@
#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_APPLICATION_DATA_IMPL_H_
#include <string>
-#include "utils/lock.h"
#include "smart_objects/smart_object.h"
#include "application_manager/application.h"
#include "interfaces/MOBILE_API.h"
@@ -90,7 +89,6 @@ class DynamicApplicationDataImpl : public virtual Application {
const smart_objects::SmartObject* menu_title() const;
const smart_objects::SmartObject* menu_icon() const;
- void load_global_properties(const smart_objects::SmartObject& properties_so);
void set_help_prompt(const smart_objects::SmartObject& help_prompt);
void set_timeout_prompt(const smart_objects::SmartObject& timeout_prompt);
void set_vr_help_title(const smart_objects::SmartObject& vr_help_title);
@@ -182,7 +180,7 @@ class DynamicApplicationDataImpl : public virtual Application {
*
* @return ChoiceSet map that is currently in use
*/
- inline DataAccessor<PerformChoiceSetMap> performinteraction_choice_set_map() const;
+ inline const PerformChoiceSetMap& performinteraction_choice_set_map() const;
/*
* @brief Retrieves choice set that is currently in use by perform
@@ -198,17 +196,17 @@ class DynamicApplicationDataImpl : public virtual Application {
/*
* @brief Retrieve application commands
*/
- inline DataAccessor<CommandsMap> commands_map() const;
+ inline const CommandsMap& commands_map() const;
/*
* @brief Retrieve application sub menus
*/
- inline DataAccessor<SubMenuMap> sub_menu_map() const;
+ inline const SubMenuMap& sub_menu_map() const;
/*
* @brief Retrieve application choice set map
*/
- inline DataAccessor<ChoiceSetMap> choice_set_map() const;
+ inline const ChoiceSetMap& choice_set_map() const;
/*
* @brief Sets perform interaction state
@@ -281,41 +279,27 @@ class DynamicApplicationDataImpl : public virtual Application {
CommandsMap commands_;
- mutable sync_primitives::Lock commands_lock_;
SubMenuMap sub_menu_;
- mutable sync_primitives::Lock sub_menu_lock_;
ChoiceSetMap choice_set_map_;
- mutable sync_primitives::Lock choice_set_map_lock_;
PerformChoiceSetMap performinteraction_choice_set_map_;
- mutable sync_primitives::Lock performinteraction_choice_set_lock_;
uint32_t is_perform_interaction_active_;
uint32_t perform_interaction_ui_corrid_;
bool is_reset_global_properties_active_;
int32_t perform_interaction_mode_;
private:
- void SetGlobalProperties(const smart_objects::SmartObject& param,
- void (DynamicApplicationData::*callback)(
- const NsSmartDeviceLink::NsSmartObjects::SmartObject&));
DISALLOW_COPY_AND_ASSIGN(DynamicApplicationDataImpl);
};
-DataAccessor<CommandsMap> DynamicApplicationDataImpl::commands_map() const {
- return DataAccessor<CommandsMap>(commands_, commands_lock_);
+const CommandsMap& DynamicApplicationDataImpl::commands_map() const {
+ return commands_;
}
-DataAccessor<SubMenuMap> DynamicApplicationDataImpl::sub_menu_map() const {
- return DataAccessor<SubMenuMap>(sub_menu_, sub_menu_lock_);
+const SubMenuMap& DynamicApplicationDataImpl::sub_menu_map() const {
+ return sub_menu_;
}
-DataAccessor<ChoiceSetMap> DynamicApplicationDataImpl::choice_set_map() const {
- return DataAccessor<ChoiceSetMap>(choice_set_map_, choice_set_map_lock_);
-}
-
-DataAccessor<PerformChoiceSetMap>
-DynamicApplicationDataImpl::performinteraction_choice_set_map() const {
- return DataAccessor<PerformChoiceSetMap>(
- performinteraction_choice_set_map_,
- performinteraction_choice_set_lock_);
+const ChoiceSetMap& DynamicApplicationDataImpl::choice_set_map() const {
+ return choice_set_map_;
}
uint32_t DynamicApplicationDataImpl::is_perform_interaction_active() const {
@@ -330,6 +314,11 @@ bool DynamicApplicationDataImpl::is_reset_global_properties_active() const {
return is_reset_global_properties_active_;
}
+const PerformChoiceSetMap&
+DynamicApplicationDataImpl::performinteraction_choice_set_map() const {
+ return performinteraction_choice_set_map_;
+}
+
inline int32_t DynamicApplicationDataImpl::perform_interaction_mode() const {
return perform_interaction_mode_;
}
diff --git a/src/components/application_manager/test/mock/include/application_manager/application_impl.h b/src/components/application_manager/test/mock/include/application_manager/application_impl.h
index fda0837d6b..dadfce0929 100644
--- a/src/components/application_manager/test/mock/include/application_manager/application_impl.h
+++ b/src/components/application_manager/test/mock/include/application_manager/application_impl.h
@@ -1,4 +1,4 @@
-/*
+/**
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
@@ -71,11 +71,6 @@ class ApplicationImpl : public virtual InitialApplicationDataImpl,
void CloseActiveMessage();
bool IsFullscreen() const;
bool MakeFullscreen();
-
- /**
- * @brief change supporting COMMUNICATION NAVIGATION
- */
- virtual void ChangeSupportingAppHMIType();
bool IsAudible() const;
void MakeNotAudible();
@@ -156,6 +151,7 @@ class ApplicationImpl : public virtual InitialApplicationDataImpl,
virtual uint32_t nextHash();
virtual uint32_t curHash() const;
+
/**
* @brief Change Hash for current application
* and send notification to mobile
@@ -235,6 +231,7 @@ class ApplicationImpl : public virtual InitialApplicationDataImpl,
UsageStatistics usage_report_;
ProtocolVersion protocol_version_;
bool is_voice_communication_application_;
+
// NAVI retry stream
volatile bool is_video_stream_retry_active_;
volatile bool is_audio_stream_retry_active_;
diff --git a/src/components/application_manager/test/mock/include/application_manager/application_manager_impl.h b/src/components/application_manager/test/mock/include/application_manager/application_manager_impl.h
index 1e0b95ddfc..85048477a5 100644
--- a/src/components/application_manager/test/mock/include/application_manager/application_manager_impl.h
+++ b/src/components/application_manager/test/mock/include/application_manager/application_manager_impl.h
@@ -133,13 +133,6 @@ typedef threads::MessageLoopThread<utils::PrioritizedQueue<MessageToMobile> > To
typedef threads::MessageLoopThread<utils::PrioritizedQueue<MessageFromHmi> > FromHmiQueue;
typedef threads::MessageLoopThread<utils::PrioritizedQueue<MessageToHmi> > ToHmiQueue;
-// AudioPassThru
-typedef struct {
-std::vector<uint8_t> binary_data;
-int32_t session_key;
-} AudioData;
-typedef std::queue<AudioData> RawAudioDataQueue;
-typedef threads::MessageLoopThread<RawAudioDataQueue> AudioPassThruQueue;
}
typedef std::vector<std::string> RPCParams;
@@ -149,7 +142,6 @@ class ApplicationManagerImpl : public ApplicationManager,
public connection_handler::ConnectionHandlerObserver,
public impl::FromMobileQueue::Handler, public impl::ToMobileQueue::Handler,
public impl::FromHmiQueue::Handler, public impl::ToHmiQueue::Handler,
- public impl::AudioPassThruQueue::Handler,
public utils::Singleton<ApplicationManagerImpl> {
friend class ResumeCtrl;
@@ -174,12 +166,10 @@ class ApplicationManagerImpl : public ApplicationManager,
const protocol_handler::ServiceType&));
MOCK_METHOD2(OnServiceEndedCallback, void (const int32_t&,
const protocol_handler::ServiceType&));
- MOCK_METHOD1(OnApplicationFloodCallBack, void(const uint32_t&));
MOCK_METHOD1(Handle, void (const impl::MessageFromMobile));
MOCK_METHOD1(Handle, void (const impl::MessageToMobile));
MOCK_METHOD1(Handle, void (const impl::MessageFromHmi));
MOCK_METHOD1(Handle, void (const impl::MessageToHmi));
- MOCK_METHOD1(Handle, void (const impl::AudioData));
//ApplicationManager methods
MOCK_METHOD1(set_hmi_message_handler, void (hmi_message_handler::HMIMessageHandler*));
@@ -187,9 +177,8 @@ class ApplicationManagerImpl : public ApplicationManager,
MOCK_METHOD1(set_connection_handler, void (connection_handler::ConnectionHandler*));
//ApplicationManagerImpl methods:
-#ifdef TIME_TESTER
+
MOCK_METHOD1(SetTimeMetricObserver, void(AMMetricObserver*));
-#endif
MOCK_METHOD1(RegisterApplication,
ApplicationSharedPtr(const utils::SharedPtr<smart_objects::SmartObject>&));
MOCK_METHOD0(hmi_capabilities, HMICapabilities& ());
@@ -204,6 +193,7 @@ class ApplicationManagerImpl : public ApplicationManager,
MOCK_METHOD1(application_by_policy_id, ApplicationSharedPtr (const std::string&));
MOCK_METHOD1(RemoveAppDataFromHMI, bool(ApplicationSharedPtr));
MOCK_METHOD1(HeadUnitReset, void(mobile_api::AppInterfaceUnregisteredReason::eType));
+ MOCK_METHOD0(HeadUnitSuspend, void());
MOCK_METHOD1(LoadAppDataToHMI, bool(ApplicationSharedPtr));
MOCK_METHOD1(ActivateApplication, bool (ApplicationSharedPtr));
MOCK_METHOD1(PutApplicationInFull, mobile_api::HMILevel::eType (ApplicationSharedPtr));
@@ -248,7 +238,7 @@ class ApplicationManagerImpl : public ApplicationManager,
MOCK_METHOD1(removeNotification, void(const commands::Command*));
MOCK_METHOD1(addNotification, void(const CommandSharedPtr ));
MOCK_METHOD0(StartDevicesDiscovery, void());
- MOCK_METHOD2(SendAudioPassThroughNotification, void(uint32_t, std::vector<uint8_t>&));
+ MOCK_METHOD2(SendAudioPassThroughNotification, void(uint32_t, std::vector<uint8_t>));
MOCK_METHOD1(set_all_apps_allowed, void(const bool));
MOCK_CONST_METHOD0(all_apps_allowed, bool());
MOCK_METHOD1(set_vr_session_started, void(const bool));
@@ -276,9 +266,6 @@ class ApplicationManagerImpl : public ApplicationManager,
MOCK_CONST_METHOD1(DoesAudioAppWithSameHMITypeExistInFullOrLimited, bool(ApplicationSharedPtr));
MOCK_CONST_METHOD0(active_application, ApplicationSharedPtr ());
MOCK_METHOD0(OnApplicationListUpdateTimer, void());
- MOCK_METHOD0(OnLowVoltage, void());
- MOCK_METHOD0(OnWakeUp, void());
- MOCK_METHOD1(OnUpdateHMIAppType, void(std::map<std::string, std::vector<std::string> >));
typedef const std::set<ApplicationSharedPtr> TAppList;
typedef std::set<ApplicationSharedPtr>::iterator TAppListIt;
diff --git a/src/components/application_manager/test/mock/include/application_manager/commands/command.h b/src/components/application_manager/test/mock/include/application_manager/commands/command.h
index 65eb8c143c..587c3d834c 100644
--- a/src/components/application_manager/test/mock/include/application_manager/commands/command.h
+++ b/src/components/application_manager/test/mock/include/application_manager/commands/command.h
@@ -1,4 +1,4 @@
-/*
+/**
Copyright (c) 2014, Ford Motor Company
All rights reserved.
diff --git a/src/components/application_manager/test/mock/include/application_manager/commands/command_impl.h b/src/components/application_manager/test/mock/include/application_manager/commands/command_impl.h
index d444298ce7..a34716bd62 100644
--- a/src/components/application_manager/test/mock/include/application_manager/commands/command_impl.h
+++ b/src/components/application_manager/test/mock/include/application_manager/commands/command_impl.h
@@ -1,4 +1,4 @@
-/*
+/**
Copyright (c) 2014, Ford Motor Company
All rights reserved.
diff --git a/src/components/application_manager/test/mock/include/application_manager/commands/command_request_impl.h b/src/components/application_manager/test/mock/include/application_manager/commands/command_request_impl.h
index 1c33bc4bf0..1bbba5aa0b 100644
--- a/src/components/application_manager/test/mock/include/application_manager/commands/command_request_impl.h
+++ b/src/components/application_manager/test/mock/include/application_manager/commands/command_request_impl.h
@@ -1,4 +1,4 @@
-/*
+/**
Copyright (c) 2014, Ford Motor Company
All rights reserved.
diff --git a/src/components/application_manager/test/mock/include/application_manager/commands/hmi/activate_app_request.h b/src/components/application_manager/test/mock/include/application_manager/commands/hmi/activate_app_request.h
index 7d1b294c86..3495ce1377 100644
--- a/src/components/application_manager/test/mock/include/application_manager/commands/hmi/activate_app_request.h
+++ b/src/components/application_manager/test/mock/include/application_manager/commands/hmi/activate_app_request.h
@@ -1,4 +1,4 @@
-/*
+/**
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
@@ -52,7 +52,7 @@ class ActivateAppRequest : public RequestToHMI, event_engine::EventObserver {
explicit ActivateAppRequest(const MessageSharedPtr& message);
/**
- * @brief Callback for response
+ * @brief Calback for response
*
* @param event - event response
**/
diff --git a/src/components/application_manager/test/mock/include/application_manager/commands/hmi/activate_app_response.h b/src/components/application_manager/test/mock/include/application_manager/commands/hmi/activate_app_response.h
index a15d317077..1df9bc095a 100644
--- a/src/components/application_manager/test/mock/include/application_manager/commands/hmi/activate_app_response.h
+++ b/src/components/application_manager/test/mock/include/application_manager/commands/hmi/activate_app_response.h
@@ -1,4 +1,4 @@
-/*
+/**
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
diff --git a/src/components/application_manager/test/mock/include/application_manager/commands/hmi/add_statistics_info_notification.h b/src/components/application_manager/test/mock/include/application_manager/commands/hmi/add_statistics_info_notification.h
index 1aa3b7a512..1569af434d 100644
--- a/src/components/application_manager/test/mock/include/application_manager/commands/hmi/add_statistics_info_notification.h
+++ b/src/components/application_manager/test/mock/include/application_manager/commands/hmi/add_statistics_info_notification.h
@@ -1,4 +1,4 @@
-/*
+/**
* Copyright (c) 2014, Ford Motor Company
* All rights reserved.
*
diff --git a/src/components/application_manager/test/mock/include/application_manager/commands/hmi/allow_all_apps_request.h b/src/components/application_manager/test/mock/include/application_manager/commands/hmi/allow_all_apps_request.h
index 3d42b6d5a6..6c2db489ce 100644
--- a/src/components/application_manager/test/mock/include/application_manager/commands/hmi/allow_all_apps_request.h
+++ b/src/components/application_manager/test/mock/include/application_manager/commands/hmi/allow_all_apps_request.h
@@ -1,4 +1,4 @@
-/*
+/**
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
diff --git a/src/components/application_manager/test/mock/include/application_manager/commands/hmi/allow_all_apps_response.h b/src/components/application_manager/test/mock/include/application_manager/commands/hmi/allow_all_apps_response.h
index ccc8d5ae7d..0eb8184fa8 100644
--- a/src/components/application_manager/test/mock/include/application_manager/commands/hmi/allow_all_apps_response.h
+++ b/src/components/application_manager/test/mock/include/application_manager/commands/hmi/allow_all_apps_response.h
@@ -1,4 +1,4 @@
-/*
+/**
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
diff --git a/src/components/application_manager/test/mock/include/application_manager/commands/hmi/allow_app_request.h b/src/components/application_manager/test/mock/include/application_manager/commands/hmi/allow_app_request.h
index e90576a7df..91228440a2 100644
--- a/src/components/application_manager/test/mock/include/application_manager/commands/hmi/allow_app_request.h
+++ b/src/components/application_manager/test/mock/include/application_manager/commands/hmi/allow_app_request.h
@@ -1,4 +1,4 @@
-/*
+/**
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
diff --git a/src/components/application_manager/test/mock/include/application_manager/commands/hmi/allow_app_response.h b/src/components/application_manager/test/mock/include/application_manager/commands/hmi/allow_app_response.h
index 6bedf30a38..5a24ac1a74 100644
--- a/src/components/application_manager/test/mock/include/application_manager/commands/hmi/allow_app_response.h
+++ b/src/components/application_manager/test/mock/include/application_manager/commands/hmi/allow_app_response.h
@@ -1,4 +1,4 @@
-/*
+/**
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
diff --git a/src/components/application_manager/test/mock/include/application_manager/commands/hmi/basic_communication_system_request.h b/src/components/application_manager/test/mock/include/application_manager/commands/hmi/basic_communication_system_request.h
index 867596f189..d066df813e 100644
--- a/src/components/application_manager/test/mock/include/application_manager/commands/hmi/basic_communication_system_request.h
+++ b/src/components/application_manager/test/mock/include/application_manager/commands/hmi/basic_communication_system_request.h
@@ -1,4 +1,4 @@
-/*
+/**
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
diff --git a/src/components/application_manager/test/mock/include/application_manager/commands/hmi/basic_communication_system_response.h b/src/components/application_manager/test/mock/include/application_manager/commands/hmi/basic_communication_system_response.h
index 5c174eac85..1948211c48 100644
--- a/src/components/application_manager/test/mock/include/application_manager/commands/hmi/basic_communication_system_response.h
+++ b/src/components/application_manager/test/mock/include/application_manager/commands/hmi/basic_communication_system_response.h
@@ -1,4 +1,4 @@
-/*
+/**
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
diff --git a/src/components/application_manager/test/mock/include/application_manager/commands/hmi/button_get_capabilities_request.h b/src/components/application_manager/test/mock/include/application_manager/commands/hmi/button_get_capabilities_request.h
index 639800a047..3c9fbac684 100644
--- a/src/components/application_manager/test/mock/include/application_manager/commands/hmi/button_get_capabilities_request.h
+++ b/src/components/application_manager/test/mock/include/application_manager/commands/hmi/button_get_capabilities_request.h
@@ -1,4 +1,4 @@
-/*
+/**
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
diff --git a/src/components/application_manager/test/mock/include/application_manager/commands/hmi/button_get_capabilities_response.h b/src/components/application_manager/test/mock/include/application_manager/commands/hmi/button_get_capabilities_response.h
index 7cd174477b..067954537d 100644
--- a/src/components/application_manager/test/mock/include/application_manager/commands/hmi/button_get_capabilities_response.h
+++ b/src/components/application_manager/test/mock/include/application_manager/commands/hmi/button_get_capabilities_response.h
@@ -1,4 +1,4 @@
-/*
+/**
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
diff --git a/src/components/application_manager/test/mock/include/application_manager/commands/hmi/close_popup_request.h b/src/components/application_manager/test/mock/include/application_manager/commands/hmi/close_popup_request.h
index 34722bc4f1..72ff8a2c5b 100644
--- a/src/components/application_manager/test/mock/include/application_manager/commands/hmi/close_popup_request.h
+++ b/src/components/application_manager/test/mock/include/application_manager/commands/hmi/close_popup_request.h
@@ -1,4 +1,4 @@
-/*
+/**
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
diff --git a/src/components/application_manager/test/mock/include/application_manager/commands/hmi/close_popup_response.h b/src/components/application_manager/test/mock/include/application_manager/commands/hmi/close_popup_response.h
index ce3a6d2936..05318e3cb9 100644
--- a/src/components/application_manager/test/mock/include/application_manager/commands/hmi/close_popup_response.h
+++ b/src/components/application_manager/test/mock/include/application_manager/commands/hmi/close_popup_response.h
@@ -1,4 +1,4 @@
-/*
+/**
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
diff --git a/src/components/application_manager/test/mock/include/application_manager/commands/hmi/get_system_info_request.h b/src/components/application_manager/test/mock/include/application_manager/commands/hmi/get_system_info_request.h
index 8262dbb6fa..8cb34718a1 100644
--- a/src/components/application_manager/test/mock/include/application_manager/commands/hmi/get_system_info_request.h
+++ b/src/components/application_manager/test/mock/include/application_manager/commands/hmi/get_system_info_request.h
@@ -1,4 +1,4 @@
-/*
+/**
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
diff --git a/src/components/application_manager/test/mock/include/application_manager/commands/hmi/get_system_info_response.h b/src/components/application_manager/test/mock/include/application_manager/commands/hmi/get_system_info_response.h
index 70983d3ce3..f10c07c52f 100644
--- a/src/components/application_manager/test/mock/include/application_manager/commands/hmi/get_system_info_response.h
+++ b/src/components/application_manager/test/mock/include/application_manager/commands/hmi/get_system_info_response.h
@@ -1,4 +1,4 @@
-/*
+/**
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
diff --git a/src/components/application_manager/test/mock/include/application_manager/commands/hmi/get_urls.h b/src/components/application_manager/test/mock/include/application_manager/commands/hmi/get_urls.h
index 551ab20431..9241446676 100644
--- a/src/components/application_manager/test/mock/include/application_manager/commands/hmi/get_urls.h
+++ b/src/components/application_manager/test/mock/include/application_manager/commands/hmi/get_urls.h
@@ -1,4 +1,4 @@
-/*
+/**
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
diff --git a/src/components/application_manager/test/mock/include/application_manager/commands/hmi/get_urls_response.h b/src/components/application_manager/test/mock/include/application_manager/commands/hmi/get_urls_response.h
index 956e5a788e..6b025142e2 100644
--- a/src/components/application_manager/test/mock/include/application_manager/commands/hmi/get_urls_response.h
+++ b/src/components/application_manager/test/mock/include/application_manager/commands/hmi/get_urls_response.h
@@ -1,4 +1,4 @@
-/*
+/**
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
diff --git a/src/components/application_manager/test/mock/include/application_manager/commands/hmi/mixing_audio_supported_request.h b/src/components/application_manager/test/mock/include/application_manager/commands/hmi/mixing_audio_supported_request.h
index 2957693c9e..905b5b3836 100644
--- a/src/components/application_manager/test/mock/include/application_manager/commands/hmi/mixing_audio_supported_request.h
+++ b/src/components/application_manager/test/mock/include/application_manager/commands/hmi/mixing_audio_supported_request.h
@@ -1,4 +1,4 @@
-/*
+/**
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
diff --git a/src/components/application_manager/test/mock/include/application_manager/commands/hmi/mixing_audio_supported_response.h b/src/components/application_manager/test/mock/include/application_manager/commands/hmi/mixing_audio_supported_response.h
index e2b5affe34..c8bfe4e156 100644
--- a/src/components/application_manager/test/mock/include/application_manager/commands/hmi/mixing_audio_supported_response.h
+++ b/src/components/application_manager/test/mock/include/application_manager/commands/hmi/mixing_audio_supported_response.h
@@ -1,4 +1,4 @@
-/*
+/**
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
diff --git a/src/components/application_manager/test/mock/include/application_manager/commands/hmi/navi_alert_maneuver_request.h b/src/components/application_manager/test/mock/include/application_manager/commands/hmi/navi_alert_maneuver_request.h
index 58f85f829a..1e2a39df94 100644
--- a/src/components/application_manager/test/mock/include/application_manager/commands/hmi/navi_alert_maneuver_request.h
+++ b/src/components/application_manager/test/mock/include/application_manager/commands/hmi/navi_alert_maneuver_request.h
@@ -1,4 +1,4 @@
-/*
+/**
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
diff --git a/src/components/application_manager/test/mock/include/application_manager/commands/hmi/navi_alert_maneuver_response.h b/src/components/application_manager/test/mock/include/application_manager/commands/hmi/navi_alert_maneuver_response.h
index 11f46d5da8..41e0f623f1 100644
--- a/src/components/application_manager/test/mock/include/application_manager/commands/hmi/navi_alert_maneuver_response.h
+++ b/src/components/application_manager/test/mock/include/application_manager/commands/hmi/navi_alert_maneuver_response.h
@@ -1,4 +1,4 @@
-/*
+/**
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
diff --git a/src/components/application_manager/test/mock/include/application_manager/commands/hmi/navi_audio_start_stream_request.h b/src/components/application_manager/test/mock/include/application_manager/commands/hmi/navi_audio_start_stream_request.h
index 97de7102f7..a321d32dd9 100644
--- a/src/components/application_manager/test/mock/include/application_manager/commands/hmi/navi_audio_start_stream_request.h
+++ b/src/components/application_manager/test/mock/include/application_manager/commands/hmi/navi_audio_start_stream_request.h
@@ -1,4 +1,4 @@
-/*
+/**
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
diff --git a/src/components/application_manager/test/mock/include/application_manager/commands/hmi/navi_is_ready_request.h b/src/components/application_manager/test/mock/include/application_manager/commands/hmi/navi_is_ready_request.h
index e779ecb699..a31efc7fe4 100644
--- a/src/components/application_manager/test/mock/include/application_manager/commands/hmi/navi_is_ready_request.h
+++ b/src/components/application_manager/test/mock/include/application_manager/commands/hmi/navi_is_ready_request.h
@@ -1,4 +1,4 @@
-/*
+/**
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
diff --git a/src/components/application_manager/test/mock/include/application_manager/commands/hmi/navi_is_ready_response.h b/src/components/application_manager/test/mock/include/application_manager/commands/hmi/navi_is_ready_response.h
index 3da6933bc3..0fbad35154 100644
--- a/src/components/application_manager/test/mock/include/application_manager/commands/hmi/navi_is_ready_response.h
+++ b/src/components/application_manager/test/mock/include/application_manager/commands/hmi/navi_is_ready_response.h
@@ -1,4 +1,4 @@
-/*
+/**
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
diff --git a/src/components/application_manager/test/mock/include/application_manager/commands/hmi/navi_send_location_request.h b/src/components/application_manager/test/mock/include/application_manager/commands/hmi/navi_send_location_request.h
index 45474b532a..9c91df648a 100644
--- a/src/components/application_manager/test/mock/include/application_manager/commands/hmi/navi_send_location_request.h
+++ b/src/components/application_manager/test/mock/include/application_manager/commands/hmi/navi_send_location_request.h
@@ -1,4 +1,4 @@
-/*
+/**
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
diff --git a/src/components/application_manager/test/mock/include/application_manager/commands/hmi/navi_send_location_response.h b/src/components/application_manager/test/mock/include/application_manager/commands/hmi/navi_send_location_response.h
index ef9a605c36..029d903192 100644
--- a/src/components/application_manager/test/mock/include/application_manager/commands/hmi/navi_send_location_response.h
+++ b/src/components/application_manager/test/mock/include/application_manager/commands/hmi/navi_send_location_response.h
@@ -1,4 +1,4 @@
-/*
+/**
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
diff --git a/src/components/application_manager/test/mock/include/application_manager/commands/hmi/navi_show_constant_tbt_request.h b/src/components/application_manager/test/mock/include/application_manager/commands/hmi/navi_show_constant_tbt_request.h
index b866ce3e1f..5da47e580b 100644
--- a/src/components/application_manager/test/mock/include/application_manager/commands/hmi/navi_show_constant_tbt_request.h
+++ b/src/components/application_manager/test/mock/include/application_manager/commands/hmi/navi_show_constant_tbt_request.h
@@ -1,4 +1,4 @@
-/*
+/**
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
diff --git a/src/components/application_manager/test/mock/include/application_manager/commands/hmi/navi_show_constant_tbt_response.h b/src/components/application_manager/test/mock/include/application_manager/commands/hmi/navi_show_constant_tbt_response.h
index 3f212985f9..4a26b26b09 100644
--- a/src/components/application_manager/test/mock/include/application_manager/commands/hmi/navi_show_constant_tbt_response.h
+++ b/src/components/application_manager/test/mock/include/application_manager/commands/hmi/navi_show_constant_tbt_response.h
@@ -1,4 +1,4 @@
-/*
+/**
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
diff --git a/src/components/application_manager/test/mock/include/application_manager/commands/hmi/navi_start_stream_request.h b/src/components/application_manager/test/mock/include/application_manager/commands/hmi/navi_start_stream_request.h
index 5b73e2dbab..f43b992219 100644
--- a/src/components/application_manager/test/mock/include/application_manager/commands/hmi/navi_start_stream_request.h
+++ b/src/components/application_manager/test/mock/include/application_manager/commands/hmi/navi_start_stream_request.h
@@ -1,4 +1,4 @@
-/*
+/**
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
diff --git a/src/components/application_manager/test/mock/include/application_manager/commands/hmi/navi_update_turn_list_request.h b/src/components/application_manager/test/mock/include/application_manager/commands/hmi/navi_update_turn_list_request.h
index a5e2f8bf37..61beef1b3b 100644
--- a/src/components/application_manager/test/mock/include/application_manager/commands/hmi/navi_update_turn_list_request.h
+++ b/src/components/application_manager/test/mock/include/application_manager/commands/hmi/navi_update_turn_list_request.h
@@ -1,4 +1,4 @@
-/*
+/**
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
diff --git a/src/components/application_manager/test/mock/include/application_manager/commands/hmi/navi_update_turn_list_response.h b/src/components/application_manager/test/mock/include/application_manager/commands/hmi/navi_update_turn_list_response.h
index 0e15a9175c..9e711b8be9 100644
--- a/src/components/application_manager/test/mock/include/application_manager/commands/hmi/navi_update_turn_list_response.h
+++ b/src/components/application_manager/test/mock/include/application_manager/commands/hmi/navi_update_turn_list_response.h
@@ -1,4 +1,4 @@
-/*
+/**
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
diff --git a/src/components/application_manager/test/mock/include/application_manager/commands/hmi/on_allow_sdl_functionality_notification.h b/src/components/application_manager/test/mock/include/application_manager/commands/hmi/on_allow_sdl_functionality_notification.h
index 6ec14e35b0..aa549638e4 100644
--- a/src/components/application_manager/test/mock/include/application_manager/commands/hmi/on_allow_sdl_functionality_notification.h
+++ b/src/components/application_manager/test/mock/include/application_manager/commands/hmi/on_allow_sdl_functionality_notification.h
@@ -1,4 +1,4 @@
-/*
+/**
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
diff --git a/src/components/application_manager/test/mock/include/application_manager/commands/hmi/on_app_activated_notification.h b/src/components/application_manager/test/mock/include/application_manager/commands/hmi/on_app_activated_notification.h
index 011df3832c..a8bdeb6c91 100644
--- a/src/components/application_manager/test/mock/include/application_manager/commands/hmi/on_app_activated_notification.h
+++ b/src/components/application_manager/test/mock/include/application_manager/commands/hmi/on_app_activated_notification.h
@@ -1,4 +1,4 @@
-/*
+/**
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
diff --git a/src/components/application_manager/test/mock/include/application_manager/commands/hmi/on_app_deactivated_notification.h b/src/components/application_manager/test/mock/include/application_manager/commands/hmi/on_app_deactivated_notification.h
index 8731fc43f1..4c56dc4158 100644
--- a/src/components/application_manager/test/mock/include/application_manager/commands/hmi/on_app_deactivated_notification.h
+++ b/src/components/application_manager/test/mock/include/application_manager/commands/hmi/on_app_deactivated_notification.h
@@ -1,4 +1,4 @@
-/*
+/**
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
diff --git a/src/components/application_manager/test/mock/include/application_manager/commands/hmi/on_app_permission_changed_notification.h b/src/components/application_manager/test/mock/include/application_manager/commands/hmi/on_app_permission_changed_notification.h
index c6ea82a15c..034efb7a8c 100644
--- a/src/components/application_manager/test/mock/include/application_manager/commands/hmi/on_app_permission_changed_notification.h
+++ b/src/components/application_manager/test/mock/include/application_manager/commands/hmi/on_app_permission_changed_notification.h
@@ -1,4 +1,4 @@
-/*
+/**
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
diff --git a/src/components/application_manager/test/mock/include/application_manager/commands/hmi/on_app_permission_consent_notification.h b/src/components/application_manager/test/mock/include/application_manager/commands/hmi/on_app_permission_consent_notification.h
index ea36d55b39..a5037820cc 100644
--- a/src/components/application_manager/test/mock/include/application_manager/commands/hmi/on_app_permission_consent_notification.h
+++ b/src/components/application_manager/test/mock/include/application_manager/commands/hmi/on_app_permission_consent_notification.h
@@ -1,4 +1,4 @@
-/*
+/**
* Copyright (c) 2014, Ford Motor Company
* All rights reserved.
*
diff --git a/src/components/application_manager/test/mock/include/application_manager/commands/hmi/on_app_registered_notification.h b/src/components/application_manager/test/mock/include/application_manager/commands/hmi/on_app_registered_notification.h
index 1ebbfcd483..4364aa9a35 100644
--- a/src/components/application_manager/test/mock/include/application_manager/commands/hmi/on_app_registered_notification.h
+++ b/src/components/application_manager/test/mock/include/application_manager/commands/hmi/on_app_registered_notification.h
@@ -1,4 +1,4 @@
-/*
+/**
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
diff --git a/src/components/application_manager/test/mock/include/application_manager/commands/hmi/on_app_unregistered_notification.h b/src/components/application_manager/test/mock/include/application_manager/commands/hmi/on_app_unregistered_notification.h
index 96fd19e9bc..d8470af396 100644
--- a/src/components/application_manager/test/mock/include/application_manager/commands/hmi/on_app_unregistered_notification.h
+++ b/src/components/application_manager/test/mock/include/application_manager/commands/hmi/on_app_unregistered_notification.h
@@ -1,4 +1,4 @@
-/*
+/**
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
diff --git a/src/components/application_manager/test/mock/include/application_manager/commands/hmi/on_button_event_notification.h b/src/components/application_manager/test/mock/include/application_manager/commands/hmi/on_button_event_notification.h
index 0a56d7d924..a4657ea24e 100644
--- a/src/components/application_manager/test/mock/include/application_manager/commands/hmi/on_button_event_notification.h
+++ b/src/components/application_manager/test/mock/include/application_manager/commands/hmi/on_button_event_notification.h
@@ -1,4 +1,4 @@
-/*
+/**
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
diff --git a/src/components/application_manager/test/mock/include/application_manager/commands/hmi/on_button_press_notification.h b/src/components/application_manager/test/mock/include/application_manager/commands/hmi/on_button_press_notification.h
index ce5f1de8f1..065cdc4a72 100644
--- a/src/components/application_manager/test/mock/include/application_manager/commands/hmi/on_button_press_notification.h
+++ b/src/components/application_manager/test/mock/include/application_manager/commands/hmi/on_button_press_notification.h
@@ -1,4 +1,4 @@
-/*
+/**
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
diff --git a/src/components/application_manager/test/mock/include/application_manager/commands/hmi/on_device_chosen_notification.h b/src/components/application_manager/test/mock/include/application_manager/commands/hmi/on_device_chosen_notification.h
index 17ba26b7f7..e980bfe41b 100644
--- a/src/components/application_manager/test/mock/include/application_manager/commands/hmi/on_device_chosen_notification.h
+++ b/src/components/application_manager/test/mock/include/application_manager/commands/hmi/on_device_chosen_notification.h
@@ -1,4 +1,4 @@
-/*
+/**
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
diff --git a/src/components/application_manager/test/mock/include/application_manager/commands/hmi/on_device_state_changed_notification.h b/src/components/application_manager/test/mock/include/application_manager/commands/hmi/on_device_state_changed_notification.h
index b87a6e2d9f..5c12bdfd9f 100644
--- a/src/components/application_manager/test/mock/include/application_manager/commands/hmi/on_device_state_changed_notification.h
+++ b/src/components/application_manager/test/mock/include/application_manager/commands/hmi/on_device_state_changed_notification.h
@@ -1,4 +1,4 @@
-/*
+/**
* Copyright (c) 2014, Ford Motor Company
* All rights reserved.
*
diff --git a/src/components/application_manager/test/mock/include/application_manager/commands/hmi/on_driver_distraction_notification.h b/src/components/application_manager/test/mock/include/application_manager/commands/hmi/on_driver_distraction_notification.h
index 01a87aae05..77da5cf3b2 100644
--- a/src/components/application_manager/test/mock/include/application_manager/commands/hmi/on_driver_distraction_notification.h
+++ b/src/components/application_manager/test/mock/include/application_manager/commands/hmi/on_driver_distraction_notification.h
@@ -1,4 +1,4 @@
-/*
+/**
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
diff --git a/src/components/application_manager/test/mock/include/application_manager/commands/hmi/on_exit_all_applications_notification.h b/src/components/application_manager/test/mock/include/application_manager/commands/hmi/on_exit_all_applications_notification.h
index 65d78f60c6..c913509e5e 100644
--- a/src/components/application_manager/test/mock/include/application_manager/commands/hmi/on_exit_all_applications_notification.h
+++ b/src/components/application_manager/test/mock/include/application_manager/commands/hmi/on_exit_all_applications_notification.h
@@ -1,4 +1,4 @@
-/*
+/**
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
diff --git a/src/components/application_manager/test/mock/include/application_manager/commands/hmi/on_exit_application_notification.h b/src/components/application_manager/test/mock/include/application_manager/commands/hmi/on_exit_application_notification.h
index 479dd3a09c..b78c0e2afe 100644
--- a/src/components/application_manager/test/mock/include/application_manager/commands/hmi/on_exit_application_notification.h
+++ b/src/components/application_manager/test/mock/include/application_manager/commands/hmi/on_exit_application_notification.h
@@ -1,4 +1,4 @@
-/*
+/**
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
diff --git a/src/components/application_manager/test/mock/include/application_manager/commands/hmi/on_file_removed_notification.h b/src/components/application_manager/test/mock/include/application_manager/commands/hmi/on_file_removed_notification.h
index cc47705c82..b6b46041f8 100644
--- a/src/components/application_manager/test/mock/include/application_manager/commands/hmi/on_file_removed_notification.h
+++ b/src/components/application_manager/test/mock/include/application_manager/commands/hmi/on_file_removed_notification.h
@@ -1,4 +1,4 @@
-/*
+/**
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
diff --git a/src/components/application_manager/test/mock/include/application_manager/commands/hmi/on_find_applications.h b/src/components/application_manager/test/mock/include/application_manager/commands/hmi/on_find_applications.h
index f9fb9cdb21..2499129b2c 100644
--- a/src/components/application_manager/test/mock/include/application_manager/commands/hmi/on_find_applications.h
+++ b/src/components/application_manager/test/mock/include/application_manager/commands/hmi/on_find_applications.h
@@ -1,4 +1,4 @@
-/*
+/**
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
diff --git a/src/components/application_manager/test/mock/include/application_manager/commands/hmi/on_ignition_cycle_over_notification.h b/src/components/application_manager/test/mock/include/application_manager/commands/hmi/on_ignition_cycle_over_notification.h
index f8fccdc382..ed0638f3cc 100644
--- a/src/components/application_manager/test/mock/include/application_manager/commands/hmi/on_ignition_cycle_over_notification.h
+++ b/src/components/application_manager/test/mock/include/application_manager/commands/hmi/on_ignition_cycle_over_notification.h
@@ -1,4 +1,4 @@
-/*
+/**
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
diff --git a/src/components/application_manager/test/mock/include/application_manager/commands/hmi/on_navi_tbt_client_state_notification.h b/src/components/application_manager/test/mock/include/application_manager/commands/hmi/on_navi_tbt_client_state_notification.h
index a657ffcc68..6e42e1a0cd 100644
--- a/src/components/application_manager/test/mock/include/application_manager/commands/hmi/on_navi_tbt_client_state_notification.h
+++ b/src/components/application_manager/test/mock/include/application_manager/commands/hmi/on_navi_tbt_client_state_notification.h
@@ -1,4 +1,4 @@
-/*
+/**
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
diff --git a/src/components/application_manager/test/mock/include/application_manager/commands/hmi/on_play_tone_notification.h b/src/components/application_manager/test/mock/include/application_manager/commands/hmi/on_play_tone_notification.h
index ceba0528fa..8e463c3276 100644
--- a/src/components/application_manager/test/mock/include/application_manager/commands/hmi/on_play_tone_notification.h
+++ b/src/components/application_manager/test/mock/include/application_manager/commands/hmi/on_play_tone_notification.h
@@ -1,4 +1,4 @@
-/*
+/**
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
diff --git a/src/components/application_manager/test/mock/include/application_manager/commands/hmi/on_policy_update.h b/src/components/application_manager/test/mock/include/application_manager/commands/hmi/on_policy_update.h
index 81278fb75a..f71de540e5 100644
--- a/src/components/application_manager/test/mock/include/application_manager/commands/hmi/on_policy_update.h
+++ b/src/components/application_manager/test/mock/include/application_manager/commands/hmi/on_policy_update.h
@@ -1,4 +1,4 @@
-/*
+/**
* Copyright (c) 2014, Ford Motor Company
* All rights reserved.
*
diff --git a/src/components/application_manager/test/mock/include/application_manager/commands/hmi/on_put_file_notification.h b/src/components/application_manager/test/mock/include/application_manager/commands/hmi/on_put_file_notification.h
index bc60284309..839af785be 100644
--- a/src/components/application_manager/test/mock/include/application_manager/commands/hmi/on_put_file_notification.h
+++ b/src/components/application_manager/test/mock/include/application_manager/commands/hmi/on_put_file_notification.h
@@ -1,4 +1,4 @@
-/*
+/**
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
diff --git a/src/components/application_manager/test/mock/include/application_manager/commands/hmi/on_ready_notification.h b/src/components/application_manager/test/mock/include/application_manager/commands/hmi/on_ready_notification.h
index 24fc52deac..a3e2dd731d 100644
--- a/src/components/application_manager/test/mock/include/application_manager/commands/hmi/on_ready_notification.h
+++ b/src/components/application_manager/test/mock/include/application_manager/commands/hmi/on_ready_notification.h
@@ -1,4 +1,4 @@
-/*
+/**
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
diff --git a/src/components/application_manager/test/mock/include/application_manager/commands/hmi/on_received_policy_update.h b/src/components/application_manager/test/mock/include/application_manager/commands/hmi/on_received_policy_update.h
index 0eeb28218f..38a4470d22 100644
--- a/src/components/application_manager/test/mock/include/application_manager/commands/hmi/on_received_policy_update.h
+++ b/src/components/application_manager/test/mock/include/application_manager/commands/hmi/on_received_policy_update.h
@@ -1,4 +1,4 @@
-/*
+/**
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
diff --git a/src/components/application_manager/test/mock/include/application_manager/commands/hmi/on_record_start_notification.h b/src/components/application_manager/test/mock/include/application_manager/commands/hmi/on_record_start_notification.h
index 67cccdd816..81f0b5bdda 100644
--- a/src/components/application_manager/test/mock/include/application_manager/commands/hmi/on_record_start_notification.h
+++ b/src/components/application_manager/test/mock/include/application_manager/commands/hmi/on_record_start_notification.h
@@ -1,4 +1,4 @@
-/*
+/**
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
diff --git a/src/components/application_manager/test/mock/include/application_manager/commands/hmi/on_resume_audio_source_notification.h b/src/components/application_manager/test/mock/include/application_manager/commands/hmi/on_resume_audio_source_notification.h
index 03f84d0907..c27e2e5ee8 100644
--- a/src/components/application_manager/test/mock/include/application_manager/commands/hmi/on_resume_audio_source_notification.h
+++ b/src/components/application_manager/test/mock/include/application_manager/commands/hmi/on_resume_audio_source_notification.h
@@ -1,4 +1,4 @@
-/*
+/**
* Copyright (c) 2014, Ford Motor Company
* All rights reserved.
*
diff --git a/src/components/application_manager/test/mock/include/application_manager/commands/hmi/on_sdl_close_notification.h b/src/components/application_manager/test/mock/include/application_manager/commands/hmi/on_sdl_close_notification.h
index 5b9ac04e8f..e6b4418d6d 100644
--- a/src/components/application_manager/test/mock/include/application_manager/commands/hmi/on_sdl_close_notification.h
+++ b/src/components/application_manager/test/mock/include/application_manager/commands/hmi/on_sdl_close_notification.h
@@ -1,4 +1,4 @@
-/*
+/**
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
diff --git a/src/components/application_manager/test/mock/include/application_manager/commands/hmi/on_sdl_consent_needed_notification.h b/src/components/application_manager/test/mock/include/application_manager/commands/hmi/on_sdl_consent_needed_notification.h
index 4f30873e4e..c9b93a4dcf 100644
--- a/src/components/application_manager/test/mock/include/application_manager/commands/hmi/on_sdl_consent_needed_notification.h
+++ b/src/components/application_manager/test/mock/include/application_manager/commands/hmi/on_sdl_consent_needed_notification.h
@@ -1,4 +1,4 @@
-/*
+/**
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
diff --git a/src/components/application_manager/test/mock/include/application_manager/commands/hmi/on_sdl_persistence_complete_notification.h b/src/components/application_manager/test/mock/include/application_manager/commands/hmi/on_sdl_persistence_complete_notification.h
index 6f8f3a6e1a..5da06ef34c 100644
--- a/src/components/application_manager/test/mock/include/application_manager/commands/hmi/on_sdl_persistence_complete_notification.h
+++ b/src/components/application_manager/test/mock/include/application_manager/commands/hmi/on_sdl_persistence_complete_notification.h
@@ -1,4 +1,4 @@
-/*
+/**
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
diff --git a/src/components/application_manager/test/mock/include/application_manager/commands/hmi/on_start_device_discovery.h b/src/components/application_manager/test/mock/include/application_manager/commands/hmi/on_start_device_discovery.h
index bfa14f67fc..3e4dc1daf4 100644
--- a/src/components/application_manager/test/mock/include/application_manager/commands/hmi/on_start_device_discovery.h
+++ b/src/components/application_manager/test/mock/include/application_manager/commands/hmi/on_start_device_discovery.h
@@ -1,4 +1,4 @@
-/*
+/**
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
diff --git a/src/components/application_manager/test/mock/include/application_manager/commands/hmi/on_status_update_notification.h b/src/components/application_manager/test/mock/include/application_manager/commands/hmi/on_status_update_notification.h
index c123826886..ae85d13713 100644
--- a/src/components/application_manager/test/mock/include/application_manager/commands/hmi/on_status_update_notification.h
+++ b/src/components/application_manager/test/mock/include/application_manager/commands/hmi/on_status_update_notification.h
@@ -1,4 +1,4 @@
-/*
+/**
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
diff --git a/src/components/application_manager/test/mock/include/application_manager/commands/hmi/on_system_context_notification.h b/src/components/application_manager/test/mock/include/application_manager/commands/hmi/on_system_context_notification.h
index 35d6f49daa..b16df6069e 100644
--- a/src/components/application_manager/test/mock/include/application_manager/commands/hmi/on_system_context_notification.h
+++ b/src/components/application_manager/test/mock/include/application_manager/commands/hmi/on_system_context_notification.h
@@ -1,4 +1,4 @@
-/*
+/**
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
diff --git a/src/components/application_manager/test/mock/include/application_manager/commands/hmi/on_system_error_notification.h b/src/components/application_manager/test/mock/include/application_manager/commands/hmi/on_system_error_notification.h
index ee7df7acd6..cb3fc12017 100644
--- a/src/components/application_manager/test/mock/include/application_manager/commands/hmi/on_system_error_notification.h
+++ b/src/components/application_manager/test/mock/include/application_manager/commands/hmi/on_system_error_notification.h
@@ -1,4 +1,4 @@
-/*
+/**
* Copyright (c) 2014, Ford Motor Company
* All rights reserved.
*
diff --git a/src/components/application_manager/test/mock/include/application_manager/commands/hmi/on_system_info_changed_notification.h b/src/components/application_manager/test/mock/include/application_manager/commands/hmi/on_system_info_changed_notification.h
index 9b6c62782c..d0bcadfaac 100644
--- a/src/components/application_manager/test/mock/include/application_manager/commands/hmi/on_system_info_changed_notification.h
+++ b/src/components/application_manager/test/mock/include/application_manager/commands/hmi/on_system_info_changed_notification.h
@@ -1,4 +1,4 @@
-/*
+/**
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
diff --git a/src/components/application_manager/test/mock/include/application_manager/commands/hmi/on_system_request_notification.h b/src/components/application_manager/test/mock/include/application_manager/commands/hmi/on_system_request_notification.h
index f1d25e24a4..6e3a0eea7f 100644
--- a/src/components/application_manager/test/mock/include/application_manager/commands/hmi/on_system_request_notification.h
+++ b/src/components/application_manager/test/mock/include/application_manager/commands/hmi/on_system_request_notification.h
@@ -1,4 +1,4 @@
-/*
+/**
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
diff --git a/src/components/application_manager/test/mock/include/application_manager/commands/hmi/on_tts_language_change_notification.h b/src/components/application_manager/test/mock/include/application_manager/commands/hmi/on_tts_language_change_notification.h
index 79ae9b496e..d9b55ac0c1 100644
--- a/src/components/application_manager/test/mock/include/application_manager/commands/hmi/on_tts_language_change_notification.h
+++ b/src/components/application_manager/test/mock/include/application_manager/commands/hmi/on_tts_language_change_notification.h
@@ -1,4 +1,4 @@
-/*
+/**
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
diff --git a/src/components/application_manager/test/mock/include/application_manager/commands/hmi/on_tts_reset_timeout_notification.h b/src/components/application_manager/test/mock/include/application_manager/commands/hmi/on_tts_reset_timeout_notification.h
index 11cb755544..3bafc920b7 100644
--- a/src/components/application_manager/test/mock/include/application_manager/commands/hmi/on_tts_reset_timeout_notification.h
+++ b/src/components/application_manager/test/mock/include/application_manager/commands/hmi/on_tts_reset_timeout_notification.h
@@ -1,4 +1,4 @@
-/*
+/**
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
diff --git a/src/components/application_manager/test/mock/include/application_manager/commands/hmi/on_tts_started_notification.h b/src/components/application_manager/test/mock/include/application_manager/commands/hmi/on_tts_started_notification.h
index c7e88ac558..8cb6256074 100644
--- a/src/components/application_manager/test/mock/include/application_manager/commands/hmi/on_tts_started_notification.h
+++ b/src/components/application_manager/test/mock/include/application_manager/commands/hmi/on_tts_started_notification.h
@@ -1,4 +1,4 @@
-/*
+/**
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
diff --git a/src/components/application_manager/test/mock/include/application_manager/commands/hmi/on_tts_stopped_notification.h b/src/components/application_manager/test/mock/include/application_manager/commands/hmi/on_tts_stopped_notification.h
index bf5dc7fb9e..31fb6fb31c 100644
--- a/src/components/application_manager/test/mock/include/application_manager/commands/hmi/on_tts_stopped_notification.h
+++ b/src/components/application_manager/test/mock/include/application_manager/commands/hmi/on_tts_stopped_notification.h
@@ -1,4 +1,4 @@
-/*
+/**
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
diff --git a/src/components/application_manager/test/mock/include/application_manager/commands/hmi/on_ui_command_notification.h b/src/components/application_manager/test/mock/include/application_manager/commands/hmi/on_ui_command_notification.h
index b4a0228c78..1d0aaf3078 100644
--- a/src/components/application_manager/test/mock/include/application_manager/commands/hmi/on_ui_command_notification.h
+++ b/src/components/application_manager/test/mock/include/application_manager/commands/hmi/on_ui_command_notification.h
@@ -1,4 +1,4 @@
-/*
+/**
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
diff --git a/src/components/application_manager/test/mock/include/application_manager/commands/hmi/on_ui_keyboard_input_notification.h b/src/components/application_manager/test/mock/include/application_manager/commands/hmi/on_ui_keyboard_input_notification.h
index 77b771065b..bb0a6a72d3 100644
--- a/src/components/application_manager/test/mock/include/application_manager/commands/hmi/on_ui_keyboard_input_notification.h
+++ b/src/components/application_manager/test/mock/include/application_manager/commands/hmi/on_ui_keyboard_input_notification.h
@@ -1,4 +1,4 @@
-/*
+/**
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
diff --git a/src/components/application_manager/test/mock/include/application_manager/commands/hmi/on_ui_language_change_notification.h b/src/components/application_manager/test/mock/include/application_manager/commands/hmi/on_ui_language_change_notification.h
index bcb661c89d..85b8f60c4d 100644
--- a/src/components/application_manager/test/mock/include/application_manager/commands/hmi/on_ui_language_change_notification.h
+++ b/src/components/application_manager/test/mock/include/application_manager/commands/hmi/on_ui_language_change_notification.h
@@ -1,4 +1,4 @@
-/*
+/**
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
diff --git a/src/components/application_manager/test/mock/include/application_manager/commands/hmi/on_ui_reset_timeout_notification.h b/src/components/application_manager/test/mock/include/application_manager/commands/hmi/on_ui_reset_timeout_notification.h
index f97c8768b5..511606d077 100644
--- a/src/components/application_manager/test/mock/include/application_manager/commands/hmi/on_ui_reset_timeout_notification.h
+++ b/src/components/application_manager/test/mock/include/application_manager/commands/hmi/on_ui_reset_timeout_notification.h
@@ -1,4 +1,4 @@
-/*
+/**
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
diff --git a/src/components/application_manager/test/mock/include/application_manager/commands/hmi/on_ui_touch_event_notification.h b/src/components/application_manager/test/mock/include/application_manager/commands/hmi/on_ui_touch_event_notification.h
index 6d8005e12f..3231d1ca29 100644
--- a/src/components/application_manager/test/mock/include/application_manager/commands/hmi/on_ui_touch_event_notification.h
+++ b/src/components/application_manager/test/mock/include/application_manager/commands/hmi/on_ui_touch_event_notification.h
@@ -1,4 +1,4 @@
-/*
+/**
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
diff --git a/src/components/application_manager/test/mock/include/application_manager/commands/hmi/on_update_device_list.h b/src/components/application_manager/test/mock/include/application_manager/commands/hmi/on_update_device_list.h
index f56d01a5cc..c0d355c925 100644
--- a/src/components/application_manager/test/mock/include/application_manager/commands/hmi/on_update_device_list.h
+++ b/src/components/application_manager/test/mock/include/application_manager/commands/hmi/on_update_device_list.h
@@ -1,4 +1,4 @@
-/*
+/**
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
diff --git a/src/components/application_manager/test/mock/include/application_manager/commands/hmi/on_vi_acc_pedal_position_notification.h b/src/components/application_manager/test/mock/include/application_manager/commands/hmi/on_vi_acc_pedal_position_notification.h
index d591ab2be6..04bb3e54bc 100644
--- a/src/components/application_manager/test/mock/include/application_manager/commands/hmi/on_vi_acc_pedal_position_notification.h
+++ b/src/components/application_manager/test/mock/include/application_manager/commands/hmi/on_vi_acc_pedal_position_notification.h
@@ -1,4 +1,4 @@
-/*
+/**
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
diff --git a/src/components/application_manager/test/mock/include/application_manager/commands/hmi/on_vi_belt_status_notification.h b/src/components/application_manager/test/mock/include/application_manager/commands/hmi/on_vi_belt_status_notification.h
index f901462fdf..3cfb048cdc 100644
--- a/src/components/application_manager/test/mock/include/application_manager/commands/hmi/on_vi_belt_status_notification.h
+++ b/src/components/application_manager/test/mock/include/application_manager/commands/hmi/on_vi_belt_status_notification.h
@@ -1,4 +1,4 @@
-/*
+/**
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
diff --git a/src/components/application_manager/test/mock/include/application_manager/commands/hmi/on_vi_body_information_notification.h b/src/components/application_manager/test/mock/include/application_manager/commands/hmi/on_vi_body_information_notification.h
index a0bc31778a..b9ecf5a34b 100644
--- a/src/components/application_manager/test/mock/include/application_manager/commands/hmi/on_vi_body_information_notification.h
+++ b/src/components/application_manager/test/mock/include/application_manager/commands/hmi/on_vi_body_information_notification.h
@@ -1,4 +1,4 @@
-/*
+/**
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
diff --git a/src/components/application_manager/test/mock/include/application_manager/commands/hmi/on_vi_device_status_notification.h b/src/components/application_manager/test/mock/include/application_manager/commands/hmi/on_vi_device_status_notification.h
index 0e24616f3e..925989e8c6 100644
--- a/src/components/application_manager/test/mock/include/application_manager/commands/hmi/on_vi_device_status_notification.h
+++ b/src/components/application_manager/test/mock/include/application_manager/commands/hmi/on_vi_device_status_notification.h
@@ -1,4 +1,4 @@
-/*
+/**
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
diff --git a/src/components/application_manager/test/mock/include/application_manager/commands/hmi/on_vi_driver_braking_notification.h b/src/components/application_manager/test/mock/include/application_manager/commands/hmi/on_vi_driver_braking_notification.h
index 0290388756..7baea90651 100644
--- a/src/components/application_manager/test/mock/include/application_manager/commands/hmi/on_vi_driver_braking_notification.h
+++ b/src/components/application_manager/test/mock/include/application_manager/commands/hmi/on_vi_driver_braking_notification.h
@@ -1,4 +1,4 @@
-/*
+/**
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
diff --git a/src/components/application_manager/test/mock/include/application_manager/commands/hmi/on_vi_engine_torque_notification.h b/src/components/application_manager/test/mock/include/application_manager/commands/hmi/on_vi_engine_torque_notification.h
index 8307e5359e..33dd824c6e 100644
--- a/src/components/application_manager/test/mock/include/application_manager/commands/hmi/on_vi_engine_torque_notification.h
+++ b/src/components/application_manager/test/mock/include/application_manager/commands/hmi/on_vi_engine_torque_notification.h
@@ -1,4 +1,4 @@
-/*
+/**
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
diff --git a/src/components/application_manager/test/mock/include/application_manager/commands/hmi/on_vi_external_temperature_notification.h b/src/components/application_manager/test/mock/include/application_manager/commands/hmi/on_vi_external_temperature_notification.h
index be5b086853..207302a373 100644
--- a/src/components/application_manager/test/mock/include/application_manager/commands/hmi/on_vi_external_temperature_notification.h
+++ b/src/components/application_manager/test/mock/include/application_manager/commands/hmi/on_vi_external_temperature_notification.h
@@ -1,4 +1,4 @@
-/*
+/**
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
diff --git a/src/components/application_manager/test/mock/include/application_manager/commands/hmi/on_vi_fuel_level_notification.h b/src/components/application_manager/test/mock/include/application_manager/commands/hmi/on_vi_fuel_level_notification.h
index 83e6f845e0..535758db25 100644
--- a/src/components/application_manager/test/mock/include/application_manager/commands/hmi/on_vi_fuel_level_notification.h
+++ b/src/components/application_manager/test/mock/include/application_manager/commands/hmi/on_vi_fuel_level_notification.h
@@ -1,4 +1,4 @@
-/*
+/**
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
diff --git a/src/components/application_manager/test/mock/include/application_manager/commands/hmi/on_vi_fuel_level_state_notification.h b/src/components/application_manager/test/mock/include/application_manager/commands/hmi/on_vi_fuel_level_state_notification.h
index 42a6b8e0d9..92dffd89b3 100644
--- a/src/components/application_manager/test/mock/include/application_manager/commands/hmi/on_vi_fuel_level_state_notification.h
+++ b/src/components/application_manager/test/mock/include/application_manager/commands/hmi/on_vi_fuel_level_state_notification.h
@@ -1,4 +1,4 @@
-/*
+/**
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
diff --git a/src/components/application_manager/test/mock/include/application_manager/commands/hmi/on_vi_gps_data_notification.h b/src/components/application_manager/test/mock/include/application_manager/commands/hmi/on_vi_gps_data_notification.h
index 01c2cf60b6..d8f2a768fc 100644
--- a/src/components/application_manager/test/mock/include/application_manager/commands/hmi/on_vi_gps_data_notification.h
+++ b/src/components/application_manager/test/mock/include/application_manager/commands/hmi/on_vi_gps_data_notification.h
@@ -1,4 +1,4 @@
-/*
+/**
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
diff --git a/src/components/application_manager/test/mock/include/application_manager/commands/hmi/on_vi_head_lamp_status_notification.h b/src/components/application_manager/test/mock/include/application_manager/commands/hmi/on_vi_head_lamp_status_notification.h
index dc80b33ddd..47802e97eb 100644
--- a/src/components/application_manager/test/mock/include/application_manager/commands/hmi/on_vi_head_lamp_status_notification.h
+++ b/src/components/application_manager/test/mock/include/application_manager/commands/hmi/on_vi_head_lamp_status_notification.h
@@ -1,4 +1,4 @@
-/*
+/**
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
diff --git a/src/components/application_manager/test/mock/include/application_manager/commands/hmi/on_vi_instant_fuel_consumption_notification.h b/src/components/application_manager/test/mock/include/application_manager/commands/hmi/on_vi_instant_fuel_consumption_notification.h
index c4e5accead..fe38412980 100644
--- a/src/components/application_manager/test/mock/include/application_manager/commands/hmi/on_vi_instant_fuel_consumption_notification.h
+++ b/src/components/application_manager/test/mock/include/application_manager/commands/hmi/on_vi_instant_fuel_consumption_notification.h
@@ -1,4 +1,4 @@
-/*
+/**
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
diff --git a/src/components/application_manager/test/mock/include/application_manager/commands/hmi/on_vi_my_key_notification.h b/src/components/application_manager/test/mock/include/application_manager/commands/hmi/on_vi_my_key_notification.h
index e2d9d91ae1..d636b6e779 100644
--- a/src/components/application_manager/test/mock/include/application_manager/commands/hmi/on_vi_my_key_notification.h
+++ b/src/components/application_manager/test/mock/include/application_manager/commands/hmi/on_vi_my_key_notification.h
@@ -1,4 +1,4 @@
-/*
+/**
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
diff --git a/src/components/application_manager/test/mock/include/application_manager/commands/hmi/on_vi_odometer_notification.h b/src/components/application_manager/test/mock/include/application_manager/commands/hmi/on_vi_odometer_notification.h
index 7c1c691ac5..1cf4c25878 100644
--- a/src/components/application_manager/test/mock/include/application_manager/commands/hmi/on_vi_odometer_notification.h
+++ b/src/components/application_manager/test/mock/include/application_manager/commands/hmi/on_vi_odometer_notification.h
@@ -1,4 +1,4 @@
-/*
+/**
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
diff --git a/src/components/application_manager/test/mock/include/application_manager/commands/hmi/on_vi_prndl_notification.h b/src/components/application_manager/test/mock/include/application_manager/commands/hmi/on_vi_prndl_notification.h
index bf2ca83f8f..5a3a136374 100644
--- a/src/components/application_manager/test/mock/include/application_manager/commands/hmi/on_vi_prndl_notification.h
+++ b/src/components/application_manager/test/mock/include/application_manager/commands/hmi/on_vi_prndl_notification.h
@@ -1,4 +1,4 @@
-/*
+/**
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
diff --git a/src/components/application_manager/test/mock/include/application_manager/commands/hmi/on_vi_rpm_notification.h b/src/components/application_manager/test/mock/include/application_manager/commands/hmi/on_vi_rpm_notification.h
index ebcfe3a86c..80dea2a6e2 100644
--- a/src/components/application_manager/test/mock/include/application_manager/commands/hmi/on_vi_rpm_notification.h
+++ b/src/components/application_manager/test/mock/include/application_manager/commands/hmi/on_vi_rpm_notification.h
@@ -1,4 +1,4 @@
-/*
+/**
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
diff --git a/src/components/application_manager/test/mock/include/application_manager/commands/hmi/on_vi_speed_notification.h b/src/components/application_manager/test/mock/include/application_manager/commands/hmi/on_vi_speed_notification.h
index 37bf66e4d0..19bffabf4f 100644
--- a/src/components/application_manager/test/mock/include/application_manager/commands/hmi/on_vi_speed_notification.h
+++ b/src/components/application_manager/test/mock/include/application_manager/commands/hmi/on_vi_speed_notification.h
@@ -1,4 +1,4 @@
-/*
+/**
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
diff --git a/src/components/application_manager/test/mock/include/application_manager/commands/hmi/on_vi_steering_wheel_angle_notification.h b/src/components/application_manager/test/mock/include/application_manager/commands/hmi/on_vi_steering_wheel_angle_notification.h
index bf01b2bf76..0826cb6c6f 100644
--- a/src/components/application_manager/test/mock/include/application_manager/commands/hmi/on_vi_steering_wheel_angle_notification.h
+++ b/src/components/application_manager/test/mock/include/application_manager/commands/hmi/on_vi_steering_wheel_angle_notification.h
@@ -1,4 +1,4 @@
-/*
+/**
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
diff --git a/src/components/application_manager/test/mock/include/application_manager/commands/hmi/on_vi_tire_pressure_notification.h b/src/components/application_manager/test/mock/include/application_manager/commands/hmi/on_vi_tire_pressure_notification.h
index 1c1e00d893..ba8eceefc3 100644
--- a/src/components/application_manager/test/mock/include/application_manager/commands/hmi/on_vi_tire_pressure_notification.h
+++ b/src/components/application_manager/test/mock/include/application_manager/commands/hmi/on_vi_tire_pressure_notification.h
@@ -1,4 +1,4 @@
-/*
+/**
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
diff --git a/src/components/application_manager/test/mock/include/application_manager/commands/hmi/on_vi_vehicle_data_notification.h b/src/components/application_manager/test/mock/include/application_manager/commands/hmi/on_vi_vehicle_data_notification.h
index 59da271a04..30ad9d6acc 100644
--- a/src/components/application_manager/test/mock/include/application_manager/commands/hmi/on_vi_vehicle_data_notification.h
+++ b/src/components/application_manager/test/mock/include/application_manager/commands/hmi/on_vi_vehicle_data_notification.h
@@ -1,4 +1,4 @@
-/*
+/**
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
diff --git a/src/components/application_manager/test/mock/include/application_manager/commands/hmi/on_vi_vin_notification.h b/src/components/application_manager/test/mock/include/application_manager/commands/hmi/on_vi_vin_notification.h
index 06b73c508d..0cb5fb17d2 100644
--- a/src/components/application_manager/test/mock/include/application_manager/commands/hmi/on_vi_vin_notification.h
+++ b/src/components/application_manager/test/mock/include/application_manager/commands/hmi/on_vi_vin_notification.h
@@ -1,4 +1,4 @@
-/*
+/**
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
diff --git a/src/components/application_manager/test/mock/include/application_manager/commands/hmi/on_vi_wiper_status_notification.h b/src/components/application_manager/test/mock/include/application_manager/commands/hmi/on_vi_wiper_status_notification.h
index 399b38112e..c7a1a6bd62 100644
--- a/src/components/application_manager/test/mock/include/application_manager/commands/hmi/on_vi_wiper_status_notification.h
+++ b/src/components/application_manager/test/mock/include/application_manager/commands/hmi/on_vi_wiper_status_notification.h
@@ -1,4 +1,4 @@
-/*
+/**
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
diff --git a/src/components/application_manager/test/mock/include/application_manager/commands/hmi/on_vr_command_notification.h b/src/components/application_manager/test/mock/include/application_manager/commands/hmi/on_vr_command_notification.h
index 37bc2556f8..677bc26727 100644
--- a/src/components/application_manager/test/mock/include/application_manager/commands/hmi/on_vr_command_notification.h
+++ b/src/components/application_manager/test/mock/include/application_manager/commands/hmi/on_vr_command_notification.h
@@ -1,4 +1,4 @@
-/*
+/**
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
diff --git a/src/components/application_manager/test/mock/include/application_manager/commands/hmi/on_vr_language_change_notification.h b/src/components/application_manager/test/mock/include/application_manager/commands/hmi/on_vr_language_change_notification.h
index be408f0aa0..24c60c32d9 100644
--- a/src/components/application_manager/test/mock/include/application_manager/commands/hmi/on_vr_language_change_notification.h
+++ b/src/components/application_manager/test/mock/include/application_manager/commands/hmi/on_vr_language_change_notification.h
@@ -1,4 +1,4 @@
-/*
+/**
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
diff --git a/src/components/application_manager/test/mock/include/application_manager/commands/hmi/on_vr_started_notification.h b/src/components/application_manager/test/mock/include/application_manager/commands/hmi/on_vr_started_notification.h
index 5ae5ace27b..cc78f010b6 100644
--- a/src/components/application_manager/test/mock/include/application_manager/commands/hmi/on_vr_started_notification.h
+++ b/src/components/application_manager/test/mock/include/application_manager/commands/hmi/on_vr_started_notification.h
@@ -1,4 +1,4 @@
-/*
+/**
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
diff --git a/src/components/application_manager/test/mock/include/application_manager/commands/hmi/on_vr_stopped_notification.h b/src/components/application_manager/test/mock/include/application_manager/commands/hmi/on_vr_stopped_notification.h
index 311ee8acde..2ee8ad429e 100644
--- a/src/components/application_manager/test/mock/include/application_manager/commands/hmi/on_vr_stopped_notification.h
+++ b/src/components/application_manager/test/mock/include/application_manager/commands/hmi/on_vr_stopped_notification.h
@@ -1,4 +1,4 @@
-/*
+/**
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
diff --git a/src/components/application_manager/test/mock/include/application_manager/commands/hmi/request_from_hmi.h b/src/components/application_manager/test/mock/include/application_manager/commands/hmi/request_from_hmi.h
index b9b3ec3597..39ebd95819 100644
--- a/src/components/application_manager/test/mock/include/application_manager/commands/hmi/request_from_hmi.h
+++ b/src/components/application_manager/test/mock/include/application_manager/commands/hmi/request_from_hmi.h
@@ -1,4 +1,4 @@
- /*
+ /**
Copyright (c) 2014, Ford Motor Company
All rights reserved.
diff --git a/src/components/application_manager/test/mock/include/application_manager/commands/hmi/request_to_hmi.h b/src/components/application_manager/test/mock/include/application_manager/commands/hmi/request_to_hmi.h
index fe359182dd..3a9de4b7b5 100644
--- a/src/components/application_manager/test/mock/include/application_manager/commands/hmi/request_to_hmi.h
+++ b/src/components/application_manager/test/mock/include/application_manager/commands/hmi/request_to_hmi.h
@@ -1,4 +1,4 @@
-/*
+/**
Copyright (c) 2014, Ford Motor Company
All rights reserved.
diff --git a/src/components/application_manager/test/mock/include/application_manager/commands/hmi/response_from_hmi.h b/src/components/application_manager/test/mock/include/application_manager/commands/hmi/response_from_hmi.h
index c888807e96..21497a1335 100644
--- a/src/components/application_manager/test/mock/include/application_manager/commands/hmi/response_from_hmi.h
+++ b/src/components/application_manager/test/mock/include/application_manager/commands/hmi/response_from_hmi.h
@@ -1,4 +1,4 @@
-/*
+/**
Copyright (c) 2014, Ford Motor Company
All rights reserved.
diff --git a/src/components/application_manager/test/mock/include/application_manager/commands/hmi/sdl_activate_app_request.h b/src/components/application_manager/test/mock/include/application_manager/commands/hmi/sdl_activate_app_request.h
index 2505b39acc..db4a93b0b5 100644
--- a/src/components/application_manager/test/mock/include/application_manager/commands/hmi/sdl_activate_app_request.h
+++ b/src/components/application_manager/test/mock/include/application_manager/commands/hmi/sdl_activate_app_request.h
@@ -1,4 +1,4 @@
-/*
+/**
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
diff --git a/src/components/application_manager/test/mock/include/application_manager/commands/hmi/sdl_activate_app_response.h b/src/components/application_manager/test/mock/include/application_manager/commands/hmi/sdl_activate_app_response.h
index bf0789e60e..63adc6c0d3 100644
--- a/src/components/application_manager/test/mock/include/application_manager/commands/hmi/sdl_activate_app_response.h
+++ b/src/components/application_manager/test/mock/include/application_manager/commands/hmi/sdl_activate_app_response.h
@@ -1,4 +1,4 @@
-/*
+/**
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
diff --git a/src/components/application_manager/test/mock/include/application_manager/commands/hmi/sdl_get_list_of_permissions_request.h b/src/components/application_manager/test/mock/include/application_manager/commands/hmi/sdl_get_list_of_permissions_request.h
index 7c8f10529b..5da473b1a7 100644
--- a/src/components/application_manager/test/mock/include/application_manager/commands/hmi/sdl_get_list_of_permissions_request.h
+++ b/src/components/application_manager/test/mock/include/application_manager/commands/hmi/sdl_get_list_of_permissions_request.h
@@ -1,4 +1,4 @@
-/*
+/**
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
diff --git a/src/components/application_manager/test/mock/include/application_manager/commands/hmi/sdl_get_list_of_permissions_response.h b/src/components/application_manager/test/mock/include/application_manager/commands/hmi/sdl_get_list_of_permissions_response.h
index 452784d92c..5de9fc0ea8 100644
--- a/src/components/application_manager/test/mock/include/application_manager/commands/hmi/sdl_get_list_of_permissions_response.h
+++ b/src/components/application_manager/test/mock/include/application_manager/commands/hmi/sdl_get_list_of_permissions_response.h
@@ -1,4 +1,4 @@
-/*
+/**
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
diff --git a/src/components/application_manager/test/mock/include/application_manager/commands/hmi/sdl_get_status_update_request.h b/src/components/application_manager/test/mock/include/application_manager/commands/hmi/sdl_get_status_update_request.h
index cb7d37d336..a098e0a113 100644
--- a/src/components/application_manager/test/mock/include/application_manager/commands/hmi/sdl_get_status_update_request.h
+++ b/src/components/application_manager/test/mock/include/application_manager/commands/hmi/sdl_get_status_update_request.h
@@ -1,4 +1,4 @@
-/*
+/**
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
diff --git a/src/components/application_manager/test/mock/include/application_manager/commands/hmi/sdl_get_status_update_response.h b/src/components/application_manager/test/mock/include/application_manager/commands/hmi/sdl_get_status_update_response.h
index a3fc0862b5..6299cde630 100644
--- a/src/components/application_manager/test/mock/include/application_manager/commands/hmi/sdl_get_status_update_response.h
+++ b/src/components/application_manager/test/mock/include/application_manager/commands/hmi/sdl_get_status_update_response.h
@@ -1,4 +1,4 @@
-/*
+/**
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
diff --git a/src/components/application_manager/test/mock/include/application_manager/commands/hmi/sdl_get_user_friendly_message_request.h b/src/components/application_manager/test/mock/include/application_manager/commands/hmi/sdl_get_user_friendly_message_request.h
index 96f46cfa3d..b729a16170 100644
--- a/src/components/application_manager/test/mock/include/application_manager/commands/hmi/sdl_get_user_friendly_message_request.h
+++ b/src/components/application_manager/test/mock/include/application_manager/commands/hmi/sdl_get_user_friendly_message_request.h
@@ -1,4 +1,4 @@
-/*
+/**
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
diff --git a/src/components/application_manager/test/mock/include/application_manager/commands/hmi/sdl_get_user_friendly_message_response.h b/src/components/application_manager/test/mock/include/application_manager/commands/hmi/sdl_get_user_friendly_message_response.h
index 4cf7be56c9..bb7a7f8e20 100644
--- a/src/components/application_manager/test/mock/include/application_manager/commands/hmi/sdl_get_user_friendly_message_response.h
+++ b/src/components/application_manager/test/mock/include/application_manager/commands/hmi/sdl_get_user_friendly_message_response.h
@@ -1,4 +1,4 @@
-/*
+/**
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
diff --git a/src/components/application_manager/test/mock/include/application_manager/commands/hmi/sdl_policy_update.h b/src/components/application_manager/test/mock/include/application_manager/commands/hmi/sdl_policy_update.h
index 481f37a257..ee2b9865c8 100644
--- a/src/components/application_manager/test/mock/include/application_manager/commands/hmi/sdl_policy_update.h
+++ b/src/components/application_manager/test/mock/include/application_manager/commands/hmi/sdl_policy_update.h
@@ -1,4 +1,4 @@
-/*
+/**
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
diff --git a/src/components/application_manager/test/mock/include/application_manager/commands/hmi/sdl_policy_update_response.h b/src/components/application_manager/test/mock/include/application_manager/commands/hmi/sdl_policy_update_response.h
index d3f7105523..b6ab925fd6 100644
--- a/src/components/application_manager/test/mock/include/application_manager/commands/hmi/sdl_policy_update_response.h
+++ b/src/components/application_manager/test/mock/include/application_manager/commands/hmi/sdl_policy_update_response.h
@@ -1,4 +1,4 @@
-/*
+/**
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
diff --git a/src/components/application_manager/test/mock/include/application_manager/commands/hmi/tts_change_registration_request.h b/src/components/application_manager/test/mock/include/application_manager/commands/hmi/tts_change_registration_request.h
index a25309e5d5..a587af950b 100644
--- a/src/components/application_manager/test/mock/include/application_manager/commands/hmi/tts_change_registration_request.h
+++ b/src/components/application_manager/test/mock/include/application_manager/commands/hmi/tts_change_registration_request.h
@@ -1,4 +1,4 @@
-/*
+/**
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
diff --git a/src/components/application_manager/test/mock/include/application_manager/commands/hmi/tts_change_registration_response.h b/src/components/application_manager/test/mock/include/application_manager/commands/hmi/tts_change_registration_response.h
index 73ad180286..3a9e9fda51 100644
--- a/src/components/application_manager/test/mock/include/application_manager/commands/hmi/tts_change_registration_response.h
+++ b/src/components/application_manager/test/mock/include/application_manager/commands/hmi/tts_change_registration_response.h
@@ -1,4 +1,4 @@
-/*
+/**
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
diff --git a/src/components/application_manager/test/mock/include/application_manager/commands/hmi/tts_get_capabilities_request.h b/src/components/application_manager/test/mock/include/application_manager/commands/hmi/tts_get_capabilities_request.h
index 543945e8ef..73edd9de73 100644
--- a/src/components/application_manager/test/mock/include/application_manager/commands/hmi/tts_get_capabilities_request.h
+++ b/src/components/application_manager/test/mock/include/application_manager/commands/hmi/tts_get_capabilities_request.h
@@ -1,4 +1,4 @@
-/*
+/**
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
diff --git a/src/components/application_manager/test/mock/include/application_manager/commands/hmi/tts_get_capabilities_response.h b/src/components/application_manager/test/mock/include/application_manager/commands/hmi/tts_get_capabilities_response.h
index 2fc16d1a40..71f85d68e3 100644
--- a/src/components/application_manager/test/mock/include/application_manager/commands/hmi/tts_get_capabilities_response.h
+++ b/src/components/application_manager/test/mock/include/application_manager/commands/hmi/tts_get_capabilities_response.h
@@ -1,4 +1,4 @@
-/*
+/**
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
diff --git a/src/components/application_manager/test/mock/include/application_manager/commands/hmi/tts_get_language_request.h b/src/components/application_manager/test/mock/include/application_manager/commands/hmi/tts_get_language_request.h
index e0ae0da0c4..94e38ec473 100644
--- a/src/components/application_manager/test/mock/include/application_manager/commands/hmi/tts_get_language_request.h
+++ b/src/components/application_manager/test/mock/include/application_manager/commands/hmi/tts_get_language_request.h
@@ -1,4 +1,4 @@
-/*
+/**
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
diff --git a/src/components/application_manager/test/mock/include/application_manager/commands/hmi/tts_get_language_response.h b/src/components/application_manager/test/mock/include/application_manager/commands/hmi/tts_get_language_response.h
index 0d9df07ae6..bd67d64f32 100644
--- a/src/components/application_manager/test/mock/include/application_manager/commands/hmi/tts_get_language_response.h
+++ b/src/components/application_manager/test/mock/include/application_manager/commands/hmi/tts_get_language_response.h
@@ -1,4 +1,4 @@
-/*
+/**
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
diff --git a/src/components/application_manager/test/mock/include/application_manager/commands/hmi/tts_get_supported_languages_request.h b/src/components/application_manager/test/mock/include/application_manager/commands/hmi/tts_get_supported_languages_request.h
index 136edbb5f4..ff80dd2389 100644
--- a/src/components/application_manager/test/mock/include/application_manager/commands/hmi/tts_get_supported_languages_request.h
+++ b/src/components/application_manager/test/mock/include/application_manager/commands/hmi/tts_get_supported_languages_request.h
@@ -1,4 +1,4 @@
-/*
+/**
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
diff --git a/src/components/application_manager/test/mock/include/application_manager/commands/hmi/tts_get_supported_languages_response.h b/src/components/application_manager/test/mock/include/application_manager/commands/hmi/tts_get_supported_languages_response.h
index 38e3c673bb..244f223460 100644
--- a/src/components/application_manager/test/mock/include/application_manager/commands/hmi/tts_get_supported_languages_response.h
+++ b/src/components/application_manager/test/mock/include/application_manager/commands/hmi/tts_get_supported_languages_response.h
@@ -1,4 +1,4 @@
-/*
+/**
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
diff --git a/src/components/application_manager/test/mock/include/application_manager/commands/hmi/tts_is_ready_request.h b/src/components/application_manager/test/mock/include/application_manager/commands/hmi/tts_is_ready_request.h
index 676faabc01..dc58d852ea 100644
--- a/src/components/application_manager/test/mock/include/application_manager/commands/hmi/tts_is_ready_request.h
+++ b/src/components/application_manager/test/mock/include/application_manager/commands/hmi/tts_is_ready_request.h
@@ -1,4 +1,4 @@
-/*
+/**
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
diff --git a/src/components/application_manager/test/mock/include/application_manager/commands/hmi/tts_is_ready_response.h b/src/components/application_manager/test/mock/include/application_manager/commands/hmi/tts_is_ready_response.h
index 12bb3bb870..375e5a5d1f 100644
--- a/src/components/application_manager/test/mock/include/application_manager/commands/hmi/tts_is_ready_response.h
+++ b/src/components/application_manager/test/mock/include/application_manager/commands/hmi/tts_is_ready_response.h
@@ -1,4 +1,4 @@
-/*
+/**
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
diff --git a/src/components/application_manager/test/mock/include/application_manager/commands/hmi/tts_set_global_properties_request.h b/src/components/application_manager/test/mock/include/application_manager/commands/hmi/tts_set_global_properties_request.h
index 92a260d77f..b398e0b2d2 100644
--- a/src/components/application_manager/test/mock/include/application_manager/commands/hmi/tts_set_global_properties_request.h
+++ b/src/components/application_manager/test/mock/include/application_manager/commands/hmi/tts_set_global_properties_request.h
@@ -1,4 +1,4 @@
-/*
+/**
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
diff --git a/src/components/application_manager/test/mock/include/application_manager/commands/hmi/tts_set_global_properties_response.h b/src/components/application_manager/test/mock/include/application_manager/commands/hmi/tts_set_global_properties_response.h
index 0766decf9f..adf0b70276 100644
--- a/src/components/application_manager/test/mock/include/application_manager/commands/hmi/tts_set_global_properties_response.h
+++ b/src/components/application_manager/test/mock/include/application_manager/commands/hmi/tts_set_global_properties_response.h
@@ -1,4 +1,4 @@
-/*
+/**
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
diff --git a/src/components/application_manager/test/mock/include/application_manager/commands/hmi/tts_speak_request.h b/src/components/application_manager/test/mock/include/application_manager/commands/hmi/tts_speak_request.h
index f5555f6495..326c638f4d 100644
--- a/src/components/application_manager/test/mock/include/application_manager/commands/hmi/tts_speak_request.h
+++ b/src/components/application_manager/test/mock/include/application_manager/commands/hmi/tts_speak_request.h
@@ -1,4 +1,4 @@
-/*
+/**
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
diff --git a/src/components/application_manager/test/mock/include/application_manager/commands/hmi/tts_speak_response.h b/src/components/application_manager/test/mock/include/application_manager/commands/hmi/tts_speak_response.h
index 541ea0d2ab..e22c549871 100644
--- a/src/components/application_manager/test/mock/include/application_manager/commands/hmi/tts_speak_response.h
+++ b/src/components/application_manager/test/mock/include/application_manager/commands/hmi/tts_speak_response.h
@@ -1,4 +1,4 @@
-/*
+/**
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
diff --git a/src/components/application_manager/test/mock/include/application_manager/commands/hmi/tts_stop_speaking_request.h b/src/components/application_manager/test/mock/include/application_manager/commands/hmi/tts_stop_speaking_request.h
index 46c464425d..0d82121fd7 100644
--- a/src/components/application_manager/test/mock/include/application_manager/commands/hmi/tts_stop_speaking_request.h
+++ b/src/components/application_manager/test/mock/include/application_manager/commands/hmi/tts_stop_speaking_request.h
@@ -1,4 +1,4 @@
-/*
+/**
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
diff --git a/src/components/application_manager/test/mock/include/application_manager/commands/hmi/tts_stop_speaking_response.h b/src/components/application_manager/test/mock/include/application_manager/commands/hmi/tts_stop_speaking_response.h
index aab8ca8c5b..b9055bfbe5 100644
--- a/src/components/application_manager/test/mock/include/application_manager/commands/hmi/tts_stop_speaking_response.h
+++ b/src/components/application_manager/test/mock/include/application_manager/commands/hmi/tts_stop_speaking_response.h
@@ -1,4 +1,4 @@
-/*
+/**
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
diff --git a/src/components/application_manager/test/mock/include/application_manager/commands/hmi/ui_add_command_request.h b/src/components/application_manager/test/mock/include/application_manager/commands/hmi/ui_add_command_request.h
index 6b857818e7..ffd6eeeefd 100644
--- a/src/components/application_manager/test/mock/include/application_manager/commands/hmi/ui_add_command_request.h
+++ b/src/components/application_manager/test/mock/include/application_manager/commands/hmi/ui_add_command_request.h
@@ -1,4 +1,4 @@
-/*
+/**
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
diff --git a/src/components/application_manager/test/mock/include/application_manager/commands/hmi/ui_add_command_response.h b/src/components/application_manager/test/mock/include/application_manager/commands/hmi/ui_add_command_response.h
index c6a02fdd03..f84b71d0f1 100644
--- a/src/components/application_manager/test/mock/include/application_manager/commands/hmi/ui_add_command_response.h
+++ b/src/components/application_manager/test/mock/include/application_manager/commands/hmi/ui_add_command_response.h
@@ -1,4 +1,4 @@
-/*
+/**
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
diff --git a/src/components/application_manager/test/mock/include/application_manager/commands/hmi/ui_add_submenu_request.h b/src/components/application_manager/test/mock/include/application_manager/commands/hmi/ui_add_submenu_request.h
index bba9a4c47e..1227de0463 100644
--- a/src/components/application_manager/test/mock/include/application_manager/commands/hmi/ui_add_submenu_request.h
+++ b/src/components/application_manager/test/mock/include/application_manager/commands/hmi/ui_add_submenu_request.h
@@ -1,4 +1,4 @@
-/*
+/**
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
diff --git a/src/components/application_manager/test/mock/include/application_manager/commands/hmi/ui_add_submenu_response.h b/src/components/application_manager/test/mock/include/application_manager/commands/hmi/ui_add_submenu_response.h
index 0c4afc2fa3..1b3a10729e 100644
--- a/src/components/application_manager/test/mock/include/application_manager/commands/hmi/ui_add_submenu_response.h
+++ b/src/components/application_manager/test/mock/include/application_manager/commands/hmi/ui_add_submenu_response.h
@@ -1,4 +1,4 @@
-/*
+/**
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
diff --git a/src/components/application_manager/test/mock/include/application_manager/commands/hmi/ui_alert_request.h b/src/components/application_manager/test/mock/include/application_manager/commands/hmi/ui_alert_request.h
index 72cd733eb5..7395eb19e1 100644
--- a/src/components/application_manager/test/mock/include/application_manager/commands/hmi/ui_alert_request.h
+++ b/src/components/application_manager/test/mock/include/application_manager/commands/hmi/ui_alert_request.h
@@ -1,4 +1,4 @@
-/*
+/**
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
diff --git a/src/components/application_manager/test/mock/include/application_manager/commands/hmi/ui_alert_response.h b/src/components/application_manager/test/mock/include/application_manager/commands/hmi/ui_alert_response.h
index 97eb2ba94b..1d17d98095 100644
--- a/src/components/application_manager/test/mock/include/application_manager/commands/hmi/ui_alert_response.h
+++ b/src/components/application_manager/test/mock/include/application_manager/commands/hmi/ui_alert_response.h
@@ -1,4 +1,4 @@
-/*
+/**
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
diff --git a/src/components/application_manager/test/mock/include/application_manager/commands/hmi/ui_change_registration_request.h b/src/components/application_manager/test/mock/include/application_manager/commands/hmi/ui_change_registration_request.h
index 8e68dee2ec..51276b7b0f 100644
--- a/src/components/application_manager/test/mock/include/application_manager/commands/hmi/ui_change_registration_request.h
+++ b/src/components/application_manager/test/mock/include/application_manager/commands/hmi/ui_change_registration_request.h
@@ -1,4 +1,4 @@
-/*
+/**
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
diff --git a/src/components/application_manager/test/mock/include/application_manager/commands/hmi/ui_change_registration_response.h b/src/components/application_manager/test/mock/include/application_manager/commands/hmi/ui_change_registration_response.h
index 50b092639b..edb7574e8d 100644
--- a/src/components/application_manager/test/mock/include/application_manager/commands/hmi/ui_change_registration_response.h
+++ b/src/components/application_manager/test/mock/include/application_manager/commands/hmi/ui_change_registration_response.h
@@ -1,4 +1,4 @@
-/*
+/**
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
diff --git a/src/components/application_manager/test/mock/include/application_manager/commands/hmi/ui_delete_command_request.h b/src/components/application_manager/test/mock/include/application_manager/commands/hmi/ui_delete_command_request.h
index 9eceb2eb6f..398f78c28f 100644
--- a/src/components/application_manager/test/mock/include/application_manager/commands/hmi/ui_delete_command_request.h
+++ b/src/components/application_manager/test/mock/include/application_manager/commands/hmi/ui_delete_command_request.h
@@ -1,4 +1,4 @@
-/*
+/**
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
diff --git a/src/components/application_manager/test/mock/include/application_manager/commands/hmi/ui_delete_command_response.h b/src/components/application_manager/test/mock/include/application_manager/commands/hmi/ui_delete_command_response.h
index c4d7ab6cac..bb19811908 100644
--- a/src/components/application_manager/test/mock/include/application_manager/commands/hmi/ui_delete_command_response.h
+++ b/src/components/application_manager/test/mock/include/application_manager/commands/hmi/ui_delete_command_response.h
@@ -1,4 +1,4 @@
-/*
+/**
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
diff --git a/src/components/application_manager/test/mock/include/application_manager/commands/hmi/ui_delete_submenu_request.h b/src/components/application_manager/test/mock/include/application_manager/commands/hmi/ui_delete_submenu_request.h
index 24bf5878ff..1b3747234b 100644
--- a/src/components/application_manager/test/mock/include/application_manager/commands/hmi/ui_delete_submenu_request.h
+++ b/src/components/application_manager/test/mock/include/application_manager/commands/hmi/ui_delete_submenu_request.h
@@ -1,4 +1,4 @@
-/*
+/**
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
diff --git a/src/components/application_manager/test/mock/include/application_manager/commands/hmi/ui_delete_submenu_response.h b/src/components/application_manager/test/mock/include/application_manager/commands/hmi/ui_delete_submenu_response.h
index 05d77c82d7..8bbab99468 100644
--- a/src/components/application_manager/test/mock/include/application_manager/commands/hmi/ui_delete_submenu_response.h
+++ b/src/components/application_manager/test/mock/include/application_manager/commands/hmi/ui_delete_submenu_response.h
@@ -1,4 +1,4 @@
-/*
+/**
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
diff --git a/src/components/application_manager/test/mock/include/application_manager/commands/hmi/ui_end_audio_pass_thru_request.h b/src/components/application_manager/test/mock/include/application_manager/commands/hmi/ui_end_audio_pass_thru_request.h
index 06637fc8d4..9e8e11c1ad 100644
--- a/src/components/application_manager/test/mock/include/application_manager/commands/hmi/ui_end_audio_pass_thru_request.h
+++ b/src/components/application_manager/test/mock/include/application_manager/commands/hmi/ui_end_audio_pass_thru_request.h
@@ -1,4 +1,4 @@
-/*
+/**
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
diff --git a/src/components/application_manager/test/mock/include/application_manager/commands/hmi/ui_end_audio_pass_thru_response.h b/src/components/application_manager/test/mock/include/application_manager/commands/hmi/ui_end_audio_pass_thru_response.h
index 6d5594f69f..740fc5501d 100644
--- a/src/components/application_manager/test/mock/include/application_manager/commands/hmi/ui_end_audio_pass_thru_response.h
+++ b/src/components/application_manager/test/mock/include/application_manager/commands/hmi/ui_end_audio_pass_thru_response.h
@@ -1,4 +1,4 @@
-/*
+/**
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
diff --git a/src/components/application_manager/test/mock/include/application_manager/commands/hmi/ui_get_capabilities_request.h b/src/components/application_manager/test/mock/include/application_manager/commands/hmi/ui_get_capabilities_request.h
index ad9a566078..2d0469d6a6 100644
--- a/src/components/application_manager/test/mock/include/application_manager/commands/hmi/ui_get_capabilities_request.h
+++ b/src/components/application_manager/test/mock/include/application_manager/commands/hmi/ui_get_capabilities_request.h
@@ -1,4 +1,4 @@
-/*
+/**
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
diff --git a/src/components/application_manager/test/mock/include/application_manager/commands/hmi/ui_get_capabilities_response.h b/src/components/application_manager/test/mock/include/application_manager/commands/hmi/ui_get_capabilities_response.h
index ce6ad6f7ef..dc6052e049 100644
--- a/src/components/application_manager/test/mock/include/application_manager/commands/hmi/ui_get_capabilities_response.h
+++ b/src/components/application_manager/test/mock/include/application_manager/commands/hmi/ui_get_capabilities_response.h
@@ -1,4 +1,4 @@
-/*
+/**
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
diff --git a/src/components/application_manager/test/mock/include/application_manager/commands/hmi/ui_get_language_request.h b/src/components/application_manager/test/mock/include/application_manager/commands/hmi/ui_get_language_request.h
index 7371cd1031..4fca4826be 100644
--- a/src/components/application_manager/test/mock/include/application_manager/commands/hmi/ui_get_language_request.h
+++ b/src/components/application_manager/test/mock/include/application_manager/commands/hmi/ui_get_language_request.h
@@ -1,4 +1,4 @@
-/*
+/**
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
diff --git a/src/components/application_manager/test/mock/include/application_manager/commands/hmi/ui_get_language_response.h b/src/components/application_manager/test/mock/include/application_manager/commands/hmi/ui_get_language_response.h
index f6536452ce..ea43e3856d 100644
--- a/src/components/application_manager/test/mock/include/application_manager/commands/hmi/ui_get_language_response.h
+++ b/src/components/application_manager/test/mock/include/application_manager/commands/hmi/ui_get_language_response.h
@@ -1,4 +1,4 @@
-/*
+/**
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
diff --git a/src/components/application_manager/test/mock/include/application_manager/commands/hmi/ui_get_supported_languages_request.h b/src/components/application_manager/test/mock/include/application_manager/commands/hmi/ui_get_supported_languages_request.h
index d0975e68da..cc0e70feae 100644
--- a/src/components/application_manager/test/mock/include/application_manager/commands/hmi/ui_get_supported_languages_request.h
+++ b/src/components/application_manager/test/mock/include/application_manager/commands/hmi/ui_get_supported_languages_request.h
@@ -1,4 +1,4 @@
-/*
+/**
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
diff --git a/src/components/application_manager/test/mock/include/application_manager/commands/hmi/ui_get_supported_languages_response.h b/src/components/application_manager/test/mock/include/application_manager/commands/hmi/ui_get_supported_languages_response.h
index c888c7b208..15e400687f 100644
--- a/src/components/application_manager/test/mock/include/application_manager/commands/hmi/ui_get_supported_languages_response.h
+++ b/src/components/application_manager/test/mock/include/application_manager/commands/hmi/ui_get_supported_languages_response.h
@@ -1,4 +1,4 @@
-/*
+/**
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
diff --git a/src/components/application_manager/test/mock/include/application_manager/commands/hmi/ui_is_ready_request.h b/src/components/application_manager/test/mock/include/application_manager/commands/hmi/ui_is_ready_request.h
index 7cb4287244..5e2cb7ef9f 100644
--- a/src/components/application_manager/test/mock/include/application_manager/commands/hmi/ui_is_ready_request.h
+++ b/src/components/application_manager/test/mock/include/application_manager/commands/hmi/ui_is_ready_request.h
@@ -1,4 +1,4 @@
-/*
+/**
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
diff --git a/src/components/application_manager/test/mock/include/application_manager/commands/hmi/ui_is_ready_response.h b/src/components/application_manager/test/mock/include/application_manager/commands/hmi/ui_is_ready_response.h
index 64106654e9..bc7210f2a8 100644
--- a/src/components/application_manager/test/mock/include/application_manager/commands/hmi/ui_is_ready_response.h
+++ b/src/components/application_manager/test/mock/include/application_manager/commands/hmi/ui_is_ready_response.h
@@ -1,4 +1,4 @@
-/*
+/**
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
diff --git a/src/components/application_manager/test/mock/include/application_manager/commands/hmi/ui_perform_audio_pass_thru_request.h b/src/components/application_manager/test/mock/include/application_manager/commands/hmi/ui_perform_audio_pass_thru_request.h
index 69566324f2..94bc4827a9 100644
--- a/src/components/application_manager/test/mock/include/application_manager/commands/hmi/ui_perform_audio_pass_thru_request.h
+++ b/src/components/application_manager/test/mock/include/application_manager/commands/hmi/ui_perform_audio_pass_thru_request.h
@@ -1,4 +1,4 @@
-/*
+/**
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
diff --git a/src/components/application_manager/test/mock/include/application_manager/commands/hmi/ui_perform_audio_pass_thru_response.h b/src/components/application_manager/test/mock/include/application_manager/commands/hmi/ui_perform_audio_pass_thru_response.h
index c3283101f9..04afedfba0 100644
--- a/src/components/application_manager/test/mock/include/application_manager/commands/hmi/ui_perform_audio_pass_thru_response.h
+++ b/src/components/application_manager/test/mock/include/application_manager/commands/hmi/ui_perform_audio_pass_thru_response.h
@@ -1,4 +1,4 @@
-/*
+/**
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
diff --git a/src/components/application_manager/test/mock/include/application_manager/commands/hmi/ui_perform_interaction_request.h b/src/components/application_manager/test/mock/include/application_manager/commands/hmi/ui_perform_interaction_request.h
index d8e2f6c682..0d63139437 100644
--- a/src/components/application_manager/test/mock/include/application_manager/commands/hmi/ui_perform_interaction_request.h
+++ b/src/components/application_manager/test/mock/include/application_manager/commands/hmi/ui_perform_interaction_request.h
@@ -1,4 +1,4 @@
-/*
+/**
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
diff --git a/src/components/application_manager/test/mock/include/application_manager/commands/hmi/ui_perform_interaction_response.h b/src/components/application_manager/test/mock/include/application_manager/commands/hmi/ui_perform_interaction_response.h
index 04286897a3..32a87c73c2 100644
--- a/src/components/application_manager/test/mock/include/application_manager/commands/hmi/ui_perform_interaction_response.h
+++ b/src/components/application_manager/test/mock/include/application_manager/commands/hmi/ui_perform_interaction_response.h
@@ -1,4 +1,4 @@
-/*
+/**
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
diff --git a/src/components/application_manager/test/mock/include/application_manager/commands/hmi/ui_scrollable_message_request.h b/src/components/application_manager/test/mock/include/application_manager/commands/hmi/ui_scrollable_message_request.h
index 06bfadbae7..6f23d3b21c 100644
--- a/src/components/application_manager/test/mock/include/application_manager/commands/hmi/ui_scrollable_message_request.h
+++ b/src/components/application_manager/test/mock/include/application_manager/commands/hmi/ui_scrollable_message_request.h
@@ -1,4 +1,4 @@
-/*
+/**
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
diff --git a/src/components/application_manager/test/mock/include/application_manager/commands/hmi/ui_scrollable_message_response.h b/src/components/application_manager/test/mock/include/application_manager/commands/hmi/ui_scrollable_message_response.h
index 6d6d09c313..7bf15a0511 100644
--- a/src/components/application_manager/test/mock/include/application_manager/commands/hmi/ui_scrollable_message_response.h
+++ b/src/components/application_manager/test/mock/include/application_manager/commands/hmi/ui_scrollable_message_response.h
@@ -1,4 +1,4 @@
-/*
+/**
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
diff --git a/src/components/application_manager/test/mock/include/application_manager/commands/hmi/ui_set_display_layout_response.h b/src/components/application_manager/test/mock/include/application_manager/commands/hmi/ui_set_display_layout_response.h
index 3e7a898af0..74df2030e5 100644
--- a/src/components/application_manager/test/mock/include/application_manager/commands/hmi/ui_set_display_layout_response.h
+++ b/src/components/application_manager/test/mock/include/application_manager/commands/hmi/ui_set_display_layout_response.h
@@ -1,4 +1,4 @@
-/*
+/**
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
diff --git a/src/components/application_manager/test/mock/include/application_manager/commands/hmi/ui_set_global_properties_request.h b/src/components/application_manager/test/mock/include/application_manager/commands/hmi/ui_set_global_properties_request.h
index 8b54e85332..f3f7d0e733 100644
--- a/src/components/application_manager/test/mock/include/application_manager/commands/hmi/ui_set_global_properties_request.h
+++ b/src/components/application_manager/test/mock/include/application_manager/commands/hmi/ui_set_global_properties_request.h
@@ -1,4 +1,4 @@
-/*
+/**
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
diff --git a/src/components/application_manager/test/mock/include/application_manager/commands/hmi/ui_set_global_properties_response.h b/src/components/application_manager/test/mock/include/application_manager/commands/hmi/ui_set_global_properties_response.h
index b3cb38d49f..bc00397e37 100644
--- a/src/components/application_manager/test/mock/include/application_manager/commands/hmi/ui_set_global_properties_response.h
+++ b/src/components/application_manager/test/mock/include/application_manager/commands/hmi/ui_set_global_properties_response.h
@@ -1,4 +1,4 @@
-/*
+/**
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
diff --git a/src/components/application_manager/test/mock/include/application_manager/commands/hmi/ui_set_icon_request.h b/src/components/application_manager/test/mock/include/application_manager/commands/hmi/ui_set_icon_request.h
index f78772a8a3..1541aada6b 100644
--- a/src/components/application_manager/test/mock/include/application_manager/commands/hmi/ui_set_icon_request.h
+++ b/src/components/application_manager/test/mock/include/application_manager/commands/hmi/ui_set_icon_request.h
@@ -1,4 +1,4 @@
-/*
+/**
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
diff --git a/src/components/application_manager/test/mock/include/application_manager/commands/hmi/ui_set_icon_response.h b/src/components/application_manager/test/mock/include/application_manager/commands/hmi/ui_set_icon_response.h
index 288bcc94d2..f125f64282 100644
--- a/src/components/application_manager/test/mock/include/application_manager/commands/hmi/ui_set_icon_response.h
+++ b/src/components/application_manager/test/mock/include/application_manager/commands/hmi/ui_set_icon_response.h
@@ -1,4 +1,4 @@
-/*
+/**
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
diff --git a/src/components/application_manager/test/mock/include/application_manager/commands/hmi/ui_set_media_clock_timer_request.h b/src/components/application_manager/test/mock/include/application_manager/commands/hmi/ui_set_media_clock_timer_request.h
index 443fc8d1a7..44cbbbfcf9 100644
--- a/src/components/application_manager/test/mock/include/application_manager/commands/hmi/ui_set_media_clock_timer_request.h
+++ b/src/components/application_manager/test/mock/include/application_manager/commands/hmi/ui_set_media_clock_timer_request.h
@@ -1,4 +1,4 @@
-/*
+/**
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
diff --git a/src/components/application_manager/test/mock/include/application_manager/commands/hmi/ui_set_media_clock_timer_response.h b/src/components/application_manager/test/mock/include/application_manager/commands/hmi/ui_set_media_clock_timer_response.h
index 9358707117..dd46f128d9 100644
--- a/src/components/application_manager/test/mock/include/application_manager/commands/hmi/ui_set_media_clock_timer_response.h
+++ b/src/components/application_manager/test/mock/include/application_manager/commands/hmi/ui_set_media_clock_timer_response.h
@@ -1,4 +1,4 @@
-/*
+/**
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
diff --git a/src/components/application_manager/test/mock/include/application_manager/commands/hmi/ui_show_request.h b/src/components/application_manager/test/mock/include/application_manager/commands/hmi/ui_show_request.h
index 136a99622b..6f22263e61 100644
--- a/src/components/application_manager/test/mock/include/application_manager/commands/hmi/ui_show_request.h
+++ b/src/components/application_manager/test/mock/include/application_manager/commands/hmi/ui_show_request.h
@@ -1,4 +1,4 @@
-/*
+/**
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
diff --git a/src/components/application_manager/test/mock/include/application_manager/commands/hmi/ui_show_response.h b/src/components/application_manager/test/mock/include/application_manager/commands/hmi/ui_show_response.h
index 4a9b49253e..a6391fa6c9 100644
--- a/src/components/application_manager/test/mock/include/application_manager/commands/hmi/ui_show_response.h
+++ b/src/components/application_manager/test/mock/include/application_manager/commands/hmi/ui_show_response.h
@@ -1,4 +1,4 @@
-/*
+/**
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
diff --git a/src/components/application_manager/test/mock/include/application_manager/commands/hmi/ui_slider_request.h b/src/components/application_manager/test/mock/include/application_manager/commands/hmi/ui_slider_request.h
index 8a3b37bfef..5cb31b4a95 100644
--- a/src/components/application_manager/test/mock/include/application_manager/commands/hmi/ui_slider_request.h
+++ b/src/components/application_manager/test/mock/include/application_manager/commands/hmi/ui_slider_request.h
@@ -1,4 +1,4 @@
-/*
+/**
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
diff --git a/src/components/application_manager/test/mock/include/application_manager/commands/hmi/ui_slider_response.h b/src/components/application_manager/test/mock/include/application_manager/commands/hmi/ui_slider_response.h
index 2384f248aa..aae5408e21 100644
--- a/src/components/application_manager/test/mock/include/application_manager/commands/hmi/ui_slider_response.h
+++ b/src/components/application_manager/test/mock/include/application_manager/commands/hmi/ui_slider_response.h
@@ -1,4 +1,4 @@
-/*
+/**
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
diff --git a/src/components/application_manager/test/mock/include/application_manager/commands/hmi/update_app_list_request.h b/src/components/application_manager/test/mock/include/application_manager/commands/hmi/update_app_list_request.h
index b606134409..d2307232e3 100644
--- a/src/components/application_manager/test/mock/include/application_manager/commands/hmi/update_app_list_request.h
+++ b/src/components/application_manager/test/mock/include/application_manager/commands/hmi/update_app_list_request.h
@@ -1,4 +1,4 @@
-/*
+/**
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
diff --git a/src/components/application_manager/test/mock/include/application_manager/commands/hmi/update_app_list_response.h b/src/components/application_manager/test/mock/include/application_manager/commands/hmi/update_app_list_response.h
index 135481cb0b..3e6a1d78a2 100644
--- a/src/components/application_manager/test/mock/include/application_manager/commands/hmi/update_app_list_response.h
+++ b/src/components/application_manager/test/mock/include/application_manager/commands/hmi/update_app_list_response.h
@@ -1,4 +1,4 @@
-/*
+/**
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
diff --git a/src/components/application_manager/test/mock/include/application_manager/commands/hmi/update_device_list_request.h b/src/components/application_manager/test/mock/include/application_manager/commands/hmi/update_device_list_request.h
index f645d312c5..e9a32e9fc4 100644
--- a/src/components/application_manager/test/mock/include/application_manager/commands/hmi/update_device_list_request.h
+++ b/src/components/application_manager/test/mock/include/application_manager/commands/hmi/update_device_list_request.h
@@ -1,4 +1,4 @@
-/*
+/**
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
diff --git a/src/components/application_manager/test/mock/include/application_manager/commands/hmi/update_device_list_response.h b/src/components/application_manager/test/mock/include/application_manager/commands/hmi/update_device_list_response.h
index 6ea2c1e528..d4191c8bee 100644
--- a/src/components/application_manager/test/mock/include/application_manager/commands/hmi/update_device_list_response.h
+++ b/src/components/application_manager/test/mock/include/application_manager/commands/hmi/update_device_list_response.h
@@ -1,4 +1,4 @@
-/*
+/**
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
diff --git a/src/components/application_manager/test/mock/include/application_manager/commands/hmi/update_sdl_request.h b/src/components/application_manager/test/mock/include/application_manager/commands/hmi/update_sdl_request.h
index f84f93f2ed..506c137861 100644
--- a/src/components/application_manager/test/mock/include/application_manager/commands/hmi/update_sdl_request.h
+++ b/src/components/application_manager/test/mock/include/application_manager/commands/hmi/update_sdl_request.h
@@ -1,4 +1,4 @@
-/*
+/**
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
diff --git a/src/components/application_manager/test/mock/include/application_manager/commands/hmi/update_sdl_response.h b/src/components/application_manager/test/mock/include/application_manager/commands/hmi/update_sdl_response.h
index b0d370ecfd..729483cfa1 100644
--- a/src/components/application_manager/test/mock/include/application_manager/commands/hmi/update_sdl_response.h
+++ b/src/components/application_manager/test/mock/include/application_manager/commands/hmi/update_sdl_response.h
@@ -1,4 +1,4 @@
-/*
+/**
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
diff --git a/src/components/application_manager/test/mock/include/application_manager/commands/hmi/vi_diagnostic_message_request.h b/src/components/application_manager/test/mock/include/application_manager/commands/hmi/vi_diagnostic_message_request.h
index c60533d2ea..90e1e145c2 100644
--- a/src/components/application_manager/test/mock/include/application_manager/commands/hmi/vi_diagnostic_message_request.h
+++ b/src/components/application_manager/test/mock/include/application_manager/commands/hmi/vi_diagnostic_message_request.h
@@ -1,4 +1,4 @@
-/*
+/**
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
diff --git a/src/components/application_manager/test/mock/include/application_manager/commands/hmi/vi_diagnostic_message_response.h b/src/components/application_manager/test/mock/include/application_manager/commands/hmi/vi_diagnostic_message_response.h
index 027e007e42..f332a32812 100644
--- a/src/components/application_manager/test/mock/include/application_manager/commands/hmi/vi_diagnostic_message_response.h
+++ b/src/components/application_manager/test/mock/include/application_manager/commands/hmi/vi_diagnostic_message_response.h
@@ -1,4 +1,4 @@
-/*
+/**
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
diff --git a/src/components/application_manager/test/mock/include/application_manager/commands/hmi/vi_get_dtcs_request.h b/src/components/application_manager/test/mock/include/application_manager/commands/hmi/vi_get_dtcs_request.h
index 170eb895fd..93f046d7d6 100644
--- a/src/components/application_manager/test/mock/include/application_manager/commands/hmi/vi_get_dtcs_request.h
+++ b/src/components/application_manager/test/mock/include/application_manager/commands/hmi/vi_get_dtcs_request.h
@@ -1,4 +1,4 @@
-/*
+/**
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
diff --git a/src/components/application_manager/test/mock/include/application_manager/commands/hmi/vi_get_dtcs_response.h b/src/components/application_manager/test/mock/include/application_manager/commands/hmi/vi_get_dtcs_response.h
index 3ba4656d5b..9ee7fac44a 100644
--- a/src/components/application_manager/test/mock/include/application_manager/commands/hmi/vi_get_dtcs_response.h
+++ b/src/components/application_manager/test/mock/include/application_manager/commands/hmi/vi_get_dtcs_response.h
@@ -1,4 +1,4 @@
-/*
+/**
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
diff --git a/src/components/application_manager/test/mock/include/application_manager/commands/hmi/vi_get_vehicle_data_request.h b/src/components/application_manager/test/mock/include/application_manager/commands/hmi/vi_get_vehicle_data_request.h
index 7413b6bf3b..9cb964981c 100644
--- a/src/components/application_manager/test/mock/include/application_manager/commands/hmi/vi_get_vehicle_data_request.h
+++ b/src/components/application_manager/test/mock/include/application_manager/commands/hmi/vi_get_vehicle_data_request.h
@@ -1,4 +1,4 @@
-/*
+/**
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
diff --git a/src/components/application_manager/test/mock/include/application_manager/commands/hmi/vi_get_vehicle_data_request_template.h b/src/components/application_manager/test/mock/include/application_manager/commands/hmi/vi_get_vehicle_data_request_template.h
index af991186fd..951bf0c334 100644
--- a/src/components/application_manager/test/mock/include/application_manager/commands/hmi/vi_get_vehicle_data_request_template.h
+++ b/src/components/application_manager/test/mock/include/application_manager/commands/hmi/vi_get_vehicle_data_request_template.h
@@ -1,4 +1,4 @@
-/*
+/**
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
diff --git a/src/components/application_manager/test/mock/include/application_manager/commands/hmi/vi_get_vehicle_data_response.h b/src/components/application_manager/test/mock/include/application_manager/commands/hmi/vi_get_vehicle_data_response.h
index 1f9736b56a..952b0fb4d3 100644
--- a/src/components/application_manager/test/mock/include/application_manager/commands/hmi/vi_get_vehicle_data_response.h
+++ b/src/components/application_manager/test/mock/include/application_manager/commands/hmi/vi_get_vehicle_data_response.h
@@ -1,4 +1,4 @@
-/*
+/**
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
diff --git a/src/components/application_manager/test/mock/include/application_manager/commands/hmi/vi_get_vehicle_data_response_template.h b/src/components/application_manager/test/mock/include/application_manager/commands/hmi/vi_get_vehicle_data_response_template.h
index 156664cac3..ecd465365a 100644
--- a/src/components/application_manager/test/mock/include/application_manager/commands/hmi/vi_get_vehicle_data_response_template.h
+++ b/src/components/application_manager/test/mock/include/application_manager/commands/hmi/vi_get_vehicle_data_response_template.h
@@ -1,4 +1,4 @@
-/*
+/**
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
diff --git a/src/components/application_manager/test/mock/include/application_manager/commands/hmi/vi_get_vehicle_type_request.h b/src/components/application_manager/test/mock/include/application_manager/commands/hmi/vi_get_vehicle_type_request.h
index 67d8ae046c..876f7d2e55 100644
--- a/src/components/application_manager/test/mock/include/application_manager/commands/hmi/vi_get_vehicle_type_request.h
+++ b/src/components/application_manager/test/mock/include/application_manager/commands/hmi/vi_get_vehicle_type_request.h
@@ -1,4 +1,4 @@
-/*
+/**
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
diff --git a/src/components/application_manager/test/mock/include/application_manager/commands/hmi/vi_get_vehicle_type_response.h b/src/components/application_manager/test/mock/include/application_manager/commands/hmi/vi_get_vehicle_type_response.h
index b36b193418..8b632182f0 100644
--- a/src/components/application_manager/test/mock/include/application_manager/commands/hmi/vi_get_vehicle_type_response.h
+++ b/src/components/application_manager/test/mock/include/application_manager/commands/hmi/vi_get_vehicle_type_response.h
@@ -1,4 +1,4 @@
-/*
+/**
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
diff --git a/src/components/application_manager/test/mock/include/application_manager/commands/hmi/vi_is_ready_request.h b/src/components/application_manager/test/mock/include/application_manager/commands/hmi/vi_is_ready_request.h
index 061681029a..e905cf4c09 100644
--- a/src/components/application_manager/test/mock/include/application_manager/commands/hmi/vi_is_ready_request.h
+++ b/src/components/application_manager/test/mock/include/application_manager/commands/hmi/vi_is_ready_request.h
@@ -1,4 +1,4 @@
-/*
+/**
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
diff --git a/src/components/application_manager/test/mock/include/application_manager/commands/hmi/vi_is_ready_response.h b/src/components/application_manager/test/mock/include/application_manager/commands/hmi/vi_is_ready_response.h
index 52e00f85da..e13e368b34 100644
--- a/src/components/application_manager/test/mock/include/application_manager/commands/hmi/vi_is_ready_response.h
+++ b/src/components/application_manager/test/mock/include/application_manager/commands/hmi/vi_is_ready_response.h
@@ -1,4 +1,4 @@
-/*
+/**
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
diff --git a/src/components/application_manager/test/mock/include/application_manager/commands/hmi/vi_read_did_request.h b/src/components/application_manager/test/mock/include/application_manager/commands/hmi/vi_read_did_request.h
index 6520db5e7d..336ad4443a 100644
--- a/src/components/application_manager/test/mock/include/application_manager/commands/hmi/vi_read_did_request.h
+++ b/src/components/application_manager/test/mock/include/application_manager/commands/hmi/vi_read_did_request.h
@@ -1,4 +1,4 @@
-/*
+/**
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
diff --git a/src/components/application_manager/test/mock/include/application_manager/commands/hmi/vi_read_did_response.h b/src/components/application_manager/test/mock/include/application_manager/commands/hmi/vi_read_did_response.h
index 0855be454b..af66505174 100644
--- a/src/components/application_manager/test/mock/include/application_manager/commands/hmi/vi_read_did_response.h
+++ b/src/components/application_manager/test/mock/include/application_manager/commands/hmi/vi_read_did_response.h
@@ -1,4 +1,4 @@
-/*
+/**
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
diff --git a/src/components/application_manager/test/mock/include/application_manager/commands/hmi/vi_subscribe_vehicle_data_request.h b/src/components/application_manager/test/mock/include/application_manager/commands/hmi/vi_subscribe_vehicle_data_request.h
index 1eb06c6217..ef14a05f2d 100644
--- a/src/components/application_manager/test/mock/include/application_manager/commands/hmi/vi_subscribe_vehicle_data_request.h
+++ b/src/components/application_manager/test/mock/include/application_manager/commands/hmi/vi_subscribe_vehicle_data_request.h
@@ -1,4 +1,4 @@
-/*
+/**
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
diff --git a/src/components/application_manager/test/mock/include/application_manager/commands/hmi/vi_subscribe_vehicle_data_request_template.h b/src/components/application_manager/test/mock/include/application_manager/commands/hmi/vi_subscribe_vehicle_data_request_template.h
index fc9b7dd2ea..bcfa2f6f1a 100644
--- a/src/components/application_manager/test/mock/include/application_manager/commands/hmi/vi_subscribe_vehicle_data_request_template.h
+++ b/src/components/application_manager/test/mock/include/application_manager/commands/hmi/vi_subscribe_vehicle_data_request_template.h
@@ -1,4 +1,4 @@
-/*
+/**
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
diff --git a/src/components/application_manager/test/mock/include/application_manager/commands/hmi/vi_subscribe_vehicle_data_response.h b/src/components/application_manager/test/mock/include/application_manager/commands/hmi/vi_subscribe_vehicle_data_response.h
index b5e2788f32..057fd52e13 100644
--- a/src/components/application_manager/test/mock/include/application_manager/commands/hmi/vi_subscribe_vehicle_data_response.h
+++ b/src/components/application_manager/test/mock/include/application_manager/commands/hmi/vi_subscribe_vehicle_data_response.h
@@ -1,4 +1,4 @@
-/*
+/**
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
diff --git a/src/components/application_manager/test/mock/include/application_manager/commands/hmi/vi_subscribe_vehicle_data_response_template.h b/src/components/application_manager/test/mock/include/application_manager/commands/hmi/vi_subscribe_vehicle_data_response_template.h
index 64f3c51cbc..740d8c386a 100644
--- a/src/components/application_manager/test/mock/include/application_manager/commands/hmi/vi_subscribe_vehicle_data_response_template.h
+++ b/src/components/application_manager/test/mock/include/application_manager/commands/hmi/vi_subscribe_vehicle_data_response_template.h
@@ -1,4 +1,4 @@
-/*
+/**
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
diff --git a/src/components/application_manager/test/mock/include/application_manager/commands/hmi/vi_unsubscribe_vehicle_data_request.h b/src/components/application_manager/test/mock/include/application_manager/commands/hmi/vi_unsubscribe_vehicle_data_request.h
index 1320ae477a..18d118fadb 100644
--- a/src/components/application_manager/test/mock/include/application_manager/commands/hmi/vi_unsubscribe_vehicle_data_request.h
+++ b/src/components/application_manager/test/mock/include/application_manager/commands/hmi/vi_unsubscribe_vehicle_data_request.h
@@ -1,4 +1,4 @@
-/*
+/**
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
diff --git a/src/components/application_manager/test/mock/include/application_manager/commands/hmi/vi_unsubscribe_vehicle_data_request_template.h b/src/components/application_manager/test/mock/include/application_manager/commands/hmi/vi_unsubscribe_vehicle_data_request_template.h
index 9aa529d407..d604d4d536 100644
--- a/src/components/application_manager/test/mock/include/application_manager/commands/hmi/vi_unsubscribe_vehicle_data_request_template.h
+++ b/src/components/application_manager/test/mock/include/application_manager/commands/hmi/vi_unsubscribe_vehicle_data_request_template.h
@@ -1,4 +1,4 @@
-/*
+/**
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
diff --git a/src/components/application_manager/test/mock/include/application_manager/commands/hmi/vi_unsubscribe_vehicle_data_response.h b/src/components/application_manager/test/mock/include/application_manager/commands/hmi/vi_unsubscribe_vehicle_data_response.h
index 8818709afe..b71b8241f5 100644
--- a/src/components/application_manager/test/mock/include/application_manager/commands/hmi/vi_unsubscribe_vehicle_data_response.h
+++ b/src/components/application_manager/test/mock/include/application_manager/commands/hmi/vi_unsubscribe_vehicle_data_response.h
@@ -1,4 +1,4 @@
-/*
+/**
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
diff --git a/src/components/application_manager/test/mock/include/application_manager/commands/hmi/vi_unsubscribe_vehicle_data_response_template.h b/src/components/application_manager/test/mock/include/application_manager/commands/hmi/vi_unsubscribe_vehicle_data_response_template.h
index 3dfcc763cb..8730cc0361 100644
--- a/src/components/application_manager/test/mock/include/application_manager/commands/hmi/vi_unsubscribe_vehicle_data_response_template.h
+++ b/src/components/application_manager/test/mock/include/application_manager/commands/hmi/vi_unsubscribe_vehicle_data_response_template.h
@@ -1,4 +1,4 @@
-/*
+/**
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
diff --git a/src/components/application_manager/test/mock/include/application_manager/commands/hmi/vr_add_command_request.h b/src/components/application_manager/test/mock/include/application_manager/commands/hmi/vr_add_command_request.h
index 9fdc3f776f..3675cfb153 100644
--- a/src/components/application_manager/test/mock/include/application_manager/commands/hmi/vr_add_command_request.h
+++ b/src/components/application_manager/test/mock/include/application_manager/commands/hmi/vr_add_command_request.h
@@ -1,4 +1,4 @@
-/*
+/**
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
diff --git a/src/components/application_manager/test/mock/include/application_manager/commands/hmi/vr_add_command_response.h b/src/components/application_manager/test/mock/include/application_manager/commands/hmi/vr_add_command_response.h
index 7418ed5865..328e8a2058 100644
--- a/src/components/application_manager/test/mock/include/application_manager/commands/hmi/vr_add_command_response.h
+++ b/src/components/application_manager/test/mock/include/application_manager/commands/hmi/vr_add_command_response.h
@@ -1,4 +1,4 @@
-/*
+/**
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
diff --git a/src/components/application_manager/test/mock/include/application_manager/commands/hmi/vr_change_registration_request.h b/src/components/application_manager/test/mock/include/application_manager/commands/hmi/vr_change_registration_request.h
index 53584ee970..5e69b4c18b 100644
--- a/src/components/application_manager/test/mock/include/application_manager/commands/hmi/vr_change_registration_request.h
+++ b/src/components/application_manager/test/mock/include/application_manager/commands/hmi/vr_change_registration_request.h
@@ -1,4 +1,4 @@
-/*
+/**
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
diff --git a/src/components/application_manager/test/mock/include/application_manager/commands/hmi/vr_change_registration_response.h b/src/components/application_manager/test/mock/include/application_manager/commands/hmi/vr_change_registration_response.h
index d71a14da34..f79da44598 100644
--- a/src/components/application_manager/test/mock/include/application_manager/commands/hmi/vr_change_registration_response.h
+++ b/src/components/application_manager/test/mock/include/application_manager/commands/hmi/vr_change_registration_response.h
@@ -1,4 +1,4 @@
-/*
+/**
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
diff --git a/src/components/application_manager/test/mock/include/application_manager/commands/hmi/vr_delete_command_request.h b/src/components/application_manager/test/mock/include/application_manager/commands/hmi/vr_delete_command_request.h
index 91a5dc7d99..b843f498f8 100644
--- a/src/components/application_manager/test/mock/include/application_manager/commands/hmi/vr_delete_command_request.h
+++ b/src/components/application_manager/test/mock/include/application_manager/commands/hmi/vr_delete_command_request.h
@@ -1,4 +1,4 @@
-/*
+/**
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
diff --git a/src/components/application_manager/test/mock/include/application_manager/commands/hmi/vr_delete_command_response.h b/src/components/application_manager/test/mock/include/application_manager/commands/hmi/vr_delete_command_response.h
index ad8c82e38c..11a681bd5e 100644
--- a/src/components/application_manager/test/mock/include/application_manager/commands/hmi/vr_delete_command_response.h
+++ b/src/components/application_manager/test/mock/include/application_manager/commands/hmi/vr_delete_command_response.h
@@ -1,4 +1,4 @@
-/*
+/**
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
diff --git a/src/components/application_manager/test/mock/include/application_manager/commands/hmi/vr_get_capabilities_request.h b/src/components/application_manager/test/mock/include/application_manager/commands/hmi/vr_get_capabilities_request.h
index 676967083f..7771bdd141 100644
--- a/src/components/application_manager/test/mock/include/application_manager/commands/hmi/vr_get_capabilities_request.h
+++ b/src/components/application_manager/test/mock/include/application_manager/commands/hmi/vr_get_capabilities_request.h
@@ -1,4 +1,4 @@
-/*
+/**
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
diff --git a/src/components/application_manager/test/mock/include/application_manager/commands/hmi/vr_get_capabilities_response.h b/src/components/application_manager/test/mock/include/application_manager/commands/hmi/vr_get_capabilities_response.h
index 8b88eb4e3b..ced60c9d65 100644
--- a/src/components/application_manager/test/mock/include/application_manager/commands/hmi/vr_get_capabilities_response.h
+++ b/src/components/application_manager/test/mock/include/application_manager/commands/hmi/vr_get_capabilities_response.h
@@ -1,4 +1,4 @@
-/*
+/**
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
diff --git a/src/components/application_manager/test/mock/include/application_manager/commands/hmi/vr_get_language_request.h b/src/components/application_manager/test/mock/include/application_manager/commands/hmi/vr_get_language_request.h
index 9dd9133ffd..955355d06c 100644
--- a/src/components/application_manager/test/mock/include/application_manager/commands/hmi/vr_get_language_request.h
+++ b/src/components/application_manager/test/mock/include/application_manager/commands/hmi/vr_get_language_request.h
@@ -1,4 +1,4 @@
-/*
+/**
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
diff --git a/src/components/application_manager/test/mock/include/application_manager/commands/hmi/vr_get_language_response.h b/src/components/application_manager/test/mock/include/application_manager/commands/hmi/vr_get_language_response.h
index d9c4fc2126..2bd59b8be2 100644
--- a/src/components/application_manager/test/mock/include/application_manager/commands/hmi/vr_get_language_response.h
+++ b/src/components/application_manager/test/mock/include/application_manager/commands/hmi/vr_get_language_response.h
@@ -1,4 +1,4 @@
-/*
+/**
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
diff --git a/src/components/application_manager/test/mock/include/application_manager/commands/hmi/vr_get_supported_languages_request.h b/src/components/application_manager/test/mock/include/application_manager/commands/hmi/vr_get_supported_languages_request.h
index 0a010cdfec..79105978b0 100644
--- a/src/components/application_manager/test/mock/include/application_manager/commands/hmi/vr_get_supported_languages_request.h
+++ b/src/components/application_manager/test/mock/include/application_manager/commands/hmi/vr_get_supported_languages_request.h
@@ -1,4 +1,4 @@
-/*
+/**
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
diff --git a/src/components/application_manager/test/mock/include/application_manager/commands/hmi/vr_get_supported_languages_response.h b/src/components/application_manager/test/mock/include/application_manager/commands/hmi/vr_get_supported_languages_response.h
index dbbe57ba36..38f5056225 100644
--- a/src/components/application_manager/test/mock/include/application_manager/commands/hmi/vr_get_supported_languages_response.h
+++ b/src/components/application_manager/test/mock/include/application_manager/commands/hmi/vr_get_supported_languages_response.h
@@ -1,4 +1,4 @@
-/*
+/**
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
diff --git a/src/components/application_manager/test/mock/include/application_manager/commands/hmi/vr_is_ready_request.h b/src/components/application_manager/test/mock/include/application_manager/commands/hmi/vr_is_ready_request.h
index e66c9c36a5..ac734638b1 100644
--- a/src/components/application_manager/test/mock/include/application_manager/commands/hmi/vr_is_ready_request.h
+++ b/src/components/application_manager/test/mock/include/application_manager/commands/hmi/vr_is_ready_request.h
@@ -1,4 +1,4 @@
-/*
+/**
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
diff --git a/src/components/application_manager/test/mock/include/application_manager/commands/hmi/vr_is_ready_response.h b/src/components/application_manager/test/mock/include/application_manager/commands/hmi/vr_is_ready_response.h
index a9b1a68455..4f4f86d84c 100644
--- a/src/components/application_manager/test/mock/include/application_manager/commands/hmi/vr_is_ready_response.h
+++ b/src/components/application_manager/test/mock/include/application_manager/commands/hmi/vr_is_ready_response.h
@@ -1,4 +1,4 @@
-/*
+/**
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
diff --git a/src/components/application_manager/test/mock/include/application_manager/commands/hmi/vr_perform_interaction_request.h b/src/components/application_manager/test/mock/include/application_manager/commands/hmi/vr_perform_interaction_request.h
index b819fdb927..b71b31baf5 100644
--- a/src/components/application_manager/test/mock/include/application_manager/commands/hmi/vr_perform_interaction_request.h
+++ b/src/components/application_manager/test/mock/include/application_manager/commands/hmi/vr_perform_interaction_request.h
@@ -1,4 +1,4 @@
-/*
+/**
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
diff --git a/src/components/application_manager/test/mock/include/application_manager/commands/hmi/vr_perform_interaction_response.h b/src/components/application_manager/test/mock/include/application_manager/commands/hmi/vr_perform_interaction_response.h
index ffbbd613e2..fbf5b87cb6 100644
--- a/src/components/application_manager/test/mock/include/application_manager/commands/hmi/vr_perform_interaction_response.h
+++ b/src/components/application_manager/test/mock/include/application_manager/commands/hmi/vr_perform_interaction_response.h
@@ -1,4 +1,4 @@
-/*
+/**
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
diff --git a/src/components/application_manager/test/mock/include/application_manager/commands/mobile/change_registration_request.h b/src/components/application_manager/test/mock/include/application_manager/commands/mobile/change_registration_request.h
index d36f16a976..3de3e8fc2f 100644
--- a/src/components/application_manager/test/mock/include/application_manager/commands/mobile/change_registration_request.h
+++ b/src/components/application_manager/test/mock/include/application_manager/commands/mobile/change_registration_request.h
@@ -105,9 +105,9 @@ class ChangeRegistrationRequest : public CommandRequestImpl {
/*
* @brief Checks result codes
*
- * @return true if all of result codes is success
+ * @return true if one of result codes is success
*/
- bool AllHmiResponsesSuccess(const hmi_apis::Common_Result::eType ui,
+ static bool WasAnySuccess(const hmi_apis::Common_Result::eType ui,
const hmi_apis::Common_Result::eType vr,
const hmi_apis::Common_Result::eType tts);
diff --git a/src/components/application_manager/test/mock/include/application_manager/commands/mobile/generic_response.h b/src/components/application_manager/test/mock/include/application_manager/commands/mobile/generic_response.h
index 1fb931d508..c3b39bf917 100644
--- a/src/components/application_manager/test/mock/include/application_manager/commands/mobile/generic_response.h
+++ b/src/components/application_manager/test/mock/include/application_manager/commands/mobile/generic_response.h
@@ -1,4 +1,4 @@
-/*
+/**
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
diff --git a/src/components/application_manager/test/mock/include/application_manager/commands/mobile/register_app_interface_request.h b/src/components/application_manager/test/mock/include/application_manager/commands/mobile/register_app_interface_request.h
index 14b51777dd..9c1d46368f 100644
--- a/src/components/application_manager/test/mock/include/application_manager/commands/mobile/register_app_interface_request.h
+++ b/src/components/application_manager/test/mock/include/application_manager/commands/mobile/register_app_interface_request.h
@@ -99,6 +99,23 @@ class RegisterAppInterfaceRequest : public CommandRequestImpl {
bool IsApplicationWithSameAppIdRegistered();
/*
+ * @brief Check for some request param. names restrictions, e.g. for
+ * newline characters
+ *
+ * return SUCCESS if param name pass the check, otherwise - error code
+ * will be returned
+ */
+ mobile_apis::Result::eType CheckRestrictions() const;
+
+ /*
+ * @brief Removes hidden symbols and spaces
+ *
+ * return cleared copy of param name
+ */
+ std::string ClearParamName(std::string param_name) const;
+
+
+ /*
* @brief Check new application parameters (name, tts, vr) for
* coincidence with already known parameters of registered applications
*
@@ -146,8 +163,6 @@ class RegisterAppInterfaceRequest : public CommandRequestImpl {
bool IsWhiteSpaceExist();
std::string response_info_;
- mobile_apis::Result::eType result_checking_app_hmi_type_;
-
DISALLOW_COPY_AND_ASSIGN(RegisterAppInterfaceRequest);
};
diff --git a/src/components/application_manager/test/mock/include/application_manager/commands/mobile/scrollable_message_response.h b/src/components/application_manager/test/mock/include/application_manager/commands/mobile/scrollable_message_response.h
index f0c0ea8f7a..36fd311ad6 100644
--- a/src/components/application_manager/test/mock/include/application_manager/commands/mobile/scrollable_message_response.h
+++ b/src/components/application_manager/test/mock/include/application_manager/commands/mobile/scrollable_message_response.h
@@ -1,4 +1,4 @@
-/*
+/**
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
diff --git a/src/components/application_manager/test/mock/include/application_manager/commands/mobile/send_location_response.h b/src/components/application_manager/test/mock/include/application_manager/commands/mobile/send_location_response.h
index fe88a2af29..6e18aa5f27 100644
--- a/src/components/application_manager/test/mock/include/application_manager/commands/mobile/send_location_response.h
+++ b/src/components/application_manager/test/mock/include/application_manager/commands/mobile/send_location_response.h
@@ -1,4 +1,4 @@
-/*
+/**
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
diff --git a/src/components/application_manager/test/mock/include/application_manager/commands/mobile/set_media_clock_timer_response.h b/src/components/application_manager/test/mock/include/application_manager/commands/mobile/set_media_clock_timer_response.h
index 46844bd2f3..e835c17c80 100644
--- a/src/components/application_manager/test/mock/include/application_manager/commands/mobile/set_media_clock_timer_response.h
+++ b/src/components/application_manager/test/mock/include/application_manager/commands/mobile/set_media_clock_timer_response.h
@@ -1,4 +1,4 @@
-/*
+/**
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
diff --git a/src/components/application_manager/test/mock/include/application_manager/commands/mobile/show_response.h b/src/components/application_manager/test/mock/include/application_manager/commands/mobile/show_response.h
index c327bc3b3a..970b54747e 100644
--- a/src/components/application_manager/test/mock/include/application_manager/commands/mobile/show_response.h
+++ b/src/components/application_manager/test/mock/include/application_manager/commands/mobile/show_response.h
@@ -1,4 +1,4 @@
-/*
+/**
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
diff --git a/src/components/application_manager/test/mock/include/application_manager/commands/mobile/slider_response.h b/src/components/application_manager/test/mock/include/application_manager/commands/mobile/slider_response.h
index 1888388e7c..b7821adca2 100644
--- a/src/components/application_manager/test/mock/include/application_manager/commands/mobile/slider_response.h
+++ b/src/components/application_manager/test/mock/include/application_manager/commands/mobile/slider_response.h
@@ -1,4 +1,4 @@
-/*
+/**
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
diff --git a/src/components/application_manager/test/mock/include/application_manager/commands/mobile/speak_response.h b/src/components/application_manager/test/mock/include/application_manager/commands/mobile/speak_response.h
index cbf1ec40de..ef9b8f89d3 100644
--- a/src/components/application_manager/test/mock/include/application_manager/commands/mobile/speak_response.h
+++ b/src/components/application_manager/test/mock/include/application_manager/commands/mobile/speak_response.h
@@ -1,4 +1,4 @@
-/*
+/**
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
diff --git a/src/components/application_manager/test/mock/include/application_manager/hmi_capabilities.h b/src/components/application_manager/test/mock/include/application_manager/hmi_capabilities.h
index 000242daf0..20a849baee 100644
--- a/src/components/application_manager/test/mock/include/application_manager/hmi_capabilities.h
+++ b/src/components/application_manager/test/mock/include/application_manager/hmi_capabilities.h
@@ -1,4 +1,4 @@
-/*
+/**
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
diff --git a/src/components/application_manager/test/mock/include/application_manager/message.h b/src/components/application_manager/test/mock/include/application_manager/message.h
index eec6795d7c..d92c89adf1 100644
--- a/src/components/application_manager/test/mock/include/application_manager/message.h
+++ b/src/components/application_manager/test/mock/include/application_manager/message.h
@@ -1,4 +1,4 @@
-/*
+/**
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
diff --git a/src/components/application_manager/test/mock/include/application_manager/message_helper.h b/src/components/application_manager/test/mock/include/application_manager/message_helper.h
index a4d1fa9f79..69c7b7bba7 100644
--- a/src/components/application_manager/test/mock/include/application_manager/message_helper.h
+++ b/src/components/application_manager/test/mock/include/application_manager/message_helper.h
@@ -178,7 +178,7 @@ class MessageHelper {
/**
* @brief Sends IVI subscriptions
*/
- static SmartObjectList GetIVISubscriptionRequests(ApplicationSharedPtr app);
+ static SmartObjectList GetIVISubscribtionRequests(const uint32_t app_id);
static void SendAppDataToHMI(ApplicationConstSharedPtr app);
static void SendGlobalPropertiesToHMI(ApplicationConstSharedPtr app);
@@ -192,11 +192,6 @@ class MessageHelper {
static void SendAddCommandRequestToHMI(ApplicationConstSharedPtr app);
static SmartObjectList CreateAddCommandRequestToHMI(ApplicationConstSharedPtr app);
- /**
- * @brief Sends UI_ChangeRegistration to HMI with list of AppHMIType
- * @param app applicaton instace
- */
- static void SendUIChangeRegistrationRequestToHMI(ApplicationConstSharedPtr app);
static void SendChangeRegistrationRequestToHMI(ApplicationConstSharedPtr app);
static void SendAddVRCommandToHMI(
uint32_t cmd_id, const smart_objects::SmartObject& vr_commands,
@@ -228,8 +223,7 @@ class MessageHelper {
bool is_unexpected_disconnect = false);
static void SendActivateAppToHMI(
uint32_t const app_id,
- hmi_apis::Common_HMILevel::eType level = hmi_apis::Common_HMILevel::FULL,
- bool send_policy_priority = true);
+ hmi_apis::Common_HMILevel::eType level = hmi_apis::Common_HMILevel::FULL);
static void SendOnResumeAudioSourceToHMI(const uint32_t app_id);
@@ -427,16 +421,6 @@ class MessageHelper {
smart_objects::SmartObject& message_params,
ApplicationConstSharedPtr app);
- /**
- * @brief checkWithPolicy allows to check soft button's parameters
- * according to the current policy
- * @param system_action system action
- * @param app_mobile_id policy application id
- * @return
- */
- static bool CheckWithPolicy(int system_action,
- const std::string& app_mobile_id);
-
/*
* @brief subscribe application to softbutton
*
@@ -497,8 +481,7 @@ class MessageHelper {
smart_objects::SmartObject& message);
static smart_objects::SmartObject* CreateChangeRegistration(
- int32_t function_id, int32_t language, uint32_t app_id,
- const smart_objects::SmartObject* app_types = NULL);
+ int32_t function_id, int32_t language, uint32_t app_id);
MessageHelper();
diff --git a/src/components/application_manager/test/mock/include/application_manager/policies/policy_event_observer.h b/src/components/application_manager/test/mock/include/application_manager/policies/policy_event_observer.h
index e251170fec..7fdfb4e0ac 100644
--- a/src/components/application_manager/test/mock/include/application_manager/policies/policy_event_observer.h
+++ b/src/components/application_manager/test/mock/include/application_manager/policies/policy_event_observer.h
@@ -34,26 +34,26 @@
#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_POLICY_EVENT_OBSERVER_H_
#include "application_manager/event_engine/event_observer.h"
+#include "utils/shared_ptr.h"
namespace policy {
namespace smart_objects = NsSmartDeviceLink::NsSmartObjects;
-class PolicyHandler;
+class PolicyManager;
class PolicyEventObserver :
public application_manager::event_engine::EventObserver {
public:
- explicit PolicyEventObserver(policy::PolicyHandler* const policy_handler);
- void set_policy_handler(policy::PolicyHandler* const policy_handler);
+ PolicyEventObserver(utils::SharedPtr<PolicyManager> policy_manager);
void on_event(const application_manager::event_engine::Event& event);
void subscribe_on_event(
const application_manager::event_engine::Event::EventID& event_id,
int32_t hmi_correlation_id = 0);
private:
- sync_primitives::Lock policy_handler_lock_;
- PolicyHandler* policy_handler_;
+ utils::SharedPtr<PolicyManager> policy_manager_;
void ProcessOdometerEvent(const smart_objects::SmartObject& message);
};
} // namespace policy
+
#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_POLICY_EVENT_OBSERVER_H_
diff --git a/src/components/application_manager/test/mock/include/application_manager/policies/policy_handler.h b/src/components/application_manager/test/mock/include/application_manager/policies/policy_handler.h
index 260f2da060..dfc29fe00a 100644
--- a/src/components/application_manager/test/mock/include/application_manager/policies/policy_handler.h
+++ b/src/components/application_manager/test/mock/include/application_manager/policies/policy_handler.h
@@ -39,16 +39,10 @@
#include <vector>
#include "policy/policy_manager.h"
#include "application_manager/policies/policy_event_observer.h"
-#include "application_manager/policies/delegates/statistics_delegate.h"
+#include "application_manager/policies/pt_exchange_handler.h"
#include "utils/logger.h"
#include "utils/singleton.h"
-#include "utils/threads/thread.h"
-#include "utils/threads/thread_delegate.h"
-#include "utils/conditional_variable.h"
-#include "utils/rwlock.h"
#include "usage_statistics/statistics_manager.h"
-#include "policy_handler_observer.h"
-#include "utils/threads/async_runner.h"
namespace Json {
class Value;
@@ -60,8 +54,7 @@ typedef std::vector<uint32_t> DeviceHandles;
class PolicyHandler :
public utils::Singleton<PolicyHandler, utils::deleters::Deleter<PolicyHandler> >,
- public PolicyListener,
- public threads::AsyncRunner {
+ public PolicyListener {
public:
virtual ~PolicyHandler();
bool LoadPolicyLibrary();
@@ -69,18 +62,15 @@ class PolicyHandler :
bool InitPolicyTable();
bool ResetPolicyTable();
bool ClearUserConsent();
- bool SendMessageToSDK(const BinaryMessage& pt_string, const std::string& url);
+ bool SendMessageToSDK(const BinaryMessage& pt_string);
bool ReceiveMessageFromSDK(const std::string& file,
const BinaryMessage& pt_string);
bool UnloadPolicyLibrary();
+ void OnPTExchangeNeeded();
void OnPermissionsUpdated(const std::string& policy_app_id,
const Permissions& permissions,
const HMILevel& default_hmi);
- virtual void OnSnapshotCreated(const BinaryMessage& pt_string,
- const std::vector<int>& retry_delay_seconds,
- int timeout_exchange);
-
bool GetPriority(const std::string& policy_app_id, std::string* priority);
void CheckPermissions(const PTString& app_id,
const PTString& hmi_level,
@@ -95,14 +85,13 @@ class PolicyHandler :
bool GetInitialAppData(const std::string& application_id,
StringArray* nicknames = NULL,
StringArray* app_hmi_types = NULL);
- void GetUpdateUrls(int service_type, EndpointUrls& end_points);
+ EndpointUrls GetUpdateUrls(int service_type);
void ResetRetrySequence();
int NextRetryTimeout();
int TimeoutExchange();
void OnExceededTimeout();
- void OnSystemReady();
- void PTUpdatedAt(int kilometers, int days_after_epoch);
- void set_listener(PolicyHandlerObserver* listener);
+ BinaryMessageSptr RequestPTUpdate();
+ const std::vector<int> RetrySequenceDelaysSeconds();
utils::SharedPtr<usage_statistics::StatisticsManager> GetStatisticManager();
@@ -158,6 +147,11 @@ class PolicyHandler :
void OnPendingPermissionChange(const std::string& policy_app_id);
/**
+ * Initializes PT exchange at ignition if need
+ */
+ void PTExchangeAtRegistration(const std::string& app_id);
+
+ /**
* Initializes PT exchange at user request
* @param correlation_id correlation id of request
*/
@@ -177,7 +171,7 @@ class PolicyHandler :
* @param permissions User-changed group permissions consent
*/
void OnAppPermissionConsent(const uint32_t connection_key,
- const PermissionConsent &permissions);
+ PermissionConsent& permissions);
/**
* @brief Get appropriate message parameters and send them with response
@@ -210,7 +204,7 @@ class PolicyHandler :
* @brief Send notification to HMI with changed policy update status
* @param status Current policy update state
*/
- void OnUpdateStatusChanged(const std::string& status);
+ void OnUpdateStatusChanged(policy::PolicyTableStatus status);
/**
* @brief Update currently used device id in policies manager for given
@@ -277,15 +271,11 @@ class PolicyHandler :
std::string GetAppName(const std::string& policy_app_id);
- virtual void OnUpdateHMIAppType(std::map<std::string, StringArray> app_hmi_types);
+ virtual void OnUserRequestedUpdateCheckRequired();
virtual void OnDeviceConsentChanged(const std::string& device_id,
bool is_allowed);
- virtual void OnPTExchangeNeeded();
-
- virtual void GetAvailableApps(std::queue<std::string>& apps);
-
/**
* @brief Allows to add new or update existed application during
* registration process
@@ -324,6 +314,7 @@ class PolicyHandler :
usage_statistics::AppStopwatchId type,
int32_t timespan_seconds);
+
protected:
/**
@@ -331,62 +322,72 @@ protected:
*/
void StartNextRetry();
+ /**
+ * Initializes PT exchange at odometer if need
+ * @param kilometers value from odometer in kilometers
+ */
+ void PTExchangeAtOdometer(int kilometers);
+
+ /**
+ * Starts proccess updating policy table
+ */
+ void StartPTExchange(bool skip_device_selection = false);
+
private:
+ /**
+ * @brief Choose device according to app HMI status and user consent for
+ * device
+ * @param device_info Struct with selected device parameters
+ * @return consent status for selected device
+ */
+ DeviceConsent GetDeviceForSending(DeviceParams& device_params);
/**
- * @brief OnAppPermissionConsentInternal reacts on permission changing
- *
- * @param connection_key connection key
- *
- * @param permissions new permissions.
+ * @brief Convert internal policy update status to appropriate status for HMI
+ * @param status Internal policy update status
+ * @return Converted status for sending to HMI
*/
- void OnAppPermissionConsentInternal(const uint32_t connection_key,
- PermissionConsent& permissions);
+ const std::string ConvertUpdateStatus(policy::PolicyTableStatus status);
+
private:
+
class StatisticManagerImpl: public usage_statistics::StatisticsManager {
//TODO(AKutsan) REMOVE THIS UGLY HOTFIX
virtual void Increment(usage_statistics::GlobalCounterId type) {
-
- PolicyHandler::instance()->AsyncRun(new StatisticsDelegate(type));
+ return PolicyHandler::instance()->Increment(type);
}
virtual void Increment(const std::string& app_id,
usage_statistics::AppCounterId type) {
-
- PolicyHandler::instance()->AsyncRun(new StatisticsDelegate(app_id,
- type));
+ return PolicyHandler::instance()->Increment(app_id, type);
}
virtual void Set(const std::string& app_id,
usage_statistics::AppInfoId type,
const std::string& value) {
-
- PolicyHandler::instance()->AsyncRun(new StatisticsDelegate(app_id,
- type,
- value));
+ return PolicyHandler::instance()->Set(app_id, type, value);
}
virtual void Add(const std::string& app_id,
usage_statistics::AppStopwatchId type,
int32_t timespan_seconds) {
-
- PolicyHandler::instance()->AsyncRun(new StatisticsDelegate(
- app_id, type, timespan_seconds));
+ return PolicyHandler::instance()->Add(app_id, type, timespan_seconds);
}
};
//TODO(AKutsan) REMOVE THIS UGLY HOTFIX
PolicyHandler();
- bool SaveSnapshot(const BinaryMessage& pt_string, std::string& snap_path);
static PolicyHandler* instance_;
static const std::string kLibrary;
- mutable sync_primitives::RWLock policy_manager_lock_;
utils::SharedPtr<PolicyManager> policy_manager_;
void* dl_handle_;
AppIds last_used_app_ids_;
+ utils::SharedPtr<PTExchangeHandler> exchange_handler_;
utils::SharedPtr<PolicyEventObserver> event_observer_;
+ bool on_ignition_check_done_;
uint32_t last_activated_app_id_;
+ bool registration_in_progress;
/**
* @brief Contains device handles, which were sent for user consent to HMI
@@ -395,7 +396,7 @@ private:
inline bool CreateManager();
- PolicyHandlerObserver* listener_;
+ bool is_user_requested_policy_table_update_;
/**
* @brief Application-to-device map is used for getting/setting user consents
@@ -403,12 +404,9 @@ private:
*/
std::map<std::string, std::string> app_to_device_link_;
- // Lock for app to device list
- sync_primitives::Lock app_to_device_link_lock_;
utils::SharedPtr<StatisticManagerImpl> statistic_manager_impl_;
- friend class AppPermissionDelegate;
DISALLOW_COPY_AND_ASSIGN(PolicyHandler);
FRIEND_BASE_SINGLETON_CLASS_WITH_DELETER(PolicyHandler,
diff --git a/src/components/application_manager/test/mock/include/application_manager/request_controller.h b/src/components/application_manager/test/mock/include/application_manager/request_controller.h
index efe6b1c4e8..2bc5f54666 100644
--- a/src/components/application_manager/test/mock/include/application_manager/request_controller.h
+++ b/src/components/application_manager/test/mock/include/application_manager/request_controller.h
@@ -1,4 +1,4 @@
-/*
+/**
* Copyright (c) 2014, Ford Motor Company
* All rights reserved.
*
@@ -120,7 +120,7 @@ class RequestController {
* @return Result code
*
*/
- TResult addMobileRequest(const RequestPtr request,
+ TResult addMobileRequest(const MobileRequestPtr& request,
const mobile_apis::HMILevel::eType& hmi_level);
@@ -146,7 +146,7 @@ class RequestController {
* @param mobile_corellation_id Active mobile request correlation ID
*
*/
- void terminateMobileRequest(const uint32_t& mobile_correlation_id, const uint32_t& connection_key);
+ void terminateMobileRequest(const uint32_t& mobile_correlation_id);
/**
@@ -177,12 +177,6 @@ class RequestController {
*/
void terminateAllHMIRequests();
-
- /**
- * @brief Terminates all requests from Mobile
- */
- void terminateAllMobileRequests();
-
/**
* @brief Updates request timeout
*
@@ -194,50 +188,30 @@ class RequestController {
const uint32_t& mobile_correlation_id,
const uint32_t& new_timeout);
- /*
- * @brief Function Should be called when Low Voltage is occured
- */
- void OnLowVoltage();
-
- /*
- * @brief Function Should be called when Low Voltage is occured
- */
- void OnWakeUp();
-
- bool IsLowVoltage();
protected:
/**
- * @brief Check if this app is able to add new requests, or limits was exceeded
+ * @brief Checs if this app as able to add new requests, or limits was exceeded
* @param app_id - application id
* @param app_time_scale - time scale (seconds)
- * @param max_request_per_time_scale - maximum count of request that should be allowed for app_time_scale seconds
- * @return True if new request could be added, false otherwise
+ * @param max_request_per_time_scale - maximum count of request that should be allowed for app_time_scale secconds
*/
- bool CheckTimeScaleMaxRequest(const uint32_t& app_id,
+ bool checkTimeScaleMaxRequest(const uint32_t& app_id,
const uint32_t& app_time_scale,
const uint32_t& max_request_per_time_scale);
/**
- * @brief Check if this app is able to add new requests in current hmi_level, or limits was exceeded
+ * @brief Checs if this app as able to add new requests in current hmi_level, or limits was exceeded
* @param hmi_level - hmi level
* @param app_id - application id
* @param app_time_scale - time scale (seconds)
- * @param max_request_per_time_scale - maximum count of request that should be allowed for app_time_scale seconds
- * @return True if new request could be added, false otherwise
+ * @param max_request_per_time_scale - maximum count of request that should be allowed for app_time_scale secconds
*/
- bool CheckHMILevelTimeScaleMaxRequest(const mobile_apis::HMILevel::eType& hmi_level,
+ bool 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);
- /**
- * @brief Check Posibility to add new requests, or limits was exceeded
- * @param pending_requests_amount - maximum count of request that should be allowed for all applications
- * @return True if new request could be added, false otherwise
- */
- bool CheckPendingRequestsAmount(const uint32_t& pending_requests_amount);
-
void onTimer();
/**
@@ -246,7 +220,6 @@ class RequestController {
*/
void UpdateTimer();
-
private:
// Data types
@@ -256,7 +229,7 @@ class RequestController {
Worker(RequestController* requestController);
virtual ~Worker();
virtual void threadMain();
- virtual void exitThreadMain();
+ virtual bool exitThreadMain();
protected:
private:
RequestController* request_controller_;
@@ -269,7 +242,7 @@ class RequestController {
uint32_t pool_size_;
sync_primitives::ConditionalVariable cond_var_;
- std::list<RequestPtr> mobile_request_list_;
+ std::list<MobileRequestPtr> mobile_request_list_;
sync_primitives::Lock mobile_request_list_lock_;
RequestInfoSet pending_request_set_;
@@ -283,7 +256,6 @@ class RequestController {
timer::TimerThread<RequestController> timer_;
static const uint32_t dafault_sleep_time_ = UINT_MAX;
- bool is_low_voltage_;
DISALLOW_COPY_AND_ASSIGN(RequestController);
};
diff --git a/src/components/application_manager/test/mock/include/application_manager/request_info.h b/src/components/application_manager/test/mock/include/application_manager/request_info.h
index 13efe07a76..b1409488fd 100644
--- a/src/components/application_manager/test/mock/include/application_manager/request_info.h
+++ b/src/components/application_manager/test/mock/include/application_manager/request_info.h
@@ -1,34 +1,34 @@
-/*
- * \file request_info.h
- * \brief request information structure header 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 header 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.
*/
@@ -52,21 +52,19 @@ namespace request_controller {
*
*/
typedef utils::SharedPtr<commands::Command> RequestPtr;
+ typedef utils::SharedPtr<commands::CommandRequestImpl> MobileRequestPtr;
struct RequestInfo {
- enum RequestType {MobileRequest, HMIRequest};
- RequestInfo(const RequestType requst_type, const uint64_t timeout_sec)
+ RequestInfo(const uint64_t timeout_sec)
: timeout_sec_(timeout_sec) {
start_time_ = date_time::DateTime::getCurrentTime();
updateEndTime();
- requst_type_ = requst_type;
}
- RequestInfo(const RequestType requst_type, const TimevalStruct& start_time,const uint64_t timeout_sec)
+ RequestInfo(const TimevalStruct& start_time,const uint64_t timeout_sec)
: start_time_(start_time),
timeout_sec_(timeout_sec) {
updateEndTime();
- requst_type_ = requst_type;
}
virtual ~RequestInfo(){}
@@ -89,8 +87,8 @@ namespace request_controller {
}
bool isExpired() {
- if (date_time::GREATER ==
- date_time::DateTime::compareTime(end_time_, date_time::DateTime::getCurrentTime())) {
+ if ( date_time::GREATER ==
+ date_time::DateTime::compareTime(end_time_, date_time::DateTime::getCurrentTime()) ) {
return false;
}
return true;
@@ -115,9 +113,6 @@ namespace request_controller {
mobile_apis::HMILevel::eType hmi_level() {
return hmi_level_;
}
- RequestType requst_type() const {
- return requst_type_;
- }
protected:
TimevalStruct start_time_;
@@ -125,7 +120,6 @@ namespace request_controller {
TimevalStruct end_time_;
uint32_t app_id_;
mobile_apis::HMILevel::eType hmi_level_;
- RequestType requst_type_;
};
typedef utils::SharedPtr<RequestInfo> RequestInfoPtr;
diff --git a/src/components/application_manager/test/mock/include/application_manager/resume_ctrl.h b/src/components/application_manager/test/mock/include/application_manager/resume_ctrl.h
index 9d03fb0577..463df0b867 100644
--- a/src/components/application_manager/test/mock/include/application_manager/resume_ctrl.h
+++ b/src/components/application_manager/test/mock/include/application_manager/resume_ctrl.h
@@ -1,4 +1,4 @@
-/*
+/**
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
@@ -137,7 +137,6 @@ class ResumeCtrl: public event_engine::EventObserver {
*/
void IgnitionOff();
-
/**
* @brief Start timer for resumption applications
* Restore D1-D5 data
@@ -193,27 +192,13 @@ class ResumeCtrl: public event_engine::EventObserver {
uint32_t GetHMIApplicationID(const std::string& mobile_app_id);
/**
- * @brief Timer callback for restoring HMI Level
+ * @brief Timer callback function
*
*/
- void ApplicationResumptiOnTimer();
-
-
- /**
- * @brief SaveDataOnTimer :
- * Timer callback for persisting ResumptionData each N seconds
- * N gets from property
- */
- void SaveDataOnTimer();
+ void onTimer();
void ClearResumptionInfo();
- void ApplicationsDataUpdated() {
- is_data_saved = false;
- }
-
- void RestoreHmiLevel(uint32_t time_stamp, ApplicationSharedPtr application);
-
private:
typedef std::pair<uint32_t, uint32_t> application_timestamp;
@@ -275,115 +260,10 @@ class ResumeCtrl: public event_engine::EventObserver {
NsSmartDeviceLink::NsSmartObjects::SmartObject* request = NULL,
bool use_events = false);
- void InsertToTimerQueue(uint32_t app_id, uint32_t time_stamp);
-
- /**
- * @brief AddFiles allows to add files for the application
- * which should be resumed
- *
- * @param application application which will be resumed
- *
- * @param saved_app application specific section from backup file
- */
- void AddFiles(ApplicationSharedPtr application, const Json::Value& saved_app);
-
- /**
- * @brief AddSubmenues allows to add sub menues for the application
- * which should be resumed
- *
- * @param application application which will be resumed
- *
- * @param saved_app application specific section from backup file
- */
- void AddSubmenues(ApplicationSharedPtr application, const Json::Value& saved_app);
-
- /**
- * @brief AddCommands allows to add commands for the application
- * which should be resumed
- *
- * @param application application which will be resumed
- *
- * @param saved_app application specific section from backup file
- */
- void AddCommands(ApplicationSharedPtr application, const Json::Value& saved_app);
-
- /**
- * @brief AddChoicesets allows to add choice sets for the application
- * which should be resumed
- *
- * @param application application which will be resumed
- *
- * @param saved_app application specific section from backup file
- */
- void AddChoicesets(ApplicationSharedPtr application, const Json::Value& saved_app);
-
/**
- * @brief SetGlobalProperties allows to restore global properties.
- *
- * @param application application which will be resumed
- *
- * @param saved_app application specific section from backup file
- */
- void SetGlobalProperties(ApplicationSharedPtr application, const Json::Value& saved_app);
-
- /**
- * @brief AddSubscriptions allows to restore subscriptions
- *
- * @param application application which will be resumed
- *
- * @param saved_app application specific section from backup file
- */
- void AddSubscriptions(ApplicationSharedPtr application, const Json::Value& saved_app);
-
- /**
- * @brief ProcessHMIRequests allows to process obtained requests.
- *
- * @param requests request that should be processed.
- */
- void ProcessHMIRequests(const std::vector<smart_objects::SmartObject*> & requests);
-
- /**
- * @brief CheckIcons allows to check application icons
- *
- * @param application application under resumtion application
- *
- * @param json_object
- *
- * @return true in case icons exists, false otherwise
- */
- bool CheckIcons(ApplicationSharedPtr application, const Json::Value& json_object);
-
- /**
- * @brief GetFromSavedOrAppend allows to get existed record about application
- * or adds the new one.
- *
- * @param mobile_app_id application id.
- *
- * @return the reference to the record in applications array.
+ * @brief Time step to check resumption TIME_OUT
*/
- Json::Value& GetFromSavedOrAppend(const std::string& mobile_app_id);
-
- /**
- * @brief GetObjectIndex allows to obtain specified obbject index from
- * applications arrays.
- *
- * @param mobile_app_id application id that should be found.
- *
- * @return application's index of or -1 if it doesn't exists
- */
- int GetObjectIndex(const std::string& mobile_app_id);
-
- template<typename Iterator>
- Json::Value Append(Iterator first,
- Iterator last,
- const std::string& key,
- Json::Value& result) {
- while (first != last) {
- result[key].append(*first);
- ++first;
- }
- return result;
- }
+ static const uint32_t kTimeStep = 3;
/**
* @brief times of IGN_OFF that zombie application have to be saved.
@@ -398,10 +278,7 @@ class ResumeCtrl: public event_engine::EventObserver {
std::multiset<application_timestamp, TimeStampComparator> waiting_for_timer_;
mutable sync_primitives::Lock queue_lock_;
ApplicationManagerImpl* app_mngr_;
- timer::TimerThread<ResumeCtrl> restore_hmi_level_timer_;
- timer::TimerThread<ResumeCtrl> save_persistent_data_timer_;
- bool is_data_saved;
-
+ timer::TimerThread<ResumeCtrl> timer_;
};
} // namespace application_manager
diff --git a/src/components/application_manager/test/mock/include/application_manager/time_metric_observer.h b/src/components/application_manager/test/mock/include/application_manager/time_metric_observer.h
index de3deb8372..780401f6f3 100644
--- a/src/components/application_manager/test/mock/include/application_manager/time_metric_observer.h
+++ b/src/components/application_manager/test/mock/include/application_manager/time_metric_observer.h
@@ -1,4 +1,4 @@
-/*
+/**
* Copyright (c) 2014, Ford Motor Company
* All rights reserved.
*
diff --git a/src/components/application_manager/test/mock/include/application_manager/usage_statistics.h b/src/components/application_manager/test/mock/include/application_manager/usage_statistics.h
index d6ff1f2c49..dcd57aee34 100644
--- a/src/components/application_manager/test/mock/include/application_manager/usage_statistics.h
+++ b/src/components/application_manager/test/mock/include/application_manager/usage_statistics.h
@@ -1,4 +1,4 @@
-/*
+/**
* Copyright (c) 2014, Ford Motor Company
* All rights reserved.
*
diff --git a/src/components/config_profile/include/config_profile/ini_file.h b/src/components/config_profile/include/config_profile/ini_file.h
index 1b6248246c..764ff2f6cf 100644
--- a/src/components/config_profile/include/config_profile/ini_file.h
+++ b/src/components/config_profile/include/config_profile/ini_file.h
@@ -1,4 +1,4 @@
-/*
+/**
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
diff --git a/src/components/config_profile/include/config_profile/profile.h b/src/components/config_profile/include/config_profile/profile.h
index 174608cd80..5be14d4006 100644
--- a/src/components/config_profile/include/config_profile/profile.h
+++ b/src/components/config_profile/include/config_profile/profile.h
@@ -1,4 +1,4 @@
-/*
+/*
* Copyright (c) 2014, Ford Motor Company
* All rights reserved.
*
@@ -147,7 +147,6 @@ class Profile : public utils::Singleton<Profile> {
* @brief Default timeout for waiting for resuming
*/
const uint32_t& app_resuming_timeout() const;
- const uint32_t& app_resumption_save_persistent_data_timeout() const;
/**
* @brief Returns desirable thread stack size
@@ -440,19 +439,6 @@ class Profile : public utils::Singleton<Profile> {
*/
int iap_hub_connection_wait_timeout() const;
- /*
- * ProtocolHandler section
- */
- size_t maximum_payload_size() const;
-
- size_t message_frequency_count() const;
-
- size_t message_frequency_time() const;
-
- uint16_t attempts_to_open_policy_db() const;
-
- uint16_t open_attempt_timeout_ms() const;
-
private:
/**
* Default constructor
@@ -567,7 +553,6 @@ class Profile : public utils::Singleton<Profile> {
uint32_t max_cmd_id_;
uint32_t default_timeout_;
uint32_t app_resuming_timeout_;
- uint32_t app_resumption_save_persistent_data_timeout_;
std::string vr_help_title_;
uint32_t app_dir_quota_;
std::string video_consumer_type_;
@@ -629,8 +614,6 @@ class Profile : public utils::Singleton<Profile> {
int iap2_hub_connect_attempts_;
int iap_hub_connection_wait_timeout_;
uint16_t tts_global_properties_timeout_;
- uint16_t attempts_to_open_policy_db_;
- uint16_t open_attempt_timeout_ms_;
FRIEND_BASE_SINGLETON_CLASS(Profile);
DISALLOW_COPY_AND_ASSIGN(Profile);
diff --git a/src/components/config_profile/src/ini_file.cc b/src/components/config_profile/src/ini_file.cc
index 236dd1ae2b..63c9668bc8 100644
--- a/src/components/config_profile/src/ini_file.cc
+++ b/src/components/config_profile/src/ini_file.cc
@@ -1,34 +1,34 @@
-/*
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
+/**
+* Copyright (c) 2013, Ford Motor Company
+* All rights reserved.
+*
+* Redistribution and use in source and binary forms, with or without
+* modification, are permitted provided that the following conditions are met:
+*
+* Redistributions of source code must retain the above copyright notice, this
+* list of conditions and the following disclaimer.
+*
+* Redistributions in binary form must reproduce the above copyright notice,
+* this list of conditions and the following
+* disclaimer in the documentation and/or other materials provided with the
+* distribution.
+*
+* Neither the name of the Ford Motor Company nor the names of its contributors
+* may be used to endorse or promote products derived from this software
+* without specific prior written permission.
+*
+* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+* POSSIBILITY OF SUCH DAMAGE.
+*/
#include "config_profile/ini_file.h"
#include <stdlib.h>
@@ -200,10 +200,8 @@ char ini_write_value(const char *fname,
}
#else // #if USE_MKSTEMP
tmpnam(temp_fname);
- if (0 == (wr_fp = fopen(temp_fname, "w"))) {
- fclose(rd_fp);
+ if (0 == (wr_fp = fopen(temp_fname, "w")))
return FALSE;
- }
#endif // #else #if USE_MKSTEMP
snprintf(tag, INI_LINE_LEN, "%s", chapter);
diff --git a/src/components/config_profile/src/profile.cc b/src/components/config_profile/src/profile.cc
index fb283ad0ad..49b41cf23a 100644
--- a/src/components/config_profile/src/profile.cc
+++ b/src/components/config_profile/src/profile.cc
@@ -1,4 +1,4 @@
-/*
+/*
* Copyright (c) 2014, Ford Motor Company
* All rights reserved.
*
@@ -69,13 +69,10 @@ const char* kTransportManagerSection = "TransportManager";
const char* kApplicationManagerSection = "ApplicationManager";
const char* kFilesystemRestrictionsSection = "FILESYSTEM RESTRICTIONS";
const char* kIAPSection = "IAP";
-const char* kProtocolHandlerSection = "ProtocolHandler";
const char* kHmiCapabilitiesKey = "HMICapabilities";
const char* kPathToSnapshotKey = "PathToSnapshot";
const char* kPreloadedPTKey = "PreloadedPT";
-const char* kAttemptsToOpenPolicyDBKey = "AttemptsToOpenPolicyDB";
-const char* kOpenAttemptTimeoutMsKey = "OpenAttemptTimeoutMs";
//const char* kPoliciesTableKey = "PoliciesTable";
const char* kServerAddressKey = "ServerAddress";
const char* kAppInfoStorageKey = "AppInfoStorage";
@@ -113,7 +110,6 @@ const char* kDeleteFileRequestKey = "DeleteFileRequest";
const char* kListFilesRequestKey = "ListFilesRequest";
const char* kDefaultTimeoutKey = "DefaultTimeout";
const char* kAppResumingTimeoutKey = "ApplicationResumingTimeout";
-const char* kAppSavePersistentDataTimeoutKey = "AppSavePersistentDataTimeout";
const char* kAppDirectoryQuotaKey = "AppDirectoryQuota";
const char* kAppTimeScaleMaxRequestsKey = "AppTimeScaleMaxRequests";
const char* kAppRequestsTimeScaleKey = "AppRequestsTimeScale";
@@ -143,9 +139,6 @@ const char* kIAP2HubConnectAttemptskey = "IAP2HubConnectAttempts";
const char* kIAPHubConnectionWaitTimeoutKey = "ConnectionWaitTimeout";
const char* kDefaultHubProtocolIndexKey = "DefaultHubProtocolIndex";
const char* kTTSGlobalPropertiesTimeoutKey = "TTSGlobalPropertiesTimeout";
-const char* kMaximumPayloadSizeKey ="MaximumPayloadSize";
-const char* kFrequencyCount ="FrequencyCount";
-const char* kFrequencyTime ="FrequencyTime";
const char* kDefaultPoliciesSnapshotFileName = "sdl_snapshot.json";
const char* kDefaultHmiCapabilitiesFileName = "hmi_capabilities.json";
@@ -178,14 +171,13 @@ const uint32_t kDefaultPutFileRequestInNone = 5;
const uint32_t kDefaultDeleteFileRequestInNone = 5;
const uint32_t kDefaultListFilesRequestInNone = 5;
const uint32_t kDefaultTimeout = 10;
-const uint32_t kDefaultAppResumingTimeout = 3;
-const uint32_t kDefaultAppSavePersistentDataTimeout = 10;
+const uint32_t kDefaultAppResumingTimeout = 5;
const uint32_t kDefaultDirQuota = 104857600;
-const uint32_t kDefaultAppTimeScaleMaxRequests = 0;
-const uint32_t kDefaultAppRequestsTimeScale = 0;
+const uint32_t kDefaultAppTimeScaleMaxRequests = 100;
+const uint32_t kDefaultAppRequestsTimeScale = 10;
const uint32_t kDefaultAppHmiLevelNoneTimeScaleMaxRequests = 100;
const uint32_t kDefaultAppHmiLevelNoneRequestsTimeScale = 10;
-const uint32_t kDefaultPendingRequestsAmount = 0;
+const uint32_t kDefaultPendingRequestsAmount = 1000;
const uint32_t kDefaultTransportManagerDisconnectTimeout = 0;
const uint32_t kDefaultApplicationListUpdateTimeout = 1;
const std::pair<uint32_t, uint32_t> kReadDIDFrequency = {5 , 1};
@@ -195,12 +187,6 @@ const uint32_t kDefaultMaxThreadPoolSize = 2;
const int kDefaultIAP2HubConnectAttempts = 0;
const int kDefaultIAPHubConnectionWaitTimeout = 10;
const uint16_t kDefaultTTSGlobalPropertiesTimeout = 20;
-// TCP MTU - header size = 1500 - 12
-const size_t kDefaultMaximumPayloadSize = 1500 - 12;
-const size_t kDefaultFrequencyCount = 1000;
-const size_t kDefaultFrequencyTime = 1000;
-const uint16_t kDefaultAttemptsToOpenPolicyDB = 5;
-const uint16_t kDefaultOpenAttemptTimeoutMsKey = 500;
} // namespace
@@ -263,16 +249,14 @@ Profile::Profile()
iap2_system_config_(kDefaultIAP2SystemConfig),
iap2_hub_connect_attempts_(kDefaultIAP2HubConnectAttempts),
iap_hub_connection_wait_timeout_(kDefaultIAPHubConnectionWaitTimeout),
- tts_global_properties_timeout_(kDefaultTTSGlobalPropertiesTimeout),
- attempts_to_open_policy_db_(kDefaultAttemptsToOpenPolicyDB),
- open_attempt_timeout_ms_(kDefaultAttemptsToOpenPolicyDB) {
+ tts_global_properties_timeout_(kDefaultTTSGlobalPropertiesTimeout) {
}
Profile::~Profile() {
}
void Profile::config_file_name(const std::string& fileName) {
- if (false == fileName.empty()) {
+ if (false == fileName.empty()) {
config_file_name_ = fileName;
UpdateValues();
}
@@ -330,10 +314,6 @@ const uint32_t& Profile::app_resuming_timeout() const {
return app_resuming_timeout_;
}
-const uint32_t& Profile::app_resumption_save_persistent_data_timeout() const {
- return app_resumption_save_persistent_data_timeout_;
-}
-
const std::string& Profile::vr_help_title() const {
return vr_help_title_;
}
@@ -513,7 +493,7 @@ uint32_t Profile::thread_pool_size() const {
}
uint32_t Profile::default_hub_protocol_index() const{
- return default_hub_protocol_index_;
+ return default_hub_protocol_index_;
}
const std::string& Profile::iap_legacy_protocol_mask() const {
@@ -544,41 +524,12 @@ int Profile::iap_hub_connection_wait_timeout() const {
return iap_hub_connection_wait_timeout_;
}
-size_t Profile::maximum_payload_size() const {
- size_t maximum_payload_size = 0;
- ReadUIntValue(&maximum_payload_size, kDefaultMaximumPayloadSize,
- kProtocolHandlerSection, kMaximumPayloadSizeKey);
- return maximum_payload_size;
-}
-
-size_t Profile::message_frequency_count() const {
- size_t message_frequency_count = 0;
- ReadUIntValue(&message_frequency_count, kDefaultFrequencyCount,
- kProtocolHandlerSection, kFrequencyCount);
- return message_frequency_count;
-}
-
-size_t Profile::message_frequency_time() const {
- size_t message_frequency_time = 0;
- ReadUIntValue(&message_frequency_time, kDefaultFrequencyTime,
- kProtocolHandlerSection,kFrequencyTime );
- return message_frequency_time;
-}
-
-uint16_t Profile::attempts_to_open_policy_db() const {
- return attempts_to_open_policy_db_;
-}
-
-uint16_t Profile::open_attempt_timeout_ms() const {
- return open_attempt_timeout_ms_;
-}
-
uint16_t Profile::tts_global_properties_timeout() const {
return tts_global_properties_timeout_;
}
void Profile::UpdateValues() {
- LOG4CXX_AUTO_TRACE(logger_);
+ LOG4CXX_INFO(logger_, "Profile::UpdateValues");
// Launch HMI parameter
std::string launch_value;
@@ -818,15 +769,6 @@ ReadStringValue(&app_info_storage_, kDefaultAppInfoFileName,
if (app_resuming_timeout_ <= 0) {
app_resuming_timeout_ = kDefaultAppResumingTimeout;
}
- // Save resumption info to File System
- LOG_UPDATED_VALUE(app_resuming_timeout_, kAppSavePersistentDataTimeoutKey,
- kMainSection);
- ReadUIntValue(&app_resumption_save_persistent_data_timeout_,
- kDefaultAppSavePersistentDataTimeout,
- kMainSection, kAppSavePersistentDataTimeoutKey);
- if (app_resuming_timeout_ <= 0) {
- app_resuming_timeout_ = kDefaultAppSavePersistentDataTimeout;
- }
LOG_UPDATED_VALUE(app_resuming_timeout_, kAppResumingTimeoutKey,
kMainSection);
@@ -1091,24 +1033,6 @@ LOG_UPDATED_VALUE(event_mq_name_, kEventMQKey, kTransportManagerSection);
LOG_UPDATED_VALUE(policy_snapshot_file_name_, kPathToSnapshotKey,
kPolicySection);
- // Attempts number for opening policy DB
- ReadUIntValue(&attempts_to_open_policy_db_,
- kDefaultAttemptsToOpenPolicyDB,
- kPolicySection,
- kAttemptsToOpenPolicyDBKey);
-
- LOG_UPDATED_VALUE(attempts_to_open_policy_db_,
- kAttemptsToOpenPolicyDBKey, kPolicySection);
-
- // Open attempt timeout in ms
- ReadUIntValue(&open_attempt_timeout_ms_,
- kDefaultOpenAttemptTimeoutMsKey,
- kPolicySection,
- kOpenAttemptTimeoutMsKey);
-
- LOG_UPDATED_VALUE(open_attempt_timeout_ms_,
- kOpenAttemptTimeoutMsKey, kPolicySection);
-
// Turn Policy Off?
std::string enable_policy_string;
if (ReadValue(&enable_policy_string, kPolicySection, kEnablePolicy) &&
diff --git a/src/components/connection_handler/include/connection_handler/connection.h b/src/components/connection_handler/include/connection_handler/connection.h
index a94786eaa7..6bcbc3fdcd 100644
--- a/src/components/connection_handler/include/connection_handler/connection.h
+++ b/src/components/connection_handler/include/connection_handler/connection.h
@@ -37,7 +37,6 @@
#include <vector>
#include "utils/lock.h"
-#include "utils/threads/thread.h"
#include "connection_handler/device.h"
#include "connection_handler/heartbeat_monitor.h"
#include "protocol/service_type.h"
@@ -289,7 +288,7 @@ class Connection {
/**
* \brief monitor that closes connection if there is no traffic over it
*/
- HeartBeatMonitor* heartbeat_monitor_;
+ HeartBeatMonitor *heartbeat_monitor_;
threads::Thread *heart_beat_monitor_thread_;
DISALLOW_COPY_AND_ASSIGN(Connection);
diff --git a/src/components/connection_handler/include/connection_handler/connection_handler.h b/src/components/connection_handler/include/connection_handler/connection_handler.h
index 8fa52631ff..08bef97155 100644
--- a/src/components/connection_handler/include/connection_handler/connection_handler.h
+++ b/src/components/connection_handler/include/connection_handler/connection_handler.h
@@ -1,4 +1,4 @@
-/*
+/*
* Copyright (c) 2014, Ford Motor Company
* All rights reserved.
*
@@ -45,12 +45,6 @@
* \brief SmartDeviceLink connection_handler namespace.
*/
namespace connection_handler {
-
- enum CloseSessionReason {
- kCommon = 0,
- kFlood
- };
-
/**
* \class ConnectionHandler
* \brief SmartDeviceLink ConnectionHandler interface class
@@ -106,14 +100,13 @@ class ConnectionHandler {
/**
* Close session associated with the key
*/
- virtual void CloseSession(uint32_t key, CloseSessionReason close_reason) = 0;
+ virtual void CloseSession(uint32_t key) = 0;
/**
* Close session
*/
virtual void CloseSession(ConnectionHandle connection_handle,
- uint8_t session_id,
- CloseSessionReason close_reason) = 0;
+ uint8_t session_id) = 0;
/**
* \brief Start heartbeat for specified session
diff --git a/src/components/connection_handler/include/connection_handler/connection_handler_impl.h b/src/components/connection_handler/include/connection_handler/connection_handler_impl.h
index b33d956e54..00ebdf0ab5 100644
--- a/src/components/connection_handler/include/connection_handler/connection_handler_impl.h
+++ b/src/components/connection_handler/include/connection_handler/connection_handler_impl.h
@@ -1,4 +1,4 @@
-/*
+/*
* Copyright (c) 2014, Ford Motor Company
* All rights reserved.
*
@@ -189,13 +189,6 @@ class ConnectionHandlerImpl : public ConnectionHandler,
const protocol_handler::ServiceType &service_type);
/**
- * \brief Callback function used by ProtocolHandler
- * when Mobile Application start message flood
- * \param connection_key used by other components as application identifier
- */
- void OnApplicationFloodCallBack(const uint32_t &connection_key) OVERRIDE;
-
- /**
* \brief Creates unique identifier of session (can be used as hash)
* from given connection identifier
* within which session exists and session number.
@@ -305,7 +298,7 @@ class ConnectionHandlerImpl : public ConnectionHandler,
* \brief Close session associated with the key
* \param key Unique key used by other components as session identifier
*/
- virtual void CloseSession(uint32_t key, CloseSessionReason close_reason);
+ virtual void CloseSession(uint32_t key);
/**
* \brief Function used by HearbeatMonitior to close session on HB timeout
@@ -313,8 +306,7 @@ class ConnectionHandlerImpl : public ConnectionHandler,
* \param session_id Identifier of the session to be ended
*/
virtual void CloseSession(ConnectionHandle connection_handle,
- uint8_t session_id,
- CloseSessionReason close_reason);
+ uint8_t session_id);
/**
* \brief Return count of session for specified connection
@@ -409,7 +401,6 @@ class ConnectionHandlerImpl : public ConnectionHandler,
* \brief Lock for applications list
*/
mutable sync_primitives::Lock connection_list_lock_;
- mutable sync_primitives::Lock connection_handler_observer_lock_;
/**
* \brief Cleans connection list on destruction
diff --git a/src/components/connection_handler/include/connection_handler/connection_handler_observer.h b/src/components/connection_handler/include/connection_handler/connection_handler_observer.h
index e8a4735c0f..cd419c124a 100644
--- a/src/components/connection_handler/include/connection_handler/connection_handler_observer.h
+++ b/src/components/connection_handler/include/connection_handler/connection_handler_observer.h
@@ -96,13 +96,6 @@ class ConnectionHandlerObserver {
const int32_t &session_key,
const protocol_handler::ServiceType &type) = 0;
- /**
- * \brief Callback function used by ConnectionHandler
- * when Mobile Application start message flood
- * \param connection_key used by other components as application identifier
- */
- virtual void OnApplicationFloodCallBack(const uint32_t &connection_key) = 0;
-
protected:
/**
* \brief Destructor
diff --git a/src/components/connection_handler/include/connection_handler/heartbeat_monitor.h b/src/components/connection_handler/include/connection_handler/heartbeat_monitor.h
index 31c798bf75..9b641ce01c 100644
--- a/src/components/connection_handler/include/connection_handler/heartbeat_monitor.h
+++ b/src/components/connection_handler/include/connection_handler/heartbeat_monitor.h
@@ -72,7 +72,7 @@ class HeartBeatMonitor: public threads::ThreadDelegate {
/**
* \brief Thread exit procedure.
*/
- virtual void exitThreadMain();
+ virtual bool exitThreadMain();
void set_heartbeat_timeout_seconds(int32_t timeout);
diff --git a/src/components/connection_handler/src/connection.cc b/src/components/connection_handler/src/connection.cc
index 511f15136c..0b248e5e59 100644
--- a/src/components/connection_handler/src/connection.cc
+++ b/src/components/connection_handler/src/connection.cc
@@ -1,4 +1,4 @@
-/*
+/*
* Copyright (c) 2014, Ford Motor Company
* All rights reserved.
*
@@ -45,6 +45,7 @@
#include "security_manager/security_manager.h"
#endif // ENABLE_SECURITY
+#include "utils/threads/thread_manager.h"
/**
* \namespace connection_handler
@@ -79,22 +80,22 @@ Connection::Connection(ConnectionHandle connection_handle,
: connection_handler_(connection_handler),
connection_handle_(connection_handle),
connection_device_handle_(connection_device_handle) {
- LOG4CXX_AUTO_TRACE(logger_);
+ LOG4CXX_TRACE_ENTER(logger_);
DCHECK(connection_handler_);
heartbeat_monitor_ = new HeartBeatMonitor(heartbeat_timeout, this);
heart_beat_monitor_thread_ = threads::CreateThread("HeartBeatMonitor",
- heartbeat_monitor_);
+ heartbeat_monitor_);
heart_beat_monitor_thread_->start();
}
Connection::~Connection() {
- LOG4CXX_AUTO_TRACE(logger_);
- heart_beat_monitor_thread_->join();
- delete heartbeat_monitor_;
+ LOG4CXX_TRACE_ENTER(logger_);
+ heart_beat_monitor_thread_->stop();
threads::DeleteThread(heart_beat_monitor_thread_);
sync_primitives::AutoLock lock(session_map_lock_);
session_map_.clear();
+ LOG4CXX_TRACE_EXIT(logger_);
}
// Finds a key not presented in std::map<unsigned char, T>
@@ -112,7 +113,7 @@ uint32_t findGap(const std::map<unsigned char, T> &map) {
} // namespace
uint32_t Connection::AddNewSession() {
- LOG4CXX_AUTO_TRACE(logger_);
+ LOG4CXX_TRACE_ENTER(logger_);
sync_primitives::AutoLock lock(session_map_lock_);
const uint32_t session_id = findGap(session_map_);
if (session_id > 0) {
@@ -311,9 +312,7 @@ void Connection::CloseSession(uint8_t session_id) {
size = session_map_.size();
}
- connection_handler_->CloseSession(connection_handle_,
- session_id,
- connection_handler::kCommon);
+ connection_handler_->CloseSession(connection_handle_, session_id);
//Close connection if it is last session
if (1 == size) {
diff --git a/src/components/connection_handler/src/connection_handler_impl.cc b/src/components/connection_handler/src/connection_handler_impl.cc
index c93dad206f..f1dae841a6 100644
--- a/src/components/connection_handler/src/connection_handler_impl.cc
+++ b/src/components/connection_handler/src/connection_handler_impl.cc
@@ -1,4 +1,4 @@
-/*
+/*
* Copyright (c) 2014, Ford Motor Company
* All rights reserved.
*
@@ -70,7 +70,6 @@ ConnectionHandlerImpl::ConnectionHandlerImpl()
: connection_handler_observer_(NULL),
transport_manager_(NULL),
protocol_handler_(NULL),
- connection_handler_observer_lock_(true),
connection_list_deleter_(&connection_list_) {
}
@@ -79,19 +78,19 @@ ConnectionHandlerImpl::~ConnectionHandlerImpl() {
}
void ConnectionHandlerImpl::Stop() {
- LOG4CXX_AUTO_TRACE(logger_);
+ LOG4CXX_TRACE_ENTER(logger_);
ConnectionList::iterator itr = connection_list_.begin();
while (itr != connection_list_.end()) {
RemoveConnection(itr->second->connection_handle());
itr = connection_list_.begin();
}
+ LOG4CXX_TRACE_EXIT(logger_);
}
void ConnectionHandlerImpl::set_connection_handler_observer(
ConnectionHandlerObserver *observer) {
LOG4CXX_DEBUG(logger_, "ConnectionHandlerImpl::set_connection_handler_observer() "
<< observer);
- sync_primitives::AutoLock lock(connection_handler_observer_lock_);
if (!observer) {
LOG4CXX_WARN(logger_, "Set Null pointer to observer.");
}
@@ -122,14 +121,12 @@ void ConnectionHandlerImpl::set_protocol_handler(
void ConnectionHandlerImpl::OnDeviceListUpdated(
const std::vector<transport_manager::DeviceInfo>&) {
LOG4CXX_TRACE(logger_, "ConnectionHandlerImpl::OnDeviceListUpdated()");
- sync_primitives::AutoLock lock(connection_handler_observer_lock_);
if (connection_handler_observer_) {
connection_handler_observer_->OnDeviceListUpdated(device_list_);
}
}
void ConnectionHandlerImpl::OnFindNewApplicationsRequest() {
- sync_primitives::AutoLock lock(connection_handler_observer_lock_);
if (connection_handler_observer_) {
connection_handler_observer_->OnFindNewApplicationsRequest();
}
@@ -148,7 +145,6 @@ void ConnectionHandlerImpl::OnDeviceAdded(
device_info.device_handle(),
Device(device_info.device_handle(), device_info.name(),
device_info.mac_address(), device_info.connection_type())));
- sync_primitives::AutoLock lock(connection_handler_observer_lock_);
if (connection_handler_observer_) {
connection_handler_observer_->OnDeviceListUpdated(device_list_);
}
@@ -180,7 +176,6 @@ void ConnectionHandlerImpl::OnDeviceRemoved(
}
device_list_.erase(device_info.device_handle());
- sync_primitives::AutoLock lock(connection_handler_observer_lock_);
if (connection_handler_observer_) {
connection_handler_observer_->RemoveDevice(device_info.device_handle());
connection_handler_observer_->OnDeviceListUpdated(device_list_);
@@ -224,7 +219,7 @@ void ConnectionHandlerImpl::OnConnectionFailed(
void ConnectionHandlerImpl::OnConnectionClosed(
transport_manager::ConnectionUID connection_id) {
- LOG4CXX_AUTO_TRACE(logger_);
+ LOG4CXX_INFO(logger_, "ConnectionHandlerImpl::OnConnectionClosed");
OnConnectionEnded(connection_id);
}
@@ -301,7 +296,7 @@ uint32_t ConnectionHandlerImpl::OnSessionStartedCallback(
const transport_manager::ConnectionUID &connection_handle,
const uint8_t session_id, const protocol_handler::ServiceType &service_type,
const bool is_protected, uint32_t* hash_id) {
- LOG4CXX_AUTO_TRACE(logger_);
+ LOG4CXX_TRACE_ENTER(logger_);
if (hash_id) {
*hash_id = protocol_handler::HASH_ID_WRONG;
@@ -311,10 +306,12 @@ uint32_t ConnectionHandlerImpl::OnSessionStartedCallback(
return 0;
}
#endif // ENABLE_SECURITY
+
sync_primitives::AutoLock lock(connection_list_lock_);
ConnectionList::iterator it = connection_list_.find(connection_handle);
if (connection_list_.end() == it) {
LOG4CXX_ERROR(logger_, "Unknown connection!");
+ LOG4CXX_TRACE_EXIT(logger_);
return 0;
}
uint32_t new_session_id = 0;
@@ -324,6 +321,7 @@ uint32_t ConnectionHandlerImpl::OnSessionStartedCallback(
new_session_id = connection->AddNewSession();
if (0 == new_session_id) {
LOG4CXX_ERROR(logger_, "Couldn't start new session!");
+ LOG4CXX_TRACE_EXIT(logger_);
return 0;
}
if (hash_id) {
@@ -337,6 +335,7 @@ uint32_t ConnectionHandlerImpl::OnSessionStartedCallback(
#endif // ENABLE_SECURITY
<< " service " << static_cast<int>(service_type)
<< " for session " << static_cast<int>(session_id));
+ LOG4CXX_TRACE_EXIT(logger_);
return 0;
}
new_session_id = session_id;
@@ -344,45 +343,25 @@ uint32_t ConnectionHandlerImpl::OnSessionStartedCallback(
*hash_id = protocol_handler::HASH_ID_NOT_SUPPORTED;
}
}
- sync_primitives::AutoLock lock2(connection_handler_observer_lock_);
+
if (connection_handler_observer_) {
const uint32_t session_key = KeyFromPair(connection_handle, new_session_id);
const bool success = connection_handler_observer_->OnServiceStartedCallback(
- connection->connection_device_handle(), session_key, service_type);
+ connection->connection_device_handle(), session_key, service_type);
if (!success) {
if (protocol_handler::kRpc == service_type) {
connection->RemoveSession(new_session_id);
} else {
connection->RemoveService(session_id, service_type);
}
+ LOG4CXX_TRACE_EXIT(logger_);
return 0;
}
}
+ LOG4CXX_TRACE_EXIT(logger_);
return new_session_id;
}
-void ConnectionHandlerImpl::OnApplicationFloodCallBack(const uint32_t &connection_key) {
- LOG4CXX_AUTO_TRACE(logger_);
- {
- sync_primitives::AutoLock lock(connection_handler_observer_lock_);
- if(connection_handler_observer_) {
- connection_handler_observer_->OnApplicationFloodCallBack(connection_key);
- }
- }
- transport_manager::ConnectionUID connection_handle = 0;
- uint8_t session_id = 0;
- PairFromKey(connection_key, &connection_handle, &session_id);
-
- LOG4CXX_INFO(logger_, "Disconnect flooding application");
- if (session_id != 0) {
- CloseSession(connection_handle, session_id, kFlood);
- } else {
- transport_manager::ConnectionUID connection_uid =
- ConnectionUIDFromHandle(connection_handle);
- transport_manager_->DisconnectForce(connection_uid);
- }
-}
-
uint32_t ConnectionHandlerImpl::OnSessionEndedCallback(
const uint32_t &connection_handle, const uint8_t session_id,
const uint32_t &hashCode,
@@ -425,7 +404,6 @@ uint32_t ConnectionHandlerImpl::OnSessionEndedCallback(
}
}
- sync_primitives::AutoLock lock2(connection_handler_observer_lock_);
if (connection_handler_observer_) {
connection_handler_observer_->OnServiceEndedCallback(session_key,
service_type);
@@ -644,7 +622,6 @@ void ConnectionHandlerImpl::StartDevicesDiscovery() {
return;
}
transport_manager_->SearchDevices();
- sync_primitives::AutoLock lock(connection_handler_observer_lock_);
if (connection_handler_observer_) {
connection_handler_observer_->OnDeviceListUpdated(device_list_);
}
@@ -726,20 +703,18 @@ uint32_t ConnectionHandlerImpl::GetConnectionSessionsCount(
return 0;
}
-void ConnectionHandlerImpl::CloseSession(uint32_t key,
- CloseSessionReason close_reason) {
+void ConnectionHandlerImpl::CloseSession(uint32_t key) {
LOG4CXX_TRACE(logger_, "ConnectionHandlerImpl::CloseSession");
uint32_t connection_handle = 0;
uint8_t session_id = 0;
PairFromKey(key, &connection_handle, &session_id);
- CloseSession(connection_handle, session_id, close_reason);
+ CloseSession(connection_handle, session_id);
}
void ConnectionHandlerImpl::CloseSession(ConnectionHandle connection_handle,
- uint8_t session_id,
- CloseSessionReason close_reason) {
+ uint8_t session_id) {
if (protocol_handler_) {
protocol_handler_->SendEndSession(connection_handle, session_id);
}
@@ -751,7 +726,7 @@ void ConnectionHandlerImpl::CloseSession(ConnectionHandle connection_handle,
ConnectionList::iterator itr = connection_list_.find(connection_id);
if (connection_list_.end() != itr) {
- if (connection_handler_observer_ && kCommon == close_reason) {
+ if (connection_handler_observer_) {
SessionMap session_map = itr->second->session_map();
SessionMap::iterator session_it = session_map.find(session_id);
if (session_it != session_map.end()) {
@@ -825,7 +800,6 @@ void ConnectionHandlerImpl::OnConnectionEnded(
return;
}
- sync_primitives::AutoLock lock2(connection_handler_observer_lock_);
if (connection_handler_observer_) {
const Connection *connection = itr->second;
const SessionMap session_map = connection->session_map();
diff --git a/src/components/connection_handler/src/device.cc b/src/components/connection_handler/src/device.cc
index 40a048654a..93638bd370 100644
--- a/src/components/connection_handler/src/device.cc
+++ b/src/components/connection_handler/src/device.cc
@@ -1,4 +1,4 @@
-/*
+/**
* \file Device.cpp
* \brief Device class implementation.
*
@@ -52,9 +52,7 @@ Device::Device(DeviceHandle device_handle,
user_friendly_name_(user_friendly_name),
mac_address_(mac_address),
connection_type_(connection_type){
- LOG4CXX_INFO(logger_, "Device MAC address is: " << mac_address_);
mac_address_ = encryption::MakeHash(mac_address);
- LOG4CXX_INFO(logger_, "Device MAC address hash is: " << mac_address_);
}
DeviceHandle Device::device_handle() const {
diff --git a/src/components/connection_handler/src/heartbeat_monitor.cc b/src/components/connection_handler/src/heartbeat_monitor.cc
index 1bd5fb3b58..6a5a9e723e 100644
--- a/src/components/connection_handler/src/heartbeat_monitor.cc
+++ b/src/components/connection_handler/src/heartbeat_monitor.cc
@@ -83,11 +83,12 @@ void HeartBeatMonitor::Process() {
}
void HeartBeatMonitor::RefreshExpiration(TimevalStruct* expiration) const {
- LOG4CXX_AUTO_TRACE(logger_);
+ LOG4CXX_TRACE_ENTER(logger_);
sync_primitives::AutoLock locker(heartbeat_timeout_seconds_lock_);
DCHECK(expiration);
*expiration = date_time::DateTime::getCurrentTime();
expiration->tv_sec += heartbeat_timeout_seconds_;
+ LOG4CXX_TRACE_EXIT(logger_);
}
void HeartBeatMonitor::threadMain() {
@@ -143,12 +144,12 @@ void HeartBeatMonitor::KeepAlive(uint8_t session_id) {
}
}
-void HeartBeatMonitor::exitThreadMain() {
- // FIXME (dchmerev@luxoft.com): thread requested to stop should stop as soon as possible,
- // not running one more iteration before actual stop
- LOG4CXX_AUTO_TRACE(logger_);
+bool HeartBeatMonitor::exitThreadMain() {
+ LOG4CXX_TRACE_ENTER(logger_);
run_ = false;
AutoLock main_lock(main_thread_lock_);
+ LOG4CXX_TRACE_EXIT(logger_);
+ return true;
}
void HeartBeatMonitor::set_heartbeat_timeout_seconds(int32_t timeout) {
diff --git a/src/components/dbus/include/dbus/message_descriptions.h b/src/components/dbus/include/dbus/message_descriptions.h
index 18c27ce0d6..9f73b25737 100644
--- a/src/components/dbus/include/dbus/message_descriptions.h
+++ b/src/components/dbus/include/dbus/message_descriptions.h
@@ -1,34 +1,34 @@
-/*
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
+/**
+* Copyright (c) 2013, Ford Motor Company
+* All rights reserved.
+*
+* Redistribution and use in source and binary forms, with or without
+* modification, are permitted provided that the following conditions are met:
+*
+* Redistributions of source code must retain the above copyright notice, this
+* list of conditions and the following disclaimer.
+*
+* Redistributions in binary form must reproduce the above copyright notice,
+* this list of conditions and the following
+* disclaimer in the documentation and/or other materials provided with the
+* distribution.
+*
+* Neither the name of the Ford Motor Company nor the names of its contributors
+* may be used to endorse or promote products derived from this software
+* without specific prior written permission.
+*
+* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+* POSSIBILITY OF SUCH DAMAGE.
+*/
#ifndef SRC_COMPONENTS_DBUS_INCLUDE_DBUS_MESSAGE_DESCRIPTIONS_H_
#define SRC_COMPONENTS_DBUS_INCLUDE_DBUS_MESSAGE_DESCRIPTIONS_H_
diff --git a/src/components/dbus/include/dbus/schema.h b/src/components/dbus/include/dbus/schema.h
index 2a5f6f3615..d1ba37f232 100644
--- a/src/components/dbus/include/dbus/schema.h
+++ b/src/components/dbus/include/dbus/schema.h
@@ -1,34 +1,34 @@
-/*
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
+/**
+* Copyright (c) 2013, Ford Motor Company
+* All rights reserved.
+*
+* Redistribution and use in source and binary forms, with or without
+* modification, are permitted provided that the following conditions are met:
+*
+* Redistributions of source code must retain the above copyright notice, this
+* list of conditions and the following disclaimer.
+*
+* Redistributions in binary form must reproduce the above copyright notice,
+* this list of conditions and the following
+* disclaimer in the documentation and/or other materials provided with the
+* distribution.
+*
+* Neither the name of the Ford Motor Company nor the names of its contributors
+* may be used to endorse or promote products derived from this software
+* without specific prior written permission.
+*
+* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+* POSSIBILITY OF SUCH DAMAGE.
+*/
#ifndef SRC_COMPONENTS_DBUS_SCHEMA_INCLUDE_DBUS_SCHEMA_SCHEMA_H_
#define SRC_COMPONENTS_DBUS_SCHEMA_INCLUDE_DBUS_SCHEMA_SCHEMA_H_
diff --git a/src/components/dbus/src/schema.cc b/src/components/dbus/src/schema.cc
index 157479928d..dde1f6ab50 100644
--- a/src/components/dbus/src/schema.cc
+++ b/src/components/dbus/src/schema.cc
@@ -1,4 +1,4 @@
-/*
+/**
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
diff --git a/src/components/formatters/include/formatters/formatter_json_rpc.h b/src/components/formatters/include/formatters/formatter_json_rpc.h
index d4653ef565..26636f4a2b 100644
--- a/src/components/formatters/include/formatters/formatter_json_rpc.h
+++ b/src/components/formatters/include/formatters/formatter_json_rpc.h
@@ -1,4 +1,4 @@
-/*
+/**
* @file formatter_json_rpc.h
* @brief FormatterJsonRpc header file.
*/
diff --git a/src/components/formatters/include/formatters/generic_json_formatter.h b/src/components/formatters/include/formatters/generic_json_formatter.h
index a4b3f3f712..3eaee0b36e 100644
--- a/src/components/formatters/include/formatters/generic_json_formatter.h
+++ b/src/components/formatters/include/formatters/generic_json_formatter.h
@@ -1,4 +1,4 @@
-/*
+/**
* @file generic_json_formatter.h
* @brief Generic JSON formatter header file.
*/
diff --git a/src/components/formatters/include/formatters/meta_formatter.h b/src/components/formatters/include/formatters/meta_formatter.h
index f9fd6fad72..c1b767d7cf 100644
--- a/src/components/formatters/include/formatters/meta_formatter.h
+++ b/src/components/formatters/include/formatters/meta_formatter.h
@@ -1,4 +1,4 @@
-/*
+/**
* @file meta_fromatter.h
* @brief file describes class CMetaFormatter which is designed to format
* the smart object against given schema for given formatter
diff --git a/src/components/formatters/src/formatter_json_rpc.cc b/src/components/formatters/src/formatter_json_rpc.cc
index 012962bbb2..8722df46df 100644
--- a/src/components/formatters/src/formatter_json_rpc.cc
+++ b/src/components/formatters/src/formatter_json_rpc.cc
@@ -1,4 +1,4 @@
-/*
+/**
* @file formatter_json_rpc.cc
* @brief formatter_json_rpc source file.
*/
diff --git a/src/components/formatters/src/generic_json_formatter.cc b/src/components/formatters/src/generic_json_formatter.cc
index 6cc2266193..ce1aa03807 100644
--- a/src/components/formatters/src/generic_json_formatter.cc
+++ b/src/components/formatters/src/generic_json_formatter.cc
@@ -1,4 +1,4 @@
-/*
+/**
* @file generic_json_formatter.cc
* @brief Generic JSON formatter source file.
*/
diff --git a/src/components/formatters/src/meta_formatter.cc b/src/components/formatters/src/meta_formatter.cc
index 8b24fd4b0e..145020a5e2 100644
--- a/src/components/formatters/src/meta_formatter.cc
+++ b/src/components/formatters/src/meta_formatter.cc
@@ -1,4 +1,4 @@
-/*
+/**
* @file meta_fromatter.cc
* @brief implementation of class CMetaFormatter which is designed to format
* the smart object against given schema for given formatter
diff --git a/src/components/hmi_message_handler/include/hmi_message_handler/hmi_message_adapter.h b/src/components/hmi_message_handler/include/hmi_message_handler/hmi_message_adapter.h
index 5ed37031ea..dc515318a0 100644
--- a/src/components/hmi_message_handler/include/hmi_message_handler/hmi_message_adapter.h
+++ b/src/components/hmi_message_handler/include/hmi_message_handler/hmi_message_adapter.h
@@ -1,4 +1,4 @@
-/*
+/**
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
diff --git a/src/components/hmi_message_handler/include/hmi_message_handler/hmi_message_handler.h b/src/components/hmi_message_handler/include/hmi_message_handler/hmi_message_handler.h
index 3e06c65085..828ae9a00e 100644
--- a/src/components/hmi_message_handler/include/hmi_message_handler/hmi_message_handler.h
+++ b/src/components/hmi_message_handler/include/hmi_message_handler/hmi_message_handler.h
@@ -1,4 +1,4 @@
-/*
+/**
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
diff --git a/src/components/hmi_message_handler/include/hmi_message_handler/hmi_message_handler_impl.h b/src/components/hmi_message_handler/include/hmi_message_handler/hmi_message_handler_impl.h
index d638f370d8..071ce2c549 100644
--- a/src/components/hmi_message_handler/include/hmi_message_handler/hmi_message_handler_impl.h
+++ b/src/components/hmi_message_handler/include/hmi_message_handler/hmi_message_handler_impl.h
@@ -1,4 +1,4 @@
-/*
+/**
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
diff --git a/src/components/hmi_message_handler/include/hmi_message_handler/hmi_message_observer.h b/src/components/hmi_message_handler/include/hmi_message_handler/hmi_message_observer.h
index f2f84b13e7..f77a1f6a50 100644
--- a/src/components/hmi_message_handler/include/hmi_message_handler/hmi_message_observer.h
+++ b/src/components/hmi_message_handler/include/hmi_message_handler/hmi_message_observer.h
@@ -1,4 +1,4 @@
-/*
+/**
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
diff --git a/src/components/hmi_message_handler/include/hmi_message_handler/hmi_message_sender.h b/src/components/hmi_message_handler/include/hmi_message_handler/hmi_message_sender.h
index d704a4df65..2712857305 100644
--- a/src/components/hmi_message_handler/include/hmi_message_handler/hmi_message_sender.h
+++ b/src/components/hmi_message_handler/include/hmi_message_handler/hmi_message_sender.h
@@ -1,4 +1,4 @@
-/*
+/**
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
diff --git a/src/components/hmi_message_handler/include/hmi_message_handler/messagebroker_adapter.h b/src/components/hmi_message_handler/include/hmi_message_handler/messagebroker_adapter.h
index 4580b18ee1..df344c80fd 100644
--- a/src/components/hmi_message_handler/include/hmi_message_handler/messagebroker_adapter.h
+++ b/src/components/hmi_message_handler/include/hmi_message_handler/messagebroker_adapter.h
@@ -1,4 +1,4 @@
-/*
+/**
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
diff --git a/src/components/hmi_message_handler/include/hmi_message_handler/mqueue_adapter.h b/src/components/hmi_message_handler/include/hmi_message_handler/mqueue_adapter.h
index 126ea3a66e..9d78fefc69 100644
--- a/src/components/hmi_message_handler/include/hmi_message_handler/mqueue_adapter.h
+++ b/src/components/hmi_message_handler/include/hmi_message_handler/mqueue_adapter.h
@@ -1,34 +1,34 @@
/*
- * 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.
- */
+* Copyright (c) 2014, Ford Motor Company
+* All rights reserved.
+*
+* Redistribution and use in source and binary forms, with or without
+* modification, are permitted provided that the following conditions are met:
+*
+* Redistributions of source code must retain the above copyright notice, this
+* list of conditions and the following disclaimer.
+*
+* Redistributions in binary form must reproduce the above copyright notice,
+* this list of conditions and the following
+* disclaimer in the documentation and/or other materials provided with the
+* distribution.
+*
+* Neither the name of the Ford Motor Company nor the names of its contributors
+* may be used to endorse or promote products derived from this software
+* without specific prior written permission.
+*
+* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+* POSSIBILITY OF SUCH DAMAGE.
+*/
#ifndef SRC_COMPONENTS_HMI_MESSAGE_HANDLER_INCLUDE_HMI_MESSAGE_HANDLER_MQUEUE_ADAPTER_H_
#define SRC_COMPONENTS_HMI_MESSAGE_HANDLER_INCLUDE_HMI_MESSAGE_HANDLER_MQUEUE_ADAPTER_H_
@@ -40,8 +40,6 @@
namespace hmi_message_handler {
-class ReceiverThreadDelegate;
-
/**
* \brief HMI message adapter for mqueue
*/
@@ -57,10 +55,9 @@ class MqueueAdapter : public HMIMessageAdapter {
private:
mqd_t sdl_to_hmi_mqueue_;
mqd_t hmi_to_sdl_mqueue_;
-
- ReceiverThreadDelegate* receiver_thread_delegate_;
threads::Thread* receiver_thread_;
};
} // namespace hmi_message_handler
+
#endif // SRC_COMPONENTS_HMI_MESSAGE_HANDLER_INCLUDE_HMI_MESSAGE_HANDLER_MQUEUE_ADAPTER_H_
diff --git a/src/components/hmi_message_handler/src/dbus_message_adapter.cc b/src/components/hmi_message_handler/src/dbus_message_adapter.cc
index c08f090f1d..a79674df67 100644
--- a/src/components/hmi_message_handler/src/dbus_message_adapter.cc
+++ b/src/components/hmi_message_handler/src/dbus_message_adapter.cc
@@ -86,7 +86,7 @@ void DBusMessageAdapter::SendMessageToHMI(MessageSharedPointer message) {
break;
case hmi_apis::messageType::INVALID_ENUM:
default:
- LOG4CXX_WARN(logger_, "Message type is invalid");
+ LOG4CXX_INFO(logger_, "Message type is invalid");
}
}
@@ -156,7 +156,7 @@ void DBusMessageAdapter::SubscribeTo() {
}
void DBusMessageAdapter::SendMessageToCore(const smart_objects::SmartObject& obj) {
- LOG4CXX_AUTO_TRACE(logger_);
+ LOG4CXX_INFO(logger_, "DBusMessageAdapter::SendMessageToCore");
if (!handler()) {
LOG4CXX_WARN(logger_, "DBusMessageAdapter hasn't handler");
diff --git a/src/components/hmi_message_handler/src/hmi_message_adapter.cc b/src/components/hmi_message_handler/src/hmi_message_adapter.cc
index d8c280bea7..343f13f00a 100644
--- a/src/components/hmi_message_handler/src/hmi_message_adapter.cc
+++ b/src/components/hmi_message_handler/src/hmi_message_adapter.cc
@@ -1,4 +1,4 @@
-/*
+/**
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
diff --git a/src/components/hmi_message_handler/src/hmi_message_handler_impl.cc b/src/components/hmi_message_handler/src/hmi_message_handler_impl.cc
index 887d145617..ed37ee677c 100644
--- a/src/components/hmi_message_handler/src/hmi_message_handler_impl.cc
+++ b/src/components/hmi_message_handler/src/hmi_message_handler_impl.cc
@@ -1,4 +1,4 @@
-/*
+/**
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
diff --git a/src/components/hmi_message_handler/src/messagebroker_adapter.cc b/src/components/hmi_message_handler/src/messagebroker_adapter.cc
index d0dd5c09ba..8779d2ea6d 100644
--- a/src/components/hmi_message_handler/src/messagebroker_adapter.cc
+++ b/src/components/hmi_message_handler/src/messagebroker_adapter.cc
@@ -1,4 +1,4 @@
-/*
+/**
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
@@ -74,17 +74,17 @@ void MessageBrokerAdapter::SendMessageToHMI(
void MessageBrokerAdapter::processResponse(std::string method,
Json::Value& root) {
- LOG4CXX_AUTO_TRACE(logger_);
+ LOG4CXX_INFO(logger_, "MessageBrokerAdapter::processResponse");
ProcessRecievedFromMB(root);
}
void MessageBrokerAdapter::processRequest(Json::Value& root) {
- LOG4CXX_AUTO_TRACE(logger_);
+ LOG4CXX_INFO(logger_, "MessageBrokerAdapter::processRequest");
ProcessRecievedFromMB(root);
}
void MessageBrokerAdapter::processNotification(Json::Value& root) {
- LOG4CXX_AUTO_TRACE(logger_);
+ LOG4CXX_INFO(logger_, "MessageBrokerAdapter::processNotification");
ProcessRecievedFromMB(root);
}
@@ -137,15 +137,13 @@ void MessageBrokerAdapter::SubscribeTo() {
void* MessageBrokerAdapter::SubscribeAndBeginReceiverThread(void* param) {
PassToThread(threads::Thread::CurrentId());
- // For PASA we don't need to subscribe and register controller
- // this will prevent from errors on start up
registerController();
SubscribeTo();
return MethodForReceiverThread(param);
}
void MessageBrokerAdapter::ProcessRecievedFromMB(Json::Value& root) {
- LOG4CXX_AUTO_TRACE(logger_);
+ LOG4CXX_INFO(logger_, "MessageBrokerAdapter::ProcessRecievedFromMB");
if (root.isNull()) {
// LOG
return;
diff --git a/src/components/hmi_message_handler/src/mqueue_adapter.cc b/src/components/hmi_message_handler/src/mqueue_adapter.cc
index 825c27c048..b1524b5f03 100644
--- a/src/components/hmi_message_handler/src/mqueue_adapter.cc
+++ b/src/components/hmi_message_handler/src/mqueue_adapter.cc
@@ -1,34 +1,34 @@
/*
- * 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.
- */
+* Copyright (c) 2014, Ford Motor Company
+* All rights reserved.
+*
+* Redistribution and use in source and binary forms, with or without
+* modification, are permitted provided that the following conditions are met:
+*
+* Redistributions of source code must retain the above copyright notice, this
+* list of conditions and the following disclaimer.
+*
+* Redistributions in binary form must reproduce the above copyright notice,
+* this list of conditions and the following
+* disclaimer in the documentation and/or other materials provided with the
+* distribution.
+*
+* Neither the name of the Ford Motor Company nor the names of its contributors
+* may be used to endorse or promote products derived from this software
+* without specific prior written permission.
+*
+* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+* POSSIBILITY OF SUCH DAMAGE.
+*/
#include "hmi_message_handler/mqueue_adapter.h"
#include "hmi_message_handler/hmi_message_handler.h"
@@ -61,7 +61,7 @@ class ReceiverThreadDelegate : public threads::ThreadDelegate {
continue;
}
const std::string message_string(buffer, buffer + size);
- LOG4CXX_DEBUG(logger_, "Message: " << message_string);
+ LOG4CXX_INFO(logger_, "Message: " << message_string);
MessageSharedPointer message(new application_manager::Message(
protocol_handler::MessagePriority::kDefault));
message->set_json_message(message_string);
@@ -78,7 +78,7 @@ MqueueAdapter::MqueueAdapter(HMIMessageHandler* hmi_message_handler)
: HMIMessageAdapter(hmi_message_handler),
sdl_to_hmi_mqueue_(-1),
hmi_to_sdl_mqueue_(-1),
- receiver_thread_(NULL) {
+ receiver_thread_() {
mq_attr mq_attributes;
mq_attributes.mq_maxmsg = kMqueueSize;
mq_attributes.mq_msgsize = kMqueueMessageSize;
@@ -96,17 +96,18 @@ MqueueAdapter::MqueueAdapter(HMIMessageHandler* hmi_message_handler)
<< kHmiToSdlQueue << ", error " << errno);
return;
}
- receiver_thread_delegate_ = new ReceiverThreadDelegate(hmi_to_sdl_mqueue_,
- hmi_message_handler);
- receiver_thread_ = threads::CreateThread("MqueueAdapter",
- receiver_thread_delegate_);
+ ReceiverThreadDelegate* receiver_thread_delegate =
+ new ReceiverThreadDelegate(hmi_to_sdl_mqueue_, hmi_message_handler);
+ receiver_thread_ =
+ threads::CreateThread("MqueueAdapter", receiver_thread_delegate);
receiver_thread_->start();
}
MqueueAdapter::~MqueueAdapter() {
- receiver_thread_->join();
- delete receiver_thread_delegate_;
- threads::DeleteThread(receiver_thread_);
+ if (receiver_thread_) {
+ receiver_thread_->stop();
+ threads::DeleteThread(receiver_thread_);
+ }
if (-1 != hmi_to_sdl_mqueue_) mq_close(hmi_to_sdl_mqueue_);
if (-1 != sdl_to_hmi_mqueue_) mq_close(sdl_to_hmi_mqueue_);
mq_unlink(kHmiToSdlQueue);
@@ -114,7 +115,7 @@ MqueueAdapter::~MqueueAdapter() {
}
void MqueueAdapter::SendMessageToHMI(const MessageSharedPointer message) {
- LOG4CXX_AUTO_TRACE(logger_);
+ LOG4CXX_TRACE_ENTER(logger_);
if (-1 == sdl_to_hmi_mqueue_) {
LOG4CXX_ERROR(logger_, "Message queue is not opened");
@@ -130,6 +131,8 @@ void MqueueAdapter::SendMessageToHMI(const MessageSharedPointer message) {
LOG4CXX_ERROR(logger_, "Could not send message, error " << errno);
return;
}
+
+ LOG4CXX_TRACE_EXIT(logger_);
}
void MqueueAdapter::SubscribeTo() {
diff --git a/src/components/include/protocol/common.h b/src/components/include/protocol/common.h
index 53d7dd9cb7..f9fdd08fae 100644
--- a/src/components/include/protocol/common.h
+++ b/src/components/include/protocol/common.h
@@ -216,7 +216,7 @@ enum RESULT_CODE {
RESULT_REASSIGN = 12,
RESULT_XML_PARSING = 13,
RESULT_RESEND_ACK = 14,
- RESULT_DEFERRED = 15,
+ RESULT_DEFRERRED = 15,
RESULT_ENCRYPTION_FAILED = 16,
RESULT_HEARTBEAT_IS_NOT_SUPPORTED = 17,
RESULT_UNKNOWN = 255
diff --git a/src/components/include/protocol/service_type.h b/src/components/include/protocol/service_type.h
index b5870e0af1..ab049be9b7 100644
--- a/src/components/include/protocol/service_type.h
+++ b/src/components/include/protocol/service_type.h
@@ -61,6 +61,7 @@ const uint8_t SERVICE_TYPE_NAVI = 0x0B;
*/
const uint8_t SERVICE_TYPE_BULK = 0x0F;
+
/**
* \brief Enum describing possible types of sessions: RPC for API messages,
Navi for video streaming, bulk for PutFile.
@@ -82,4 +83,5 @@ ServiceType ServiceTypeFromByte(uint8_t type);
uint8_t ServiceTypeToByte(ServiceType type);
} // namespace protocol_handler
+
#endif // SRC_COMPONENTS_INCLUDE_PROTOCOL_SERVICE_TYPE_H_
diff --git a/src/components/include/protocol_handler/session_observer.h b/src/components/include/protocol_handler/session_observer.h
index 2418887267..9a958f6fa7 100644
--- a/src/components/include/protocol_handler/session_observer.h
+++ b/src/components/include/protocol_handler/session_observer.h
@@ -96,12 +96,6 @@ class SessionObserver {
const protocol_handler::ServiceType &service_type) = 0;
/**
- * \brief Callback function used by ProtocolHandler
- * when Mobile Application start message flood
- * \param connection_key used by other components as application identifier
- */
- virtual void OnApplicationFloodCallBack(const uint32_t &connection_key) = 0;
- /**
* \brief Creates unique identifier of session (can be used as hash)
* from given connection identifier
* within which session exists and session number.
@@ -163,7 +157,6 @@ class SessionObserver {
transport_manager::ConnectionUID connection_handle,
uint8_t session_id) = 0;
-
#ifdef ENABLE_SECURITY
/**
* \brief Sets crypto context of connection
diff --git a/src/components/include/transport_manager/transport_adapter/device.h b/src/components/include/transport_manager/transport_adapter/device.h
index e7bca5a46b..78d3b44958 100644
--- a/src/components/include/transport_manager/transport_adapter/device.h
+++ b/src/components/include/transport_manager/transport_adapter/device.h
@@ -76,8 +76,6 @@ class Device {
virtual ApplicationList GetApplicationList() const = 0;
- virtual void Stop() { }
-
inline const DeviceUID& unique_device_id() const {
return unique_device_id_;
}
diff --git a/src/components/include/transport_manager/transport_adapter/transport_adapter.h b/src/components/include/transport_manager/transport_adapter/transport_adapter.h
index b73333e535..2edf173110 100644
--- a/src/components/include/transport_manager/transport_adapter/transport_adapter.h
+++ b/src/components/include/transport_manager/transport_adapter/transport_adapter.h
@@ -1,4 +1,4 @@
-/*
+/**
* \file transport_adapter.h
* \brief TransportAdapter class header file.
*
@@ -123,12 +123,6 @@ class TransportAdapter {
virtual Error Init() = 0;
/**
- * @brief Stops device adapter
- * Called from transport manager to stop device adapter
- */
- virtual void Terminate() = 0;
-
- /**
* @brief Add listener to the container(list) of device adapter listeners.
*
* @param listener Pointer to the device adapter listener.
diff --git a/src/components/include/transport_manager/transport_manager.h b/src/components/include/transport_manager/transport_manager.h
index 25745e7485..40790ac0ab 100644
--- a/src/components/include/transport_manager/transport_manager.h
+++ b/src/components/include/transport_manager/transport_manager.h
@@ -59,12 +59,6 @@ class TransportManager {
virtual int Init() = 0;
/**
- * @brief Reinitializes transport manager
- * @return Error code
- */
- virtual int Reinit() = 0;
-
- /**
* @brief Start scanning for new devices.
*
* @return Code error.
diff --git a/src/components/include/transport_manager/transport_manager_listener.h b/src/components/include/transport_manager/transport_manager_listener.h
index 0684e8f22f..5033a95d17 100644
--- a/src/components/include/transport_manager/transport_manager_listener.h
+++ b/src/components/include/transport_manager/transport_manager_listener.h
@@ -143,7 +143,7 @@ class TransportManagerListener {
/**
* @brief Notifies about recieving message from TM.
*
- * @param message Received message
+ * @param message Recieved message
**/
virtual void OnTMMessageReceived(const ::protocol_handler::RawMessagePtr message) = 0;
diff --git a/src/components/include/utils/atomic.h b/src/components/include/utils/atomic.h
index f80455b748..bfbcff9dc9 100644
--- a/src/components/include/utils/atomic.h
+++ b/src/components/include/utils/atomic.h
@@ -28,15 +28,15 @@
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef SRC_COMPONENTS_INCLUDE_UTILS_ATOMIC_H_
-#define SRC_COMPONENTS_INCLUDE_UTILS_ATOMIC_H_
+*/
#ifdef __QNXNTO__
#include <atomic.h>
#endif
+#ifndef SRC_COMPONENTS_INCLUDE_UTILS_ATOMIC_H_
+#define SRC_COMPONENTS_INCLUDE_UTILS_ATOMIC_H_
+
#if defined(__QNXNTO__)
#define atomic_post_inc(ptr) atomic_add_value((ptr), 1)
#elif defined(__GNUG__)
diff --git a/src/components/include/utils/conditional_variable.h b/src/components/include/utils/conditional_variable.h
index f7159ad6fe..58119a0cfd 100644
--- a/src/components/include/utils/conditional_variable.h
+++ b/src/components/include/utils/conditional_variable.h
@@ -1,4 +1,4 @@
-/*
+/**
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
@@ -43,7 +43,6 @@
namespace sync_primitives {
class AutoLock;
-class Lock;
namespace impl {
#if defined(OS_POSIX)
@@ -82,7 +81,6 @@ class ConditionalVariable {
// Wait forever or up to milliseconds time limit
void Wait(AutoLock& auto_lock);
- void Wait(Lock& lock);
WaitStatus WaitFor(AutoLock& auto_lock, int32_t milliseconds);
private:
impl::PlatformConditionalVariable cond_var_;
diff --git a/src/components/include/utils/date_time.h b/src/components/include/utils/date_time.h
index c8cef32ef4..766932652d 100644
--- a/src/components/include/utils/date_time.h
+++ b/src/components/include/utils/date_time.h
@@ -1,34 +1,34 @@
/*
- * 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.
- */
+* Copyright (c) 2014, Ford Motor Company
+* All rights reserved.
+*
+* Redistribution and use in source and binary forms, with or without
+* modification, are permitted provided that the following conditions are met:
+*
+* Redistributions of source code must retain the above copyright notice, this
+* list of conditions and the following disclaimer.
+*
+* Redistributions in binary form must reproduce the above copyright notice,
+* this list of conditions and the following
+* disclaimer in the documentation and/or other materials provided with the
+* distribution.
+*
+* Neither the name of the Ford Motor Company nor the names of its contributors
+* may be used to endorse or promote products derived from this software
+* without specific prior written permission.
+*
+* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+* POSSIBILITY OF SUCH DAMAGE.
+*/
#ifndef SRC_COMPONENTS_INCLUDE_UTILS_DATE_TIME_H_
#define SRC_COMPONENTS_INCLUDE_UTILS_DATE_TIME_H_
@@ -50,7 +50,6 @@ class DateTime {
public:
static const int32_t MILLISECONDS_IN_SECOND = 1000;
static const int32_t MICROSECONDS_IN_MILLISECONDS = 1000;
- static const int32_t MICROSECONDS_IN_SECOND = 1000 * 1000;
static TimevalStruct getCurrentTime();
@@ -81,6 +80,5 @@ class DateTime {
};
} // namespace date_time
-bool operator<(const TimevalStruct& time1, const TimevalStruct& time2);
-bool operator==(const TimevalStruct& time1, const TimevalStruct& time2);
+
#endif // SRC_COMPONENTS_INCLUDE_UTILS_DATE_TIME_H_
diff --git a/src/components/include/utils/lock.h b/src/components/include/utils/lock.h
index 29bd467143..910a88052f 100644
--- a/src/components/include/utils/lock.h
+++ b/src/components/include/utils/lock.h
@@ -34,14 +34,11 @@
#if defined(OS_POSIX)
#include <pthread.h>
-#include <sched.h>
#else
#error Please implement lock for your OS
#endif
#include <stdint.h>
#include "utils/macro.h"
-#include "utils/atomic.h"
-#include "utils/memory_barrier.h"
namespace sync_primitives {
@@ -51,31 +48,6 @@ typedef pthread_mutex_t PlatformMutex;
#endif
} // namespace impl
-
-class SpinMutex {
- public:
- SpinMutex()
- : state_(0) { }
- void Lock() {
- if (atomic_post_set(&state_) == 0) {
- return;
- }
- for(;;) {
- sched_yield();
- if (state_ == 0 && atomic_post_set(&state_) == 0) {
- return;
- }
- }
- }
- void Unlock() {
- state_ = 0;
- }
- ~SpinMutex() {
- }
- private:
- volatile unsigned int state_;
-};
-
/* Platform-indepenednt NON-RECURSIVE lock (mutex) wrapper
Please use AutoLock to ackquire and (automatically) release it
It eases balancing of multple lock taking/releasing and makes it
diff --git a/src/components/include/utils/logger.h b/src/components/include/utils/logger.h
index 734acc5046..7c00c5d3aa 100644
--- a/src/components/include/utils/logger.h
+++ b/src/components/include/utils/logger.h
@@ -37,11 +37,11 @@
#include <errno.h>
#include <string.h>
#include <sstream>
+ #include <apr_time.h>
#include <log4cxx/propertyconfigurator.h>
#include <log4cxx/spi/loggingevent.h>
#include "utils/push_log.h"
#include "utils/logger_status.h"
- #include "utils/auto_trace.h"
#endif // ENABLE_LOG
#ifdef ENABLE_LOG
@@ -57,23 +57,19 @@
#define INIT_LOGGER(file_name) \
log4cxx::PropertyConfigurator::configure(file_name);
- // Logger deinitilization function and macro, need to stop log4cxx writing
- // without this deinitilization log4cxx threads continue using some instances destroyed by exit()
- void deinit_logger ();
- #define DEINIT_LOGGER() deinit_logger()
+ // without this line log4cxx threads continue using some instances destroyed by exit()
+ #define DEINIT_LOGGER() \
+ log4cxx::Logger::getRootLogger()->closeNestedAppenders();
#define LOG4CXX_IS_TRACE_ENABLED(logger) logger->isTraceEnabled()
- log4cxx_time_t time_now();
-
#define LOG_WITH_LEVEL(loggerPtr, logLevel, logEvent) \
do { \
if (logger::logger_status != logger::DeletingLoggerThread) { \
if (loggerPtr->isEnabledFor(logLevel)) { \
std::stringstream accumulator; \
accumulator << logEvent; \
- logger::push_log(loggerPtr, logLevel, accumulator.str(), time_now(), \
- LOG4CXX_LOCATION, ::log4cxx::spi::LoggingEvent::getCurrentThreadName()); \
+ logger::push_log(loggerPtr, logLevel, accumulator.str(), apr_time_now(), LOG4CXX_LOCATION, ::log4cxx::spi::LoggingEvent::getCurrentThreadName()); \
} \
} \
} while (false)
@@ -114,8 +110,8 @@
#undef LOG4CXX_TRACE
#define LOG4CXX_TRACE(loggerPtr, logEvent) LOG_WITH_LEVEL(loggerPtr, ::log4cxx::Level::getTrace(), logEvent)
- #define LOG4CXX_AUTO_TRACE_WITH_NAME_SPECIFIED(loggerPtr, auto_trace) logger::AutoTrace auto_trace(loggerPtr, LOG4CXX_LOCATION)
- #define LOG4CXX_AUTO_TRACE(loggerPtr) LOG4CXX_AUTO_TRACE_WITH_NAME_SPECIFIED(loggerPtr, SDL_local_auto_trace_object)
+ #define LOG4CXX_TRACE_ENTER(logger) LOG4CXX_TRACE(logger, "ENTER: " << __PRETTY_FUNCTION__ )
+ #define LOG4CXX_TRACE_EXIT(logger) LOG4CXX_TRACE(logger, "EXIT: " << __PRETTY_FUNCTION__ )
#define LOG4CXX_ERROR_WITH_ERRNO(logger, message) \
LOG4CXX_ERROR(logger, message << ", error code " << errno << " (" << strerror(errno) << ")")
@@ -177,8 +173,8 @@
#define LOG4CXX_FATAL_EXT(logger, logEvent)
#define LOG4CXX_FATAL_STR_EXT(logger, logEvent)
- #define LOG4CXX_AUTO_TRACE_WITH_NAME_SPECIFIED(loggerPtr, auto_trace)
- #define LOG4CXX_AUTO_TRACE(loggerPtr)
+ #define LOG4CXX_TRACE_ENTER(logger)
+ #define LOG4CXX_TRACE_EXIT(logger)
#endif // ENABLE_LOG
#endif // SRC_COMPONENTS_UTILS_INCLUDE_UTILS_LOGGER_H_
diff --git a/src/components/include/utils/logger_status.h b/src/components/include/utils/logger_status.h
index 17fa0562c2..e28fa6f839 100644
--- a/src/components/include/utils/logger_status.h
+++ b/src/components/include/utils/logger_status.h
@@ -45,7 +45,7 @@ typedef enum {
// this variable is only changed when creating and deleting logger thread
// its reads and writes are believed to be atomic
// thus it shall be considered thread safe
-extern volatile LoggerStatus logger_status;
+extern LoggerStatus logger_status;
} // namespace logger
diff --git a/src/components/include/utils/macro.h b/src/components/include/utils/macro.h
index dc737dbe71..bf34b199b5 100644
--- a/src/components/include/utils/macro.h
+++ b/src/components/include/utils/macro.h
@@ -32,12 +32,8 @@
#ifndef SRC_COMPONENTS_INCLUDE_UTILS_MACRO_H_
#define SRC_COMPONENTS_INCLUDE_UTILS_MACRO_H_
-#ifdef DEBUG
#include <assert.h>
-#else // RELEASE
#include <stdio.h>
-#endif
-#include "logger.h"
@@ -58,27 +54,14 @@
#define FRIEND_DELETER_DESTRUCTOR(TypeName) \
friend utils::deleters::Deleter<TypeName>::~Deleter()
-#ifdef DEBUG
- #define ASSERT(condition) \
- do { \
- DEINIT_LOGGER(); \
- assert(condition); \
- } while (false)
-#else // RELEASE
- #define ASSERT(condition) \
- fprintf(stderr, "Failed condition \"" #condition "\" [%s:%d][%s]\n\n", \
- __FILE__, __LINE__, __FUNCTION__)
-#endif
-
#define DCHECK(condition) \
if (!(condition)) { \
- CREATE_LOGGERPTR_LOCAL(logger_, "assert"); \
- LOG4CXX_FATAL(logger_, "DCHECK failed with \"" << #condition \
- << "\" [" << __FUNCTION__ << "][" << __FILE__ << ':' << __LINE__ << ']'); \
- ASSERT((condition)); \
+ printf("\nDCHECK [%s:%d][%s]", __FILE__, __LINE__, __FUNCTION__); \
+ printf("[Check failed: " #condition "]\n\n"); \
+ assert(false); \
}
-#define NOTREACHED() DCHECK(!"Unreachable code")
+#define NOTREACHED() DCHECK(false)
// Allows to perform static check that virtual function from base class is
// actually being overriden if compiler support is available
diff --git a/src/components/include/utils/memory_barrier.h b/src/components/include/utils/memory_barrier.h
index 43c7c9df14..312894e034 100644
--- a/src/components/include/utils/memory_barrier.h
+++ b/src/components/include/utils/memory_barrier.h
@@ -28,7 +28,7 @@
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
- */
+*/
#ifndef SRC_COMPONENTS_UTILS_INCLUDE_UTILS_MEMORY_BARRIER_H_
#define SRC_COMPONENTS_UTILS_INCLUDE_UTILS_MEMORY_BARRIER_H_
diff --git a/src/components/include/utils/message_queue.h b/src/components/include/utils/message_queue.h
index 9ef77374ba..9d998cc698 100644
--- a/src/components/include/utils/message_queue.h
+++ b/src/components/include/utils/message_queue.h
@@ -28,7 +28,7 @@
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
- */
+*/
#ifndef MESSAGE_QUEUE_CLASS
#define MESSAGE_QUEUE_CLASS
diff --git a/src/components/include/utils/prioritized_queue.h b/src/components/include/utils/prioritized_queue.h
index 2a8ebf0a7b..4bec901f59 100644
--- a/src/components/include/utils/prioritized_queue.h
+++ b/src/components/include/utils/prioritized_queue.h
@@ -1,4 +1,4 @@
-/*
+/**
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
diff --git a/src/components/include/utils/shared_ptr.h b/src/components/include/utils/shared_ptr.h
index 07f8ad9366..604bee998b 100644
--- a/src/components/include/utils/shared_ptr.h
+++ b/src/components/include/utils/shared_ptr.h
@@ -164,6 +164,7 @@ class SharedPtr {
operator bool() const;
void reset();
void reset(ObjectType* other);
+ void release();
ObjectType* get() const;
/**
@@ -196,8 +197,6 @@ class SharedPtr {
* @brief Pointer to reference counter.
**/
uint32_t* mReferenceCounter;
-
- void release();
};
template<typename ObjectType>
diff --git a/src/components/include/utils/threads/message_loop_thread.h b/src/components/include/utils/threads/message_loop_thread.h
index c01ebfd067..e051c48904 100644
--- a/src/components/include/utils/threads/message_loop_thread.h
+++ b/src/components/include/utils/threads/message_loop_thread.h
@@ -39,14 +39,13 @@
#include "utils/logger.h"
#include "utils/macro.h"
#include "utils/message_queue.h"
-#include "utils/threads/thread.h"
-#include "utils/shared_ptr.h"
+#include "utils/threads/thread_manager.h"
+#include "utils/lock.h"
namespace threads {
-/**
- * \class MessageLoopThread
- * \brief Handles a thread which sole purpose is to pump messages pushed
+/*
+ * Class that handles a thread which sole purpose is to pump messages pushed
* to it's queue. To handle messages someone, Handler must be implemented and
* passed to MessageLoopThread constructor.
*/
@@ -80,10 +79,6 @@ class MessageLoopThread {
// Places a message to the therad's queue. Thread-safe.
void PostMessage(const Message& message);
-
- // Process already posted messages and stop thread processing. Thread-safe.
- void Shutdown();
-
private:
/*
* Implementation of ThreadDelegate that actually pumps the queue and is
@@ -95,20 +90,19 @@ class MessageLoopThread {
// threads::ThreadDelegate overrides
virtual void threadMain() OVERRIDE;
- virtual void exitThreadMain() OVERRIDE;
-
+ virtual bool exitThreadMain() OVERRIDE;
private:
// Handle all messages that are in the queue until it is empty
void DrainQue();
+ private:
// Handler that processes messages
Handler& handler_;
// Message queue that is actually owned by MessageLoopThread
MessageQueue<Message, Queue>& message_queue_;
+ sync_primitives::Lock active_lock;
};
-
private:
MessageQueue<Message, Queue> message_queue_;
- LoopThreadDelegate* thread_delegate_;
threads::Thread* thread_;
};
@@ -118,10 +112,8 @@ template<class Q>
MessageLoopThread<Q>::MessageLoopThread(const std::string& name,
Handler* handler,
const ThreadOptions& thread_opts)
- : thread_delegate_(new LoopThreadDelegate(&message_queue_, handler)),
- thread_(threads::CreateThread(name.c_str(),
- thread_delegate_)) {
- const bool started = thread_->start(thread_opts);
+ : thread_(threads::CreateThread(name.c_str(), new LoopThreadDelegate(&message_queue_, handler))) {
+ bool started = thread_->startWithOptions(thread_opts);
if (!started) {
CREATE_LOGGERPTR_LOCAL(logger_, "Utils")
LOG4CXX_ERROR(logger_, "Failed to start thread " << name);
@@ -130,10 +122,7 @@ MessageLoopThread<Q>::MessageLoopThread(const std::string& name,
template<class Q>
MessageLoopThread<Q>::~MessageLoopThread() {
- Shutdown();
- thread_->join();
- delete thread_delegate_;
- threads::DeleteThread(thread_);
+ thread_->stop();
}
template <class Q>
@@ -141,11 +130,6 @@ void MessageLoopThread<Q>::PostMessage(const Message& message) {
message_queue_.push(message);
}
-template <class Q>
-void MessageLoopThread<Q>::Shutdown() {
- thread_->stop();
-}
-
//////////
template<class Q>
MessageLoopThread<Q>::LoopThreadDelegate::LoopThreadDelegate(
@@ -158,9 +142,8 @@ MessageLoopThread<Q>::LoopThreadDelegate::LoopThreadDelegate(
template<class Q>
void MessageLoopThread<Q>::LoopThreadDelegate::threadMain() {
- CREATE_LOGGERPTR_LOCAL(logger_, "Utils")
- LOG4CXX_AUTO_TRACE(logger_);
- while (!message_queue_.IsShuttingDown()) {
+ sync_primitives::AutoLock auto_lock(active_lock);
+ while(!message_queue_.IsShuttingDown()){
DrainQue();
message_queue_.wait();
}
@@ -169,15 +152,18 @@ void MessageLoopThread<Q>::LoopThreadDelegate::threadMain() {
}
template<class Q>
-void MessageLoopThread<Q>::LoopThreadDelegate::exitThreadMain() {
- CREATE_LOGGERPTR_LOCAL(logger_, "Utils")
- LOG4CXX_AUTO_TRACE(logger_);
+bool MessageLoopThread<Q>::LoopThreadDelegate::exitThreadMain() {
message_queue_.Shutdown();
+ {
+ sync_primitives::AutoLock auto_lock(active_lock);
+ // Prevent canceling thread until queue is drained
+ }
+ return true;
}
template<class Q>
void MessageLoopThread<Q>::LoopThreadDelegate::DrainQue() {
- while (!message_queue_.empty()) {
+ while(!message_queue_.empty()) {
handler_.Handle(message_queue_.pop());
}
}
diff --git a/src/components/include/utils/threads/thread.h b/src/components/include/utils/threads/thread.h
index 6c3968c51f..3b81cf3454 100644
--- a/src/components/include/utils/threads/thread.h
+++ b/src/components/include/utils/threads/thread.h
@@ -43,16 +43,16 @@
#include "utils/macro.h"
#include "utils/threads/thread_delegate.h"
#include "utils/threads/thread_options.h"
-#include "utils/conditional_variable.h"
-#include "utils/lock.h"
namespace threads {
+namespace impl {
#if defined(OS_POSIX)
typedef pthread_t PlatformThreadHandle;
#else
#error Please implement thread for your OS
#endif
+}
/**
* Non platform specific thread abstraction that establishes a
@@ -76,69 +76,56 @@ typedef pthread_t PlatformThreadHandle;
* printf("ok!\n");
*/
class Thread;
-void enqueue_to_join(Thread*);
-
Thread* CreateThread(const char* name, ThreadDelegate* delegate);
void DeleteThread(Thread*);
class Thread {
- private:
- const std::string name_;
- // Should be locked to protect delegate_ value
- sync_primitives::Lock delegate_lock_;
- ThreadDelegate* delegate_;
- PlatformThreadHandle handle_;
- ThreadOptions thread_options_;
- // Should be locked to protect isThreadRunning_ and thread_created_ values
- sync_primitives::Lock state_lock_;
- volatile unsigned int isThreadRunning_;
- volatile bool stopped_;
- volatile bool finalized_;
- bool thread_created_;
- // Signalled when Thread::start() is called
- sync_primitives::ConditionalVariable run_cond_;
+ friend Thread* CreateThread(const char*, ThreadDelegate*);
+ friend void DeleteThread(Thread*);
public:
/**
+ * Class that represents unique in-process thread identifier
+ * due to restriction of pthread API it only allows checks
+ * for equality to different thread id and no ordering.
+ *
+ * ostream<< operator is provided for this class which
+ * outputs thread name associated to an identifier.
+ */
+ class Id {
+ public:
+ explicit Id(const impl::PlatformThreadHandle& id): id_(id) {}
+ bool operator==(const Id& that) const;
+ impl::PlatformThreadHandle Handle() const { return id_; }
+ private:
+ impl::PlatformThreadHandle id_;
+ friend class Thread;
+ };
+
+ // Get unique ID of currently executing thread
+ static Id CurrentId();
+
+ // Get name associated with thread identified by thread_id
+ static std::string NameFromId(const Id& thread_id);
+
+ // Give thread thread_id a name, helpful for debugging
+ static void SetNameForId(const Id& thread_id, const std::string& name);
+
+ /**
* Starts the thread.
* @return true if the thread was successfully started.
*/
bool start();
+ ThreadDelegate* delegate() const;
+
/**
- * Starts the thread. Behaves exactly like \ref start() in addition to
+ * Starts the thread. Behaves exactly like Start in addition to
* allow to override the default options.
- * @param options Thread options. Look for 'threads/thread_options.h'
+ * @param options - thread options. Look for 'threads/thread_options.h'
* for details.
* @return true if the thread was successfully started.
*/
- bool start(const ThreadOptions& options);
-
- void WaitForRun();
-
- sync_primitives::Lock& delegate_lock() {
- return delegate_lock_;
- }
-
- ThreadDelegate *delegate() const {
- return delegate_;
- }
-
- void set_delegate(ThreadDelegate *delegate) {
- DCHECK(!isThreadRunning_);
- delegate_ = delegate;
- }
-
- friend Thread* CreateThread(const char* name, ThreadDelegate* delegate);
- friend void DeleteThread(Thread*);
-
- public:
-
- // Get unique ID of currently executing thread
- static PlatformThreadHandle CurrentId();
-
- // Give thread thread_id a name, helpful for debugging
- static void SetNameForId(const PlatformThreadHandle& thread_id, std::string name);
-
+ bool startWithOptions(const ThreadOptions& options);
/**
* Signals the thread to exit and returns once the thread has exited.
@@ -150,14 +137,11 @@ class Thread {
*/
void stop();
-
- void join();
-
/**
* Get thread name.
* @return thread name
*/
- const std::string& name() {
+ const std::string& thread_name() {
return name_;
}
@@ -170,7 +154,9 @@ class Thread {
return isThreadRunning_;
}
- void set_running(bool running);
+ void set_running(bool running) {
+ isThreadRunning_ = running;
+ }
/**
* Is thread joinable?
@@ -192,8 +178,16 @@ class Thread {
* The native thread handle.
* @return thread handle.
*/
- PlatformThreadHandle thread_handle() const {
- return handle_;
+ impl::PlatformThreadHandle thread_handle() const {
+ return thread_handle_;
+ }
+
+ /**
+ * Thread id.
+ * @return return thread id.
+ */
+ Id thread_id() const {
+ return Id(thread_handle());
}
/**
@@ -210,7 +204,11 @@ class Thread {
static size_t kMinStackSize;
protected:
- sync_primitives::ConditionalVariable state_cond_;
+ const std::string name_;
+ ThreadDelegate* delegate_;
+ impl::PlatformThreadHandle thread_handle_;
+ ThreadOptions thread_options_;
+ volatile unsigned int isThreadRunning_;
private:
/**
@@ -218,17 +216,19 @@ class Thread {
* @param name - display string to identify the thread.
* @param delegate - thread procedure delegate. Look for
* 'threads/thread_delegate.h' for details.
- * LifeCycle thread , otherwise it will be joined in stop method
- * NOTE: delegate will be deleted after thread will be joined
+ * NOTE: delegate will be deleted by destructor.
* This constructor made private to prevent
* Thread object to be created on stack
*/
Thread(const char* name, ThreadDelegate* delegate);
+
DISALLOW_COPY_AND_ASSIGN(Thread);
- virtual ~Thread();
- static void* threadFunc(void* arg);
- static void cleanup(void* arg);
+ virtual ~Thread() { }
};
+inline bool operator!= (const Thread::Id& left, const Thread::Id& right) {
+ return !(left == right);
+}
+std::ostream& operator<<(std::ostream& os, const Thread::Id& thread_id);
} // namespace threads
#endif // SRC_COMPONENTS_INCLUDE_UTILS_THREADS_THREAD_H_
diff --git a/src/components/include/utils/threads/thread_delegate.h b/src/components/include/utils/threads/thread_delegate.h
index 1d9be175fc..47e68f1e83 100644
--- a/src/components/include/utils/threads/thread_delegate.h
+++ b/src/components/include/utils/threads/thread_delegate.h
@@ -35,65 +35,30 @@
#include <pthread.h>
-#include "utils/lock.h"
-
namespace threads {
-enum ThreadState {
- kInit = 0,
- kStarted = 1,
- kStopReq = 2
-};
-
-class Thread;
-
/**
* Thread procedure interface.
* Look for "threads/thread.h" for example
*/
class ThreadDelegate {
- public:
- ThreadDelegate()
- : state_(kInit),
- thread_(NULL) { }
- /**
- * \brief Thread procedure.
- */
- virtual void threadMain() = 0;
+ public:
- /**
- * Should be called to free all resources allocated in threadMain
- * and exiting threadMain
- * This function should be blocking and return only when threadMain() will be
- * finished in other case segmantation failes are possible
- */
- virtual void exitThreadMain();
+ /**
+ * Thread procedure.
+ */
+ virtual void threadMain() = 0;
- virtual ~ThreadDelegate();
-
- Thread* thread() const {
- return thread_;
- }
-
- void set_thread(Thread *thread);
-
- bool ImproveState(unsigned int to) {
- state_lock_.Lock();
- if ((state_ + 1 == to) ||
- (to == kInit && state_ == kStopReq)) {
- state_ = to;
+ /**
+ * Should be called to free all resources allocated in threadMain
+ * and exiting threadMain
+ * This function should be blocking and return only when threadMain() will be
+ * finished in other case segmantation failes are possible
+ */
+ virtual bool exitThreadMain() {
+ return false;
}
- state_lock_.Unlock();
- return state_ == to;
- }
-
- unsigned int state() const {
- return state_;
- }
- private:
- volatile unsigned int state_;
- sync_primitives::SpinMutex state_lock_;
- Thread* thread_;
+ virtual ~ThreadDelegate() { }
};
} // namespace threads
diff --git a/src/components/include/utils/timer_thread.h b/src/components/include/utils/timer_thread.h
index 70fbd36458..a3481e4b4b 100644
--- a/src/components/include/utils/timer_thread.h
+++ b/src/components/include/utils/timer_thread.h
@@ -1,4 +1,4 @@
-/*
+/**
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
@@ -28,7 +28,7 @@
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
- */
+*/
#ifndef SRC_COMPONENTS_UTILS_INCLUDE_UTILS_TIMER_THREAD
#define SRC_COMPONENTS_UTILS_INCLUDE_UTILS_TIMER_THREAD
@@ -52,9 +52,8 @@ CREATE_LOGGERPTR_GLOBAL(logger_, "Utils")
class TimerDelegate;
-/**
- * \class TimerThread
- * \brief TimerThread class provide possibility to run timer in a separate thread.
+/*
+ * The TimerThread class provide possibility to run timer in a separate thread.
* The client should specify callee and const callback function.
* Example usage:
*
@@ -111,17 +110,12 @@ class TimerThread {
virtual void stop();
/**
- * @brief Tell timer status
+ * @brief Tell tmer status
* @return true if timer is currently running, otherwise return false
*/
virtual bool isRunning();
- /**
- * @brief method suspends timer execution
- */
- virtual void pause();
-
- /**
+ /*
* @brief Stop timer update timeout and start timer again
* Note that it cancel thread of timer, If you use it from callback,
* it probably will stop execution of callback function
@@ -129,6 +123,7 @@ class TimerThread {
*
*/
virtual void updateTimeOut(const uint32_t timeout_seconds);
+ threads::Thread* thread_;
protected:
/**
@@ -164,7 +159,7 @@ class TimerThread {
/**
* @brief Called by thread::thread to free all allocated resources.
*/
- virtual void exitThreadMain();
+ virtual bool exitThreadMain();
/**
* @brief Set new Timeout
@@ -207,12 +202,13 @@ class TimerThread {
private:
DISALLOW_COPY_AND_ASSIGN(TimerLooperDelegate);
};
- threads::Thread* thread_;
void (T::*callback_)();
T* callee_;
TimerDelegate* delegate_;
+ //threads::Thread* thread_;
std::string name_;
- volatile bool is_looper_;
+ mutable bool is_running_;
+ bool is_looper_;
DISALLOW_COPY_AND_ASSIGN(TimerThread);
};
@@ -223,55 +219,53 @@ TimerThread<T>::TimerThread(const char* name, T* callee, void (T::*f)(), bool is
callback_(f),
callee_(callee),
delegate_(NULL),
- name_(name),
+ is_running_(false),
is_looper_(is_looper) {
- delegate_ = is_looper_ ?
- new TimerLooperDelegate(this) :
- new TimerDelegate(this);
-
- thread_ = threads::CreateThread(name_.c_str(), delegate_);
}
template <class T>
TimerThread<T>::~TimerThread() {
- LOG4CXX_DEBUG(logger_, "TimerThread is to be destroyed " << name_);
- thread_->join();
- delete delegate_;
- threads::DeleteThread(thread_);
+ LOG4CXX_INFO(logger_, "TimerThread is to destroy " << name_);
+ stop();
callback_ = NULL;
callee_ = NULL;
}
template <class T>
void TimerThread<T>::start(uint32_t timeout_seconds) {
- LOG4CXX_AUTO_TRACE(logger_);
- if (isRunning()) {
+ LOG4CXX_TRACE(logger_, "Starting timer " << this);
+ if (is_running_) {
LOG4CXX_INFO(logger_, "TimerThread start needs stop " << name_);
stop();
}
- updateTimeOut(timeout_seconds);
- thread_->start();
+
+ delegate_ = is_looper_ ?
+ new TimerLooperDelegate(this) :
+ new TimerDelegate(this);
+ delegate_->setTimeOut(timeout_seconds);
+
+ thread_ = threads::CreateThread("TimerThread", delegate_);
+ if (delegate_ && thread_) {
+ is_running_ = true;
+ thread_->start();
+ }
}
template <class T>
void TimerThread<T>::stop() {
- LOG4CXX_AUTO_TRACE(logger_);
- DCHECK(thread_);
- LOG4CXX_DEBUG(logger_, "Stopping timer " << name_);
- thread_->join();
+ LOG4CXX_TRACE(logger_, "Stopping timer " << this);
+ if (is_running_ && delegate_ && thread_) {
+ LOG4CXX_INFO(logger_, "TimerThread thread_ stop " << name_);
+ thread_->stop();
+ is_running_ = false;
+ } else {
+ LOG4CXX_INFO(logger_, "TimerThread thread_ not stop " << name_);
+ }
}
template <class T>
bool TimerThread<T>::isRunning() {
- DCHECK(thread_);
- return thread_->is_running();
-}
-
-template <class T>
-void TimerThread<T>::pause() {
- LOG4CXX_DEBUG(logger_, "Suspension of timer " << name_);
- const uint32_t wait_seconds = std::numeric_limits<uint32_t>::max();
- updateTimeOut(wait_seconds);
+ return is_running_;
}
template <class T>
@@ -279,9 +273,15 @@ void TimerThread<T>::updateTimeOut(const uint32_t timeout_seconds) {
delegate_->setTimeOut(timeout_seconds);
}
-template <class T>void TimerThread<T>::onTimeOut() const {
+template <class T>
+void TimerThread<T>::onTimeOut() const {
if (callee_ && callback_) {
(callee_->*callback_)();
+ /*
+ if (!is_looper_) {
+ stop();
+ }
+ */
}
}
@@ -308,7 +308,6 @@ template <class T>
void TimerThread<T>::TimerDelegate::threadMain() {
using sync_primitives::ConditionalVariable;
sync_primitives::AutoLock auto_lock(state_lock_);
- stop_flag_ = false;
while (!stop_flag_) {
// Sleep
int32_t wait_milliseconds_left = TimerDelegate::calculateMillisecondsLeft();
@@ -317,21 +316,19 @@ void TimerThread<T>::TimerDelegate::threadMain() {
// Quit sleeping or continue sleeping in case of spurious wake up
if (ConditionalVariable::kTimeout == wait_status ||
wait_milliseconds_left <= 0) {
- LOG4CXX_TRACE(logger_, "Timer timeout " << wait_milliseconds_left << " ms");
- timer_thread_->onTimeOut();
- return;
- } else {
- LOG4CXX_DEBUG(logger_, "Timeout reset force: " << TimerDelegate::timeout_seconds_);
- return;
+ break;
}
}
+ if (!stop_flag_) {
+ timer_thread_->onTimeOut();
+ timer_thread_->stop();
+ }
}
template <class T>
void TimerThread<T>::TimerLooperDelegate::threadMain() {
using sync_primitives::ConditionalVariable;
sync_primitives::AutoLock auto_lock(TimerDelegate::state_lock_);
- TimerDelegate::stop_flag_ = false;
while (!TimerDelegate::stop_flag_) {
int32_t wait_milliseconds_left = TimerDelegate::calculateMillisecondsLeft();
ConditionalVariable::WaitStatus wait_status =
@@ -339,7 +336,7 @@ void TimerThread<T>::TimerLooperDelegate::threadMain() {
// Quit sleeping or continue sleeping in case of spurious wake up
if (ConditionalVariable::kTimeout == wait_status ||
wait_milliseconds_left <= 0) {
- LOG4CXX_TRACE(logger_, "Timer timeout " << wait_milliseconds_left << " ms");
+ LOG4CXX_TRACE(logger_, "Timer timeout " << wait_milliseconds_left);
TimerDelegate::timer_thread_->onTimeOut();
} else {
LOG4CXX_DEBUG(logger_, "Timeout reset force: " << TimerDelegate::timeout_seconds_);
@@ -349,10 +346,11 @@ void TimerThread<T>::TimerLooperDelegate::threadMain() {
template <class T>
-void TimerThread<T>::TimerDelegate::exitThreadMain() {
+bool TimerThread<T>::TimerDelegate::exitThreadMain() {
sync_primitives::AutoLock auto_lock(state_lock_);
stop_flag_ = true;
termination_condition_.NotifyOne();
+ return true;
}
template <class T>
@@ -371,9 +369,9 @@ int32_t TimerThread<T>::TimerThread::TimerDelegate::calculateMillisecondsLeft()
int64_t wait_seconds_left = static_cast<int64_t>(difftime(end_time, cur_time));
int32_t wait_milliseconds_left = std::numeric_limits<int32_t>::max();
- const int32_t milliseconds_in_second = 1000;
- if (wait_seconds_left < std::numeric_limits<int32_t>::max() / milliseconds_in_second) {
- wait_milliseconds_left = milliseconds_in_second * wait_seconds_left;
+ const int32_t millisecconds_in_second = 1000;
+ if (wait_seconds_left < std::numeric_limits<int32_t>::max() / millisecconds_in_second) {
+ wait_milliseconds_left = millisecconds_in_second * wait_seconds_left;
}
return wait_milliseconds_left;
}
diff --git a/src/components/interfaces/CMakeLists.txt b/src/components/interfaces/CMakeLists.txt
index 286a1a841f..ac065fafb6 100644
--- a/src/components/interfaces/CMakeLists.txt
+++ b/src/components/interfaces/CMakeLists.txt
@@ -2,7 +2,7 @@ include_directories (
../utils/include/
../formatters/include
)
-
+
GenerateInterface("v4_protocol_v1_2_no_extra.xml" "NsSmartDeviceLinkRPC::V1" "sdlrpcv1")
GenerateInterface("MOBILE_API.xml" "mobile_apis" "sdlrpcv2")
@@ -48,4 +48,3 @@ IF (${HMI_DBUS_API})
add_library(HMI_API "${CMAKE_CURRENT_BINARY_DIR}/HMI_API_schema.cc")
ENDIF (${HMI_DBUS_API})
-add_dependencies(HMI_API Utils)
diff --git a/src/components/interfaces/HMI_API.xml b/src/components/interfaces/HMI_API.xml
index 332d1d2065..f9e98cbc7a 100644
--- a/src/components/interfaces/HMI_API.xml
+++ b/src/components/interfaces/HMI_API.xml
@@ -61,7 +61,6 @@
<element name="WARNINGS" value="21"/>
<element name="GENERIC_ERROR" value="22"/>
<element name="USER_DISALLOWED" value="23"/>
- <element name="TRUNCATED_DATA" value="24"/>
</enum>
<enum name="ButtonName">
@@ -1924,7 +1923,7 @@
</function>
<function name="UpdateAppList" messagetype="request">
<description>Issued by SDL to notify HMI about new applications registered.</description>
- <param name="applications" type="Common.HMIApplication" mandatory="true" array="true" minsize="0" maxsize="100"/>
+ <param name="applications" type="Common.HMIApplication" mandatory="true" array="true" minsize="1" maxsize="100"/>
</function>
<function name="UpdateAppList" messagetype="response">
</function>
@@ -2053,11 +2052,6 @@
<description>Specifies reason for exiting all apllications.</description>
</param>
</function>
- <function name="OnAwakeSDL" messagetype="notification">
- <description>
- Sender: HMI->SDL. Must be sent to return SDL to normal operation after 'Suspend' or 'LowVoltage' events
- </description>
- </function>
<function name="MixingAudioSupported" messagetype="request">
<description>Request from SDL to HMI to find out if the last one supports mixing audio (i.e. recording TTS command and playing audio).</description>
</function>
@@ -2069,9 +2063,6 @@
</function>
<function name="PlayTone" messagetype="notification">
<description>Sent by SDL to HMI to notify that the tone should be played.</description>
- <param name="appID" type="Integer" mandatory="true">
- <description>ID of the application that invoked this notification</description>
- </param>
</function>
<!-- Policies -->
@@ -2738,11 +2729,6 @@
<param name="language" type="Common.Language" mandatory="true">
<description>The language application wants to switch to.</description>
</param>
- <param name="appHMIType" type="Common.AppHMIType" minsize="1" maxsize="100" array="true" mandatory="false">
- <description>
- Sent when app's requested-during-registration AppHMIType is changed to different one due to Policies update. Contains the updated list of all allowed app's AppHMITypes.
- </description>
- </param>
<param name="appID" type="Integer" mandatory="true">
<description>ID of application that concerns this RPC.</description>
</param>
diff --git a/src/components/interfaces/MOBILE_API.xml b/src/components/interfaces/MOBILE_API.xml
index 4580edd940..fa0eedbde7 100644
--- a/src/components/interfaces/MOBILE_API.xml
+++ b/src/components/interfaces/MOBILE_API.xml
@@ -76,7 +76,7 @@
</element>
<element name="APPLICATION_NOT_REGISTERED">
<description>An command can not be executed because no application has been registered with RegisterApplication.</description>
- </element>
+ </element>
<element name="WRONG_LANGUAGE">
<description>
The requested language is currently not supported.
@@ -122,7 +122,7 @@
</element>
<element name="SAVED">
<description>The RPC (e.g. Slider) executed successfully and the user elected to save the current position / value.</description>
- </element>
+ </element>
<element name="INVALID_CERT">
<description>The certificate provided during authentication is invalid.</description>
</element>
@@ -296,7 +296,7 @@
<element name="KEYBOARD" />
<description>
This mode causes the interaction to immediately display a keyboard entry through the HMI.
- </description>
+ </description>
</enum>
<enum name="HMILevel">
@@ -404,7 +404,7 @@
<element name="INITIAL_JINGLE" />
<element name="LISTEN_JINGLE" />
<element name="POSITIVE_JINGLE" />
- <element name="NEGATIVE_JINGLE" />
+ <element name="NEGATIVE_JINGLE" />
</enum>
<enum name="SamplingRate">
@@ -559,7 +559,6 @@
<element name="MFD3" />
<element name="MFD4" />
<element name="MFD5" />
- <element name="GEN3_8-INCH" internal_name="GEN3_8_INCH" />
</enum>
<enum name="TextFieldName">
@@ -662,7 +661,7 @@
<element name="timeToDestination">
<description> Time to destination</description>
</element>
-
+
<element name="navigationText">
<description>Navigation text for UpdateTurnList.</description>
</element>
@@ -721,7 +720,7 @@
<element name="showConstantTBTNextTurnIcon">
<description>The secondary image field for ShowConstantTBT</description>
</element>
-
+
<element name="locationImage">
<description>The optional image of a destination / location</description>
</element>
@@ -902,7 +901,7 @@
</enum>
<struct name="Image">
- <param name="value" minlength="0" maxlength="65535" type="String">
+ <param name="value" minlength="0" maxlength="65535" type="String">
<description>Either the static hex icon value or the binary image file name identifier (sent by PutFile).</description>
</param>
<param name="imageType" type="ImageType">
@@ -990,7 +989,7 @@
</element>
<element name="MENUNAME">
<description>The property in-app menu name of setGlobalProperties</description>
- </element>
+ </element>
<element name="MENUICON">
<description>The property in-app menu icon of setGlobalProperties</description>
</element>
@@ -1070,7 +1069,7 @@
<element name="UNKNOWN">
</element>
<element name="FAULT">
- </element>
+ </element>
</enum>
<enum name="ComponentVolumeStatus">
@@ -1479,16 +1478,16 @@
<enum name="FileType">
<description>Enumeration listing possible file types.</description>
- <element name="GRAPHIC_BMP" />
- <element name="GRAPHIC_JPEG" />
+ <element name="GRAPHIC_BMP" />
+ <element name="GRAPHIC_JPEG" />
<element name="GRAPHIC_PNG" />
- <element name="AUDIO_WAVE" />
+ <element name="AUDIO_WAVE" />
<element name="AUDIO_MP3" />
<element name="AUDIO_AAC" />
<element name="BINARY" />
<element name="JSON" />
</enum>
-
+
<enum name="PowerModeQualificationStatus">
<description>Reflects the status of the current power mode qualification.</description>
<element name="POWER_MODE_UNDEFINED">
@@ -1830,7 +1829,7 @@
</param>
<param name="yCoord" type="Integer" mandatory="true">
</param>
- </struct>
+ </struct>
<struct name="TouchArea">
<param name="rotationAngle" type="Float" mandatory="false" minvalue="0" maxvalue="360">
@@ -1851,10 +1850,10 @@
<struct name="ScreenParams">
<param name="resolution" type="ImageResolution" mandatory="true">
<description>The resolution of the prescribed screen area.</description>
- </param>
+ </param>
<param name="touchEventAvailable" type="TouchEventCapabilities" mandatory="false">
- <description>Types of screen touch events available in screen area.</description>
- </param>
+ <description>Types of screen touch events available in screen area.</description>
+ </param>
</struct>
<enum name="PermissionStatus">
@@ -2035,12 +2034,12 @@
<description>Trim of the vehicle, e.g. SE</description>
</param>
</struct>
-
+
<enum name="KeyboardLayout">
<description>Enumeration listing possible keyboard layouts.</description>
<element name="QWERTY" />
<element name="QWERTZ" />
- <element name="AZERTY" />
+ <element name="AZERTY" />
</enum>
<enum name="KeyboardEvent" platform="MobileNav">
@@ -2048,59 +2047,60 @@
<element name="KEYPRESS" />
<element name="ENTRY_SUBMITTED" />
<element name="ENTRY_CANCELLED" />
- <element name="ENTRY_ABORTED" />
+ <element name="ENTRY_ABORTED" />
</enum>
<enum name="KeypressMode">
<description>Enumeration listing possible keyboard events.</description>
<element name="SINGLE_KEYPRESS">
- <description>Each keypress is individually sent as the user presses the keyboard keys.</description>
+ <description>Each keypress is individually sent as the user presses the keyboard keys.</description>
</element>
<element name="QUEUE_KEYPRESSES">
- <description>The keypresses are queued and a string is eventually sent once the user chooses to submit their entry.</description>
+ <description>The keypresses are queued and a string is eventually sent once the user chooses to submit their entry.</description>
</element>
<element name="RESEND_CURRENT_ENTRY">
- <description>The keypresses are queue and a string is sent each time the user presses a keyboard key; the string contains the entire current entry.</description>
+ <description>The keypresses are queue and a string is sent each time the user presses a keyboard key; the string contains the entire current entry.</description>
</element>
</enum>
-
+
<struct name="KeyboardProperties">
<description>Configuration of on-screen keyboard (if available).</description>
<param name="language" type="Language" mandatory="false">
<description>The keyboard language.</description>
- </param>
+ </param>
<param name="keyboardLayout" type="KeyboardLayout" mandatory="false" >
<description>Desired keyboard layout.</description>
- </param>
+ </param>
<param name="keypressMode" type="KeypressMode" mandatory="false" >
<description>
Desired keypress mode.
If omitted, this value will be set to RESEND_CURRENT_ENTRY.
</description>
- </param>
+ </param>
<param name="limitedCharacterList" type="String" maxlength="1" minsize="1" maxsize="100" array="true" mandatory="false">
<description>Array of keyboard characters to enable.</description>
<description>All omitted characters will be greyed out (disabled) on the keyboard.</description>
- <description>If omitted, the entire keyboard will be enabled.</description>
+ <description>If omitted, the entire keyboard will be enabled.</description>
</param>
-
+
<param name="autoCompleteText" type="String" maxlength="1000" mandatory="false">
<description>Allows an app to prepopulate the text field with a suggested or completed entry as the user types</description>
- </param>
+ </param>
</struct>
<enum name="RequestType">
<description>Enumeration listing possible asynchronous requests.</description>
- <element name="HTTP" />
+ <element name="HTTP" />
<element name="FILE_RESUME" />
- <element name="AUTH_REQUEST" />
- <element name="AUTH_CHALLENGE" />
+ <element name="AUTH_REQUEST" />
+ <element name="AUTH_CHALLENGE" />
<element name="AUTH_ACK" />
- <element name="PROPRIETARY" />
+ <element name="PROPRIETARY" />
+ <element name="LOCK_SCREEN_ICON_URL" />
</enum>
<enum name="AppHMIType">
@@ -2161,9 +2161,9 @@
<element name="ListFilesID" value="34" hexvalue="22" />
<element name="SetAppIconID" value="35" hexvalue="23" />
<element name="SetDisplayLayoutID" value="36" hexvalue="24" />
- <element name="DiagnosticMessageID" value="37" hexvalue="25" />
- <element name="SystemRequestID" value="38" hexvalue="26" />
- <element name="SendLocationID" value="39" hexvalue="27" />
+ <element name="DiagnosticMessageID" value="37" hexvalue="25" />
+ <element name="SystemRequestID" value="38" hexvalue="26" />
+ <element name="SendLocationID" value="39" hexvalue="27" />
@@ -2184,7 +2184,7 @@
<element name="OnAudioPassThruID" value="32777" hexvalue="8009" />
<element name="OnLanguageChangeID" value="32778" hexvalue="800A" />
<element name="OnKeyboardInputID" value="32779" hexvalue="800B" />
- <element name="OnTouchEventID" value="32780" hexvalue="800C" />
+ <element name="OnTouchEventID" value="32780" hexvalue="800C" />
<element name="OnSystemRequestID" value="32781" hexvalue="800D" />
<element name="OnHashChangeID" value="32782" hexvalue="800E" />
<!--
@@ -2192,7 +2192,7 @@
Range = 0x 0001 0000 - 0x 0001 7FFF
-->
-
+
<!--
Ford Specific Notifications
Range = 0x 0001 8000 - 0x 0001 FFFF
@@ -2255,7 +2255,7 @@
<param name="vrSynonyms" type="String" maxlength="40" minsize="1" maxsize="100" array="true" mandatory="false">
<description>
Defines an additional voice recognition command.
- May not interfere with any app name of previously registered applications and any predefined blacklist of words
+ May not interfere with any app name of previously registered applications and any predefined blacklist of words
(global commands)
Only characters from char set [@TODO: Create char set (character/hex value) for each ACM and refer to] are supported.
</description>
@@ -2292,7 +2292,7 @@
<description>
ID used to uniquely identify current state of all app data that can persist through connection cycles (e.g. ignition cycles).
This registered data (commands, submenus, choice sets, etc.) can be reestablished without needing to explicitly reregister each piece.
- If omitted, then the previous state of an app's commands, etc. will not be restored.
+ If omitted, then the previous state of an app's commands, etc. will not be restored.
</description>
</param>
<param name="deviceInfo" type="DeviceInfo" mandatory="false">
@@ -2326,7 +2326,7 @@
<element name="WRONG_LANGUAGE"/>
<element name="DISALLOWED"/>
<element name="WARNINGS"/>
- <element name="RESUME_FAILED"/>
+ <element name="RESUME_FAILED"/>
</param>
<param name="info" type="String" maxlength="1000" mandatory="false" platform="documentation">
@@ -2386,7 +2386,7 @@
<description>See PrerecordedSpeech</description>
</param>
- <param name="supportedDiagModes" type="Integer" minvalue="0" maxvalue="255" array="true" minsize="1" maxsize="100" mandatory="false">
+ <param name="supportedDiagModes" type="Integer" minvalue="0" maxvalue="255" array="true" minsize="1" maxsize="100" mandatory="false">
<description>
Specifies the white-list of supported diagnostic modes (0x00-0xFF) capable for DiagnosticMessage requests.
If a mode outside this list is requested, it will be rejected.
@@ -2463,14 +2463,14 @@
<param name="menuTitle" maxlength="500" type="String" mandatory="false">
<description>Optional text to label an app menu button (for certain touchscreen platforms).</description>
</param>
-
+
<param name="menuIcon" type="Image" mandatory="false">
<description>>Optional icon to draw on an app menu button (for certain touchscreen platforms).</description>
</param>
-
+
<param name="keyboardProperties" type="KeyboardProperties" mandatory="false">
<description>On-screen keybaord configuration (if available).</description>
- </param>
+ </param>
</function>
<function name="SetGlobalProperties" functionID="SetGlobalPropertiesID" messagetype="response">
@@ -2910,7 +2910,7 @@
If omitted, no tone is played.
</description>
</param>
-
+
<param name="progressIndicator" type="Boolean" mandatory="false" platform="MobileNav">
<description>
If supported on the given platform, the alert GUI will include some sort of animation indicating that loading of a feature is progressing. e.g. a spinning wheel or hourglass, etc.
@@ -3035,7 +3035,7 @@
<description>
Image struct determining whether static or dynamic secondary image to display in app.
If omitted on supported displays, the displayed secondary graphic shall not change.
- </description>
+ </description>
</param>
@@ -3392,7 +3392,7 @@
<param name="eCallInfo" type="Boolean" mandatory="false">
<description>Emergency Call notification and confirmation data</description>
</param>
- <param name="airbagStatus" type="Boolean" mandatory="false">
+ <param name="airbagStatus" type="Boolean" mandatory="false">
<description>The status of the air bags</description>
</param>
<param name="emergencyEvent" type="Boolean" mandatory="false">
@@ -3993,8 +3993,8 @@
<param name="success" type="Boolean" platform="documentation">
<description> true, if successful; false, if failed </description>
- </param>
-
+ </param>
+
<param name="resultCode" type="Result" platform="documentation">
<description>See Result</description>
<element name="SUCCESS"/>
@@ -4002,11 +4002,11 @@
<element name="OUT_OF_MEMORY"/>
<element name="TOO_MANY_PENDING_REQUESTS"/>
<element name="APPLICATION_NOT_REGISTERED"/>
- <element name="GENERIC_ERROR"/>
- <element name="REJECTED"/>
+ <element name="GENERIC_ERROR"/>
+ <element name="REJECTED"/>
<element name="DISALLOWED"/>
<element name="USER_DISALLOWED"/>
- <element name="TRUNCATED_DATA"/>
+ <element name="TRUNCATED_DATA"/>
</param>
<param name="info" type="String" maxlength="1000" mandatory="false" platform="documentation">
@@ -4028,7 +4028,7 @@
</param>
<param name="timeout" type="Integer" minvalue="1000" maxvalue="65535" defvalue="30000" mandatory="false">
<description>App defined timeout. Indicates how long of a timeout from the last action (i.e. scrolling message resets timeout).</description>
- </param>
+ </param>
<param name="softButtons" type="SoftButton" minsize="0" maxsize="8" array="true" mandatory="false">
<description>
App defined SoftButtons.
@@ -4088,7 +4088,7 @@
App defined timeout. Indicates how long of a timeout from the last action (i.e. sliding control resets timeout).
If omitted, the value is set to 10000.
</description>
- </param>
+ </param>
</function>
<function name="Slider" functionID="SliderID" messagetype="response">
@@ -4099,7 +4099,7 @@
<param name="resultCode" type="Result" platform="documentation">
<description>See Result</description>
<element name="SUCCESS"/>
- <element name="SAVED"/>
+ <element name="SAVED"/>
<element name="INVALID_DATA"/>
<element name="OUT_OF_MEMORY"/>
<element name="TOO_MANY_PENDING_REQUESTS"/>
@@ -4268,7 +4268,7 @@
</param>
<param name="vrSynonyms" type="String" maxlength="40" minsize="1" maxsize="100" array="true" mandatory="false">
<description>Request new VR synonyms registration</description>
- </param>
+ </param>
</function>
@@ -4345,20 +4345,20 @@
If omitted, the value will be set to false.
</description>
</param>
-
+
<param name="systemFile" type="Boolean" defvalue="false" mandatory="false">
<description>Indicates if the file is meant to be passed thru core to elsewhere on the system.
If set to TRUE, then the system will instead pass the data thru as it arrives to a predetermined area outside of core. If omitted, the value will be set to false.</description>
</param>
-
+
<param name="offset" type="Integer" minvalue="0" maxvalue="100000000000" mandatory="false">
- <description>Optional offset in bytes for resuming partial data chunks</description>
+ <description>Optional offset in bytes for resuming partial data chunks</description>
</param>
-
+
<param name="length" type="Integer" minvalue="0" maxvalue="100000000000" mandatory="false">
- <description>Optional length in bytes for resuming partial data chunks</description>
+ <description>Optional length in bytes for resuming partial data chunks</description>
</param>
-
+
</function>
<function name="PutFile" functionID="PutFileID" messagetype="response">
@@ -4560,7 +4560,7 @@
<element name="REJECTED"/>
<element name="UNSUPPORTED_REQUEST"/>
</param>
-
+
<param name="displayCapabilities" type="DisplayCapabilities" mandatory="false">
<description>See DisplayCapabilities</description>
</param>
@@ -4576,7 +4576,7 @@
<param name="presetBankCapabilities" type="PresetBankCapabilities" mandatory="false">
<description>If returned, the platform supports custom on-screen Presets; see PresetBankCapabilities.</description >
</param>
-
+
<param name="info" type="String" maxlength="1000" mandatory="false" platform="documentation">
<description>Provides additional human readable info regarding the result.</description>
</param>
@@ -4605,11 +4605,11 @@
<element name="TOO_MANY_PENDING_REQUESTS"/>
<element name="APPLICATION_NOT_REGISTERED"/>
<element name="GENERIC_ERROR"/>
- <element name="REJECTED"/>
- <element name="INVALID_CERT"/>
- <element name="EXPIRED_CERT"/>
+ <element name="REJECTED"/>
+ <element name="INVALID_CERT"/>
+ <element name="EXPIRED_CERT"/>
</param>
- </function>
+ </function>
<function name="SendLocation" functionID="SendLocationID" messagetype="request">
<param name="longitudeDegrees" type="Float" minvalue="-180" maxvalue="180" mandatory="true">
@@ -4619,27 +4619,27 @@
<param name="locationName" type="String" maxlength="500" mandatory="false">
<description>
Name / title of intended location
- </description>
+ </description>
</param>
<param name="locationDescription" type="String" maxlength="500" mandatory="false">
<description>
Description intended location / establishment (if applicable)
- </description>
+ </description>
</param>
<param name="addressLines" type="String" maxlength="500" minsize="0" maxsize="4" array="true" mandatory="false">
<description>
Location address (if applicable)
- </description>
+ </description>
</param>
<param name="phoneNumber" type="String" maxlength="500" mandatory="false">
<description>
Phone number of intended location / establishment (if applicable)
- </description>
+ </description>
</param>
<param name="locationImage" type="Image" mandatory="false">
<description>
Image / icon of intended location (if applicable and supported)
- </description>
+ </description>
</param>
</function>
@@ -4647,7 +4647,7 @@
<param name="success" type="Boolean" platform="documentation">
<description> true, if successful; false, if failed </description>
</param>
-
+
<param name="resultCode" type="Result" platform="documentation">
<description>See Result</description>
<element name="SUCCESS"/>
@@ -4656,10 +4656,10 @@
<element name="TOO_MANY_PENDING_REQUESTS"/>
<element name="APPLICATION_NOT_REGISTERED"/>
<element name="GENERIC_ERROR"/>
- <element name="REJECTED"/>
- <element name="UNSUPPORTED_RESOURCE"/>
- <element name="DISALLOWED"/>
- </param>
+ <element name="REJECTED"/>
+ <element name="UNSUPPORTED_RESOURCE"/>
+ <element name="DISALLOWED"/>
+ </param>
</function>
@@ -4835,13 +4835,13 @@
</function>
<function name="OnKeyboardInput" functionID="OnKeyboardInputID" messagetype="notification" platform="MobileNav">
-
+
<description>On-screen keyboard event.</description>
<description>Can be full string or individual keypresses depending on keyboard mode.</description>
-
+
<param name="event" type="KeyboardEvent" mandatory="true">
<description>On-screen keyboard input data.</description>
- </param>
+ </param>
<param name="data" type="String" maxlength="500" mandatory="false">
<description>On-screen keyboard input data.</description>
@@ -4873,14 +4873,14 @@
<description>Optional array of URL(s) for HTTP requests.
If blank, the binary data shall be forwarded to the app.
If not blank, the binary data shall be forwarded to the url(s) with a provided timeout in seconds.
- </description>
+ </description>
</param>
<param name="timeout" type="Integer" minvalue="0" maxvalue="2000000000" mandatory="false">
<description>
Optional timeout for HTTP requests
Required if a URL is provided
</description>
- </param>
+ </param>
<param name="fileType" type="FileType" mandatory="false">
<description>Optional file type (meant for HTTP file requests).</description>
</param>
@@ -4890,7 +4890,7 @@
<param name="length" type="Integer" minvalue="0" maxvalue="100000000000" mandatory="false">
<description>Optional length in bytes for resuming partial data chunks</description>
</param>
- </function>
+ </function>
<!-- ~~~~~~~~~~~~~~~~~~ -->
<!-- Ford Specific APIs -->
diff --git a/src/components/interfaces/QT_HMI_API.xml b/src/components/interfaces/QT_HMI_API.xml
index 948402067a..d6450b8346 100644
--- a/src/components/interfaces/QT_HMI_API.xml
+++ b/src/components/interfaces/QT_HMI_API.xml
@@ -56,7 +56,6 @@
<element name="WARNINGS" value="21"/>
<element name="GENERIC_ERROR" value="22"/>
<element name="USER_DISALLOWED" value="23"/>
- <element name="TRUNCATED_DATA" value="24"/>
</enum>
<enum name="ButtonName">
<description>Defines the hard (physical) and soft (touchscreen) buttons available from SYNC</description>
@@ -1816,7 +1815,7 @@
</function>
<function name="UpdateAppList" messagetype="request" provider="hmi">
<description>Issued by SDL to notify HMI about new applications registered.</description>
- <param name="applications" type="Common.HMIApplication" mandatory="true" array="true" minsize="0" maxsize="100"/>
+ <param name="applications" type="Common.HMIApplication" mandatory="true" array="true" minsize="1" maxsize="100"/>
</function>
<function name="UpdateAppList" messagetype="response">
</function>
@@ -1945,11 +1944,6 @@
<description>Specifies reason for exiting all apllications.</description>
</param>
</function>
- <function name="OnAwakeSDL" messagetype="notification">
- <description>
- Sender: HMI->SDL. Must be sent to return SDL to normal operation after 'Suspend' or 'LowVoltage' events
- </description>
- </function>
<function name="MixingAudioSupported" messagetype="request" provider="hmi">
<description>Request from SDL to HMI to find out if the last one supports mixing audio (i.e. recording TTS command and playing audio).</description>
</function>
@@ -1961,9 +1955,6 @@
</function>
<function name="PlayTone" messagetype="notification" provider="sdl">
<description>Sent by SDL to HMI to notify that the tone should be played.</description>
- <param name="appID" type="Integer" mandatory="true">
- <description>ID of the application that invoked this notification</description>
- </param>
</function>
<!-- Policies -->
<!-- SyncP RPC-->
@@ -2618,11 +2609,6 @@
<param name="language" type="Common.Language" mandatory="true">
<description>The language application wants to switch to.</description>
</param>
- <param name="appHMIType" type="Common.AppHMIType" minsize="1" maxsize="100" array="true" mandatory="false">
- <description>
- Sent when app's requested-during-registration AppHMIType is changed to different one due to Policies update. Contains the updated list of all allowed app's AppHMITypes.
- </description>
- </param>
<param name="appID" type="Integer" mandatory="true">
<description>ID of application that concerns this RPC.</description>
</param>
diff --git a/src/components/media_manager/include/media_manager/audio/a2dp_source_player_adapter.h b/src/components/media_manager/include/media_manager/audio/a2dp_source_player_adapter.h
index 15030866f4..ae41e19e62 100644
--- a/src/components/media_manager/include/media_manager/audio/a2dp_source_player_adapter.h
+++ b/src/components/media_manager/include/media_manager/audio/a2dp_source_player_adapter.h
@@ -1,34 +1,34 @@
-/*
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
+/**
+* Copyright (c) 2013, Ford Motor Company
+* All rights reserved.
+*
+* Redistribution and use in source and binary forms, with or without
+* modification, are permitted provided that the following conditions are met:
+*
+* Redistributions of source code must retain the above copyright notice, this
+* list of conditions and the following disclaimer.
+*
+* Redistributions in binary form must reproduce the above copyright notice,
+* this list of conditions and the following
+* disclaimer in the documentation and/or other materials provided with the
+* distribution.
+*
+* Neither the name of the Ford Motor Company nor the names of its contributors
+* may be used to endorse or promote products derived from this software
+* without specific prior written permission.
+*
+* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+* POSSIBILITY OF SUCH DAMAGE.
+*/
#ifndef SRC_COMPONENTS_MEDIA_MANAGER_INCLUDE_MEDIA_MANAGER_AUDIO_A2DP_SOURCE_PLAYER_ADAPTER_H_
#define SRC_COMPONENTS_MEDIA_MANAGER_INCLUDE_MEDIA_MANAGER_AUDIO_A2DP_SOURCE_PLAYER_ADAPTER_H_
@@ -36,7 +36,6 @@
#include <map>
#include "protocol/common.h"
#include "media_manager/media_adapter_impl.h"
-#include "utils/threads/thread_delegate.h"
namespace threads {
class Thread;
@@ -57,9 +56,7 @@ class A2DPSourcePlayerAdapter : public MediaAdapterImpl {
private:
class A2DPSourcePlayerThread;
- typedef std::pair<threads::Thread*, A2DPSourcePlayerThread*> Pair;
- typedef std::map<int32_t, Pair> SourcesMap;
- SourcesMap sources_;
+ std::map<int32_t, threads::Thread*> sources_;
DISALLOW_COPY_AND_ASSIGN(A2DPSourcePlayerAdapter);
};
diff --git a/src/components/media_manager/include/media_manager/audio/audio_stream_sender_thread.h b/src/components/media_manager/include/media_manager/audio/audio_stream_sender_thread.h
index b8b4c9d837..056ca96607 100644
--- a/src/components/media_manager/include/media_manager/audio/audio_stream_sender_thread.h
+++ b/src/components/media_manager/include/media_manager/audio/audio_stream_sender_thread.h
@@ -99,7 +99,7 @@ class AudioStreamSenderThread : public threads::ThreadDelegate {
*/
uint32_t session_key() const;
- void exitThreadMain();
+ bool exitThreadMain();
private:
/*
@@ -130,7 +130,6 @@ class AudioStreamSenderThread : public threads::ThreadDelegate {
static const int32_t kAudioPassThruTimeout;
-
DISALLOW_COPY_AND_ASSIGN(AudioStreamSenderThread);
};
} // namespace media_manager
diff --git a/src/components/media_manager/include/media_manager/audio/from_mic_recorder_adapter.h b/src/components/media_manager/include/media_manager/audio/from_mic_recorder_adapter.h
index 5aad2e24b6..7c5a0f2916 100644
--- a/src/components/media_manager/include/media_manager/audio/from_mic_recorder_adapter.h
+++ b/src/components/media_manager/include/media_manager/audio/from_mic_recorder_adapter.h
@@ -1,34 +1,34 @@
/*
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
+* Copyright (c) 2013, Ford Motor Company
+* All rights reserved.
+*
+* Redistribution and use in source and binary forms, with or without
+* modification, are permitted provided that the following conditions are met:
+*
+* Redistributions of source code must retain the above copyright notice, this
+* list of conditions and the following disclaimer.
+*
+* Redistributions in binary form must reproduce the above copyright notice,
+* this list of conditions and the following
+* disclaimer in the documentation and/or other materials provided with the
+* distribution.
+*
+* Neither the name of the Ford Motor Company nor the names of its contributors
+* may be used to endorse or promote products derived from this software
+* without specific prior written permission.
+*
+* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+* POSSIBILITY OF SUCH DAMAGE.
+*/
#ifndef SRC_COMPONENTS_MEDIA_MANAGER_INCLUDE_MEDIA_MANAGER_AUDIO_FROM_MIC_RECORDER_ADAPTER_H_
#define SRC_COMPONENTS_MEDIA_MANAGER_INCLUDE_MEDIA_MANAGER_AUDIO_FROM_MIC_RECORDER_ADAPTER_H_
diff --git a/src/components/media_manager/include/media_manager/audio/from_mic_to_file_recorder_thread.h b/src/components/media_manager/include/media_manager/audio/from_mic_to_file_recorder_thread.h
index 45743da689..ed40df6906 100644
--- a/src/components/media_manager/include/media_manager/audio/from_mic_to_file_recorder_thread.h
+++ b/src/components/media_manager/include/media_manager/audio/from_mic_to_file_recorder_thread.h
@@ -1,34 +1,34 @@
-/*
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
+/**
+* Copyright (c) 2013, Ford Motor Company
+* All rights reserved.
+*
+* Redistribution and use in source and binary forms, with or without
+* modification, are permitted provided that the following conditions are met:
+*
+* Redistributions of source code must retain the above copyright notice, this
+* list of conditions and the following disclaimer.
+*
+* Redistributions in binary form must reproduce the above copyright notice,
+* this list of conditions and the following
+* disclaimer in the documentation and/or other materials provided with the
+* distribution.
+*
+* Neither the name of the Ford Motor Company nor the names of its contributors
+* may be used to endorse or promote products derived from this software
+* without specific prior written permission.
+*
+* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+* POSSIBILITY OF SUCH DAMAGE.
+*/
#ifndef SRC_COMPONENTS_MEDIA_MANAGER_INCLUDE_MEDIA_MANAGER_AUDIO_FROM_MIC_TO_FILE_RECORDER_THREAD_H_
#define SRC_COMPONENTS_MEDIA_MANAGER_INCLUDE_MEDIA_MANAGER_AUDIO_FROM_MIC_TO_FILE_RECORDER_THREAD_H_
@@ -47,10 +47,10 @@ class FromMicToFileRecorderThread : public threads::ThreadDelegate {
public:
FromMicToFileRecorderThread(const std::string& output_file,
int32_t duration);
- ~FromMicToFileRecorderThread();
+
void threadMain();
- void exitThreadMain();
+ bool exitThreadMain();
void set_output_file(const std::string& output_file);
void set_record_duration(int32_t duration);
diff --git a/src/components/media_manager/include/media_manager/audio/pipe_audio_streamer_adapter.h b/src/components/media_manager/include/media_manager/audio/pipe_audio_streamer_adapter.h
index 9d25c2d82f..9e21594463 100644
--- a/src/components/media_manager/include/media_manager/audio/pipe_audio_streamer_adapter.h
+++ b/src/components/media_manager/include/media_manager/audio/pipe_audio_streamer_adapter.h
@@ -1,34 +1,34 @@
-/*
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
+/**
+* Copyright (c) 2013, Ford Motor Company
+* All rights reserved.
+*
+* Redistribution and use in source and binary forms, with or without
+* modification, are permitted provided that the following conditions are met:
+*
+* Redistributions of source code must retain the above copyright notice, this
+* list of conditions and the following disclaimer.
+*
+* Redistributions in binary form must reproduce the above copyright notice,
+* this list of conditions and the following
+* disclaimer in the documentation and/or other materials provided with the
+* distribution.
+*
+* Neither the name of the Ford Motor Company nor the names of its contributors
+* may be used to endorse or promote products derived from this software
+* without specific prior written permission.
+*
+* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+* POSSIBILITY OF SUCH DAMAGE.
+*/
#ifndef SRC_COMPONENTS_MEDIA_MANAGER_INCLUDE_MEDIA_MANAGER_AUDIO_PIPE_AUDIO_STREAMER_ADAPTER_H_
#define SRC_COMPONENTS_MEDIA_MANAGER_INCLUDE_MEDIA_MANAGER_AUDIO_PIPE_AUDIO_STREAMER_ADAPTER_H_
diff --git a/src/components/media_manager/include/media_manager/audio/socket_audio_streamer_adapter.h b/src/components/media_manager/include/media_manager/audio/socket_audio_streamer_adapter.h
index 7563b83eef..e9c4031ab5 100644
--- a/src/components/media_manager/include/media_manager/audio/socket_audio_streamer_adapter.h
+++ b/src/components/media_manager/include/media_manager/audio/socket_audio_streamer_adapter.h
@@ -1,34 +1,34 @@
-/*
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
+/**
+* Copyright (c) 2013, Ford Motor Company
+* All rights reserved.
+*
+* Redistribution and use in source and binary forms, with or without
+* modification, are permitted provided that the following conditions are met:
+*
+* Redistributions of source code must retain the above copyright notice, this
+* list of conditions and the following disclaimer.
+*
+* Redistributions in binary form must reproduce the above copyright notice,
+* this list of conditions and the following
+* disclaimer in the documentation and/or other materials provided with the
+* distribution.
+*
+* Neither the name of the Ford Motor Company nor the names of its contributors
+* may be used to endorse or promote products derived from this software
+* without specific prior written permission.
+*
+* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+* POSSIBILITY OF SUCH DAMAGE.
+*/
#ifndef SRC_COMPONENTS_MEDIA_MANAGER_INCLUDE_MEDIA_MANAGER_AUDIO_SOCKET_AUDIO_STREAMER_ADAPTER_H_
#define SRC_COMPONENTS_MEDIA_MANAGER_INCLUDE_MEDIA_MANAGER_AUDIO_SOCKET_AUDIO_STREAMER_ADAPTER_H_
diff --git a/src/components/media_manager/include/media_manager/media_manager.h b/src/components/media_manager/include/media_manager/media_manager.h
index 06ee806f5e..458481ca24 100644
--- a/src/components/media_manager/include/media_manager/media_manager.h
+++ b/src/components/media_manager/include/media_manager/media_manager.h
@@ -1,34 +1,34 @@
-/*
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
+/**
+* Copyright (c) 2013, Ford Motor Company
+* All rights reserved.
+*
+* Redistribution and use in source and binary forms, with or without
+* modification, are permitted provided that the following conditions are met:
+*
+* Redistributions of source code must retain the above copyright notice, this
+* list of conditions and the following disclaimer.
+*
+* Redistributions in binary form must reproduce the above copyright notice,
+* this list of conditions and the following
+* disclaimer in the documentation and/or other materials provided with the
+* distribution.
+*
+* Neither the name of the Ford Motor Company nor the names of its contributors
+* may be used to endorse or promote products derived from this software
+* without specific prior written permission.
+*
+* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+* POSSIBILITY OF SUCH DAMAGE.
+*/
#ifndef SRC_COMPONENTS_MEDIA_MANAGER_INCLUDE_MEDIA_MANAGER_MEDIA_MANAGER_H_
#define SRC_COMPONENTS_MEDIA_MANAGER_INCLUDE_MEDIA_MANAGER_MEDIA_MANAGER_H_
diff --git a/src/components/media_manager/include/media_manager/media_manager_impl.h b/src/components/media_manager/include/media_manager/media_manager_impl.h
index 0d1228fabc..94512a7ffe 100644
--- a/src/components/media_manager/include/media_manager/media_manager_impl.h
+++ b/src/components/media_manager/include/media_manager/media_manager_impl.h
@@ -1,34 +1,34 @@
/*
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
+* Copyright (c) 2013, Ford Motor Company
+* All rights reserved.
+*
+* Redistribution and use in source and binary forms, with or without
+* modification, are permitted provided that the following conditions are met:
+*
+* Redistributions of source code must retain the above copyright notice, this
+* list of conditions and the following disclaimer.
+*
+* Redistributions in binary form must reproduce the above copyright notice,
+* this list of conditions and the following
+* disclaimer in the documentation and/or other materials provided with the
+* distribution.
+*
+* Neither the name of the Ford Motor Company nor the names of its contributors
+* may be used to endorse or promote products derived from this software
+* without specific prior written permission.
+*
+* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+* POSSIBILITY OF SUCH DAMAGE.
+*/
#ifndef SRC_COMPONENTS_MEDIA_MANAGER_INCLUDE_MEDIA_MANAGER_MEDIA_MANAGER_IMPL_H_
#define SRC_COMPONENTS_MEDIA_MANAGER_INCLUDE_MEDIA_MANAGER_MEDIA_MANAGER_IMPL_H_
diff --git a/src/components/media_manager/include/media_manager/pipe_streamer_adapter.h b/src/components/media_manager/include/media_manager/pipe_streamer_adapter.h
index 8b0b514258..108403a43c 100644
--- a/src/components/media_manager/include/media_manager/pipe_streamer_adapter.h
+++ b/src/components/media_manager/include/media_manager/pipe_streamer_adapter.h
@@ -1,34 +1,34 @@
/*
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
+* Copyright (c) 2013, Ford Motor Company
+* All rights reserved.
+*
+* Redistribution and use in source and binary forms, with or without
+* modification, are permitted provided that the following conditions are met:
+*
+* Redistributions of source code must retain the above copyright notice, this
+* list of conditions and the following disclaimer.
+*
+* Redistributions in binary form must reproduce the above copyright notice,
+* this list of conditions and the following
+* disclaimer in the documentation and/or other materials provided with the
+* distribution.
+*
+* Neither the name of the Ford Motor Company nor the names of its contributors
+* may be used to endorse or promote products derived from this software
+* without specific prior written permission.
+*
+* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+* POSSIBILITY OF SUCH DAMAGE.
+*/
#ifndef SRC_COMPONENTS_MEDIA_MANAGER_INCLUDE_MEDIA_MANAGER_PIPE_STREAMER_ADAPTER_H_
#define SRC_COMPONENTS_MEDIA_MANAGER_INCLUDE_MEDIA_MANAGER_PIPE_STREAMER_ADAPTER_H_
@@ -82,7 +82,7 @@ class PipeStreamerAdapter : public MediaAdapterImpl {
/*
* @brief Function called by thread on exit
*/
- void exitThreadMain();
+ bool exitThreadMain();
/*
* @brief Opens pipe
diff --git a/src/components/media_manager/include/media_manager/socket_streamer_adapter.h b/src/components/media_manager/include/media_manager/socket_streamer_adapter.h
index 6f65e9e59f..afd78068b8 100644
--- a/src/components/media_manager/include/media_manager/socket_streamer_adapter.h
+++ b/src/components/media_manager/include/media_manager/socket_streamer_adapter.h
@@ -1,34 +1,34 @@
/*
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
+* Copyright (c) 2013, Ford Motor Company
+* All rights reserved.
+*
+* Redistribution and use in source and binary forms, with or without
+* modification, are permitted provided that the following conditions are met:
+*
+* Redistributions of source code must retain the above copyright notice, this
+* list of conditions and the following disclaimer.
+*
+* Redistributions in binary form must reproduce the above copyright notice,
+* this list of conditions and the following
+* disclaimer in the documentation and/or other materials provided with the
+* distribution.
+*
+* Neither the name of the Ford Motor Company nor the names of its contributors
+* may be used to endorse or promote products derived from this software
+* without specific prior written permission.
+*
+* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+* POSSIBILITY OF SUCH DAMAGE.
+*/
#ifndef SRC_COMPONENTS_MEDIA_MANAGER_INCLUDE_MEDIA_MANAGER_SOCKET_STREAMER_ADAPTER_H_
#define SRC_COMPONENTS_MEDIA_MANAGER_INCLUDE_MEDIA_MANAGER_SOCKET_STREAMER_ADAPTER_H_
@@ -85,7 +85,7 @@ class SocketStreamerAdapter : public MediaAdapterImpl {
/*
* Function called by thread on exit
*/
- void exitThreadMain();
+ bool exitThreadMain();
/*
* Checks if server is ready
@@ -125,8 +125,8 @@ class SocketStreamerAdapter : public MediaAdapterImpl {
int32_t socket_fd_;
bool is_ready_;
- Streamer* streamer_;
threads::Thread* thread_;
+ Streamer* streamer_;
MessageQueue<protocol_handler::RawMessagePtr> messages_;
DISALLOW_COPY_AND_ASSIGN(SocketStreamerAdapter);
};
diff --git a/src/components/media_manager/include/media_manager/video/pipe_video_streamer_adapter.h b/src/components/media_manager/include/media_manager/video/pipe_video_streamer_adapter.h
index ee90b8cd69..50328cc43c 100644
--- a/src/components/media_manager/include/media_manager/video/pipe_video_streamer_adapter.h
+++ b/src/components/media_manager/include/media_manager/video/pipe_video_streamer_adapter.h
@@ -1,34 +1,34 @@
-/*
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
+/**
+* Copyright (c) 2013, Ford Motor Company
+* All rights reserved.
+*
+* Redistribution and use in source and binary forms, with or without
+* modification, are permitted provided that the following conditions are met:
+*
+* Redistributions of source code must retain the above copyright notice, this
+* list of conditions and the following disclaimer.
+*
+* Redistributions in binary form must reproduce the above copyright notice,
+* this list of conditions and the following
+* disclaimer in the documentation and/or other materials provided with the
+* distribution.
+*
+* Neither the name of the Ford Motor Company nor the names of its contributors
+* may be used to endorse or promote products derived from this software
+* without specific prior written permission.
+*
+* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+* POSSIBILITY OF SUCH DAMAGE.
+*/
#ifndef SRC_COMPONENTS_MEDIA_MANAGER_INCLUDE_MEDIA_MANAGER_VIDEO_PIPE_VIDEO_STREAMER_ADAPTER_H_
#define SRC_COMPONENTS_MEDIA_MANAGER_INCLUDE_MEDIA_MANAGER_VIDEO_PIPE_VIDEO_STREAMER_ADAPTER_H_
diff --git a/src/components/media_manager/include/media_manager/video/socket_video_streamer_adapter.h b/src/components/media_manager/include/media_manager/video/socket_video_streamer_adapter.h
index fb6405d928..8752efc5ee 100644
--- a/src/components/media_manager/include/media_manager/video/socket_video_streamer_adapter.h
+++ b/src/components/media_manager/include/media_manager/video/socket_video_streamer_adapter.h
@@ -1,34 +1,34 @@
-/*
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
+/**
+* Copyright (c) 2013, Ford Motor Company
+* All rights reserved.
+*
+* Redistribution and use in source and binary forms, with or without
+* modification, are permitted provided that the following conditions are met:
+*
+* Redistributions of source code must retain the above copyright notice, this
+* list of conditions and the following disclaimer.
+*
+* Redistributions in binary form must reproduce the above copyright notice,
+* this list of conditions and the following
+* disclaimer in the documentation and/or other materials provided with the
+* distribution.
+*
+* Neither the name of the Ford Motor Company nor the names of its contributors
+* may be used to endorse or promote products derived from this software
+* without specific prior written permission.
+*
+* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+* POSSIBILITY OF SUCH DAMAGE.
+*/
#ifndef SRC_COMPONENTS_MEDIA_MANAGER_INCLUDE_MEDIA_MANAGER_VIDEO_SOCKET_VIDEO_STREAMER_ADAPTER_H_
#define SRC_COMPONENTS_MEDIA_MANAGER_INCLUDE_MEDIA_MANAGER_VIDEO_SOCKET_VIDEO_STREAMER_ADAPTER_H_
diff --git a/src/components/media_manager/include/media_manager/video/video_stream_to_file_adapter.h b/src/components/media_manager/include/media_manager/video/video_stream_to_file_adapter.h
index 64bdbb8278..4784014498 100644
--- a/src/components/media_manager/include/media_manager/video/video_stream_to_file_adapter.h
+++ b/src/components/media_manager/include/media_manager/video/video_stream_to_file_adapter.h
@@ -1,34 +1,34 @@
/*
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
+* Copyright (c) 2013, Ford Motor Company
+* All rights reserved.
+*
+* Redistribution and use in source and binary forms, with or without
+* modification, are permitted provided that the following conditions are met:
+*
+* Redistributions of source code must retain the above copyright notice, this
+* list of conditions and the following disclaimer.
+*
+* Redistributions in binary form must reproduce the above copyright notice,
+* this list of conditions and the following
+* disclaimer in the documentation and/or other materials provided with the
+* distribution.
+*
+* Neither the name of the Ford Motor Company nor the names of its contributors
+* may be used to endorse or promote products derived from this software
+* without specific prior written permission.
+*
+* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+* POSSIBILITY OF SUCH DAMAGE.
+*/
#ifndef SRC_COMPONENTS_MEDIA_MANAGER_INCLUDE_MEDIA_MANAGER_VIDEO_VIDEO_STREAM_TO_FILE_ADAPTER_H_
#define SRC_COMPONENTS_MEDIA_MANAGER_INCLUDE_MEDIA_MANAGER_VIDEO_VIDEO_STREAM_TO_FILE_ADAPTER_H_
@@ -80,7 +80,7 @@ class VideoStreamToFileAdapter : public MediaAdapterImpl {
/*
* @brief Function called by thread on exit
*/
- void exitThreadMain();
+ bool exitThreadMain();
/*
* @brief Opens file
diff --git a/src/components/media_manager/src/audio/a2dp_source_player_adapter.cc b/src/components/media_manager/src/audio/a2dp_source_player_adapter.cc
index b2495a2bfe..f8b0d9599b 100644
--- a/src/components/media_manager/src/audio/a2dp_source_player_adapter.cc
+++ b/src/components/media_manager/src/audio/a2dp_source_player_adapter.cc
@@ -1,34 +1,34 @@
-/*
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
+/**
+* Copyright (c) 2013, Ford Motor Company
+* All rights reserved.
+*
+* Redistribution and use in source and binary forms, with or without
+* modification, are permitted provided that the following conditions are met:
+*
+* Redistributions of source code must retain the above copyright notice, this
+* list of conditions and the following disclaimer.
+*
+* Redistributions in binary form must reproduce the above copyright notice,
+* this list of conditions and the following
+* disclaimer in the documentation and/or other materials provided with the
+* distribution.
+*
+* Neither the name of the Ford Motor Company nor the names of its contributors
+* may be used to endorse or promote products derived from this software
+* without specific prior written permission.
+*
+* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+* POSSIBILITY OF SUCH DAMAGE.
+*/
#include <net/if.h>
#include <pulse/simple.h>
#include <pulse/error.h>
@@ -37,6 +37,7 @@
#include "utils/threads/thread.h"
#include "media_manager/audio/a2dp_source_player_adapter.h"
#include "utils/lock.h"
+#include "utils/threads/thread_delegate.h"
#include "utils/logger.h"
#include "connection_handler/connection_handler_impl.h"
@@ -53,7 +54,7 @@ class A2DPSourcePlayerAdapter::A2DPSourcePlayerThread
void threadMain();
- void exitThreadMain();
+ bool exitThreadMain();
private:
// The Sample format to use
@@ -73,12 +74,13 @@ A2DPSourcePlayerAdapter::A2DPSourcePlayerAdapter() {
}
A2DPSourcePlayerAdapter::~A2DPSourcePlayerAdapter() {
- for (SourcesMap::iterator it = sources_.begin();
- sources_.end() != it; ++it) {
- Pair pair = *it;
- pair.first->join();
- delete pair.second;
- threads::DeleteThread(pair.first);
+ for (std::map<int32_t, threads::Thread*>::iterator it = sources_.begin();
+ sources_.end() != it;
+ ++it) {
+ if (NULL != it->second) {
+ it->second->stop();
+ threads::DeleteThread(it->second);
+ }
}
sources_.clear();
}
@@ -103,11 +105,10 @@ void A2DPSourcePlayerAdapter::StartActivity(int32_t application_key) {
// following format : "bluez_source.XX_XX_XX_XX_XX_XX" if needed
// before passing to the A2DPSourcePlayerThread constructor
- A2DPSourcePlayerThread* delegate =
- new A2DPSourcePlayerAdapter::A2DPSourcePlayerThread(mac_adddress);
threads::Thread* new_activity = threads::CreateThread(
- mac_adddress.c_str(), delegate);
- sources_[application_key] = Pair(new_activity, delegate);
+ mac_adddress.c_str(),
+ new A2DPSourcePlayerAdapter::A2DPSourcePlayerThread(mac_adddress));
+ sources_[application_key] = new_activity;
new_activity->start();
}
}
@@ -118,12 +119,19 @@ void A2DPSourcePlayerAdapter::StopActivity(int32_t application_key) {
if (application_key != current_application_) {
return;
}
- SourcesMap::iterator it = sources_.find(application_key);
+ std::map<int32_t, threads::Thread*>::iterator it =
+ sources_.find(application_key);
if (sources_.end() != it) {
- Pair pair = *it;
- pair.first->join();
- delete pair.second;
- threads::DeleteThread(pair.first);
+ LOG4CXX_DEBUG(logger_, "Source exists.");
+ if (NULL != it->second) {
+ LOG4CXX_DEBUG(logger_, "Sources thread was allocated");
+ if ((*it).second->is_running()) {
+ // Sources thread was started - stop it
+ LOG4CXX_DEBUG(logger_, "Sources thread was started - stop it");
+ (*it).second->stop();
+ threads::DeleteThread(it->second);
+ }
+ }
current_application_ = 0;
}
}
@@ -157,9 +165,10 @@ void A2DPSourcePlayerAdapter::A2DPSourcePlayerThread::freeStreams() {
}
}
-void A2DPSourcePlayerAdapter::A2DPSourcePlayerThread::exitThreadMain() {
+bool A2DPSourcePlayerAdapter::A2DPSourcePlayerThread::exitThreadMain() {
sync_primitives::AutoLock auto_lock(should_be_stopped_lock_);
should_be_stopped_ = true;
+ return true;
}
void A2DPSourcePlayerAdapter::A2DPSourcePlayerThread::threadMain() {
@@ -230,7 +239,6 @@ void A2DPSourcePlayerAdapter::A2DPSourcePlayerThread::threadMain() {
bool should_be_stopped;
{
- // FIXME (dchmerev@luxoft.com): Remove these insane blockings
sync_primitives::AutoLock auto_lock(should_be_stopped_lock_);
should_be_stopped = should_be_stopped_;
}
diff --git a/src/components/media_manager/src/audio/audio_stream_sender_thread.cc b/src/components/media_manager/src/audio/audio_stream_sender_thread.cc
index a52936e850..a3ef5af0bf 100644
--- a/src/components/media_manager/src/audio/audio_stream_sender_thread.cc
+++ b/src/components/media_manager/src/audio/audio_stream_sender_thread.cc
@@ -38,7 +38,6 @@
#include <string>
-#include <string.h>
#include "application_manager/application_manager_impl.h"
#include "application_manager/mobile_command_factory.h"
#include "application_manager/application_impl.h"
@@ -66,14 +65,14 @@ AudioStreamSenderThread::AudioStreamSenderThread(
shouldBeStoped_(false),
shouldBeStoped_lock_(),
shouldBeStoped_cv_() {
- LOG4CXX_AUTO_TRACE(logger_);
+ LOG4CXX_TRACE_ENTER(logger_);
}
AudioStreamSenderThread::~AudioStreamSenderThread() {
}
void AudioStreamSenderThread::threadMain() {
- LOG4CXX_AUTO_TRACE(logger_);
+ LOG4CXX_TRACE_ENTER(logger_);
offset_ = 0;
@@ -83,10 +82,11 @@ void AudioStreamSenderThread::threadMain() {
sendAudioChunkToMobile();
}
+ LOG4CXX_TRACE_EXIT(logger_);
}
void AudioStreamSenderThread::sendAudioChunkToMobile() {
- LOG4CXX_AUTO_TRACE(logger_);
+ LOG4CXX_TRACE_ENTER(logger_);
std::vector<uint8_t> binaryData;
std::vector<uint8_t>::iterator from;
@@ -112,10 +112,10 @@ void AudioStreamSenderThread::sendAudioChunkToMobile() {
LOG4CXX_INFO_EXT(logger_, "from != binaryData.end()");
offset_ = offset_ + to - from;
- std::vector<uint8_t> data(from, to);
application_manager::ApplicationManagerImpl::instance()->
- SendAudioPassThroughNotification(session_key_, data);
+ SendAudioPassThroughNotification(session_key_,
+ std::vector<uint8_t>(from, to));
binaryData.clear();
}
#if !defined(EXTENDED_MEDIA_MODE)
@@ -136,9 +136,10 @@ void AudioStreamSenderThread::setShouldBeStopped(bool should_stop) {
shouldBeStoped_cv_.NotifyOne();
}
-void AudioStreamSenderThread::exitThreadMain() {
- LOG4CXX_AUTO_TRACE(logger_);
+bool AudioStreamSenderThread::exitThreadMain() {
+ LOG4CXX_INFO(logger_, "AudioStreamSenderThread::exitThreadMain");
setShouldBeStopped(true);
+ return true;
}
uint32_t AudioStreamSenderThread::session_key() const {
diff --git a/src/components/media_manager/src/audio/from_mic_recorder_adapter.cc b/src/components/media_manager/src/audio/from_mic_recorder_adapter.cc
index 2c28e250bd..7559512a80 100644
--- a/src/components/media_manager/src/audio/from_mic_recorder_adapter.cc
+++ b/src/components/media_manager/src/audio/from_mic_recorder_adapter.cc
@@ -1,34 +1,34 @@
-/*
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
+/**
+* Copyright (c) 2013, Ford Motor Company
+* All rights reserved.
+*
+* Redistribution and use in source and binary forms, with or without
+* modification, are permitted provided that the following conditions are met:
+*
+* Redistributions of source code must retain the above copyright notice, this
+* list of conditions and the following disclaimer.
+*
+* Redistributions in binary form must reproduce the above copyright notice,
+* this list of conditions and the following
+* disclaimer in the documentation and/or other materials provided with the
+* distribution.
+*
+* Neither the name of the Ford Motor Company nor the names of its contributors
+* may be used to endorse or promote products derived from this software
+* without specific prior written permission.
+*
+* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+* POSSIBILITY OF SUCH DAMAGE.
+*/
#include <string>
#include "utils/threads/thread.h"
@@ -44,21 +44,18 @@ FromMicRecorderAdapter::FromMicRecorderAdapter()
: recorder_thread_(NULL)
, output_file_("default_recorded_audio.wav")
, kDefaultDuration(1000)
- , duration_(kDefaultDuration) {
-
+ , duration_(0) {
+ duration_ = kDefaultDuration;
}
FromMicRecorderAdapter::~FromMicRecorderAdapter() {
- LOG4CXX_AUTO_TRACE(logger_);
- if (recorder_thread_) {
- recorder_thread_->join();
- delete recorder_thread_->delegate();
- threads::DeleteThread(recorder_thread_);
- }
+ LOG4CXX_INFO(logger_, "FromMicRecorderAdapter::~FromMicRecorderAdapter()");
+ StopActivity(current_application_);
}
void FromMicRecorderAdapter::StartActivity(int32_t application_key) {
- LOG4CXX_DEBUG(logger_, "Start with app " << application_key);
+ LOG4CXX_INFO(logger_, "FromMicRecorderAdapter::StartActivity "
+ << application_key);
if (application_key == current_application_) {
LOG4CXX_WARN(logger_, "Running recording from mic for "
<< current_application_);
@@ -89,8 +86,9 @@ void FromMicRecorderAdapter::StopActivity(int32_t application_key) {
return;
}
- if (recorder_thread_) {
+ if (NULL != recorder_thread_) {
recorder_thread_->stop();
+ recorder_thread_ = NULL;
}
current_application_ = 0;
}
diff --git a/src/components/media_manager/src/audio/from_mic_recorder_listener.cc b/src/components/media_manager/src/audio/from_mic_recorder_listener.cc
index 2d305d98b0..06dce2d4ea 100644
--- a/src/components/media_manager/src/audio/from_mic_recorder_listener.cc
+++ b/src/components/media_manager/src/audio/from_mic_recorder_listener.cc
@@ -46,11 +46,9 @@ FromMicRecorderListener::FromMicRecorderListener(
}
FromMicRecorderListener::~FromMicRecorderListener() {
- LOG4CXX_AUTO_TRACE(logger_);
if (reader_) {
- reader_->join();
- delete reader_->delegate();
- threads::DeleteThread(reader_);
+ reader_->stop();
+ reader_ = NULL;
}
}
@@ -91,6 +89,7 @@ void FromMicRecorderListener::OnActivityEnded(int32_t application_key) {
}
if (reader_) {
reader_->stop();
+ reader_ = NULL;
}
current_application_ = 0;
}
diff --git a/src/components/media_manager/src/audio/from_mic_to_file_recorder_thread.cc b/src/components/media_manager/src/audio/from_mic_to_file_recorder_thread.cc
index a18299750f..181c8c61b3 100644
--- a/src/components/media_manager/src/audio/from_mic_to_file_recorder_thread.cc
+++ b/src/components/media_manager/src/audio/from_mic_to_file_recorder_thread.cc
@@ -1,34 +1,34 @@
/*
- * 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.
- */
+* Copyright (c) 2014, Ford Motor Company
+* All rights reserved.
+*
+* Redistribution and use in source and binary forms, with or without
+* modification, are permitted provided that the following conditions are met:
+*
+* Redistributions of source code must retain the above copyright notice, this
+* list of conditions and the following disclaimer.
+*
+* Redistributions in binary form must reproduce the above copyright notice,
+* this list of conditions and the following
+* disclaimer in the documentation and/or other materials provided with the
+* distribution.
+*
+* Neither the name of the Ford Motor Company nor the names of its contributors
+* may be used to endorse or promote products derived from this software
+* without specific prior written permission.
+*
+* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+* POSSIBILITY OF SUCH DAMAGE.
+*/
#include "media_manager/audio/from_mic_to_file_recorder_thread.h"
#include <unistd.h>
@@ -49,27 +49,19 @@ FromMicToFileRecorderThread::FromMicToFileRecorderThread(
tKey_("-t"),
sleepThread_(NULL),
outputFileName_(output_file) {
- LOG4CXX_AUTO_TRACE(logger_);
+ LOG4CXX_TRACE_ENTER(logger_);
set_record_duration(duration);
}
-FromMicToFileRecorderThread::~FromMicToFileRecorderThread() {
- LOG4CXX_AUTO_TRACE(logger_);
- if (sleepThread_) {
- sleepThread_->join();
- delete sleepThread_->delegate();
- threads::DeleteThread(sleepThread_);
- }
-}
-
void FromMicToFileRecorderThread::set_output_file(
const std::string& output_file) {
- LOG4CXX_AUTO_TRACE(logger_);
+ LOG4CXX_TRACE_ENTER(logger_);
+
outputFileName_ = output_file;
}
void FromMicToFileRecorderThread::set_record_duration(int32_t duration) {
- LOG4CXX_AUTO_TRACE(logger_);
+ LOG4CXX_TRACE_ENTER(logger_);
std::stringstream stringStream;
stringStream << duration / 1000;
@@ -77,7 +69,7 @@ void FromMicToFileRecorderThread::set_record_duration(int32_t duration) {
}
void FromMicToFileRecorderThread::initArgs() {
- LOG4CXX_AUTO_TRACE(logger_);
+ LOG4CXX_TRACE_ENTER(logger_);
argv_ = new gchar*[argc_];
@@ -95,7 +87,7 @@ void FromMicToFileRecorderThread::initArgs() {
}
void FromMicToFileRecorderThread::threadMain() {
- LOG4CXX_AUTO_TRACE(logger_);
+ LOG4CXX_TRACE_ENTER(logger_);
{
sync_primitives::AutoLock auto_lock(stopFlagLock_);
@@ -189,7 +181,6 @@ void FromMicToFileRecorderThread::threadMain() {
bool shouldBeStoped;
{
- // FIXME(dchmerev@luxoft.com):
sync_primitives::AutoLock auto_lock(stopFlagLock_);
shouldBeStoped = shouldBeStoped_;
}
@@ -242,8 +233,8 @@ void FromMicToFileRecorderThread::SleepThreadDelegate::threadMain() {
}
}
-void FromMicToFileRecorderThread::exitThreadMain() {
- LOG4CXX_AUTO_TRACE(logger_);
+bool FromMicToFileRecorderThread::exitThreadMain() {
+ LOG4CXX_TRACE_ENTER(logger_);
if (NULL != loop) {
if (g_main_loop_is_running(loop)) {
@@ -252,14 +243,20 @@ void FromMicToFileRecorderThread::exitThreadMain() {
}
}
- if (sleepThread_) {
- LOG4CXX_DEBUG(logger_, "Stop sleep thread\n");
+ if (NULL != sleepThread_) {
+ LOG4CXX_TRACE(logger_, "Stop sleep thread\n");
sleepThread_->stop();
+ threads::DeleteThread(sleepThread_);
+ sleepThread_ = NULL;
}
LOG4CXX_TRACE(logger_, "Set should be stopped flag\n");
- sync_primitives::AutoLock auto_lock(stopFlagLock_);
- shouldBeStoped_ = true;
+ {
+ sync_primitives::AutoLock auto_lock(stopFlagLock_);
+ shouldBeStoped_ = true;
+ }
+
+ return true;
}
} // namespace media_manager
diff --git a/src/components/media_manager/src/audio/pipe_audio_streamer_adapter.cc b/src/components/media_manager/src/audio/pipe_audio_streamer_adapter.cc
index 4c6c8a2bb7..5faebf93d5 100644
--- a/src/components/media_manager/src/audio/pipe_audio_streamer_adapter.cc
+++ b/src/components/media_manager/src/audio/pipe_audio_streamer_adapter.cc
@@ -1,4 +1,4 @@
-/*
+/**
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
@@ -39,7 +39,7 @@ namespace media_manager {
CREATE_LOGGERPTR_GLOBAL(logger, "PipeAudioStreamerAdapter")
PipeAudioStreamerAdapter::PipeAudioStreamerAdapter() {
- LOG4CXX_AUTO_TRACE(logger);
+ LOG4CXX_INFO(logger, "PipeAudioStreamerAdapter::PipeAudioStreamerAdapter");
named_pipe_path_ = profile::Profile::instance()->named_audio_pipe_path();
Init();
diff --git a/src/components/media_manager/src/audio/socket_audio_streamer_adapter.cc b/src/components/media_manager/src/audio/socket_audio_streamer_adapter.cc
index dfb15e2079..eb93032e42 100644
--- a/src/components/media_manager/src/audio/socket_audio_streamer_adapter.cc
+++ b/src/components/media_manager/src/audio/socket_audio_streamer_adapter.cc
@@ -1,4 +1,4 @@
-/*
+/**
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
@@ -39,7 +39,7 @@ namespace media_manager {
CREATE_LOGGERPTR_GLOBAL(logger, "SocketAudioStreamerAdapter")
SocketAudioStreamerAdapter::SocketAudioStreamerAdapter() {
- LOG4CXX_AUTO_TRACE(logger);
+ LOG4CXX_INFO(logger, "SocketAudioStreamerAdapter::SocketAudioStreamerAdapter");
port_ = profile::Profile::instance()->audio_streaming_port();
ip_ = profile::Profile::instance()->server_address();
diff --git a/src/components/media_manager/src/media_adapter_impl.cc b/src/components/media_manager/src/media_adapter_impl.cc
index 23afe4543e..1a52b003ff 100644
--- a/src/components/media_manager/src/media_adapter_impl.cc
+++ b/src/components/media_manager/src/media_adapter_impl.cc
@@ -1,34 +1,34 @@
-/*
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
+/**
+* Copyright (c) 2013, Ford Motor Company
+* All rights reserved.
+*
+* Redistribution and use in source and binary forms, with or without
+* modification, are permitted provided that the following conditions are met:
+*
+* Redistributions of source code must retain the above copyright notice, this
+* list of conditions and the following disclaimer.
+*
+* Redistributions in binary form must reproduce the above copyright notice,
+* this list of conditions and the following
+* disclaimer in the documentation and/or other materials provided with the
+* distribution.
+*
+* Neither the name of the Ford Motor Company nor the names of its contributors
+* may be used to endorse or promote products derived from this software
+* without specific prior written permission.
+*
+* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+* POSSIBILITY OF SUCH DAMAGE.
+*/
#include "media_manager/media_adapter_impl.h"
#include "utils/logger.h"
@@ -46,12 +46,12 @@ MediaAdapterImpl::~MediaAdapterImpl() {
}
void MediaAdapterImpl::AddListener(const MediaListenerPtr& listener) {
- LOG4CXX_AUTO_TRACE(logger_);
+ LOG4CXX_INFO(logger_, "MediaAdapterImpl::AddListener");
media_listeners_.insert(listener);
}
void MediaAdapterImpl::RemoveListener(const MediaListenerPtr& listener) {
- LOG4CXX_AUTO_TRACE(logger_);
+ LOG4CXX_INFO(logger_, "MediaAdapterImpl::RemoveListener");
media_listeners_.erase(listener);
}
diff --git a/src/components/media_manager/src/media_manager_impl.cc b/src/components/media_manager/src/media_manager_impl.cc
index d69ff56368..e8156795b1 100644
--- a/src/components/media_manager/src/media_manager_impl.cc
+++ b/src/components/media_manager/src/media_manager_impl.cc
@@ -1,34 +1,34 @@
-/*
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
+/**
+* Copyright (c) 2013, Ford Motor Company
+* All rights reserved.
+*
+* Redistribution and use in source and binary forms, with or without
+* modification, are permitted provided that the following conditions are met:
+*
+* Redistributions of source code must retain the above copyright notice, this
+* list of conditions and the following disclaimer.
+*
+* Redistributions in binary form must reproduce the above copyright notice,
+* this list of conditions and the following
+* disclaimer in the documentation and/or other materials provided with the
+* distribution.
+*
+* Neither the name of the Ford Motor Company nor the names of its contributors
+* may be used to endorse or promote products derived from this software
+* without specific prior written permission.
+*
+* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+* POSSIBILITY OF SUCH DAMAGE.
+*/
#include "config_profile/profile.h"
#include "media_manager/media_manager_impl.h"
@@ -133,14 +133,14 @@ void MediaManagerImpl::Init() {
}
void MediaManagerImpl::PlayA2DPSource(int32_t application_key) {
- LOG4CXX_AUTO_TRACE(logger_);
+ LOG4CXX_INFO(logger_, "MediaManagerImpl::PlayA2DPSource");
if (a2dp_player_) {
a2dp_player_->StartActivity(application_key);
}
}
void MediaManagerImpl::StopA2DPSource(int32_t application_key) {
- LOG4CXX_AUTO_TRACE(logger_);
+ LOG4CXX_INFO(logger_, "MediaManagerImpl::StopA2DPSource");
if (a2dp_player_) {
a2dp_player_->StopActivity(application_key);
}
@@ -200,7 +200,7 @@ void MediaManagerImpl::StartMicrophoneRecording(
}
void MediaManagerImpl::StopMicrophoneRecording(int32_t application_key) {
- LOG4CXX_AUTO_TRACE(logger_);
+ LOG4CXX_INFO(logger_, "MediaManagerImpl::StopMicrophoneRecording");
#if defined(EXTENDED_MEDIA_MODE)
if (from_mic_recorder_) {
from_mic_recorder_->StopActivity(application_key);
@@ -212,7 +212,7 @@ void MediaManagerImpl::StopMicrophoneRecording(int32_t application_key) {
}
void MediaManagerImpl::StartVideoStreaming(int32_t application_key) {
- LOG4CXX_AUTO_TRACE(logger_);
+ LOG4CXX_INFO(logger_, "MediaManagerImpl::StartVideoStreaming");
if (video_streamer_) {
if (!video_stream_active_) {
@@ -224,7 +224,7 @@ void MediaManagerImpl::StartVideoStreaming(int32_t application_key) {
}
void MediaManagerImpl::StopVideoStreaming(int32_t application_key) {
- LOG4CXX_AUTO_TRACE(logger_);
+ LOG4CXX_INFO(logger_, "MediaManagerImpl::StopVideoStreaming");
if (video_streamer_) {
video_stream_active_ = false;
application_manager::MessageHelper::SendNaviStopStream(application_key);
@@ -233,7 +233,7 @@ void MediaManagerImpl::StopVideoStreaming(int32_t application_key) {
}
void MediaManagerImpl::StartAudioStreaming(int32_t application_key) {
- LOG4CXX_AUTO_TRACE(logger_);
+ LOG4CXX_INFO(logger_, "MediaManagerImpl::StartAudioStreaming");
if (audio_streamer_) {
if (!audio_stream_active_) {
@@ -245,7 +245,7 @@ void MediaManagerImpl::StartAudioStreaming(int32_t application_key) {
}
void MediaManagerImpl::StopAudioStreaming(int32_t application_key) {
- LOG4CXX_AUTO_TRACE(logger_);
+ LOG4CXX_INFO(logger_, "MediaManagerImpl::StopAudioStreaming");
if (audio_streamer_) {
audio_stream_active_ = false;
application_manager::MessageHelper::SendAudioStopStream(application_key);
diff --git a/src/components/media_manager/src/pipe_streamer_adapter.cc b/src/components/media_manager/src/pipe_streamer_adapter.cc
index c1a0e1fa20..43f0d71530 100644
--- a/src/components/media_manager/src/pipe_streamer_adapter.cc
+++ b/src/components/media_manager/src/pipe_streamer_adapter.cc
@@ -41,34 +41,32 @@
namespace media_manager {
-CREATE_LOGGERPTR_GLOBAL(logger_, "PipeStreamerAdapter")
+CREATE_LOGGERPTR_GLOBAL(logger, "PipeStreamerAdapter")
PipeStreamerAdapter::PipeStreamerAdapter()
: is_ready_(false),
- thread_(threads::CreateThread("PipeStreamer", new Streamer(this))),
+ thread_(NULL),
messages_() {
- LOG4CXX_AUTO_TRACE(logger_);
+ LOG4CXX_INFO(logger, "PipeStreamerAdapter::PipeStreamerAdapter");
}
PipeStreamerAdapter::~PipeStreamerAdapter() {
- LOG4CXX_AUTO_TRACE(logger_);
+ LOG4CXX_INFO(logger, "PipeStreamerAdapter::~PipeStreamerAdapter");
if ((0 != current_application_ ) && (is_ready_)) {
StopActivity(current_application_);
}
- thread_->join();
- delete thread_->delegate();
- threads::DeleteThread(thread_);
+ thread_->stop();
}
void PipeStreamerAdapter::SendData(
int32_t application_key,
const ::protocol_handler::RawMessagePtr message) {
- LOG4CXX_AUTO_TRACE(logger_);
+ LOG4CXX_INFO(logger, "PipeStreamerAdapter::SendData");
if (application_key != current_application_) {
- LOG4CXX_WARN(logger_, "Wrong application " << application_key);
+ LOG4CXX_WARN(logger, "Wrong application " << application_key);
return;
}
@@ -78,10 +76,10 @@ void PipeStreamerAdapter::SendData(
}
void PipeStreamerAdapter::StartActivity(int32_t application_key) {
- LOG4CXX_AUTO_TRACE(logger_);
+ LOG4CXX_INFO(logger, "PipeStreamerAdapter::StartActivity");
if (application_key == current_application_) {
- LOG4CXX_WARN(logger_, "Already started activity for " << application_key);
+ LOG4CXX_WARN(logger, "Already started activity for " << application_key);
return;
}
@@ -94,14 +92,14 @@ void PipeStreamerAdapter::StartActivity(int32_t application_key) {
(*it)->OnActivityStarted(application_key);
}
- LOG4CXX_DEBUG(logger_, "Pipe was opened for writing " << named_pipe_path_);
+ LOG4CXX_TRACE(logger, "Pipe was opened for writing " << named_pipe_path_);
}
void PipeStreamerAdapter::StopActivity(int32_t application_key) {
- LOG4CXX_AUTO_TRACE(logger_);
+ LOG4CXX_INFO(logger, "PipeStreamerAdapter::StopActivity");
if (application_key != current_application_) {
- LOG4CXX_WARN(logger_, "Not performing activity for " << application_key);
+ LOG4CXX_WARN(logger, "Not performing activity for " << application_key);
return;
}
@@ -115,19 +113,18 @@ void PipeStreamerAdapter::StopActivity(int32_t application_key) {
}
}
-bool PipeStreamerAdapter::is_app_performing_activity( int32_t application_key) {
+bool PipeStreamerAdapter::is_app_performing_activity(
+ int32_t application_key) {
return (application_key == current_application_);
}
void PipeStreamerAdapter::Init() {
- LOG4CXX_AUTO_TRACE(logger_);
- if (thread_->is_running()) {
- thread_->stop();
- thread_->join();
+ if (!thread_) {
+ LOG4CXX_INFO(logger, "Create and start sending thread");
+ thread_ = threads::CreateThread("PipeStreamer", new Streamer(this));
+ const size_t kStackSize = 16384;
+ thread_->startWithOptions(threads::ThreadOptions(kStackSize));
}
- LOG4CXX_DEBUG(logger_, "Start sending thread");
- const size_t kStackSize = 16384;
- thread_->start(threads::ThreadOptions(kStackSize));
}
PipeStreamerAdapter::Streamer::Streamer(
@@ -142,7 +139,7 @@ PipeStreamerAdapter::Streamer::~Streamer() {
}
void PipeStreamerAdapter::Streamer::threadMain() {
- LOG4CXX_AUTO_TRACE(logger_);
+ LOG4CXX_INFO(logger, "Streamer::threadMain");
open();
@@ -150,7 +147,7 @@ void PipeStreamerAdapter::Streamer::threadMain() {
while (!server_->messages_.empty()) {
::protocol_handler::RawMessagePtr msg = server_->messages_.pop();
if (!msg) {
- LOG4CXX_ERROR(logger_, "Null pointer message");
+ LOG4CXX_ERROR(logger, "Null pointer message");
continue;
}
@@ -158,7 +155,7 @@ void PipeStreamerAdapter::Streamer::threadMain() {
msg.get()->data_size());
if (ret == -1) {
- LOG4CXX_ERROR(logger_, "Failed writing data to pipe "
+ LOG4CXX_ERROR(logger, "Failed writing data to pipe "
<< server_->named_pipe_path_);
std::set<MediaListenerPtr>::iterator it =
@@ -167,14 +164,14 @@ void PipeStreamerAdapter::Streamer::threadMain() {
(*it)->OnErrorReceived(server_->current_application_, -1);
}
} else if (static_cast<uint32_t>(ret) != msg.get()->data_size()) {
- LOG4CXX_WARN(logger_, "Couldn't write all the data to pipe "
+ LOG4CXX_WARN(logger, "Couldn't write all the data to pipe "
<< server_->named_pipe_path_);
}
static int32_t messsages_for_session = 0;
++messsages_for_session;
- LOG4CXX_DEBUG(logger_, "Handling map streaming message. This is "
+ LOG4CXX_INFO(logger, "Handling map streaming message. This is "
<< messsages_for_session << " the message for "
<< server_->current_application_);
std::set<MediaListenerPtr>::iterator it =
@@ -189,14 +186,16 @@ void PipeStreamerAdapter::Streamer::threadMain() {
close();
}
-void PipeStreamerAdapter::Streamer::exitThreadMain() {
- LOG4CXX_AUTO_TRACE(logger_);
+bool PipeStreamerAdapter::Streamer::exitThreadMain() {
+ LOG4CXX_INFO(logger, "Streamer::exitThreadMain");
stop_flag_ = true;
server_->messages_.Shutdown();
+ return false;
}
void PipeStreamerAdapter::Streamer::open() {
- LOG4CXX_AUTO_TRACE(logger_);
+
+ LOG4CXX_INFO(logger, "Streamer::open() " << server_->named_pipe_path_.c_str());
DCHECK(file_system::CreateDirectoryRecursively(
profile::Profile::instance()->app_storage_folder()));
@@ -204,23 +203,22 @@ void PipeStreamerAdapter::Streamer::open() {
if ((mkfifo(server_->named_pipe_path_.c_str(),
S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH) < 0)
&& (errno != EEXIST)) {
- LOG4CXX_ERROR(logger_, "Cannot create pipe " << server_->named_pipe_path_);
+ LOG4CXX_ERROR(logger, "Cannot create pipe " << server_->named_pipe_path_);
return;
}
pipe_fd_ = ::open(server_->named_pipe_path_.c_str(), O_RDWR, 0);
if (-1 == pipe_fd_) {
- LOG4CXX_ERROR(logger_, "Cannot open pipe for writing "
+ LOG4CXX_ERROR(logger, "Cannot open pipe for writing "
<< server_->named_pipe_path_);
return;
}
- LOG4CXX_DEBUG(logger_, "Pipe " << server_->named_pipe_path_
+ LOG4CXX_TRACE(logger, "Pipe " << server_->named_pipe_path_
<< " was successfully created");
}
void PipeStreamerAdapter::Streamer::close() {
- LOG4CXX_AUTO_TRACE(logger_);
::close(pipe_fd_);
unlink(server_->named_pipe_path_.c_str());
}
diff --git a/src/components/media_manager/src/socket_streamer_adapter.cc b/src/components/media_manager/src/socket_streamer_adapter.cc
index 4f3a805b45..c6da8c7a75 100644
--- a/src/components/media_manager/src/socket_streamer_adapter.cc
+++ b/src/components/media_manager/src/socket_streamer_adapter.cc
@@ -1,4 +1,4 @@
-/*
+/**
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
@@ -51,16 +51,14 @@ CREATE_LOGGERPTR_GLOBAL(logger, "SocketStreamerAdapter")
SocketStreamerAdapter::SocketStreamerAdapter()
: socket_fd_(0),
is_ready_(false),
- streamer_(new Streamer(this)),
- thread_(threads::CreateThread("SocketStreamer", streamer_)),
+ thread_(NULL),
+ streamer_(NULL),
messages_() {
}
SocketStreamerAdapter::~SocketStreamerAdapter() {
- LOG4CXX_AUTO_TRACE(logger);
- thread_->join();
- delete streamer_;
- threads::DeleteThread(thread_);
+ thread_->stop();
+ streamer_ = NULL;
}
void SocketStreamerAdapter::StartActivity(int32_t application_key) {
@@ -112,9 +110,15 @@ bool SocketStreamerAdapter::is_app_performing_activity(
}
void SocketStreamerAdapter::Init() {
- LOG4CXX_DEBUG(logger, "Start sending thread");
- const size_t kStackSize = 16384;
- thread_->start(threads::ThreadOptions(kStackSize));
+ if (!thread_) {
+ LOG4CXX_INFO(logger, "Create and start sending thread");
+ streamer_ = new Streamer(this);
+ thread_ = threads::CreateThread("SocketStreamer", streamer_);
+ const size_t kStackSize = 16384;
+ thread_->startWithOptions(threads::ThreadOptions(kStackSize));
+ } else {
+ LOG4CXX_WARN(logger, "thread is already exist");
+ }
}
void SocketStreamerAdapter::SendData(
@@ -197,16 +201,19 @@ void SocketStreamerAdapter::Streamer::threadMain() {
LOG4CXX_TRACE(logger,"exit " << this);
}
-void SocketStreamerAdapter::Streamer::exitThreadMain() {
+bool SocketStreamerAdapter::Streamer::exitThreadMain() {
LOG4CXX_TRACE(logger,"enter " << this);
stop_flag_ = true;
stop();
server_->messages_.Shutdown();
+ //exith threadMainshould whait while threadMain will be finished
if (server_->socket_fd_ != -1) {
shutdown(server_->socket_fd_, SHUT_RDWR);
close(server_->socket_fd_);
}
+ sync_primitives::AutoLock auto_lock(thread_lock);
LOG4CXX_TRACE(logger,"exit " << this);
+ return true;
}
void SocketStreamerAdapter::Streamer::start() {
@@ -246,7 +253,7 @@ void SocketStreamerAdapter::Streamer::start() {
void SocketStreamerAdapter::Streamer::stop() {
LOG4CXX_TRACE(logger,"enter " << this);
if (0 == new_socket_fd_) {
- LOG4CXX_ERROR(logger, "Client Socket does not exist: ");
+ LOG4CXX_ERROR(logger, "Client Socket does not exits: ");
} else if (-1 == shutdown(new_socket_fd_, SHUT_RDWR)) {
LOG4CXX_ERROR(logger, "Unable to shutdown socket " << strerror(errno));
} else if (-1 == ::close(new_socket_fd_)) {
diff --git a/src/components/media_manager/src/streamer_listener.cc b/src/components/media_manager/src/streamer_listener.cc
index 613744c768..17306f486a 100644
--- a/src/components/media_manager/src/streamer_listener.cc
+++ b/src/components/media_manager/src/streamer_listener.cc
@@ -59,7 +59,7 @@ void StreamerListener::OnErrorReceived(
}
void StreamerListener::OnActivityStarted(int32_t application_key) {
- LOG4CXX_AUTO_TRACE(logger_);
+ LOG4CXX_INFO(logger_, "StreamerListener::OnActivityStarted");
if (current_application_ == application_key) {
LOG4CXX_WARN(logger_, "Already performing activity for "
<< application_key);
@@ -69,7 +69,7 @@ void StreamerListener::OnActivityStarted(int32_t application_key) {
}
void StreamerListener::OnActivityEnded(int32_t application_key) {
- LOG4CXX_AUTO_TRACE(logger_);
+ LOG4CXX_INFO(logger_, "StreamerListener::OnActivityEnded");
if (current_application_ != application_key) {
LOG4CXX_WARN(logger_, "Already not performing activity for "
<< application_key);
diff --git a/src/components/media_manager/src/video/pipe_video_streamer_adapter.cc b/src/components/media_manager/src/video/pipe_video_streamer_adapter.cc
index 77abddd57c..fc0668b8d3 100644
--- a/src/components/media_manager/src/video/pipe_video_streamer_adapter.cc
+++ b/src/components/media_manager/src/video/pipe_video_streamer_adapter.cc
@@ -1,4 +1,4 @@
-/*
+/**
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
@@ -38,7 +38,7 @@ namespace media_manager {
CREATE_LOGGERPTR_GLOBAL(logger, "PipeVideoStreamerAdapter")
PipeVideoStreamerAdapter::PipeVideoStreamerAdapter() {
- LOG4CXX_AUTO_TRACE(logger);
+ LOG4CXX_INFO(logger, "PipeVideoStreamerAdapter::PipeVideoStreamerAdapter");
named_pipe_path_ = profile::Profile::instance()->named_video_pipe_path();
Init();
diff --git a/src/components/media_manager/src/video/socket_video_streamer_adapter.cc b/src/components/media_manager/src/video/socket_video_streamer_adapter.cc
index d4b3e0812b..9fe16d6e93 100644
--- a/src/components/media_manager/src/video/socket_video_streamer_adapter.cc
+++ b/src/components/media_manager/src/video/socket_video_streamer_adapter.cc
@@ -1,4 +1,4 @@
-/*
+/**
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
@@ -39,7 +39,7 @@ namespace media_manager {
CREATE_LOGGERPTR_GLOBAL(logger, "SocketVideoStreamerAdapter")
SocketVideoStreamerAdapter::SocketVideoStreamerAdapter() {
- LOG4CXX_AUTO_TRACE(logger);
+ LOG4CXX_INFO(logger, "SocketVideoStreamerAdapter::SocketVideoStreamerAdapter");
port_ = profile::Profile::instance()->video_streaming_port();
ip_ = profile::Profile::instance()->server_address();
diff --git a/src/components/media_manager/src/video/video_stream_to_file_adapter.cc b/src/components/media_manager/src/video/video_stream_to_file_adapter.cc
index 6b038a9fd2..983f1278c9 100644
--- a/src/components/media_manager/src/video/video_stream_to_file_adapter.cc
+++ b/src/components/media_manager/src/video/video_stream_to_file_adapter.cc
@@ -42,28 +42,25 @@ CREATE_LOGGERPTR_GLOBAL(logger, "VideoStreamToFileAdapter")
VideoStreamToFileAdapter::VideoStreamToFileAdapter(const std::string& file_name)
: file_name_(file_name),
is_ready_(false),
- thread_(threads::CreateThread("VideoStreamer",
- new Streamer(this))) {
+ thread_(NULL) {
Init();
}
VideoStreamToFileAdapter::~VideoStreamToFileAdapter() {
- LOG4CXX_AUTO_TRACE(logger);
if ((0 != current_application_ ) && (is_ready_)) {
StopActivity(current_application_);
}
- thread_->join();
- delete thread_->delegate();
- threads::DeleteThread(thread_);
+
+ thread_->stop();
}
void VideoStreamToFileAdapter::Init() {
- if (thread_->is_running()) {
- LOG4CXX_DEBUG(logger, "Start sending thread");
+ if (!thread_) {
+ LOG4CXX_INFO(logger, "Create and start sending thread");
+ thread_ = threads::CreateThread("VideoStreamer",
+ new Streamer(this));
const size_t kStackSize = 16384;
- thread_->start(threads::ThreadOptions(kStackSize));
- } else {
- LOG4CXX_WARN(logger, "thread is already running");
+ thread_->startWithOptions(threads::ThreadOptions(kStackSize));
}
}
@@ -172,10 +169,11 @@ void VideoStreamToFileAdapter::Streamer::threadMain() {
close();
}
-void VideoStreamToFileAdapter::Streamer::exitThreadMain() {
+bool VideoStreamToFileAdapter::Streamer::exitThreadMain() {
LOG4CXX_INFO(logger, "Streamer::exitThreadMain");
stop_flag_ = true;
server_->messages_.Shutdown();
+ return false;
}
void VideoStreamToFileAdapter::Streamer::open() {
diff --git a/src/components/media_manager/test/media_adapter_impl_test.cc b/src/components/media_manager/test/media_adapter_impl_test.cc
index 9db1ed0d53..f6a6ffa518 100644
--- a/src/components/media_manager/test/media_adapter_impl_test.cc
+++ b/src/components/media_manager/test/media_adapter_impl_test.cc
@@ -1,34 +1,34 @@
/*
- * 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.
- */
+* Copyright (c) 2014, Ford Motor Company
+* All rights reserved.
+*
+* Redistribution and use in source and binary forms, with or without
+* modification, are permitted provided that the following conditions are met:
+*
+* Redistributions of source code must retain the above copyright notice, this
+* list of conditions and the following disclaimer.
+*
+* Redistributions in binary form must reproduce the above copyright notice,
+* this list of conditions and the following
+* disclaimer in the documentation and/or other materials provided with the
+* distribution.
+*
+* Neither the name of the Ford Motor Company nor the names of its contributors
+* may be used to endorse or promote products derived from this software
+* without specific prior written permission.
+*
+* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+* POSSIBILITY OF SUCH DAMAGE.
+*/
#include "gmock/gmock.h"
diff --git a/src/components/policy/src/policy/CMakeLists.txt b/src/components/policy/src/policy/CMakeLists.txt
index 2b794e9db8..37a8d43608 100644
--- a/src/components/policy/src/policy/CMakeLists.txt
+++ b/src/components/policy/src/policy/CMakeLists.txt
@@ -46,7 +46,6 @@ include_directories (
${JSONCPP_INCLUDE_DIRECTORY}
#${CMAKE_CURRENT_BINARY_DIR}
${CMAKE_SOURCE_DIR}/src/components/utils/include/
- ${CMAKE_SOURCE_DIR}/src/components
${CMAKE_SOURCE_DIR}/src/components/config_profile/include
${LOG4CXX_INCLUDE_DIRECTORY}
)
diff --git a/src/components/policy/src/policy/include/policy/cache_manager.h b/src/components/policy/src/policy/include/policy/cache_manager.h
index 4d1d41963d..4783a39791 100644
--- a/src/components/policy/src/policy/include/policy/cache_manager.h
+++ b/src/components/policy/src/policy/include/policy/cache_manager.h
@@ -1,34 +1,34 @@
/*
- * 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.
- */
+* Copyright (c) 2014, Ford Motor Company
+* All rights reserved.
+*
+* Redistribution and use in source and binary forms, with or without
+* modification, are permitted provided that the following conditions are met:
+*
+* Redistributions of source code must retain the above copyright notice, this
+* list of conditions and the following disclaimer.
+*
+* Redistributions in binary form must reproduce the above copyright notice,
+* this list of conditions and the following
+* disclaimer in the documentation and/or other materials provided with the
+* distribution.
+*
+* Neither the name of the Ford Motor Company nor the names of its contributors
+* may be used to endorse or promote products derived from this software
+* without specific prior written permission.
+*
+* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+* POSSIBILITY OF SUCH DAMAGE.
+*/
#ifndef SRC_COMPONENTS_POLICY_INCLUDE_CACHE_MANAGER_H_
#define SRC_COMPONENTS_POLICY_INCLUDE_CACHE_MANAGER_H_
@@ -38,19 +38,15 @@
#include "utils/shared_ptr.h"
#include "policy/pt_representation.h"
#include "policy/pt_ext_representation.h"
+#include "utils/lock.h"
#include "usage_statistics/statistics_manager.h"
#include "policy/cache_manager_interface.h"
-#include "utils/lock.h"
-#include "utils/timer_thread.h"
-#include "utils/conditional_variable.h"
-
namespace policy {
class CacheManager : public CacheManagerInterface {
public:
CacheManager();
- ~CacheManager();
/**
* @brief Check if specified RPC for specified application
@@ -153,7 +149,7 @@ class CacheManager : public CacheManagerInterface {
* @param service_type If URLs for specific service are preset,
* return them otherwise default URLs.
*/
- virtual void GetUpdateUrls(int service_type, EndpointUrls& end_points);
+ virtual EndpointUrls GetUpdateUrls(int service_type);
/**
* @brief Get allowed number of notifications
@@ -193,12 +189,6 @@ class CacheManager : public CacheManagerInterface {
bool ApplyUpdate(const policy_table::Table& update_pt);
/**
- * @brief Gets list of appHMIType associated with mobile appID
- * @param container of appHMIType
- */
- virtual void GetHMIAppTypeAfterUpdate(std::map<std::string, StringArray>& app_hmi_types);
-
- /**
* Gets flag updateRequired
* @return true if update is required
*/
@@ -229,7 +219,7 @@ class CacheManager : public CacheManagerInterface {
* @param app_id application id
* @return true if application is revoked
*/
- bool IsApplicationRevoked(const std::string& app_id) const;
+ bool IsApplicationRevoked(const std::string& app_id);
/**
* @brief Get functional groupings from DB
@@ -255,9 +245,10 @@ class CacheManager : public CacheManagerInterface {
/**
* @brief SetIsDefault Sets is_default flag for application
* @param app_id app specific application
+ * @param is_default true if default false otherwise.
* @return true in case opperation was done successfully.
*/
- bool SetIsDefault(const std::string& app_id);
+ bool SetIsDefault(const std::string& app_id, bool is_default);
/**
* Checks if the application has pre_data policy
@@ -434,10 +425,12 @@ class CacheManager : public CacheManagerInterface {
* groups for specific application.
* @param policy_app_id application id.
* @param device_id device id.
- * @return the count of unconsented groups
+ * @param result the count of unconsented groups
+ * @return true in case opperation has been done successfully.
*/
- int CountUnconsentedGroups(const std::string& policy_app_id,
- const std::string& device_id);
+ bool CountUnconsentedGroups(const std::string& policy_app_id,
+ const std::string& device_id,
+ int& result);
/**
* @brief Gets functional group names and user_consent_prompts, if any
@@ -496,18 +489,32 @@ class CacheManager : public CacheManagerInterface {
bool SetPredataPolicy(const std::string& app_id);
/**
+ * @brief Updates application policy to either pre_DataConsented or not
+ * @param app_id Policy Id of application to be checked
+ * @param is_pre_data True of False to setting app policy to be pre_DataConsented
+ * @return true, if succeeded, otherwise - false
+ */
+ bool SetIsPredata(const std::string& app_id, bool is_pre_data);
+
+ /**
* @brief Removes unpaired devices
* @return true if success
*/
- bool CleanupUnpairedDevices();
+ bool CleanupUnpairedDevices(const DeviceIds& device_ids);
/**
* Sets flag of unpaired device
- * @param device_id Unique device id
- * @param unpaired True, if should be marked as unpaired, otherwise - false
+ * @param device_id
+ * @return true if success
+ */
+ bool SetUnpairedDevice(const std::string& device_id);
+
+ /**
+ * Gets list of unpaired devices
+ * @param device_ids output list
* @return true if success
*/
- bool SetUnpairedDevice(const std::string& device_id, bool unpaired = true);
+ bool UnpairedDevicesList(DeviceIds& device_ids);
/**
* Resets Policy Table
@@ -534,7 +541,6 @@ class CacheManager : public CacheManagerInterface {
*/
void Backup();
-
/**
* Returns heart beat timeout
* @param app_id application id
@@ -562,7 +568,9 @@ private:
void GetGroupNameByHashID(const int32_t group_id, std::string& group_name);
void FillDeviceSpecificData();
+ void FillAppSpecificData();
bool AppExists(const std::string& app_id) const;
+ void CopyInternalParams(const std::string &from, const std::string& to);
long ConvertSecondsToMinute(int seconds);
/**
@@ -571,57 +579,17 @@ private:
*/
void CheckSnapshotInitialization();
- void PersistData();
-
- void ResetCalculatedPermissions();
-
- void AddCalculatedPermissions(
- const std::string& device_id,
- const std::string& policy_app_id,
- const policy::Permissions& permissions);
-
- bool IsPermissionsCalculated(const std::string& device_id,
- const std::string& policy_app_id,
- policy::Permissions& permission);
-
private:
utils::SharedPtr<policy_table::Table> pt_;
utils::SharedPtr<policy_table::Table> snapshot_;
utils::SharedPtr<PTRepresentation> backup_;
utils::SharedPtr<PTExtRepresentation> ex_backup_;
bool update_required;
- typedef std::set<std::string> UnpairedDevices;
- UnpairedDevices is_unpaired_;
+ std::map<std::string, bool> is_predata_;
+ std::map<std::string, bool> is_unpaired_;
sync_primitives::Lock cache_lock_;
- sync_primitives::Lock unpaired_lock_;
-
- typedef std::map<std::string, Permissions> AppCalculatedPermissions;
- typedef std::map<std::string, AppCalculatedPermissions> CalculatedPermissions;
- CalculatedPermissions calculated_permissions_;
- sync_primitives::Lock calculated_permissions_lock_;
-
- class BackgroundBackuper: public threads::ThreadDelegate {
- friend class CacheManager;
- public:
- BackgroundBackuper(CacheManager* cache_manager);
- ~BackgroundBackuper();
- virtual void threadMain();
- virtual void exitThreadMain();
- void DoBackup();
- private:
- void InternalBackup();
- CacheManager* cache_manager_;
- sync_primitives::ConditionalVariable backup_notifier_;
- volatile bool stop_flag_;
- volatile bool new_data_available_;
-
- sync_primitives::Lock need_backup_lock_;
- DISALLOW_COPY_AND_ASSIGN(BackgroundBackuper);
- };
- threads::Thread* backup_thread_;
- sync_primitives::Lock backuper_locker_;
- BackgroundBackuper* backuper_;
};
-} // namespace policy
+} // policy
+
#endif // SRC_COMPONENTS_POLICY_INCLUDE_CACHE_MANAGER_H_
diff --git a/src/components/policy/src/policy/include/policy/cache_manager_interface.h b/src/components/policy/src/policy/include/policy/cache_manager_interface.h
index d08c7569bd..a88ae1a901 100644
--- a/src/components/policy/src/policy/include/policy/cache_manager_interface.h
+++ b/src/components/policy/src/policy/include/policy/cache_manager_interface.h
@@ -1,4 +1,4 @@
-/*
+/*
* Copyright (c) 2014, Ford Motor Company
* All rights reserved.
*
@@ -149,7 +149,7 @@ class CacheManagerInterface {
* @param service_type If URLs for specific service are preset,
* return them otherwise default URLs.
*/
- virtual void GetUpdateUrls(int service_type, EndpointUrls& end_points) = 0;
+ virtual EndpointUrls GetUpdateUrls(int service_type) = 0;
/**
* @brief Get allowed number of notifications
@@ -189,12 +189,6 @@ class CacheManagerInterface {
virtual bool ApplyUpdate(const policy_table::Table& update_pt) = 0;
/**
- * @brief Gets list of appHMIType associated with mobile appID
- * @param container of appHMIType
- */
- virtual void GetHMIAppTypeAfterUpdate(std::map<std::string, StringArray>& app_hmi_types) = 0;
-
- /**
* Gets flag updateRequired
* @return true if update is required
*/
@@ -225,7 +219,7 @@ class CacheManagerInterface {
* @param app_id application id
* @return true if application is revoked
*/
- virtual bool IsApplicationRevoked(const std::string& app_id) const = 0;
+ virtual bool IsApplicationRevoked(const std::string& app_id) = 0;
/**
* @brief Get functional groupings from DB
@@ -252,9 +246,10 @@ class CacheManagerInterface {
/**
* @brief SetIsDefault Sets is_default flag for application
* @param app_id app specific application
+ * @param is_default true if default false otherwise.
* @return true in case opperation was done successfully.
*/
- virtual bool SetIsDefault(const std::string& app_id) = 0;
+ virtual bool SetIsDefault(const std::string& app_id, bool is_default) = 0;
/**
* Checks if the application has pre_data policy
@@ -428,10 +423,12 @@ class CacheManagerInterface {
* groups for specific application.
* @param policy_app_id application id.
* @param device_id device id.
- * @param the count of unconsented groups
+ * @param result the count of unconsented groups
+ * @return true in case opperation has been done successfully.
*/
- virtual int CountUnconsentedGroups(const std::string& policy_app_id,
- const std::string& device_id) = 0;
+ virtual bool CountUnconsentedGroups(const std::string& policy_app_id,
+ const std::string& device_id,
+ int& result) = 0;
/**
* @brief Gets functional group names and user_consent_prompts, if any
@@ -490,18 +487,32 @@ class CacheManagerInterface {
virtual bool SetPredataPolicy(const std::string& app_id) = 0;
/**
+ * @brief Updates application policy to either pre_DataConsented or not
+ * @param app_id Policy Id of application to be checked
+ * @param is_pre_data True of False to setting app policy to be pre_DataConsented
+ * @return true, if succeeded, otherwise - false
+ */
+ virtual bool SetIsPredata(const std::string& app_id, bool is_pre_data) = 0;
+
+ /**
* @brief Removes unpaired devices
* @return true if success
*/
- virtual bool CleanupUnpairedDevices() = 0;
+ virtual bool CleanupUnpairedDevices(const DeviceIds& device_ids) = 0;
/**
* Sets flag of unpaired device
- * @param device_id Unique device id
- * @param unpaired True, if should be marked as unpaired, otherwise - false
+ * @param device_id
+ * @return true if success
+ */
+ virtual bool SetUnpairedDevice(const std::string& device_id) = 0;
+
+ /**
+ * Gets list of unpaired devices
+ * @param device_ids output list
* @return true if success
*/
- virtual bool SetUnpairedDevice(const std::string& device_id, bool unpaired = true) = 0;
+ virtual bool UnpairedDevicesList(DeviceIds& device_ids) = 0;
/**
* Resets Policy Table
@@ -535,36 +546,6 @@ class CacheManagerInterface {
* otherwise heart beat for specific application isn't set
*/
virtual uint16_t HeartBeatTimeout(const std::string& app_id) const = 0;
-
- /**
- * @brief Resets all calculated permissions in cache
- */
- virtual void ResetCalculatedPermissions() = 0;
-
- /**
- * @brief Adds calculated permissions for specific app on particular device
- * into cache
- * @param device_id Device id
- * @param policy_app_id Application id
- * @param permissions Calculated permissions
- */
- virtual void AddCalculatedPermissions(
- const std::string& device_id,
- const std::string& policy_app_id,
- const policy::Permissions& permissions) = 0;
-
- /**
- * @brief Checks if permissions calculated for specific app on particular
- * device
- * @param device_id Device id
- * @param policy_app_id Application id
- * @param permission Permissions to be filled, in case of presence in cache
- * @return true if present, otherwise false
- */
- virtual bool IsPermissionsCalculated(
- const std::string& device_id,
- const std::string& policy_app_id,
- policy::Permissions& permission) = 0;
};
typedef utils::SharedPtr<CacheManagerInterface> CacheManagerInterfaceSPtr;
diff --git a/src/components/policy/src/policy/include/policy/policy_helper.h b/src/components/policy/src/policy/include/policy/policy_helper.h
index 11f5c9d573..5d5c8e7edc 100644
--- a/src/components/policy/src/policy/include/policy/policy_helper.h
+++ b/src/components/policy/src/policy/include/policy/policy_helper.h
@@ -99,8 +99,7 @@ struct CheckAppPolicy {
* @param group_name the group for which consent will be checked.
* @return true if consent is required, false otherwise.
*/
- bool IsConsentRequired(const std::string& app_id,
- const std::string& group_name) const;
+ bool IsConsentRequired(const std::string& group_name) const;
PolicyManagerImpl* pm_;
const utils::SharedPtr<policy_table::Table> update_;
const utils::SharedPtr<policy_table::Table> snapshot_;
diff --git a/src/components/policy/src/policy/include/policy/policy_listener.h b/src/components/policy/src/policy/include/policy/policy_listener.h
index 1748caa9b3..adfcddd93b 100644
--- a/src/components/policy/src/policy/include/policy/policy_listener.h
+++ b/src/components/policy/src/policy/include/policy/policy_listener.h
@@ -1,4 +1,4 @@
-/*
+/*
Copyright (c) 2013, Ford Motor Company
All rights reserved.
@@ -33,8 +33,6 @@
#ifndef SRC_COMPONENTS_POLICY_INCLUDE_POLICY_LISTENER_H_
#define SRC_COMPONENTS_POLICY_INCLUDE_POLICY_LISTENER_H_
-#include <queue>
-
#include "policy/policy_types.h"
namespace policy {
@@ -42,31 +40,18 @@ class PolicyListener {
public:
virtual ~PolicyListener() {
}
+ virtual void OnPTExchangeNeeded() = 0;
virtual void OnPermissionsUpdated(const std::string& policy_app_id,
const Permissions& permissions,
const policy::HMILevel& default_hmi) = 0;
virtual void OnPendingPermissionChange(const std::string& policy_app_id) = 0;
virtual void OnAppRevoked(const std::string& policy_app_id) = 0;
- virtual void OnUpdateStatusChanged(const std::string&) = 0;
+ virtual void OnUpdateStatusChanged(policy::PolicyTableStatus status) = 0;
virtual std::string OnCurrentDeviceIdUpdateRequired(
const std::string& policy_app_id) = 0;
virtual void OnSystemInfoUpdateRequired() = 0;
virtual std::string GetAppName(const std::string& policy_app_id) = 0;
- virtual void OnUpdateHMIAppType(std::map<std::string, StringArray> app_hmi_types) = 0;
-
- /**
- * @brief OnSnapshotCreated the notification which will be sent
- * when snapshot for PTU has been created.
- *
- * @param pt_string the snapshot
- *
- * @param retry_seconds retry sequence timeouts.
- *
- * @param timeout_exceed timeout.
- */
- virtual void OnSnapshotCreated(const BinaryMessage& pt_string,
- const std::vector<int>& retry_seconds,
- int timeout_exceed) = 0;
+ virtual void OnUserRequestedUpdateCheckRequired() = 0;
/**
* @brief Make appropriate changes for related applications permissions and
@@ -76,11 +61,6 @@ class PolicyListener {
*/
virtual void OnDeviceConsentChanged(const std::string& device_id,
bool is_allowed) = 0;
-
- /**
- * @brief GetAvailableApps allows to obtain list of registered applications.
- */
- virtual void GetAvailableApps(std::queue<std::string>&) = 0;
};
} // namespace policy
#endif // SRC_COMPONENTS_POLICY_INCLUDE_POLICY_LISTENER_H_
diff --git a/src/components/policy/src/policy/include/policy/policy_manager.h b/src/components/policy/src/policy/include/policy/policy_manager.h
index ff5e643c57..0bc553b33a 100644
--- a/src/components/policy/src/policy/include/policy/policy_manager.h
+++ b/src/components/policy/src/policy/include/policy/policy_manager.h
@@ -1,4 +1,4 @@
-/*
+/*
Copyright (c) 2013, Ford Motor Company
All rights reserved.
@@ -40,6 +40,7 @@
#include "usage_statistics/statistics_manager.h"
namespace policy {
+
class PolicyManager : public usage_statistics::StatisticsManager {
public:
virtual ~PolicyManager() {
@@ -83,12 +84,13 @@ class PolicyManager : public usage_statistics::StatisticsManager {
* @param service_type Service specifies user of URL
* @return vector of urls
*/
- virtual void GetUpdateUrls(int service_type, EndpointUrls& end_points) = 0;
+ virtual EndpointUrls GetUpdateUrls(int service_type) = 0;
/**
* @brief PTU is needed, for this PTS has to be formed and sent.
+ * @return BinaryMessage* PTS.
*/
- virtual void RequestPTUpdate() = 0;
+ virtual BinaryMessageSptr RequestPTUpdate() = 0;
/**
* @brief Check if specified RPC for specified application
@@ -116,14 +118,27 @@ class PolicyManager : public usage_statistics::StatisticsManager {
* @brief Returns current status of policy table for HMI
* @return Current status of policy table
*/
- virtual std::string GetPolicyTableStatus() const = 0;
+ virtual PolicyTableStatus GetPolicyTableStatus() = 0;
+
+ /**
+ * Checks is PT exceeded IgnitionCycles
+ * @return true if exceeded
+ */
+ virtual bool ExceededIgnitionCycles() = 0;
+
+ /**
+ * Checks is PT exceeded days
+ * @param days current day after epoch
+ * @return true if exceeded
+ */
+ virtual bool ExceededDays(int days) = 0;
/**
* Checks is PT exceeded kilometers
* @param kilometers current kilometers at odometer
* @return true if exceeded
*/
- virtual void KmsChanged(int kilometers) = 0;
+ virtual bool ExceededKilometers(int kilometers) = 0;
/**
* Increments counter of ignition cycles
@@ -131,11 +146,6 @@ class PolicyManager : public usage_statistics::StatisticsManager {
virtual void IncrementIgnitionCycles() = 0;
/**
- * @brief ExchangeByUserRequest
- */
- virtual std::string ForcePTExchange() = 0;
-
- /**
* Resets retry sequence
*/
virtual void ResetRetrySequence() = 0;
@@ -337,6 +347,14 @@ class PolicyManager : public usage_statistics::StatisticsManager {
virtual void AddApplication(const std::string& application_id) = 0;
/**
+ * @brief IsAppInUpdateList allows to check if specific application
+ * presents in update list.
+ * @param app_id id of the application that should be verified.
+ * @return true in case of application is in update list, false otherwise.
+ */
+ virtual bool IsAppInUpdateList(const std::string& app_id) const = 0;
+
+ /**
* @brief Removes unpaired device records and related records from DB
* @param device_ids List of device_id, which should be removed
* @return true, if succedeed, otherwise - false
@@ -368,6 +386,12 @@ class PolicyManager : public usage_statistics::StatisticsManager {
virtual uint32_t GetNotificationsNumber(const std::string& priority) = 0;
/**
+ * @brief Provide info about device consent for application
+ * @return Amount of groups for which app is allowed
+ */
+ virtual int IsConsentNeeded(const std::string& app_id) = 0;
+
+ /**
* @brief Allows to update Vehicle Identification Number in policy table.
* @param new value for the parameter.
*/
@@ -387,30 +411,6 @@ class PolicyManager : public usage_statistics::StatisticsManager {
* otherwise heart beat for specific application isn't set
*/
virtual uint16_t HeartBeatTimeout(const std::string& app_id) const = 0;
-
- /**
- * @brief SaveUpdateStatusRequired alows to save update status.
- */
- virtual void SaveUpdateStatusRequired(bool is_update_needed) = 0;
- protected:
- /**
- * Checks is PT exceeded IgnitionCycles
- * @return true if exceeded
- */
- virtual bool ExceededIgnitionCycles() = 0;
-
- /**
- * Checks is PT exceeded days
- * @return true if exceeded
- */
- virtual bool ExceededDays() = 0;
-
- /**
- * @brief StartPTExchange allows to start PTU. The function will check
- * if one is required and starts the update flow in only case when previous
- * condition is true.
- */
- virtual void StartPTExchange() = 0;
};
} // namespace policy
diff --git a/src/components/policy/src/policy/include/policy/policy_manager_impl.h b/src/components/policy/src/policy/include/policy/policy_manager_impl.h
index 35e1aa6f64..9afb58386f 100644
--- a/src/components/policy/src/policy/include/policy/policy_manager_impl.h
+++ b/src/components/policy/src/policy/include/policy/policy_manager_impl.h
@@ -1,4 +1,4 @@
-/*
+/*
Copyright (c) 2013, Ford Motor Company
All rights reserved.
@@ -39,7 +39,7 @@
#include "policy/policy_manager.h"
#include "policy/policy_table.h"
#include "policy/cache_manager_interface.h"
-#include "policy/update_status_manager.h"
+#include "policy/update_status_manager_interface.h"
#include "./functions.h"
#include "usage_statistics/statistics_manager.h"
@@ -51,6 +51,7 @@ struct CheckAppPolicy;
class PolicyManagerImpl : public PolicyManager {
public:
PolicyManagerImpl();
+ virtual ~PolicyManagerImpl();
virtual void set_listener(PolicyListener* listener);
PolicyListener* listener() const {
return listener_;
@@ -59,18 +60,19 @@ class PolicyManagerImpl : public PolicyManager {
virtual bool LoadPT(const std::string& file, const BinaryMessage& pt_content);
virtual bool ResetPT(const std::string& file_name);
virtual std::string GetUpdateUrl(int service_type);
- virtual void GetUpdateUrls(int service_type, EndpointUrls& end_points);
- virtual void RequestPTUpdate();
+ virtual EndpointUrls GetUpdateUrls(int service_type);
+ virtual BinaryMessageSptr RequestPTUpdate();
virtual void CheckPermissions(const PTString& app_id,
const PTString& hmi_level,
const PTString& rpc,
const RPCParams& rpc_params,
CheckPermissionResult& result);
virtual bool ResetUserConsent();
- virtual void KmsChanged(int kilometers);
+ virtual bool ExceededIgnitionCycles();
+ virtual bool ExceededDays(int days);
+ virtual bool ExceededKilometers(int kilometers);
virtual void IncrementIgnitionCycles();
- virtual std::string ForcePTExchange();
- virtual std::string GetPolicyTableStatus() const;
+ virtual PolicyTableStatus GetPolicyTableStatus();
virtual void ResetRetrySequence();
virtual int NextRetryTimeout();
virtual int TimeoutExchange();
@@ -126,6 +128,8 @@ class PolicyManagerImpl : public PolicyManager {
virtual uint32_t GetNotificationsNumber(const std::string& priority);
+ virtual int IsConsentNeeded(const std::string& app_id);
+
virtual void SetVINValue(const std::string& value);
// Interface StatisticsManager (begin)
@@ -153,23 +157,28 @@ class PolicyManagerImpl : public PolicyManager {
void AddApplication(const std::string& application_id);
+ /**
+ * @brief IsAppinUpdateList
+ * @param app_id
+ * @return
+ */
+ virtual bool IsAppInUpdateList(const std::string& app_id) const;
+
virtual void RemoveAppConsentForGroup(const std::string& app_id,
const std::string& group_name);
virtual uint16_t HeartBeatTimeout(const std::string& app_id) const;
- virtual void SaveUpdateStatusRequired(bool is_update_needed);
-
virtual bool IsPredataPolicy(const std::string& policy_app_id);
void set_cache_manager(CacheManagerInterface* cache_manager);
+ void set_update_status_manager(
+ UpdateStatusManagerInterface* update_manager);
protected:
virtual utils::SharedPtr<policy_table::Table> Parse(
const BinaryMessage& pt_content);
private:
- bool HasConsentedDevice();
- void CheckTriggers();
/*
* @brief Checks policy table update along with current data for any changes
* in assigned functional group list of application
@@ -195,6 +204,17 @@ class PolicyManagerImpl : public PolicyManager {
Permissions& notification_data);
/**
+ * @brief Add application id at the end of update permissions request list
+ * @param Application id
+ */
+ void AddAppToUpdateList(const std::string& application_id);
+
+ /**
+ * @brief Remove first application in the update permissions request list
+ */
+ void RemoveAppFromUpdateList();
+
+ /**
* @brief Validate PermissionConsent structure according to currently
* assigned groups
* @param permissions PermissionConsent structure that should be validated.
@@ -228,41 +248,20 @@ class PolicyManagerImpl : public PolicyManager {
*/
bool IsNewApplication(const std::string& application_id) const;
- /**
- * Checks existing and permissions of AppStorageFolder
- * @return true if AppStorageFolder exists and has permissions read/write
- */
- bool CheckAppStorageFolder() const;
-
- /**
- * @brief Checks whether need ask the permission of users
- * @return true if user consent is needed
- */
- virtual bool IsConsentNeeded(const std::string& app_id);
-
- /**
- * @brief Changes isConsentNeeded for app pending permissions, in case
- * user set permissions before app activation.
- * @param Unique app id
- * @param Current permissions for app
- */
- void CheckPendingPermissionsChanges(
- const std::string& policy_app_id,
- const std::vector<FunctionalGroupPermission>& current_permissions);
-
- virtual void StartPTExchange();
- virtual bool ExceededDays();
- virtual bool ExceededIgnitionCycles();
-
PolicyListener* listener_;
- UpdateStatusManager update_status_manager_;
+ UpdateStatusManagerInterfaceSPtr update_status_manager_;
CacheManagerInterfaceSPtr cache_;
+ sync_primitives::Lock update_request_list_lock_;
sync_primitives::Lock apps_registration_lock_;
- sync_primitives::Lock app_permissions_diff_lock_;
std::map<std::string, AppPermissions> app_permissions_diff_;
/**
+ * @brief List of application, which require update of permissions
+ */
+ std::list<std::string> update_requests_list_;
+
+ /**
* Timeout to wait response with UpdatePT
*/
int retry_sequence_timeout_;
@@ -293,7 +292,10 @@ class PolicyManagerImpl : public PolicyManager {
*/
std::string last_device_id_;
- bool ignition_check;
+ /**
+ * @brief Holds device ids, which were unpaired
+ */
+ DeviceIds unpaired_device_ids_;
friend struct CheckAppPolicy;
};
diff --git a/src/components/policy/src/policy/include/policy/pt_ext_representation.h b/src/components/policy/src/policy/include/policy/pt_ext_representation.h
index 55ed86e445..2ed5ef8c49 100644
--- a/src/components/policy/src/policy/include/policy/pt_ext_representation.h
+++ b/src/components/policy/src/policy/include/policy/pt_ext_representation.h
@@ -306,12 +306,10 @@ class PTExtRepresentation : public virtual PTRepresentation {
/**
* Sets flag of unpaired device
- * @param device_id Unique device id
- * @param unpaired True, if unpaired, otherwise - false
+ * @param device_id
* @return true if success
*/
- virtual bool SetUnpairedDevice(const std::string& device_id,
- bool unpaired) const = 0;
+ virtual bool SetUnpairedDevice(const std::string& device_id) const = 0;
/**
* Gets list of unpaired devices
diff --git a/src/components/policy/src/policy/include/policy/pt_representation.h b/src/components/policy/src/policy/include/policy/pt_representation.h
index be79857a94..f33c3a0811 100644
--- a/src/components/policy/src/policy/include/policy/pt_representation.h
+++ b/src/components/policy/src/policy/include/policy/pt_representation.h
@@ -84,7 +84,6 @@ class PTRepresentation {
*/
virtual bool IsPTPreloaded() = 0;
- virtual bool RefreshDB() = 0;
/**
* Gets number of ignition cycles before next update policy table
* @return number of ignition cycles
@@ -294,8 +293,6 @@ class PTRepresentation {
bool is_revoked,
bool is_default,
bool is_predata) = 0;
-
- virtual void WriteDb() = 0;
};
} // namespace policy
diff --git a/src/components/policy/src/policy/include/policy/sql_pt_ext_queries.h b/src/components/policy/src/policy/include/policy/sql_pt_ext_queries.h
index 2b65df45f3..6db8425b7f 100644
--- a/src/components/policy/src/policy/include/policy/sql_pt_ext_queries.h
+++ b/src/components/policy/src/policy/include/policy/sql_pt_ext_queries.h
@@ -1,4 +1,4 @@
-/*
+/*
Copyright (c) 2013, " Ford Motor Company
All rights reserved.
@@ -56,15 +56,13 @@ extern const std::string kSelectPreconsentedGroups;
extern const std::string kDeletePreconsentedGroups;
extern const std::string kSelectUsageAndErrorCount;
extern const std::string kSelectAppLevels;
-extern const std::string kUpdateGlobalCounters;
extern const std::string kInsertDeviceData;
-extern const std::string kDeleteDeviceData;
extern const std::string kInsertConsentGroups;
+extern const std::string kDeleteAppConsent;
extern const std::string kCountUnconsentedGroups;
extern const std::string kSelectModuleMeta;
extern const std::string kUpdateMetaParams;
extern const std::string kUpdateModuleMetaVinParam;
-extern const std::string kSaveModuleMeta;
extern const std::string kSelectMetaParams;
extern const std::string kCountAppLevel;
extern const std::string kUpdateGroupPermissions;
@@ -89,7 +87,6 @@ extern const std::string kUpdateUnpairedDevice;
extern const std::string kSelectUnpairedDevices;
extern const std::string kHasMsgLanguageCode;
extern const std::string kDeletePreconsentedGroupsByApplicationId;
-extern const std::string kDeleteAppConsent;
} // namespace sql_pt_ext
} // namespace policy
diff --git a/src/components/policy/src/policy/include/policy/sql_pt_ext_representation.h b/src/components/policy/src/policy/include/policy/sql_pt_ext_representation.h
index 7589be4f60..9f784a3951 100644
--- a/src/components/policy/src/policy/include/policy/sql_pt_ext_representation.h
+++ b/src/components/policy/src/policy/include/policy/sql_pt_ext_representation.h
@@ -121,7 +121,7 @@ class SQLPTExtRepresentation : public SQLPTRepresentation,
bool SetPredataPolicy(const std::string& app_id);
bool SetIsPredata(const std::string& app_id, bool is_pre_data);
bool IsPredataPolicy(const std::string& app_id) const;
- bool SetUnpairedDevice(const std::string& device_id, bool unpaired) const;
+ bool SetUnpairedDevice(const std::string& device_id) const;
bool UnpairedDevicesList(DeviceIds* device_ids) const;
bool RemoveAppConsentForGroup(
const std::string& policy_app_id,
@@ -156,12 +156,6 @@ class SQLPTExtRepresentation : public SQLPTRepresentation,
virtual bool SaveUsageAndErrorCounts(
const policy_table::UsageAndErrorCounts& counts);
- virtual bool SaveModuleMeta(const policy_table::ModuleMeta& meta);
-
- bool SaveAppCounters(const policy_table::AppLevels& app_levels);
-
- bool SaveGlobalCounters(const policy_table::UsageAndErrorCounts& counts);
-
bool IsExistAppLevel(const std::string& app_id) const;
bool GetAllAppGroups(const std::string& policy_app_id,
diff --git a/src/components/policy/src/policy/include/policy/sql_pt_representation.h b/src/components/policy/src/policy/include/policy/sql_pt_representation.h
index ebc233d902..ce4e4532ab 100644
--- a/src/components/policy/src/policy/include/policy/sql_pt_representation.h
+++ b/src/components/policy/src/policy/include/policy/sql_pt_representation.h
@@ -66,7 +66,7 @@ class SQLPTRepresentation : public virtual PTRepresentation {
virtual void ResetIgnitionCycles();
virtual int TimeoutResponse();
virtual bool SecondsBetweenRetries(std::vector<int>* seconds);
- virtual bool RefreshDB();
+
virtual VehicleData GetVehicleData();
virtual std::vector<UserFriendlyMessage> GetUserFriendlyMsg(
@@ -81,7 +81,6 @@ class SQLPTRepresentation : public virtual PTRepresentation {
bool Close();
bool Clear();
bool Drop();
- virtual void WriteDb();
virtual utils::SharedPtr<policy_table::Table> GenerateSnapshot() const;
virtual bool Save(const policy_table::Table& table);
bool GetInitialAppData(const std::string& app_id, StringArray* nicknames =
diff --git a/src/components/policy/src/policy/include/policy/update_status_manager.h b/src/components/policy/src/policy/include/policy/update_status_manager.h
index 3142eb1b76..43d40d0c19 100644
--- a/src/components/policy/src/policy/include/policy/update_status_manager.h
+++ b/src/components/policy/src/policy/include/policy/update_status_manager.h
@@ -1,21 +1,16 @@
-#ifndef SRC_COMPONENTS_POLICY_INCLUDE_POLICY_UPDATE_STATUS_MANAGER_H
+#ifndef SRC_COMPONENTS_POLICY_INCLUDE_POLICY_UPDATE_STATUS_MANAGER_H
#define SRC_COMPONENTS_POLICY_INCLUDE_POLICY_UPDATE_STATUS_MANAGER_H
+#include "policy/update_status_manager_interface.h"
#include "policy/policy_types.h"
#include "utils/lock.h"
#include "utils/timer_thread.h"
-#include "utils/threads/thread.h"
-#include "utils/threads/thread_delegate.h"
-#include "utils/conditional_variable.h"
-#include "utils/lock.h"
-#include "utils/logger.h"
-#include "utils/macro.h"
namespace policy {
class PolicyListener;
-class UpdateStatusManager {
+class UpdateStatusManager : public UpdateStatusManagerInterface {
public:
/**
* @brief Constructor
@@ -74,31 +69,10 @@ class UpdateStatusManager {
void OnPolicyInit(bool is_update_required);
/**
- * @brief IsUpdateRequired allows to distiguish if update is required
- *
- * @return true if update required.
- */
- bool IsUpdateRequired() const;
-
- /**
- * @brief IsUpdatePending allows to distinguish if update is in pending mode.
- *
- * @return true if update is in pending mode.
- */
- bool IsUpdatePending() const;
-
- /**
- * @brief ScheduleUpdate allows to schedule next update.
- * It will change state to Update_Needed, that's is.
- */
- void ScheduleUpdate();
-
- /**
- * @brief StringifiedUpdateStatus allows to obtain update status as a string.
- *
- * @return stringified update status.
+ * @brief Returns current policy update status
+ * @return
*/
- std::string StringifiedUpdateStatus() const;
+ PolicyTableStatus GetUpdateStatus();
private:
/*
@@ -128,13 +102,6 @@ private:
void CheckUpdateStatus();
private:
-
- /**
- * @brief Returns current policy update status
- * @return
- */
- PolicyTableStatus GetUpdateStatus() const;
-
PolicyListener* listener_;
bool exchange_in_progress_;
bool update_required_;
@@ -147,24 +114,21 @@ private:
*/
PolicyTableStatus last_update_status_;
- class UpdateThreadDelegate: public threads::ThreadDelegate {
-
- public:
- UpdateThreadDelegate(UpdateStatusManager* update_status_manager);
- ~UpdateThreadDelegate();
- virtual void threadMain();
- virtual void exitThreadMain();
- void updateTimeOut(const uint32_t timeout_ms);
- volatile uint32_t timeout_;
- volatile bool stop_flag_;
- sync_primitives::Lock state_lock_;
- sync_primitives::ConditionalVariable termination_condition_;
- UpdateStatusManager* update_status_manager_;
+ /**
+ * @brief The Policy update response timer class
+ */
+ class UpdateResponseTimer : public timer::TimerThread<UpdateStatusManager> {
+ public:
+ UpdateResponseTimer(UpdateStatusManager* callee) :
+ timer::TimerThread<UpdateStatusManager>(
+ "Policy UpdResponse",
+ callee,
+ &UpdateStatusManager::OnUpdateTimeoutOccurs) {
+ }
+ ~UpdateResponseTimer();
};
-
- UpdateThreadDelegate* update_status_thread_delegate_;
- threads::Thread* thread_;
+ UpdateResponseTimer update_response_timer_;
};
}
diff --git a/src/components/policy/src/policy/qdb_wrapper/include/qdb_wrapper/sql_database.h b/src/components/policy/src/policy/qdb_wrapper/include/qdb_wrapper/sql_database.h
index caf954e1d2..f99dc5a146 100644
--- a/src/components/policy/src/policy/qdb_wrapper/include/qdb_wrapper/sql_database.h
+++ b/src/components/policy/src/policy/qdb_wrapper/include/qdb_wrapper/sql_database.h
@@ -1,4 +1,4 @@
-/*
+/**
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
diff --git a/src/components/policy/src/policy/qdb_wrapper/include/qdb_wrapper/sql_error.h b/src/components/policy/src/policy/qdb_wrapper/include/qdb_wrapper/sql_error.h
index cf21a66ff4..0f5bd36b4c 100644
--- a/src/components/policy/src/policy/qdb_wrapper/include/qdb_wrapper/sql_error.h
+++ b/src/components/policy/src/policy/qdb_wrapper/include/qdb_wrapper/sql_error.h
@@ -1,4 +1,4 @@
-/*
+/**
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
diff --git a/src/components/policy/src/policy/qdb_wrapper/include/qdb_wrapper/sql_query.h b/src/components/policy/src/policy/qdb_wrapper/include/qdb_wrapper/sql_query.h
index af46402c8e..1f81831c59 100644
--- a/src/components/policy/src/policy/qdb_wrapper/include/qdb_wrapper/sql_query.h
+++ b/src/components/policy/src/policy/qdb_wrapper/include/qdb_wrapper/sql_query.h
@@ -1,4 +1,4 @@
-/*
+/**
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
diff --git a/src/components/policy/src/policy/qdb_wrapper/src/sql_database.cc b/src/components/policy/src/policy/qdb_wrapper/src/sql_database.cc
index ef26e64353..cb22c9dbda 100644
--- a/src/components/policy/src/policy/qdb_wrapper/src/sql_database.cc
+++ b/src/components/policy/src/policy/qdb_wrapper/src/sql_database.cc
@@ -1,4 +1,4 @@
-/*
+/**
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
diff --git a/src/components/policy/src/policy/qdb_wrapper/src/sql_error.cc b/src/components/policy/src/policy/qdb_wrapper/src/sql_error.cc
index b8f836cc26..7dc31c2c25 100644
--- a/src/components/policy/src/policy/qdb_wrapper/src/sql_error.cc
+++ b/src/components/policy/src/policy/qdb_wrapper/src/sql_error.cc
@@ -1,4 +1,4 @@
-/*
+/**
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
diff --git a/src/components/policy/src/policy/qdb_wrapper/src/sql_query.cc b/src/components/policy/src/policy/qdb_wrapper/src/sql_query.cc
index d3191193be..355c25ca93 100644
--- a/src/components/policy/src/policy/qdb_wrapper/src/sql_query.cc
+++ b/src/components/policy/src/policy/qdb_wrapper/src/sql_query.cc
@@ -1,4 +1,4 @@
-/*
+/**
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
diff --git a/src/components/policy/src/policy/sqlite_wrapper/include/sqlite_wrapper/sql_database.h b/src/components/policy/src/policy/sqlite_wrapper/include/sqlite_wrapper/sql_database.h
index 274c64bef4..b7608e41f0 100644
--- a/src/components/policy/src/policy/sqlite_wrapper/include/sqlite_wrapper/sql_database.h
+++ b/src/components/policy/src/policy/sqlite_wrapper/include/sqlite_wrapper/sql_database.h
@@ -1,4 +1,4 @@
-/*
+/**
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
@@ -95,12 +95,6 @@ class SQLDatabase {
void set_path(const std::string& path);
/**
- * Checks if database is read/write
- * @return true if database is read/write
- */
- bool IsReadWrite();
-
- /**
* Call backup for opened DB
*/
bool Backup();
diff --git a/src/components/policy/src/policy/sqlite_wrapper/include/sqlite_wrapper/sql_error.h b/src/components/policy/src/policy/sqlite_wrapper/include/sqlite_wrapper/sql_error.h
index 578b3990c9..3b5fff3c11 100644
--- a/src/components/policy/src/policy/sqlite_wrapper/include/sqlite_wrapper/sql_error.h
+++ b/src/components/policy/src/policy/sqlite_wrapper/include/sqlite_wrapper/sql_error.h
@@ -1,4 +1,4 @@
-/*
+/**
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
diff --git a/src/components/policy/src/policy/sqlite_wrapper/include/sqlite_wrapper/sql_query.h b/src/components/policy/src/policy/sqlite_wrapper/include/sqlite_wrapper/sql_query.h
index b477a812da..939cd1341a 100644
--- a/src/components/policy/src/policy/sqlite_wrapper/include/sqlite_wrapper/sql_query.h
+++ b/src/components/policy/src/policy/sqlite_wrapper/include/sqlite_wrapper/sql_query.h
@@ -1,4 +1,4 @@
-/*
+/**
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
diff --git a/src/components/policy/src/policy/sqlite_wrapper/src/sql_database.cc b/src/components/policy/src/policy/sqlite_wrapper/src/sql_database.cc
index 7d698a6dd1..423d266b47 100644
--- a/src/components/policy/src/policy/sqlite_wrapper/src/sql_database.cc
+++ b/src/components/policy/src/policy/sqlite_wrapper/src/sql_database.cc
@@ -1,4 +1,4 @@
-/*
+/**
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
@@ -60,11 +60,6 @@ bool SQLDatabase::Open() {
return error_ == SQLITE_OK;
}
-bool SQLDatabase::IsReadWrite() {
- const char* schema = "main";
- return sqlite3_db_readonly(conn_, schema) == 0;
-}
-
void SQLDatabase::Close() {
sync_primitives::AutoLock auto_lock(conn_lock_);
error_ = sqlite3_close(conn_);
diff --git a/src/components/policy/src/policy/sqlite_wrapper/src/sql_error.cc b/src/components/policy/src/policy/sqlite_wrapper/src/sql_error.cc
index 6ee82cc23b..0f87ef2cc6 100644
--- a/src/components/policy/src/policy/sqlite_wrapper/src/sql_error.cc
+++ b/src/components/policy/src/policy/sqlite_wrapper/src/sql_error.cc
@@ -1,4 +1,4 @@
-/*
+/**
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
diff --git a/src/components/policy/src/policy/sqlite_wrapper/src/sql_query.cc b/src/components/policy/src/policy/sqlite_wrapper/src/sql_query.cc
index d6a643a5d2..c8afdfcdb3 100644
--- a/src/components/policy/src/policy/sqlite_wrapper/src/sql_query.cc
+++ b/src/components/policy/src/policy/sqlite_wrapper/src/sql_query.cc
@@ -1,4 +1,4 @@
-/*
+/**
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
diff --git a/src/components/policy/src/policy/src/cache_manager.cc b/src/components/policy/src/policy/src/cache_manager.cc
index df908ea35b..62e96ae0ec 100644
--- a/src/components/policy/src/policy/src/cache_manager.cc
+++ b/src/components/policy/src/policy/src/cache_manager.cc
@@ -1,34 +1,34 @@
-/*
- * 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.
- */
+/*
+* Copyright (c) 2014, Ford Motor Company
+* All rights reserved.
+*
+* Redistribution and use in source and binary forms, with or without
+* modification, are permitted provided that the following conditions are met:
+*
+* Redistributions of source code must retain the above copyright notice, this
+* list of conditions and the following disclaimer.
+*
+* Redistributions in binary form must reproduce the above copyright notice,
+* this list of conditions and the following
+* disclaimer in the documentation and/or other materials provided with the
+* distribution.
+*
+* Neither the name of the Ford Motor Company nor the names of its contributors
+* may be used to endorse or promote products derived from this software
+* without specific prior written permission.
+*
+* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+* POSSIBILITY OF SUCH DAMAGE.
+*/
#include "policy/cache_manager.h"
@@ -42,6 +42,7 @@
#include "json/features.h"
#include "utils/logger.h"
+// EXTENDED_POLICY
# include "policy/sql_pt_representation.h"
namespace policy_table = rpc::policy_table_interface_base;
@@ -68,22 +69,11 @@ CREATE_LOGGERPTR_GLOBAL(logger_, "CacheManager")
CacheManager::CacheManager()
: CacheManagerInterface(),
backup_(
+// EXTENDED_POLICY
new SQLPTRepresentation()
),
update_required(false) {
- LOG4CXX_AUTO_TRACE(logger_);
- backuper_ = new BackgroundBackuper(this);
- backup_thread_ = threads::CreateThread("Backup thread", backuper_);
- backup_thread_->start();
-}
-
-CacheManager::~CacheManager() {
- LOG4CXX_AUTO_TRACE(logger_);
- sync_primitives::AutoLock lock(backuper_locker_);
- backup_thread_->join();
- delete backup_thread_->delegate();
- threads::DeleteThread(backup_thread_);
}
bool CacheManager::CanAppKeepContext(const std::string &app_id) {
@@ -120,7 +110,6 @@ bool CacheManager::GetDefaultHMI(const std::string &app_id,
bool CacheManager::ResetUserConsent() {
CACHE_MANAGER_CHECK(false);
- sync_primitives::AutoLock lock (cache_lock_);
return true;
}
@@ -129,15 +118,16 @@ bool CacheManager::GetUserPermissionsForDevice(const std::string &device_id,
StringArray& consented_groups,
StringArray& disallowed_groups) {
- LOG4CXX_AUTO_TRACE(logger_);
+ LOG4CXX_TRACE_ENTER(logger_);
CACHE_MANAGER_CHECK(false);
+ LOG4CXX_TRACE_EXIT(logger_);
return true;
}
void CacheManager::GetAllAppGroups(const std::string& app_id,
FunctionalGroupIDs& all_group_ids) {
- LOG4CXX_AUTO_TRACE(logger_);
+ LOG4CXX_TRACE_ENTER(logger_);
CACHE_MANAGER_CHECK_VOID();
policy_table::ApplicationPolicies::const_iterator app_params_iter =
pt_->policy_table.app_policies.find(app_id);
@@ -154,13 +144,15 @@ void CacheManager::GetAllAppGroups(const std::string& app_id,
all_group_ids.push_back(group_id);
}
}
+ LOG4CXX_TRACE_EXIT(logger_);
}
void CacheManager::GetPreConsentedGroups(const std::string &app_id,
FunctionalGroupIDs& preconsented_groups) {
- LOG4CXX_AUTO_TRACE(logger_);
+ LOG4CXX_TRACE_ENTER(logger_);
CACHE_MANAGER_CHECK_VOID();
+ LOG4CXX_TRACE_EXIT(logger_);
}
void CacheManager::GetConsentedGroups(const std::string &device_id,
@@ -168,15 +160,17 @@ void CacheManager::GetConsentedGroups(const std::string &device_id,
FunctionalGroupIDs& allowed_groups,
FunctionalGroupIDs& disallowed_groups) {
- LOG4CXX_AUTO_TRACE(logger_);
+ LOG4CXX_TRACE_ENTER(logger_);
CACHE_MANAGER_CHECK_VOID();
+ LOG4CXX_TRACE_EXIT(logger_);
}
void CacheManager::GetUnconsentedGroups(const std::string& device_id,
const std::string& policy_app_id,
FunctionalGroupIDs& unconsented_groups) {
- LOG4CXX_AUTO_TRACE(logger_);
+ LOG4CXX_TRACE_ENTER(logger_);
CACHE_MANAGER_CHECK_VOID();
+ LOG4CXX_TRACE_EXIT(logger_);
}
void CacheManager::RemoveAppConsentForGroup(const std::string& app_id,
@@ -185,9 +179,8 @@ void CacheManager::RemoveAppConsentForGroup(const std::string& app_id,
}
bool CacheManager::ApplyUpdate(const policy_table::Table& update_pt) {
- LOG4CXX_AUTO_TRACE(logger_);
+ LOG4CXX_TRACE_ENTER(logger_);
CACHE_MANAGER_CHECK(false);
- sync_primitives::AutoLock auto_lock(cache_lock_);
pt_->policy_table.functional_groupings =
update_pt.policy_table.functional_groupings;
@@ -197,12 +190,7 @@ bool CacheManager::ApplyUpdate(const policy_table::Table& update_pt) {
update_pt.policy_table.app_policies.end();
for (;iter != iter_end; ++iter) {
- if (iter->second.is_null()) {
- pt_->policy_table.app_policies[iter->first].set_to_null();
- pt_->policy_table.app_policies[iter->first].set_to_string("");
- } else {
- pt_->policy_table.app_policies[iter->first] = iter->second;
- }
+ pt_->policy_table.app_policies[iter->first] = iter->second;
}
pt_->policy_table.module_config = update_pt.policy_table.module_config;
@@ -211,44 +199,45 @@ bool CacheManager::ApplyUpdate(const policy_table::Table& update_pt) {
pt_->policy_table.consumer_friendly_messages =
update_pt.policy_table.consumer_friendly_messages;
}
- Backup();
+
+ LOG4CXX_TRACE_EXIT(logger_);
return true;
}
-void CacheManager::GetHMIAppTypeAfterUpdate(std::map<std::string, StringArray>& app_hmi_types) {
- LOG4CXX_AUTO_TRACE(logger_);
+void CacheManager::Backup() {
CACHE_MANAGER_CHECK_VOID();
- policy_table::ApplicationPolicies::const_iterator policy_iter_begin =
- pt_->policy_table.app_policies.begin();
- policy_table::ApplicationPolicies::const_iterator policy_iter_end =
- pt_->policy_table.app_policies.end();
- std::vector<std::string> transform_app_hmi_types;
- for(; policy_iter_begin != policy_iter_end; ++policy_iter_begin) {
- const policy_table::ApplicationParams& app_params = (*policy_iter_begin).second;
- if(app_params.AppHMIType.is_initialized()) {
- if(!(transform_app_hmi_types.empty())) {
- transform_app_hmi_types.clear();
+ sync_primitives::AutoLock auto_lock(cache_lock_);
+ if (backup_.valid()) {
+ if (pt_.valid()) {
+ backup_->Save(*pt_);
+ backup_->SaveUpdateRequired(update_required);
+
+
+ policy_table::ApplicationPolicies::const_iterator app_policy_iter =
+ pt_->policy_table.app_policies.begin();
+ policy_table::ApplicationPolicies::const_iterator app_policy_iter_end =
+ pt_->policy_table.app_policies.end();
+
+ for (; app_policy_iter != app_policy_iter_end; ++app_policy_iter) {
+
+ const std::string app_id = (*app_policy_iter).first;
+ backup_->SaveApplicationCustomData(app_id,
+ IsApplicationRevoked(app_id),
+ IsDefaultPolicy(app_id),
+ is_predata_[app_id]);
}
- std::transform(app_params.AppHMIType->begin(), app_params.AppHMIType->end(),
- std::back_inserter(transform_app_hmi_types), AppHMITypeToString());
- app_hmi_types[(*policy_iter_begin).first] = transform_app_hmi_types;
+
+ // In case of extended policy the meta info should be backuped as well.
}
}
}
-void CacheManager::Backup() {
- sync_primitives::AutoLock lock(backuper_locker_);
- DCHECK(backuper_);
- backuper_->DoBackup();
-}
-
std::string CacheManager::currentDateTime() {
time_t now = time(0);
struct tm tstruct;
char buf[80];
tstruct = *localtime(&now);
- // ISO_8601 format is expected, e.g. “2000-01-01T12:18:53Z”
- strftime(buf, sizeof(buf), "%Y-%m-%dT%XZ", &tstruct);
+ strftime(buf, sizeof(buf), "%Y-%m-%d.%X", &tstruct);
return buf;
}
@@ -256,10 +245,11 @@ bool CacheManager::GetPermissionsForApp(const std::string &device_id,
const std::string &app_id,
FunctionalIdType& group_types) {
- LOG4CXX_AUTO_TRACE(logger_);
+ LOG4CXX_TRACE_ENTER(logger_);
GetAllAppGroups(app_id, group_types[kTypeGeneral]);
GetAllAppGroups(kDefaultId, group_types[kTypeDefault]);
GetAllAppGroups(kPreDataConsentId, group_types[kTypePreDataConsented]);
+ LOG4CXX_TRACE_EXIT(logger_);
return true;
}
@@ -267,8 +257,9 @@ bool CacheManager::GetDeviceGroupsFromPolicies(
policy_table::Strings& groups,
policy_table::Strings& preconsented_groups) {
- LOG4CXX_AUTO_TRACE(logger_);
+ LOG4CXX_TRACE_ENTER(logger_);
CACHE_MANAGER_CHECK(false);
+ LOG4CXX_TRACE_EXIT(logger_);
return true;
}
@@ -280,11 +271,11 @@ bool CacheManager::SetDeviceData(const std::string &device_id,
const std::string &carrier,
const uint32_t number_of_ports,
const std::string &connection_type) {
- LOG4CXX_AUTO_TRACE(logger_);
sync_primitives::AutoLock auto_lock(cache_lock_);
+ LOG4CXX_TRACE_ENTER(logger_);
CACHE_MANAGER_CHECK(false);
- Backup();
+ LOG4CXX_TRACE_EXIT(logger_);
return true;
}
@@ -292,19 +283,19 @@ bool CacheManager::SetUserPermissionsForDevice(
const std::string &device_id,
const StringArray &consented_groups,
const StringArray &disallowed_groups) {
- LOG4CXX_AUTO_TRACE(logger_);
sync_primitives::AutoLock auto_lock(cache_lock_);
+ LOG4CXX_TRACE_ENTER(logger_);
CACHE_MANAGER_CHECK(false);
- Backup();
+ LOG4CXX_TRACE_EXIT(logger_);
return true;
}
bool CacheManager::ReactOnUserDevConsentForApp(const std::string &app_id,
bool is_device_allowed) {
- LOG4CXX_AUTO_TRACE(logger_);
+ LOG4CXX_TRACE_ENTER(logger_);
CACHE_MANAGER_CHECK(false);
bool result = true;
- Backup();
+ LOG4CXX_TRACE_EXIT(logger_);
return result;
}
@@ -327,10 +318,10 @@ void CacheManager::GetGroupNameByHashID(const int32_t group_id,
bool CacheManager::SetUserPermissionsForApp(
const PermissionConsent &permissions) {
- LOG4CXX_AUTO_TRACE(logger_);
sync_primitives::AutoLock auto_lock(cache_lock_);
+ LOG4CXX_TRACE_ENTER(logger_);
CACHE_MANAGER_CHECK(false);
- Backup();
+ LOG4CXX_TRACE_EXIT(logger_);
return true;
}
@@ -339,11 +330,11 @@ bool CacheManager::UpdateRequired() const {
}
void CacheManager::SaveUpdateRequired(bool status) {
+
update_required = status;
- Backup();
}
-bool CacheManager::IsApplicationRevoked(const std::string& app_id) const {
+bool CacheManager::IsApplicationRevoked(const std::string& app_id) {
CACHE_MANAGER_CHECK(false);
bool is_revoked = false;
if (pt_->policy_table.app_policies.end() !=
@@ -358,7 +349,7 @@ void CacheManager::CheckPermissions(const PTString &app_id,
const PTString &hmi_level,
const PTString &rpc,
CheckPermissionResult &result) {
- LOG4CXX_AUTO_TRACE(logger_);
+ LOG4CXX_TRACE_ENTER(logger_);
CACHE_MANAGER_CHECK_VOID();
if (pt_->policy_table.app_policies.end() ==
@@ -408,6 +399,7 @@ void CacheManager::CheckPermissions(const PTString &app_id,
}
}
}
+ LOG4CXX_TRACE_EXIT(logger_);
}
bool CacheManager::IsPTPreloaded() {
@@ -420,7 +412,7 @@ int CacheManager::IgnitionCyclesBeforeExchange() {
const uint8_t limit = std::max(
static_cast<int>(
pt_->policy_table.module_config.exchange_after_x_ignition_cycles), 0);
- LOG4CXX_DEBUG(logger_, "IgnitionCyclesBeforeExchange limit:" << limit);
+
uint8_t current = 0;
@@ -429,22 +421,19 @@ int CacheManager::IgnitionCyclesBeforeExchange() {
int CacheManager::KilometersBeforeExchange(int current) {
CACHE_MANAGER_CHECK(0);
- const int limit = std::max(
+ const uint8_t limit = std::max(
static_cast<int>(
pt_->policy_table.module_config.exchange_after_x_kilometers), 0);
- LOG4CXX_DEBUG(logger_, "KilometersBeforeExchange limit:" << limit);
- int last = 0;
+ uint8_t last = 0;
- const int actual = std::max((current - last), 0);
- LOG4CXX_DEBUG(logger_, "KilometersBeforeExchange actual:" << actual);
+ const uint8_t actual = std::max((current - last), 0);
return std::max(limit - actual, 0);
}
bool CacheManager::SetCountersPassedForSuccessfulUpdate(int kilometers,
int days_after_epoch) {
CACHE_MANAGER_CHECK(false);
- Backup();
return true;
}
@@ -453,23 +442,19 @@ int CacheManager::DaysBeforeExchange(int current) {
const uint8_t limit = std::max(
static_cast<int>(
pt_->policy_table.module_config.exchange_after_x_days), 0);
- LOG4CXX_DEBUG(logger_, "DaysBeforeExchange limit:" << limit);
uint8_t last = 0;
const uint8_t actaul = std::max((current - last), 0);
- LOG4CXX_DEBUG(logger_, "DaysBeforeExchange actual:" << actaul);
return std::max(limit - actaul, 0);
}
void CacheManager::IncrementIgnitionCycles() {
CACHE_MANAGER_CHECK_VOID();
- Backup();
}
void CacheManager::ResetIgnitionCycles() {
CACHE_MANAGER_CHECK_VOID();
- Backup();
}
int CacheManager::TimeoutResponse() {
@@ -501,7 +486,7 @@ VehicleData CacheManager::GetVehicleData() {
std::vector<UserFriendlyMessage> CacheManager::GetUserFriendlyMsg(
const std::vector<std::string> &msg_codes, const std::string &language) {
- LOG4CXX_AUTO_TRACE(logger_);
+ LOG4CXX_TRACE_ENTER(logger_);
std::vector<UserFriendlyMessage> result;
CACHE_MANAGER_CHECK(result);
@@ -514,14 +499,15 @@ std::vector<UserFriendlyMessage> CacheManager::GetUserFriendlyMsg(
msg.message_code = *it;
result.push_back(msg);
}
+ LOG4CXX_TRACE_EXIT(logger_);
return result;
}
-void CacheManager::GetUpdateUrls(int service_type,
- EndpointUrls& end_points) {
- LOG4CXX_AUTO_TRACE(logger_);
+EndpointUrls CacheManager::GetUpdateUrls(int service_type) {
+ LOG4CXX_TRACE_ENTER(logger_);
- CACHE_MANAGER_CHECK_VOID();
+ EndpointUrls result;
+ CACHE_MANAGER_CHECK(result);
char buff[32];
sprintf(buff, "%x", service_type);
@@ -545,9 +531,11 @@ void CacheManager::GetUpdateUrls(int service_type,
std::copy((*url_list_iter).second.begin(), (*url_list_iter).second.end(),
std::back_inserter(data.url));
- end_points.push_back(data);
+ result.push_back(data);
}
}
+ LOG4CXX_TRACE_EXIT(logger_);
+ return result;
}
int CacheManager::GetNotificationsNumber(const std::string &priority) {
@@ -588,106 +576,10 @@ void CacheManager::CheckSnapshotInitialization() {
*(snapshot_->policy_table.module_config.preloaded_pt) = false;
}
-void CacheManager::PersistData() {
- LOG4CXX_AUTO_TRACE(logger_);
- if (backup_.valid()) {
- if (pt_.valid()) {
-
- cache_lock_.Acquire();
- policy_table::Table copy_pt(*pt_);
- cache_lock_.Release();
-
- backup_->Save(copy_pt);
- backup_->SaveUpdateRequired(update_required);
-
- policy_table::ApplicationPolicies::const_iterator app_policy_iter =
- copy_pt.policy_table.app_policies.begin();
- policy_table::ApplicationPolicies::const_iterator app_policy_iter_end =
- copy_pt.policy_table.app_policies.end();
-
- bool is_revoked = false;
- bool is_default_policy;
- bool is_predata_policy;
-
- for (; app_policy_iter != app_policy_iter_end; ++app_policy_iter) {
-
- const std::string app_id = (*app_policy_iter).first;
-
- if (copy_pt.policy_table.app_policies.end() !=
- copy_pt.policy_table.app_policies.find(app_id)) {
- is_revoked = copy_pt.policy_table.app_policies[app_id].is_null();
- }
-
- is_default_policy = copy_pt.policy_table.app_policies.end() !=
- copy_pt.policy_table.app_policies.find(app_id) &&
- policy::kDefaultId ==
- copy_pt.policy_table.app_policies[app_id].get_string();
-
- // TODO(AOleynik): Remove this field from DB
- is_predata_policy = copy_pt.policy_table.app_policies.end() !=
- copy_pt.policy_table.app_policies.find(app_id) &&
- policy::kPreDataConsentId ==
- copy_pt.policy_table.app_policies[app_id].get_string();
-
- backup_->SaveApplicationCustomData(app_id,
- is_revoked,
- is_default_policy,
- is_predata_policy);
- is_revoked = false;
- }
-
- // In case of extended policy the meta info should be backuped as well.
- backup_->WriteDb();
- }
- }
-}
-
-void CacheManager::ResetCalculatedPermissions() {
- LOG4CXX_TRACE(logger_, "ResetCalculatedPermissions");
- sync_primitives::AutoLock lock(calculated_permissions_lock_);
- calculated_permissions_.clear();
-}
-
-void CacheManager::AddCalculatedPermissions(
- const std::string& device_id,
- const std::string& policy_app_id,
- const Permissions& permissions) {
- LOG4CXX_DEBUG(logger_, "AddCalculatedPermissions for device: " << device_id
- << " and app: " << policy_app_id);
- sync_primitives::AutoLock lock(calculated_permissions_lock_);
- calculated_permissions_[device_id][policy_app_id] = permissions;
-}
-
-bool CacheManager::IsPermissionsCalculated(
- const std::string& device_id,
- const std::string& policy_app_id,
- Permissions& permission) {
- LOG4CXX_DEBUG(logger_, "IsPermissionsCalculated for device: " << device_id
- << " and app: " << policy_app_id);
- sync_primitives::AutoLock lock(calculated_permissions_lock_);
- CalculatedPermissions::const_iterator it =
- calculated_permissions_.find(device_id);
-
- if (calculated_permissions_.end() == it) {
- return false;
- }
-
- AppCalculatedPermissions::const_iterator app_it =
- (*it).second.find(policy_app_id);
- if ((*it).second.end() == app_it) {
- return false;
- } else {
- permission = (*app_it).second;
- return true;
- }
- return false;
-}
-
utils::SharedPtr<policy_table::Table>
CacheManager::GenerateSnapshot() {
CACHE_MANAGER_CHECK(snapshot_);
- snapshot_ = new policy_table::Table();
- snapshot_->policy_table = pt_->policy_table;
+ snapshot_ = utils::SharedPtr<policy_table::Table>(new policy_table::Table(pt_->policy_table));
CheckSnapshotInitialization();
return snapshot_;
}
@@ -696,7 +588,7 @@ bool CacheManager::GetInitialAppData(const std::string& app_id,
StringArray& nicknames,
StringArray& app_hmi_types) {
- LOG4CXX_AUTO_TRACE(logger_);
+ LOG4CXX_TRACE_ENTER(logger_);
CACHE_MANAGER_CHECK(false);
policy_table::ApplicationPolicies::const_iterator policy_iter =
pt_->policy_table.app_policies.find(app_id);
@@ -708,37 +600,38 @@ bool CacheManager::GetInitialAppData(const std::string& app_id,
std::back_inserter(nicknames));
std::transform(app_params.AppHMIType->begin(), app_params.AppHMIType->end(),
- std::back_inserter(app_hmi_types), AppHMITypeToString());
+ std::back_inserter(nicknames), AppHMITypeToString());
}
+ LOG4CXX_TRACE_EXIT(logger_);
return true;
}
bool CacheManager::GetFunctionalGroupings(
policy_table::FunctionalGroupings& groups) {
- LOG4CXX_AUTO_TRACE(logger_);
+ LOG4CXX_TRACE_ENTER(logger_);
CACHE_MANAGER_CHECK(false);
const policy_table::FunctionalGroupings& f_groupings =
pt_->policy_table.functional_groupings;
groups.insert(f_groupings.begin(), f_groupings.end());
+ LOG4CXX_TRACE_EXIT(logger_);
return true;
}
-int CacheManager::CountUnconsentedGroups(const std::string& policy_app_id,
- const std::string& device_id) {
- LOG4CXX_AUTO_TRACE(logger_);
+bool CacheManager::CountUnconsentedGroups(const std::string& policy_app_id,
+ const std::string& device_id,
+ int& result) {
+ LOG4CXX_TRACE_ENTER(logger_);
CACHE_MANAGER_CHECK(false);
- LOG4CXX_DEBUG(logger_, "Application id: " << policy_app_id);
- int result = 0;
- return result;
+ LOG4CXX_TRACE_EXIT(logger_);
+ return true;
}
bool CacheManager::SetMetaInfo(const std::string &ccpu_version,
const std::string &wers_country_code,
const std::string &language) {
CACHE_MANAGER_CHECK(false);
- Backup();
return true;
}
@@ -750,12 +643,11 @@ bool CacheManager::IsMetaInfoPresent() const {
bool CacheManager::SetSystemLanguage(const std::string &language) {
CACHE_MANAGER_CHECK(false);
- Backup();
return true;
}
bool CacheManager::GetFunctionalGroupNames(FunctionalGroupNames &names) {
- LOG4CXX_AUTO_TRACE(logger_);
+ LOG4CXX_TRACE_ENTER(logger_);
CACHE_MANAGER_CHECK(false);
rpc::policy_table_interface_base::FunctionalGroupings::iterator iter =
pt_->policy_table.functional_groupings.begin();
@@ -769,38 +661,39 @@ bool CacheManager::GetFunctionalGroupNames(FunctionalGroupNames &names) {
names.insert(std::pair<uint32_t, std::pair<std::string, std::string> >(id, value));
}
+ LOG4CXX_TRACE_EXIT(logger_);
return true;
}
-bool CacheManager::CleanupUnpairedDevices() {
+bool CacheManager::CleanupUnpairedDevices(const DeviceIds &device_ids) {
CACHE_MANAGER_CHECK(false);
- Backup();
return true;
}
void CacheManager::Increment(usage_statistics::GlobalCounterId type) {
CACHE_MANAGER_CHECK_VOID();
- Backup();
}
void CacheManager::Increment(const std::string &app_id,
usage_statistics::AppCounterId type) {
CACHE_MANAGER_CHECK_VOID();
- Backup();
}
void CacheManager::Set(const std::string &app_id,
usage_statistics::AppInfoId type,
const std::string &value) {
CACHE_MANAGER_CHECK_VOID();
- Backup();
}
void CacheManager::Add(const std::string &app_id,
usage_statistics::AppStopwatchId type,
int seconds) {
CACHE_MANAGER_CHECK_VOID();
- Backup();
+}
+
+void CacheManager::CopyInternalParams(const std::string &from,
+ const std::string& to) {
+ is_predata_[to] = is_predata_[from];
}
long CacheManager::ConvertSecondsToMinute(int seconds) {
@@ -816,9 +709,12 @@ bool CacheManager::SetDefaultPolicy(const std::string &app_id) {
pt_->policy_table.app_policies[app_id] =
pt_->policy_table.app_policies[kDefaultId];
- SetIsDefault(app_id);
+ CopyInternalParams(kDefaultId, app_id);
+ SetIsDefault(app_id, true);
+ SetIsPredata(app_id, false);
+
+ pt_->policy_table.app_policies[app_id].set_to_string(kDefaultId);
}
- Backup();
return true;
}
@@ -827,18 +723,22 @@ bool CacheManager::IsDefaultPolicy(const std::string& app_id) {
const bool result =
pt_->policy_table.app_policies.end() !=
pt_->policy_table.app_policies.find(app_id) &&
- policy::kDefaultId ==
- pt_->policy_table.app_policies[app_id].get_string();
+ !pt_->policy_table.app_policies[app_id].get_string().empty();
return result;
}
-bool CacheManager::SetIsDefault(const std::string& app_id) {
+bool CacheManager::SetIsDefault(const std::string& app_id,
+ bool is_default) {
CACHE_MANAGER_CHECK(false);
policy_table::ApplicationPolicies::const_iterator iter =
pt_->policy_table.app_policies.find(app_id);
if (pt_->policy_table.app_policies.end() != iter) {
- pt_->policy_table.app_policies[app_id].set_to_string(kDefaultId);
+ if (is_default) {
+ pt_->policy_table.app_policies[app_id].set_to_string("default");
+ } else {
+ pt_->policy_table.app_policies[app_id].set_to_string("");
+ }
}
return true;
}
@@ -848,64 +748,53 @@ bool CacheManager::SetPredataPolicy(const std::string &app_id) {
policy_table::ApplicationPolicies::const_iterator iter =
pt_->policy_table.app_policies.find(kPreDataConsentId);
- if (pt_->policy_table.app_policies.end() == iter) {
- LOG4CXX_ERROR(logger_, "Could not set " << kPreDataConsentId
- << " permissions for app " << app_id);
- return false;
- }
+ if (pt_->policy_table.app_policies.end() != iter) {
+ pt_->policy_table.app_policies[app_id] =
+ pt_->policy_table.app_policies[kPreDataConsentId];
- pt_->policy_table.app_policies[app_id] =
- pt_->policy_table.app_policies[kPreDataConsentId];
+ CopyInternalParams(kPreDataConsentId, app_id);
- pt_->policy_table.app_policies[app_id].set_to_string(kPreDataConsentId);
+ SetIsPredata(app_id, true);
+ SetIsDefault(app_id, false);
+ }
+ return true;
+}
- Backup();
+bool CacheManager::SetIsPredata(const std::string &app_id, bool is_pre_data) {
+ is_predata_[app_id] = is_pre_data;
return true;
}
bool CacheManager::IsPredataPolicy(const std::string &app_id) {
- // TODO(AOleynik): Maybe change for comparison with pre_DataConsent
- // permissions or check string value from get_string()
- policy_table::ApplicationParams& pre_data_app =
- pt_->policy_table.app_policies[kPreDataConsentId];
- policy_table::ApplicationParams& specific_app =
- pt_->policy_table.app_policies[app_id];
+ const bool result =
+ (is_predata_.end() != is_predata_.find(app_id)) && is_predata_[app_id];
+ return result;
+}
- policy_table::Strings res;
- std::set_intersection(pre_data_app.groups.begin(),
- pre_data_app.groups.end(),
- specific_app.groups.begin(),
- specific_app.groups.end(),
- std::back_inserter(res));
+bool CacheManager::SetUnpairedDevice(const std::string &device_id) {
- return !res.empty();
+ const bool result = is_unpaired_.end() != is_unpaired_.find(device_id);
+ if (result) {
+ is_unpaired_[device_id] = true;
+ }
+ return result;
}
-bool CacheManager::SetUnpairedDevice(const std::string &device_id,
- bool unpaired) {
- const bool result =
- pt_->policy_table.device_data->end() !=
- pt_->policy_table.device_data->find(device_id);
- if (!result) {
- LOG4CXX_DEBUG(logger_, "Couldn't set unpaired flag for device id "
- << device_id << " , since it wasn't found.");
- return false;
- }
+bool CacheManager::UnpairedDevicesList(DeviceIds& device_ids) {
- sync_primitives::AutoLock lock(unpaired_lock_);
- if (unpaired) {
- is_unpaired_.insert(device_id);
- LOG4CXX_DEBUG(logger_, "Unpaired flag was set for device id " << device_id);
- } else {
- is_unpaired_.erase(device_id);
- LOG4CXX_DEBUG(logger_, "Unpaired flag was removed for device id " << device_id);
+ std::map<std::string, bool>::const_iterator iter = is_unpaired_.begin();
+ std::map<std::string, bool>::const_iterator iter_end = is_unpaired_.end();
+
+ for (; iter != iter_end; ++iter) {
+ if ((*iter).second) {
+ device_ids.push_back((*iter).first);
+ }
}
- return result;
+ return true;
}
bool CacheManager::SetVINValue(const std::string& value) {
CACHE_MANAGER_CHECK(false);
- Backup();
return true;
}
@@ -917,7 +806,7 @@ bool CacheManager::IsApplicationRepresented(const std::string& app_id) const {
}
bool CacheManager::Init(const std::string& file_name) {
- LOG4CXX_AUTO_TRACE(logger_);
+ LOG4CXX_INFO(logger_, "CacheManager::Init");
InitResult init_result = backup_->Init();
@@ -940,62 +829,75 @@ bool CacheManager::Init(const std::string& file_name) {
return result;
}
+void CacheManager::FillAppSpecificData() {
+ CACHE_MANAGER_CHECK_VOID();
+ policy_table::ApplicationPolicies::const_iterator iter =
+ pt_->policy_table.app_policies.begin();
+ policy_table::ApplicationPolicies::const_iterator iter_end =
+ pt_->policy_table.app_policies.begin();
+
+ for (; iter != iter_end; ++iter) {
+ const std::string& app_name = (*iter).first;
+
+ is_predata_.insert(std::make_pair(app_name, backup_->IsPredataPolicy(app_name)));
+ }
+}
+
void CacheManager::FillDeviceSpecificData() {
}
bool CacheManager::LoadFromBackup() {
- sync_primitives::AutoLock lock(cache_lock_);
pt_ = backup_->GenerateSnapshot();
update_required = backup_->UpdateRequired();
+ FillAppSpecificData();
FillDeviceSpecificData();
return true;
}
bool CacheManager::LoadFromFile(const std::string& file_name) {
- LOG4CXX_AUTO_TRACE(logger_);
+
+ LOG4CXX_INFO(logger_, "CacheManager::LoadFromFile");
BinaryMessage json_string;
- if (!file_system::ReadBinaryFile(file_name, json_string)) {
- LOG4CXX_FATAL(logger_, "Failed to read pt file.");
- return false;
+ bool final_result = false;
+ final_result = file_system::ReadBinaryFile(file_name, json_string);
+ if (!final_result) {
+ LOG4CXX_WARN(logger_, "Failed to read pt file.");
+ return final_result;
}
Json::Value value;
Json::Reader reader(Json::Features::strictMode());
std::string json(json_string.begin(), json_string.end());
- if (!reader.parse(json.c_str(), value)) {
- LOG4CXX_FATAL(
- logger_,
- "Preloaded PT is corrupted: " << reader.getFormattedErrorMessages());
- return false;
+ bool ok = reader.parse(json.c_str(), value);
+ if (ok) {
+ pt_ = new policy_table::Table(&value);
+ } else {
+ LOG4CXX_WARN(logger_, reader.getFormattedErrorMessages());
}
- LOG4CXX_TRACE(logger_, "Start create PT");
- sync_primitives::AutoLock locker(cache_lock_);
- backup_->Clear();
+ if (!pt_) {
+ LOG4CXX_WARN(logger_, "Failed to parse policy table");
+ return false;
+ }
- pt_ = new policy_table::Table(&value);
- if (pt_->is_valid()) {
- if (backup_->Save(*pt_)) {
- backup_->WriteDb();
- return true;
- } else {
- LOG4CXX_FATAL(logger_, "Failed to save PT");
- return false;
- }
- } else {
+ if (!pt_->is_valid()) {
rpc::ValidationReport report("policy_table");
pt_->ReportErrors(&report);
- LOG4CXX_FATAL(logger_,
- "Parsed table is not valid " << rpc::PrettyFormat(report));
- return false;
+ LOG4CXX_WARN(logger_, "Parsed table is not valid " <<
+ rpc::PrettyFormat(report));
}
+
+ final_result = backup_->Save(*pt_);
+ LOG4CXX_INFO(
+ logger_,
+ "Loading from file was " << (final_result ? "successful" : "unsuccessful"));
+ return final_result;
}
bool CacheManager::ResetPT(const std::string& file_name) {
bool result = true;
- Backup();
return result;
}
@@ -1022,55 +924,4 @@ int32_t CacheManager::GenerateHash(const std::string& str_to_hash) {
return result;
}
-CacheManager::BackgroundBackuper::BackgroundBackuper(CacheManager* cache_manager)
- : cache_manager_(cache_manager),
- stop_flag_(false),
- new_data_available_(false) {
- LOG4CXX_AUTO_TRACE(logger_);
}
-
-CacheManager::BackgroundBackuper::~BackgroundBackuper() {
- LOG4CXX_AUTO_TRACE(logger_);
-}
-
-void CacheManager::BackgroundBackuper::InternalBackup() {
- LOG4CXX_AUTO_TRACE(logger_);
- DCHECK(cache_manager_);
-
- while (new_data_available_) {
- new_data_available_ = false;
- LOG4CXX_DEBUG(logger_, "DoBackup");
- cache_manager_->PersistData();
- }
-}
-
-void CacheManager::BackgroundBackuper::threadMain() {
- LOG4CXX_AUTO_TRACE(logger_);
- sync_primitives::AutoLock lock(need_backup_lock_);
- while (!stop_flag_) {
- need_backup_lock_.Release();
- InternalBackup();
- need_backup_lock_.Acquire();
- if (new_data_available_ || stop_flag_) {
- continue;
- }
- LOG4CXX_DEBUG(logger_, "Wait for a next backup");
- backup_notifier_.Wait(need_backup_lock_);
- }
-}
-
-void CacheManager::BackgroundBackuper::exitThreadMain() {
- LOG4CXX_AUTO_TRACE(logger_);
- sync_primitives::AutoLock auto_lock(need_backup_lock_);
- stop_flag_ = true;
- backup_notifier_.NotifyOne();
-}
-
-void CacheManager::BackgroundBackuper::DoBackup() {
- LOG4CXX_AUTO_TRACE(logger_);
- sync_primitives::AutoLock auto_lock(need_backup_lock_);
- new_data_available_ = true;
- backup_notifier_.NotifyOne();
-}
-
-} // namespace policy
diff --git a/src/components/policy/src/policy/src/policy_helper.cc b/src/components/policy/src/policy/src/policy_helper.cc
index 907bc8a8e5..71f91aea60 100644
--- a/src/components/policy/src/policy/src/policy_helper.cc
+++ b/src/components/policy/src/policy/src/policy_helper.cc
@@ -126,10 +126,6 @@ bool CheckAppPolicy::HasSameGroups(const AppPoliciesValueType& app_policy,
std::pair<StringsConstItr, StringsConstItr> diff;
- // PM has to notify app about changed permissions, i.e. groups, even if these
- // groups don't require user consent
- bool is_new_group_present = false;
-
while (it_groups_new_end != new_it && it_groups_curr_end != old_it) {
size_t size = ((it_groups_new_end - new_it) > (it_groups_curr_end - old_it))
? it_groups_curr_end - old_it : it_groups_new_end - new_it;
@@ -140,7 +136,7 @@ bool CheckAppPolicy::HasSameGroups(const AppPoliciesValueType& app_policy,
break;
}
if (Compare(*diff.first, *diff.second) &&
- IsConsentRequired(app_id, *(diff.first))) {
+ IsConsentRequired(*(diff.first))) {
perms->isAppPermissionsRevoked = true;
FunctionalGroupPermission group;
group.group_name = *(diff.first);
@@ -148,18 +144,17 @@ bool CheckAppPolicy::HasSameGroups(const AppPoliciesValueType& app_policy,
old_it = ++diff.first;
new_it = diff.second;
} else {
- is_new_group_present = true;
// according to the SDLAQ-CRS-2757 we have to set
// appPermissionsConsentNeeded should not be set to true
// in case if this group is auto-allowed
- perms->appPermissionsConsentNeeded = IsConsentRequired(app_id, *new_it);
+ perms->appPermissionsConsentNeeded = IsConsentRequired(*new_it);
old_it = diff.first;
new_it = ++diff.second;
}
}
for (StringsConstItr it = old_it; it != it_groups_curr_end; ++it) {
- if (!IsConsentRequired(app_id, *it)) {
+ if (!IsConsentRequired(*it)) {
continue;
}
perms->isAppPermissionsRevoked = true;
@@ -169,16 +164,11 @@ bool CheckAppPolicy::HasSameGroups(const AppPoliciesValueType& app_policy,
}
if (it_groups_new_end != new_it) {
- is_new_group_present = true;
- for (; new_it != it_groups_new_end; ++new_it) {
- if (IsConsentRequired(app_id, *new_it)) {
- perms->appPermissionsConsentNeeded = true;
- break;
- }
- }
+ perms->appPermissionsConsentNeeded = true;
}
if (perms->isAppPermissionsRevoked) {
+
std::vector<policy::FunctionalGroupPermission>::const_iterator it =
perms->appRevokedPermissions.begin();
std::vector<policy::FunctionalGroupPermission>::const_iterator it_end =
@@ -190,8 +180,7 @@ bool CheckAppPolicy::HasSameGroups(const AppPoliciesValueType& app_policy,
return !(perms->appRevokedPermissions.size() > 0
- || perms->appPermissionsConsentNeeded
- || is_new_group_present);
+ || perms->appPermissionsConsentNeeded);
}
bool CheckAppPolicy::IsNewAppication(const std::string& application_id) const {
@@ -247,7 +236,6 @@ void CheckAppPolicy::SendOnPendingPermissions(
}
// TODO(AOleynik): Seems, it is unused part?
if (permissions.isAppPermissionsRevoked) {
- sync_primitives::AutoLock lock(pm_->app_permissions_diff_lock_);
pm_->app_permissions_diff_.insert(
std::make_pair(app_policy.first, permissions));
pm_->listener()->OnPendingPermissionChange(app_policy.first);
@@ -256,7 +244,6 @@ void CheckAppPolicy::SendOnPendingPermissions(
bool CheckAppPolicy::IsAppRevoked(
const AppPoliciesValueType& app_policy) const {
- LOG4CXX_AUTO_TRACE(logger_);
// Application params are not initialized = application revoked
// i.e. "123":null
return app_policy.second.is_null();
@@ -295,9 +282,7 @@ bool CheckAppPolicy::operator()(const AppPoliciesValueType& app_policy) {
// Check revocation
if (!IsPredefinedApp(app_policy) && IsAppRevoked(app_policy)) {
permissions_diff.appRevoked = true;
- pm_->app_permissions_diff_lock_.Acquire();
pm_->app_permissions_diff_.insert(std::make_pair(app_id, permissions_diff));
- pm_->app_permissions_diff_lock_.Release();
pm_->listener()->OnAppRevoked(app_id);
policy_table::ApplicationPolicies::iterator it = current_policies.find(
app_id);
@@ -324,9 +309,7 @@ bool CheckAppPolicy::operator()(const AppPoliciesValueType& app_policy) {
if (!IsPredefinedApp(app_policy) && !NicknamesMatch(app_id, app_policy)) {
permissions_diff.appUnauthorized = true;
- pm_->app_permissions_diff_lock_.Acquire();
pm_->app_permissions_diff_.insert(std::make_pair(app_id, permissions_diff));
- pm_->app_permissions_diff_lock_.Release();
pm_->listener()->OnPendingPermissionChange(app_policy.first);
policy_table::ApplicationPolicies::iterator it = current_policies.find(
app_id);
@@ -360,20 +343,15 @@ bool CheckAppPolicy::operator()(const AppPoliciesValueType& app_policy) {
return true;
}
-bool CheckAppPolicy::IsConsentRequired(const std::string& app_id,
- const std::string& group_name) const {
+bool CheckAppPolicy::IsConsentRequired(const std::string& group_name) const {
const policy_table::FunctionalGroupings& functional_groupings =
snapshot_->policy_table.functional_groupings;
-
FuncGroupConstItr it = functional_groupings.find(group_name);
-
if (functional_groupings.end() == it) {
return false;
}
- bool is_preconsented = false;
-
- return it->second.user_consent_prompt.is_initialized() && !is_preconsented;
+ return it->second.user_consent_prompt.is_initialized();
}
FillNotificationData::FillNotificationData(Permissions& data,
diff --git a/src/components/policy/src/policy/src/policy_manager_impl.cc b/src/components/policy/src/policy/src/policy_manager_impl.cc
index 01bbf063e0..a712019c7c 100644
--- a/src/components/policy/src/policy/src/policy_manager_impl.cc
+++ b/src/components/policy/src/policy/src/policy_manager_impl.cc
@@ -33,7 +33,6 @@
#include <algorithm>
#include <set>
-#include <queue>
#include <iterator>
#include "json/reader.h"
#include "json/writer.h"
@@ -42,10 +41,8 @@
#include "policy/policy_helper.h"
#include "utils/file_system.h"
#include "utils/logger.h"
-#include "utils/date_time.h"
#include "policy/cache_manager.h"
#include "policy/update_status_manager.h"
-#include "config_profile/profile.h"
policy::PolicyManager* CreateManager() {
return new policy::PolicyManagerImpl();
@@ -97,15 +94,24 @@ CREATE_LOGGERPTR_GLOBAL(logger_, "PolicyManagerImpl")
PolicyManagerImpl::PolicyManagerImpl()
: PolicyManager(),
listener_(NULL),
+ update_status_manager_(new UpdateStatusManager),
cache_(new CacheManager),
retry_sequence_timeout_(60),
- retry_sequence_index_(0),
- ignition_check(true) {
+ retry_sequence_index_(0) {
}
void PolicyManagerImpl::set_listener(PolicyListener* listener) {
listener_ = listener;
- update_status_manager_.set_listener(listener);
+ update_status_manager_->set_listener(listener);
+}
+
+PolicyManagerImpl::~PolicyManagerImpl() {
+ LOG4CXX_INFO(logger_, "Destroying policy manager.");
+ const bool update_required =
+ policy::StatusUpToDate != update_status_manager_->GetUpdateStatus()
+ ? true : false;
+ cache_->SaveUpdateRequired(update_required);
+ cache_->Backup();
}
utils::SharedPtr<policy_table::Table> PolicyManagerImpl::Parse(
@@ -120,21 +126,6 @@ utils::SharedPtr<policy_table::Table> PolicyManagerImpl::Parse(
}
}
-void PolicyManagerImpl::CheckTriggers() {
- LOG4CXX_AUTO_TRACE(logger_);
- const bool exceed_ignition_cycles = ExceededIgnitionCycles();
- const bool exceed_days = ExceededDays();
-
- LOG4CXX_DEBUG(
- logger_,
- "\nDays exceeded: " << std::boolalpha << exceed_ignition_cycles <<
- "\nStatusUpdateRequired: " << std::boolalpha<< exceed_days);
-
- if (exceed_ignition_cycles || exceed_days) {
- update_status_manager_.ScheduleUpdate();
- }
-}
-
bool PolicyManagerImpl::LoadPT(const std::string& file,
const BinaryMessage& pt_content) {
LOG4CXX_INFO(logger_, "LoadPT of size " << pt_content.size());
@@ -143,7 +134,7 @@ bool PolicyManagerImpl::LoadPT(const std::string& file,
utils::SharedPtr<policy_table::Table> pt_update = Parse(pt_content);
if (!pt_update) {
LOG4CXX_WARN(logger_, "Parsed table pointer is 0.");
- update_status_manager_.OnWrongUpdateReceived();
+ update_status_manager_->OnWrongUpdateReceived();
return false;
}
pt_update->SetPolicyTableType(policy_table::PT_UPDATE);
@@ -155,12 +146,11 @@ bool PolicyManagerImpl::LoadPT(const std::string& file,
LOG4CXX_WARN(logger_, "Parsed table is not valid " <<
rpc::PrettyFormat(report));
- update_status_manager_.OnWrongUpdateReceived();
+ update_status_manager_->OnWrongUpdateReceived();
return false;
}
- update_status_manager_.OnValidUpdateReceived();
- cache_->SaveUpdateRequired(false);
+ update_status_manager_->OnValidUpdateReceived();
sync_primitives::AutoLock lock(apps_registration_lock_);
@@ -180,28 +170,36 @@ bool PolicyManagerImpl::LoadPT(const std::string& file,
CheckPermissionsChanges(pt_update, policy_table_snapshot);
// Replace current data with updated
+
+
if (!cache_->ApplyUpdate(*pt_update)) {
LOG4CXX_WARN(logger_, "Unsuccessful save of updated policy table.");
return false;
}
-
- std::map<std::string, StringArray> app_hmi_types;
- cache_->GetHMIAppTypeAfterUpdate(app_hmi_types);
- if (!app_hmi_types.empty()) {
- LOG4CXX_INFO(logger_, "app_hmi_types is full calling OnUpdateHMIAppType");
- listener_->OnUpdateHMIAppType(app_hmi_types);
- }else{
- LOG4CXX_INFO(logger_, "app_hmi_types empty" << pt_content.size());
- }
+ // Removing last app request from update requests
+ RemoveAppFromUpdateList();
// If there was a user request for policy table update, it should be started
// right after current update is finished
- if (update_status_manager_.IsUpdateRequired()) {
- StartPTExchange();
+ if(listener_) {
+ RefreshRetrySequence();
+ listener_->OnUserRequestedUpdateCheckRequired();
return true;
}
+
+ // TODO(AOleynik): Check, if there is updated info present for apps in list
+ // and skip update in this case for given app
+ if (!update_requests_list_.empty()) {
+ if (listener_) {
+ listener_->OnPTExchangeNeeded();
+ }
+ } else {
+ LOG4CXX_INFO(logger_, "Update request queue is empty.");
+ }
+
RefreshRetrySequence();
+
return true;
}
@@ -226,109 +224,74 @@ void PolicyManagerImpl::PrepareNotificationData(
std::for_each(group_names.begin(), group_names.end(), processor);
}
+void PolicyManagerImpl::AddAppToUpdateList(const std::string& application_id) {
+ sync_primitives::AutoLock lock(update_request_list_lock_);
+ LOG4CXX_INFO(logger_,
+ "Adding application " << application_id << " to update list");
+ // Add application id only once
+ std::list<std::string>::const_iterator it = std::find(
+ update_requests_list_.begin(), update_requests_list_.end(),
+ application_id);
+ if (it == update_requests_list_.end()) {
+ update_requests_list_.push_back(application_id);
+ }
+}
+
+void PolicyManagerImpl::RemoveAppFromUpdateList() {
+ sync_primitives::AutoLock lock(update_request_list_lock_);
+ if (update_requests_list_.empty()) {
+ return;
+ }
+ LOG4CXX_INFO(
+ logger_,
+ "Removing application " << update_requests_list_.front() << " from update list");
+ update_requests_list_.pop_front();
+}
+
std::string PolicyManagerImpl::GetUpdateUrl(int service_type) {
- LOG4CXX_AUTO_TRACE(logger_);
- EndpointUrls urls;
- cache_->GetUpdateUrls(service_type, urls);
+ LOG4CXX_INFO(logger_, "PolicyManagerImpl::GetUpdateUrl");
+ EndpointUrls urls = cache_->GetUpdateUrls(service_type);
+ static uint32_t index = 0;
std::string url;
- if (!urls.empty()) {
- static uint32_t index = 0;
-
- if (!urls.empty() && index >= urls.size()) {
- index = 0;
- }
- url = urls[index].url.empty() ? "" :urls[index].url[0];
- ++index;
- } else {
- LOG4CXX_ERROR(logger_, "The endpoint entry is empty");
+ if (!urls.empty() && index >= urls.size()) {
+ index = 0;
}
+ url = urls[index].url.empty() ? "" :urls[index].url[0];
+
+ ++index;
return url;
}
-void PolicyManagerImpl::GetUpdateUrls(int service_type, EndpointUrls& end_points) {
- LOG4CXX_AUTO_TRACE(logger_);
- cache_->GetUpdateUrls(service_type, end_points);
+EndpointUrls PolicyManagerImpl::GetUpdateUrls(int service_type) {
+ LOG4CXX_INFO(logger_, "PolicyManagerImpl::GetUpdateUrls");
+ return cache_->GetUpdateUrls(service_type);
}
-void PolicyManagerImpl::RequestPTUpdate() {
- LOG4CXX_AUTO_TRACE(logger_);
+BinaryMessageSptr PolicyManagerImpl::RequestPTUpdate() {
+ LOG4CXX_INFO(logger_, "Creating PT Snapshot");
utils::SharedPtr<policy_table::Table> policy_table_snapshot =
cache_->GenerateSnapshot();
if (!policy_table_snapshot) {
LOG4CXX_ERROR(logger_, "Failed to create snapshot of policy table");
- return;
+ return NULL;
}
policy_table_snapshot->SetPolicyTableType(policy_table::PT_SNAPSHOT);
if (false == policy_table_snapshot->is_valid()) {
- LOG4CXX_ERROR(
+ LOG4CXX_INFO(
logger_, "Policy snappshot is not valid");
rpc::ValidationReport report("policy_table");
policy_table_snapshot->ReportErrors(&report);
- LOG4CXX_DEBUG(logger_,
+ LOG4CXX_INFO(logger_,
"Errors: " << rpc::PrettyFormat(report));
}
Json::Value value = policy_table_snapshot->ToJsonValue();
Json::FastWriter writer;
std::string message_string = writer.write(value);
-
- BinaryMessage update(message_string.begin(), message_string.end());
-
- listener_->OnSnapshotCreated(update,
- RetrySequenceDelaysSeconds(),
- TimeoutExchange());
-}
-
-bool PolicyManagerImpl::HasConsentedDevice() {
- LOG4CXX_AUTO_TRACE(logger_);
- std::queue<std::string> apps;
- listener_->GetAvailableApps(apps);
- bool result = !apps.empty();
-
- if(result) {
- LOG4CXX_INFO(logger_, "App list is not empty");
- std::string device_id;
- std::string app_id;
- while(!apps.empty()) {
- app_id = apps.front();
- LOG4CXX_INFO(logger_, "App to get update: " << app_id);
- device_id = listener_->OnCurrentDeviceIdUpdateRequired(app_id);
- result = (kDeviceAllowed == GetUserConsentForDevice(device_id));
-
- if (result) {
- break;
- }
-
- apps.pop();
- }
- }
- LOG4CXX_INFO(logger_, "HasConsent result: " << result);
- return result;
-}
-
-void PolicyManagerImpl::StartPTExchange() {
- LOG4CXX_AUTO_TRACE(logger_);
-
- if (update_status_manager_.IsUpdatePending()) {
- update_status_manager_.ScheduleUpdate();
- LOG4CXX_INFO(logger_, "Starting exchange skipped, since another exchange "
- "is in progress.");
- return;
- }
-
- if (HasConsentedDevice()) {
- if (ignition_check) {
- CheckTriggers();
- ignition_check = false;
- }
-
- if (update_status_manager_.IsUpdateRequired()) {
- RequestPTUpdate();
- }
- }
+ return new BinaryMessage(message_string.begin(), message_string.end());
}
void PolicyManagerImpl::CheckPermissions(const PTString& app_id,
@@ -352,7 +315,6 @@ bool PolicyManagerImpl::ResetUserConsent() {
void PolicyManagerImpl::SendNotificationOnPermissionsUpdated(
const std::string& application_id) {
- LOG4CXX_AUTO_TRACE(logger_);
const std::string device_id = GetCurrentDeviceId(application_id);
if (device_id.empty()) {
LOG4CXX_WARN(logger_, "Couldn't find device info for application id "
@@ -380,30 +342,28 @@ void PolicyManagerImpl::SendNotificationOnPermissionsUpdated(
notification_data);
LOG4CXX_INFO(logger_, "Send notification for application_id:" << application_id);
-
std::string default_hmi;
default_hmi = "NONE";
-
listener()->OnPermissionsUpdated(application_id, notification_data,
default_hmi);
}
bool PolicyManagerImpl::CleanupUnpairedDevices() {
LOG4CXX_INFO(logger_, "CleanupUnpairedDevices");
+// EXTENDED_POLICY
// For SDL-specific it doesn't matter
return true;
}
DeviceConsent PolicyManagerImpl::GetUserConsentForDevice(
const std::string& device_id) {
- LOG4CXX_AUTO_TRACE(logger_);
+ LOG4CXX_INFO(logger_, "GetUserConsentForDevice");
return kDeviceAllowed;
}
void PolicyManagerImpl::SetUserConsentForDevice(const std::string& device_id,
bool is_allowed) {
LOG4CXX_INFO(logger_, "SetUserConsentForDevice");
- LOG4CXX_DEBUG(logger_, "Device :" << device_id);
DeviceConsent current_consent = GetUserConsentForDevice(device_id);
bool is_current_device_allowed =
DeviceConsent::kDeviceAllowed == current_consent ? true : false;
@@ -434,7 +394,6 @@ bool PolicyManagerImpl::GetInitialAppData(const std::string& application_id,
void PolicyManagerImpl::SetDeviceInfo(const std::string& device_id,
const DeviceInfo& device_info) {
LOG4CXX_INFO(logger_, "SetDeviceInfo");
- LOG4CXX_DEBUG(logger_, "Device :" << device_id);
}
PermissionConsent PolicyManagerImpl::EnsureCorrectPermissionConsent(
@@ -471,48 +430,6 @@ PermissionConsent PolicyManagerImpl::EnsureCorrectPermissionConsent(
return permissions_to_set;
}
-void PolicyManagerImpl::CheckPendingPermissionsChanges(
- const std::string& policy_app_id,
- const std::vector<FunctionalGroupPermission>& current_permissions) {
- LOG4CXX_INFO(logger_, "CheckPendingPermissionsChanges");
- sync_primitives::AutoLock lock(app_permissions_diff_lock_);
- std::map<std::string, AppPermissions>::iterator it_pending =
- app_permissions_diff_.find(policy_app_id);
- if (app_permissions_diff_.end() == it_pending) {
- LOG4CXX_WARN(logger_,
- "No pending permissions had been found for appID: "
- << policy_app_id);
- return;
- }
-
- LOG4CXX_DEBUG(logger_,
- "Pending permissions had been found for appID: "
- << policy_app_id);
-
- // Change appPermissionsConsentNeeded depending on unconsented groups
- // presence
- std::vector<policy::FunctionalGroupPermission>::const_iterator it_groups =
- current_permissions.begin();
- std::vector<policy::FunctionalGroupPermission>::const_iterator it_end_groups =
- current_permissions.end();
-
- for (; it_groups != it_end_groups; ++it_groups) {
- if (policy::kGroupUndefined == it_groups->state) {
- LOG4CXX_DEBUG(logger_,
- "Unconsented groups still present for appID: "
- << policy_app_id);
- it_pending->second.appPermissionsConsentNeeded = true;
- return;
- }
- }
-
- LOG4CXX_DEBUG(logger_,
- "Unconsented groups not present anymore for appID: "
- << policy_app_id);
- it_pending->second.appPermissionsConsentNeeded = false;
- return;
-}
-
void PolicyManagerImpl::SetUserConsentForApp(
const PermissionConsent& permissions) {
LOG4CXX_INFO(logger_, "SetUserConsentForApp");
@@ -598,8 +515,7 @@ void PolicyManagerImpl::GetPermissionsForApp(
if (cache_->IsDefaultPolicy(policy_app_id)) {
app_id_to_check = kDefaultId;
allowed_by_default = true;
- } else if (cache_->IsPredataPolicy(policy_app_id) ||
- policy::kDeviceDisallowed == GetUserConsentForDevice(device_id)) {
+ } else if (cache_->IsPredataPolicy(policy_app_id)) {
app_id_to_check = kPreDataConsentId;
allowed_by_default = true;
}
@@ -623,7 +539,7 @@ void PolicyManagerImpl::GetPermissionsForApp(
// The "default" and "pre_DataConsent" are auto-allowed groups
// So, check if application in the one of these mode.
if (allowed_by_default) {
- LOG4CXX_INFO(logger_, "Get auto allowed groups");
+ LOG4CXX_INFO(logger_, "Get auto allowe groups");
GroupType type = (kDefaultId == app_id_to_check ?
kTypeDefault : kTypePreDataConsented);
@@ -680,35 +596,20 @@ bool PolicyManagerImpl::ExceededIgnitionCycles() {
return 0 == cache_->IgnitionCyclesBeforeExchange();
}
-bool PolicyManagerImpl::ExceededDays() {
-
- TimevalStruct current_time = date_time::DateTime::getCurrentTime();
- const int kSecondsInDay = 60 * 60 * 24;
- int days = current_time.tv_sec / kSecondsInDay;
-
+bool PolicyManagerImpl::ExceededDays(int days) {
return 0 == cache_->DaysBeforeExchange(days);
}
-void PolicyManagerImpl::KmsChanged(int kilometers) {
- LOG4CXX_AUTO_TRACE(logger_);
- if (0 == cache_->KilometersBeforeExchange(kilometers)) {
- LOG4CXX_INFO(logger_, "Enough kilometers passed to send for PT update.");
- StartPTExchange();
- }
+bool PolicyManagerImpl::ExceededKilometers(int kilometers) {
+ return 0 == cache_->KilometersBeforeExchange(kilometers);
}
void PolicyManagerImpl::IncrementIgnitionCycles() {
cache_->IncrementIgnitionCycles();
}
-std::string PolicyManagerImpl::ForcePTExchange() {
- update_status_manager_.ScheduleUpdate();
- StartPTExchange();
- return update_status_manager_.StringifiedUpdateStatus();
-}
-
-std::string PolicyManagerImpl::GetPolicyTableStatus() const {
- return update_status_manager_.StringifiedUpdateStatus();
+PolicyTableStatus PolicyManagerImpl::GetPolicyTableStatus() {
+ return update_status_manager_->GetUpdateStatus();
}
int PolicyManagerImpl::NextRetryTimeout() {
@@ -733,7 +634,7 @@ void PolicyManagerImpl::RefreshRetrySequence() {
void PolicyManagerImpl::ResetRetrySequence() {
sync_primitives::AutoLock auto_lock(retry_sequence_lock_);
retry_sequence_index_ = 0;
- update_status_manager_.OnResetRetrySequence();
+ update_status_manager_->OnResetRetrySequence();
}
int PolicyManagerImpl::TimeoutExchange() {
@@ -746,14 +647,13 @@ const std::vector<int> PolicyManagerImpl::RetrySequenceDelaysSeconds() {
}
void PolicyManagerImpl::OnExceededTimeout() {
- update_status_manager_.OnUpdateTimeoutOccurs();
+ update_status_manager_->OnUpdateTimeoutOccurs();
}
void PolicyManagerImpl::OnUpdateStarted() {
int update_timeout = TimeoutExchange();
LOG4CXX_INFO(logger_, "Update timeout will be set to: " << update_timeout);
- update_status_manager_.OnUpdateSentOut(update_timeout);
- cache_->SaveUpdateRequired(true);
+ update_status_manager_->OnUpdateSentOut(update_timeout);
}
void PolicyManagerImpl::PTUpdatedAt(int kilometers, int days_after_epoch) {
@@ -791,12 +691,11 @@ void PolicyManagerImpl::Add(const std::string& app_id,
}
bool PolicyManagerImpl::IsApplicationRevoked(const std::string& app_id) const {
- return cache_->IsApplicationRevoked(app_id);
+ return const_cast<PolicyManagerImpl*>(this)->cache_->IsApplicationRevoked(app_id);
}
-bool PolicyManagerImpl::IsConsentNeeded(const std::string& app_id) {
- LOG4CXX_AUTO_TRACE(logger_);
- return false;
+int PolicyManagerImpl::IsConsentNeeded(const std::string& app_id) {
+ return 0;
}
void PolicyManagerImpl::SetVINValue(const std::string& value) {
@@ -821,8 +720,8 @@ AppPermissions PolicyManagerImpl::GetAppPermissionsChanges(
} else {
permissions.appPermissionsConsentNeeded = IsConsentNeeded(policy_app_id);
permissions.appRevoked = IsApplicationRevoked(policy_app_id);
+ GetPriority(permissions.application_id, &permissions.priority);
}
- GetPriority(permissions.application_id, &permissions.priority);
return permissions;
}
@@ -850,14 +749,23 @@ void PolicyManagerImpl::AddApplication(const std::string& application_id) {
if (IsNewApplication(application_id)) {
AddNewApplication(application_id, device_consent);
- update_status_manager_.OnNewApplicationAdded();
+ AddAppToUpdateList(application_id);
+ if (PolicyTableStatus::StatusUpToDate == GetPolicyTableStatus()) {
+ update_status_manager_->OnNewApplicationAdded();
+ }
} else {
PromoteExistedApplication(application_id, device_consent);
}
- StartPTExchange();
SendNotificationOnPermissionsUpdated(application_id);
}
+bool PolicyManagerImpl::IsAppInUpdateList(const std::string& app_id) const {
+ return update_requests_list_.end() !=
+ std::find(update_requests_list_.begin(),
+ update_requests_list_.end(),
+ app_id);
+}
+
void PolicyManagerImpl::RemoveAppConsentForGroup(const std::string& app_id,
const std::string& group_name) {
cache_->RemoveAppConsentForGroup(app_id, group_name);
@@ -870,18 +778,24 @@ bool PolicyManagerImpl::IsPredataPolicy(const std::string &policy_app_id) {
void PolicyManagerImpl::AddNewApplication(const std::string& application_id,
DeviceConsent device_consent) {
- LOG4CXX_AUTO_TRACE(logger_);
+ LOG4CXX_INFO(logger_, "PolicyManagerImpl::AddNewApplication");
+ LOG4CXX_INFO(
+ logger_,
+ "Setting default permissions for application id: " << application_id);
cache_->SetDefaultPolicy(application_id);
}
void PolicyManagerImpl::PromoteExistedApplication(
const std::string& application_id, DeviceConsent device_consent) {
- // If device consent changed to allowed during application being
- // disconnected, app permissions should be changed also
- if (kDeviceAllowed == device_consent
+
+ if (kDeviceHasNoConsent != device_consent
&& cache_->IsPredataPolicy(application_id)) {
- cache_->SetDefaultPolicy(application_id);
+ // If device consent changed to allowed during application being
+ // disconnected, app permissions should be changed also
+ if (kDeviceAllowed == device_consent) {
+ cache_->SetDefaultPolicy(application_id);
+ }
}
}
@@ -891,7 +805,6 @@ bool PolicyManagerImpl::IsNewApplication(
}
bool PolicyManagerImpl::ResetPT(const std::string& file_name) {
- cache_->ResetCalculatedPermissions();
const bool result = cache_->ResetPT(file_name);
if (result) {
RefreshRetrySequence();
@@ -899,36 +812,11 @@ bool PolicyManagerImpl::ResetPT(const std::string& file_name) {
return result;
}
-bool PolicyManagerImpl::CheckAppStorageFolder() const {
- LOG4CXX_AUTO_TRACE(logger_);
- const std::string app_storage_folder =
- profile::Profile::instance()->app_storage_folder();
- LOG4CXX_DEBUG(logger_, "AppStorageFolder " << app_storage_folder);
- if (!file_system::DirectoryExists(app_storage_folder)) {
- LOG4CXX_WARN(logger_,
- "Storage directory doesn't exist " << app_storage_folder);
- return false;
- }
- if (!(file_system::IsWritingAllowed(app_storage_folder) &&
- file_system::IsReadingAllowed(app_storage_folder))) {
- LOG4CXX_WARN(
- logger_,
- "Storage directory doesn't have read/write permissions " << app_storage_folder);
- return false;
- }
- return true;
-}
-
bool PolicyManagerImpl::InitPT(const std::string& file_name) {
- LOG4CXX_AUTO_TRACE(logger_);
- if (!CheckAppStorageFolder()) {
- LOG4CXX_ERROR(logger_, "Can not read/write into AppStorageFolder");
- return false;
- }
const bool ret = cache_->Init(file_name);
if (ret) {
RefreshRetrySequence();
- update_status_manager_.OnPolicyInit(cache_->UpdateRequired());
+ update_status_manager_->OnPolicyInit(cache_->UpdateRequired());
}
return ret;
}
@@ -937,14 +825,15 @@ uint16_t PolicyManagerImpl::HeartBeatTimeout(const std::string& app_id) const {
return cache_->HeartBeatTimeout(app_id);
}
-void PolicyManagerImpl::SaveUpdateStatusRequired(bool is_update_needed) {
- cache_->SaveUpdateRequired(is_update_needed);
-}
-
void PolicyManagerImpl::set_cache_manager(
CacheManagerInterface* cache_manager) {
cache_ = cache_manager;
}
+void PolicyManagerImpl::set_update_status_manager(
+ UpdateStatusManagerInterface* update_manager) {
+ update_status_manager_ = update_manager;
+}
+
} // namespace policy
diff --git a/src/components/policy/src/policy/src/policy_table.cc b/src/components/policy/src/policy/src/policy_table.cc
index 991f2ee08d..c0ac3c99ff 100644
--- a/src/components/policy/src/policy/src/policy_table.cc
+++ b/src/components/policy/src/policy/src/policy_table.cc
@@ -32,6 +32,7 @@
#include "policy/policy_table.h"
+// EXTENDED_POLICY
# include "policy/sql_pt_representation.h"
#include "utils/logger.h"
@@ -42,6 +43,7 @@ CREATE_LOGGERPTR_GLOBAL(logger_, "PolicyTable")
PolicyTable::PolicyTable()
: pt_data_(
+// EXTENDED_POLICY
new SQLPTRepresentation()
) {
}
diff --git a/src/components/policy/src/policy/src/sql_pt_ext_queries.cc b/src/components/policy/src/policy/src/sql_pt_ext_queries.cc
index 776b318991..ae6666461b 100644
--- a/src/components/policy/src/policy/src/sql_pt_ext_queries.cc
+++ b/src/components/policy/src/policy/src/sql_pt_ext_queries.cc
@@ -1,4 +1,4 @@
-/*
+/*
Copyright (c) 2013, " Ford Motor Company
All rights reserved.
@@ -67,9 +67,9 @@ const std::string kUpdateDevice =
" `connection_type` = ? WHERE `id` = ? ";
const std::string kInsertDeviceConsentedGroup =
- "INSERT OR REPLACE INTO `device_consent_group` "
- "(`device_id`, `functional_group_id`, `is_consented`, `input`, `time_stamp`) "
- "VALUES (?,?,?,?,?)";
+ "INSERT OR IGNORE INTO `device_consent_group` "
+ "(`device_id`, `functional_group_id`, `is_consented`, `input`) "
+ "VALUES (?,?,?,?)";
const std::string kInsertDevice =
"INSERT OR IGNORE INTO `device` "
@@ -113,21 +113,15 @@ const std::string kSelectAppLevels =
" `app_registration_language_gui`, "
" `app_registration_language_vui` "
"FROM `app_level`";
-
-const std::string kUpdateGlobalCounters = "UPDATE `usage_and_error_count` SET "
- "`count_of_iap_buffer_full` = ?, "
- "`count_sync_out_of_memory` = ?, "
- "`count_of_sync_reboots` = ? ";
-
const std::string kInsertDeviceData =
"INSERT OR IGNORE INTO `device` "
"(`id`, `hardware`, `firmware_rev`, `os`, `os_version`, `carrier`, "
"`max_number_rfcom_ports`,`connection_type`) VALUES (?,?,?,?,?,?,?,?) ";
const std::string kInsertConsentGroups =
- "INSERT OR REPLACE INTO `consent_group` "
- "(`device_id`, `application_id`, `functional_group_id`, `is_consented`, `input`, `time_stamp`) "
- "VALUES (?,?,?,?,?,?)";
+ "INSERT OR IGNORE INTO `consent_group` "
+ "(`device_id`, `application_id`, `functional_group_id`, `is_consented`, `input`) "
+ "VALUES (?,?,?,?,?)";
const std::string kDeleteAppGroupConsent = "DELETE FROM `consent_group` WHERE "
"`application_id` = ? AND `functional_group_id` = ? ";
@@ -161,12 +155,6 @@ const std::string kUpdateMetaParams = "UPDATE `module_meta` SET "
const std::string kUpdateModuleMetaVinParam =
"UPDATE `module_meta` SET `vin` = ? ";
-const std::string kSaveModuleMeta =
- "UPDATE `module_meta` SET `ccpu_version` = ?, `language` = ?,"
- "`wers_country_code` = ?, `pt_exchanged_at_odometer_x` = ?,"
- "`pt_exchanged_x_days_after_epoch` = ?,"
- "`ignition_cycles_since_last_exchange` = ?, `vin` = ?";
-
const std::string kSelectMetaParams = "SELECT `ccpu_version`, "
"`wers_country_code`, `language` from `module_meta`";
diff --git a/src/components/policy/src/policy/src/sql_pt_ext_representation.cc b/src/components/policy/src/policy/src/sql_pt_ext_representation.cc
index 59764c585b..b6d4d84c09 100644
--- a/src/components/policy/src/policy/src/sql_pt_ext_representation.cc
+++ b/src/components/policy/src/policy/src/sql_pt_ext_representation.cc
@@ -493,7 +493,7 @@ std::vector<UserFriendlyMessage> SQLPTExtRepresentation::GetUserFriendlyMsg(
query.Bind(0, *it);
query.Bind(1, msg_language);
- if (!query.Exec() || !query.Reset()) {
+ if (!query.Exec()) {
LOG4CXX_WARN(logger_, "Incorrect select from friendly messages.");
return result;
}
@@ -562,7 +562,7 @@ bool SQLPTExtRepresentation::GatherConsumerFriendlyMessages(
bool SQLPTExtRepresentation::SetMetaInfo(const std::string& ccpu_version,
const std::string& wers_country_code,
const std::string& language) {
- LOG4CXX_AUTO_TRACE(logger_);
+ LOG4CXX_TRACE_ENTER(logger_);
dbms::SQLQuery query(db());
if (!query.Prepare(sql_pt_ext::kUpdateMetaParams)) {
LOG4CXX_WARN(logger_, "Incorrect statement for insert to module meta.");
@@ -577,6 +577,7 @@ bool SQLPTExtRepresentation::SetMetaInfo(const std::string& ccpu_version,
LOG4CXX_WARN(logger_, "Incorrect insert to module meta.");
return false;
}
+ LOG4CXX_TRACE_EXIT(logger_);
return true;
}
@@ -690,9 +691,6 @@ bool SQLPTExtRepresentation::SaveSpecificAppPolicy(
return true;
}
- SetIsDefault(app.first, false);
- SetIsPredata(app.first, false);
-
dbms::SQLQuery app_query(db());
if (!app_query.Prepare(sql_pt_ext::kInsertApplication)) {
LOG4CXX_WARN(logger_, "Incorrect insert statement into application.");
@@ -931,29 +929,7 @@ void SQLPTExtRepresentation::GatherConsentGroup(
}
bool SQLPTExtRepresentation::SaveDeviceData(
-const policy_table::DeviceData& devices) {
- LOG4CXX_INFO(logger_, "SaveDeviceData");
- dbms::SQLQuery drop_device_query(db());
- const std::string drop_device = "DELETE FROM `device`";
- if (!drop_device_query.Exec(drop_device)) {
- LOG4CXX_WARN(logger_, "Could not clear device table.");
- return false;
- }
-
- dbms::SQLQuery drop_device_consents_query(db());
- const std::string drop_device_consents = "DELETE FROM `device_consent_group`";
- if (!drop_device_consents_query.Exec(drop_device_consents)) {
- LOG4CXX_WARN(logger_, "Could not clear device consents.");
- return false;
- }
-
- dbms::SQLQuery drop_user_consents_query(db());
- const std::string drop_user_consents = "DELETE FROM `consent_group`";
- if (!drop_user_consents_query.Exec(drop_user_consents)) {
- LOG4CXX_WARN(logger_, "Could not clear user consents.");
- return false;
- }
-
+ const policy_table::DeviceData& devices) {
dbms::SQLQuery query(db());
if (!query.Prepare(sql_pt_ext::kInsertDeviceData)) {
LOG4CXX_WARN(logger_, "Incorrect insert statement for device data.");
@@ -1013,11 +989,6 @@ bool SQLPTExtRepresentation::SaveConsentGroup(
query.Bind(
3,
std::string(policy_table::EnumToJsonString(*(it->second.input))));
- query.Bind(4, std::string(*(it->second.time_stamp)));
- LOG4CXX_INFO(logger_, "Device:" <<
- "time stamp " << std::string(*(it->second.time_stamp))
- << " group " << it_groups->first
- << " consent " << it_groups->second);
} else {
if (!query.Prepare(sql_pt_ext::kInsertConsentGroups)) {
LOG4CXX_WARN(logger_,
@@ -1031,11 +1002,6 @@ bool SQLPTExtRepresentation::SaveConsentGroup(
query.Bind(
4,
std::string(policy_table::EnumToJsonString(*(it->second.input))));
- query.Bind(5, std::string(*(it->second.time_stamp)));
- LOG4CXX_INFO(logger_, "Device:" <<
- "time stamp " << std::string(*(it->second.time_stamp))
- << " group " << it_groups->first
- << " consent " << it_groups->second);
}
if (!query.Exec() || !query.Reset()) {
@@ -1380,37 +1346,6 @@ bool SQLPTExtRepresentation::SaveMessageString(
bool SQLPTExtRepresentation::SaveUsageAndErrorCounts(
const policy_table::UsageAndErrorCounts& counts) {
- return SaveAppCounters(*counts.app_level) && SaveGlobalCounters(counts);
-}
-
-bool SQLPTExtRepresentation::SaveModuleMeta(
- const policy_table::ModuleMeta& meta) {
- dbms::SQLQuery query(db());
-
- if (!query.Prepare(sql_pt_ext::kSaveModuleMeta)) {
- LOG4CXX_WARN(logger_, "Incorrect insert statement for module_meta.");
- return false;
- }
- const int64_t odometer = *(meta.pt_exchanged_at_odometer_x);
-
- query.Bind(0, *(meta.ccpu_version));
- query.Bind(1, *(meta.language));
- query.Bind(2, *(meta.wers_country_code));
- query.Bind(3, odometer);
- query.Bind(4, *(meta.pt_exchanged_x_days_after_epoch));
- query.Bind(5, *(meta.ignition_cycles_since_last_exchange));
- query.Bind(6, *(meta.vin));
-
- if (!query.Exec()) {
- LOG4CXX_WARN(logger_, "Incorrect update for module_meta.");
- return false;
- }
-
- return true;
-}
-
-bool SQLPTExtRepresentation::SaveAppCounters(
- const rpc::policy_table_interface_base::AppLevels& app_levels) {
dbms::SQLQuery query(db());
if (!query.Exec(sql_pt::kDeleteAppLevel)) {
LOG4CXX_WARN(logger_, "Incorrect delete from app level.");
@@ -1422,6 +1357,7 @@ bool SQLPTExtRepresentation::SaveAppCounters(
}
policy_table::AppLevels::const_iterator it;
+ const policy_table::AppLevels& app_levels = *counts.app_level;
for (it = app_levels.begin(); it != app_levels.end(); ++it) {
query.Bind(0, it->first);
query.Bind(1, it->second.minutes_in_hmi_full);
@@ -1438,7 +1374,7 @@ bool SQLPTExtRepresentation::SaveAppCounters(
query.Bind(12, it->second.count_of_run_attempts_while_revoked);
query.Bind(13, it->second.app_registration_language_gui);
query.Bind(14, it->second.app_registration_language_vui);
- if (!query.Exec() || !query.Reset()) {
+ if (!query.Exec()) {
LOG4CXX_WARN(logger_, "Incorrect insert into app level.");
return false;
}
@@ -1446,26 +1382,6 @@ bool SQLPTExtRepresentation::SaveAppCounters(
return true;
}
-bool SQLPTExtRepresentation::SaveGlobalCounters(
- const rpc::policy_table_interface_base::UsageAndErrorCounts& counts) {
- dbms::SQLQuery query(db());
- if (!query.Prepare(sql_pt_ext::kUpdateGlobalCounters)) {
- LOG4CXX_WARN(logger_, "Incorrect insert statement for global counters.");
- return false;
- }
-
- query.Bind(0, *counts.count_of_iap_buffer_full);
- query.Bind(1, *counts.count_sync_out_of_memory);
- query.Bind(2, *counts.count_of_sync_reboots);
-
- if (!query.Exec()) {
- LOG4CXX_WARN(logger_, "Incorrect insert into global counters.");
- return false;
- }
-
- return true;
-}
-
bool SQLPTExtRepresentation::CleanupUnpairedDevices(
const DeviceIds& device_ids) const {
LOG4CXX_INFO(logger_, "CleanupUnpairedDevices");
@@ -1625,8 +1541,7 @@ bool SQLPTExtRepresentation::SetIsPredata(const std::string& app_id,
return true;
}
-bool SQLPTExtRepresentation::SetUnpairedDevice(const std::string& device_id,
- bool unpaired) const {
+bool SQLPTExtRepresentation::SetUnpairedDevice(const std::string& device_id) const {
LOG4CXX_TRACE(logger_, "Set unpaired device: " << device_id);
dbms::SQLQuery query(db());
if (!query.Prepare(sql_pt_ext::kUpdateUnpairedDevice)) {
@@ -1634,7 +1549,7 @@ bool SQLPTExtRepresentation::SetUnpairedDevice(const std::string& device_id,
return false;
}
- query.Bind(0, unpaired);
+ query.Bind(0, true);
query.Bind(1, device_id);
if (!query.Exec()) {
LOG4CXX_WARN(logger_, "Failed update unpaired device");
diff --git a/src/components/policy/src/policy/src/sql_pt_queries.cc b/src/components/policy/src/policy/src/sql_pt_queries.cc
index e3ca77f206..1b7fcdfb6f 100644
--- a/src/components/policy/src/policy/src/sql_pt_queries.cc
+++ b/src/components/policy/src/policy/src/sql_pt_queries.cc
@@ -67,7 +67,6 @@ const std::string kCreateSchema =
"); "
"CREATE TABLE IF NOT EXISTS `module_config`( "
" `preloaded_pt` BOOL NOT NULL, "
- " `is_first_run` BOOL NOT NULL, "
" `exchange_after_x_ignition_cycles` INTEGER NOT NULL, "
" `exchange_after_x_kilometers` INTEGER NOT NULL, "
" `exchange_after_x_days` INTEGER NOT NULL, "
@@ -189,7 +188,7 @@ const std::string kCreateSchema =
" `functional_group_id` INTEGER NOT NULL, "
" `is_consented` BOOL NOT NULL, "
" `input` VARCHAR(45), "
- " `time_stamp` VARCHAR(45), "
+ " `time_stamp` DATETIME DEFAULT CURRENT_TIMESTAMP, "
" PRIMARY KEY(`device_id`,`functional_group_id`), "
" CONSTRAINT `fk_device_has_functional_group_device1` "
" FOREIGN KEY(`device_id`) "
@@ -262,7 +261,7 @@ const std::string kCreateSchema =
" `functional_group_id` INTEGER NOT NULL, "
" `is_consented` BOOL NOT NULL, "
" `input` VARCHAR(45), "
- " `time_stamp` VARCHAR(45), "
+ " `time_stamp` DATETIME DEFAULT CURRENT_TIMESTAMP, "
" PRIMARY KEY(`application_id`,`functional_group_id`,`device_id`), "
" CONSTRAINT `fk_consent_group_device1` "
" FOREIGN KEY(`device_id`) "
@@ -319,10 +318,10 @@ const std::string kInsertInitData =
" `pt_exchanged_x_days_after_epoch`, `ignition_cycles_since_last_exchange`,"
" `flag_update_required`) "
" VALUES (0, 0, 0, 0); "
- "INSERT OR IGNORE INTO `module_config` (`preloaded_pt`, `is_first_run`,"
+ "INSERT OR IGNORE INTO `module_config` (`preloaded_pt`, "
" `exchange_after_x_ignition_cycles`, `exchange_after_x_kilometers`, "
" `exchange_after_x_days`, `timeout_after_x_seconds`) "
- " VALUES(1, 0, 0, 0, 0, 0); "
+ " VALUES(1, 0, 0, 0, 0); "
"INSERT OR IGNORE INTO `priority`(`value`) VALUES ('EMERGENCY'); "
"INSERT OR IGNORE INTO `priority`(`value`) VALUES ('NAVIGATION'); "
"INSERT OR IGNORE INTO `priority`(`value`) VALUES ('VOICECOMMUNICATION'); "
@@ -533,7 +532,9 @@ const std::string kSelectModuleConfig =
" FROM `module_config`";
const std::string kSelectEndpoints =
- "SELECT `url`, `service`, `application_id` FROM `endpoint` ";
+ "SELECT `url`, `service`, `application_id` "
+ "FROM `endpoint` "
+ "GROUP BY `application_id`";
const std::string kSelectNotificationsPerMin =
"SELECT `priority_value`, `value` FROM notifications_by_priority";
diff --git a/src/components/policy/src/policy/src/sql_pt_representation.cc b/src/components/policy/src/policy/src/sql_pt_representation.cc
index 838949cbaa..4946284f3c 100644
--- a/src/components/policy/src/policy/src/sql_pt_representation.cc
+++ b/src/components/policy/src/policy/src/sql_pt_representation.cc
@@ -34,7 +34,6 @@
#include <stdlib.h>
#include <stdint.h>
#include <errno.h>
-#include <unistd.h>
#include "utils/logger.h"
#include "policy/sql_pt_representation.h"
@@ -42,7 +41,9 @@
#include "policy/sql_pt_queries.h"
#include "policy/policy_helper.h"
#include "policy/cache_manager.h"
-#include "config_profile/profile.h"
+#ifndef __QNX__
+# include "config_profile/profile.h"
+#endif // __QNX__
namespace policy {
@@ -60,6 +61,7 @@ template<typename T, typename K> void InsertUnique(K value, T* array) {
}
} // namespace
+// CUSTOMER_PASA
const std::string SQLPTRepresentation::kDatabaseName = "policy";
SQLPTRepresentation::SQLPTRepresentation()
@@ -73,6 +75,7 @@ SQLPTRepresentation::SQLPTRepresentation()
}
SQLPTRepresentation::~SQLPTRepresentation() {
+ db_->Backup();
db_->Close();
delete db_;
}
@@ -150,7 +153,8 @@ int SQLPTRepresentation::KilometersBeforeExchange(int current) {
bool SQLPTRepresentation::SetCountersPassedForSuccessfulUpdate(
int kilometers, int days_after_epoch) {
- LOG4CXX_AUTO_TRACE(logger_);
+ LOG4CXX_INFO(logger_,
+ "SQLPTRepresentation::SetCountersPassedForSuccessfulUpdate");
dbms::SQLQuery query(db());
if (!query.Prepare(sql_pt::kUpdateCountersSuccessfulUpdate)) {
LOG4CXX_WARN(logger_,
@@ -297,43 +301,12 @@ bool SQLPTRepresentation::GetPriority(const std::string& policy_app_id,
}
InitResult SQLPTRepresentation::Init() {
- LOG4CXX_AUTO_TRACE(logger_);
+ LOG4CXX_INFO(logger_, "SQLPTRepresentation::Init");
if (!db_->Open()) {
- LOG4CXX_ERROR(logger_, "Failed opening database.");
- LOG4CXX_INFO(logger_, "Starting opening retries.");
- const uint16_t attempts =
- profile::Profile::instance()->attempts_to_open_policy_db();
- LOG4CXX_DEBUG(logger_, "Total attempts number is: " << attempts);
- bool is_opened = false;
- const uint16_t open_attempt_timeout_ms =
- profile::Profile::instance()->open_attempt_timeout_ms();
- const useconds_t sleep_interval_mcsec = open_attempt_timeout_ms * 1000;
- LOG4CXX_DEBUG(logger_, "Open attempt timeout(ms) is: "
- << open_attempt_timeout_ms);
- for (int i = 0; i < attempts; ++i) {
- usleep(sleep_interval_mcsec);
- LOG4CXX_INFO(logger_, "Attempt: " << i+1);
- if (db_->Open()){
- LOG4CXX_INFO(logger_, "Database opened.");
- is_opened = true;
- break;
- }
- }
- if (!is_opened) {
- LOG4CXX_ERROR(logger_, "Open retry sequence failed. Tried "
- << attempts << " attempts with "
- << open_attempt_timeout_ms
- << " open timeout(ms) for each.");
- return InitResult::FAIL;
- }
- }
-#ifndef __QNX__
- if (!db_->IsReadWrite()) {
- LOG4CXX_ERROR(logger_, "There are no read/write permissions for database");
+ LOG4CXX_ERROR(logger_, "Failed opening database");
return InitResult::FAIL;
}
-#endif // __QNX__
dbms::SQLQuery check_pages(db());
if (!check_pages.Prepare(sql_pt::kCheckPgNumber) || !check_pages.Next()) {
LOG4CXX_WARN(logger_, "Incorrect pragma for page counting.");
@@ -404,10 +377,6 @@ bool SQLPTRepresentation::Drop() {
return true;
}
-void SQLPTRepresentation::WriteDb() {
- db_->Backup();
-}
-
bool SQLPTRepresentation::Clear() {
dbms::SQLQuery query(db());
if (!query.Exec(sql_pt::kDeleteData)) {
@@ -424,28 +393,6 @@ bool SQLPTRepresentation::Clear() {
return true;
}
-bool SQLPTRepresentation::RefreshDB() {
- dbms::SQLQuery query(db());
- if (!query.Exec(sql_pt::kDropSchema)) {
- LOG4CXX_WARN(logger_,
- "Failed dropping database: " << query.LastError().text());
- return false;
- }
- if (!query.Exec(sql_pt::kCreateSchema)) {
- LOG4CXX_ERROR(
- logger_,
- "Failed creating schema of database: " << query.LastError().text());
- return false;
- }
- if (!query.Exec(sql_pt::kInsertInitData)) {
- LOG4CXX_ERROR(
- logger_,
- "Failed insert init data to database: " << query.LastError().text());
- return false;
- }
- return true;
-}
-
utils::SharedPtr<policy_table::Table>
SQLPTRepresentation::GenerateSnapshot() const {
LOG4CXX_INFO(logger_, "GenerateSnapshot");
@@ -651,7 +598,7 @@ bool SQLPTRepresentation::GatherApplicationPolicies(
}
bool SQLPTRepresentation::Save(const policy_table::Table& table) {
- LOG4CXX_AUTO_TRACE(logger_);
+ LOG4CXX_INFO(logger_, "SQLPTRepresentation::Save");
db_->BeginTransaction();
if (!SaveFunctionalGroupings(table.policy_table.functional_groupings)) {
db_->RollbackTransaction();
@@ -756,9 +703,9 @@ bool SQLPTRepresentation::SaveRpcs(int64_t group_id,
for (ps_it = parameters.begin(); ps_it != parameters.end(); ++ps_it) {
query_parameter.Bind(0, it->first);
query_parameter.Bind(
- 1, std::string(policy_table::EnumToJsonString(*hmi_it)));
+ 1, std::string(policy_table::EnumToJsonString(*hmi_it)));
query_parameter.Bind(
- 2, std::string(policy_table::EnumToJsonString(*ps_it)));
+ 2, std::string(policy_table::EnumToJsonString(*ps_it)));
query_parameter.Bind(3, group_id);
if (!query_parameter.Exec() || !query_parameter.Reset()) {
LOG4CXX_WARN(logger_, "Incorrect insert into rpc with parameter");
@@ -1031,7 +978,7 @@ bool SQLPTRepresentation::SaveServiceEndpoints(
bool SQLPTRepresentation::SaveConsumerFriendlyMessages(
const policy_table::ConsumerFriendlyMessages& messages) {
- LOG4CXX_AUTO_TRACE(logger_);
+ LOG4CXX_TRACE_ENTER(logger_);
// According CRS-2419 If there is no “consumer_friendly_messages” key,
// the current local consumer_friendly_messages section shall be maintained in
@@ -1186,7 +1133,6 @@ bool SQLPTRepresentation::SaveDeviceData(
bool SQLPTRepresentation::SaveUsageAndErrorCounts(
const policy_table::UsageAndErrorCounts& counts) {
- const_cast<policy_table::UsageAndErrorCounts&>(counts).mark_initialized();
dbms::SQLQuery query(db());
if (!query.Exec(sql_pt::kDeleteAppLevel)) {
LOG4CXX_WARN(logger_, "Incorrect delete from app level.");
@@ -1199,7 +1145,6 @@ bool SQLPTRepresentation::SaveUsageAndErrorCounts(
policy_table::AppLevels::const_iterator it;
const policy_table::AppLevels& app_levels = *counts.app_level;
- const_cast<policy_table::AppLevels&>(*counts.app_level).mark_initialized();
for (it = app_levels.begin(); it != app_levels.end(); ++it) {
query.Bind(0, it->first);
if (!query.Exec()) {
@@ -1363,12 +1308,9 @@ bool SQLPTRepresentation::IsApplicationRevoked(
if (!query.Prepare(sql_pt::kSelectApplicationRevoked)) {
LOG4CXX_WARN(logger_, "Incorrect select from is_revoked of application");
}
-
- query.Bind(0, app_id);
-
- if (!query.Exec()) {
+ if (!query.Exec()) {
LOG4CXX_WARN(logger_, "Failed select is_revoked of application");
- return false;
+ return false;
}
return query.IsNull(0) ? false : query.GetBoolean(0);
}
diff --git a/src/components/policy/src/policy/src/update_status_manager.cc b/src/components/policy/src/policy/src/update_status_manager.cc
index fc43a33113..872e0c3e98 100644
--- a/src/components/policy/src/policy/src/update_status_manager.cc
+++ b/src/components/policy/src/policy/src/update_status_manager.cc
@@ -1,4 +1,4 @@
-/*
+/*
Copyright (c) 2014, Ford Motor Company
All rights reserved.
@@ -43,19 +43,12 @@ UpdateStatusManager::UpdateStatusManager() :
exchange_in_progress_(false),
update_required_(false),
exchange_pending_(false),
- last_update_status_(policy::StatusUnknown) {
- update_status_thread_delegate_ = new UpdateThreadDelegate(this);
- thread_ = threads::CreateThread("UpdateStatusThread", update_status_thread_delegate_);
- thread_->start();
+ last_update_status_(policy::StatusUnknown),
+ update_response_timer_(this) {
}
UpdateStatusManager::~UpdateStatusManager() {
- LOG4CXX_AUTO_TRACE(logger_);
- DCHECK(update_status_thread_delegate_);
- DCHECK(thread_);
- thread_->join();
- delete update_status_thread_delegate_;
- threads::DeleteThread(thread_);
+ LOG4CXX_DEBUG(logger_, "Destroy update Status manager");
}
void UpdateStatusManager::set_listener(PolicyListener* listener) {
@@ -64,33 +57,26 @@ void UpdateStatusManager::set_listener(PolicyListener* listener) {
void UpdateStatusManager::OnUpdateSentOut(uint32_t update_timeout) {
LOG4CXX_INFO(logger_, "OnUpdateSentOut");
- DCHECK(update_status_thread_delegate_);
- const unsigned milliseconds_in_second = 1000;
- update_status_thread_delegate_->updateTimeOut(update_timeout *
- milliseconds_in_second);
+ update_response_timer_.start(update_timeout);
set_exchange_in_progress(true);
- set_exchange_pending(true);
- set_update_required(false);
}
void UpdateStatusManager::OnUpdateTimeoutOccurs() {
LOG4CXX_INFO(logger_, "OnUpdateTimeoutOccurs");
set_update_required(true);
set_exchange_in_progress(false);
- DCHECK(update_status_thread_delegate_);
- update_status_thread_delegate_->updateTimeOut(0); // Stop Timer
}
void UpdateStatusManager::OnValidUpdateReceived() {
LOG4CXX_INFO(logger_, "OnValidUpdateReceived");
- update_status_thread_delegate_->updateTimeOut(0); // Stop Timer
- set_exchange_pending(false);
+ update_response_timer_.stop();
+ set_update_required(false);
set_exchange_in_progress(false);
}
void UpdateStatusManager::OnWrongUpdateReceived() {
LOG4CXX_INFO(logger_, "OnWrongUpdateReceived");
- update_status_thread_delegate_->updateTimeOut(0); // Stop Timer
+ update_response_timer_.stop();
set_update_required(true);
set_exchange_in_progress(false);
}
@@ -121,8 +107,8 @@ void UpdateStatusManager::OnPolicyInit(bool is_update_required) {
update_required_ = is_update_required;
}
-PolicyTableStatus UpdateStatusManager::GetUpdateStatus() const {
- LOG4CXX_AUTO_TRACE(logger_);
+PolicyTableStatus UpdateStatusManager::GetUpdateStatus() {
+ LOG4CXX_INFO(logger_, "GetUpdateStatus");
if (!exchange_in_progress_ && !exchange_pending_ && !update_required_) {
return PolicyTableStatus::StatusUpToDate;
}
@@ -134,38 +120,11 @@ PolicyTableStatus UpdateStatusManager::GetUpdateStatus() const {
return PolicyTableStatus::StatusUpdatePending;
}
-bool UpdateStatusManager::IsUpdateRequired() const {
- return update_required_;
-}
-
-bool UpdateStatusManager::IsUpdatePending() const {
- return exchange_pending_;
-}
-
-void UpdateStatusManager::ScheduleUpdate() {
- set_update_required(true);
-}
-
-std::string UpdateStatusManager::StringifiedUpdateStatus() const {
- switch (GetUpdateStatus()) {
- case policy::StatusUpdatePending:
- return "UPDATING";
- case policy::StatusUpdateRequired:
- return "UPDATE_NEEDED";
- case policy::StatusUpToDate:
- return "UP_TO_DATE";
- default: {
- return "UNKNOWN";
- }
- }
-}
-
void UpdateStatusManager::CheckUpdateStatus() {
- LOG4CXX_AUTO_TRACE(logger_);
+ LOG4CXX_INFO(logger_, "CheckUpdateStatus");
policy::PolicyTableStatus status = GetUpdateStatus();
if (listener_ && last_update_status_ != status) {
- LOG4CXX_INFO(logger_, "Send OnUpdateStatusChanged");
- listener_->OnUpdateStatusChanged(StringifiedUpdateStatus());
+ listener_->OnUpdateStatusChanged(status);
}
last_update_status_ = status;
}
@@ -193,50 +152,8 @@ void UpdateStatusManager::set_update_required(bool value) {
CheckUpdateStatus();
}
-UpdateStatusManager::UpdateThreadDelegate::UpdateThreadDelegate(UpdateStatusManager* update_status_manager):
- timeout_(0),
- stop_flag_(false),
- state_lock_(true),
- update_status_manager_(update_status_manager) {
- LOG4CXX_INFO(logger_, "Create UpdateThreadDelegate");
-}
-
-UpdateStatusManager::UpdateThreadDelegate::~UpdateThreadDelegate() {
- LOG4CXX_INFO(logger_, "Delete UpdateThreadDelegate");
-}
-
-void UpdateStatusManager::UpdateThreadDelegate::threadMain() {
- LOG4CXX_DEBUG(logger_, "UpdateStatusManager thread started (started normal)");
- sync_primitives::AutoLock auto_lock(state_lock_);
- while (false == stop_flag_) {
- if (timeout_ > 0) {
- LOG4CXX_DEBUG(logger_, "Timeout is greater then 0");
- sync_primitives::ConditionalVariable::WaitStatus wait_status =
- termination_condition_.WaitFor(auto_lock, timeout_);
- if (sync_primitives::ConditionalVariable::kTimeout == wait_status ) {
- if (update_status_manager_) {
- update_status_manager_->OnUpdateTimeoutOccurs();
- }
- }
- } else {
- // Time is not active, wait, while timeout will be seted,
- // or UpdateStatusManager will be deleted
- termination_condition_.Wait(auto_lock);
- }
- }
-}
-
-void UpdateStatusManager::UpdateThreadDelegate::exitThreadMain() {
- sync_primitives::AutoLock auto_lock(state_lock_);
- stop_flag_ = true;
- LOG4CXX_INFO(logger_, "before notify");
- termination_condition_.NotifyOne();
-}
-
-void UpdateStatusManager::UpdateThreadDelegate::updateTimeOut(const uint32_t timeout_ms) {
- sync_primitives::AutoLock auto_lock(state_lock_);
- timeout_ = timeout_ms;
- termination_condition_.NotifyOne();
+UpdateStatusManager::UpdateResponseTimer::~UpdateResponseTimer() {
+ LOG4CXX_DEBUG(logger_, "Destroy update Status manager timer");
}
} // namespace policy
diff --git a/src/components/policy/src/policy/usage_statistics/include/usage_statistics/counter.h b/src/components/policy/src/policy/usage_statistics/include/usage_statistics/counter.h
index 5164884efe..35147344c6 100644
--- a/src/components/policy/src/policy/usage_statistics/include/usage_statistics/counter.h
+++ b/src/components/policy/src/policy/usage_statistics/include/usage_statistics/counter.h
@@ -36,7 +36,6 @@
#include <ctime>
#include "usage_statistics/statistics_manager.h"
#include "utils/shared_ptr.h"
-#include "utils/timer_thread.h"
namespace usage_statistics {
class GlobalCounter {
@@ -77,21 +76,16 @@ class AppStopwatch {
public:
AppStopwatch(utils::SharedPtr<usage_statistics::StatisticsManager> statistics_manager,
const std::string& app_id);
- AppStopwatch(utils::SharedPtr<usage_statistics::StatisticsManager> statistics_manager,
- const std::string& app_id,
- std::uint32_t time_out);
~AppStopwatch();
void Start(AppStopwatchId stopwatch_type);
void Switch(AppStopwatchId stopwatch_type);
- void WriteTime();
+ void Stop();
private:
// Fields
std::string app_id_;
AppStopwatchId stopwatch_type_;
utils::SharedPtr<usage_statistics::StatisticsManager> statistics_manager_;
- typedef timer::TimerThread<AppStopwatch> Timer;
- Timer* timer_;
- const std::uint32_t time_out_;
+ time_t start_time_;
};
} // namespace usage_statistics
diff --git a/src/components/policy/src/policy/usage_statistics/src/counter.cc b/src/components/policy/src/policy/usage_statistics/src/counter.cc
index 070de140b3..6375db8f89 100644
--- a/src/components/policy/src/policy/usage_statistics/src/counter.cc
+++ b/src/components/policy/src/policy/usage_statistics/src/counter.cc
@@ -83,41 +83,33 @@ AppStopwatch::AppStopwatch(utils::SharedPtr<usage_statistics::StatisticsManager>
: app_id_(app_id),
stopwatch_type_(SECONDS_HMI_NONE),
statistics_manager_(statistics_manager),
- timer_(new Timer("HMI levels timer",this, &AppStopwatch::WriteTime, true)),
- time_out_(60) {
-}
-
-AppStopwatch::AppStopwatch(utils::SharedPtr<StatisticsManager> statistics_manager,
- const std::string& app_id,
- std::uint32_t time_out)
- : app_id_(app_id),
- stopwatch_type_(SECONDS_HMI_NONE),
- statistics_manager_(statistics_manager),
- timer_(new Timer("HMI levels timer",this, &AppStopwatch::WriteTime, true)),
- time_out_(time_out) {
-
+ start_time_() {
}
AppStopwatch::~AppStopwatch() {
- if (NULL != timer_) {
- timer_->stop();
- delete timer_;
+ if (start_time_) {
+ Stop();
}
}
void AppStopwatch::Start(AppStopwatchId stopwatch_type) {
+ assert(0 == start_time_);
stopwatch_type_ = stopwatch_type;
- timer_->start(time_out_);
+ start_time_ = time(NULL);
}
void AppStopwatch::Switch(AppStopwatchId stopwatch_type) {
+ Stop();
Start(stopwatch_type);
}
-void AppStopwatch::WriteTime() {
+void AppStopwatch::Stop() {
+ assert(start_time_ != 0);
+ double difference = difftime(time(NULL), start_time_);
if (statistics_manager_) {
- statistics_manager_->Add(app_id_, stopwatch_type_, time_out_);
+ statistics_manager_->Add(app_id_, stopwatch_type_, int32_t(difference));
}
+ start_time_ = 0;
}
} // namespace usage_statistics
diff --git a/src/components/policy/test/CMakeLists.txt b/src/components/policy/test/CMakeLists.txt
index 1426c888e3..1b39d5a25a 100644
--- a/src/components/policy/test/CMakeLists.txt
+++ b/src/components/policy/test/CMakeLists.txt
@@ -36,7 +36,6 @@ include_directories(
../src/policy/sqlite_wrapper/include
../src/policy/qdb_wrapper/include
../src/policy/usage_statistics/include
- ${CMAKE_SOURCE_DIR}/src/components/config_profile/include
${CMAKE_SOURCE_DIR}/src/components/rpc_base/include
${CMAKE_SOURCE_DIR}/src/components/utils/include/
)
@@ -50,7 +49,6 @@ set(testLibraries
dl
UsageStatistics
dbms
- ConfigProfile
)
set(testSources
@@ -96,4 +94,3 @@ target_link_libraries(policy_test ${testLibraries})
file(COPY valid_sdl_pt_update.json DESTINATION ${CMAKE_CURRENT_BINARY_DIR})
file(COPY sdl_preloaded_pt.json DESTINATION ${CMAKE_CURRENT_BINARY_DIR})
file(COPY log4cxx.properties DESTINATION ${CMAKE_CURRENT_BINARY_DIR})
-file(COPY smartDeviceLink.ini DESTINATION ${CMAKE_CURRENT_BINARY_DIR})
diff --git a/src/components/policy/test/generated_code_test.cc b/src/components/policy/test/generated_code_test.cc
index 5b590ce46c..3c5b013c3d 100644
--- a/src/components/policy/test/generated_code_test.cc
+++ b/src/components/policy/test/generated_code_test.cc
@@ -45,8 +45,7 @@ namespace test {
namespace components {
namespace policy {
-TEST(PolicyGeneratedCodeTest, DISABLED_TestValidPTPreloadJsonIsValid) {
- // TODO(AGaliuzov) APPLINK-10657 neet to enable this tests
+TEST(PolicyGeneratedCodeTest, TestValidPTPreloadJsonIsValid) {
std::ifstream json_file("sdl_preloaded_pt.json");
ASSERT_TRUE(json_file.is_open());
Json::Value valid_table;
@@ -57,8 +56,7 @@ TEST(PolicyGeneratedCodeTest, DISABLED_TestValidPTPreloadJsonIsValid) {
ASSERT_RPCTYPE_VALID(table);
}
-TEST(PolicyGeneratedCodeTest, DISABLED_TestValidPTUpdateJsonIsValid) {
- // TODO(AGaliuzov) APPLINK-10657 neet to enable this tests
+TEST(PolicyGeneratedCodeTest, TestValidPTUpdateJsonIsValid) {
std::ifstream json_file("valid_sdl_pt_update.json");
ASSERT_TRUE(json_file.is_open());
Json::Value valid_table;
diff --git a/src/components/policy/test/generated_code_with_sqlite_test.cc b/src/components/policy/test/generated_code_with_sqlite_test.cc
index 6338deb65d..8c9eef371e 100644
--- a/src/components/policy/test/generated_code_with_sqlite_test.cc
+++ b/src/components/policy/test/generated_code_with_sqlite_test.cc
@@ -1,33 +1,33 @@
/* Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
+* All rights reserved.
+*
+* Redistribution and use in source and binary forms, with or without
+* modification, are permitted provided that the following conditions are met:
+*
+* Redistributions of source code must retain the above copyright notice, this
+* list of conditions and the following disclaimer.
+*
+* Redistributions in binary form must reproduce the above copyright notice,
+* this list of conditions and the following
+* disclaimer in the documentation and/or other materials provided with the
+* distribution.
+*
+* Neither the name of the Ford Motor Company nor the names of its contributors
+* may be used to endorse or promote products derived from this software
+* without specific prior written permission.
+*
+* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+* POSSIBILITY OF SUCH DAMAGE.
+*/
#include <sqlite3.h>
diff --git a/src/components/policy/test/include.cmake b/src/components/policy/test/include.cmake
index 0474df54dc..fa9622e1cd 100644
--- a/src/components/policy/test/include.cmake
+++ b/src/components/policy/test/include.cmake
@@ -58,8 +58,14 @@ list(APPEND testSources
# ${POLICY_DIR}/test/shared_library_test.cc
)
+if (EXTENDED_POLICY_FLAG)
+ add_definitions(-DEXTENDED_POLICY)
+ include_directories(${POLICY_DIR}/src/policy/policy_table/table_struct_ext)
+ list (APPEND testSources ${POLICY_DIR}/test/sql_pt_ext_representation_test.cc)
+else ()
include_directories(${POLICY_DIR}/src/policy/policy_table/table_struct)
list (APPEND testSources ${POLICY_DIR}/test/sql_pt_representation_test.cc)
+endif ()
if (CMAKE_SYSTEM_NAME STREQUAL "QNX")
list(REMOVE_ITEM test_exec_libraries dl)
diff --git a/src/components/policy/test/include/mock_cache_manager.h b/src/components/policy/test/include/mock_cache_manager.h
index 283d5a5009..610a7a3fb0 100644
--- a/src/components/policy/test/include/mock_cache_manager.h
+++ b/src/components/policy/test/include/mock_cache_manager.h
@@ -72,8 +72,8 @@ class MockCacheManagerInterface : public CacheManagerInterface {
bool(const std::string& value));
MOCK_METHOD2(GetUserFriendlyMsg,
std::vector<UserFriendlyMessage>(const std::vector<std::string>& msg_codes, const std::string& language));
- MOCK_METHOD2(GetUpdateUrls,
- void(int service_type, EndpointUrls& end_points));
+ MOCK_METHOD1(GetUpdateUrls,
+ EndpointUrls(int service_type));
MOCK_METHOD1(GetNotificationsNumber,
int(const std::string& priority));
MOCK_METHOD2(GetPriority,
@@ -92,7 +92,7 @@ class MockCacheManagerInterface : public CacheManagerInterface {
void(bool status));
MOCK_METHOD3(GetInitialAppData,
bool(const std::string& app_id, StringArray& nicknames, StringArray& app_hmi_types));
- MOCK_CONST_METHOD1(IsApplicationRevoked,
+ MOCK_METHOD1(IsApplicationRevoked,
bool(const std::string& app_id));
MOCK_METHOD1(GetFunctionalGroupings,
bool(policy_table::FunctionalGroupings& groups));
@@ -100,8 +100,8 @@ class MockCacheManagerInterface : public CacheManagerInterface {
bool(const std::string& app_id));
MOCK_METHOD1(IsDefaultPolicy,
bool(const std::string& app_id));
- MOCK_METHOD1(SetIsDefault,
- bool(const std::string& app_id));
+ MOCK_METHOD2(SetIsDefault,
+ bool(const std::string& app_id, bool is_default));
MOCK_METHOD1(IsPredataPolicy,
bool(const std::string& app_id));
MOCK_METHOD1(SetDefaultPolicy,
@@ -142,8 +142,8 @@ class MockCacheManagerInterface : public CacheManagerInterface {
void(const std::string& app_id, usage_statistics::AppInfoId type, const std::string& value));
MOCK_METHOD3(Add,
void(const std::string& app_id, usage_statistics::AppStopwatchId type, int seconds));
- MOCK_METHOD2(CountUnconsentedGroups,
- int(const std::string& policy_app_id, const std::string& device_id));
+ MOCK_METHOD3(CountUnconsentedGroups,
+ bool(const std::string& policy_app_id, const std::string& device_id, int& result));
MOCK_METHOD1(GetFunctionalGroupNames,
bool(FunctionalGroupNames& names));
MOCK_METHOD2(GetAllAppGroups,
@@ -158,10 +158,12 @@ class MockCacheManagerInterface : public CacheManagerInterface {
void(const std::string& app_id, const std::string& group_name));
MOCK_METHOD1(SetPredataPolicy,
bool(const std::string& app_id));
- MOCK_METHOD0(CleanupUnpairedDevices,
- bool());
- MOCK_METHOD2(SetUnpairedDevice,
- bool(const std::string& device_id, bool unpaired));
+ MOCK_METHOD2(SetIsPredata,
+ bool(const std::string& app_id, bool is_pre_data));
+ MOCK_METHOD1(CleanupUnpairedDevices,
+ bool(const DeviceIds& device_ids));
+ MOCK_METHOD1(SetUnpairedDevice,
+ bool(const std::string& device_id));
MOCK_METHOD1(UnpairedDevicesList,
bool(DeviceIds& device_ids));
MOCK_METHOD1(ResetPT,
@@ -174,14 +176,6 @@ class MockCacheManagerInterface : public CacheManagerInterface {
void());
MOCK_CONST_METHOD1(HeartBeatTimeout,
uint16_t(const std::string& app_id));
- MOCK_METHOD1(GetHMIAppTypeAfterUpdate,
- void(std::map<std::string, StringArray>& app_hmi_types));
- MOCK_METHOD0(ResetCalculatedPermissions,
- void());
- MOCK_METHOD3(AddCalculatedPermissions,
- void(const std::string& device_id, const std::string& policy_app_id, const policy::Permissions& permissions));
- MOCK_METHOD3(IsPermissionsCalculated,
- bool(const std::string& device_id, const std::string& policy_app_id, policy::Permissions& permission));
};
} // namespace policy
diff --git a/src/components/policy/test/include/mock_policy_listener.h b/src/components/policy/test/include/mock_policy_listener.h
index 8f36a0b01f..8e7a67c1f6 100644
--- a/src/components/policy/test/include/mock_policy_listener.h
+++ b/src/components/policy/test/include/mock_policy_listener.h
@@ -1,4 +1,4 @@
-/* Copyright (c) 2014, Ford Motor Company
+/* Copyright (c) 2014, Ford Motor Company
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -47,6 +47,8 @@ namespace policy {
class MockPolicyListener : public PolicyListener {
public:
+ MOCK_METHOD0(OnPTExchangeNeeded,
+ void());
MOCK_METHOD3(OnPermissionsUpdated,
void(const std::string& policy_app_id,
const Permissions& permissions,
@@ -56,7 +58,7 @@ class MockPolicyListener : public PolicyListener {
MOCK_METHOD1(OnAppRevoked,
void(const std::string& policy_app_id));
MOCK_METHOD1(OnUpdateStatusChanged,
- void(const std::string& status));
+ void(policy::PolicyTableStatus status));
MOCK_METHOD1(OnCurrentDeviceIdUpdateRequired,
std::string(const std::string& policy_app_id));
MOCK_METHOD0(OnSystemInfoUpdateRequired,
@@ -68,14 +70,6 @@ class MockPolicyListener : public PolicyListener {
MOCK_METHOD2(OnDeviceConsentChanged,
void(const std::string& device_id,
bool is_allowed));
- MOCK_METHOD1(OnUpdateHMIAppType,
- void(std::map<std::string, StringArray>));
- MOCK_METHOD1(GetAvailableApps,
- void(std::queue<std::string>&));
- MOCK_METHOD3(OnSnapshotCreated,
- void(const BinaryMessage& pt_string,
- const std::vector<int>& retry_seconds,
- int timeout_exceed));
};
} // namespace policy
diff --git a/src/components/policy/test/include/mock_pt_ext_representation.h b/src/components/policy/test/include/mock_pt_ext_representation.h
index fd779dc1f0..dbd421706c 100644
--- a/src/components/policy/test/include/mock_pt_ext_representation.h
+++ b/src/components/policy/test/include/mock_pt_ext_representation.h
@@ -121,7 +121,7 @@ class MockPTExtRepresentation : public MockPTRepresentation,
bool(const std::string& app_id, bool is_device_allowed));
MOCK_METHOD1(SetPredataPolicy, bool(const std::string& app_id));
MOCK_METHOD2(SetIsPredata, bool(const std::string& app_id, bool is_predata));
- MOCK_CONST_METHOD2(SetUnpairedDevice, bool(const std::string& device_id, bool unpaired));
+ MOCK_CONST_METHOD1(SetUnpairedDevice, bool(const std::string& device_id));
MOCK_CONST_METHOD1(UnpairedDevicesList, bool(DeviceIds* device_ids));
MOCK_CONST_METHOD2(RemoveAppConsentForGroup, bool(const std::string& policy_app_id,
const std::string& functional_group));
diff --git a/src/components/policy/test/include/mock_pt_representation.h b/src/components/policy/test/include/mock_pt_representation.h
index 720c646aba..f9b188983b 100644
--- a/src/components/policy/test/include/mock_pt_representation.h
+++ b/src/components/policy/test/include/mock_pt_representation.h
@@ -79,8 +79,8 @@ class MockPTRepresentation : virtual public PTRepresentation {
MOCK_METHOD2(GetUserFriendlyMsg,
std::vector<UserFriendlyMessage>(const std::vector<std::string>& msg_code,
const std::string& language));
- MOCK_METHOD2(GetUpdateUrls,
- void(int service_type, EndpointUrls&));
+ MOCK_METHOD1(GetUpdateUrls,
+ EndpointUrls(int service_type));
MOCK_METHOD1(GetNotificationsNumber,
int(const std::string& priority));
MOCK_METHOD0(Init,
diff --git a/src/components/policy/test/include/mock_update_status_manager.h b/src/components/policy/test/include/mock_update_status_manager.h
index 0050276807..9956a34c5d 100644
--- a/src/components/policy/test/include/mock_update_status_manager.h
+++ b/src/components/policy/test/include/mock_update_status_manager.h
@@ -1,4 +1,4 @@
-/*
+/*
* Copyright (c) 2014, Ford Motor Company
* All rights reserved.
*
@@ -34,11 +34,11 @@
#include "gmock/gmock.h"
-#include "policy/update_status_manager.h"
+#include "policy/update_status_manager_interface.h"
namespace policy {
-class MockUpdateStatusManager : public UpdateStatusManager {
+class MockUpdateStatusManagerInterface : public UpdateStatusManagerInterface {
public:
MOCK_METHOD1(set_listener,
void(PolicyListener* listener));
diff --git a/src/components/policy/test/log4cxx.properties b/src/components/policy/test/log4cxx.properties
index 1c09444986..632ab540c5 100644
--- a/src/components/policy/test/log4cxx.properties
+++ b/src/components/policy/test/log4cxx.properties
@@ -14,20 +14,8 @@ log4j.appender.SQLPTRepresentationLogFile.layout.ConversionPattern=%-5p [%d{dd M
log4j.appender.SQLPTRepresentationLogFile.Schedule=DAILY
log4j.appender.SQLPTRepresentationLogFile.DatePattern='.' yyyy-MM-dd
-# Log for all PolicyManagerImpl messages
-log4j.appender.PolicyManagerImplLogFile=org.apache.log4j.DailyRollingFileAppender
-log4j.appender.PolicyManagerImplLogFile.File=PolicyManagerImpl.log
-log4j.appender.PolicyManagerImplLogFile.ImmediateFlush=true
-log4j.appender.PolicyManagerImplLogFile.layout=org.apache.log4j.PatternLayout
-log4j.appender.PolicyManagerImplLogFile.layout.ConversionPattern=%-5p [%d{dd MMM yyyy HH:mm:ss,SSS}] :%L %M: %m%n
-log4j.appender.PolicyManagerImplLogFile.Schedule=DAILY
-log4j.appender.PolicyManagerImplLogFile.DatePattern='.' yyyy-MM-dd
-
# All SmartDeviceLinkCore logs
log4j.rootLogger=ALL, Console
# SQLPTRepresentation logs
-log4j.logger.SQLPTRepresentation=ALL, SQLPTRepresentationLogFile
-
-# PolicyManagerImpl logs
-log4j.logger.PolicyManagerImpl=ALL, PolicyManagerImplLogFile
+log4j.logger.SQLPTRepresentation=ALL, SQLPTRepresentationLogFile \ No newline at end of file
diff --git a/src/components/policy/test/policy_manager_impl_stress_test.cc b/src/components/policy/test/policy_manager_impl_stress_test.cc
index c5550413b4..6c5e5d1a7b 100644
--- a/src/components/policy/test/policy_manager_impl_stress_test.cc
+++ b/src/components/policy/test/policy_manager_impl_stress_test.cc
@@ -39,8 +39,6 @@
#include "gtest/gtest.h"
#include "gmock/gmock.h"
-#include "config_profile/profile.h"
-
#include "mock_policy_listener.h"
#include "policy/policy_manager_impl.h"
@@ -82,8 +80,6 @@ void PolicyManagerImplStressTest::SetUpTestCase() {
CreateTable(ofs);
ofs.close();
- profile::Profile::instance()->config_file_name("smartDeviceLink.ini");
-
manager = new PolicyManagerImpl();
mock_listener = new MockPolicyListener();
manager->set_listener(mock_listener);
diff --git a/src/components/policy/test/policy_manager_impl_test.cc b/src/components/policy/test/policy_manager_impl_test.cc
index 7a992179b3..6930c28320 100644
--- a/src/components/policy/test/policy_manager_impl_test.cc
+++ b/src/components/policy/test/policy_manager_impl_test.cc
@@ -40,7 +40,7 @@
#include "mock_cache_manager.h"
#include "mock_update_status_manager.h"
#include "policy/policy_manager_impl.h"
-#include "policy/update_status_manager.h"
+#include "policy/update_status_manager_interface.h"
#include "policy/cache_manager_interface.h"
#include "json/value.h"
#include "utils/shared_ptr.h"
@@ -56,11 +56,12 @@ using ::policy::MockPolicyListener;
using ::policy::MockPTRepresentation;
using ::policy::MockPTExtRepresentation;
using ::policy::MockCacheManagerInterface;
-using ::policy::MockUpdateStatusManager;
+using ::policy::MockUpdateStatusManagerInterface;
using ::policy::PolicyManagerImpl;
using ::policy::PolicyTable;
using ::policy::EndpointUrls;
using ::policy::CacheManagerInterfaceSPtr;
+using ::policy::UpdateStatusManagerInterfaceSPtr;
namespace policy_table = rpc::policy_table_interface_base;
@@ -72,7 +73,7 @@ class PolicyManagerImplTest : public ::testing::Test {
protected:
PolicyManagerImpl* manager;
MockCacheManagerInterface* cache_manager;
- MockUpdateStatusManager update_manager;
+ MockUpdateStatusManagerInterface* update_manager;
MockPolicyListener* listener;
void SetUp() {
@@ -81,11 +82,19 @@ class PolicyManagerImplTest : public ::testing::Test {
cache_manager = new MockCacheManagerInterface();
manager->set_cache_manager(cache_manager);
+ update_manager = new MockUpdateStatusManagerInterface();
+ manager->set_update_status_manager(update_manager);
+
listener = new MockPolicyListener();
+ EXPECT_CALL(*update_manager, set_listener(listener)).Times(1);
manager->set_listener(listener);
}
void TearDown() {
+ EXPECT_CALL(*update_manager, GetUpdateStatus()).Times(1)
+ .WillOnce(Return(::policy::StatusUpToDate));
+ EXPECT_CALL(*cache_manager, Backup()).Times(1);
+ EXPECT_CALL(*cache_manager, SaveUpdateRequired(_)).Times(1);
delete manager;
delete listener;
}
@@ -101,7 +110,33 @@ class PolicyManagerImplTest : public ::testing::Test {
}
};
-TEST_F(PolicyManagerImplTest, DISABLED_RefreshRetrySequence) {
+TEST_F(PolicyManagerImplTest, ExceededIgnitionCycles) {
+ EXPECT_CALL(*cache_manager, IgnitionCyclesBeforeExchange()).Times(2).WillOnce(
+ Return(5)).WillOnce(Return(0));
+ EXPECT_CALL(*cache_manager, IncrementIgnitionCycles()).Times(1);
+
+ EXPECT_FALSE(manager->ExceededIgnitionCycles());
+ manager->IncrementIgnitionCycles();
+ EXPECT_TRUE(manager->ExceededIgnitionCycles());
+}
+
+TEST_F(PolicyManagerImplTest, ExceededDays) {
+ EXPECT_CALL(*cache_manager, DaysBeforeExchange(_)).Times(2).WillOnce(
+ Return(5)).WillOnce(Return(0));
+
+ EXPECT_FALSE(manager->ExceededDays(5));
+ EXPECT_TRUE(manager->ExceededDays(15));
+}
+
+TEST_F(PolicyManagerImplTest, ExceededKilometers) {
+ EXPECT_CALL(*cache_manager, KilometersBeforeExchange(_)).Times(2).WillOnce(
+ Return(50)).WillOnce(Return(0));
+
+ EXPECT_FALSE(manager->ExceededKilometers(50));
+ EXPECT_TRUE(manager->ExceededKilometers(150));
+}
+
+TEST_F(PolicyManagerImplTest, RefreshRetrySequence) {
std::vector<int> seconds;
seconds.push_back(50);
seconds.push_back(100);
@@ -118,14 +153,26 @@ TEST_F(PolicyManagerImplTest, DISABLED_RefreshRetrySequence) {
EXPECT_EQ(0, manager->NextRetryTimeout());
}
-TEST_F(PolicyManagerImplTest, DISABLED_GetUpdateUrl) {
-
- EXPECT_CALL(*cache_manager, GetUpdateUrls(7,_)).Times(1);
- EXPECT_CALL(*cache_manager, GetUpdateUrls(4,_)).Times(1);
+TEST_F(PolicyManagerImplTest, RefreshRetrySequence) {
+ ::testing::NiceMock<MockPTRepresentation> mock_pt;
+ std::vector<int> seconds, seconds_empty;
+ seconds.push_back(50);
+ seconds.push_back(100);
+ seconds.push_back(200);
- EXPECT_EQ("http://policies.telematics.ford.com/api/policies", manager->GetUpdateUrl(7));
- EXPECT_EQ("http://policies.ford.com/api/policies", manager->GetUpdateUrl(4));
+ EXPECT_CALL(mock_pt, TimeoutResponse()).Times(2).WillOnce(Return(0)).WillOnce(
+ Return(60));
+ EXPECT_CALL(mock_pt, SecondsBetweenRetries(_)).Times(2).WillOnce(
+ DoAll(SetArgPointee<0>(seconds_empty), Return(true))).WillOnce(
+ DoAll(SetArgPointee<0>(seconds), Return(true)));
+ PolicyManagerImpl* manager = new PolicyManagerImpl();
+ manager->ResetDefaultPT(::policy::PolicyTable(&mock_pt));
+ manager->RefreshRetrySequence();
+ EXPECT_EQ(60, manager->TimeoutExchange());
+ EXPECT_EQ(50, manager->NextRetryTimeout());
+ EXPECT_EQ(100, manager->NextRetryTimeout());
+ EXPECT_EQ(200, manager->NextRetryTimeout());
}
@@ -139,6 +186,7 @@ TEST_F(PolicyManagerImplTest, ResetPT) {
EXPECT_FALSE(manager->ResetPT("filename"));
}
+// EXTENDED_POLICY
TEST_F(PolicyManagerImplTest, CheckPermissions) {
::policy::CheckPermissionResult expected;
expected.hmi_level_permitted = ::policy::kRpcAllowed;
@@ -248,14 +296,13 @@ TEST_F(PolicyManagerImplTest, LoadPT) {
utils::SharedPtr<policy_table::Table> snapshot =
new policy_table::Table(update.policy_table);
+ EXPECT_CALL(*update_manager, OnValidUpdateReceived()).Times(1);
EXPECT_CALL(*cache_manager, GenerateSnapshot()).Times(1).WillOnce(Return(snapshot));
EXPECT_CALL(*cache_manager, ApplyUpdate(_)).Times(1).WillOnce(Return(true));
EXPECT_CALL(*listener, GetAppName("1234")).Times(1).WillOnce(Return(""));
- EXPECT_CALL(*listener, OnUpdateStatusChanged(_)).Times(1);
- EXPECT_CALL(*cache_manager, SaveUpdateRequired(false)).Times(1);
EXPECT_CALL(*cache_manager, TimeoutResponse()).Times(1);
EXPECT_CALL(*cache_manager, SecondsBetweenRetries(_)).Times(1);
-
+ EXPECT_CALL(*listener, OnUserRequestedUpdateCheckRequired()).Times(1);
EXPECT_TRUE(manager->LoadPT("file_pt_update.json", msg));
}
@@ -263,9 +310,14 @@ TEST_F(PolicyManagerImplTest, LoadPT) {
TEST_F(PolicyManagerImplTest, RequestPTUpdate) {
::utils::SharedPtr< ::policy_table::Table> p_table =
new ::policy_table::Table();
+ std::string json = p_table->ToJsonValue().toStyledString();
+ ::policy::BinaryMessageSptr expect = new ::policy::BinaryMessage(json.begin(),
+ json.end());
EXPECT_CALL(*cache_manager, GenerateSnapshot()).WillOnce(Return(p_table));
- manager->RequestPTUpdate();
+
+ ::policy::BinaryMessageSptr output = manager->RequestPTUpdate();
+ EXPECT_EQ(*expect, *output);
}
diff --git a/src/components/policy/test/qdb_wrapper/sql_database_test.cc b/src/components/policy/test/qdb_wrapper/sql_database_test.cc
index a732128f64..5ebf188042 100644
--- a/src/components/policy/test/qdb_wrapper/sql_database_test.cc
+++ b/src/components/policy/test/qdb_wrapper/sql_database_test.cc
@@ -1,33 +1,33 @@
/* Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
+* All rights reserved.
+*
+* Redistribution and use in source and binary forms, with or without
+* modification, are permitted provided that the following conditions are met:
+*
+* Redistributions of source code must retain the above copyright notice, this
+* list of conditions and the following disclaimer.
+*
+* Redistributions in binary form must reproduce the above copyright notice,
+* this list of conditions and the following
+* disclaimer in the documentation and/or other materials provided with the
+* distribution.
+*
+* Neither the name of the Ford Motor Company nor the names of its contributors
+* may be used to endorse or promote products derived from this software
+* without specific prior written permission.
+*
+* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+* POSSIBILITY OF SUCH DAMAGE.
+*/
#include <cstdlib>
diff --git a/src/components/policy/test/sdl_preloaded_pt.json b/src/components/policy/test/sdl_preloaded_pt.json
index 6ef60616c7..52b7684b06 100644
--- a/src/components/policy/test/sdl_preloaded_pt.json
+++ b/src/components/policy/test/sdl_preloaded_pt.json
@@ -1,1937 +1,1937 @@
- {
- "policy_table": {
- "module_config": {
- "preloaded_pt": true,
- "exchange_after_x_ignition_cycles": 100,
- "exchange_after_x_kilometers": 1800,
- "exchange_after_x_days": 30,
- "timeout_after_x_seconds": 60,
- "seconds_between_retries": [1,
- 5,
- 25,
- 125,
- 625],
- "endpoints": {
- "0x07": {
- "default": ["http://policies.telematics.ford.com/api/policies"]
- }
- },
- "notifications_per_minute_by_priority": {
- "EMERGENCY": 60,
- "NAVIGATION": 15,
- "COMMUNICATION": 6,
- "NORMAL": 4,
- "NONE": 0
- }
- },
- "functional_groupings": {
- "Base-4": {
- "rpcs": {
- "AddCommand": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED"]
- },
- "AddSubMenu": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED"]
- },
- "Alert": {
- "hmi_levels": ["FULL",
- "LIMITED"]
- },
- "ChangeRegistration": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"]
- },
- "CreateInteractionChoiceSet": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED"]
- },
- "DeleteCommand": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED"]
- },
- "DeleteFile": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"]
- },
- "DeleteInteractionChoiceSet": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED"]
- },
- "DeleteSubMenu": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED"]
- },
- "EncodedSyncPData": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"]
- },
- "EndAudioPassThru": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED"]
- },
- "GenericResponse": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED"]
- },
- "ListFiles": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"]
- },
- "OnAppInterfaceUnregistered": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"]
- },
- "OnAudioPassThru": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED"]
- },
- "OnButtonEvent": {
- "hmi_levels": ["FULL",
- "LIMITED"]
- },
- "OnButtonPress": {
- "hmi_levels": ["FULL",
- "LIMITED"]
- },
- "OnCommand": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED"]
- },
- "OnDriverDistraction": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED"]
- },
- "OnEncodedSyncPData": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"]
- },
- "OnHashChange": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"]
- },
- "OnHMIStatus": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"]
- },
- "OnLanguageChange": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"]
- },
- "OnPermissionsChange": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"]
- },
- "OnSystemRequest": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"]
- },
- "PerformAudioPassThru": {
- "hmi_levels": ["FULL",
- "LIMITED"]
- },
- "PerformInteraction": {
- "hmi_levels": ["FULL",
- "LIMITED"]
- },
- "PutFile": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"]
- },
- "RegisterAppInterface": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"]
- },
- "ResetGlobalProperties": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED"]
- },
- "ScrollableMessage": {
- "hmi_levels": ["FULL"]
- },
- "SetAppIcon": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"]
- },
- "SetDisplayLayout": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"]
- },
- "SetGlobalProperties": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED"]
- },
- "SetMediaClockTimer": {
- "hmi_levels": ["FULL",
- "LIMITED"]
- },
- "Show": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED"]
- },
- "Slider": {
- "hmi_levels": ["FULL"]
- },
- "Speak": {
- "hmi_levels": ["FULL",
- "LIMITED"]
- },
- "SubscribeButton": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED"]
- },
- "SystemRequest": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"]
- },
- "UnregisterAppInterface": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"]
- },
- "UnsubscribeButton": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED"]
- }
- }
- },
- "Location-1": {
- "user_consent_prompt": "Location",
- "rpcs": {
- "GetVehicleData": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED"],
- "parameters": ["gps",
- "speed"]
- },
- "OnVehicleData": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED"],
- "parameters": ["gps",
- "speed"]
- },
- "SubscribeVehicleData": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED"],
- "parameters": ["gps",
- "speed"]
- },
- "UnsubscribeVehicleData": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED"],
- "parameters": ["gps",
- "speed"]
- }
- }
- },
- "Notifications": {
- "user_consent_prompt": "Notifications",
- "rpcs": {
- "Alert": {
- "hmi_levels": ["BACKGROUND"]
- }
- }
- },
- "DrivingCharacteristics-3": {
- "user_consent_prompt": "DrivingCharacteristics",
- "rpcs": {
- "GetVehicleData": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED"],
- "parameters": ["accPedalPosition",
- "beltStatus",
- "driverBraking",
- "myKey",
- "prndl",
- "rpm",
- "steeringWheelAngle"]
- },
- "OnVehicleData": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED"],
- "parameters": ["accPedalPosition",
- "beltStatus",
- "driverBraking",
- "myKey",
- "prndl",
- "rpm",
- "steeringWheelAngle"]
- },
- "SubscribeVehicleData": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED"],
- "parameters": ["accPedalPosition",
- "beltStatus",
- "driverBraking",
- "myKey",
- "prndl",
- "rpm",
- "steeringWheelAngle"]
- },
- "UnsubscribeVehicleData": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED"],
- "parameters": ["accPedalPosition",
- "beltStatus",
- "driverBraking",
- "myKey",
- "prndl",
- "rpm",
- "steeringWheelAngle"]
- }
- }
- },
- "VehicleInfo-3": {
- "user_consent_prompt": "VehicleInfo",
- "rpcs": {
- "GetVehicleData": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED"],
- "parameters": ["bodyInformation",
- "deviceStatus",
- "engineTorque",
- "externalTemperature",
- "fuelLevel",
- "fuelLevel_State",
- "headLampStatus",
- "instantFuelConsumption",
- "odometer",
- "tirePressure",
- "vin",
- "wiperStatus"]
- },
- "OnVehicleData": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED"],
- "parameters": ["bodyInformation",
- "deviceStatus",
- "engineTorque",
- "externalTemperature",
- "fuelLevel",
- "fuelLevel_State",
- "headLampStatus",
- "instantFuelConsumption",
- "odometer",
- "tirePressure",
- "vin",
- "wiperStatus"]
- },
- "SubscribeVehicleData": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED"],
- "parameters": ["bodyInformation",
- "deviceStatus",
- "engineTorque",
- "externalTemperature",
- "fuelLevel",
- "fuelLevel_State",
- "headLampStatus",
- "instantFuelConsumption",
- "odometer",
- "tirePressure",
- "wiperStatus"]
- },
- "UnsubscribeVehicleData": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED"],
- "parameters": ["bodyInformation",
- "deviceStatus",
- "engineTorque",
- "externalTemperature",
- "fuelLevel",
- "fuelLevel_State",
- "headLampStatus",
- "instantFuelConsumption",
- "odometer",
- "tirePressure",
- "wiperStatus"]
- }
- }
- },
- "PropriataryData-1": {
- "rpcs": {
- "DiagnosticMessage": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED"]
- },
- "GetDTCs": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED"]
- },
- "ReadDID": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED"]
- }
- }
- },
- "Emergency-1": {
- "rpcs": {
- "GetVehicleData": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED"],
- "parameters": ["airbagStatus",
- "clusterModeStatus",
- "eCallInfo",
- "emergencyEvent"]
- },
- "OnVehicleData": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED"],
- "parameters": ["airbagStatus",
- "clusterModeStatus",
- "eCallInfo",
- "emergencyEvent"]
- },
- "SubscribeVehicleData": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED"],
- "parameters": ["airbagStatus",
- "clusterModeStatus",
- "eCallInfo",
- "emergencyEvent"]
- },
- "UnsubscribeVehicleData": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED"],
- "parameters": ["airbagStatus",
- "clusterModeStatus",
- "eCallInfo",
- "emergencyEvent"]
- }
- }
- },
- "Navigation-1": {
- "rpcs": {
- "AlertManeuver": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED"]
- },
- "ShowConstantTBT": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED"]
- },
- "UpdateTurnList": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED"]
- }
- }
- },
- "DataConsent-2": {
- "user_consent_prompt": "DataConsent",
- "rpcs": null
- },
- "BaseBeforeDataConsent": {
- "rpcs": {
- "ChangeRegistration": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"]
- },
- "DeleteFile": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"]
- },
- "EncodedSyncPData": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"]
- },
- "ListFiles": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"]
- },
- "OnAppInterfaceUnregistered": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"]
- },
- "OnEncodedSyncPData": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"]
- },
- "OnHashChange": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"]
- },
- "OnHMIStatus": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"]
- },
- "OnLanguageChange": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"]
- },
- "OnPermissionsChange": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"]
- },
- "OnSystemRequest": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"]
- },
- "PutFile": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"]
- },
- "RegisterAppInterface": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"]
- },
- "SetAppIcon": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"]
- },
- "SetDisplayLayout": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"]
- },
- "SystemRequest": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"]
- },
- "UnregisterAppInterface": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"]
- }
- }
- }
- },
- "consumer_friendly_messages": {
- "version": "001.001.019",
- "messages": {
- "AppPermissions": {
- "languages": {
- "de-de": {
- "tts": "%appName% benötigt die folgenden Fahrzeuginformationen und Zugriffsberechtigungen: %functionalGroupLabels%. Wenn Sie Ja drücken, erklären Sie sich damit einverstanden, dass %vehicleMake% nicht für Schäden oder Verletzungen der Privatsphäre haftet, die im Zusammenhang mit der Nutzung Ihrer Benutzerdaten durch %appName% entstehen. Mit Ja stimmen Sie zu; mit Nein lehnen Sie ab.",
- "line1": "Zugriffsanfrage(n)",
- "line2": "erlauben?"
- },
- "en-au": {
- "tts": "%appName% is requesting the use of the following vehicle information and permissions: %functionalGroupLabels%. If you press Yes, you agree that %vehicleMake% will not be liable for any damages or loss of privacy related to %appName%'s use of your data. Please press Yes to allow or No to deny.",
- "line1": "Grant requested",
- "line2": "permission(s)?"
- },
- "en-gb": {
- "tts": "%appName% is requesting the use of the following vehicle information and permissions: %functionalGroupLabels%. If you press Yes, you agree that %vehicleMake% will not be liable for any damages or loss of privacy related to %appName%`s use of your data. Please press Yes to allow or No to deny.",
- "line1": "Grant requested",
- "line2": "permission(s)?",
- "textBody": "%appName% is requesting the use of the following vehicle information and permissions: %functionalGroupLabels%. If you press yes, you agree that %vehicleMake% will not be liable for any damages or loss of privacy related to %appName%`s use of your data. You can change these permissions and hear detailed descriptions in the mobile apps settings menu."
- },
- "en-ie": {
- "tts": "%appName% is requesting the use of the following vehicle information and permissions: %functionalGroupLabels%. If you press Yes, you agree that %vehicleMake% will not be liable for any damages or loss of privacy related to %appName%'s use of your data. Please press Yes to allow or No to deny.",
- "line1": "Grant requested",
- "line2": "permission(s)?"
- },
- "en-us": {
- "tts": "%appName% is requesting the use of the following vehicle information and permissions: %functionalGroupLabels%. If you press yes, you agree that %vehicleMake% will not be liable for any damages or loss of privacy related to %appName%’s use of your data. Please press yes to allow or no to deny.",
- "line1": "Grant Requested",
- "line2": "Permission(s)?",
- "textBody": "%appName% is requesting the use of the following vehicle information and permissions: %functionalGroupLabels%. \n\nIf you press yes, you agree that %vehicleMake% will not be liable for any damages or loss of privacy related to %appName%’s use of your data. You can change these permissions and hear detailed descriptions in the mobile apps settings menu."
- },
- "es-en": {
- "tts": "%appName% solicita el uso de la siguiente información y permisos del vehículo: %functionalGroupLabels%. Si presiona Sí, acepta que %vehicleMake% no se hará responsable por los daños o pérdidas de privacidad relacionados con el uso que %appName% haga de sus datos. Presione Sí para permitir y No para denegar.",
- "line1": "¿Otorgar permiso(s)",
- "line2": "solicitado(s)?",
- "textBody": "%appName% solicita el uso de la siguiente información y permisos del vehículo: %functionalGroupLabels%. Si presiona Sí, acepta que %vehicleMake% no se hará responsable por los daños o pérdidas de privacidad relacionados con el uso que %appName% haga de sus datos. Presione Sí para permitir y No para denegar. \n\n Puede cambiar estos permisos y consultar descripciones detalladas en el menú de configuración de las aplicaciones móviles."
- },
- "es-es": {
- "tts": "%appName% está solicitando el uso de los siguientes permisos e información del vehículo: %functionalGroupLabels%. Si pulsa sí, acepta que %vehicleMake% no será responsable de los daños o la pérdida de privacidad relacionados con el uso de sus datos por parte de %appName%. Pulse sí para permitir o no para denegar.",
- "line1": "¿Conceder permisos",
- "line2": "solicitados?"
- },
- "es-mx": {
- "tts": "%appName% solicita el uso de la siguiente información y permisos del vehículo: %functionalGroupLabels%. Si presiona Sí, acepta que %vehicleMake% no se hará responsable por los daños o pérdidas de privacidad relacionados con el uso que %appName% haga de sus datos. Presione Sí para permitir y No para denegar.",
- "line1": "¿Otorgar permiso(s)",
- "line2": "solicitado(s)?"
- },
- "fr-ca": {
- "tts": "%appName% demande d’utiliser les informations du véhicule et les permissions suivantes : %functionalGroupLabels%. Si vous appuyez sur Oui, vous acceptez que %vehicleMake% ne sera pas responsable des dommages ou des pertes de confidentialité reliées à l’utilisation de vos données par %appName%. Veuillez appuyer sur Oui pour autoriser ou sur Non pour refuser.",
- "line1": "Accorder permission(s)",
- "line2": "demandée(s)",
- "textBody": "%appName% demande d’utiliser les informations du véhicule et les permissions suivantes : %functionalGroupLabels%. Si vous appuyez sur Oui, vous acceptez que %vehicleMake% ne sera pas responsable des dommages ou des pertes de confidentialité reliées à l’utilisation de vos données par %appName%. Vous pouvez modifier ces permissions et entendre les descriptions détaillées dans le menu des réglages des applications mobiles."
- },
- "fr-fr": {
- "tts": "%appName% demande d’utiliser les informations du véhicule et les permissions suivantes : %functionalGroupLabels%. Si vous appuyez sur Oui, vous acceptez que %vehicleMake% ne sera pas responsable des dommages ou des pertes de confidentialité reliées à l’utilisation de vos données par %appName%. Veuillez appuyer sur Oui pour autoriser ou sur Non pour refuser.",
- "line1": "Accorder permission(s)",
- "line2": "demandée(s)"
- },
- "it-it": {
- "tts": "%appName% richiede l'uso delle seguenti informazioni e autorizzazioni sul veicolo: %functionalGroupLabels%. Se si preme Sì, si acconsente che %vehicleMake% non sarà responsabile per danni o perdita di privacy in relazione all'impiego dei dati da parte di %appName%. Premere Sì per consentire e No per negare.",
- "line1": "Concedi autorizzaz.",
- "line2": "richiesta(e)?"
- },
- "nl-nl": {
- "tts": "%appName% vraagt gebruikmaking van de volgende voertuiginformatie en toestemmingen aan: %functionalGroupLabels%. Als u op Ja drukt, gaat u ermee akkoord dat %vehicleMake% in geen geval aansprakelijk gesteld kan worden voor schade of verlies van privacy als gevolg van het feit dat %appName% gebruik maakt van uw gegevens. Druk op Ja om dit toe te staan of Nee om te weigeren.",
- "line1": "Aangevraagde",
- "line2": "permissie(s) verlenen?"
- },
- "pl-pl": {
- "tts": "%appName% wymaga następujących informacji o pojeździe oraz pozwoleń: %functionalGroupLabels%. Naciśnięcie TAK oznacza zgodę na fakt, iż %vehicleMake% nie będzie ponosić odpowiedzialności za szkody ani utratę prywatności w związku z wykorzystaniem przez %appName% danych, należących do użytkownika. Naciśnij TAK w celu udzielenia zgody lub NIE w celu odrzucenia żądania.",
- "line1": "Udzielić żądanych",
- "line2": "pozwoleń?"
- },
- "pt-br": {
- "tts": "%appName% está solicitando o uso das seguintes informações e permissões do veículo: %functionalGroupLabels%. Se pressionar sim, você concorda que a %vehicleMake% não será responsável por danos ou perdas de privacidade relacionados ao uso dos seus dados por %appName%. Pressione sim para permitir ou não para negar.",
- "line1": "Conceder permissão",
- "line2": "solicitada?"
- },
- "pt-pt": {
- "tts": "%appName% está a solicitar a utilização das seguintes informações e permissões do veículo: %functionalGroupLabels%. Se premir “Sim”, concorda que %vehicleMake% não será responsável por quaisquer danos ou perda de privacidade relacionada com a utilização dos seus dados por parte de %appName%. Prima “Sim” para permitir ou “Não” para recusar.",
- "line1": "Conceder permiss.",
- "line2": "solicitada(s)?"
- },
- "ru-ru": {
- "tts": "%appName% запрашивает следующую информацию об автомобиле и разрешения: %functionalGroupLabels%. Нажатием \"\"да\"\", Вы соглашаетесь, что %vehicleMake% не будет нести ответственность за какие-либо убытки или потерю прайвеси, связанные с использованием Ваших данных компанией %appName%. Нажмите \"\"Да\"\", если Вы согласны, или \"\"Нет\"\" - если не согласны.",
- "line1": "Предост. заправш.",
- "line2": "разрешения?"
- },
- "sv-se": {
- "tts": "%appName% begär att få tillgång till följande fordonsinformation och tillstånd: %functionalGroupLabels%. Om du trycker Ja godkänner du att %vehicleMake% ska hållas skadeslös för alla skador som kan uppstå eller eventuella integritetsintrång som uppstår när %appName% använder dina data. Tryck Ja för att godkänna eller Nej för att neka.",
- "line1": "Vill du ge",
- "line2": "tillstånd?"
- },
- "tr-tr": {
- "tts": "%appName%, şu araç bilgilerini ve izinleri kullanma isteğinde bulunuyor: %functionalGroupLabels%. Evet'e basarsanız, %appName%'in verilerinizi kullanması sonucunda oluşabilecek hasarlardan veya gizlilik kaybından %vehicleMake%'in sorumlu olmayacağını kabul etmiş olacaksınız. Lütfen kabul etmek için Evet'e veya reddetmek için Hayır'a basın.",
- "line1": "İstenen izinler",
- "line2": "verilsin mi?"
- },
- "zh-cn": {
- "tts": "%appName% 正在请求使用下列车辆信息和权限: %functionalGroupLabels%。如果您按“是”,则表示您同意。 %vehicleMake% 将不会对因 %appName% 使用您的数据而引起的任何损毁或隐私损失负责。 请按“是”允许或按“否”拒绝。",
- "line1": "是否允许请求的",
- "line2": "权限?"
- },
- "zh-tw": {
- "tts": "%appName% 正請求使用 %functionalGroupLabels% 的車輛資訊和許可。按「是」,表示您同意,如因 %appName% 使用您的資料導致任何損害或損失,%vehicleMake% 將不負賠償責任。同意請按「是」,拒絕請按「否」。",
- "line1": "允許",
- "line2": "授權請求?"
- }
- }
- },
- "AppPermissionsHelp": {
- "languages": {
- "de-de": {
- "tts": "%appName% fordert folgende Fahrzeuginformationen und Zugriffsberechtigungen: %functionalGroupLabels%. Im Einstellungsmenü der mobilen Apps können Sie diese Berechtigungen ändern und sich detaillierte Beschreibungen anhören. Mit Ja stimmen Sie zu; mit Nein lehnen Sie ab."
- },
- "en-au": {
- "tts": "%appName% is requesting the following vehicle information and permissions: %functionalGroupLabels%. You can change these permissions and hear detailed descriptions in the mobile apps settings menu. Please press Yes to grant permissions or No to deny."
- },
- "en-gb": {
- "tts": "%appName% is requesting the following vehicle information and permissions: %functionalGroupLabels%. You can change these permissions and hear detailed descriptions in the mobile apps settings menu. Please press Yes to grant permissions or No to deny."
- },
- "en-ie": {
- "tts": "%appName% is requesting the following vehicle information and permissions: %functionalGroupLabels%. You can change these permissions and hear detailed descriptions in the mobile apps settings menu. Please press Yes to grant permissions or No to deny."
- },
- "en-us": {
- "tts": "%appName% is requesting the following vehicle information and permissions: %functionalGroupLabels%. You can change these permissions and hear detailed descriptions in the mobile apps settings menu. Please press yes to grant permissions or no to deny."
- },
- "es-en": {
- "tts": "%appName% solicita la siguiente información y permisos del vehículo: %functionalGroupLabels%. Puede cambiar estos permisos y consultar descripciones detalladas en el menú de configuración de las aplicaciones móviles. Presione Sí para otorgar permisos y No para denegar."
- },
- "es-es": {
- "tts": "%appName% está solicitando los siguientes permisos e información del vehículo: %functionalGroupLabels%. Puede cambiar estos permisos y escuchar descripciones detalladas en el menú de configuración de la aplicación móvil. Pulse sí para conceder el permiso o no para denegarlo."
- },
- "es-mx": {
- "tts": "%appName% solicita la siguiente información y permisos del vehículo: %functionalGroupLabels%. Puede cambiar estos permisos y consultar descripciones detalladas en el menú de configuración de las aplicaciones móviles. Presione Sí para otorgar permisos y No para denegar."
- },
- "fr-ca": {
- "tts": "%appName% demande d’utiliser les informations du véhicule et les permissions suivantes : %functionalGroupLabels%. Vous pouvez modifier ces permissions et entendre les descriptions détaillées dans le menu des réglages des applications mobiles. Veuillez appuyer sur Oui pour accorder les permissions ou sur Non pour refuser."
- },
- "fr-fr": {
- "tts": "%appName% demande d’utiliser les informations du véhicule et les permissions suivantes : %functionalGroupLabels%. Vous pouvez modifier ces permissions et entendre les descriptions détaillées dans le menu des réglages des applications mobiles. Veuillez appuyer sur Oui pour accorder les permissions ou sur Non pour refuser."
- },
- "it-it": {
- "tts": "%appName% richiede le seguenti informazioni e autorizzazioni riguardo il veicolo: %functionalGroupLabels%. È possibile modificare tali autorizzazioni e ascoltare descrizioni dettagliate nel menu impostazioni delle app mobili. Premere Sì per concedere le autorizzazioni e No per negarle."
- },
- "nl-nl": {
- "tts": "%appName% vraagt gebruikmaking van de volgende voertuiginformatie en toestemmingen aan: %functionalGroupLabels%. U kunt deze toestemmingen wijzigen en gedetailleerde beschrijvingen beluisteren in het instellingenmenu voor mobiele apps. Druk op Ja om permissies te verlenen of op Nee om te weigeren."
- },
- "pl-pl": {
- "tts": "%appName% wymaga następujących informacji o pojeździe oraz zezwoleń: %functionalGroupLabels%. W menu ustawień aplikacji mobilnych można zmienić owe zezwolenia i usłyszeć ich szczegółowy opis. Naciśnij TAK, aby wyrazić zgodę lub NIE w celu odrzucenia żądania."
- },
- "pt-br": {
- "tts": "%appName% está solicitando as seguintes informações e permissões do veículo: %functionalGroupLabels%. Você pode alterar estas permissões e ouvir descrições detalhadas no menu de configurações de aplicativos móveis. Pressione sim para conceder as permissões ou não para negar."
- },
- "pt-pt": {
- "tts": "%appName% está a solicitar as seguintes informações e permissões do veículo: %functionalGroupLabels%. Pode alterar estas permissões e ouvir descrições detalhadas no menu de definições das aplicações móveis. Prima \"\"Sim\"\" para permitir ou \"\"Não\"\" para recusar."
- },
- "ru-ru": {
- "tts": "%appName% запрашивает следующую информацию об автомобиле и разрешения: %functionalGroupLabels%. Вы можете изменить эти разрешения и прослушать подробные их описания в меню настроек мобильного приложения. Нажмите \"\"да\"\", чтобы предоставить разрешения, или \"\"нет\"\", чтобы не предоставлять."
- },
- "sv-se": {
- "tts": "%appName% begär tillgång till följande fordonsinformation och tillstånd: %functionalGroupLabels%. Du kan ändra tillstånden och höra detaljerade beskrivningar i menyn för mobilappsinställningar. Tryck Ja för att ge tillstånd eller Nej för att neka."
- },
- "tr-tr": {
- "tts": "%appName%, şu araç bilgilerini ve izinleri istiyor: %functionalGroupLabels%. Bu izinleri değiştirebilir ve mobil uygulamalar ayarlar menüsünden ayrıntılı açıklamaları dinleyebilirsiniz. Lütfen izin vermek için Evet'e veya reddetmek için Hayır'a basın."
- },
- "zh-cn": {
- "tts": "%appName% 正在请求下列车辆信息和权限: %functionalGroupLabels%。您可在移动应用程序设置菜单中更改这些权限,并听取详细说明。请按“是”允许权限或按“否”拒绝。"
- },
- "zh-tw": {
- "tts": "%appName% 正請求使用 %functionalGroupLabels% 的車輛資訊和許可。您可在行動應用程式設定清單中更改這些許可,並聆聽詳細說明。給予許可請按「是」,拒絕請按「否」。"
- }
- }
- },
- "AppPermissionsRevoked": {
- "languages": {
- "de-de": {
- "tts": "Die Autorisierungsdaten der App wurden geändert. %appName% hat keinen Zugriff auf %functionalGroupLabels% mehr. Installieren Sie die neueste Version der App auf Ihrem Gerät.."
- },
- "en-au": {
- "tts": "App authorizations have changed. %appName% can no longer access %functionalGroupLabels%. Please ensure you have the most recent app version installed on your mobile device."
- },
- "en-gb": {
- "tts": "App authorizations have changed. %appName% can no longer access %functionalGroupLabels%. Please ensure you have the most recent app version installed on your mobile device."
- },
- "en-ie": {
- "tts": "App authorizations have changed. %appName% can no longer access %functionalGroupLabels%. Please ensure you have the most recent app version installed on your mobile device."
- },
- "en-us": {
- "tts": "App authorizations have changed. %appName% can no longer access %functionalGroupLabels%. Please ensure you have the most recent app version installed on your mobile device."
- },
- "es-en": {
- "tts": "Las autorizaciones de la aplicación han cambiado. %appName% ya no puede acceder a %functionalGroupLabels%. Asegúrese de haber instalado la versión más reciente de la aplicación en su dispositivo móvil."
- },
- "es-es": {
- "tts": "Las autorizaciones de la aplicación han cambiado. %appName% ya no puede acceder a %functionalGroupLabels%. Asegúrese de que tiene la versión más reciente de la aplicación instalada en su dispositivo móvil."
- },
- "es-mx": {
- "tts": "Las autorizaciones de la aplicación han cambiado. %appName% ya no puede acceder a %functionalGroupLabels%. Asegúrese de haber instalado la versión más reciente de la aplicación en su dispositivo móvil."
- },
- "fr-ca": {
- "tts": "Les autorisations pour app ont changé. %appName% ne peut plus accéder à %functionalGroupLabels%. Veuillez vous assurer que la plus récente version de l’application est installée sur votre appareil mobile."
- },
- "fr-fr": {
- "tts": "Les autorisations pour app ont changé. %appName% ne peut plus accéder à %functionalGroupLabels%. Veuillez vous assurer que la plus récente version de l’application est installée sur votre appareil mobile."
- },
- "it-it": {
- "tts": "Le autorizzazioni dell'app sono cambiate. %appName% non è più in grado di accedere a %functionalGroupLabels%. Assicurarsi di avere la versione più recente dell'app installata sul dispositivo mobile."
- },
- "nl-nl": {
- "tts": "De app-autorisaties zijn gewijzigd. %appName% heeft geen toegang meer tot %functionalGroupLabels%. Zorg ervoor dat u de meest recente app-versie op uw mobiele apparaat geïnstalleerd hebt."
- },
- "pl-pl": {
- "tts": "Dane dostępu aplikacji zostały zmienione. %appName% nie ma już dostępu do %functionalGroupLabels%. Sprawdź, czy na telefonie komórkowym zainstalowano najnowszą wersję aplikacji."
- },
- "pt-br": {
- "tts": "As autorizações dos aplicativos foram alteradas. %appName% não pode mais acessar %functionalGroupLabels%. Certifique-se de que a versão mais recente do aplicativo está instalada no seu dispositivo móvel."
- },
- "pt-pt": {
- "tts": "As autorizações das aplicações mudaram. %appName% já não consegue aceder a %functionalGroupLabels%. Certifique-se de que tem a última versão da aplicação no seu dispositivo móvel."
- },
- "ru-ru": {
- "tts": "Авторизации приложения изменены. %appName% больше не имеет доступа к %functionalGroupLabels%. Убедитесь, что на вашем мобильном устройстве установлена самая новая версия приложения."
- },
- "sv-se": {
- "tts": "Appens behörigheter har ändrats. %appName% har inte längre åtkomst till %functionalGroupLabels%. Kontrollera att du har installerat den senaste versionen av appen på mobilenheten."
- },
- "tr-tr": {
- "tts": "Uygulama yetkileri değişti. %appName% artık %functionalGroupLabels%'e erişemeyecek. Lütfen mobil aygıtınızda en son uygulama sürümünün yüklü olduğundan emin olun."
- },
- "zh-cn": {
- "tts": "应用程序授权已变更。 %appName% 将不能再访问 %functionalGroupLabels%。 请确认您的移动设备上安装的应用程序是最新版本。"
- },
- "zh-tw": {
- "tts": "應用程式授權已改變。%appName% 已無法進入 %functionalGroupLabels%。請確認您的行動裝置上安裝了最新版應用程式。"
- }
- }
- },
- "AppUnauthorized": {
- "languages": {
- "de-de": {
- "tts": "Diese Version von %appName% ist nicht autorisiert und wird nicht mit SYNC funktionieren.",
- "line1": "nicht autorisiert"
- },
- "en-au": {
- "tts": "This version of %appName% is not authorized and will not work with SYNC.",
- "line1": "not authorized"
- },
- "en-gb": {
- "tts": "This version of %appName% is not authorized and will not work with SYNC.",
- "line1": "not authorized",
- "textBody": "This version of %appName% is not authorized and will not work with SYNC."
- },
- "en-ie": {
- "tts": "This version of %appName% is not authorized and will not work with SYNC.",
- "line1": "not authorized"
- },
- "en-us": {
- "tts": "This version of %appName% is not authorized and will not work with SYNC.",
- "line1": "Not Authorized",
- "textBody": "This version of %appName% is no longer authorized to work with AppLink. Please update to the latest version of %appName%."
- },
- "es-en": {
- "tts": "Esta versión de %appName% no tiene autorización y no funcionará con SYNC.",
- "line1": "no autorizada",
- "textBody": "Esta versión de %appName% no tiene autorización y no funcionará con SYNC."
- },
- "es-es": {
- "tts": "Esta versión de %appName% no está autorizada y no funcionará con SYNC.",
- "line1": "No autorizada"
- },
- "es-mx": {
- "tts": "Esta versión de %appName% no tiene autorización y no funcionará con SYNC.",
- "line1": "no autorizada"
- },
- "fr-ca": {
- "tts": "Cette version de %appName% n’est pas autorisée et ne fonctionnera pas avec SYNC.",
- "line1": "non autorisée",
- "textBody": "Cette version de %appName% n’est pas autorisée et ne fonctionnera pas avec SYNC."
- },
- "fr-fr": {
- "tts": "Cette version de %appName% n’est pas autorisée et ne fonctionnera pas avec SYNC.",
- "line1": "non autorisée"
- },
- "it-it": {
- "tts": "Questa versione di %appName% non è autorizzata e non funziona con il SYNC.",
- "line1": "non autorizzata"
- },
- "nl-nl": {
- "tts": "Deze versie van %appName% is niet geautoriseerd en werkt niet met SYNC.",
- "line1": "niet geautoriseerd"
- },
- "pl-pl": {
- "tts": "Niniejsza wersja %appName% nie posiada autoryzacji i nie będzie działać z SYNC.",
- "line1": "brak autoryzacji"
- },
- "pt-br": {
- "tts": "Esta versão do %appName% não tem autorização e não funcionará com o SYNC.",
- "line1": "não autorizado"
- },
- "pt-pt": {
- "tts": "Esta versão de %appName% não está autorizada e não funcionará com o SYNC.",
- "line1": "não autorizada"
- },
- "ru-ru": {
- "tts": "Эта версия %appName% не авторизирована и не будет работать с SYNC.",
- "line1": "не авторизировано"
- },
- "sv-se": {
- "tts": "Den här versionen av %appName% är inte godkänd och fungerar inte med SYNC.",
- "line1": "är ej godkänd"
- },
- "tr-tr": {
- "tts": "Bu %appName% sürümüne izin verilmediğinden SYNC ile çalışamaz.",
- "line1": "için izin yok"
- },
- "zh-cn": {
- "tts": "此版本的%appName% 未得到授权,无法在SYNC上使用。",
- "line1": "未得到授权"
- },
- "zh-tw": {
- "tts": "%appName% 的版本未獲得授權,將無法透過 SYNC 使用。",
- "line1": "無授權"
- }
- }
- },
- "AppUnsupported": {
- "languages": {
- "de-de": {
- "tts": "Diese Version von %appName% wird von SYNC nicht unterstützt.",
- "line1": "nicht unterstützt"
- },
- "en-au": {
- "tts": "This version of %appName% is not supported by SYNC.",
- "line1": "not supported"
- },
- "en-gb": {
- "tts": "This version of %appName% is not supported by SYNC.",
- "line1": "not supported",
- "textBody": "This version of %appName% is not supported by SYNC."
- },
- "en-ie": {
- "tts": "This version of %appName% is not supported by SYNC.",
- "line1": "not supported"
- },
- "en-us": {
- "tts": "This version of %appName% is not supported by SYNC.",
- "line1": "Not Supported",
- "textBody": "Your version of %appName% is not supported by SYNC."
- },
- "es-en": {
- "tts": "Esta versión de %appName% no es compatible con SYNC.",
- "line1": "no compatible",
- "textBody": "Esta versión de %appName% no es compatible con SYNC."
- },
- "es-es": {
- "tts": "Esta versión de %appName% no es compatible con SYNC.",
- "line1": "No compatible"
- },
- "es-mx": {
- "tts": "Esta versión de %appName% no es compatible con SYNC.",
- "line1": "no compatible"
- },
- "fr-ca": {
- "tts": "Cette version de %appName% n’est pas prise en charge par SYNC.",
- "line1": "incompatible",
- "textBody": "Cette version de %appName% n’est pas prise en charge par SYNC."
- },
- "fr-fr": {
- "tts": "Cette version de %appName% n’est pas prise en charge par SYNC.",
- "line1": "incompatible"
- },
- "it-it": {
- "tts": "Questa versione di %appName% non è supportata dal SYNC.",
- "line1": "non supportata"
- },
- "nl-nl": {
- "tts": "Deze versie van %appName% wordt niet ondersteund door SYNC.",
- "line1": "niet ondersteund"
- },
- "pl-pl": {
- "tts": "Niniejsza wersja %appName% nie jest obsługiwana przez system SYNC.",
- "line1": "aplikacja nie obsług."
- },
- "pt-br": {
- "tts": "Esta versão do %appName% não é suportada pelo SYNC.",
- "line1": "não suportado"
- },
- "pt-pt": {
- "tts": "Esta versão de %appName% não é suportado pelo SYNC.",
- "line1": "não suportada"
- },
- "ru-ru": {
- "tts": "Эта версия %appName% не поддерживается SYNC.",
- "line1": "не поддерживается"
- },
- "sv-se": {
- "tts": "SYNC har inte stöd för den här versionen av %appName%.",
- "line1": "stöds ej"
- },
- "tr-tr": {
- "tts": "Bu %appName% sürümü SYNC tarafından desteklenmiyor.",
- "line1": "desteklenmiyor"
- },
- "zh-cn": {
- "tts": "SYNC不支持此版本的%appName%。",
- "line1": "不受支持"
- },
- "zh-tw": {
- "tts": "SYNC 不支援此版本的%appName% 。",
- "line1": "不支援"
- }
- }
- },
- "DataConsent": {
- "languages": {
- "en-gb": {
- "textBody": "Would you like to enable Mobile Apps on SYNC? To use Mobile Apps with SYNC, SYNC will communicate with Ford at least once per month using your mobile device’s data plan. Standard rates may apply. SYNC will send your VIN and SYNC module number to Ford U.S. Updates are about the size of an email, and the occurrence of updates depends on your vehicle usage and when a new app is found on your device. To turn on or off, visit the SYNC Settings menu. See your Owner Guide for more information."
- },
- "en-us": {
- "line1": "Enable Mobile Apps",
- "line2": "on SYNC? (Uses Data)",
- "textBody": "Would you like to enable Mobile Apps on SYNC?\n\nTo use Mobile Apps with SYNC, SYNC will communicate with Ford at least once per month using your mobile device’s data plan. Standard rates may apply. SYNC will send your VIN and SYNC module number to Ford U.S.\n\nUpdates are about the size of an email, and the occurrence of updates depends on your vehicle usage and when a new app is found on your device. To turn on or off, visit the SYNC Settings menu. See your Owner Guide for more information."
- },
- "es-en": {
- "textBody": "Para usar aplicaciones móviles con SYNC, este debe comunicarse con Ford al menos una vez al mes a través del plan de datos de su dispositivo móvil. Pueden aplicar tarifas normales. SYNC enviará su VIN y el número de módulo de SYNC a Ford de Estados Unidos de América. Las actualizaciones tienen el tamaño aproximado de un mensaje de correo electrónico, y la frecuencia de las actualizaciones depende del uso de su vehículo y de si se encuentran nuevas aplicaciones en su dispositivo. Para obtener más información, consulte la Guía del propietario. /r Presione Sí para permitir y No para denegar."
- },
- "fr-ca": {
- "textBody": "Pour utiliser AppLink, SYNC devra communiquer avec Ford au moins une fois par mois en utilisant le forfait de données de votre appareil mobile. Les tarifs réguliers peuvent s’appliquer. SYNC enverra votre NIV et le numéro de votre module SYNC à Ford États-Unis. Les mises à jour ont la taille d’un courriel et la fréquence des mises à jour dépend de l’utilisation de votre véhicule et si une nouvelle application se trouve sur votre appareil. Consultez le Guide de l’utilisateur pour obtenir d’autres renseignements. /r Veuillez appuyer sur Oui pour autoriser ou sur Non pour refuser."
- }
- }
- },
- "DataConsentHelp": {
- "languages": {
- "en-us": {
- "textBody": "Updates are about the size of an email, and the occurrence of updates depends on your vehicle usage and when a new app is found on your device. See your Owner Guide for more information."
- },
- "es-en": {
- "textBody": "Las actualizaciones tienen el tamaño aproximado de un mensaje de correo electrónico, y la frecuencia de las actualizaciones depende del uso de su vehículo y de si se encuentran nuevas aplicaciones en su dispositivo. Para obtener más información, consulte la Guía del propietario."
- },
- "fr-ca": {
- "textBody": "Les mises à jour ont la taille d’un courriel et la fréquence des mises à jour dépend de l’utilisation de votre véhicule et si une nouvelle application se trouve sur votre appareil. Consultez le Guide de l’utilisateur pour obtenir d’autres renseignements."
- }
- }
- },
- "DisableApps": {
- "languages": {
- "de-de": {
- "tts": "Ausschalten der automatischen Updates führt zum Ausschalten von SYNC mobile Apps. Sie können Ihre mobilen Apps dann nicht mehr mit SYNC nutzen. Bitte drücken Sie Ja zur Bestätigung oder Nein, um abzubrechen.",
- "line1": "Auto-Update",
- "line2": "und Mobile Apps deaktivieren"
- },
- "en-au": {
- "tts": "Disabling automatic updates will also disable SYNC mobile apps. You will not be able to use any mobile apps with SYNC. Please press Yes to confirm or No to cancel.",
- "line1": "Disable auto-updates",
- "line2": "and Mobile Apps?"
- },
- "en-gb": {
- "tts": "Disabling automatic updates will also disable SYNC mobile apps. You will not be able to use any mobile apps with SYNC. Please press Yes to confirm or No to cancel.",
- "line1": "Disable auto-updates",
- "line2": "and Mobile Apps?",
- "textBody": "Disabling automatic updates will also disable SYNC mobile apps. You will not be able to use any mobile apps with SYNC. Please press Yes to confirm or No to cancel."
- },
- "en-ie": {
- "tts": "Disabling automatic updates will also disable SYNC mobile apps. You will not be able to use any mobile apps with SYNC. Please press Yes to confirm or No to cancel.",
- "line1": "Disable auto-updates",
- "line2": "and Mobile Apps?"
- },
- "en-us": {
- "tts": "Disabling automatic updates will also disable sync mobile apps. You will not be able to use any mobile apps with SYNC. Please press yes to confirm or no to cancel.",
- "line1": "Disable Auto-Updates",
- "line2": "and Mobile Apps?",
- "textBody": "Disabling automatic updates will also disable sync mobile apps. You will not be able to use any mobile apps with SYNC. Please press yes to confirm or no to cancel."
- },
- "es-en": {
- "tts": "Si se desactivan las actualizaciones automáticas, también se desactivarán las aplicaciones móviles de SYNC. No podrá usar ninguna aplicación móvil con SYNC. Presione Sí para confirmar o No para cancelar.",
- "line1": "¿Deshab. actualiz.",
- "line2": "autom. y aplic. móv.?",
- "textBody": "Si se desactivan las actualizaciones automáticas, también se desactivarán las aplicaciones móviles de SYNC. No podrá usar ninguna aplicación móvil con SYNC. Presione Sí para confirmar o No para cancelar."
- },
- "es-es": {
- "tts": "Si desactiva las actualizaciones automáticas, también se desactivará la sincronización de las aplicaciones móviles. No podrá utilizar ninguna aplicación móvil con SYNC. Pulse sí para confirmar o no para cancelar.",
- "line1": "¿Desact. actual. auto",
- "line2": "y apl. móviles?"
- },
- "es-mx": {
- "tts": "Si se desactivan las actualizaciones automáticas, también se desactivarán las aplicaciones móviles de SYNC. No podrá usar ninguna aplicación móvil con SYNC. Presione Sí para confirmar o No para cancelar.",
- "line1": "¿Deshab. actualiz.",
- "line2": "autom. y aplic. móv.?"
- },
- "fr-ca": {
- "tts": "La désactivation des mises à jour automatiques désactivera aussi les applications mobiles SYNC. Vous ne pourrez pas utiliser d’application mobile avec SYNC. Veuillez appuyer sur Oui pour confirmer ou sur Non pour annuler.",
- "line1": "Désactiver màj autom.",
- "line2": "et app. mobiles?",
- "textBody": "La désactivation des mises à jour automatiques désactivera aussi les applications mobiles SYNC. Vous ne pourrez pas utiliser d’application mobile avec SYNC. Veuillez appuyer sur Oui pour confirmer ou sur Non pour annuler."
- },
- "fr-fr": {
- "tts": "La désactivation des mises à jour automatiques désactivera aussi les applications mobiles SYNC. Vous ne pourrez pas utiliser d’application mobile avec SYNC. Veuillez appuyer sur Oui pour confirmer ou sur Non pour annuler.",
- "line1": "Désactiver màj autom.",
- "line2": "et app. mobiles?"
- },
- "it-it": {
- "tts": "Disabilitando gli aggiornamenti automatici si disattiva anche la sincronizzazione delle app mobili. Non sarà possibile usare app mobili con il SYNC. Premere Sì per confermare e No per cancellare.",
- "line1": "Disabilitare agg. aut.",
- "line2": "e app mobili?"
- },
- "nl-nl": {
- "tts": "Door automatische updates uit te schakelen, schakelt u ook SYNC-mobiele apps uit. U kunt dan geen mobiele apps meer gebruiken met SYNC. Druk op Ja om te bevestigen of op Nee om te annuleren.",
- "line1": "Auto-updates en mob.",
- "line2": "apps uitschakelen?"
- },
- "pl-pl": {
- "tts": "Wyłączenie automatycznych aktualizacji spowoduje także wyłączenie aplikacji mobilnych SYNC. Korzystanie z mobilnych aplikacji za pomocą SYNC będzie niemożliwe. Naciśnij TAK, by potwierdzić lub NIE, by anulować.",
- "line1": "Wył. automat. aktual.",
- "line2": "i aplikacje mobilne?"
- },
- "pt-br": {
- "tts": "Se as atualizações automáticas forem desativadas, os aplicativos também serão desativados. Você não poderá usar nenhum aplicativo com o SYNC. Pressione sim para confirmar ou não para cancelar.",
- "line1": "Desativar atualizações",
- "line2": "autom. e aplicativos?"
- },
- "pt-pt": {
- "tts": "A desactivação das actualizações automáticas desactiva igualmente as aplicações móveis do SYNC. Não poderá utilizar quaisquer aplicações móveis com o SYNC. Prima \"\"Sim\"\" para confirmar ou \"\"Não\"\" para cancelar.",
- "line1": "Desact. actual. autom.",
- "line2": "e aplicações móveis?"
- },
- "ru-ru": {
- "tts": "При отключении автоматических обновлений также будут отключены мобильные приложения sync. Вы не сможете использовать какие-либо мобильные приложения с SYNC. Нажмите \"\"Да\"\" для подтверждения или \"\"Нет\"\" для отмены.",
- "line1": "Откл. автообновления",
- "line2": "и мобил. прилож.?"
- },
- "sv-se": {
- "tts": "Om du avaktiverar automatisk uppdatering avaktiverar du även synkning av mobilappar. Du kommer inte längre att kunna använda dina mobilappar med SYNC. Tryck Ja för att bekräfta eller Nej för att avbryta.",
- "line1": "Avaktiverar autouppdat.",
- "line2": "och mobilappar?"
- },
- "tr-tr": {
- "tts": "Otomatik güncellemeleri devre dışı bırakırsanız sync mobil uygulamalar da devre dışı kalır. SYNC ile mobil uygulama kullanmanız mümkün olmaz. Lütfen onaylamak için Evet'e veya iptal etmek için Hayır'a basın.",
- "line1": "Oto. güncelleme ve",
- "line2": "mobil uygul. kapat?"
- },
- "zh-cn": {
- "tts": "禁用自动更新同时也会禁用SYNC移动应用程序。您将无法在 SYNC 中使用任何移动应用程序。请按“是”确认或按“否”取消。",
- "line1": "是否禁用自动更新和",
- "line2": "移动应用程序?"
- },
- "zh-tw": {
- "tts": "停用自動更新也將停用 sync 行動應用程式。您將無法透過 SYNC 使用任何行動應用程式。確認請按「是」,取消請按「否」。",
- "line1": "停用自動更新",
- "line2": "和行動應用程式?"
- }
- }
- },
- "DrivingCharacteristics": {
- "languages": {
- "de-de": {
- "tts": "Eine App hat Zugriff auf die folgenden Fahreigenschaften: Kraftstoffverbrauch, MyKey, Sicherheitsgurtstatus.",
- "label": "Fahreigenschaften"
- },
- "en-au": {
- "tts": "An app can access the following driving characteristics: Fuel consumption, MyKey, Seat belt status.",
- "label": "Driving characteristics"
- },
- "en-gb": {
- "tts": "An app can access the following driving characteristics: Fuel consumption, MyKey, Seat belt status.",
- "label": "Driving characteristics",
- "textBody": "An app can access the following driving characteristics: Fuel consumption, MyKey, Seat belt status."
- },
- "en-ie": {
- "tts": "An app can access the following driving characteristics: Fuel consumption, MyKey, Seat belt status.",
- "label": "Driving characteristics"
- },
- "en-us": {
- "tts": "An app can access the following driving characteristics: Fuel Consumption, MyKey, Seat Belt Status.",
- "label": "Driving Characteristics",
- "textBody": "An app can access the following driving characteristics: Fuel Consumption, MyKey, Seat Belt Status."
- },
- "es-en": {
- "tts": "Las aplicaciones pueden acceder a las siguientes características del manejo: Consumo de combustible, MyKey, Estado del cinturón de seguridad.",
- "label": "Características del manejo",
- "textBody": "Las aplicaciones pueden acceder a las siguientes características del manejo: Consumo de combustible, MyKey, Estado del cinturón de seguridad."
- },
- "es-es": {
- "tts": "Una aplicación puede acceder a las siguientes características de conducción: Consumo de combustible, MyKey, Estado cinturones de seguridad.",
- "label": "Características de conducción"
- },
- "es-mx": {
- "tts": "Las aplicaciones pueden acceder a las siguientes características del manejo: Consumo de combustible, MyKey, Estado del cinturón de seguridad.",
- "label": "Características del manejo"
- },
- "fr-ca": {
- "tts": "Une application peut accéder aux caractéristiques de conduite suivantes: Consommation de carburant, MyKey, État des ceintures de sécurité.",
- "label": "Caractéristiques de conduite",
- "textBody": "Une application peut accéder aux caractéristiques de conduite suivantes: Consommation de carburant, MyKey, État des ceintures de sécurité."
- },
- "fr-fr": {
- "tts": "Une application peut accéder aux caractéristiques de conduite suivantes: Consommation de carburant, MyKey, État des ceintures de sécurité.",
- "label": "Caractéristiques de conduite"
- },
- "it-it": {
- "tts": "Un'app può avere accesso alle seguenti caratteristiche di guida: Consumo carburante, MyKey, Stato cinture di sicurezza.",
- "label": "Caratteristiche di guida"
- },
- "nl-nl": {
- "tts": "Een app heeft toegang tot de volgende rijkenmerken: Brandstofverbruik, MyKey, Veiligheidsgordelstatus.",
- "label": "Rijkenmerken"
- },
- "pl-pl": {
- "tts": "Aplikacja może uzyskać dostęp do następujących informacji dotyczących jazdy: Zużycie paliwa, MyKey, Stan pasów bezpieczeństwa.",
- "label": "Informacje dotyczące stylu jazdy"
- },
- "pt-br": {
- "tts": "Um aplicativo pode acessar as seguintes características de condução: Consumo de combustível, MyKey, Estado do cinto de segurança.",
- "label": "Características de condução"
- },
- "pt-pt": {
- "tts": "Uma aplicação consegue aceder às seguintes informações de condução: Consumo de combustível, MyKey, Estado dos cintos de segurança.",
- "label": "Características de condução"
- },
- "ru-ru": {
- "tts": "Приложение имеет доступ к следующим характеристикам движения: Расход топлива, MyKey, Состояние ремней безопасности.",
- "label": "Характеристики движения"
- },
- "sv-se": {
- "tts": "Appen kan komma åt följande köregenskaper: Bränsleförbrukning, MyKey, Bältesstatus.",
- "label": "Köregenskaper"
- },
- "tr-tr": {
- "tts": "Bir uygulama şu sürüş karakteristiklerine erişebilir: Yakıt tüketimi, MyKey, Emniyet kemeri durumu.",
- "label": "Sürüş karakteristikleri"
- },
- "zh-cn": {
- "tts": "移动应用程序可访问下列行驶特性: 油耗, MyKey, 安全带状态",
- "label": "行驶特性"
- },
- "zh-tw": {
- "tts": "應用程式可存取以下駕駛特性: 油耗, MyKey, 安全帶狀態",
- "label": "駕駛特性"
- }
- }
- },
- "Location": {
- "languages": {
- "de-de": {
- "tts": "Eine App hat Zugriff auf die GPS-Daten und die Geschwindigkeit des Fahrzeugs.",
- "label": "GPS und Geschwindigkeit"
- },
- "en-au": {
- "tts": "An app can access vehicle GPS and speed.",
- "label": "GPS and speed"
- },
- "en-gb": {
- "tts": "An app can access vehicle GPS and speed.",
- "label": "GPS and speed",
- "textBody": "An app can access vehicle GPS and speed."
- },
- "en-ie": {
- "tts": "An app can access vehicle GPS and speed.",
- "label": "GPS and speed"
- },
- "en-us": {
- "tts": "An app can access vehicle GPS and speed.",
- "label": "GPS and speed",
- "textBody": "An app can access vehicle GPS and speed."
- },
- "es-en": {
- "tts": "Las aplicaciones pueden acceder al GPS y a la velocidad del vehículo.",
- "label": "GPS y velocidad",
- "textBody": "Las aplicaciones pueden acceder al GPS y a la velocidad del vehículo."
- },
- "es-es": {
- "tts": "Una aplicación puede acceder al GPS y la velocidad del vehículo.",
- "label": "GPS y velocidad"
- },
- "es-mx": {
- "tts": "Las aplicaciones pueden acceder al GPS y a la velocidad del vehículo.",
- "label": "GPS y velocidad"
- },
- "fr-ca": {
- "tts": "Une application peut accéder au GPS et à la vitesse du véhicule.",
- "label": "GPS et vitesse",
- "textBody": "Une application peut accéder au GPS et à la vitesse du véhicule."
- },
- "fr-fr": {
- "tts": "Une application peut accéder au GPS et à la vitesse du véhicule.",
- "label": "GPS et vitesse"
- },
- "it-it": {
- "tts": "Un'app può avere accesso a GPS e velocità del veicolo.",
- "label": "GPS e velocità"
- },
- "nl-nl": {
- "tts": "Een app heeft toegang tot gps en de snelheid van het voertuig.",
- "label": "Gps en snelheid"
- },
- "pl-pl": {
- "tts": "Aplikacja może uzyskać dostęp do modułu GPS i prędkości pojazdu.",
- "label": "GPS i prędkość"
- },
- "pt-br": {
- "tts": "Um aplicativo pode acessar o GPS e a velocidade do veículo.",
- "label": "GPS e velocidade"
- },
- "pt-pt": {
- "tts": "Uma aplicação consegue aceder ao GPS e à velocidade do veículo.",
- "label": "GPS e velocidade"
- },
- "ru-ru": {
- "tts": "Приложение имеет доступ к GPS и скорости автомобиля.",
- "label": "GPS и скорость"
- },
- "sv-se": {
- "tts": "Appen kan komma åt fordonets GPS och hastighetsmätare.",
- "label": "GPS och hastighet"
- },
- "tr-tr": {
- "tts": "Bu uygulama aracın GPS ve hız bilgilerine erişebilir.",
- "label": "GPS ve hız"
- },
- "zh-cn": {
- "tts": "移动应用程序可以访问车辆 GPS 和车速信息。",
- "label": "GPS 和车速"
- },
- "zh-tw": {
- "tts": "應用程式可存取車輛的GPS和速度。",
- "label": "GPS和車速"
- }
- }
- },
- "Notifications": {
- "languages": {
- "de-de": {
- "tts": "Läuft die App im Hintergrund, kann Sie Benachrichtigungen senden.",
- "label": "Push-Benachrichtigungen"
- },
- "en-au": {
- "tts": "An app can send notifications when running in the background.",
- "label": "Push notifications"
- },
- "en-gb": {
- "tts": "An app can send notifications when running in the background.",
- "label": "Push notifications",
- "textBody": "An app can send notifications when running in the background."
- },
- "en-ie": {
- "tts": "An app can send notifications when running in the background.",
- "label": "Push notifications"
- },
- "en-us": {
- "tts": "An app can send notifications when running in the background.",
- "label": "Push notifications",
- "textBody": "An app can send notifications when running in the background."
- },
- "es-en": {
- "tts": "Las aplicaciones pueden enviar notificaciones cuando se ejecutan en segundo plano.",
- "label": "Notificaciones tipo Push",
- "textBody": "Las aplicaciones pueden enviar notificaciones cuando se ejecutan en segundo plano."
- },
- "es-es": {
- "tts": "Una aplicación puede enviar notificaciones cuando se está ejecutando en segundo plano.",
- "label": "Notificaciones push"
- },
- "es-mx": {
- "tts": "Las aplicaciones pueden enviar notificaciones cuando se ejecutan en segundo plano.",
- "label": "Notificaciones tipo Push"
- },
- "fr-ca": {
- "tts": "Une application peut envoyer des avis lorsqu’elle fonctionne en arrière-plan.",
- "label": "Notifications instantanées",
- "textBody": "Une application peut envoyer des avis lorsqu’elle fonctionne en arrière-plan."
- },
- "fr-fr": {
- "tts": "Une application peut envoyer des avis lorsqu’elle fonctionne en arrière-plan.",
- "label": "Notifications push"
- },
- "it-it": {
- "tts": "Un'app può inviare notifiche se eseguita in background.",
- "label": "Notifiche push"
- },
- "nl-nl": {
- "tts": "Een app kan meldingen versturen als deze op de achtergrond actief is.",
- "label": "Push-meldingen"
- },
- "pl-pl": {
- "tts": "Aplikacja może wysyłać powiadomienia, działając w tle.",
- "label": "Powiadomienia Push"
- },
- "pt-br": {
- "tts": "Um aplicativo pode enviar notificações quando estiver sendo executado em segundo plano.",
- "label": "Notificações Push"
- },
- "pt-pt": {
- "tts": "Uma aplicação consegue enviar notificações quando está activa em segundo plano.",
- "label": "Notificações push"
- },
- "ru-ru": {
- "tts": "Если приложение работает в фоновом режиме, оно может отправлять оповещения.",
- "label": "Оповещения о пересылке"
- },
- "sv-se": {
- "tts": "Appen kan skicka meddelanden när den körs i bakgrunden.",
- "label": "Push-notiser"
- },
- "tr-tr": {
- "tts": "Bir uygulama arka planda çalışırken bildirim gönderebilir.",
- "label": "Anlık bildirimleri"
- },
- "zh-cn": {
- "tts": "移动应用程序在后台运行时可推送通知。",
- "label": "推送通知"
- },
- "zh-tw": {
- "tts": "車輛行進時,應用程式可在背景中傳送通知。",
- "label": "傳送通知"
- }
- }
- },
- "SettingDisableUpdates": {
- "languages": {
- "de-de": {
- "line1": "Updates deakt."
- },
- "en-au": {
- "line1": "Disable updates"
- },
- "en-gb": {
- "line1": "Disable updates"
- },
- "en-ie": {
- "line1": "Disable updates"
- },
- "en-us": {
- "line1": "Disable Updates",
- "textBody": "Disable Updates"
- },
- "es-en": {
- "line1": "Deshab. actual.",
- "textBody": "Deshab. actual."
- },
- "es-es": {
- "line1": "Desact. actual."
- },
- "es-mx": {
- "line1": "Deshab. actual."
- },
- "fr-ca": {
- "line1": "Désactiver MAJ",
- "textBody": "Désactiver MAJ"
- },
- "fr-fr": {
- "line1": "Désactiver màj"
- },
- "it-it": {
- "line1": "Disabilita agg."
- },
- "nl-nl": {
- "line1": "Upd. uitschak."
- },
- "pl-pl": {
- "line1": "Wyłącz aktual."
- },
- "pt-br": {
- "line1": "Desat. atualiz."
- },
- "pt-pt": {
- "line1": "Desact. actualiz."
- },
- "ru-ru": {
- "line1": "Откл. обновл."
- },
- "sv-se": {
- "line1": "Inaktivera uppd."
- },
- "tr-tr": {
- "line1": "Güncell. Kapat"
- },
- "zh-cn": {
- "line1": "禁用更新"
- },
- "zh-tw": {
- "line1": "停用更新"
- }
- }
- },
- "SettingEnableUpdates": {
- "languages": {
- "de-de": {
- "line1": "Apps aktivieren"
- },
- "en-au": {
- "line1": "Enable Apps"
- },
- "en-gb": {
- "line1": "Enable Apps"
- },
- "en-ie": {
- "line1": "Enable Apps"
- },
- "en-us": {
- "line1": "Enable Apps"
- },
- "es-en": {
- "line1": "Hab. aplic."
- },
- "es-es": {
- "line1": "Activar apl."
- },
- "es-mx": {
- "line1": "Hab. aplic."
- },
- "fr-ca": {
- "line1": "Activer app.",
- "textBody": "Activer app."
- },
- "fr-fr": {
- "line1": "Activer app."
- },
- "it-it": {
- "line1": "Abilita app"
- },
- "nl-nl": {
- "line1": "Apps inschak."
- },
- "pl-pl": {
- "line1": "Włącz aplikacje"
- },
- "pt-br": {
- "line1": "Ativar aplic."
- },
- "pt-pt": {
- "line1": "Activar actualiz."
- },
- "ru-ru": {
- "line1": "Вкл. прилож."
- },
- "sv-se": {
- "line1": "Aktivera appar"
- },
- "tr-tr": {
- "line1": "Uygulamaları aç"
- },
- "zh-cn": {
- "line1": "启用应用程序"
- },
- "zh-tw": {
- "line1": "啟用應用程式"
- }
- }
- },
- "SettingUpdateAuto": {
- "languages": {
- "de-de": {
- "line1": "Update anford."
- },
- "en-au": {
- "line1": "Request update"
- },
- "en-gb": {
- "line1": "Request update"
- },
- "en-ie": {
- "line1": "Request update"
- },
- "en-us": {
- "line1": "Request Update",
- "textBody": "Select `Update now` to receive app authorization information for your SYNC-enabled mobile apps. This may enable additional functionality depending on the app and your settings. If your phone has a working data connection, an update should complete in less than 1 minute."
- },
- "es-en": {
- "line1": "Solicit. actualiz.",
- "textBody": "Solicit. actualiz."
- },
- "es-es": {
- "line1": "Solicitar actual."
- },
- "es-mx": {
- "line1": "Solicit. actualiz."
- },
- "fr-ca": {
- "line1": "Demander MAJ",
- "textBody": "Demander MAJ"
- },
- "fr-fr": {
- "line1": "Demander màj"
- },
- "it-it": {
- "line1": "Rich. aggiorn."
- },
- "nl-nl": {
- "line1": "Upd. aanvragen"
- },
- "pl-pl": {
- "line1": "Zażądaj aktual."
- },
- "pt-br": {
- "line1": "Solicitar atualiz."
- },
- "pt-pt": {
- "line1": "Solicit. actualiz."
- },
- "ru-ru": {
- "line1": "Запрос на обн."
- },
- "sv-se": {
- "line1": "Begär uppdat."
- },
- "tr-tr": {
- "line1": "Güncelleme iste"
- },
- "zh-cn": {
- "line1": "请求更新"
- },
- "zh-tw": {
- "line1": "請求更新"
- }
- }
- },
- "StatusNeeded": {
- "languages": {
- "de-de": {
- "line1": "Update benötigt"
- },
- "en-au": {
- "line1": "Update needed"
- },
- "en-gb": {
- "line1": "Update needed",
- "textBody": "Update needed"
- },
- "en-ie": {
- "line1": "Update needed"
- },
- "en-us": {
- "line1": "Update Needed",
- "textBody": "Update Needed"
- },
- "es-en": {
- "line1": "Actualiz. neces.",
- "textBody": "Actualiz. neces."
- },
- "es-es": {
- "line1": "Actu. necesaria"
- },
- "es-mx": {
- "line1": "Actualiz. neces."
- },
- "fr-ca": {
- "line1": "Màj requise",
- "textBody": "Màj requise"
- },
- "fr-fr": {
- "line1": "Mise à jour requise"
- },
- "it-it": {
- "line1": "Necess. aggiorn."
- },
- "nl-nl": {
- "line1": "Update nodig"
- },
- "pl-pl": {
- "line1": "Potrzeba aktual."
- },
- "pt-br": {
- "line1": "Atualiz. necess."
- },
- "pt-pt": {
- "line1": "Actual. necess."
- },
- "ru-ru": {
- "line1": "Необх. обновл."
- },
- "sv-se": {
- "line1": "Uppdat. krävs"
- },
- "tr-tr": {
- "line1": "Güncellenmeli"
- },
- "zh-cn": {
- "line1": "需要进行更新"
- },
- "zh-tw": {
- "line1": "需更新"
- }
- }
- },
- "StatusPending": {
- "languages": {
- "de-de": {
- "line1": "Aktualisieren..."
- },
- "en-au": {
- "line1": "Updating..."
- },
- "en-gb": {
- "line1": "Updating...",
- "textBody": "Updating..."
- },
- "en-ie": {
- "line1": "Updating..."
- },
- "en-us": {
- "line1": "Updating...",
- "textBody": "Updating..."
- },
- "es-en": {
- "line1": "Actualizando...",
- "textBody": "Actualizando..."
- },
- "es-es": {
- "line1": "Actualizando..."
- },
- "es-mx": {
- "line1": "Actualizando..."
- },
- "fr-ca": {
- "line1": "MAJ en cours...",
- "textBody": "MAJ en cours..."
- },
- "fr-fr": {
- "line1": "Màj en cours..."
- },
- "it-it": {
- "line1": "Aggiornamento"
- },
- "nl-nl": {
- "line1": "Updaten..."
- },
- "pl-pl": {
- "line1": "Aktualizowanie"
- },
- "pt-br": {
- "line1": "Atualizando..."
- },
- "pt-pt": {
- "line1": "A actualizar..."
- },
- "ru-ru": {
- "line1": "Обновление..."
- },
- "sv-se": {
- "line1": "Uppdaterar..."
- },
- "tr-tr": {
- "line1": "Güncelleniyor..."
- },
- "zh-cn": {
- "line1": "正在更新......"
- },
- "zh-tw": {
- "line1": "更新中..."
- }
- }
- },
- "StatusUpToDate": {
- "languages": {
- "de-de": {
- "line1": "Aktuelle Version"
- },
- "en-au": {
- "line1": "Up-to-date"
- },
- "en-gb": {
- "line1": "Up-to-date",
- "textBody": "Up-to-date"
- },
- "en-ie": {
- "line1": "Up-to-date"
- },
- "en-us": {
- "line1": "Up-To-Date",
- "textBody": "Up-To-Date"
- },
- "es-en": {
- "line1": "Actualizado",
- "textBody": "Actualizado"
- },
- "es-es": {
- "line1": "Actualizada"
- },
- "es-mx": {
- "line1": "Actualizado"
- },
- "fr-ca": {
- "line1": "Déjà à jour",
- "textBody": "Déjà à jour"
- },
- "fr-fr": {
- "line1": "Déjà à jour"
- },
- "it-it": {
- "line1": "più recente"
- },
- "nl-nl": {
- "line1": "Up-to-date"
- },
- "pl-pl": {
- "line1": "Aktualne"
- },
- "pt-br": {
- "line1": "Atualizado"
- },
- "pt-pt": {
- "line1": "Actualizado"
- },
- "ru-ru": {
- "line1": "Обновлено"
- },
- "sv-se": {
- "line1": "Uppdat. krävs ej"
- },
- "tr-tr": {
- "line1": "Güncel"
- },
- "zh-cn": {
- "line1": "最新更新"
- },
- "zh-tw": {
- "line1": "更新最新"
- }
- }
- },
- "VehicleInfo": {
- "languages": {
- "de-de": {
- "tts": "Eine App hat Zugriff auf die folgenden Fahrzeuginformationen: Kraftstoff-Füllstand, Kraftstoffverbrauch, Motordrehzahl, Kilometerzähler, FIN, Außentemperatur, Gangstellung, Reifenluftdruck.",
- "label": "Fahrzeuginformationen"
- },
- "en-au": {
- "tts": "An app can access the following vehicle information: Fuel level, Fuel economy, Engine RPMs, Odometer, VIN, Outside air temperature, Gear position, Tyre pressure.",
- "label": "Vehicle information"
- },
- "en-gb": {
- "tts": "An app can access the following vehicle information: Fuel level, Fuel economy, Engine RPMs, Odometer, VIN, Outside air temperature, Gear position, Tire pressure.",
- "label": "Vehicle information",
- "textBody": "An app can access the following vehicle information: Fuel level, Fuel economy, Engine RPMs, Odometer, VIN, Outside air temperature, Gear position, Tire pressure."
- },
- "en-ie": {
- "tts": "An app can access the following vehicle information: Fuel level, Fuel economy, Engine RPMs, Odometer, VIN, Outside air temperature, Gear position, Tyre pressure.",
- "label": "Vehicle information"
- },
- "en-us": {
- "tts": "An app can access the following vehicle information: Fuel Level, Fuel Economy, Engine RPMs, Odometer, VIN, External Temperature, Gear Position, Tire Pressure.",
- "label": "Vehicle information",
- "textBody": "An app can access the following vehicle information: Fuel Level, Fuel Economy, Engine RPMs, Odometer, VIN, External Temperature, Gear Position, Tire Pressure."
- },
- "es-en": {
- "tts": "Las aplicaciones pueden acceder a la siguiente información del vehículo: Nivel de combustible, Economía de combustible, RPM del motor, Cuentakilómetros, Número de identificación del vehículo, Temperatura externa, Posición del cambio, Presión de los neumáticos.",
- "label": "Información del vehículo",
- "textBody": "Las aplicaciones pueden acceder a la siguiente información del vehículo: Nivel de combustible, Economía de combustible, RPM del motor, Cuentakilómetros, Número de identificación del vehículo, Temperatura externa, Posición del cambio, Presión de los neumáticos."
- },
- "es-es": {
- "tts": "Una aplicación puede acceder a la siguiente información del vehículo: Nivel de combustible, Ahorro de combustible, RPM del motor, Cuentakilómetros, VIN, Temperatura aire exterior, Marcha engranada, Presión de neumáticos.",
- "label": "Información del vehículo"
- },
- "es-mx": {
- "tts": "Las aplicaciones pueden acceder a la siguiente información del vehículo: Nivel de combustible, Economía de combustible, RPM del motor, Cuentakilómetros, Número de identificación del vehículo, Temperatura externa, Posición del cambio, Presión de los neumáticos.",
- "label": "Información del vehículo"
- },
- "fr-ca": {
- "tts": "Une application peut accéder aux informations suivantes du véhicule: Niveau de carburant, Économie de carburant, Au régime du moteur, Odomètre, NIV, Température extérieure, Position d’embrayage, Pression des pneus.",
- "label": "Renseignements du véhicule",
- "textBody": "Une application peut accéder aux informations suivantes du véhicule: Niveau de carburant, Économie de carburant, Au régime du moteur, Odomètre, NIV, Température extérieure, Position d’embrayage, Pression des pneus."
- },
- "fr-fr": {
- "tts": "Une application peut accéder aux informations suivantes du véhicule: Niveau de carburant, Économie de carburant, Vitesse de moteur, Compteur kilométrique, NIV, Température extérieure, Position de vitesse, Pression des pneus.",
- "label": "Renseignements du véhicule"
- },
- "it-it": {
- "tts": "Un'app può avere accesso alle seguenti informazioni del veicolo: Livello carburante, Consumi carburante, Numero giri motore, Contachilometri, VIN, Temperatura esterna, Posizione marcia, Pressione pneumatici.",
- "label": "Informazioni sul veicolo"
- },
- "nl-nl": {
- "tts": "Een app heeft toegang tot de volgende voertuiginformatie: Brandstofpeil, Brandstofverbruik, Motortoerental, Kilometerteller, VIN, Buitentemperatuur, Versnellingsstand, Bandenspanning.",
- "label": "Voertuiginformatie"
- },
- "pl-pl": {
- "tts": "Aplikacja może uzyskać dostęp do następujących informacji o pojeździe: Poziom paliwa, Zużycie paliwa, Obroty silnika, Licznik przebiegu, Numer VIN, Temperatura zewnętrzna, Aktualny bieg, Ciśnienie opon.",
- "label": "Informacje o pojeździe"
- },
- "pt-br": {
- "tts": "Um aplicativo pode acessar as seguintes informações sobre o veículo: Nível de combustível, Economia de combustível, RPM do motor, Hodômetro, VIN, Temperatura externa, Posição das marchas, Pressão dos pneus.",
- "label": "Informações sobre o veículo"
- },
- "pt-pt": {
- "tts": "Uma aplicação consegue aceder às seguintes informações do veículo: Nível de combustível, Poupança de combustível, RPM do motor, Conta-quilómetros, VIN, Temperatura exterior, Posição da mudança de velocidade, Pressão dos pneus.",
- "label": "Informações do veículo"
- },
- "ru-ru": {
- "tts": "Приложение имеет доступ к следующим данным автомобиля: Уровень топлива, Економия топлива, Число оборотов двигателя, Одометр, Номер VIN, Температура за бортом, Положение передачи, Давление шин.",
- "label": "Информация об автомобиле"
- },
- "sv-se": {
- "tts": "Appen kan komma åt följande fordonsinformation: Bränslenivå, Bränsleekonomi, Motorns varvtal, Vägmätare, VIN, Utetemperatur, Växelläge, Däcktryck.",
- "label": "Fordonsinformation"
- },
- "tr-tr": {
- "tts": "Bir uygulama şu araç bilgilerine erişebilir: Yakıt seviyesi, Yakıt ekonomisi, Motor devirleri, Kilometre sayacı, VIN, Dış sıcaklık, Vites konumu, Lastik basıncı.",
- "label": "Araç bilgisi"
- },
- "zh-cn": {
- "tts": "移动应用程序可访问下列车辆信息 : 燃油量, 燃油经济性, 发动机转速(RPM), 里程表, VIN, 车外温度, 档位, 胎压.",
- "label": "车辆信息"
- },
- "zh-tw": {
- "tts": "一個應用程式可存取以下車輛資訊 : 燃油存量, 燃油經濟性, 引擎轉速, 里程表, 車輛識別號碼, 車外溫度, 檔位, 胎壓.",
- "label": "車輛資訊"
- }
- }
- }
- }
- },
- "app_policies": {
- "default": {
- "keep_context": false,
- "steal_focus": false,
- "priority": "NONE",
- "default_hmi": "NONE",
- "groups": ["Base-4"]
- },
- "device": {
- "keep_context": false,
- "steal_focus": false,
- "priority": "NONE",
- "default_hmi": "NONE",
- "groups": ["DataConsent-2"]
- },
- "pre_DataConsent": {
- "keep_context": false,
- "steal_focus": false,
- "priority": "NONE",
- "default_hmi": "NONE",
- "groups": ["BaseBeforeDataConsent"]
- }
- }
- }
- }
+{
+ "policy_table": {
+ "module_config": {
+ "preloaded_pt": true,
+ "exchange_after_x_ignition_cycles": 100,
+ "exchange_after_x_kilometers": 1800,
+ "exchange_after_x_days": 30,
+ "timeout_after_x_seconds": 60,
+ "seconds_between_retries": [1,
+ 5,
+ 25,
+ 125,
+ 625],
+ "endpoints": {
+ "0x07": {
+ "default": ["http://policies.telematics.ford.com/api/policies"]
+ }
+ },
+ "notifications_per_minute_by_priority": {
+ "EMERGENCY": 60,
+ "NAVIGATION": 15,
+ "COMMUNICATION": 6,
+ "NORMAL": 4,
+ "NONE": 0
+ }
+ },
+ "functional_groupings": {
+ "Base-4": {
+ "rpcs": {
+ "AddCommand": {
+ "hmi_levels": ["BACKGROUND",
+ "FULL",
+ "LIMITED"]
+ },
+ "AddSubMenu": {
+ "hmi_levels": ["BACKGROUND",
+ "FULL",
+ "LIMITED"]
+ },
+ "Alert": {
+ "hmi_levels": ["FULL",
+ "LIMITED"]
+ },
+ "ChangeRegistration": {
+ "hmi_levels": ["BACKGROUND",
+ "FULL",
+ "LIMITED",
+ "NONE"]
+ },
+ "CreateInteractionChoiceSet": {
+ "hmi_levels": ["BACKGROUND",
+ "FULL",
+ "LIMITED"]
+ },
+ "DeleteCommand": {
+ "hmi_levels": ["BACKGROUND",
+ "FULL",
+ "LIMITED"]
+ },
+ "DeleteFile": {
+ "hmi_levels": ["BACKGROUND",
+ "FULL",
+ "LIMITED",
+ "NONE"]
+ },
+ "DeleteInteractionChoiceSet": {
+ "hmi_levels": ["BACKGROUND",
+ "FULL",
+ "LIMITED"]
+ },
+ "DeleteSubMenu": {
+ "hmi_levels": ["BACKGROUND",
+ "FULL",
+ "LIMITED"]
+ },
+ "EncodedSyncPData": {
+ "hmi_levels": ["BACKGROUND",
+ "FULL",
+ "LIMITED",
+ "NONE"]
+ },
+ "EndAudioPassThru": {
+ "hmi_levels": ["BACKGROUND",
+ "FULL",
+ "LIMITED"]
+ },
+ "GenericResponse": {
+ "hmi_levels": ["BACKGROUND",
+ "FULL",
+ "LIMITED"]
+ },
+ "ListFiles": {
+ "hmi_levels": ["BACKGROUND",
+ "FULL",
+ "LIMITED",
+ "NONE"]
+ },
+ "OnAppInterfaceUnregistered": {
+ "hmi_levels": ["BACKGROUND",
+ "FULL",
+ "LIMITED",
+ "NONE"]
+ },
+ "OnAudioPassThru": {
+ "hmi_levels": ["BACKGROUND",
+ "FULL",
+ "LIMITED"]
+ },
+ "OnButtonEvent": {
+ "hmi_levels": ["FULL",
+ "LIMITED"]
+ },
+ "OnButtonPress": {
+ "hmi_levels": ["FULL",
+ "LIMITED"]
+ },
+ "OnCommand": {
+ "hmi_levels": ["BACKGROUND",
+ "FULL",
+ "LIMITED"]
+ },
+ "OnDriverDistraction": {
+ "hmi_levels": ["BACKGROUND",
+ "FULL",
+ "LIMITED"]
+ },
+ "OnEncodedSyncPData": {
+ "hmi_levels": ["BACKGROUND",
+ "FULL",
+ "LIMITED",
+ "NONE"]
+ },
+ "OnHashChange": {
+ "hmi_levels": ["BACKGROUND",
+ "FULL",
+ "LIMITED",
+ "NONE"]
+ },
+ "OnHMIStatus": {
+ "hmi_levels": ["BACKGROUND",
+ "FULL",
+ "LIMITED",
+ "NONE"]
+ },
+ "OnLanguageChange": {
+ "hmi_levels": ["BACKGROUND",
+ "FULL",
+ "LIMITED",
+ "NONE"]
+ },
+ "OnPermissionsChange": {
+ "hmi_levels": ["BACKGROUND",
+ "FULL",
+ "LIMITED",
+ "NONE"]
+ },
+ "OnSystemRequest": {
+ "hmi_levels": ["BACKGROUND",
+ "FULL",
+ "LIMITED",
+ "NONE"]
+ },
+ "PerformAudioPassThru": {
+ "hmi_levels": ["FULL",
+ "LIMITED"]
+ },
+ "PerformInteraction": {
+ "hmi_levels": ["FULL",
+ "LIMITED"]
+ },
+ "PutFile": {
+ "hmi_levels": ["BACKGROUND",
+ "FULL",
+ "LIMITED",
+ "NONE"]
+ },
+ "RegisterAppInterface": {
+ "hmi_levels": ["BACKGROUND",
+ "FULL",
+ "LIMITED",
+ "NONE"]
+ },
+ "ResetGlobalProperties": {
+ "hmi_levels": ["BACKGROUND",
+ "FULL",
+ "LIMITED"]
+ },
+ "ScrollableMessage": {
+ "hmi_levels": ["FULL"]
+ },
+ "SetAppIcon": {
+ "hmi_levels": ["BACKGROUND",
+ "FULL",
+ "LIMITED",
+ "NONE"]
+ },
+ "SetDisplayLayout": {
+ "hmi_levels": ["BACKGROUND",
+ "FULL",
+ "LIMITED",
+ "NONE"]
+ },
+ "SetGlobalProperties": {
+ "hmi_levels": ["BACKGROUND",
+ "FULL",
+ "LIMITED"]
+ },
+ "SetMediaClockTimer": {
+ "hmi_levels": ["FULL",
+ "LIMITED"]
+ },
+ "Show": {
+ "hmi_levels": ["BACKGROUND",
+ "FULL",
+ "LIMITED"]
+ },
+ "Slider": {
+ "hmi_levels": ["FULL"]
+ },
+ "Speak": {
+ "hmi_levels": ["FULL",
+ "LIMITED"]
+ },
+ "SubscribeButton": {
+ "hmi_levels": ["BACKGROUND",
+ "FULL",
+ "LIMITED"]
+ },
+ "SystemRequest": {
+ "hmi_levels": ["BACKGROUND",
+ "FULL",
+ "LIMITED",
+ "NONE"]
+ },
+ "UnregisterAppInterface": {
+ "hmi_levels": ["BACKGROUND",
+ "FULL",
+ "LIMITED",
+ "NONE"]
+ },
+ "UnsubscribeButton": {
+ "hmi_levels": ["BACKGROUND",
+ "FULL",
+ "LIMITED"]
+ }
+ }
+ },
+ "Location-1": {
+ "user_consent_prompt": "Location",
+ "rpcs": {
+ "GetVehicleData": {
+ "hmi_levels": ["BACKGROUND",
+ "FULL",
+ "LIMITED"],
+ "parameters": ["gps",
+ "speed"]
+ },
+ "OnVehicleData": {
+ "hmi_levels": ["BACKGROUND",
+ "FULL",
+ "LIMITED"],
+ "parameters": ["gps",
+ "speed"]
+ },
+ "SubscribeVehicleData": {
+ "hmi_levels": ["BACKGROUND",
+ "FULL",
+ "LIMITED"],
+ "parameters": ["gps",
+ "speed"]
+ },
+ "UnsubscribeVehicleData": {
+ "hmi_levels": ["BACKGROUND",
+ "FULL",
+ "LIMITED"],
+ "parameters": ["gps",
+ "speed"]
+ }
+ }
+ },
+ "Notifications": {
+ "user_consent_prompt": "Notifications",
+ "rpcs": {
+ "Alert": {
+ "hmi_levels": ["BACKGROUND"]
+ }
+ }
+ },
+ "DrivingCharacteristics-3": {
+ "user_consent_prompt": "DrivingCharacteristics",
+ "rpcs": {
+ "GetVehicleData": {
+ "hmi_levels": ["BACKGROUND",
+ "FULL",
+ "LIMITED"],
+ "parameters": ["accPedalPosition",
+ "beltStatus",
+ "driverBraking",
+ "myKey",
+ "prndl",
+ "rpm",
+ "steeringWheelAngle"]
+ },
+ "OnVehicleData": {
+ "hmi_levels": ["BACKGROUND",
+ "FULL",
+ "LIMITED"],
+ "parameters": ["accPedalPosition",
+ "beltStatus",
+ "driverBraking",
+ "myKey",
+ "prndl",
+ "rpm",
+ "steeringWheelAngle"]
+ },
+ "SubscribeVehicleData": {
+ "hmi_levels": ["BACKGROUND",
+ "FULL",
+ "LIMITED"],
+ "parameters": ["accPedalPosition",
+ "beltStatus",
+ "driverBraking",
+ "myKey",
+ "prndl",
+ "rpm",
+ "steeringWheelAngle"]
+ },
+ "UnsubscribeVehicleData": {
+ "hmi_levels": ["BACKGROUND",
+ "FULL",
+ "LIMITED"],
+ "parameters": ["accPedalPosition",
+ "beltStatus",
+ "driverBraking",
+ "myKey",
+ "prndl",
+ "rpm",
+ "steeringWheelAngle"]
+ }
+ }
+ },
+ "VehicleInfo-3": {
+ "user_consent_prompt": "VehicleInfo",
+ "rpcs": {
+ "GetVehicleData": {
+ "hmi_levels": ["BACKGROUND",
+ "FULL",
+ "LIMITED"],
+ "parameters": ["bodyInformation",
+ "deviceStatus",
+ "engineTorque",
+ "externalTemperature",
+ "fuelLevel",
+ "fuelLevel_State",
+ "headLampStatus",
+ "instantFuelConsumption",
+ "odometer",
+ "tirePressure",
+ "vin",
+ "wiperStatus"]
+ },
+ "OnVehicleData": {
+ "hmi_levels": ["BACKGROUND",
+ "FULL",
+ "LIMITED"],
+ "parameters": ["bodyInformation",
+ "deviceStatus",
+ "engineTorque",
+ "externalTemperature",
+ "fuelLevel",
+ "fuelLevel_State",
+ "headLampStatus",
+ "instantFuelConsumption",
+ "odometer",
+ "tirePressure",
+ "vin",
+ "wiperStatus"]
+ },
+ "SubscribeVehicleData": {
+ "hmi_levels": ["BACKGROUND",
+ "FULL",
+ "LIMITED"],
+ "parameters": ["bodyInformation",
+ "deviceStatus",
+ "engineTorque",
+ "externalTemperature",
+ "fuelLevel",
+ "fuelLevel_State",
+ "headLampStatus",
+ "instantFuelConsumption",
+ "odometer",
+ "tirePressure",
+ "wiperStatus"]
+ },
+ "UnsubscribeVehicleData": {
+ "hmi_levels": ["BACKGROUND",
+ "FULL",
+ "LIMITED"],
+ "parameters": ["bodyInformation",
+ "deviceStatus",
+ "engineTorque",
+ "externalTemperature",
+ "fuelLevel",
+ "fuelLevel_State",
+ "headLampStatus",
+ "instantFuelConsumption",
+ "odometer",
+ "tirePressure",
+ "wiperStatus"]
+ }
+ }
+ },
+ "PropriataryData-1": {
+ "rpcs": {
+ "DiagnosticMessage": {
+ "hmi_levels": ["BACKGROUND",
+ "FULL",
+ "LIMITED"]
+ },
+ "GetDTCs": {
+ "hmi_levels": ["BACKGROUND",
+ "FULL",
+ "LIMITED"]
+ },
+ "ReadDID": {
+ "hmi_levels": ["BACKGROUND",
+ "FULL",
+ "LIMITED"]
+ }
+ }
+ },
+ "Emergency-1": {
+ "rpcs": {
+ "GetVehicleData": {
+ "hmi_levels": ["BACKGROUND",
+ "FULL",
+ "LIMITED"],
+ "parameters": ["airbagStatus",
+ "clusterModeStatus",
+ "eCallInfo",
+ "emergencyEvent"]
+ },
+ "OnVehicleData": {
+ "hmi_levels": ["BACKGROUND",
+ "FULL",
+ "LIMITED"],
+ "parameters": ["airbagStatus",
+ "clusterModeStatus",
+ "eCallInfo",
+ "emergencyEvent"]
+ },
+ "SubscribeVehicleData": {
+ "hmi_levels": ["BACKGROUND",
+ "FULL",
+ "LIMITED"],
+ "parameters": ["airbagStatus",
+ "clusterModeStatus",
+ "eCallInfo",
+ "emergencyEvent"]
+ },
+ "UnsubscribeVehicleData": {
+ "hmi_levels": ["BACKGROUND",
+ "FULL",
+ "LIMITED"],
+ "parameters": ["airbagStatus",
+ "clusterModeStatus",
+ "eCallInfo",
+ "emergencyEvent"]
+ }
+ }
+ },
+ "Navigation-1": {
+ "rpcs": {
+ "AlertManeuver": {
+ "hmi_levels": ["BACKGROUND",
+ "FULL",
+ "LIMITED"]
+ },
+ "ShowConstantTBT": {
+ "hmi_levels": ["BACKGROUND",
+ "FULL",
+ "LIMITED"]
+ },
+ "UpdateTurnList": {
+ "hmi_levels": ["BACKGROUND",
+ "FULL",
+ "LIMITED"]
+ }
+ }
+ },
+ "DataConsent-2": {
+ "user_consent_prompt": "DataConsent",
+ "rpcs": null
+ },
+ "BaseBeforeDataConsent": {
+ "rpcs": {
+ "ChangeRegistration": {
+ "hmi_levels": ["BACKGROUND",
+ "FULL",
+ "LIMITED",
+ "NONE"]
+ },
+ "DeleteFile": {
+ "hmi_levels": ["BACKGROUND",
+ "FULL",
+ "LIMITED",
+ "NONE"]
+ },
+ "EncodedSyncPData": {
+ "hmi_levels": ["BACKGROUND",
+ "FULL",
+ "LIMITED",
+ "NONE"]
+ },
+ "ListFiles": {
+ "hmi_levels": ["BACKGROUND",
+ "FULL",
+ "LIMITED",
+ "NONE"]
+ },
+ "OnAppInterfaceUnregistered": {
+ "hmi_levels": ["BACKGROUND",
+ "FULL",
+ "LIMITED",
+ "NONE"]
+ },
+ "OnEncodedSyncPData": {
+ "hmi_levels": ["BACKGROUND",
+ "FULL",
+ "LIMITED",
+ "NONE"]
+ },
+ "OnHashChange": {
+ "hmi_levels": ["BACKGROUND",
+ "FULL",
+ "LIMITED",
+ "NONE"]
+ },
+ "OnHMIStatus": {
+ "hmi_levels": ["BACKGROUND",
+ "FULL",
+ "LIMITED",
+ "NONE"]
+ },
+ "OnLanguageChange": {
+ "hmi_levels": ["BACKGROUND",
+ "FULL",
+ "LIMITED",
+ "NONE"]
+ },
+ "OnPermissionsChange": {
+ "hmi_levels": ["BACKGROUND",
+ "FULL",
+ "LIMITED",
+ "NONE"]
+ },
+ "OnSystemRequest": {
+ "hmi_levels": ["BACKGROUND",
+ "FULL",
+ "LIMITED",
+ "NONE"]
+ },
+ "PutFile": {
+ "hmi_levels": ["BACKGROUND",
+ "FULL",
+ "LIMITED",
+ "NONE"]
+ },
+ "RegisterAppInterface": {
+ "hmi_levels": ["BACKGROUND",
+ "FULL",
+ "LIMITED",
+ "NONE"]
+ },
+ "SetAppIcon": {
+ "hmi_levels": ["BACKGROUND",
+ "FULL",
+ "LIMITED",
+ "NONE"]
+ },
+ "SetDisplayLayout": {
+ "hmi_levels": ["BACKGROUND",
+ "FULL",
+ "LIMITED",
+ "NONE"]
+ },
+ "SystemRequest": {
+ "hmi_levels": ["BACKGROUND",
+ "FULL",
+ "LIMITED",
+ "NONE"]
+ },
+ "UnregisterAppInterface": {
+ "hmi_levels": ["BACKGROUND",
+ "FULL",
+ "LIMITED",
+ "NONE"]
+ }
+ }
+ }
+ },
+ "consumer_friendly_messages": {
+ "version": "001.001.019",
+ "messages": {
+ "AppPermissions": {
+ "languages": {
+ "de-de": {
+ "tts": "%appName% benötigt die folgenden Fahrzeuginformationen und Zugriffsberechtigungen: %functionalGroupLabels%. Wenn Sie Ja drücken, erklären Sie sich damit einverstanden, dass %vehicleMake% nicht für Schäden oder Verletzungen der Privatsphäre haftet, die im Zusammenhang mit der Nutzung Ihrer Benutzerdaten durch %appName% entstehen. Mit Ja stimmen Sie zu; mit Nein lehnen Sie ab.",
+ "line1": "Zugriffsanfrage(n)",
+ "line2": "erlauben?"
+ },
+ "en-au": {
+ "tts": "%appName% is requesting the use of the following vehicle information and permissions: %functionalGroupLabels%. If you press Yes, you agree that %vehicleMake% will not be liable for any damages or loss of privacy related to %appName%'s use of your data. Please press Yes to allow or No to deny.",
+ "line1": "Grant requested",
+ "line2": "permission(s)?"
+ },
+ "en-gb": {
+ "tts": "%appName% is requesting the use of the following vehicle information and permissions: %functionalGroupLabels%. If you press Yes, you agree that %vehicleMake% will not be liable for any damages or loss of privacy related to %appName%`s use of your data. Please press Yes to allow or No to deny.",
+ "line1": "Grant requested",
+ "line2": "permission(s)?",
+ "textBody": "%appName% is requesting the use of the following vehicle information and permissions: %functionalGroupLabels%. If you press yes, you agree that %vehicleMake% will not be liable for any damages or loss of privacy related to %appName%`s use of your data. You can change these permissions and hear detailed descriptions in the mobile apps settings menu."
+ },
+ "en-ie": {
+ "tts": "%appName% is requesting the use of the following vehicle information and permissions: %functionalGroupLabels%. If you press Yes, you agree that %vehicleMake% will not be liable for any damages or loss of privacy related to %appName%'s use of your data. Please press Yes to allow or No to deny.",
+ "line1": "Grant requested",
+ "line2": "permission(s)?"
+ },
+ "en-us": {
+ "tts": "%appName% is requesting the use of the following vehicle information and permissions: %functionalGroupLabels%. If you press yes, you agree that %vehicleMake% will not be liable for any damages or loss of privacy related to %appName%’s use of your data. Please press yes to allow or no to deny.",
+ "line1": "Grant Requested",
+ "line2": "Permission(s)?",
+ "textBody": "%appName% is requesting the use of the following vehicle information and permissions: %functionalGroupLabels%. \n\nIf you press yes, you agree that %vehicleMake% will not be liable for any damages or loss of privacy related to %appName%’s use of your data. You can change these permissions and hear detailed descriptions in the mobile apps settings menu."
+ },
+ "es-en": {
+ "tts": "%appName% solicita el uso de la siguiente información y permisos del vehículo: %functionalGroupLabels%. Si presiona Sí, acepta que %vehicleMake% no se hará responsable por los daños o pérdidas de privacidad relacionados con el uso que %appName% haga de sus datos. Presione Sí para permitir y No para denegar.",
+ "line1": "¿Otorgar permiso(s)",
+ "line2": "solicitado(s)?",
+ "textBody": "%appName% solicita el uso de la siguiente información y permisos del vehículo: %functionalGroupLabels%. Si presiona Sí, acepta que %vehicleMake% no se hará responsable por los daños o pérdidas de privacidad relacionados con el uso que %appName% haga de sus datos. Presione Sí para permitir y No para denegar. \n\n Puede cambiar estos permisos y consultar descripciones detalladas en el menú de configuración de las aplicaciones móviles."
+ },
+ "es-es": {
+ "tts": "%appName% está solicitando el uso de los siguientes permisos e información del vehículo: %functionalGroupLabels%. Si pulsa sí, acepta que %vehicleMake% no será responsable de los daños o la pérdida de privacidad relacionados con el uso de sus datos por parte de %appName%. Pulse sí para permitir o no para denegar.",
+ "line1": "¿Conceder permisos",
+ "line2": "solicitados?"
+ },
+ "es-mx": {
+ "tts": "%appName% solicita el uso de la siguiente información y permisos del vehículo: %functionalGroupLabels%. Si presiona Sí, acepta que %vehicleMake% no se hará responsable por los daños o pérdidas de privacidad relacionados con el uso que %appName% haga de sus datos. Presione Sí para permitir y No para denegar.",
+ "line1": "¿Otorgar permiso(s)",
+ "line2": "solicitado(s)?"
+ },
+ "fr-ca": {
+ "tts": "%appName% demande d’utiliser les informations du véhicule et les permissions suivantes : %functionalGroupLabels%. Si vous appuyez sur Oui, vous acceptez que %vehicleMake% ne sera pas responsable des dommages ou des pertes de confidentialité reliées à l’utilisation de vos données par %appName%. Veuillez appuyer sur Oui pour autoriser ou sur Non pour refuser.",
+ "line1": "Accorder permission(s)",
+ "line2": "demandée(s)",
+ "textBody": "%appName% demande d’utiliser les informations du véhicule et les permissions suivantes : %functionalGroupLabels%. Si vous appuyez sur Oui, vous acceptez que %vehicleMake% ne sera pas responsable des dommages ou des pertes de confidentialité reliées à l’utilisation de vos données par %appName%. Vous pouvez modifier ces permissions et entendre les descriptions détaillées dans le menu des réglages des applications mobiles."
+ },
+ "fr-fr": {
+ "tts": "%appName% demande d’utiliser les informations du véhicule et les permissions suivantes : %functionalGroupLabels%. Si vous appuyez sur Oui, vous acceptez que %vehicleMake% ne sera pas responsable des dommages ou des pertes de confidentialité reliées à l’utilisation de vos données par %appName%. Veuillez appuyer sur Oui pour autoriser ou sur Non pour refuser.",
+ "line1": "Accorder permission(s)",
+ "line2": "demandée(s)"
+ },
+ "it-it": {
+ "tts": "%appName% richiede l'uso delle seguenti informazioni e autorizzazioni sul veicolo: %functionalGroupLabels%. Se si preme Sì, si acconsente che %vehicleMake% non sarà responsabile per danni o perdita di privacy in relazione all'impiego dei dati da parte di %appName%. Premere Sì per consentire e No per negare.",
+ "line1": "Concedi autorizzaz.",
+ "line2": "richiesta(e)?"
+ },
+ "nl-nl": {
+ "tts": "%appName% vraagt gebruikmaking van de volgende voertuiginformatie en toestemmingen aan: %functionalGroupLabels%. Als u op Ja drukt, gaat u ermee akkoord dat %vehicleMake% in geen geval aansprakelijk gesteld kan worden voor schade of verlies van privacy als gevolg van het feit dat %appName% gebruik maakt van uw gegevens. Druk op Ja om dit toe te staan of Nee om te weigeren.",
+ "line1": "Aangevraagde",
+ "line2": "permissie(s) verlenen?"
+ },
+ "pl-pl": {
+ "tts": "%appName% wymaga następujących informacji o pojeździe oraz pozwoleń: %functionalGroupLabels%. Naciśnięcie TAK oznacza zgodę na fakt, iż %vehicleMake% nie będzie ponosić odpowiedzialności za szkody ani utratę prywatności w związku z wykorzystaniem przez %appName% danych, należących do użytkownika. Naciśnij TAK w celu udzielenia zgody lub NIE w celu odrzucenia żądania.",
+ "line1": "Udzielić żądanych",
+ "line2": "pozwoleń?"
+ },
+ "pt-br": {
+ "tts": "%appName% está solicitando o uso das seguintes informações e permissões do veículo: %functionalGroupLabels%. Se pressionar sim, você concorda que a %vehicleMake% não será responsável por danos ou perdas de privacidade relacionados ao uso dos seus dados por %appName%. Pressione sim para permitir ou não para negar.",
+ "line1": "Conceder permissão",
+ "line2": "solicitada?"
+ },
+ "pt-pt": {
+ "tts": "%appName% está a solicitar a utilização das seguintes informações e permissões do veículo: %functionalGroupLabels%. Se premir “Sim”, concorda que %vehicleMake% não será responsável por quaisquer danos ou perda de privacidade relacionada com a utilização dos seus dados por parte de %appName%. Prima “Sim” para permitir ou “Não” para recusar.",
+ "line1": "Conceder permiss.",
+ "line2": "solicitada(s)?"
+ },
+ "ru-ru": {
+ "tts": "%appName% запрашивает следующую информацию об автомобиле и разрешения: %functionalGroupLabels%. Нажатием \"\"да\"\", Вы соглашаетесь, что %vehicleMake% не будет нести ответственность за какие-либо убытки или потерю прайвеси, связанные с использованием Ваших данных компанией %appName%. Нажмите \"\"Да\"\", если Вы согласны, или \"\"Нет\"\" - если не согласны.",
+ "line1": "Предост. заправш.",
+ "line2": "разрешения?"
+ },
+ "sv-se": {
+ "tts": "%appName% begär att få tillgång till följande fordonsinformation och tillstånd: %functionalGroupLabels%. Om du trycker Ja godkänner du att %vehicleMake% ska hållas skadeslös för alla skador som kan uppstå eller eventuella integritetsintrång som uppstår när %appName% använder dina data. Tryck Ja för att godkänna eller Nej för att neka.",
+ "line1": "Vill du ge",
+ "line2": "tillstånd?"
+ },
+ "tr-tr": {
+ "tts": "%appName%, şu araç bilgilerini ve izinleri kullanma isteğinde bulunuyor: %functionalGroupLabels%. Evet'e basarsanız, %appName%'in verilerinizi kullanması sonucunda oluşabilecek hasarlardan veya gizlilik kaybından %vehicleMake%'in sorumlu olmayacağını kabul etmiş olacaksınız. Lütfen kabul etmek için Evet'e veya reddetmek için Hayır'a basın.",
+ "line1": "İstenen izinler",
+ "line2": "verilsin mi?"
+ },
+ "zh-cn": {
+ "tts": "%appName% 正在请求使用下列车辆信息和权限: %functionalGroupLabels%。如果您按“是”,则表示您同意。 %vehicleMake% 将不会对因 %appName% 使用您的数据而引起的任何损毁或隐私损失负责。 请按“是”允许或按“否”拒绝。",
+ "line1": "是否允许请求的",
+ "line2": "权限?"
+ },
+ "zh-tw": {
+ "tts": "%appName% 正請求使用 %functionalGroupLabels% 的車輛資訊和許可。按「是」,表示您同意,如因 %appName% 使用您的資料導致任何損害或損失,%vehicleMake% 將不負賠償責任。同意請按「是」,拒絕請按「否」。",
+ "line1": "允許",
+ "line2": "授權請求?"
+ }
+ }
+ },
+ "AppPermissionsHelp": {
+ "languages": {
+ "de-de": {
+ "tts": "%appName% fordert folgende Fahrzeuginformationen und Zugriffsberechtigungen: %functionalGroupLabels%. Im Einstellungsmenü der mobilen Apps können Sie diese Berechtigungen ändern und sich detaillierte Beschreibungen anhören. Mit Ja stimmen Sie zu; mit Nein lehnen Sie ab."
+ },
+ "en-au": {
+ "tts": "%appName% is requesting the following vehicle information and permissions: %functionalGroupLabels%. You can change these permissions and hear detailed descriptions in the mobile apps settings menu. Please press Yes to grant permissions or No to deny."
+ },
+ "en-gb": {
+ "tts": "%appName% is requesting the following vehicle information and permissions: %functionalGroupLabels%. You can change these permissions and hear detailed descriptions in the mobile apps settings menu. Please press Yes to grant permissions or No to deny."
+ },
+ "en-ie": {
+ "tts": "%appName% is requesting the following vehicle information and permissions: %functionalGroupLabels%. You can change these permissions and hear detailed descriptions in the mobile apps settings menu. Please press Yes to grant permissions or No to deny."
+ },
+ "en-us": {
+ "tts": "%appName% is requesting the following vehicle information and permissions: %functionalGroupLabels%. You can change these permissions and hear detailed descriptions in the mobile apps settings menu. Please press yes to grant permissions or no to deny."
+ },
+ "es-en": {
+ "tts": "%appName% solicita la siguiente información y permisos del vehículo: %functionalGroupLabels%. Puede cambiar estos permisos y consultar descripciones detalladas en el menú de configuración de las aplicaciones móviles. Presione Sí para otorgar permisos y No para denegar."
+ },
+ "es-es": {
+ "tts": "%appName% está solicitando los siguientes permisos e información del vehículo: %functionalGroupLabels%. Puede cambiar estos permisos y escuchar descripciones detalladas en el menú de configuración de la aplicación móvil. Pulse sí para conceder el permiso o no para denegarlo."
+ },
+ "es-mx": {
+ "tts": "%appName% solicita la siguiente información y permisos del vehículo: %functionalGroupLabels%. Puede cambiar estos permisos y consultar descripciones detalladas en el menú de configuración de las aplicaciones móviles. Presione Sí para otorgar permisos y No para denegar."
+ },
+ "fr-ca": {
+ "tts": "%appName% demande d’utiliser les informations du véhicule et les permissions suivantes : %functionalGroupLabels%. Vous pouvez modifier ces permissions et entendre les descriptions détaillées dans le menu des réglages des applications mobiles. Veuillez appuyer sur Oui pour accorder les permissions ou sur Non pour refuser."
+ },
+ "fr-fr": {
+ "tts": "%appName% demande d’utiliser les informations du véhicule et les permissions suivantes : %functionalGroupLabels%. Vous pouvez modifier ces permissions et entendre les descriptions détaillées dans le menu des réglages des applications mobiles. Veuillez appuyer sur Oui pour accorder les permissions ou sur Non pour refuser."
+ },
+ "it-it": {
+ "tts": "%appName% richiede le seguenti informazioni e autorizzazioni riguardo il veicolo: %functionalGroupLabels%. È possibile modificare tali autorizzazioni e ascoltare descrizioni dettagliate nel menu impostazioni delle app mobili. Premere Sì per concedere le autorizzazioni e No per negarle."
+ },
+ "nl-nl": {
+ "tts": "%appName% vraagt gebruikmaking van de volgende voertuiginformatie en toestemmingen aan: %functionalGroupLabels%. U kunt deze toestemmingen wijzigen en gedetailleerde beschrijvingen beluisteren in het instellingenmenu voor mobiele apps. Druk op Ja om permissies te verlenen of op Nee om te weigeren."
+ },
+ "pl-pl": {
+ "tts": "%appName% wymaga następujących informacji o pojeździe oraz zezwoleń: %functionalGroupLabels%. W menu ustawień aplikacji mobilnych można zmienić owe zezwolenia i usłyszeć ich szczegółowy opis. Naciśnij TAK, aby wyrazić zgodę lub NIE w celu odrzucenia żądania."
+ },
+ "pt-br": {
+ "tts": "%appName% está solicitando as seguintes informações e permissões do veículo: %functionalGroupLabels%. Você pode alterar estas permissões e ouvir descrições detalhadas no menu de configurações de aplicativos móveis. Pressione sim para conceder as permissões ou não para negar."
+ },
+ "pt-pt": {
+ "tts": "%appName% está a solicitar as seguintes informações e permissões do veículo: %functionalGroupLabels%. Pode alterar estas permissões e ouvir descrições detalhadas no menu de definições das aplicações móveis. Prima \"\"Sim\"\" para permitir ou \"\"Não\"\" para recusar."
+ },
+ "ru-ru": {
+ "tts": "%appName% запрашивает следующую информацию об автомобиле и разрешения: %functionalGroupLabels%. Вы можете изменить эти разрешения и прослушать подробные их описания в меню настроек мобильного приложения. Нажмите \"\"да\"\", чтобы предоставить разрешения, или \"\"нет\"\", чтобы не предоставлять."
+ },
+ "sv-se": {
+ "tts": "%appName% begär tillgång till följande fordonsinformation och tillstånd: %functionalGroupLabels%. Du kan ändra tillstånden och höra detaljerade beskrivningar i menyn för mobilappsinställningar. Tryck Ja för att ge tillstånd eller Nej för att neka."
+ },
+ "tr-tr": {
+ "tts": "%appName%, şu araç bilgilerini ve izinleri istiyor: %functionalGroupLabels%. Bu izinleri değiştirebilir ve mobil uygulamalar ayarlar menüsünden ayrıntılı açıklamaları dinleyebilirsiniz. Lütfen izin vermek için Evet'e veya reddetmek için Hayır'a basın."
+ },
+ "zh-cn": {
+ "tts": "%appName% 正在请求下列车辆信息和权限: %functionalGroupLabels%。您可在移动应用程序设置菜单中更改这些权限,并听取详细说明。请按“是”允许权限或按“否”拒绝。"
+ },
+ "zh-tw": {
+ "tts": "%appName% 正請求使用 %functionalGroupLabels% 的車輛資訊和許可。您可在行動應用程式設定清單中更改這些許可,並聆聽詳細說明。給予許可請按「是」,拒絕請按「否」。"
+ }
+ }
+ },
+ "AppPermissionsRevoked": {
+ "languages": {
+ "de-de": {
+ "tts": "Die Autorisierungsdaten der App wurden geändert. %appName% hat keinen Zugriff auf %functionalGroupLabels% mehr. Installieren Sie die neueste Version der App auf Ihrem Gerät.."
+ },
+ "en-au": {
+ "tts": "App authorizations have changed. %appName% can no longer access %functionalGroupLabels%. Please ensure you have the most recent app version installed on your mobile device."
+ },
+ "en-gb": {
+ "tts": "App authorizations have changed. %appName% can no longer access %functionalGroupLabels%. Please ensure you have the most recent app version installed on your mobile device."
+ },
+ "en-ie": {
+ "tts": "App authorizations have changed. %appName% can no longer access %functionalGroupLabels%. Please ensure you have the most recent app version installed on your mobile device."
+ },
+ "en-us": {
+ "tts": "App authorizations have changed. %appName% can no longer access %functionalGroupLabels%. Please ensure you have the most recent app version installed on your mobile device."
+ },
+ "es-en": {
+ "tts": "Las autorizaciones de la aplicación han cambiado. %appName% ya no puede acceder a %functionalGroupLabels%. Asegúrese de haber instalado la versión más reciente de la aplicación en su dispositivo móvil."
+ },
+ "es-es": {
+ "tts": "Las autorizaciones de la aplicación han cambiado. %appName% ya no puede acceder a %functionalGroupLabels%. Asegúrese de que tiene la versión más reciente de la aplicación instalada en su dispositivo móvil."
+ },
+ "es-mx": {
+ "tts": "Las autorizaciones de la aplicación han cambiado. %appName% ya no puede acceder a %functionalGroupLabels%. Asegúrese de haber instalado la versión más reciente de la aplicación en su dispositivo móvil."
+ },
+ "fr-ca": {
+ "tts": "Les autorisations pour app ont changé. %appName% ne peut plus accéder à %functionalGroupLabels%. Veuillez vous assurer que la plus récente version de l’application est installée sur votre appareil mobile."
+ },
+ "fr-fr": {
+ "tts": "Les autorisations pour app ont changé. %appName% ne peut plus accéder à %functionalGroupLabels%. Veuillez vous assurer que la plus récente version de l’application est installée sur votre appareil mobile."
+ },
+ "it-it": {
+ "tts": "Le autorizzazioni dell'app sono cambiate. %appName% non è più in grado di accedere a %functionalGroupLabels%. Assicurarsi di avere la versione più recente dell'app installata sul dispositivo mobile."
+ },
+ "nl-nl": {
+ "tts": "De app-autorisaties zijn gewijzigd. %appName% heeft geen toegang meer tot %functionalGroupLabels%. Zorg ervoor dat u de meest recente app-versie op uw mobiele apparaat geïnstalleerd hebt."
+ },
+ "pl-pl": {
+ "tts": "Dane dostępu aplikacji zostały zmienione. %appName% nie ma już dostępu do %functionalGroupLabels%. Sprawdź, czy na telefonie komórkowym zainstalowano najnowszą wersję aplikacji."
+ },
+ "pt-br": {
+ "tts": "As autorizações dos aplicativos foram alteradas. %appName% não pode mais acessar %functionalGroupLabels%. Certifique-se de que a versão mais recente do aplicativo está instalada no seu dispositivo móvel."
+ },
+ "pt-pt": {
+ "tts": "As autorizações das aplicações mudaram. %appName% já não consegue aceder a %functionalGroupLabels%. Certifique-se de que tem a última versão da aplicação no seu dispositivo móvel."
+ },
+ "ru-ru": {
+ "tts": "Авторизации приложения изменены. %appName% больше не имеет доступа к %functionalGroupLabels%. Убедитесь, что на вашем мобильном устройстве установлена самая новая версия приложения."
+ },
+ "sv-se": {
+ "tts": "Appens behörigheter har ändrats. %appName% har inte längre åtkomst till %functionalGroupLabels%. Kontrollera att du har installerat den senaste versionen av appen på mobilenheten."
+ },
+ "tr-tr": {
+ "tts": "Uygulama yetkileri değişti. %appName% artık %functionalGroupLabels%'e erişemeyecek. Lütfen mobil aygıtınızda en son uygulama sürümünün yüklü olduğundan emin olun."
+ },
+ "zh-cn": {
+ "tts": "应用程序授权已变更。 %appName% 将不能再访问 %functionalGroupLabels%。 请确认您的移动设备上安装的应用程序是最新版本。"
+ },
+ "zh-tw": {
+ "tts": "應用程式授權已改變。%appName% 已無法進入 %functionalGroupLabels%。請確認您的行動裝置上安裝了最新版應用程式。"
+ }
+ }
+ },
+ "AppUnauthorized": {
+ "languages": {
+ "de-de": {
+ "tts": "Diese Version von %appName% ist nicht autorisiert und wird nicht mit SYNC funktionieren.",
+ "line1": "nicht autorisiert"
+ },
+ "en-au": {
+ "tts": "This version of %appName% is not authorized and will not work with SYNC.",
+ "line1": "not authorized"
+ },
+ "en-gb": {
+ "tts": "This version of %appName% is not authorized and will not work with SYNC.",
+ "line1": "not authorized",
+ "textBody": "This version of %appName% is not authorized and will not work with SYNC."
+ },
+ "en-ie": {
+ "tts": "This version of %appName% is not authorized and will not work with SYNC.",
+ "line1": "not authorized"
+ },
+ "en-us": {
+ "tts": "This version of %appName% is not authorized and will not work with SYNC.",
+ "line1": "Not Authorized",
+ "textBody": "This version of %appName% is no longer authorized to work with AppLink. Please update to the latest version of %appName%."
+ },
+ "es-en": {
+ "tts": "Esta versión de %appName% no tiene autorización y no funcionará con SYNC.",
+ "line1": "no autorizada",
+ "textBody": "Esta versión de %appName% no tiene autorización y no funcionará con SYNC."
+ },
+ "es-es": {
+ "tts": "Esta versión de %appName% no está autorizada y no funcionará con SYNC.",
+ "line1": "No autorizada"
+ },
+ "es-mx": {
+ "tts": "Esta versión de %appName% no tiene autorización y no funcionará con SYNC.",
+ "line1": "no autorizada"
+ },
+ "fr-ca": {
+ "tts": "Cette version de %appName% n’est pas autorisée et ne fonctionnera pas avec SYNC.",
+ "line1": "non autorisée",
+ "textBody": "Cette version de %appName% n’est pas autorisée et ne fonctionnera pas avec SYNC."
+ },
+ "fr-fr": {
+ "tts": "Cette version de %appName% n’est pas autorisée et ne fonctionnera pas avec SYNC.",
+ "line1": "non autorisée"
+ },
+ "it-it": {
+ "tts": "Questa versione di %appName% non è autorizzata e non funziona con il SYNC.",
+ "line1": "non autorizzata"
+ },
+ "nl-nl": {
+ "tts": "Deze versie van %appName% is niet geautoriseerd en werkt niet met SYNC.",
+ "line1": "niet geautoriseerd"
+ },
+ "pl-pl": {
+ "tts": "Niniejsza wersja %appName% nie posiada autoryzacji i nie będzie działać z SYNC.",
+ "line1": "brak autoryzacji"
+ },
+ "pt-br": {
+ "tts": "Esta versão do %appName% não tem autorização e não funcionará com o SYNC.",
+ "line1": "não autorizado"
+ },
+ "pt-pt": {
+ "tts": "Esta versão de %appName% não está autorizada e não funcionará com o SYNC.",
+ "line1": "não autorizada"
+ },
+ "ru-ru": {
+ "tts": "Эта версия %appName% не авторизирована и не будет работать с SYNC.",
+ "line1": "не авторизировано"
+ },
+ "sv-se": {
+ "tts": "Den här versionen av %appName% är inte godkänd och fungerar inte med SYNC.",
+ "line1": "är ej godkänd"
+ },
+ "tr-tr": {
+ "tts": "Bu %appName% sürümüne izin verilmediğinden SYNC ile çalışamaz.",
+ "line1": "için izin yok"
+ },
+ "zh-cn": {
+ "tts": "此版本的%appName% 未得到授权,无法在SYNC上使用。",
+ "line1": "未得到授权"
+ },
+ "zh-tw": {
+ "tts": "%appName% 的版本未獲得授權,將無法透過 SYNC 使用。",
+ "line1": "無授權"
+ }
+ }
+ },
+ "AppUnsupported": {
+ "languages": {
+ "de-de": {
+ "tts": "Diese Version von %appName% wird von SYNC nicht unterstützt.",
+ "line1": "nicht unterstützt"
+ },
+ "en-au": {
+ "tts": "This version of %appName% is not supported by SYNC.",
+ "line1": "not supported"
+ },
+ "en-gb": {
+ "tts": "This version of %appName% is not supported by SYNC.",
+ "line1": "not supported",
+ "textBody": "This version of %appName% is not supported by SYNC."
+ },
+ "en-ie": {
+ "tts": "This version of %appName% is not supported by SYNC.",
+ "line1": "not supported"
+ },
+ "en-us": {
+ "tts": "This version of %appName% is not supported by SYNC.",
+ "line1": "Not Supported",
+ "textBody": "Your version of %appName% is not supported by SYNC."
+ },
+ "es-en": {
+ "tts": "Esta versión de %appName% no es compatible con SYNC.",
+ "line1": "no compatible",
+ "textBody": "Esta versión de %appName% no es compatible con SYNC."
+ },
+ "es-es": {
+ "tts": "Esta versión de %appName% no es compatible con SYNC.",
+ "line1": "No compatible"
+ },
+ "es-mx": {
+ "tts": "Esta versión de %appName% no es compatible con SYNC.",
+ "line1": "no compatible"
+ },
+ "fr-ca": {
+ "tts": "Cette version de %appName% n’est pas prise en charge par SYNC.",
+ "line1": "incompatible",
+ "textBody": "Cette version de %appName% n’est pas prise en charge par SYNC."
+ },
+ "fr-fr": {
+ "tts": "Cette version de %appName% n’est pas prise en charge par SYNC.",
+ "line1": "incompatible"
+ },
+ "it-it": {
+ "tts": "Questa versione di %appName% non è supportata dal SYNC.",
+ "line1": "non supportata"
+ },
+ "nl-nl": {
+ "tts": "Deze versie van %appName% wordt niet ondersteund door SYNC.",
+ "line1": "niet ondersteund"
+ },
+ "pl-pl": {
+ "tts": "Niniejsza wersja %appName% nie jest obsługiwana przez system SYNC.",
+ "line1": "aplikacja nie obsług."
+ },
+ "pt-br": {
+ "tts": "Esta versão do %appName% não é suportada pelo SYNC.",
+ "line1": "não suportado"
+ },
+ "pt-pt": {
+ "tts": "Esta versão de %appName% não é suportado pelo SYNC.",
+ "line1": "não suportada"
+ },
+ "ru-ru": {
+ "tts": "Эта версия %appName% не поддерживается SYNC.",
+ "line1": "не поддерживается"
+ },
+ "sv-se": {
+ "tts": "SYNC har inte stöd för den här versionen av %appName%.",
+ "line1": "stöds ej"
+ },
+ "tr-tr": {
+ "tts": "Bu %appName% sürümü SYNC tarafından desteklenmiyor.",
+ "line1": "desteklenmiyor"
+ },
+ "zh-cn": {
+ "tts": "SYNC不支持此版本的%appName%。",
+ "line1": "不受支持"
+ },
+ "zh-tw": {
+ "tts": "SYNC 不支援此版本的%appName% 。",
+ "line1": "不支援"
+ }
+ }
+ },
+ "DataConsent": {
+ "languages": {
+ "en-gb": {
+ "textBody": "Would you like to enable Mobile Apps on SYNC? To use Mobile Apps with SYNC, SYNC will communicate with Ford at least once per month using your mobile device’s data plan. Standard rates may apply. SYNC will send your VIN and SYNC module number to Ford U.S. Updates are about the size of an email, and the occurrence of updates depends on your vehicle usage and when a new app is found on your device. To turn on or off, visit the SYNC Settings menu. See your Owner Guide for more information."
+ },
+ "en-us": {
+ "line1": "Enable Mobile Apps",
+ "line2": "on SYNC? (Uses Data)",
+ "textBody": "Would you like to enable Mobile Apps on SYNC?\n\nTo use Mobile Apps with SYNC, SYNC will communicate with Ford at least once per month using your mobile device’s data plan. Standard rates may apply. SYNC will send your VIN and SYNC module number to Ford U.S.\n\nUpdates are about the size of an email, and the occurrence of updates depends on your vehicle usage and when a new app is found on your device. To turn on or off, visit the SYNC Settings menu. See your Owner Guide for more information."
+ },
+ "es-en": {
+ "textBody": "Para usar aplicaciones móviles con SYNC, este debe comunicarse con Ford al menos una vez al mes a través del plan de datos de su dispositivo móvil. Pueden aplicar tarifas normales. SYNC enviará su VIN y el número de módulo de SYNC a Ford de Estados Unidos de América. Las actualizaciones tienen el tamaño aproximado de un mensaje de correo electrónico, y la frecuencia de las actualizaciones depende del uso de su vehículo y de si se encuentran nuevas aplicaciones en su dispositivo. Para obtener más información, consulte la Guía del propietario. /r Presione Sí para permitir y No para denegar."
+ },
+ "fr-ca": {
+ "textBody": "Pour utiliser AppLink, SYNC devra communiquer avec Ford au moins une fois par mois en utilisant le forfait de données de votre appareil mobile. Les tarifs réguliers peuvent s’appliquer. SYNC enverra votre NIV et le numéro de votre module SYNC à Ford États-Unis. Les mises à jour ont la taille d’un courriel et la fréquence des mises à jour dépend de l’utilisation de votre véhicule et si une nouvelle application se trouve sur votre appareil. Consultez le Guide de l’utilisateur pour obtenir d’autres renseignements. /r Veuillez appuyer sur Oui pour autoriser ou sur Non pour refuser."
+ }
+ }
+ },
+ "DataConsentHelp": {
+ "languages": {
+ "en-us": {
+ "textBody": "Updates are about the size of an email, and the occurrence of updates depends on your vehicle usage and when a new app is found on your device. See your Owner Guide for more information."
+ },
+ "es-en": {
+ "textBody": "Las actualizaciones tienen el tamaño aproximado de un mensaje de correo electrónico, y la frecuencia de las actualizaciones depende del uso de su vehículo y de si se encuentran nuevas aplicaciones en su dispositivo. Para obtener más información, consulte la Guía del propietario."
+ },
+ "fr-ca": {
+ "textBody": "Les mises à jour ont la taille d’un courriel et la fréquence des mises à jour dépend de l’utilisation de votre véhicule et si une nouvelle application se trouve sur votre appareil. Consultez le Guide de l’utilisateur pour obtenir d’autres renseignements."
+ }
+ }
+ },
+ "DisableApps": {
+ "languages": {
+ "de-de": {
+ "tts": "Ausschalten der automatischen Updates führt zum Ausschalten von SYNC mobile Apps. Sie können Ihre mobilen Apps dann nicht mehr mit SYNC nutzen. Bitte drücken Sie Ja zur Bestätigung oder Nein, um abzubrechen.",
+ "line1": "Auto-Update",
+ "line2": "und Mobile Apps deaktivieren"
+ },
+ "en-au": {
+ "tts": "Disabling automatic updates will also disable SYNC mobile apps. You will not be able to use any mobile apps with SYNC. Please press Yes to confirm or No to cancel.",
+ "line1": "Disable auto-updates",
+ "line2": "and Mobile Apps?"
+ },
+ "en-gb": {
+ "tts": "Disabling automatic updates will also disable SYNC mobile apps. You will not be able to use any mobile apps with SYNC. Please press Yes to confirm or No to cancel.",
+ "line1": "Disable auto-updates",
+ "line2": "and Mobile Apps?",
+ "textBody": "Disabling automatic updates will also disable SYNC mobile apps. You will not be able to use any mobile apps with SYNC. Please press Yes to confirm or No to cancel."
+ },
+ "en-ie": {
+ "tts": "Disabling automatic updates will also disable SYNC mobile apps. You will not be able to use any mobile apps with SYNC. Please press Yes to confirm or No to cancel.",
+ "line1": "Disable auto-updates",
+ "line2": "and Mobile Apps?"
+ },
+ "en-us": {
+ "tts": "Disabling automatic updates will also disable sync mobile apps. You will not be able to use any mobile apps with SYNC. Please press yes to confirm or no to cancel.",
+ "line1": "Disable Auto-Updates",
+ "line2": "and Mobile Apps?",
+ "textBody": "Disabling automatic updates will also disable sync mobile apps. You will not be able to use any mobile apps with SYNC. Please press yes to confirm or no to cancel."
+ },
+ "es-en": {
+ "tts": "Si se desactivan las actualizaciones automáticas, también se desactivarán las aplicaciones móviles de SYNC. No podrá usar ninguna aplicación móvil con SYNC. Presione Sí para confirmar o No para cancelar.",
+ "line1": "¿Deshab. actualiz.",
+ "line2": "autom. y aplic. móv.?",
+ "textBody": "Si se desactivan las actualizaciones automáticas, también se desactivarán las aplicaciones móviles de SYNC. No podrá usar ninguna aplicación móvil con SYNC. Presione Sí para confirmar o No para cancelar."
+ },
+ "es-es": {
+ "tts": "Si desactiva las actualizaciones automáticas, también se desactivará la sincronización de las aplicaciones móviles. No podrá utilizar ninguna aplicación móvil con SYNC. Pulse sí para confirmar o no para cancelar.",
+ "line1": "¿Desact. actual. auto",
+ "line2": "y apl. móviles?"
+ },
+ "es-mx": {
+ "tts": "Si se desactivan las actualizaciones automáticas, también se desactivarán las aplicaciones móviles de SYNC. No podrá usar ninguna aplicación móvil con SYNC. Presione Sí para confirmar o No para cancelar.",
+ "line1": "¿Deshab. actualiz.",
+ "line2": "autom. y aplic. móv.?"
+ },
+ "fr-ca": {
+ "tts": "La désactivation des mises à jour automatiques désactivera aussi les applications mobiles SYNC. Vous ne pourrez pas utiliser d’application mobile avec SYNC. Veuillez appuyer sur Oui pour confirmer ou sur Non pour annuler.",
+ "line1": "Désactiver màj autom.",
+ "line2": "et app. mobiles?",
+ "textBody": "La désactivation des mises à jour automatiques désactivera aussi les applications mobiles SYNC. Vous ne pourrez pas utiliser d’application mobile avec SYNC. Veuillez appuyer sur Oui pour confirmer ou sur Non pour annuler."
+ },
+ "fr-fr": {
+ "tts": "La désactivation des mises à jour automatiques désactivera aussi les applications mobiles SYNC. Vous ne pourrez pas utiliser d’application mobile avec SYNC. Veuillez appuyer sur Oui pour confirmer ou sur Non pour annuler.",
+ "line1": "Désactiver màj autom.",
+ "line2": "et app. mobiles?"
+ },
+ "it-it": {
+ "tts": "Disabilitando gli aggiornamenti automatici si disattiva anche la sincronizzazione delle app mobili. Non sarà possibile usare app mobili con il SYNC. Premere Sì per confermare e No per cancellare.",
+ "line1": "Disabilitare agg. aut.",
+ "line2": "e app mobili?"
+ },
+ "nl-nl": {
+ "tts": "Door automatische updates uit te schakelen, schakelt u ook SYNC-mobiele apps uit. U kunt dan geen mobiele apps meer gebruiken met SYNC. Druk op Ja om te bevestigen of op Nee om te annuleren.",
+ "line1": "Auto-updates en mob.",
+ "line2": "apps uitschakelen?"
+ },
+ "pl-pl": {
+ "tts": "Wyłączenie automatycznych aktualizacji spowoduje także wyłączenie aplikacji mobilnych SYNC. Korzystanie z mobilnych aplikacji za pomocą SYNC będzie niemożliwe. Naciśnij TAK, by potwierdzić lub NIE, by anulować.",
+ "line1": "Wył. automat. aktual.",
+ "line2": "i aplikacje mobilne?"
+ },
+ "pt-br": {
+ "tts": "Se as atualizações automáticas forem desativadas, os aplicativos também serão desativados. Você não poderá usar nenhum aplicativo com o SYNC. Pressione sim para confirmar ou não para cancelar.",
+ "line1": "Desativar atualizações",
+ "line2": "autom. e aplicativos?"
+ },
+ "pt-pt": {
+ "tts": "A desactivação das actualizações automáticas desactiva igualmente as aplicações móveis do SYNC. Não poderá utilizar quaisquer aplicações móveis com o SYNC. Prima \"\"Sim\"\" para confirmar ou \"\"Não\"\" para cancelar.",
+ "line1": "Desact. actual. autom.",
+ "line2": "e aplicações móveis?"
+ },
+ "ru-ru": {
+ "tts": "При отключении автоматических обновлений также будут отключены мобильные приложения sync. Вы не сможете использовать какие-либо мобильные приложения с SYNC. Нажмите \"\"Да\"\" для подтверждения или \"\"Нет\"\" для отмены.",
+ "line1": "Откл. автообновления",
+ "line2": "и мобил. прилож.?"
+ },
+ "sv-se": {
+ "tts": "Om du avaktiverar automatisk uppdatering avaktiverar du även synkning av mobilappar. Du kommer inte längre att kunna använda dina mobilappar med SYNC. Tryck Ja för att bekräfta eller Nej för att avbryta.",
+ "line1": "Avaktiverar autouppdat.",
+ "line2": "och mobilappar?"
+ },
+ "tr-tr": {
+ "tts": "Otomatik güncellemeleri devre dışı bırakırsanız sync mobil uygulamalar da devre dışı kalır. SYNC ile mobil uygulama kullanmanız mümkün olmaz. Lütfen onaylamak için Evet'e veya iptal etmek için Hayır'a basın.",
+ "line1": "Oto. güncelleme ve",
+ "line2": "mobil uygul. kapat?"
+ },
+ "zh-cn": {
+ "tts": "禁用自动更新同时也会禁用SYNC移动应用程序。您将无法在 SYNC 中使用任何移动应用程序。请按“是”确认或按“否”取消。",
+ "line1": "是否禁用自动更新和",
+ "line2": "移动应用程序?"
+ },
+ "zh-tw": {
+ "tts": "停用自動更新也將停用 sync 行動應用程式。您將無法透過 SYNC 使用任何行動應用程式。確認請按「是」,取消請按「否」。",
+ "line1": "停用自動更新",
+ "line2": "和行動應用程式?"
+ }
+ }
+ },
+ "DrivingCharacteristics": {
+ "languages": {
+ "de-de": {
+ "tts": "Eine App hat Zugriff auf die folgenden Fahreigenschaften: Kraftstoffverbrauch, MyKey, Sicherheitsgurtstatus.",
+ "label": "Fahreigenschaften"
+ },
+ "en-au": {
+ "tts": "An app can access the following driving characteristics: Fuel consumption, MyKey, Seat belt status.",
+ "label": "Driving characteristics"
+ },
+ "en-gb": {
+ "tts": "An app can access the following driving characteristics: Fuel consumption, MyKey, Seat belt status.",
+ "label": "Driving characteristics",
+ "textBody": "An app can access the following driving characteristics: Fuel consumption, MyKey, Seat belt status."
+ },
+ "en-ie": {
+ "tts": "An app can access the following driving characteristics: Fuel consumption, MyKey, Seat belt status.",
+ "label": "Driving characteristics"
+ },
+ "en-us": {
+ "tts": "An app can access the following driving characteristics: Fuel Consumption, MyKey, Seat Belt Status.",
+ "label": "Driving Characteristics",
+ "textBody": "An app can access the following driving characteristics: Fuel Consumption, MyKey, Seat Belt Status."
+ },
+ "es-en": {
+ "tts": "Las aplicaciones pueden acceder a las siguientes características del manejo: Consumo de combustible, MyKey, Estado del cinturón de seguridad.",
+ "label": "Características del manejo",
+ "textBody": "Las aplicaciones pueden acceder a las siguientes características del manejo: Consumo de combustible, MyKey, Estado del cinturón de seguridad."
+ },
+ "es-es": {
+ "tts": "Una aplicación puede acceder a las siguientes características de conducción: Consumo de combustible, MyKey, Estado cinturones de seguridad.",
+ "label": "Características de conducción"
+ },
+ "es-mx": {
+ "tts": "Las aplicaciones pueden acceder a las siguientes características del manejo: Consumo de combustible, MyKey, Estado del cinturón de seguridad.",
+ "label": "Características del manejo"
+ },
+ "fr-ca": {
+ "tts": "Une application peut accéder aux caractéristiques de conduite suivantes: Consommation de carburant, MyKey, État des ceintures de sécurité.",
+ "label": "Caractéristiques de conduite",
+ "textBody": "Une application peut accéder aux caractéristiques de conduite suivantes: Consommation de carburant, MyKey, État des ceintures de sécurité."
+ },
+ "fr-fr": {
+ "tts": "Une application peut accéder aux caractéristiques de conduite suivantes: Consommation de carburant, MyKey, État des ceintures de sécurité.",
+ "label": "Caractéristiques de conduite"
+ },
+ "it-it": {
+ "tts": "Un'app può avere accesso alle seguenti caratteristiche di guida: Consumo carburante, MyKey, Stato cinture di sicurezza.",
+ "label": "Caratteristiche di guida"
+ },
+ "nl-nl": {
+ "tts": "Een app heeft toegang tot de volgende rijkenmerken: Brandstofverbruik, MyKey, Veiligheidsgordelstatus.",
+ "label": "Rijkenmerken"
+ },
+ "pl-pl": {
+ "tts": "Aplikacja może uzyskać dostęp do następujących informacji dotyczących jazdy: Zużycie paliwa, MyKey, Stan pasów bezpieczeństwa.",
+ "label": "Informacje dotyczące stylu jazdy"
+ },
+ "pt-br": {
+ "tts": "Um aplicativo pode acessar as seguintes características de condução: Consumo de combustível, MyKey, Estado do cinto de segurança.",
+ "label": "Características de condução"
+ },
+ "pt-pt": {
+ "tts": "Uma aplicação consegue aceder às seguintes informações de condução: Consumo de combustível, MyKey, Estado dos cintos de segurança.",
+ "label": "Características de condução"
+ },
+ "ru-ru": {
+ "tts": "Приложение имеет доступ к следующим характеристикам движения: Расход топлива, MyKey, Состояние ремней безопасности.",
+ "label": "Характеристики движения"
+ },
+ "sv-se": {
+ "tts": "Appen kan komma åt följande köregenskaper: Bränsleförbrukning, MyKey, Bältesstatus.",
+ "label": "Köregenskaper"
+ },
+ "tr-tr": {
+ "tts": "Bir uygulama şu sürüş karakteristiklerine erişebilir: Yakıt tüketimi, MyKey, Emniyet kemeri durumu.",
+ "label": "Sürüş karakteristikleri"
+ },
+ "zh-cn": {
+ "tts": "移动应用程序可访问下列行驶特性: 油耗, MyKey, 安全带状态",
+ "label": "行驶特性"
+ },
+ "zh-tw": {
+ "tts": "應用程式可存取以下駕駛特性: 油耗, MyKey, 安全帶狀態",
+ "label": "駕駛特性"
+ }
+ }
+ },
+ "Location": {
+ "languages": {
+ "de-de": {
+ "tts": "Eine App hat Zugriff auf die GPS-Daten und die Geschwindigkeit des Fahrzeugs.",
+ "label": "GPS und Geschwindigkeit"
+ },
+ "en-au": {
+ "tts": "An app can access vehicle GPS and speed.",
+ "label": "GPS and speed"
+ },
+ "en-gb": {
+ "tts": "An app can access vehicle GPS and speed.",
+ "label": "GPS and speed",
+ "textBody": "An app can access vehicle GPS and speed."
+ },
+ "en-ie": {
+ "tts": "An app can access vehicle GPS and speed.",
+ "label": "GPS and speed"
+ },
+ "en-us": {
+ "tts": "An app can access vehicle GPS and speed.",
+ "label": "GPS and speed",
+ "textBody": "An app can access vehicle GPS and speed."
+ },
+ "es-en": {
+ "tts": "Las aplicaciones pueden acceder al GPS y a la velocidad del vehículo.",
+ "label": "GPS y velocidad",
+ "textBody": "Las aplicaciones pueden acceder al GPS y a la velocidad del vehículo."
+ },
+ "es-es": {
+ "tts": "Una aplicación puede acceder al GPS y la velocidad del vehículo.",
+ "label": "GPS y velocidad"
+ },
+ "es-mx": {
+ "tts": "Las aplicaciones pueden acceder al GPS y a la velocidad del vehículo.",
+ "label": "GPS y velocidad"
+ },
+ "fr-ca": {
+ "tts": "Une application peut accéder au GPS et à la vitesse du véhicule.",
+ "label": "GPS et vitesse",
+ "textBody": "Une application peut accéder au GPS et à la vitesse du véhicule."
+ },
+ "fr-fr": {
+ "tts": "Une application peut accéder au GPS et à la vitesse du véhicule.",
+ "label": "GPS et vitesse"
+ },
+ "it-it": {
+ "tts": "Un'app può avere accesso a GPS e velocità del veicolo.",
+ "label": "GPS e velocità"
+ },
+ "nl-nl": {
+ "tts": "Een app heeft toegang tot gps en de snelheid van het voertuig.",
+ "label": "Gps en snelheid"
+ },
+ "pl-pl": {
+ "tts": "Aplikacja może uzyskać dostęp do modułu GPS i prędkości pojazdu.",
+ "label": "GPS i prędkość"
+ },
+ "pt-br": {
+ "tts": "Um aplicativo pode acessar o GPS e a velocidade do veículo.",
+ "label": "GPS e velocidade"
+ },
+ "pt-pt": {
+ "tts": "Uma aplicação consegue aceder ao GPS e à velocidade do veículo.",
+ "label": "GPS e velocidade"
+ },
+ "ru-ru": {
+ "tts": "Приложение имеет доступ к GPS и скорости автомобиля.",
+ "label": "GPS и скорость"
+ },
+ "sv-se": {
+ "tts": "Appen kan komma åt fordonets GPS och hastighetsmätare.",
+ "label": "GPS och hastighet"
+ },
+ "tr-tr": {
+ "tts": "Bu uygulama aracın GPS ve hız bilgilerine erişebilir.",
+ "label": "GPS ve hız"
+ },
+ "zh-cn": {
+ "tts": "移动应用程序可以访问车辆 GPS 和车速信息。",
+ "label": "GPS 和车速"
+ },
+ "zh-tw": {
+ "tts": "應用程式可存取車輛的GPS和速度。",
+ "label": "GPS和車速"
+ }
+ }
+ },
+ "Notifications": {
+ "languages": {
+ "de-de": {
+ "tts": "Läuft die App im Hintergrund, kann Sie Benachrichtigungen senden.",
+ "label": "Push-Benachrichtigungen"
+ },
+ "en-au": {
+ "tts": "An app can send notifications when running in the background.",
+ "label": "Push notifications"
+ },
+ "en-gb": {
+ "tts": "An app can send notifications when running in the background.",
+ "label": "Push notifications",
+ "textBody": "An app can send notifications when running in the background."
+ },
+ "en-ie": {
+ "tts": "An app can send notifications when running in the background.",
+ "label": "Push notifications"
+ },
+ "en-us": {
+ "tts": "An app can send notifications when running in the background.",
+ "label": "Push notifications",
+ "textBody": "An app can send notifications when running in the background."
+ },
+ "es-en": {
+ "tts": "Las aplicaciones pueden enviar notificaciones cuando se ejecutan en segundo plano.",
+ "label": "Notificaciones tipo Push",
+ "textBody": "Las aplicaciones pueden enviar notificaciones cuando se ejecutan en segundo plano."
+ },
+ "es-es": {
+ "tts": "Una aplicación puede enviar notificaciones cuando se está ejecutando en segundo plano.",
+ "label": "Notificaciones push"
+ },
+ "es-mx": {
+ "tts": "Las aplicaciones pueden enviar notificaciones cuando se ejecutan en segundo plano.",
+ "label": "Notificaciones tipo Push"
+ },
+ "fr-ca": {
+ "tts": "Une application peut envoyer des avis lorsqu’elle fonctionne en arrière-plan.",
+ "label": "Notifications instantanées",
+ "textBody": "Une application peut envoyer des avis lorsqu’elle fonctionne en arrière-plan."
+ },
+ "fr-fr": {
+ "tts": "Une application peut envoyer des avis lorsqu’elle fonctionne en arrière-plan.",
+ "label": "Notifications push"
+ },
+ "it-it": {
+ "tts": "Un'app può inviare notifiche se eseguita in background.",
+ "label": "Notifiche push"
+ },
+ "nl-nl": {
+ "tts": "Een app kan meldingen versturen als deze op de achtergrond actief is.",
+ "label": "Push-meldingen"
+ },
+ "pl-pl": {
+ "tts": "Aplikacja może wysyłać powiadomienia, działając w tle.",
+ "label": "Powiadomienia Push"
+ },
+ "pt-br": {
+ "tts": "Um aplicativo pode enviar notificações quando estiver sendo executado em segundo plano.",
+ "label": "Notificações Push"
+ },
+ "pt-pt": {
+ "tts": "Uma aplicação consegue enviar notificações quando está activa em segundo plano.",
+ "label": "Notificações push"
+ },
+ "ru-ru": {
+ "tts": "Если приложение работает в фоновом режиме, оно может отправлять оповещения.",
+ "label": "Оповещения о пересылке"
+ },
+ "sv-se": {
+ "tts": "Appen kan skicka meddelanden när den körs i bakgrunden.",
+ "label": "Push-notiser"
+ },
+ "tr-tr": {
+ "tts": "Bir uygulama arka planda çalışırken bildirim gönderebilir.",
+ "label": "Anlık bildirimleri"
+ },
+ "zh-cn": {
+ "tts": "移动应用程序在后台运行时可推送通知。",
+ "label": "推送通知"
+ },
+ "zh-tw": {
+ "tts": "車輛行進時,應用程式可在背景中傳送通知。",
+ "label": "傳送通知"
+ }
+ }
+ },
+ "SettingDisableUpdates": {
+ "languages": {
+ "de-de": {
+ "line1": "Updates deakt."
+ },
+ "en-au": {
+ "line1": "Disable updates"
+ },
+ "en-gb": {
+ "line1": "Disable updates"
+ },
+ "en-ie": {
+ "line1": "Disable updates"
+ },
+ "en-us": {
+ "line1": "Disable Updates",
+ "textBody": "Disable Updates"
+ },
+ "es-en": {
+ "line1": "Deshab. actual.",
+ "textBody": "Deshab. actual."
+ },
+ "es-es": {
+ "line1": "Desact. actual."
+ },
+ "es-mx": {
+ "line1": "Deshab. actual."
+ },
+ "fr-ca": {
+ "line1": "Désactiver MAJ",
+ "textBody": "Désactiver MAJ"
+ },
+ "fr-fr": {
+ "line1": "Désactiver màj"
+ },
+ "it-it": {
+ "line1": "Disabilita agg."
+ },
+ "nl-nl": {
+ "line1": "Upd. uitschak."
+ },
+ "pl-pl": {
+ "line1": "Wyłącz aktual."
+ },
+ "pt-br": {
+ "line1": "Desat. atualiz."
+ },
+ "pt-pt": {
+ "line1": "Desact. actualiz."
+ },
+ "ru-ru": {
+ "line1": "Откл. обновл."
+ },
+ "sv-se": {
+ "line1": "Inaktivera uppd."
+ },
+ "tr-tr": {
+ "line1": "Güncell. Kapat"
+ },
+ "zh-cn": {
+ "line1": "禁用更新"
+ },
+ "zh-tw": {
+ "line1": "停用更新"
+ }
+ }
+ },
+ "SettingEnableUpdates": {
+ "languages": {
+ "de-de": {
+ "line1": "Apps aktivieren"
+ },
+ "en-au": {
+ "line1": "Enable Apps"
+ },
+ "en-gb": {
+ "line1": "Enable Apps"
+ },
+ "en-ie": {
+ "line1": "Enable Apps"
+ },
+ "en-us": {
+ "line1": "Enable Apps"
+ },
+ "es-en": {
+ "line1": "Hab. aplic."
+ },
+ "es-es": {
+ "line1": "Activar apl."
+ },
+ "es-mx": {
+ "line1": "Hab. aplic."
+ },
+ "fr-ca": {
+ "line1": "Activer app.",
+ "textBody": "Activer app."
+ },
+ "fr-fr": {
+ "line1": "Activer app."
+ },
+ "it-it": {
+ "line1": "Abilita app"
+ },
+ "nl-nl": {
+ "line1": "Apps inschak."
+ },
+ "pl-pl": {
+ "line1": "Włącz aplikacje"
+ },
+ "pt-br": {
+ "line1": "Ativar aplic."
+ },
+ "pt-pt": {
+ "line1": "Activar actualiz."
+ },
+ "ru-ru": {
+ "line1": "Вкл. прилож."
+ },
+ "sv-se": {
+ "line1": "Aktivera appar"
+ },
+ "tr-tr": {
+ "line1": "Uygulamaları aç"
+ },
+ "zh-cn": {
+ "line1": "启用应用程序"
+ },
+ "zh-tw": {
+ "line1": "啟用應用程式"
+ }
+ }
+ },
+ "SettingUpdateAuto": {
+ "languages": {
+ "de-de": {
+ "line1": "Update anford."
+ },
+ "en-au": {
+ "line1": "Request update"
+ },
+ "en-gb": {
+ "line1": "Request update"
+ },
+ "en-ie": {
+ "line1": "Request update"
+ },
+ "en-us": {
+ "line1": "Request Update",
+ "textBody": "Select `Update now` to receive app authorization information for your SYNC-enabled mobile apps. This may enable additional functionality depending on the app and your settings. If your phone has a working data connection, an update should complete in less than 1 minute."
+ },
+ "es-en": {
+ "line1": "Solicit. actualiz.",
+ "textBody": "Solicit. actualiz."
+ },
+ "es-es": {
+ "line1": "Solicitar actual."
+ },
+ "es-mx": {
+ "line1": "Solicit. actualiz."
+ },
+ "fr-ca": {
+ "line1": "Demander MAJ",
+ "textBody": "Demander MAJ"
+ },
+ "fr-fr": {
+ "line1": "Demander màj"
+ },
+ "it-it": {
+ "line1": "Rich. aggiorn."
+ },
+ "nl-nl": {
+ "line1": "Upd. aanvragen"
+ },
+ "pl-pl": {
+ "line1": "Zażądaj aktual."
+ },
+ "pt-br": {
+ "line1": "Solicitar atualiz."
+ },
+ "pt-pt": {
+ "line1": "Solicit. actualiz."
+ },
+ "ru-ru": {
+ "line1": "Запрос на обн."
+ },
+ "sv-se": {
+ "line1": "Begär uppdat."
+ },
+ "tr-tr": {
+ "line1": "Güncelleme iste"
+ },
+ "zh-cn": {
+ "line1": "请求更新"
+ },
+ "zh-tw": {
+ "line1": "請求更新"
+ }
+ }
+ },
+ "StatusNeeded": {
+ "languages": {
+ "de-de": {
+ "line1": "Update benötigt"
+ },
+ "en-au": {
+ "line1": "Update needed"
+ },
+ "en-gb": {
+ "line1": "Update needed",
+ "textBody": "Update needed"
+ },
+ "en-ie": {
+ "line1": "Update needed"
+ },
+ "en-us": {
+ "line1": "Update Needed",
+ "textBody": "Update Needed"
+ },
+ "es-en": {
+ "line1": "Actualiz. neces.",
+ "textBody": "Actualiz. neces."
+ },
+ "es-es": {
+ "line1": "Actu. necesaria"
+ },
+ "es-mx": {
+ "line1": "Actualiz. neces."
+ },
+ "fr-ca": {
+ "line1": "Màj requise",
+ "textBody": "Màj requise"
+ },
+ "fr-fr": {
+ "line1": "Mise à jour requise"
+ },
+ "it-it": {
+ "line1": "Necess. aggiorn."
+ },
+ "nl-nl": {
+ "line1": "Update nodig"
+ },
+ "pl-pl": {
+ "line1": "Potrzeba aktual."
+ },
+ "pt-br": {
+ "line1": "Atualiz. necess."
+ },
+ "pt-pt": {
+ "line1": "Actual. necess."
+ },
+ "ru-ru": {
+ "line1": "Необх. обновл."
+ },
+ "sv-se": {
+ "line1": "Uppdat. krävs"
+ },
+ "tr-tr": {
+ "line1": "Güncellenmeli"
+ },
+ "zh-cn": {
+ "line1": "需要进行更新"
+ },
+ "zh-tw": {
+ "line1": "需更新"
+ }
+ }
+ },
+ "StatusPending": {
+ "languages": {
+ "de-de": {
+ "line1": "Aktualisieren..."
+ },
+ "en-au": {
+ "line1": "Updating..."
+ },
+ "en-gb": {
+ "line1": "Updating...",
+ "textBody": "Updating..."
+ },
+ "en-ie": {
+ "line1": "Updating..."
+ },
+ "en-us": {
+ "line1": "Updating...",
+ "textBody": "Updating..."
+ },
+ "es-en": {
+ "line1": "Actualizando...",
+ "textBody": "Actualizando..."
+ },
+ "es-es": {
+ "line1": "Actualizando..."
+ },
+ "es-mx": {
+ "line1": "Actualizando..."
+ },
+ "fr-ca": {
+ "line1": "MAJ en cours...",
+ "textBody": "MAJ en cours..."
+ },
+ "fr-fr": {
+ "line1": "Màj en cours..."
+ },
+ "it-it": {
+ "line1": "Aggiornamento"
+ },
+ "nl-nl": {
+ "line1": "Updaten..."
+ },
+ "pl-pl": {
+ "line1": "Aktualizowanie"
+ },
+ "pt-br": {
+ "line1": "Atualizando..."
+ },
+ "pt-pt": {
+ "line1": "A actualizar..."
+ },
+ "ru-ru": {
+ "line1": "Обновление..."
+ },
+ "sv-se": {
+ "line1": "Uppdaterar..."
+ },
+ "tr-tr": {
+ "line1": "Güncelleniyor..."
+ },
+ "zh-cn": {
+ "line1": "正在更新......"
+ },
+ "zh-tw": {
+ "line1": "更新中..."
+ }
+ }
+ },
+ "StatusUpToDate": {
+ "languages": {
+ "de-de": {
+ "line1": "Aktuelle Version"
+ },
+ "en-au": {
+ "line1": "Up-to-date"
+ },
+ "en-gb": {
+ "line1": "Up-to-date",
+ "textBody": "Up-to-date"
+ },
+ "en-ie": {
+ "line1": "Up-to-date"
+ },
+ "en-us": {
+ "line1": "Up-To-Date",
+ "textBody": "Up-To-Date"
+ },
+ "es-en": {
+ "line1": "Actualizado",
+ "textBody": "Actualizado"
+ },
+ "es-es": {
+ "line1": "Actualizada"
+ },
+ "es-mx": {
+ "line1": "Actualizado"
+ },
+ "fr-ca": {
+ "line1": "Déjà à jour",
+ "textBody": "Déjà à jour"
+ },
+ "fr-fr": {
+ "line1": "Déjà à jour"
+ },
+ "it-it": {
+ "line1": "più recente"
+ },
+ "nl-nl": {
+ "line1": "Up-to-date"
+ },
+ "pl-pl": {
+ "line1": "Aktualne"
+ },
+ "pt-br": {
+ "line1": "Atualizado"
+ },
+ "pt-pt": {
+ "line1": "Actualizado"
+ },
+ "ru-ru": {
+ "line1": "Обновлено"
+ },
+ "sv-se": {
+ "line1": "Uppdat. krävs ej"
+ },
+ "tr-tr": {
+ "line1": "Güncel"
+ },
+ "zh-cn": {
+ "line1": "最新更新"
+ },
+ "zh-tw": {
+ "line1": "更新最新"
+ }
+ }
+ },
+ "VehicleInfo": {
+ "languages": {
+ "de-de": {
+ "tts": "Eine App hat Zugriff auf die folgenden Fahrzeuginformationen: Kraftstoff-Füllstand, Kraftstoffverbrauch, Motordrehzahl, Kilometerzähler, FIN, Außentemperatur, Gangstellung, Reifenluftdruck.",
+ "label": "Fahrzeuginformationen"
+ },
+ "en-au": {
+ "tts": "An app can access the following vehicle information: Fuel level, Fuel economy, Engine RPMs, Odometer, VIN, Outside air temperature, Gear position, Tyre pressure.",
+ "label": "Vehicle information"
+ },
+ "en-gb": {
+ "tts": "An app can access the following vehicle information: Fuel level, Fuel economy, Engine RPMs, Odometer, VIN, Outside air temperature, Gear position, Tire pressure.",
+ "label": "Vehicle information",
+ "textBody": "An app can access the following vehicle information: Fuel level, Fuel economy, Engine RPMs, Odometer, VIN, Outside air temperature, Gear position, Tire pressure."
+ },
+ "en-ie": {
+ "tts": "An app can access the following vehicle information: Fuel level, Fuel economy, Engine RPMs, Odometer, VIN, Outside air temperature, Gear position, Tyre pressure.",
+ "label": "Vehicle information"
+ },
+ "en-us": {
+ "tts": "An app can access the following vehicle information: Fuel Level, Fuel Economy, Engine RPMs, Odometer, VIN, External Temperature, Gear Position, Tire Pressure.",
+ "label": "Vehicle information",
+ "textBody": "An app can access the following vehicle information: Fuel Level, Fuel Economy, Engine RPMs, Odometer, VIN, External Temperature, Gear Position, Tire Pressure."
+ },
+ "es-en": {
+ "tts": "Las aplicaciones pueden acceder a la siguiente información del vehículo: Nivel de combustible, Economía de combustible, RPM del motor, Cuentakilómetros, Número de identificación del vehículo, Temperatura externa, Posición del cambio, Presión de los neumáticos.",
+ "label": "Información del vehículo",
+ "textBody": "Las aplicaciones pueden acceder a la siguiente información del vehículo: Nivel de combustible, Economía de combustible, RPM del motor, Cuentakilómetros, Número de identificación del vehículo, Temperatura externa, Posición del cambio, Presión de los neumáticos."
+ },
+ "es-es": {
+ "tts": "Una aplicación puede acceder a la siguiente información del vehículo: Nivel de combustible, Ahorro de combustible, RPM del motor, Cuentakilómetros, VIN, Temperatura aire exterior, Marcha engranada, Presión de neumáticos.",
+ "label": "Información del vehículo"
+ },
+ "es-mx": {
+ "tts": "Las aplicaciones pueden acceder a la siguiente información del vehículo: Nivel de combustible, Economía de combustible, RPM del motor, Cuentakilómetros, Número de identificación del vehículo, Temperatura externa, Posición del cambio, Presión de los neumáticos.",
+ "label": "Información del vehículo"
+ },
+ "fr-ca": {
+ "tts": "Une application peut accéder aux informations suivantes du véhicule: Niveau de carburant, Économie de carburant, Au régime du moteur, Odomètre, NIV, Température extérieure, Position d’embrayage, Pression des pneus.",
+ "label": "Renseignements du véhicule",
+ "textBody": "Une application peut accéder aux informations suivantes du véhicule: Niveau de carburant, Économie de carburant, Au régime du moteur, Odomètre, NIV, Température extérieure, Position d’embrayage, Pression des pneus."
+ },
+ "fr-fr": {
+ "tts": "Une application peut accéder aux informations suivantes du véhicule: Niveau de carburant, Économie de carburant, Vitesse de moteur, Compteur kilométrique, NIV, Température extérieure, Position de vitesse, Pression des pneus.",
+ "label": "Renseignements du véhicule"
+ },
+ "it-it": {
+ "tts": "Un'app può avere accesso alle seguenti informazioni del veicolo: Livello carburante, Consumi carburante, Numero giri motore, Contachilometri, VIN, Temperatura esterna, Posizione marcia, Pressione pneumatici.",
+ "label": "Informazioni sul veicolo"
+ },
+ "nl-nl": {
+ "tts": "Een app heeft toegang tot de volgende voertuiginformatie: Brandstofpeil, Brandstofverbruik, Motortoerental, Kilometerteller, VIN, Buitentemperatuur, Versnellingsstand, Bandenspanning.",
+ "label": "Voertuiginformatie"
+ },
+ "pl-pl": {
+ "tts": "Aplikacja może uzyskać dostęp do następujących informacji o pojeździe: Poziom paliwa, Zużycie paliwa, Obroty silnika, Licznik przebiegu, Numer VIN, Temperatura zewnętrzna, Aktualny bieg, Ciśnienie opon.",
+ "label": "Informacje o pojeździe"
+ },
+ "pt-br": {
+ "tts": "Um aplicativo pode acessar as seguintes informações sobre o veículo: Nível de combustível, Economia de combustível, RPM do motor, Hodômetro, VIN, Temperatura externa, Posição das marchas, Pressão dos pneus.",
+ "label": "Informações sobre o veículo"
+ },
+ "pt-pt": {
+ "tts": "Uma aplicação consegue aceder às seguintes informações do veículo: Nível de combustível, Poupança de combustível, RPM do motor, Conta-quilómetros, VIN, Temperatura exterior, Posição da mudança de velocidade, Pressão dos pneus.",
+ "label": "Informações do veículo"
+ },
+ "ru-ru": {
+ "tts": "Приложение имеет доступ к следующим данным автомобиля: Уровень топлива, Економия топлива, Число оборотов двигателя, Одометр, Номер VIN, Температура за бортом, Положение передачи, Давление шин.",
+ "label": "Информация об автомобиле"
+ },
+ "sv-se": {
+ "tts": "Appen kan komma åt följande fordonsinformation: Bränslenivå, Bränsleekonomi, Motorns varvtal, Vägmätare, VIN, Utetemperatur, Växelläge, Däcktryck.",
+ "label": "Fordonsinformation"
+ },
+ "tr-tr": {
+ "tts": "Bir uygulama şu araç bilgilerine erişebilir: Yakıt seviyesi, Yakıt ekonomisi, Motor devirleri, Kilometre sayacı, VIN, Dış sıcaklık, Vites konumu, Lastik basıncı.",
+ "label": "Araç bilgisi"
+ },
+ "zh-cn": {
+ "tts": "移动应用程序可访问下列车辆信息 : 燃油量, 燃油经济性, 发动机转速(RPM), 里程表, VIN, 车外温度, 档位, 胎压.",
+ "label": "车辆信息"
+ },
+ "zh-tw": {
+ "tts": "一個應用程式可存取以下車輛資訊 : 燃油存量, 燃油經濟性, 引擎轉速, 里程表, 車輛識別號碼, 車外溫度, 檔位, 胎壓.",
+ "label": "車輛資訊"
+ }
+ }
+ }
+ }
+ },
+ "app_policies": {
+ "default": {
+ "keep_context": false,
+ "steal_focus": false,
+ "priority": "NONE",
+ "default_hmi": "NONE",
+ "groups": ["Base-4"]
+ },
+ "device": {
+ "keep_context": false,
+ "steal_focus": false,
+ "priority": "NONE",
+ "default_hmi": "NONE",
+ "groups": ["DataConsent-2"]
+ },
+ "pre_DataConsent": {
+ "keep_context": false,
+ "steal_focus": false,
+ "priority": "NONE",
+ "default_hmi": "NONE",
+ "groups": ["BaseBeforeDataConsent"]
+ }
+ }
+ }
+} \ No newline at end of file
diff --git a/src/components/policy/test/sql_pt_ext_representation_test.cc b/src/components/policy/test/sql_pt_ext_representation_test.cc
index d5f89780ae..bb444ee20b 100644
--- a/src/components/policy/test/sql_pt_ext_representation_test.cc
+++ b/src/components/policy/test/sql_pt_ext_representation_test.cc
@@ -283,7 +283,7 @@ TEST_F(SQLPTExtRepresentationTest, SetUnpairedDevice) {
const char* query_insert = "INSERT INTO `device` (`id`) VALUES('12345')";
ASSERT_TRUE(dbms->Exec(query_insert));
- ASSERT_TRUE(reps->SetUnpairedDevice("12345", true));
+ ASSERT_TRUE(reps->SetUnpairedDevice("12345"));
const char* query_select = "SELECT `id` FROM `device` WHERE `unpaired` = 1";
EXPECT_EQ("12345", dbms->FetchOneString(query_select));
diff --git a/src/components/policy/test/sqlite_wrapper/sql_database_test.cc b/src/components/policy/test/sqlite_wrapper/sql_database_test.cc
index 78e3d341b3..85d595a3d9 100644
--- a/src/components/policy/test/sqlite_wrapper/sql_database_test.cc
+++ b/src/components/policy/test/sqlite_wrapper/sql_database_test.cc
@@ -28,7 +28,6 @@
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*/
-#include <sys/stat.h>
#include "gtest/gtest.h"
@@ -142,18 +141,6 @@ TEST(SQLDatabaseTest, BadTransaction) {
EXPECT_TRUE(IsError(db.LastError()));
}
-TEST(SQLDatabaseTest, IsReadWrite) {
- SQLDatabase db("test-database");
- ASSERT_TRUE(db.Open());
- EXPECT_TRUE(db.IsReadWrite());
- db.Close();
- chmod("test-database.sqlite", S_IRUSR);
- ASSERT_TRUE(db.Open());
- EXPECT_FALSE(db.IsReadWrite());
- db.Close();
- remove("test-database.sqlite");
-}
-
} // namespace dbms
} // namespace policy
} // namespace components
diff --git a/src/components/policy/test/usage_statistics_test.cc b/src/components/policy/test/usage_statistics_test.cc
index 7ddf2855dc..1410c5811f 100644
--- a/src/components/policy/test/usage_statistics_test.cc
+++ b/src/components/policy/test/usage_statistics_test.cc
@@ -92,20 +92,18 @@ TEST(UsageStatisticsTest, TestAppInfoUpdatesTwice) {
gui_language_info.Update("UA");
}
-TEST(UsageStatisticsTest, DISABLED_TestAppStopwatchAutoStopsAndAddsZero) {
+TEST(UsageStatisticsTest, TestAppStopwatchAutoStopsAndAddsZero) {
MockStatisticsManager* msm = new StrictMock<MockStatisticsManager>();
- const std::uint32_t time_out = 1;
- AppStopwatch hmi_full_stopwatch(msm, "HelloApp", time_out);
+ AppStopwatch hmi_full_stopwatch(msm, "HelloApp");
EXPECT_CALL(*msm, Add("HelloApp", SECONDS_HMI_FULL, 0)).Times(1);
hmi_full_stopwatch.Start(SECONDS_HMI_FULL);
}
-TEST(UsageStatisticsTest, DISABLED_TestAppStopwatchAddsZero) {
+TEST(UsageStatisticsTest, TestAppStopwatchAddsZero) {
MockStatisticsManager* msm = new StrictMock<MockStatisticsManager>();
- const std::uint32_t time_out = 1;
- AppStopwatch hmi_full_stopwatch(msm, "HelloApp", time_out);
+ AppStopwatch hmi_full_stopwatch(msm, "HelloApp");
InSequence s;
EXPECT_CALL(*msm, Add("HelloApp", SECONDS_HMI_FULL, 0)).Times(1);
@@ -115,15 +113,12 @@ TEST(UsageStatisticsTest, DISABLED_TestAppStopwatchAddsZero) {
hmi_full_stopwatch.Start(SECONDS_HMI_FULL);
hmi_full_stopwatch.Switch(SECONDS_HMI_BACKGROUND);
hmi_full_stopwatch.Switch(SECONDS_HMI_FULL);
- // TODO(AOleynik): Fix test
- //hmi_full_stopwatch.Stop();
+ hmi_full_stopwatch.Stop();
}
-TEST(UsageStatisticsTest, DISABLED_TestAppStopwatchAutoStopsInASecond) {
- // TODO(AGaliuzov) APPLINK-10657 neet to enable this tests
+TEST(UsageStatisticsTest, TestAppStopwatchAutoStopsInASecond) {
MockStatisticsManager* msm = new StrictMock<MockStatisticsManager>();
- const std::uint32_t time_out = 1;
- AppStopwatch hmi_full_stopwatch(msm, "HelloApp", time_out);
+ AppStopwatch hmi_full_stopwatch(msm, "HelloApp");
EXPECT_CALL(*msm, Add("HelloApp", SECONDS_HMI_FULL, 1)).Times(1);
@@ -131,21 +126,19 @@ TEST(UsageStatisticsTest, DISABLED_TestAppStopwatchAutoStopsInASecond) {
sleep(1);
}
-TEST(UsageStatisticsTest, DISABLED_TestAppStopwatchStopsInTwoSeconds) {
- // TODO(AGaliuzov) APPLINK-10657 neet to enable this tests
+TEST(UsageStatisticsTest, TestAppStopwatchStopsInTwoSeconds) {
MockStatisticsManager* msm = new StrictMock<MockStatisticsManager>();
- const std::uint32_t time_out = 1;
- AppStopwatch hmi_full_stopwatch(msm, "HelloApp", time_out);
+ AppStopwatch hmi_full_stopwatch(msm, "HelloApp");
- EXPECT_CALL(*msm, Add("HelloApp", SECONDS_HMI_NONE, 0)).Times(0);
+ EXPECT_CALL(*msm, Add("HelloApp", SECONDS_HMI_NONE, 0)).Times(1);
EXPECT_CALL(*msm, Add("HelloApp", SECONDS_HMI_FULL, 1)).Times(1);
EXPECT_CALL(*msm, Add("HelloApp", SECONDS_HMI_BACKGROUND, 1)).Times(1);
hmi_full_stopwatch.Start(SECONDS_HMI_NONE);
hmi_full_stopwatch.Switch(SECONDS_HMI_FULL);
- sleep(2);
+ sleep(1);
hmi_full_stopwatch.Switch(SECONDS_HMI_BACKGROUND);
- sleep(2);
+ sleep(1);
}
} // namespace test
diff --git a/src/components/protocol/src/raw_message.cc b/src/components/protocol/src/raw_message.cc
index 7b1b8b087d..348eb16199 100644
--- a/src/components/protocol/src/raw_message.cc
+++ b/src/components/protocol/src/raw_message.cc
@@ -46,7 +46,7 @@ RawMessage::RawMessage(uint32_t connection_key, uint32_t protocol_version,
service_type_(ServiceTypeFromByte(type)),
payload_size_(payload_size),
waiting_(false) {
- if (data_param && data_sz > 0) {
+ if (data_sz > 0) {
data_ = new uint8_t[data_sz];
memcpy(data_, data_param, sizeof(*data_) * data_sz);
}
diff --git a/src/components/protocol_handler/CMakeLists.txt b/src/components/protocol_handler/CMakeLists.txt
index 50ec006382..5ccfa3bb3d 100644
--- a/src/components/protocol_handler/CMakeLists.txt
+++ b/src/components/protocol_handler/CMakeLists.txt
@@ -7,7 +7,6 @@ include_directories(
)
set(SOURCES
- ./src/incoming_data_handler.cc
./src/protocol_handler_impl.cc
./src/protocol_packet.cc
./src/protocol_payload.cc
diff --git a/src/components/protocol_handler/include/protocol_handler/protocol_handler_impl.h b/src/components/protocol_handler/include/protocol_handler/protocol_handler_impl.h
index 130987d391..3732e23a4c 100644
--- a/src/components/protocol_handler/include/protocol_handler/protocol_handler_impl.h
+++ b/src/components/protocol_handler/include/protocol_handler/protocol_handler_impl.h
@@ -36,18 +36,15 @@
#include <map>
#include <memory>
#include <set>
-#include <list>
#include "utils/prioritized_queue.h"
#include "utils/message_queue.h"
#include "utils/threads/message_loop_thread.h"
#include "utils/shared_ptr.h"
-#include "utils/messagemeter.h"
#include "protocol_handler/protocol_handler.h"
#include "protocol_handler/protocol_packet.h"
#include "protocol_handler/session_observer.h"
#include "protocol_handler/protocol_observer.h"
-#include "protocol_handler/incoming_data_handler.h"
#include "transport_manager/common.h"
#include "transport_manager/transport_manager.h"
#include "transport_manager/transport_manager_listener_empty.h"
@@ -72,6 +69,11 @@ class MessagesToMobileAppHandler;
using transport_manager::TransportManagerListenerEmpty;
+/**
+ * @brief Type definition for variable that hold shared pointer to raw message.
+ */
+typedef utils::SharedPtr<protocol_handler::ProtocolPacket> ProtocolFramePtr;
+
typedef std::multimap<int32_t, RawMessagePtr> MessagesOverNaviMap;
typedef std::set<ProtocolObserver*> ProtocolObservers;
typedef transport_manager::ConnectionUID ConnectionID;
@@ -129,14 +131,10 @@ class ProtocolHandlerImpl
/**
* \brief Constructor
* \param transportManager Pointer to Transport layer handler for
- * \param message_frequency_time used as time for flood filtering
- * \param message_frequency_count used as maximum value of messages
- * per message_frequency_time period
* message exchange.
*/
explicit ProtocolHandlerImpl(
- transport_manager::TransportManager *transport_manager_param,
- size_t message_frequency_time, size_t message_frequency_count);
+ transport_manager::TransportManager *transport_manager_param);
/**
* \brief Destructor
@@ -173,11 +171,6 @@ class ProtocolHandlerImpl
#endif // ENABLE_SECURITY
/**
- * \brief Stop all handling activity
- */
- void Stop();
-
- /**
* \brief Method for sending message to Mobile Application
* \param message Message with params to be sent to Mobile App
*/
@@ -186,7 +179,7 @@ class ProtocolHandlerImpl
/**
* \brief Sends number of processed frames in case of binary nav streaming
- * \param connection_key Unique key used by other components as session identifier
+ * \param connection_key Id of connection over which message is to be sent
* \param number_of_frames Number of frames processed by
* streaming server and displayed to user.
*/
@@ -258,7 +251,7 @@ class ProtocolHandlerImpl
* mobile app for using when ending session.
* \param service_type Type of session: RPC or BULK Data. RPC by default
*/
- void SendEndSessionAck(ConnectionID connection_id,
+ void SendEndSessionAck(ConnectionID connection_id ,
uint8_t session_id,
uint8_t protocol_version,
uint8_t service_type);
@@ -271,7 +264,7 @@ class ProtocolHandlerImpl
* \param protocol_version Version of protocol used for communication
* \param service_type Type of session: RPC or BULK Data. RPC by default
*/
- void SendEndSessionNAck(ConnectionID connection_id,
+ void SendEndSessionNAck(ConnectionID connection_id ,
uint32_t session_id,
uint8_t protocol_version,
uint8_t service_type);
@@ -343,11 +336,11 @@ class ProtocolHandlerImpl
* \param is_final_message if is_final_message = true - it is last message
* \return \saRESULT_CODE Status of operation
*/
- RESULT_CODE SendSingleFrameMessage(const ConnectionID connection_id,
+ RESULT_CODE SendSingleFrameMessage(ConnectionID connection_id,
const uint8_t session_id,
- const uint32_t protocol_version,
+ uint32_t protocol_version,
const uint8_t service_type,
- const size_t data_size,
+ size_t data_size,
const uint8_t *data,
const bool is_final_message);
@@ -364,9 +357,9 @@ class ProtocolHandlerImpl
* \param is_final_message if is_final_message = true - it is last message
* \return \saRESULT_CODE Status of operation
*/
- RESULT_CODE SendMultiFrameMessage(const ConnectionID connection_id,
+ RESULT_CODE SendMultiFrameMessage(ConnectionID connection_id,
const uint8_t session_id,
- const uint8_t protocol_version,
+ uint32_t protocol_version,
const uint8_t service_type,
const size_t data_size,
const uint8_t *data,
@@ -388,7 +381,7 @@ class ProtocolHandlerImpl
* \return \saRESULT_CODE Status of operation
*/
RESULT_CODE HandleMessage(
- ConnectionID connection_id,
+ ConnectionID connection_id ,
const ProtocolFramePtr packet);
/**
@@ -399,7 +392,7 @@ class ProtocolHandlerImpl
* \return \saRESULT_CODE Status of operation
*/
RESULT_CODE HandleSingleFrameMessage(
- ConnectionID connection_id,
+ ConnectionID connection_id ,
const ProtocolFramePtr packet);
/**
* \brief Handles message received in multiple frames. Collects all frames
@@ -410,7 +403,7 @@ class ProtocolHandlerImpl
* \return \saRESULT_CODE Status of operation
*/
RESULT_CODE HandleMultiFrameMessage(
- ConnectionID connection_id,
+ ConnectionID connection_id ,
const ProtocolFramePtr packet);
/**
@@ -421,21 +414,28 @@ class ProtocolHandlerImpl
* \return \saRESULT_CODE Status of operation
*/
RESULT_CODE HandleControlMessage(
- ConnectionID connection_id,
+ ConnectionID connection_id ,
const ProtocolFramePtr packet);
RESULT_CODE HandleControlMessageEndSession(
- ConnectionID connection_id,
+ ConnectionID connection_id ,
const ProtocolPacket &packet);
RESULT_CODE HandleControlMessageStartSession(
- ConnectionID connection_id,
+ ConnectionID connection_id ,
const ProtocolPacket &packet);
RESULT_CODE HandleControlMessageHeartBeat(
- ConnectionID connection_id,
+ ConnectionID connection_id ,
const ProtocolPacket &packet);
+ /**
+ * \brief Sends Mobile Navi Ack message
+ */
+ RESULT_CODE SendMobileNaviAck(
+ ConnectionID connection_id ,
+ int32_t connection_key);
+
// threads::MessageLoopThread<*>::Handler implementations
// CALLED ON raw_ford_messages_from_mobile_ thread!
void Handle(const impl::RawFordMessageFromMobile message);
@@ -450,9 +450,6 @@ class ProtocolHandlerImpl
RESULT_CODE EncryptFrame(ProtocolFramePtr packet);
RESULT_CODE DecryptFrame(ProtocolFramePtr packet);
#endif // ENABLE_SECURITY
-
- bool TrackMessage(const uint32_t& connection_key);
-
private:
/**
*\brief Pointer on instance of class implementing IProtocolObserver
@@ -477,7 +474,7 @@ class ProtocolHandlerImpl
std::map<int32_t, ProtocolFramePtr> incomplete_multi_frame_messages_;
/**
- * \brief Map of messages (frames) received over mobile nave session
+ * \brief Map of messages (frames) recieved over mobile nave session
* for map streaming.
*/
MessagesOverNaviMap message_over_navi_session_;
@@ -490,16 +487,10 @@ class ProtocolHandlerImpl
/**
*\brief Counter of messages sent in each session.
- * Used ad unique message identifier
*/
std::map<uint8_t, uint32_t> message_counters_;
/**
- *\brief Counter of messages sent in each session.
- */
- std::map<ConnectionID, uint32_t> malformed_message_counters_;
-
- /**
*\brief map for session last message.
*/
std::map<uint8_t, uint32_t> sessions_last_message_id_;
@@ -509,11 +500,9 @@ class ProtocolHandlerImpl
*/
std::list<uint32_t> ready_to_close_connections_;
- ProtocolPacket::ProtocolHeaderValidator protocol_header_validator_;
- IncomingDataHandler incoming_data_handler_;
- // Use uint32_t as application identifier
- utils::MessageMeter<uint32_t> message_meter_;
- size_t message_max_frequency_;
+
+ class IncomingDataHandler;
+ std::auto_ptr<IncomingDataHandler> incoming_data_handler_;
#ifdef ENABLE_SECURITY
security_manager::SecurityManager *security_manager_;
@@ -531,4 +520,5 @@ class ProtocolHandlerImpl
#endif // TIME_TESTER
};
} // namespace protocol_handler
+
#endif // SRC_COMPONENTS_PROTOCOL_HANDLER_INCLUDE_PROTOCOL_HANDLER_PROTOCOL_HANDLER_IMPL_H_
diff --git a/src/components/protocol_handler/include/protocol_handler/protocol_packet.h b/src/components/protocol_handler/include/protocol_handler/protocol_packet.h
index 0b4b253a84..2e3d39fd47 100644
--- a/src/components/protocol_handler/include/protocol_handler/protocol_packet.h
+++ b/src/components/protocol_handler/include/protocol_handler/protocol_packet.h
@@ -35,45 +35,67 @@
#include "utils/macro.h"
#include "protocol/common.h"
-#include "transport_manager/common.h"
+#include "protocol/common.h"
/**
*\namespace protocol_handlerHandler
*\brief Namespace for SmartDeviceLink ProtocolHandler related functionality.
*/
namespace protocol_handler {
-
-typedef transport_manager::ConnectionUID ConnectionID;
/**
* \class ProtocolPacket
* \brief Class for forming/parsing protocol headers of the message and
* handling multiple frames of the message.
*/
class ProtocolPacket {
- public:
+ private:
/**
* \struct ProtocolData
* \brief Used for storing message and its size.
*/
struct ProtocolData {
- ProtocolData();
- ~ProtocolData();
+ ProtocolData()
+ : data(0), totalDataBytes(0x00) {
+ }
uint8_t *data;
uint32_t totalDataBytes;
};
/**
- * \class ProtocolHeader
+ * \struct ProtocolHeader
* \brief Used for storing protocol header of a message.
*/
- class ProtocolHeader {
- public:
- ProtocolHeader();
+ struct ProtocolHeader {
+ /**
+ * \brief Constructor
+ */
+ ProtocolHeader()
+ : version(0x00),
+ protection_flag(PROTECTION_OFF),
+ frameType(0x00),
+ serviceType(0x00),
+ frameData(0x00),
+ sessionId(0x00),
+ dataSize(0x00),
+ messageId(0x00) {
+ }
+ /**
+ * \brief Constructor
+ */
ProtocolHeader(uint8_t version, bool protection,
uint8_t frameType,
uint8_t serviceType,
uint8_t frameData, uint8_t sessionID,
- uint32_t dataSize, uint32_t messageID);
+ uint32_t dataSize, uint32_t messageID)
+ : version(version),
+ protection_flag(protection),
+ frameType(frameType),
+ serviceType(serviceType),
+ frameData(frameData),
+ sessionId(sessionID),
+ dataSize(dataSize),
+ messageId(messageID) {
+ }
uint8_t version;
bool protection_flag;
uint8_t frameType;
@@ -82,28 +104,9 @@ class ProtocolPacket {
uint8_t sessionId;
uint32_t dataSize;
uint32_t messageId;
- void deserialize(const uint8_t *message, const size_t messageSize);
- };
- /**
- * \class ProtocolHeaderValidator
- * \brief Used for ProtocolHeader validation
- */
- class ProtocolHeaderValidator {
- public:
- ProtocolHeaderValidator();
- /**
- * \brief Setter/getter maximum payload size of packets
- */
- void set_max_payload_size(const size_t max_payload_size);
- size_t max_payload_size() const;
- /**
- * \brief Check ProtocolHeader according to protocol requiements
- */
- RESULT_CODE validate(const ProtocolHeader& header) const;
- private:
- size_t max_payload_size_;
};
+ public:
/**
* \brief Default constructor
*/
@@ -112,9 +115,14 @@ class ProtocolPacket {
/**
* \brief Constructor
*
+ * \param connectionKey Identifier of connection within wich message
+ * is transferred
* \param connection_id - Connection Identifier
+ * \param data Message string
+ * \param dataSize Message size
*/
- explicit ProtocolPacket(ConnectionID connection_id);
+ ProtocolPacket(uint8_t connection_id, uint8_t *data,
+ uint32_t dataSize);
/**
* \brief Constructor
@@ -129,12 +137,18 @@ class ProtocolPacket {
* \param dataSize Size of message string
* \param messageID ID of message or hash code - only for second protocol
* \param data Message string if provided
+ * \param packet_id - ID for multiframe messages
*/
- ProtocolPacket(ConnectionID connection_id,
+ ProtocolPacket(uint8_t connection_id,
uint8_t version, bool protection, uint8_t frameType,
uint8_t serviceType, uint8_t frameData,
uint8_t sessionId, uint32_t dataSize,
- uint32_t messageID, const uint8_t *data = 0);
+ uint32_t messageID, const uint8_t *data = 0,
+ uint32_t packet_id = 0);
+ /**
+ * \brief Destructor
+ */
+ ~ProtocolPacket();
/*Serialization*/
/**
@@ -157,9 +171,13 @@ class ProtocolPacket {
*/
size_t packet_size() const;
- /*End of Serialization*/
+ /**
+ * \brief Getter of message ID
+ * \return uint32_t message ID
+ */
+ uint32_t packet_id() const;
- bool operator==(const protocol_handler::ProtocolPacket& other) const;
+ /*End of Serialization*/
/*Deserialization*/
@@ -171,7 +189,7 @@ class ProtocolPacket {
* \return \saRESULT_CODE Status of serialization
*/
RESULT_CODE deserializePacket(const uint8_t *message,
- const size_t messageSize);
+ uint32_t messageSize);
/**
* \brief Getter of protocol version.
@@ -267,16 +285,22 @@ class ProtocolPacket {
uint32_t payload_size_;
/**
+ *\brief Offset for multiframe messages
+ */
+ uint32_t data_offset_;
+
+ /**
+ *\brief ID for multiframe messages
+ */
+ uint32_t packet_id_;
+
+ /**
* \brief Connection Identifier
* Obtained from connection_handler
*/
- ConnectionID connection_id_;
+ uint8_t connection_id_;
DISALLOW_COPY_AND_ASSIGN(ProtocolPacket);
};
} // namespace protocol_handler
-/**
- * @brief Type definition for variable that hold shared pointer to protocolol packet
- */
-typedef utils::SharedPtr<protocol_handler::ProtocolPacket> ProtocolFramePtr;
#endif // SRC_COMPONENTS_PROTOCOL_HANDLER_INCLUDE_PROTOCOL_HANDLER_PROTOCOL_PACKET_H_
diff --git a/src/components/protocol_handler/src/protocol_handler_impl.cc b/src/components/protocol_handler/src/protocol_handler_impl.cc
index 66600a3f2c..454287595a 100644
--- a/src/components/protocol_handler/src/protocol_handler_impl.cc
+++ b/src/components/protocol_handler/src/protocol_handler_impl.cc
@@ -56,14 +56,106 @@ std::string ConvertPacketDataToString(const uint8_t *data,
const size_t kStackSize = 32768;
+class ProtocolHandlerImpl::IncomingDataHandler {
+ public:
+ IncomingDataHandler() : connections_data_() {}
+
+ bool ProcessData(const RawMessagePtr tm_message,
+ std::vector<ProtocolFramePtr> *out_frames) {
+ DCHECK(tm_message);
+ DCHECK(out_frames != NULL);
+ const ConnectionID connection_id = tm_message->connection_key();
+ const uint8_t *data = tm_message->data();
+ const size_t size = tm_message->data_size();
+ DCHECK(size > 0); DCHECK(data != NULL);
+ LOG4CXX_TRACE(logger_, "Start of processing incoming data of size "
+ << size << " for connection " << connection_id);
+ const uint32_t kBytesForSizeDetection = 8;
+ ConnectionsData::iterator it = connections_data_.find(connection_id);
+ if (connections_data_.end() == it) {
+ LOG4CXX_ERROR(logger_, "ProcessData requested for unknown connection");
+ return false;
+ }
+ std::vector<uint8_t> &connection_data = it->second;
+ connection_data.insert(connection_data.end(), data, data + size);
+
+ LOG4CXX_TRACE(logger_, "Total data size for connection "
+ << connection_id << " is "
+ << connection_data.size());
+ while (connection_data.size() >= kBytesForSizeDetection) {
+ const uint32_t packet_size = GetPacketSize(&connection_data[0]);
+ if (0 == packet_size) {
+ LOG4CXX_ERROR(logger_, "Failed to get packet size");
+ return false;
+ }
+ LOG4CXX_TRACE(logger_, "Packet size " << packet_size);
+ if (connection_data.size() >= packet_size) {
+ ProtocolFramePtr frame(new protocol_handler::ProtocolPacket(
+ connection_id, &connection_data[0], packet_size));
+ out_frames->push_back(frame);
+ connection_data.erase(connection_data.begin(),
+ connection_data.begin() + packet_size);
+ LOG4CXX_TRACE(logger_,
+ "Packet created and passed, new data size for connection "
+ << connection_id << " is " << connection_data.size());
+ } else {
+ LOG4CXX_TRACE(logger_, "Packet data is not available yet");
+ return true;
+ }
+ }
+ return true;
+ }
+
+ void AddConnection(ConnectionID connection_id) {
+ // Add empty list of session to new connection
+ connections_data_[connection_id] = std::vector<uint8_t>();
+ }
+
+ void RemoveConnection(ConnectionID connection_id) {
+ connections_data_.erase(connection_id);
+ }
+
+ private:
+ /**
+ * @brief Returns size of frame to be formed from raw bytes.
+ * expects first bytes of message which will be treated as frame header.
+ */
+ uint32_t GetPacketSize(unsigned char *received_bytes) {
+ DCHECK(received_bytes != NULL);
+ unsigned char offset = sizeof(uint32_t);
+ unsigned char version = received_bytes[0] >> 4u;
+ uint32_t frame_body_size = received_bytes[offset++] << 24u;
+ frame_body_size |= received_bytes[offset++] << 16u;
+ frame_body_size |= received_bytes[offset++] << 8u;
+ frame_body_size |= received_bytes[offset++];
+
+ uint32_t required_size = frame_body_size;
+ switch (version) {
+ case PROTOCOL_VERSION_1:
+ required_size += PROTOCOL_HEADER_V1_SIZE;
+ break;
+ case PROTOCOL_VERSION_3:
+ case PROTOCOL_VERSION_2:
+ required_size += PROTOCOL_HEADER_V2_SIZE;
+ break;
+ default:
+ LOG4CXX_ERROR(logger_, "Unknown protocol version.");
+ return 0;
+ }
+ return required_size;
+ }
+
+ typedef std::map<ConnectionID, std::vector<uint8_t> > ConnectionsData;
+ ConnectionsData connections_data_;
+};
+
ProtocolHandlerImpl::ProtocolHandlerImpl(
- transport_manager::TransportManager *transport_manager_param,
- size_t message_frequency_time, size_t message_frequency_count)
+ transport_manager::TransportManager *transport_manager_param)
: protocol_observers_(),
session_observer_(0),
transport_manager_(transport_manager_param),
kPeriodForNaviAck(5),
- message_max_frequency_(0),
+ incoming_data_handler_(new IncomingDataHandler),
#ifdef ENABLE_SECURITY
security_manager_(NULL),
#endif // ENABLE_SECURITY
@@ -76,23 +168,9 @@ ProtocolHandlerImpl::ProtocolHandlerImpl(
#endif // TIME_TESTER
{
- LOG4CXX_AUTO_TRACE(logger_);
- protocol_header_validator_.set_max_payload_size(profile::Profile::instance()->maximum_payload_size());
- incoming_data_handler_.set_validator(&protocol_header_validator_);
- const size_t time_range_msecs = message_frequency_time;
- message_meter_.set_time_range(time_range_msecs);
- if (time_range_msecs > 0) {
- message_max_frequency_ = message_frequency_count;
- if (message_max_frequency_ > 0) {
- LOG4CXX_DEBUG(logger_, "Frequency meter is enabled ( " << message_max_frequency_
- << " per " << time_range_msecs << " mSecond)");
- } else {
- LOG4CXX_WARN(logger_, "Invalid massage frequency value. MessageMeter will be disabled");
- message_meter_.set_time_range(0u);
- }
- } else {
- LOG4CXX_WARN(logger_, "Frequency meter is disabled");
- }
+ LOG4CXX_TRACE_ENTER(logger_);
+
+ LOG4CXX_TRACE_EXIT(logger_);
}
ProtocolHandlerImpl::~ProtocolHandlerImpl() {
@@ -113,13 +191,15 @@ void ProtocolHandlerImpl::AddProtocolObserver(ProtocolObserver *observer) {
}
void ProtocolHandlerImpl::RemoveProtocolObserver(ProtocolObserver* observer) {
- LOG4CXX_AUTO_TRACE(logger_);
+ LOG4CXX_TRACE_ENTER(logger_);
if (!observer) {
LOG4CXX_ERROR(logger_, "Invalid (NULL) pointer to IProtocolObserver.");
+ LOG4CXX_TRACE_EXIT(logger_);
return;
}
sync_primitives::AutoLock lock(protocol_observers_lock_);
protocol_observers_.erase(observer);
+ LOG4CXX_TRACE_EXIT(logger_);
}
void ProtocolHandlerImpl::set_session_observer(SessionObserver *observer) {
@@ -153,9 +233,10 @@ void ProtocolHandlerImpl::SendStartSessionAck(ConnectionID connection_id,
uint32_t hash_id,
uint8_t service_type,
bool protection) {
- LOG4CXX_AUTO_TRACE(logger_);
+ LOG4CXX_TRACE_ENTER(logger_);
uint8_t protocolVersion;
+
if (0 == profile::Profile::instance()->heart_beat_timeout()) {
protocolVersion = PROTOCOL_VERSION_2;
LOG4CXX_INFO(logger_, "Heart beat timeout == 0 => SET PROTOCOL_VERSION_2");
@@ -179,13 +260,14 @@ void ProtocolHandlerImpl::SendStartSessionAck(ConnectionID connection_id,
<< " for service_type " << static_cast<int32_t>(service_type)
<< " session_id " << static_cast<int32_t>(session_id)
<< " protection " << (protection ? "ON" : "OFF"));
+ LOG4CXX_TRACE_EXIT(logger_);
}
void ProtocolHandlerImpl::SendStartSessionNAck(ConnectionID connection_id,
uint8_t session_id,
uint8_t protocol_version,
uint8_t service_type) {
- LOG4CXX_AUTO_TRACE(logger_);
+ LOG4CXX_TRACE_ENTER(logger_);
ProtocolFramePtr ptr(new protocol_handler::ProtocolPacket(connection_id,
protocol_version, PROTECTION_OFF, FRAME_TYPE_CONTROL,
@@ -199,13 +281,14 @@ void ProtocolHandlerImpl::SendStartSessionNAck(ConnectionID connection_id,
"SendStartSessionNAck() for connection " << connection_id
<< " for service_type " << static_cast<int32_t>(service_type)
<< " session_id " << static_cast<int32_t>(session_id));
+ LOG4CXX_TRACE_EXIT(logger_);
}
void ProtocolHandlerImpl::SendEndSessionNAck(ConnectionID connection_id,
uint32_t session_id,
uint8_t protocol_version,
uint8_t service_type) {
- LOG4CXX_AUTO_TRACE(logger_);
+ LOG4CXX_TRACE_ENTER(logger_);
ProtocolFramePtr ptr(new protocol_handler::ProtocolPacket(connection_id,
protocol_version, PROTECTION_OFF, FRAME_TYPE_CONTROL,
@@ -218,13 +301,14 @@ void ProtocolHandlerImpl::SendEndSessionNAck(ConnectionID connection_id,
LOG4CXX_INFO(logger_, "SendEndSessionNAck() for connection " << connection_id
<< " for service_type " << static_cast<int32_t>(service_type)
<< " session_id " << static_cast<int32_t>(session_id));
+ LOG4CXX_TRACE_EXIT(logger_);
}
void ProtocolHandlerImpl::SendEndSessionAck(ConnectionID connection_id,
uint8_t session_id,
uint8_t protocol_version,
uint8_t service_type) {
- LOG4CXX_AUTO_TRACE(logger_);
+ LOG4CXX_TRACE_ENTER(logger_);
ProtocolFramePtr ptr(new protocol_handler::ProtocolPacket(connection_id,
protocol_version, PROTECTION_OFF, FRAME_TYPE_CONTROL,
@@ -238,11 +322,12 @@ void ProtocolHandlerImpl::SendEndSessionAck(ConnectionID connection_id,
"SendEndSessionAck() for connection " << connection_id
<< " for service_type " << static_cast<int32_t>(service_type)
<< " session_id " << static_cast<int32_t>(session_id));
+ LOG4CXX_TRACE_EXIT(logger_);
}
void ProtocolHandlerImpl::SendEndSession(int32_t connection_id,
uint8_t session_id) {
- LOG4CXX_AUTO_TRACE(logger_);
+ LOG4CXX_TRACE_ENTER(logger_);
ProtocolFramePtr ptr(new protocol_handler::ProtocolPacket(connection_id,
PROTOCOL_VERSION_3, PROTECTION_OFF, FRAME_TYPE_CONTROL,
@@ -255,12 +340,13 @@ void ProtocolHandlerImpl::SendEndSession(int32_t connection_id,
LOG4CXX_INFO(logger_, "SendEndSession() for connection " << connection_id
<< " for service_type " << static_cast<int32_t>(SERVICE_TYPE_RPC)
<< " session_id " << static_cast<int32_t>(session_id));
+ LOG4CXX_TRACE_EXIT(logger_);
}
RESULT_CODE ProtocolHandlerImpl::SendHeartBeatAck(ConnectionID connection_id,
uint8_t session_id,
uint32_t message_id) {
- LOG4CXX_AUTO_TRACE(logger_);
+ LOG4CXX_TRACE_ENTER(logger_);
ProtocolFramePtr ptr(new protocol_handler::ProtocolPacket(connection_id,
PROTOCOL_VERSION_3, PROTECTION_OFF, FRAME_TYPE_CONTROL,
@@ -269,12 +355,14 @@ RESULT_CODE ProtocolHandlerImpl::SendHeartBeatAck(ConnectionID connection_id,
raw_ford_messages_to_mobile_.PostMessage(
impl::RawFordMessageToMobile(ptr, false));
+
+ LOG4CXX_TRACE_EXIT(logger_);
return RESULT_OK;
}
void ProtocolHandlerImpl::SendHeartBeat(int32_t connection_id,
uint8_t session_id) {
- LOG4CXX_AUTO_TRACE(logger_);
+ LOG4CXX_TRACE_ENTER(logger_);
ProtocolFramePtr ptr(new protocol_handler::ProtocolPacket(connection_id,
PROTOCOL_VERSION_3, PROTECTION_OFF, FRAME_TYPE_CONTROL,
@@ -283,6 +371,8 @@ void ProtocolHandlerImpl::SendHeartBeat(int32_t connection_id,
raw_ford_messages_to_mobile_.PostMessage(
impl::RawFordMessageToMobile(ptr, false));
+
+ LOG4CXX_TRACE_EXIT(logger_);
}
void ProtocolHandlerImpl::SendMessageToMobileApp(const RawMessagePtr message,
@@ -290,10 +380,11 @@ void ProtocolHandlerImpl::SendMessageToMobileApp(const RawMessagePtr message,
#ifdef TIME_TESTER
const TimevalStruct start_time = date_time::DateTime::getCurrentTime();
#endif // TIME_TESTER
- LOG4CXX_AUTO_TRACE(logger_);
+ LOG4CXX_TRACE_ENTER(logger_);
if (!message) {
LOG4CXX_ERROR(logger_,
"Invalid message for sending to mobile app is received.");
+ LOG4CXX_TRACE_EXIT(logger_);
return;
}
@@ -369,10 +460,11 @@ void ProtocolHandlerImpl::SendMessageToMobileApp(const RawMessagePtr message,
metric_observer_->EndMessageProcess(metric);
}
#endif
+ LOG4CXX_TRACE_EXIT(logger_);
}
void ProtocolHandlerImpl::OnTMMessageReceived(const RawMessagePtr tm_message) {
- LOG4CXX_AUTO_TRACE(logger_);
+ LOG4CXX_TRACE_ENTER(logger_);
if (tm_message) {
LOG4CXX_INFO(logger_,
@@ -383,19 +475,20 @@ void ProtocolHandlerImpl::OnTMMessageReceived(const RawMessagePtr tm_message) {
logger_,
"Invalid incoming message received in"
<< " ProtocolHandler from Transport Manager.");
+ LOG4CXX_TRACE_EXIT(logger_);
return;
}
- RESULT_CODE result;
- const std::list<ProtocolFramePtr> protocol_frames =
- incoming_data_handler_.ProcessData(*tm_message, &result);
- if (result == RESULT_FAIL) {
+ std::vector<ProtocolFramePtr> protocol_frames;
+ const bool ok =
+ incoming_data_handler_->ProcessData(tm_message, &protocol_frames);
+ if (!ok) {
LOG4CXX_ERROR(logger_,
"Incoming data processing failed. Terminating connection.");
transport_manager_->DisconnectForce(tm_message->connection_key());
}
- for (std::list<ProtocolFramePtr>::const_iterator it =
+ for (std::vector<ProtocolFramePtr>::const_iterator it =
protocol_frames.begin(); it != protocol_frames.end(); ++it) {
#ifdef TIME_TESTER
const TimevalStruct start_time = date_time::DateTime::getCurrentTime();
@@ -417,6 +510,7 @@ void ProtocolHandlerImpl::OnTMMessageReceived(const RawMessagePtr tm_message) {
raw_ford_messages_from_mobile_.PostMessage(msg);
}
+ LOG4CXX_TRACE_EXIT(logger_);
}
void ProtocolHandlerImpl::OnTMMessageReceiveFailed(
@@ -426,7 +520,6 @@ void ProtocolHandlerImpl::OnTMMessageReceiveFailed(
}
void ProtocolHandlerImpl::NotifySubscribers(const RawMessagePtr message) {
- LOG4CXX_AUTO_TRACE(logger_);
sync_primitives::AutoLock lock(protocol_observers_lock_);
for (ProtocolObservers::iterator it = protocol_observers_.begin();
protocol_observers_.end() != it; ++it) {
@@ -439,6 +532,9 @@ void ProtocolHandlerImpl::OnTMMessageSend(const RawMessagePtr message) {
uint32_t connection_handle = 0;
uint8_t sessionID = 0;
+ const ProtocolPacket sent_message(message->connection_key(),
+ message->data(),
+ message->data_size());
session_observer_->PairFromKey(message->connection_key(),
&connection_handle,
@@ -454,13 +550,6 @@ void ProtocolHandlerImpl::OnTMMessageSend(const RawMessagePtr message) {
return;
}
- ProtocolPacket sent_message(message->connection_key());
- const RESULT_CODE result = sent_message.deserializePacket(message->data(),
- message->data_size());
- if (result != RESULT_OK) {
- LOG4CXX_ERROR(logger_, "Error while message deserialization.");
- return;
- }
std::map<uint8_t, uint32_t>::iterator it =
sessions_last_message_id_.find(sent_message.session_id());
@@ -493,19 +582,19 @@ void ProtocolHandlerImpl::OnTMMessageSendFailed(
void ProtocolHandlerImpl::OnConnectionEstablished(
const transport_manager::DeviceInfo &device_info,
const transport_manager::ConnectionUID &connection_id) {
- incoming_data_handler_.AddConnection(connection_id);
+ incoming_data_handler_->AddConnection(connection_id);
}
void ProtocolHandlerImpl::OnConnectionClosed(
const transport_manager::ConnectionUID &connection_id) {
- incoming_data_handler_.RemoveConnection(connection_id);
- message_meter_.ClearIdentifiers();
+ incoming_data_handler_->RemoveConnection(connection_id);
}
RESULT_CODE ProtocolHandlerImpl::SendFrame(const ProtocolFramePtr packet) {
- LOG4CXX_AUTO_TRACE(logger_);
+ LOG4CXX_TRACE_ENTER(logger_);
if (!packet) {
LOG4CXX_ERROR(logger_, "Failed to send empty packet.");
+ LOG4CXX_TRACE_EXIT(logger_);
return RESULT_FAIL;
}
#ifdef ENABLE_SECURITY
@@ -513,6 +602,7 @@ RESULT_CODE ProtocolHandlerImpl::SendFrame(const ProtocolFramePtr packet) {
const RESULT_CODE result = EncryptFrame(packet);
if (result != RESULT_OK) {
LOG4CXX_WARN(logger_, "Error frame encryption. Frame droped.");
+ LOG4CXX_TRACE_EXIT(logger_);
return RESULT_FAIL;
}
#endif // ENABLE_SECURITY
@@ -531,22 +621,26 @@ RESULT_CODE ProtocolHandlerImpl::SendFrame(const ProtocolFramePtr packet) {
if (!transport_manager_) {
LOG4CXX_WARN(logger_, "No Transport Manager found.");
+ LOG4CXX_TRACE_EXIT(logger_);
return RESULT_FAIL;
}
if (transport_manager::E_SUCCESS !=
transport_manager_->SendMessageToDevice(message_to_send)) {
LOG4CXX_WARN(logger_, "Can't send message to device");
+ LOG4CXX_TRACE_EXIT(logger_);
return RESULT_FAIL;
};
+
+ LOG4CXX_TRACE_EXIT(logger_);
return RESULT_OK;
}
RESULT_CODE ProtocolHandlerImpl::SendSingleFrameMessage(
- const ConnectionID connection_id, const uint8_t session_id,
- const uint32_t protocol_version, const uint8_t service_type,
- const size_t data_size, const uint8_t *data,
+ ConnectionID connection_id, const uint8_t session_id,
+ uint32_t protocol_version, const uint8_t service_type,
+ size_t data_size, const uint8_t *data,
const bool is_final_message) {
- LOG4CXX_AUTO_TRACE(logger_);
+ LOG4CXX_TRACE_ENTER(logger_);
ProtocolFramePtr ptr(new protocol_handler::ProtocolPacket(connection_id,
protocol_version, PROTECTION_OFF, FRAME_TYPE_SINGLE, service_type, FRAME_DATA_SINGLE,
@@ -554,15 +648,17 @@ RESULT_CODE ProtocolHandlerImpl::SendSingleFrameMessage(
raw_ford_messages_to_mobile_.PostMessage(
impl::RawFordMessageToMobile(ptr, is_final_message));
+
+ LOG4CXX_TRACE_EXIT(logger_);
return RESULT_OK;
}
RESULT_CODE ProtocolHandlerImpl::SendMultiFrameMessage(
- const ConnectionID connection_id, const uint8_t session_id,
- const uint8_t protocol_version, const uint8_t service_type,
+ ConnectionID connection_id, const uint8_t session_id,
+ uint32_t protocol_version, const uint8_t service_type,
const size_t data_size, const uint8_t *data,
const size_t maxdata_size, const bool is_final_message) {
- LOG4CXX_AUTO_TRACE(logger_);
+ LOG4CXX_TRACE_ENTER(logger_);
LOG4CXX_INFO_EXT(
logger_, " data size " << data_size << " maxdata_size " << maxdata_size);
@@ -624,34 +720,41 @@ RESULT_CODE ProtocolHandlerImpl::SendMultiFrameMessage(
raw_ford_messages_to_mobile_.PostMessage(
impl::RawFordMessageToMobile(ptr, is_final_packet));
}
+ LOG4CXX_TRACE_EXIT(logger_);
return RESULT_OK;
}
RESULT_CODE ProtocolHandlerImpl::HandleMessage(ConnectionID connection_id,
const ProtocolFramePtr packet) {
- LOG4CXX_AUTO_TRACE(logger_);
+ LOG4CXX_TRACE_ENTER(logger_);
switch (packet->frame_type()) {
case FRAME_TYPE_CONTROL:
LOG4CXX_TRACE(logger_, "handleMessage() - case FRAME_TYPE_CONTROL");
+ LOG4CXX_TRACE_EXIT(logger_);
return HandleControlMessage(connection_id, packet);
case FRAME_TYPE_SINGLE:
+ LOG4CXX_TRACE_EXIT(logger_);
return HandleSingleFrameMessage(connection_id, packet);
case FRAME_TYPE_FIRST:
case FRAME_TYPE_CONSECUTIVE:
LOG4CXX_TRACE(logger_, "handleMessage() - case FRAME_TYPE_CONSECUTIVE");
+ LOG4CXX_TRACE_EXIT(logger_);
return HandleMultiFrameMessage(connection_id, packet);
default: {
LOG4CXX_WARN(logger_, "handleMessage() - case unknown frame type"
<< packet->frame_type());
+ LOG4CXX_TRACE_EXIT(logger_);
return RESULT_FAIL;
}
}
+
+ LOG4CXX_TRACE_EXIT(logger_);
return RESULT_OK;
}
RESULT_CODE ProtocolHandlerImpl::HandleSingleFrameMessage(
ConnectionID connection_id, const ProtocolFramePtr packet) {
- LOG4CXX_AUTO_TRACE(logger_);
+ LOG4CXX_TRACE_ENTER(logger_);
LOG4CXX_INFO(logger_,
"FRAME_TYPE_SINGLE message of size " << packet->data_size() << "; message "
@@ -661,6 +764,7 @@ RESULT_CODE ProtocolHandlerImpl::HandleSingleFrameMessage(
LOG4CXX_ERROR(logger_,
"Cannot handle message from Transport"
<< " Manager: ISessionObserver doesn't exist.");
+ LOG4CXX_TRACE_EXIT(logger_);
return RESULT_FAIL;
}
@@ -675,6 +779,7 @@ RESULT_CODE ProtocolHandlerImpl::HandleSingleFrameMessage(
packet->service_type(),
packet->payload_size()));
if (!rawMessage) {
+ LOG4CXX_TRACE_EXIT(logger_);
return RESULT_FAIL;
}
#ifdef TIME_TESTER
@@ -690,15 +795,17 @@ RESULT_CODE ProtocolHandlerImpl::HandleSingleFrameMessage(
// TODO(EZamakhov): check service in session
NotifySubscribers(rawMessage);
+ LOG4CXX_TRACE_EXIT(logger_);
return RESULT_OK;
}
RESULT_CODE ProtocolHandlerImpl::HandleMultiFrameMessage(
ConnectionID connection_id, const ProtocolFramePtr packet) {
- LOG4CXX_AUTO_TRACE(logger_);
+ LOG4CXX_TRACE_ENTER(logger_);
if (!session_observer_) {
LOG4CXX_ERROR(logger_, "No ISessionObserver set.");
+ LOG4CXX_TRACE_EXIT(logger_);
return RESULT_FAIL;
}
@@ -721,6 +828,8 @@ RESULT_CODE ProtocolHandlerImpl::HandleMultiFrameMessage(
if (it == incomplete_multi_frame_messages_.end()) {
LOG4CXX_ERROR(
logger_, "Frame of multiframe message for non-existing session id");
+
+ LOG4CXX_TRACE_EXIT(logger_);
return RESULT_FAIL;
}
@@ -728,6 +837,8 @@ RESULT_CODE ProtocolHandlerImpl::HandleMultiFrameMessage(
!= RESULT_OK) {
LOG4CXX_ERROR(logger_,
"Failed to append frame for multiframe message.");
+
+ LOG4CXX_TRACE_EXIT(logger_);
return RESULT_FAIL;
}
@@ -742,6 +853,8 @@ RESULT_CODE ProtocolHandlerImpl::HandleMultiFrameMessage(
LOG4CXX_ERROR(
logger_,
"Cannot handle multiframe message: no IProtocolObserver is set.");
+
+ LOG4CXX_TRACE_EXIT(logger_);
return RESULT_FAIL;
}
}
@@ -765,6 +878,7 @@ RESULT_CODE ProtocolHandlerImpl::HandleMultiFrameMessage(
" payload_size " << completePacket->payload_size());
if (!rawMessage) {
+ LOG4CXX_TRACE_EXIT(logger_);
return RESULT_FAIL;
}
@@ -782,15 +896,18 @@ RESULT_CODE ProtocolHandlerImpl::HandleMultiFrameMessage(
incomplete_multi_frame_messages_.erase(it);
}
}
+
+ LOG4CXX_TRACE_EXIT(logger_);
return RESULT_OK;
}
RESULT_CODE ProtocolHandlerImpl::HandleControlMessage(
ConnectionID connection_id, const ProtocolFramePtr packet) {
- LOG4CXX_AUTO_TRACE(logger_);
+ LOG4CXX_TRACE_ENTER(logger_);
if (!session_observer_) {
LOG4CXX_ERROR(logger_, "ISessionObserver is not set.");
+ LOG4CXX_TRACE_EXIT(logger_);
return RESULT_FAIL;
}
@@ -802,6 +919,7 @@ RESULT_CODE ProtocolHandlerImpl::HandleControlMessage(
case FRAME_DATA_HEART_BEAT: {
LOG4CXX_DEBUG(logger_,
"Received heart beat for connection " << connection_id);
+ LOG4CXX_TRACE_EXIT(logger_);
return HandleControlMessageHeartBeat(connection_id, *(packet.get()));
}
case FRAME_DATA_HEART_BEAT_ACK: {
@@ -813,6 +931,7 @@ RESULT_CODE ProtocolHandlerImpl::HandleControlMessage(
LOG4CXX_WARN(logger_,
"Control message of type " << static_cast<int>(packet->frame_data())
<< " ignored");
+ LOG4CXX_TRACE_EXIT(logger_);
return RESULT_OK;
}
return RESULT_OK;
@@ -915,7 +1034,6 @@ class StartSessionHandler : public security_manager::SecurityManagerListener {
delete this;
return true;
}
-
private:
const uint32_t connection_key_;
ProtocolHandlerImpl *protocol_handler_;
@@ -1020,53 +1138,26 @@ RESULT_CODE ProtocolHandlerImpl::HandleControlMessageHeartBeat(
return RESULT_HEARTBEAT_IS_NOT_SUPPORTED;
}
-bool ProtocolHandlerImpl::TrackMessage(const uint32_t& connection_key) {
- LOG4CXX_AUTO_TRACE(logger_);
- const size_t message_frequency = message_meter_.TrackMessage(connection_key);
- LOG4CXX_DEBUG(logger_, "Frequency of " << connection_key << " is " << message_frequency);
- if (message_frequency > message_max_frequency_) {
- LOG4CXX_WARN(logger_, "Frequency of " << connection_key << " is marked as high.");
- session_observer_->OnApplicationFloodCallBack(connection_key);
- message_meter_.RemoveIdentifier(connection_key);
- return true;
- }
- return false;
-}
-
void ProtocolHandlerImpl::Handle(
const impl::RawFordMessageFromMobile message) {
- LOG4CXX_AUTO_TRACE(logger_);
+ LOG4CXX_TRACE_ENTER(logger_);
if (NULL == session_observer_) {
LOG4CXX_WARN(logger_, "Session Observer is NULL");
return;
}
-
- switch (message->service_type()) {
- case kMobileNav:
- case kAudio:
- break;
- default: {
- const uint32_t connection_key = session_observer_->KeyFromPair(
- message->connection_id(), message->session_id());
- if (TrackMessage(connection_key)) {
- return;
- }
- }
- break;
- }
-
connection_handler::ConnectionHandlerImpl *connection_handler =
connection_handler::ConnectionHandlerImpl::instance();
- LOG4CXX_DEBUG(logger_, "Message : " << message.get());
- const uint8_t c_id = message->connection_id();
- const uint32_t m_id = message->session_id();
+ LOG4CXX_INFO(logger_, "Message : " << message.get());
+ LOG4CXX_INFO(logger_, "session_observer_: " <<session_observer_);
+ uint8_t c_id = message->connection_id();
+ uint32_t m_id = message->session_id();
if (session_observer_->IsHeartBeatSupported(c_id, m_id)) {
- connection_handler->KeepConnectionAlive(c_id, m_id);
+ connection_handler->KeepConnectionAlive(message->connection_id(),
+ message->session_id());
}
- // TODO(EZamakhov): remove dublication of IncomingDataHandler logic
if (((0 != message->data()) && (0 != message->data_size())) ||
FRAME_TYPE_CONTROL == message->frame_type() ||
FRAME_TYPE_FIRST == message->frame_type()) {
@@ -1076,6 +1167,7 @@ void ProtocolHandlerImpl::Handle(
LOG4CXX_WARN(logger_,
"handleMessagesFromMobileApp() - incorrect or NULL data");
}
+ LOG4CXX_TRACE_EXIT(logger_);
}
void ProtocolHandlerImpl::Handle(const impl::RawFordMessageToMobile message) {
@@ -1095,14 +1187,8 @@ void ProtocolHandlerImpl::Handle(const impl::RawFordMessageToMobile message) {
SendFrame(message);
}
-void ProtocolHandlerImpl::Stop() {
- raw_ford_messages_from_mobile_.Shutdown();
- raw_ford_messages_to_mobile_.Shutdown();
-}
-
#ifdef ENABLE_SECURITY
-void ProtocolHandlerImpl::set_security_manager(
- security_manager::SecurityManager* security_manager) {
+void ProtocolHandlerImpl::set_security_manager(security_manager::SecurityManager* security_manager) {
if (!security_manager) {
LOG4CXX_ERROR(logger_, "Invalid (NULL) pointer to SecurityManager.");
return;
diff --git a/src/components/protocol_handler/src/protocol_packet.cc b/src/components/protocol_handler/src/protocol_packet.cc
index d40f13b5f0..19c73127cb 100644
--- a/src/components/protocol_handler/src/protocol_packet.cc
+++ b/src/components/protocol_handler/src/protocol_packet.cc
@@ -33,203 +33,55 @@
#include <stdint.h>
#include <memory.h>
#include <new>
-#include <cstring>
-#include <limits>
-
#include "protocol_handler/protocol_packet.h"
#include "utils/macro.h"
-#include "utils/byte_order.h"
namespace protocol_handler {
-ProtocolPacket::ProtocolData::ProtocolData()
- : data(NULL), totalDataBytes(0u) { }
-
-ProtocolPacket::ProtocolData::~ProtocolData() {
- delete[] data;
-}
-
-ProtocolPacket::ProtocolHeader::ProtocolHeader()
- : version(0x00),
- protection_flag(PROTECTION_OFF),
- frameType(0x00),
- serviceType(0x00),
- frameData(0x00),
- sessionId(0x00),
- dataSize(0x00),
- messageId(0x00) {
-}
-
-ProtocolPacket::ProtocolHeader::ProtocolHeader(
- uint8_t version, bool protection, uint8_t frameType, uint8_t serviceType,
- uint8_t frameData, uint8_t sessionID, uint32_t dataSize, uint32_t messageID)
- : version(version),
- protection_flag(protection),
- frameType(frameType),
- serviceType(serviceType),
- frameData(frameData),
- sessionId(sessionID),
- dataSize(dataSize),
- messageId(messageID) {
-}
-
-void ProtocolPacket::ProtocolHeader::deserialize(
- const uint8_t* message, const size_t messageSize) {
- if (messageSize < PROTOCOL_HEADER_V1_SIZE) {
- return;
- }
- // first 4 bits
- version = message[0] >> 4u;
- // 5th bit
- protection_flag = message[0] & 0x08u;
- // 6-8 bits
- frameType = message[0] & 0x07u;
-
- serviceType = message[1];
- frameData = message[2];
- sessionId = message[3];
-
- // FIXME(EZamakhov): usage for FirstFrame message
- const uint32_t data_size_be = *(reinterpret_cast<const uint32_t*>(message + 4));
- dataSize = BE_TO_LE32(data_size_be);
- switch (version) {
- case PROTOCOL_VERSION_2:
- case PROTOCOL_VERSION_3: {
- if (messageSize < PROTOCOL_HEADER_V2_SIZE) {
- return;
- }
- const uint32_t message_id_be =
- *(reinterpret_cast<const uint32_t*>(message + 8));
- messageId = BE_TO_LE32(message_id_be);
- }
- break;
- default:
- messageId = 0;
- break;
- }
-}
-
-ProtocolPacket::ProtocolHeaderValidator::ProtocolHeaderValidator()
- : max_payload_size_(std::numeric_limits<size_t>::max()) {}
-
-void ProtocolPacket::ProtocolHeaderValidator::set_max_payload_size(
- const size_t max_payload_size) {
- max_payload_size_ = max_payload_size;
-}
-
-size_t ProtocolPacket::ProtocolHeaderValidator::max_payload_size() const {
- return max_payload_size_;
-}
-
-RESULT_CODE ProtocolPacket::ProtocolHeaderValidator::validate(const ProtocolHeader& header) const {
- // Protocol version shall be from 1 to 3
- switch (header.version) {
- case PROTOCOL_VERSION_1:
- case PROTOCOL_VERSION_2:
- case PROTOCOL_VERSION_3:
- break;
- default:
- return RESULT_FAIL;
- }
- // ServiceType shall be equal 0x0 (Control), 0x07 (RPC), 0x0A (PCM), 0x0B (Video), 0x0F (Bulk)
- if (ServiceTypeFromByte(header.serviceType) == kInvalidServiceType) {
- return RESULT_FAIL;
- }
- // Check frame info for each frame type
- // Frame type shall be 0x00 (Control), 0x01 (Single), 0x02 (First), 0x03 (Consecutive)
- // For Control frames Frame info value shall be from 0x00 to 0x06 or 0xFE(Data Ack), 0xFF(HB Ack)
- // For Single and First frames Frame info value shall be equal 0x00
- switch (header.frameType) {
- case FRAME_TYPE_CONTROL : {
- switch (header.frameData) {
- case FRAME_DATA_HEART_BEAT:
- case FRAME_DATA_START_SERVICE:
- case FRAME_DATA_START_SERVICE_ACK:
- case FRAME_DATA_START_SERVICE_NACK:
- case FRAME_DATA_END_SERVICE:
- case FRAME_DATA_END_SERVICE_ACK:
- case FRAME_DATA_END_SERVICE_NACK:
- case FRAME_DATA_SERVICE_DATA_ACK:
- case FRAME_DATA_HEART_BEAT_ACK:
- break;
- default:
- return RESULT_FAIL;
- }
- break;
- }
- case FRAME_TYPE_SINGLE:
- if (header.frameData != FRAME_DATA_SINGLE) {
- return RESULT_FAIL;
- }
- break;
- case FRAME_TYPE_FIRST:
- if (header.frameData != FRAME_DATA_FIRST) {
- return RESULT_FAIL;
- }
- break;
- case FRAME_TYPE_CONSECUTIVE:
- // Could have any FrameInfo value
- break;
- default:
- // All other Frame type is invalid
- return RESULT_FAIL;
- }
- // For Control frames Data Size value shall be less than MTU header
- // For Single and Consecutive Data Size value shall be greater than 0x00
- // and shall be less than N (this value will be defined in .ini file)
- if (header.dataSize > max_payload_size_) {
- return RESULT_FAIL;
- }
- switch (header.frameType) {
- case FRAME_TYPE_SINGLE:
- case FRAME_TYPE_CONSECUTIVE:
- if (header.dataSize <= 0) {
- return RESULT_FAIL;
- }
- break;
- default:
- break;
- }
- // Message ID be equal or greater than 0x01 (not actual for 1 protocol version and Control frames)
- if (FRAME_TYPE_CONTROL != header.frameType && PROTOCOL_VERSION_1 != header.version
- && header.messageId <= 0) {
- // Message ID shall be greater than 0x00, but not implemented in SPT
- // TODO(EZamakhov): return on fix on mobile side - APPLINK-9990
- return RESULT_FAIL;
- }
- return RESULT_OK;
-}
-
-
ProtocolPacket::ProtocolPacket()
- : payload_size_(0), connection_id_(0) {
+ : payload_size_(0),
+ packet_id_(0),
+ connection_id_(0) {
}
-ProtocolPacket::ProtocolPacket(ConnectionID connection_id,
+ProtocolPacket::ProtocolPacket(uint8_t connection_id,
uint8_t version, bool protection,
uint8_t frameType,
uint8_t serviceType,
uint8_t frameData, uint8_t sessionID,
uint32_t dataSize, uint32_t messageID,
- const uint8_t *data)
+ const uint8_t *data,
+ uint32_t packet_id)
: packet_header_(version, protection, frameType, serviceType,
frameData, sessionID, dataSize, messageID),
- packet_data_(),
payload_size_(0),
+ packet_id_(packet_id),
connection_id_(connection_id) {
set_data(data, dataSize);
+ DCHECK(MAXIMUM_FRAME_DATA_SIZE >= dataSize);
}
-ProtocolPacket::ProtocolPacket(ConnectionID connection_id)
- : packet_header_(),
- packet_data_(),
- payload_size_(0),
+ProtocolPacket::ProtocolPacket(uint8_t connection_id, uint8_t *data_param,
+ uint32_t data_size)
+ : payload_size_(0),
+ packet_id_(0),
connection_id_(connection_id) {
+ RESULT_CODE result = deserializePacket(data_param, data_size);
+ if (result != RESULT_OK) {
+ //NOTREACHED();
+ }
+}
+
+ProtocolPacket::~ProtocolPacket() {
+ delete[] packet_data_.data;
}
// Serialization
RawMessagePtr ProtocolPacket::serializePacket() const {
- // TODO(EZamakhov): Move header serialization to ProtocolHeader
+ uint8_t *packet = new (std::nothrow) uint8_t[MAXIMUM_FRAME_DATA_SIZE];
+ if (!packet) {
+ return RawMessagePtr();
+ }
// version is low byte
const uint8_t version_byte = packet_header_.version << 4;
// protection is first bit of second byte
@@ -237,38 +89,30 @@ RawMessagePtr ProtocolPacket::serializePacket() const {
// frame type is last 3 bits of second byte
const uint8_t frame_type_byte = packet_header_.frameType & 0x07;
- uint8_t header[PROTOCOL_HEADER_V2_SIZE];
uint8_t offset = 0;
- header[offset++] = version_byte | protection_byte | frame_type_byte;
- header[offset++] = packet_header_.serviceType;
- header[offset++] = packet_header_.frameData;
- header[offset++] = packet_header_.sessionId;
+ packet[offset++] = version_byte | protection_byte | frame_type_byte;
+ packet[offset++] = packet_header_.serviceType;
+ packet[offset++] = packet_header_.frameData;
+ packet[offset++] = packet_header_.sessionId;
- header[offset++] = packet_header_.dataSize >> 24;
- header[offset++] = packet_header_.dataSize >> 16;
- header[offset++] = packet_header_.dataSize >> 8;
- header[offset++] = packet_header_.dataSize;
+ packet[offset++] = packet_header_.dataSize >> 24;
+ packet[offset++] = packet_header_.dataSize >> 16;
+ packet[offset++] = packet_header_.dataSize >> 8;
+ packet[offset++] = packet_header_.dataSize;
if (packet_header_.version != PROTOCOL_VERSION_1) {
- header[offset++] = packet_header_.messageId >> 24;
- header[offset++] = packet_header_.messageId >> 16;
- header[offset++] = packet_header_.messageId >> 8;
- header[offset++] = packet_header_.messageId;
- };
-
- size_t total_packet_size = offset + (packet_data_.data ? packet_data_.totalDataBytes : 0);
-#ifndef BUILD_TESTS // Remove DCHECK for PH tests
- DCHECK(total_packet_size <= MAXIMUM_FRAME_DATA_SIZE);
-#endif
-
- uint8_t *packet = new (std::nothrow) uint8_t[total_packet_size];
- if (!packet) {
- return RawMessagePtr();
+ packet[offset++] = packet_header_.messageId >> 24;
+ packet[offset++] = packet_header_.messageId >> 16;
+ packet[offset++] = packet_header_.messageId >> 8;
+ packet[offset++] = packet_header_.messageId;
}
- memcpy(packet, header, offset);
- if (packet_data_.data && packet_data_.totalDataBytes) {
+ DCHECK((offset + packet_data_.totalDataBytes) <= MAXIMUM_FRAME_DATA_SIZE);
+
+ size_t total_packet_size = offset;
+ if (packet_data_.data) {
memcpy(packet + offset, packet_data_.data, packet_data_.totalDataBytes);
+ total_packet_size += packet_data_.totalDataBytes;
}
const RawMessagePtr out_message(
@@ -280,10 +124,14 @@ RawMessagePtr ProtocolPacket::serializePacket() const {
return out_message;
}
+uint32_t ProtocolPacket::packet_id() const {
+ return packet_id_;
+}
+
RESULT_CODE ProtocolPacket::appendData(uint8_t *chunkData,
uint32_t chunkDataSize) {
if (payload_size_ + chunkDataSize <= packet_data_.totalDataBytes) {
- if (chunkData && chunkDataSize > 0) {
+ if (chunkData) {
if (packet_data_.data) {
memcpy(packet_data_.data + payload_size_, chunkData, chunkDataSize);
payload_size_ += chunkDataSize;
@@ -299,36 +147,39 @@ size_t ProtocolPacket::packet_size() const {
return packet_header_.dataSize;
}
-bool ProtocolPacket::operator==(const ProtocolPacket& other) const {
- if (connection_id_ == other.connection_id_ &&
- packet_header_.version == other.packet_header_.version &&
- packet_header_.protection_flag == other.packet_header_.protection_flag &&
- packet_header_.frameType == other.packet_header_.frameType &&
- packet_header_.serviceType == other.packet_header_.serviceType &&
- packet_header_.frameData == other.packet_header_.frameData &&
- packet_header_.sessionId == other.packet_header_.sessionId &&
- packet_header_.dataSize == other.packet_header_.dataSize &&
- packet_header_.messageId == other.packet_header_.messageId &&
- packet_data_.totalDataBytes == other.packet_data_.totalDataBytes) {
- if (other.packet_data_.totalDataBytes == 0) {
- return true;
- }
- // Compare payload data
- if (packet_data_.data && other.packet_data_.data &&
- 0 == memcmp(packet_data_.data, other.packet_data_.data,
- packet_data_.totalDataBytes)) {
- return true;
- }
+RESULT_CODE ProtocolPacket::deserializePacket(const uint8_t *message,
+ uint32_t messageSize) {
+ uint8_t offset = 0;
+ uint8_t firstByte = message[offset];
+ offset++;
+
+ packet_header_.version = firstByte >> 4u;
+
+ if (firstByte & 0x08u) {
+ packet_header_.protection_flag = true;
+ } else {
+ packet_header_.protection_flag = false;
}
- return false;
-}
-RESULT_CODE ProtocolPacket::deserializePacket(
- const uint8_t *message, const size_t messageSize) {
- packet_header_.deserialize(message, messageSize);
- const uint8_t offset =
- packet_header_.version == PROTOCOL_VERSION_1 ? PROTOCOL_HEADER_V1_SIZE
- : PROTOCOL_HEADER_V2_SIZE;
+ packet_header_.frameType = firstByte & 0x07u;
+
+ packet_header_.serviceType = message[offset++];
+ packet_header_.frameData = message[offset++];
+ packet_header_.sessionId = message[offset++];
+
+ packet_header_.dataSize = message[offset++] << 24u;
+ packet_header_.dataSize |= message[offset++] << 16u;
+ packet_header_.dataSize |= message[offset++] << 8u;
+ packet_header_.dataSize |= message[offset++];
+
+ if (packet_header_.version != PROTOCOL_VERSION_1) {
+ packet_header_.messageId = message[offset++] << 24u;
+ packet_header_.messageId |= message[offset++] << 16u;
+ packet_header_.messageId |= message[offset++] << 8u;
+ packet_header_.messageId |= message[offset++];
+ } else {
+ packet_header_.messageId = 0u;
+ }
packet_data_.totalDataBytes = packet_header_.dataSize;
@@ -338,14 +189,15 @@ RESULT_CODE ProtocolPacket::deserializePacket(
dataPayloadSize = messageSize - offset;
}
- uint8_t *data = NULL;
+ uint8_t *data = 0;
if (dataPayloadSize) {
data = new (std::nothrow) uint8_t[dataPayloadSize];
- if (!data) {
+ if (data) {
+ memcpy(data, message + offset, dataPayloadSize);
+ payload_size_ = dataPayloadSize;
+ } else {
return RESULT_FAIL;
}
- memcpy(data, message + offset, dataPayloadSize);
- payload_size_ = dataPayloadSize;
}
if (packet_header_.frameType == FRAME_TYPE_FIRST) {
@@ -360,7 +212,9 @@ RESULT_CODE ProtocolPacket::deserializePacket(
return RESULT_FAIL;
}
} else {
- delete[] packet_data_.data;
+ if (packet_data_.data) {
+ delete[] packet_data_.data;
+ }
packet_data_.data = data;
}
@@ -411,7 +265,8 @@ void ProtocolPacket::set_total_data_bytes(size_t dataBytes) {
if (dataBytes) {
delete[] packet_data_.data;
packet_data_.data = new (std::nothrow) uint8_t[dataBytes];
- packet_data_.totalDataBytes = packet_data_.data ? dataBytes : 0;
+ packet_data_.totalDataBytes =
+ packet_data_.data ? dataBytes : 0;
}
}
diff --git a/src/components/qt_hmi/References/Work/bananasnacks/qtquick2applicationviewer/qtquick2applicationviewer.h b/src/components/qt_hmi/References/Work/bananasnacks/qtquick2applicationviewer/qtquick2applicationviewer.h
index bd6c50f54f..baf67f2479 100644
--- a/src/components/qt_hmi/References/Work/bananasnacks/qtquick2applicationviewer/qtquick2applicationviewer.h
+++ b/src/components/qt_hmi/References/Work/bananasnacks/qtquick2applicationviewer/qtquick2applicationviewer.h
@@ -6,7 +6,7 @@
handled here.
It is recommended not to modify this file, since newer versions of Qt Creator
may offer an updated version of it.
- */
+*/
#ifndef QTQUICK2APPLICATIONVIEWER_H
#define QTQUICK2APPLICATIONVIEWER_H
diff --git a/src/components/qt_hmi/qml_model_qt5/controls/SoftButton.qml b/src/components/qt_hmi/qml_model_qt5/controls/SoftButton.qml
index b1b7f71799..0f3cfd7140 100644
--- a/src/components/qt_hmi/qml_model_qt5/controls/SoftButton.qml
+++ b/src/components/qt_hmi/qml_model_qt5/controls/SoftButton.qml
@@ -49,7 +49,7 @@ OvalButton {
highlighted: button ? button.isHighlighted : false
onPressed: {
actionOrder = SoftButton.Action.doOnClicked
- sdlButtons.onButtonEvent(Common.ButtonName.CUSTOM_BUTTON, Common.ButtonEventMode.BUTTONDOWN, button.softButtonID, appId)
+ sdlButtons.onButtonEvent(Common.ButtonName.CUSTOM_BUTTON, Common.ButtonEventMode.BUTTONDOWN, button.softButtonID)
}
onReleased: {
@@ -67,11 +67,11 @@ OvalButton {
}
}
- sdlButtons.onButtonEvent(Common.ButtonName.CUSTOM_BUTTON, Common.ButtonEventMode.BUTTONUP, button.softButtonID, appId)
+ sdlButtons.onButtonEvent(Common.ButtonName.CUSTOM_BUTTON, Common.ButtonEventMode.BUTTONUP, button.softButtonID)
}
onClicked: {
- sdlButtons.onButtonPress(Common.ButtonName.CUSTOM_BUTTON, Common.ButtonPressMode.SHORT, button.softButtonID, appId);
+ sdlButtons.onButtonPress(Common.ButtonName.CUSTOM_BUTTON, Common.ButtonPressMode.SHORT, button.softButtonID);
switch (button.systemAction) {
case Common.SystemAction.DEFAULT_ACTION:
defaultAction();
@@ -87,7 +87,7 @@ OvalButton {
onPressAndHold: {
actionOrder = SoftButton.Action.doOnReleased; // action should be triggered on release
- sdlButtons.onButtonPress(Common.ButtonName.CUSTOM_BUTTON, Common.ButtonPressMode.LONG, button.softButtonID, appId);
+ sdlButtons.onButtonPress(Common.ButtonName.CUSTOM_BUTTON, Common.ButtonPressMode.LONG, button.softButtonID);
}
onButtonChanged: {
diff --git a/src/components/qt_hmi/qml_model_qt5/hmi_api/UI.qml b/src/components/qt_hmi/qml_model_qt5/hmi_api/UI.qml
index 659b7842c6..d89747c3c0 100644
--- a/src/components/qt_hmi/qml_model_qt5/hmi_api/UI.qml
+++ b/src/components/qt_hmi/qml_model_qt5/hmi_api/UI.qml
@@ -203,7 +203,6 @@ Item {
"updateMode": Internal.MediaClockUpdateMode.MCU_COUNTUP,
"runningMode": Internal.MediaClockRunningMode.MCR_STOPPED,
"magic": Internal.stringToHmsTime(fieldSubstrings[Common.TextFieldName.mediaClock]),
- "startTime": Internal.stringToHmsTime(fieldSubstrings[Common.TextFieldName.mediaClock]),
"startTimeForProgress": -1
}
}
@@ -340,11 +339,7 @@ Item {
break
}
newStartTime = Internal.hmsTime(startTime.hours, startTime.minutes, startTime.seconds)
- newEndTime = endTime ? Internal.hmsTime(endTime.hours,
- endTime.minutes,
- endTime.seconds)
- : dataContainer.currentApplication.mediaClock.upperTimeLimit
-
+ newEndTime = endTime ? Internal.hmsTime(endTime.hours, endTime.minutes, endTime.seconds) : -1
newUpdateMode = Internal.MediaClockUpdateMode.MCU_COUNTUP
newRunningMode = Internal.MediaClockRunningMode.MCR_RUNNING
newStartTimeForProgress = Internal.hmsTime(startTime.hours, startTime.minutes, startTime.seconds)
@@ -358,7 +353,7 @@ Item {
break
}
newStartTime = Internal.hmsTime(startTime.hours, startTime.minutes, startTime.seconds)
- newEndTime = endTime ? Internal.hmsTime(endTime.hours, endTime.minutes, endTime.seconds) : 0
+ newEndTime = endTime ? Internal.hmsTime(endTime.hours, endTime.minutes, endTime.seconds) : -1
newUpdateMode = Internal.MediaClockUpdateMode.MCU_COUNTDOWN
newRunningMode = Internal.MediaClockRunningMode.MCR_RUNNING
newStartTimeForProgress = Internal.hmsTime(startTime.hours, startTime.minutes, startTime.seconds)
@@ -377,7 +372,7 @@ Item {
newEndTime = app.mediaClock.endTime
newRunningMode = Internal.MediaClockRunningMode.MCR_STOPPED
newUpdateMode = app.mediaClock.updateMode
- newStartTimeForProgress = app.mediaClock.startTimeForProgress
+ newStartTimeForProgress = app.mediaClock.startTime
resultCode = Common.Result.SUCCESS
break
@@ -392,7 +387,7 @@ Item {
newStartTime = app.mediaClock.startTime
newEndTime = app.mediaClock.endTime
newRunningMode = Internal.MediaClockRunningMode.MCR_RUNNING
- newStartTimeForProgress = app.mediaClock.startTimeForProgress
+ newStartTimeForProgress = app.mediaClock.startTime
newUpdateMode = app.mediaClock.updateMode
resultCode = Common.Result.SUCCESS
break
@@ -636,7 +631,7 @@ Item {
}
}
- function performAudioPassThru (appID, audioPassThruDisplayTexts, timeout) {
+ function performAudioPassThru (audioPassThruDisplayTexts, timeout, appID) {
var displayTextsLog = "";
if (audioPassThruDisplayTexts) {
for (var i = 0; i < audioPassThruDisplayTexts.length; i++) {
diff --git a/src/components/qt_hmi/qml_model_qt5/hmi_api/VR.qml b/src/components/qt_hmi/qml_model_qt5/hmi_api/VR.qml
index 8158b3271e..8a426197e2 100644
--- a/src/components/qt_hmi/qml_model_qt5/hmi_api/VR.qml
+++ b/src/components/qt_hmi/qml_model_qt5/hmi_api/VR.qml
@@ -34,6 +34,7 @@
import QtQuick 2.0
import "Common.js" as Common
+
Item {
function isReady() {
console.log("Message Received - {method: 'VR.IsReady'}")
@@ -42,7 +43,7 @@ Item {
}
}
- function addCommand(cmdID, vrCommands, type, grammarID, appID) {
+ function addCommand(cmdID, vrCommands, appID) {
var vrCommandsLog = "";
if (vrCommands) {
for (var i = 0; i < vrCommands.length; i++) {
@@ -52,29 +53,14 @@ Item {
console.log("Message Received - {method: 'VR.AddCommand', params:{ " +
"vrCommands: [" + vrCommandsLog + "], " +
"cmdID: " + cmdID + ", " +
- "appID: " + appID + ", " +
- "type: " + type + ", " +
- "grammarID: " + grammarID +
+ "appID: " + appID +
"}}")
for (var i = 0; i < vrCommands.length; ++i) {
- if (type === Common.VRCommandType.Command) {
- dataContainer.vrCommands.append({
+ dataContainer.vrCommands.append({
cmdID: cmdID,
command: vrCommands[i],
appID: appID === undefined ? 0 : appID,
- type: type,
- grammarID: grammarID,
});
- }
- else {
- dataContainer.choicesVrCommands.append({
- cmdID: cmdID,
- command: vrCommands[i],
- appID: appID === undefined ? 0 : appID,
- type: type,
- grammarID: grammarID,
- });
- }
}
console.log("exit")
}
@@ -125,46 +111,4 @@ Item {
dataContainer.changeRegistrationTTSVR(language, appID);
console.debug("exit");
}
- function ttsChunksToString(ttsChunks){
- return ttsChunks.map(function(str) { return str.text }).join('\n')
- }
- function performInteraction(helpPrompt, initialPrompt, timeoutPrompt, timeout, grammarID) {
- console.debug("enter");
- var helpttsChunksLog = "",
- initialttsChunkLog = "",
- timeoutttsChunkLog = "",
- grammarIDLog ="";
-
- if (helpPrompt) {
- for (var i = 0; i < helpPrompt.length; i++) {
- helpttsChunksLog += "{type: " + helpPrompt[i].type + ", " +
- "text: '" + helpPrompt[i].text + "'}, ";
- }
- }
- if (initialPrompt) {
- for (var i = 0; i < initialPrompt.length; i++) {
- initialttsChunkLog += "{type: " + initialPrompt[i].type + ", " +
- "text: '" + initialPrompt[i].text + "'}, ";
- }
- }
- if (timeoutPrompt) {
- for (var i = 0; i < timeoutPrompt.length; i++) {
- timeoutttsChunkLog += "{type: " + timeoutPrompt[i].type + ", " +
- "text: '" + timeoutPrompt[i].text + "'}, ";
- }
- }
- console.log("Message Received - {method: 'TTS.PerformInteraction', params:{ " +
- "helpPrompt: [" + helpttsChunksLog + "], " +
- "initialPrompt: [" + initialttsChunkLog + "], " +
- "timeoutPrompt: [" + timeoutttsChunkLog + "], " +
- "timeout: " + timeout +
- "}}")
-
- ttsPopUp.performInteraction(ttsChunksToString(helpPrompt),
- ttsChunksToString(initialPrompt),
- ttsChunksToString(timeoutPrompt),
- timeout)
- interactionPopup.grammarID = grammarID
- console.debug("exit");
- }
}
diff --git a/src/components/qt_hmi/qml_model_qt5/models/DataStorage.qml b/src/components/qt_hmi/qml_model_qt5/models/DataStorage.qml
index e3785bdf19..659a8eabd7 100644
--- a/src/components/qt_hmi/qml_model_qt5/models/DataStorage.qml
+++ b/src/components/qt_hmi/qml_model_qt5/models/DataStorage.qml
@@ -442,8 +442,7 @@ QtObject {
property ListModel deviceList: ListModel { }
property ListModel applicationList: ListModel { }
property ListModel stashedApplicationsList: ListModel { }
- property ListModel vrCommands: ListModel { }
- property ListModel choicesVrCommands: ListModel { }
+ property ListModel vrCommands: ListModel {}
function reset () {
console.log("dataContainer reset enter");
diff --git a/src/components/qt_hmi/qml_model_qt5/models/MediaClockModel.qml b/src/components/qt_hmi/qml_model_qt5/models/MediaClockModel.qml
index 3712ca4c31..cae82c36f1 100644
--- a/src/components/qt_hmi/qml_model_qt5/models/MediaClockModel.qml
+++ b/src/components/qt_hmi/qml_model_qt5/models/MediaClockModel.qml
@@ -73,22 +73,28 @@ QtObject {
function onTimer () {
switch (updateMode) {
case Internal.MediaClockUpdateMode.MCU_COUNTUP:
- console.debug("count up")
- if (startTime < endTime) {
- startTime++
+ if (endTime !== -1) {
+ if (startTime < endTime) {
+ startTime++
+ } else {
+ timer.stop()
+ runningMode = Internal.MediaClockRunningMode.MCR_STOPPED
+ console.debug("count Up timer stopped")
+ }
} else {
- timer.stop()
- runningMode = Internal.MediaClockRunningMode.MCR_STOPPED
- console.debug("count Up timer stopped")
+ if (startTime < upperTimeLimit) {
+ startTime++
+ } else {
+ startTime = 0
+ }
}
break
case Internal.MediaClockUpdateMode.MCU_COUNTDOWN:
console.debug("count down")
- if (startTime > endTime) {
- startTime--
- } else {
+ if (--startTime === 0) {
timer.stop()
runningMode = Internal.MediaClockRunningMode.MCR_STOPPED
+ startTime = endTime = -1
console.debug("count Down timer stopped")
}
break
@@ -106,12 +112,13 @@ QtObject {
function onProgress () {
if (startTime === -1) {
progress = 0
- }
- else if (endTime != -1 && endTime === startTimeForProgress) {
- progress = 1
- }
- else {
- progress = (startTime - startTimeForProgress) / (endTime - startTimeForProgress)
+ } else {
+ if (updateMode === Internal.MediaClockUpdateMode.MCU_COUNTUP) {
+ progress = (endTime !== -1) ? (startTime / endTime) : (startTime / upperTimeLimit)
+ } else {
+ progress = (endTime !== -1) ? ( (startTime - endTime) / (startTimeForProgress - endTime) )
+ : (startTime / startTimeForProgress)
+ }
}
}
}
diff --git a/src/components/qt_hmi/qml_model_qt5/popups/InteractionPopup.qml b/src/components/qt_hmi/qml_model_qt5/popups/InteractionPopup.qml
index a6fc4d7107..782fd76c18 100644
--- a/src/components/qt_hmi/qml_model_qt5/popups/InteractionPopup.qml
+++ b/src/components/qt_hmi/qml_model_qt5/popups/InteractionPopup.qml
@@ -46,7 +46,6 @@ ContextPopup {
property int appID
property int interactionLayout
property var async
- property var grammarID
property bool performInteractionIsActiveNow
Text {
@@ -85,15 +84,13 @@ ContextPopup {
}
}
- function performInteraction(initialTextArg, choiceSet, vrHelpTitle, vrHelp, timeout, interactionLayout, appID) {
+ function performInteraction(initialText, choiceSet, vrHelpTitle, vrHelp, timeout, interactionLayout, appID) {
console.debug("enter")
var app = dataContainer.getApplication(appID)
var dataToUpdate = {}
performInteractionIsActiveNow = true
- if (initialTextArg !== undefined){
- initialText.text = initialTextArg.fieldText
- }
+ initialText.text = initialText.fieldText
this.timeout = timeout
this.appID = appID
@@ -126,8 +123,6 @@ ContextPopup {
async = new Async.AsyncCall()
if (piPopUp.choiceSet.count !== 0) {
activate()
- }else if (grammarID) {
- vrActivate()
}
console.debug("exit")
return async
@@ -137,21 +132,9 @@ ContextPopup {
console.debug("enter")
timer.interval = timeout
timer.start()
- if (grammarID) {
- vrPopUp.sortModelforPerformInteraction()
- }
show()
console.debug("exit")
}
- function vrActivate () {
- console.debug("enter")
- timer.interval = timeout
- timer.start()
- vrPopUp.sortModelforPerformInteraction()
- vrPopUp.show()
- vrHelpPopup.show()
- console.debug("exit")
- }
function complete (reason, data) {
console.debug("enter")
@@ -167,7 +150,6 @@ ContextPopup {
break
}
timer.stop()
- grammarID = ""
hide()
performInteractionIsActiveNow = false
console.debug("exit")
diff --git a/src/components/qt_hmi/qml_model_qt5/popups/TTSPopUp.qml b/src/components/qt_hmi/qml_model_qt5/popups/TTSPopUp.qml
index d16015ec56..33f82013b2 100644
--- a/src/components/qt_hmi/qml_model_qt5/popups/TTSPopUp.qml
+++ b/src/components/qt_hmi/qml_model_qt5/popups/TTSPopUp.qml
@@ -42,7 +42,6 @@ PopUp {
width: Constants.ttsPopUpWidth
padding: Constants.ttsPopUpPadding
property var async
- property string helpPromptstr
ScrollView {
anchors.fill: parent
@@ -51,7 +50,6 @@ PopUp {
anchors.fill: parent
color: Constants.popUpBorderColor
font.pixelSize: Constants.ttsFontSize
- text:""
}
}
@@ -65,16 +63,12 @@ PopUp {
Timer {
id: ttsPerformInteractionTimer
interval: Constants.ttsSpeakTime
- onTriggered:
- if(interactionPopup.performInteractionIsActiveNow)
- activate(message)
+ onTriggered: activate(message)
property var message: undefined
}
]
function performInteraction(helpPrompt, initialPrompt, timeoutPrompt, timeout) {
- console.debug("Activate TTS popup:", "message");
- helpPromptstr = helpPrompt
activate(initialPrompt);
if (timeout * 2 - Constants.ttsSpeakTime > 0) {
ttsPerformInteractionTimer.message = timeoutPrompt;
diff --git a/src/components/qt_hmi/qml_model_qt5/popups/VRPopUp.qml b/src/components/qt_hmi/qml_model_qt5/popups/VRPopUp.qml
index ed33e5ca8d..2acf4f0651 100644
--- a/src/components/qt_hmi/qml_model_qt5/popups/VRPopUp.qml
+++ b/src/components/qt_hmi/qml_model_qt5/popups/VRPopUp.qml
@@ -57,47 +57,22 @@ PopUp {
anchors.right: parent.right
source: "../res/controlButtons/vrImage.png"
}
- OvalButton{
- id:helpButton
- anchors.rightMargin: Constants.popupMargin
- anchors.leftMargin: Constants.popupMargin
- anchors.top: voice.bottom
- anchors.left: parent.left
- anchors.right: parent.right
- text: "Help"
- onClicked:{
- if (interactionPopup.performInteractionIsActiveNow)
- ttsPopUp.activate(ttsPopUp.helpPromptstr)
- if (dataContainer.activeVR) {
- vrPopUp.complete();
- vrHelpPopup.hide()
- }
- }
- }
ScrollableListView {
anchors.bottomMargin: Constants.popupMargin
anchors.rightMargin: Constants.popupMargin
anchors.leftMargin: Constants.popupMargin
- anchors.top: helpButton.bottom
+ anchors.top: voice.bottom
anchors.right: parent.right
anchors.bottom: parent.bottom
anchors.left: parent.left
- model: if (interactionPopup.grammarID) {
- dataContainer.choicesVrCommands
- }
- else {
- dataContainer.vrCommands
- }
+ model: dataContainer.vrCommands
delegate: OvalButton {
width: parent.width
text: command
- visible: visibleButtons(grammarID,type)
onClicked: {
- if (interactionPopup.performInteractionIsActiveNow && type === Common.VRCommandType.Choice)
- interactionPopup.complete(Common.Result.SUCCESS, {"choiceID": cmdID})
sdlVR.onCommand(cmdID, appID === 0 ? undefined : appID);
if (dataContainer.activeVR) {
vrPopUp.complete();
@@ -118,41 +93,4 @@ PopUp {
sdlVR.stopped();
hide();
}
-
- function sortModelforPerformInteraction() {
- var n,
- i,
- j;
- for (n = 0; n < dataContainer.choicesVrCommands.count; n++) {
- for (i = n + 1; i < dataContainer.choicesVrCommands.count; i++) {
- if (dataContainer.choicesVrCommands.get(n).type === Common.VRCommandType.Command &&
- dataContainer.choicesVrCommands.get(i).type === Common.VRCommandType.Choice) {
- dataContainer.choicesVrCommands.move(i, n, 1);
- n = 0;
- }
- }
- }
- for (j = interactionPopup.grammarID.length; j > 0; j--) {
- for (n = 0; n < dataContainer.choicesVrCommands.count &&
- dataContainer.choicesVrCommands.get(n).type === Common.VRCommandType.Choice; n++) {
- for (i = n + 1; i < dataContainer.choicesVrCommands.count &&
- dataContainer.choicesVrCommands.get(i).type === Common.VRCommandType.Choice; i++) {
- if (dataContainer.choicesVrCommands.get(n).grammarID !== interactionPopup.grammarID[j-1]
- && dataContainer.choicesVrCommands.get(i).grammarID === interactionPopup.grammarID[j-1]) {
- dataContainer.choicesVrCommands.move(i, n, 1);
- n = 0;
- }
- }
- }
- }
- }
-
- function visibleButtons(grammarID, type) {
- if (interactionPopup.grammarID) {
- return interactionPopup.grammarID.indexOf(grammarID) !== -1
- }
- else {
- return type === Common.VRCommandType.Command
- }
- }
}
diff --git a/src/components/qt_hmi/qml_model_qt5/views/SDLPlayerOptionsListView.qml b/src/components/qt_hmi/qml_model_qt5/views/SDLPlayerOptionsListView.qml
index e249a5eb76..8f3a0a17b6 100644
--- a/src/components/qt_hmi/qml_model_qt5/views/SDLPlayerOptionsListView.qml
+++ b/src/components/qt_hmi/qml_model_qt5/views/SDLPlayerOptionsListView.qml
@@ -94,7 +94,6 @@ GeneralView {
case Internal.MenuItemType.MI_NODE:
sdlUI.onCommand(model.id, dataContainer.currentApplication.appId)
contentLoader.back()
- dataContainer.currentApplication.currentSubMenu = dataContainer.currentApplication.options
break;
case Internal.MenuItemType.MI_SUBMENU:
case Internal.MenuItemType.MI_PARENT:
diff --git a/src/components/qt_hmi/qml_model_qt5/views/ScrollableMessageView.qml b/src/components/qt_hmi/qml_model_qt5/views/ScrollableMessageView.qml
index 0dcb7a3b32..895ebbf879 100644
--- a/src/components/qt_hmi/qml_model_qt5/views/ScrollableMessageView.qml
+++ b/src/components/qt_hmi/qml_model_qt5/views/ScrollableMessageView.qml
@@ -94,10 +94,6 @@ GeneralView {
dataContainer.scrollableMessageModel.result = Common.Result.ABORTED
contentLoader.back()
}
- onStealFocus: {
- dataContainer.scrollableMessageModel.result = Common.Result.SUCCESS
- contentLoader.back()
- }
}
}
}
diff --git a/src/components/qt_hmi/qml_plugins/dbus_adapter/dbus_controller.cc b/src/components/qt_hmi/qml_plugins/dbus_adapter/dbus_controller.cc
index d026f4bbb5..abfe712398 100644
--- a/src/components/qt_hmi/qml_plugins/dbus_adapter/dbus_controller.cc
+++ b/src/components/qt_hmi/qml_plugins/dbus_adapter/dbus_controller.cc
@@ -1,4 +1,4 @@
-/*
+/**
* \file dbus_controller.cpp
* \brief DbusController class.
* Copyright (c) 2013, Ford Motor Company
diff --git a/src/components/qt_hmi/qml_plugins/dbus_adapter/dbus_controller.h b/src/components/qt_hmi/qml_plugins/dbus_adapter/dbus_controller.h
index ecda598670..45b6a4e7fe 100644
--- a/src/components/qt_hmi/qml_plugins/dbus_adapter/dbus_controller.h
+++ b/src/components/qt_hmi/qml_plugins/dbus_adapter/dbus_controller.h
@@ -1,4 +1,4 @@
-/*
+/**
* \file dbus_controller.h
* \brief DbusController class header file.
* Copyright (c) 2013, Ford Motor Company
diff --git a/src/components/qt_hmi/qml_plugins/dbus_adapter/dbus_plugin.cc b/src/components/qt_hmi/qml_plugins/dbus_adapter/dbus_plugin.cc
index 0f41a28e73..c264a42a8b 100644
--- a/src/components/qt_hmi/qml_plugins/dbus_adapter/dbus_plugin.cc
+++ b/src/components/qt_hmi/qml_plugins/dbus_adapter/dbus_plugin.cc
@@ -1,4 +1,4 @@
-/*
+/**
* \file dbus_plugin.cpp
* \brief DbusPlugin class source file.
* Copyright (c) 2013, Ford Motor Company
diff --git a/src/components/qt_hmi/qml_plugins/dbus_adapter/dbus_plugin.h b/src/components/qt_hmi/qml_plugins/dbus_adapter/dbus_plugin.h
index ef2a925956..4d145d09b4 100644
--- a/src/components/qt_hmi/qml_plugins/dbus_adapter/dbus_plugin.h
+++ b/src/components/qt_hmi/qml_plugins/dbus_adapter/dbus_plugin.h
@@ -1,4 +1,4 @@
-/*
+/**
* \file dbus_plugin.h
* \brief DbusPlugin class header file.
* Copyright (c) 2013, Ford Motor Company
diff --git a/src/components/qt_hmi/qml_plugins/dbus_adapter/hmi_proxy.cc b/src/components/qt_hmi/qml_plugins/dbus_adapter/hmi_proxy.cc
index 8b6cfd57d4..bd9e6efea9 100644
--- a/src/components/qt_hmi/qml_plugins/dbus_adapter/hmi_proxy.cc
+++ b/src/components/qt_hmi/qml_plugins/dbus_adapter/hmi_proxy.cc
@@ -1,4 +1,4 @@
-/*
+/**
* \file hmiproxy.cpp
* \brief HmiProxy class source file.
* Copyright (c) 2013, Ford Motor Company
diff --git a/src/components/qt_hmi/qml_plugins/dbus_adapter/hmi_proxy.h b/src/components/qt_hmi/qml_plugins/dbus_adapter/hmi_proxy.h
index 886d523157..7fa0e49bf8 100644
--- a/src/components/qt_hmi/qml_plugins/dbus_adapter/hmi_proxy.h
+++ b/src/components/qt_hmi/qml_plugins/dbus_adapter/hmi_proxy.h
@@ -1,4 +1,4 @@
-/*
+/**
* \file hmiproxy.h
* \brief HmiProxy class header file.
* Copyright (c) 2013, Ford Motor Company
diff --git a/src/components/qt_hmi/qml_plugins/dbus_adapter/metatype.h b/src/components/qt_hmi/qml_plugins/dbus_adapter/metatype.h
index 5224da7f55..6f2b54fc57 100644
--- a/src/components/qt_hmi/qml_plugins/dbus_adapter/metatype.h
+++ b/src/components/qt_hmi/qml_plugins/dbus_adapter/metatype.h
@@ -1,4 +1,4 @@
-/*
+/**
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
diff --git a/src/components/qt_hmi/qml_plugins/dbus_adapter/optional_argument.h b/src/components/qt_hmi/qml_plugins/dbus_adapter/optional_argument.h
index b9360c3eb4..79dfdd1838 100644
--- a/src/components/qt_hmi/qml_plugins/dbus_adapter/optional_argument.h
+++ b/src/components/qt_hmi/qml_plugins/dbus_adapter/optional_argument.h
@@ -1,4 +1,4 @@
-/*
+/**
* \file optional_argument.h
* \brief OptionalArgument struct header file.
* Copyright (c) 2013, Ford Motor Company
diff --git a/src/components/qt_hmi/qml_plugins/dbus_adapter/qml_dbus_common.h b/src/components/qt_hmi/qml_plugins/dbus_adapter/qml_dbus_common.h
index eb9b93929f..6148da71f5 100644
--- a/src/components/qt_hmi/qml_plugins/dbus_adapter/qml_dbus_common.h
+++ b/src/components/qt_hmi/qml_plugins/dbus_adapter/qml_dbus_common.h
@@ -1,4 +1,4 @@
-/*
+/**
* \file qml_dbus_common.h
* \brief Contain utilities for DBus plugin.
* Copyright (c) 2013, Ford Motor Company
diff --git a/src/components/qt_hmi/qml_plugins/dbus_adapter/qt_version.h b/src/components/qt_hmi/qml_plugins/dbus_adapter/qt_version.h
index 4eff83bd5b..cbad38ed5e 100644
--- a/src/components/qt_hmi/qml_plugins/dbus_adapter/qt_version.h
+++ b/src/components/qt_hmi/qml_plugins/dbus_adapter/qt_version.h
@@ -1,4 +1,4 @@
-/*
+/**
* @file qt_version.h
* @brief Defines for check Qt version.
* Copyright (c) 2013, Ford Motor Company
diff --git a/src/components/qt_hmi/qml_plugins/dbus_adapter/stream_qvariant.cc b/src/components/qt_hmi/qml_plugins/dbus_adapter/stream_qvariant.cc
index b60f5226c4..a1ae3402c4 100644
--- a/src/components/qt_hmi/qml_plugins/dbus_adapter/stream_qvariant.cc
+++ b/src/components/qt_hmi/qml_plugins/dbus_adapter/stream_qvariant.cc
@@ -1,4 +1,4 @@
-/*
+/**
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
diff --git a/src/components/qt_hmi/qml_plugins/dbus_adapter/stream_qvariant.h b/src/components/qt_hmi/qml_plugins/dbus_adapter/stream_qvariant.h
index 0d0e279b87..675b6d069e 100644
--- a/src/components/qt_hmi/qml_plugins/dbus_adapter/stream_qvariant.h
+++ b/src/components/qt_hmi/qml_plugins/dbus_adapter/stream_qvariant.h
@@ -1,4 +1,4 @@
-/*
+/**
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
diff --git a/src/components/qt_hmi/qml_plugins/hw_buttons/attributed_mouse_event.cc b/src/components/qt_hmi/qml_plugins/hw_buttons/attributed_mouse_event.cc
index bcde90930f..42e2e4f370 100644
--- a/src/components/qt_hmi/qml_plugins/hw_buttons/attributed_mouse_event.cc
+++ b/src/components/qt_hmi/qml_plugins/hw_buttons/attributed_mouse_event.cc
@@ -1,4 +1,4 @@
-/*
+/**
* \file attributed_mouse_event.cpp
* \brief AttributedMouseEvent class source file.
* Copyright (c) 2013, Ford Motor Company
diff --git a/src/components/qt_hmi/qml_plugins/hw_buttons/attributed_mouse_event.h b/src/components/qt_hmi/qml_plugins/hw_buttons/attributed_mouse_event.h
index 2d2babc29f..b058e28f28 100644
--- a/src/components/qt_hmi/qml_plugins/hw_buttons/attributed_mouse_event.h
+++ b/src/components/qt_hmi/qml_plugins/hw_buttons/attributed_mouse_event.h
@@ -1,4 +1,4 @@
-/*
+/**
* \file attributed_mouse_event.h
* \brief AttributedMouseEvent class header file.
* Copyright (c) 2013, Ford Motor Company
diff --git a/src/components/qt_hmi/qml_plugins/hw_buttons/hmi_hwbuttons.cc b/src/components/qt_hmi/qml_plugins/hw_buttons/hmi_hwbuttons.cc
index bf63c12cb1..9f4f3b611c 100644
--- a/src/components/qt_hmi/qml_plugins/hw_buttons/hmi_hwbuttons.cc
+++ b/src/components/qt_hmi/qml_plugins/hw_buttons/hmi_hwbuttons.cc
@@ -1,4 +1,4 @@
-/*
+/**
* \file hmi_hwbuttons.cpp
* \brief HmiHWButtons class source file.
* Copyright (c) 2013, Ford Motor Company
diff --git a/src/components/qt_hmi/qml_plugins/hw_buttons/hmi_hwbuttons.h b/src/components/qt_hmi/qml_plugins/hw_buttons/hmi_hwbuttons.h
index cf8f0b5f4b..ee5fa53021 100644
--- a/src/components/qt_hmi/qml_plugins/hw_buttons/hmi_hwbuttons.h
+++ b/src/components/qt_hmi/qml_plugins/hw_buttons/hmi_hwbuttons.h
@@ -1,4 +1,4 @@
-/*
+/**
* \file hmi_hwbuttons.h
* \brief HmiHWButtons class header file.
* Copyright (c) 2013, Ford Motor Company
diff --git a/src/components/qt_hmi/qml_plugins/hw_buttons/masked_container.cc b/src/components/qt_hmi/qml_plugins/hw_buttons/masked_container.cc
index 0d144ff84c..aee3afbbdf 100644
--- a/src/components/qt_hmi/qml_plugins/hw_buttons/masked_container.cc
+++ b/src/components/qt_hmi/qml_plugins/hw_buttons/masked_container.cc
@@ -1,4 +1,4 @@
-/*
+/**
* \file masked_container.cpp
* \brief MaskedContainer class source file.
* Copyright (c) 2013, Ford Motor Company
diff --git a/src/components/qt_hmi/qml_plugins/hw_buttons/masked_container.h b/src/components/qt_hmi/qml_plugins/hw_buttons/masked_container.h
index 0048bdda2a..30e145aa35 100644
--- a/src/components/qt_hmi/qml_plugins/hw_buttons/masked_container.h
+++ b/src/components/qt_hmi/qml_plugins/hw_buttons/masked_container.h
@@ -1,4 +1,4 @@
-/*
+/**
* \file masked_container.h
* \brief MaskedContainer class header file.
* Copyright (c) 2013, Ford Motor Company
diff --git a/src/components/qt_hmi/qml_plugins/hw_buttons/qt_version.h b/src/components/qt_hmi/qml_plugins/hw_buttons/qt_version.h
index fb2751504d..6a277e3867 100644
--- a/src/components/qt_hmi/qml_plugins/hw_buttons/qt_version.h
+++ b/src/components/qt_hmi/qml_plugins/hw_buttons/qt_version.h
@@ -1,4 +1,4 @@
-/*
+/**
* @file qt_version.h
* @brief Defines for check Qt version.
* Copyright (c) 2013, Ford Motor Company
diff --git a/src/components/qt_hmi/qml_plugins/log4cxx/log4cxx_plugin.cc b/src/components/qt_hmi/qml_plugins/log4cxx/log4cxx_plugin.cc
index da863e2e26..19eec36651 100644
--- a/src/components/qt_hmi/qml_plugins/log4cxx/log4cxx_plugin.cc
+++ b/src/components/qt_hmi/qml_plugins/log4cxx/log4cxx_plugin.cc
@@ -1,4 +1,4 @@
-/*
+/**
* @file log4cxx_plugin.cpp
* @brief Log4cxxPlugin class header file.
* Copyright (c) 2013, Ford Motor Company
diff --git a/src/components/qt_hmi/qml_plugins/log4cxx/log4cxx_plugin.h b/src/components/qt_hmi/qml_plugins/log4cxx/log4cxx_plugin.h
index fc82352f0c..00e136cf76 100644
--- a/src/components/qt_hmi/qml_plugins/log4cxx/log4cxx_plugin.h
+++ b/src/components/qt_hmi/qml_plugins/log4cxx/log4cxx_plugin.h
@@ -1,4 +1,4 @@
-/*
+/**
* @file log4cxx_plugin.h
* @brief Log4cxxPlugin class header file.
* Copyright (c) 2013, Ford Motor Company
diff --git a/src/components/qt_hmi/qml_plugins/named_pipe_notifier/named_pipe_notifier.cc b/src/components/qt_hmi/qml_plugins/named_pipe_notifier/named_pipe_notifier.cc
index f51db76b99..e231124fe8 100644
--- a/src/components/qt_hmi/qml_plugins/named_pipe_notifier/named_pipe_notifier.cc
+++ b/src/components/qt_hmi/qml_plugins/named_pipe_notifier/named_pipe_notifier.cc
@@ -1,4 +1,4 @@
-/*
+/**
* @file named_pipe_notifier.cc
* @brief NamedPipeNotifier class implementation file.
* Copyright (c) 2013, Ford Motor Company
diff --git a/src/components/qt_hmi/qml_plugins/named_pipe_notifier/named_pipe_notifier.h b/src/components/qt_hmi/qml_plugins/named_pipe_notifier/named_pipe_notifier.h
index 993bb3cb31..14bacd9b6f 100644
--- a/src/components/qt_hmi/qml_plugins/named_pipe_notifier/named_pipe_notifier.h
+++ b/src/components/qt_hmi/qml_plugins/named_pipe_notifier/named_pipe_notifier.h
@@ -1,4 +1,4 @@
-/*
+/**
* \file named_pipe_notifier.h
* \brief NamedPipeNotifier class header file.
* Copyright (c) 2013, Ford Motor Company
diff --git a/src/components/qt_hmi/qml_plugins/named_pipe_notifier/named_pipe_notifier_plugin.cc b/src/components/qt_hmi/qml_plugins/named_pipe_notifier/named_pipe_notifier_plugin.cc
index 8aa2b4cf76..a423434c17 100644
--- a/src/components/qt_hmi/qml_plugins/named_pipe_notifier/named_pipe_notifier_plugin.cc
+++ b/src/components/qt_hmi/qml_plugins/named_pipe_notifier/named_pipe_notifier_plugin.cc
@@ -1,4 +1,4 @@
-/*
+/**
* \file named_pipe_notifier_plugin.cc
* \brief NamedPipeNotifierPlugin class implementation file.
* Copyright (c) 2013, Ford Motor Company
diff --git a/src/components/qt_hmi/qml_plugins/named_pipe_notifier/named_pipe_notifier_plugin.h b/src/components/qt_hmi/qml_plugins/named_pipe_notifier/named_pipe_notifier_plugin.h
index 6c64d531ac..36513aa931 100644
--- a/src/components/qt_hmi/qml_plugins/named_pipe_notifier/named_pipe_notifier_plugin.h
+++ b/src/components/qt_hmi/qml_plugins/named_pipe_notifier/named_pipe_notifier_plugin.h
@@ -1,4 +1,4 @@
-/*
+/**
* \file named_pipe_notifier_plugin.h
* \brief NamedPipeNotifierPlugin class header file.
* Copyright (c) 2013, Ford Motor Company
diff --git a/src/components/qt_hmi/qml_plugins/named_pipe_notifier/qt_version.h b/src/components/qt_hmi/qml_plugins/named_pipe_notifier/qt_version.h
index 91533346c0..42b4bcb9d6 100644
--- a/src/components/qt_hmi/qml_plugins/named_pipe_notifier/qt_version.h
+++ b/src/components/qt_hmi/qml_plugins/named_pipe_notifier/qt_version.h
@@ -1,4 +1,4 @@
-/*
+/**
* @file qt_version.h
* @brief Defines for check Qt version.
* Copyright (c) 2013, Ford Motor Company
diff --git a/src/components/resumption/src/last_state.cc b/src/components/resumption/src/last_state.cc
index 7e2ced3416..15100c3e13 100644
--- a/src/components/resumption/src/last_state.cc
+++ b/src/components/resumption/src/last_state.cc
@@ -40,7 +40,7 @@ namespace resumption {
CREATE_LOGGERPTR_GLOBAL(logger_, "LastState");
void LastState::SaveToFileSystem() {
- LOG4CXX_AUTO_TRACE(logger_);
+ LOG4CXX_INFO(logger_, "LastState::SaveToFileSystem");
const std::string file =
profile::Profile::instance()->app_info_storage();
const std::string& str = dictionary.toStyledString();
diff --git a/src/components/rpc_base/include/rpc_base/gtest_support.h b/src/components/rpc_base/include/rpc_base/gtest_support.h
index daea5d3884..68d1a83141 100644
--- a/src/components/rpc_base/include/rpc_base/gtest_support.h
+++ b/src/components/rpc_base/include/rpc_base/gtest_support.h
@@ -1,4 +1,4 @@
-/*
+/**
* Copyright (c) 2014, Ford Motor Company
* All rights reserved.
*
diff --git a/src/components/rpc_base/include/rpc_base/rpc_base.h b/src/components/rpc_base/include/rpc_base/rpc_base.h
index 6fc55dd588..56b099d9e9 100644
--- a/src/components/rpc_base/include/rpc_base/rpc_base.h
+++ b/src/components/rpc_base/include/rpc_base/rpc_base.h
@@ -1,4 +1,4 @@
-/*
+/**
* Copyright (c) 2014, Ford Motor Company
* All rights reserved.
*
@@ -183,12 +183,10 @@ class Integer : public PrimitiveType {
// Methods
Integer();
explicit Integer(IntType value);
- explicit Integer(const Integer& value);
explicit Integer(const Json::Value* value);
explicit Integer(dbus::MessageReader* reader);
Integer(const Json::Value* value, IntType def_value);
Integer& operator=(IntType new_val);
- Integer& operator=(const Integer& new_val);
Integer& operator++();
Integer& operator+=(int value);
operator IntType() const;
@@ -231,8 +229,6 @@ class String : public PrimitiveType {
String(const Json::Value* value, const std::string& def_value);
bool operator<(String new_val);
String& operator=(const std::string& new_val);
- String& operator=(const String& new_val);
- bool operator==(const String& rhs);
operator const std::string& () const;
Json::Value ToJsonValue() const;
void ToDbusWriter(dbus::MessageWriter* writer) const;
diff --git a/src/components/rpc_base/include/rpc_base/rpc_base_dbus_inl.h b/src/components/rpc_base/include/rpc_base/rpc_base_dbus_inl.h
index 5f9c45a060..7d66950fc9 100644
--- a/src/components/rpc_base/include/rpc_base/rpc_base_dbus_inl.h
+++ b/src/components/rpc_base/include/rpc_base/rpc_base_dbus_inl.h
@@ -1,4 +1,4 @@
-/*
+/**
* Copyright (c) 2014, Ford Motor Company
* All rights reserved.
*
diff --git a/src/components/rpc_base/include/rpc_base/rpc_base_inl.h b/src/components/rpc_base/include/rpc_base/rpc_base_inl.h
index 0e9d5d5512..4373f0ea26 100644
--- a/src/components/rpc_base/include/rpc_base/rpc_base_inl.h
+++ b/src/components/rpc_base/include/rpc_base/rpc_base_inl.h
@@ -1,34 +1,34 @@
-/*
- * 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.
- */
+/**
+* Copyright (c) 2014, Ford Motor Company
+* All rights reserved.
+*
+* Redistribution and use in source and binary forms, with or without
+* modification, are permitted provided that the following conditions are met:
+*
+* Redistributions of source code must retain the above copyright notice, this
+* list of conditions and the following disclaimer.
+*
+* Redistributions in binary form must reproduce the above copyright notice,
+* this list of conditions and the following
+* disclaimer in the documentation and/or other materials provided with the
+* distribution.
+*
+* Neither the name of the Ford Motor Company nor the names of its contributors
+* may be used to endorse or promote products derived from this software
+* without specific prior written permission.
+*
+* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+* POSSIBILITY OF SUCH DAMAGE.
+*/
#ifndef VALIDATED_TYPES_INL_H_
#define VALIDATED_TYPES_INL_H_
@@ -185,13 +185,6 @@ Integer<T, minval, maxval>& Integer<T, minval, maxval>::operator=(IntType new_va
}
template<typename T, T minval, T maxval>
-Integer<T, minval, maxval>& Integer<T, minval, maxval>::operator=(const Integer& new_val) {
- this->value_ = new_val.value_;
- this->value_state_= range_.Includes(new_val.value_) ? kValid : kInvalid;
- return *this;
-}
-
-template<typename T, T minval, T maxval>
Integer<T, minval, maxval>& Integer<T, minval, maxval>::operator++() {
++value_;
return *this;
@@ -278,18 +271,6 @@ String<minlen, maxlen>& String<minlen, maxlen>::operator=(const std::string& new
}
template<size_t minlen, size_t maxlen>
-String<minlen, maxlen>& String<minlen, maxlen>::operator=(const String& new_val) {
- value_ = new_val.value_;
- value_state_ = new_val.value_state_;
- return *this;
-}
-
-template<size_t minlen, size_t maxlen>
-bool String<minlen, maxlen>::operator==(const String& rhs) {
- return value_ == rhs.value_;
-}
-
-template<size_t minlen, size_t maxlen>
String<minlen, maxlen>::operator const std::string&() const {
return value_;
}
diff --git a/src/components/rpc_base/include/rpc_base/rpc_base_json_inl.h b/src/components/rpc_base/include/rpc_base/rpc_base_json_inl.h
index b5fd9a567a..a581092340 100644
--- a/src/components/rpc_base/include/rpc_base/rpc_base_json_inl.h
+++ b/src/components/rpc_base/include/rpc_base/rpc_base_json_inl.h
@@ -1,4 +1,4 @@
-/*
+/**
* Copyright (c) 2014, Ford Motor Company
* All rights reserved.
*
@@ -139,12 +139,6 @@ Integer<T, minval, maxval>::Integer(const Json::Value* value)
}
template<typename T, T minval, T maxval>
-Integer<T, minval, maxval>::Integer(const Integer& val)
- : PrimitiveType(range_.Includes(val.value_) ? kValid : kInvalid),
- value_(val.value_) {
-}
-
-template<typename T, T minval, T maxval>
Integer<T, minval, maxval>::Integer(const Json::Value* value, IntType def_value)
: PrimitiveType(InitHelper(value, &Json::Value::isInt)),
value_(def_value) {
diff --git a/src/components/rpc_base/include/rpc_base/rpc_message.h b/src/components/rpc_base/include/rpc_base/rpc_message.h
index 18ace4552a..48ef5ff391 100644
--- a/src/components/rpc_base/include/rpc_base/rpc_message.h
+++ b/src/components/rpc_base/include/rpc_base/rpc_message.h
@@ -1,34 +1,34 @@
-/*
- * 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.
- */
+/**
+* Copyright (c) 2014, Ford Motor Company
+* All rights reserved.
+*
+* Redistribution and use in source and binary forms, with or without
+* modification, are permitted provided that the following conditions are met:
+*
+* Redistributions of source code must retain the above copyright notice, this
+* list of conditions and the following disclaimer.
+*
+* Redistributions in binary form must reproduce the above copyright notice,
+* this list of conditions and the following
+* disclaimer in the documentation and/or other materials provided with the
+* distribution.
+*
+* Neither the name of the Ford Motor Company nor the names of its contributors
+* may be used to endorse or promote products derived from this software
+* without specific prior written permission.
+*
+* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+* POSSIBILITY OF SUCH DAMAGE.
+*/
#ifndef TYPE_BASE_H_
#define TYPE_BASE_H_
diff --git a/src/components/rpc_base/include/rpc_base/validation_report.h b/src/components/rpc_base/include/rpc_base/validation_report.h
index b8a9c4d1cd..eeadb35ee4 100644
--- a/src/components/rpc_base/include/rpc_base/validation_report.h
+++ b/src/components/rpc_base/include/rpc_base/validation_report.h
@@ -1,4 +1,4 @@
-/*
+/**
* Copyright (c) 2014, Ford Motor Company
* All rights reserved.
*
diff --git a/src/components/rpc_base/src/rpc_base/rpc_base.cc b/src/components/rpc_base/src/rpc_base/rpc_base.cc
index f2290780ed..88f0f53740 100644
--- a/src/components/rpc_base/src/rpc_base/rpc_base.cc
+++ b/src/components/rpc_base/src/rpc_base/rpc_base.cc
@@ -1,4 +1,4 @@
-/*
+/**
* Copyright (c) 2014, Ford Motor Company
* All rights reserved.
*
diff --git a/src/components/security_manager/include/security_manager/security_manager_impl.h b/src/components/security_manager/include/security_manager/security_manager_impl.h
index 2aa03087eb..2b17e8d27c 100644
--- a/src/components/security_manager/include/security_manager/security_manager_impl.h
+++ b/src/components/security_manager/include/security_manager/security_manager_impl.h
@@ -63,7 +63,7 @@ typedef utils::PrioritizedQueue<SecurityMessage> SecurityMessageQueue;
typedef threads::MessageLoopThread<SecurityMessageQueue> SecurityMessageLoop;
/**
- * \brief SecurityManagerImpl class implements SecurityManager interface
+ * \brief SecurityManagerImpl class implements SecurityManager inteface
*/
class SecurityManagerImpl
: public SecurityManager,
diff --git a/src/components/smart_objects/include/smart_objects/number_schema_item.h b/src/components/smart_objects/include/smart_objects/number_schema_item.h
index fb4d287fe4..f5dd8ba42b 100644
--- a/src/components/smart_objects/include/smart_objects/number_schema_item.h
+++ b/src/components/smart_objects/include/smart_objects/number_schema_item.h
@@ -85,10 +85,7 @@ class TNumberSchemaItem : public CDefaultSchemaItem<NumberType> {
TNumberSchemaItem(const TSchemaItemParameter<NumberType>& MinValue,
const TSchemaItemParameter<NumberType>& MaxValue,
const TSchemaItemParameter<NumberType>& DefaultValue);
- /**
- * @brief Compares if param value type is correct
- **/
- bool isValidNumberType(SmartType type);
+ bool isNumberType(SmartType type);
/**
* @brief Minimum and Maximum allowed values.
@@ -108,27 +105,16 @@ TNumberSchemaItem<NumberType>::create(
}
template<typename NumberType>
-bool TNumberSchemaItem<NumberType>::isValidNumberType(SmartType type) {
- NumberType value(0);
- if ((SmartType_Double == type) &&
- (typeid(double) == typeid(value))) {
- return true;
- } else if ((SmartType_Integer == type) &&
- (typeid(int32_t) == typeid(value) ||
- typeid(uint32_t) == typeid(value) ||
- typeid(int64_t) == typeid(value))) {
- return true;
- } else {
- return false;
- }
+bool TNumberSchemaItem<NumberType>::isNumberType(SmartType type) {
+ return SmartType_Integer == type || SmartType_Double == type;
}
template<typename NumberType>
Errors::eType TNumberSchemaItem<NumberType>::validate(const SmartObject& Object) {
- if (!isValidNumberType(Object.getType())) {
+ if (!isNumberType(Object.getType())) {
return Errors::INVALID_VALUE;
}
- NumberType value(0);
+ NumberType value;
if (typeid(int32_t) == typeid(value)) {
value = Object.asInt();
} else if (typeid(uint32_t) == typeid(value)) {
diff --git a/src/components/time_tester/include/time_tester/application_manager_observer.h b/src/components/time_tester/include/time_tester/application_manager_observer.h
index 9c224f8920..8331682ecd 100644
--- a/src/components/time_tester/include/time_tester/application_manager_observer.h
+++ b/src/components/time_tester/include/time_tester/application_manager_observer.h
@@ -1,34 +1,34 @@
/*
- * 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.
- */
+* Copyright (c) 2014, Ford Motor Company
+* All rights reserved.
+*
+* Redistribution and use in source and binary forms, with or without
+* modification, are permitted provided that the following conditions are met:
+*
+* Redistributions of source code must retain the above copyright notice, this
+* list of conditions and the following disclaimer.
+*
+* Redistributions in binary form must reproduce the above copyright notice,
+* this list of conditions and the following
+* disclaimer in the documentation and/or other materials provided with the
+* distribution.
+*
+* Neither the name of the Ford Motor Company nor the names of its contributors
+* may be used to endorse or promote products derived from this software
+* without specific prior written permission.
+*
+* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+* POSSIBILITY OF SUCH DAMAGE.
+*/
#ifndef SRC_COMPONENTS_TIME_TESTER_INCLUDE_TIME_TESTER_APPLICATION_MANAGER_OBSERVER_H_
#define SRC_COMPONENTS_TIME_TESTER_INCLUDE_TIME_TESTER_APPLICATION_MANAGER_OBSERVER_H_
diff --git a/src/components/time_tester/include/time_tester/json_keys.h b/src/components/time_tester/include/time_tester/json_keys.h
index 532202067f..d1ace3f9d4 100644
--- a/src/components/time_tester/include/time_tester/json_keys.h
+++ b/src/components/time_tester/include/time_tester/json_keys.h
@@ -1,4 +1,4 @@
-/*
+/**
*
* Copyright (c) 2014, Ford Motor Company
* All rights reserved.
diff --git a/src/components/time_tester/include/time_tester/protocol_handler_observer.h b/src/components/time_tester/include/time_tester/protocol_handler_observer.h
index 4c962cfc84..780e9992f2 100644
--- a/src/components/time_tester/include/time_tester/protocol_handler_observer.h
+++ b/src/components/time_tester/include/time_tester/protocol_handler_observer.h
@@ -1,34 +1,34 @@
/*
- * 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.
- */
+* Copyright (c) 2014, Ford Motor Company
+* All rights reserved.
+*
+* Redistribution and use in source and binary forms, with or without
+* modification, are permitted provided that the following conditions are met:
+*
+* Redistributions of source code must retain the above copyright notice, this
+* list of conditions and the following disclaimer.
+*
+* Redistributions in binary form must reproduce the above copyright notice,
+* this list of conditions and the following
+* disclaimer in the documentation and/or other materials provided with the
+* distribution.
+*
+* Neither the name of the Ford Motor Company nor the names of its contributors
+* may be used to endorse or promote products derived from this software
+* without specific prior written permission.
+*
+* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+* POSSIBILITY OF SUCH DAMAGE.
+*/
#ifndef SRC_COMPONENTS_TIME_TESTER_INCLUDE_TIME_TESTER_PROTOCOL_HANDLER_OBSERVER_H_
#define SRC_COMPONENTS_TIME_TESTER_INCLUDE_TIME_TESTER_PROTOCOL_HANDLER_OBSERVER_H_
diff --git a/src/components/time_tester/include/time_tester/time_manager.h b/src/components/time_tester/include/time_tester/time_manager.h
index b891245c6a..66dd97595b 100644
--- a/src/components/time_tester/include/time_tester/time_manager.h
+++ b/src/components/time_tester/include/time_tester/time_manager.h
@@ -1,34 +1,34 @@
/*
- * 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.
- */
+* Copyright (c) 2014, Ford Motor Company
+* All rights reserved.
+*
+* Redistribution and use in source and binary forms, with or without
+* modification, are permitted provided that the following conditions are met:
+*
+* Redistributions of source code must retain the above copyright notice, this
+* list of conditions and the following disclaimer.
+*
+* Redistributions in binary form must reproduce the above copyright notice,
+* this list of conditions and the following
+* disclaimer in the documentation and/or other materials provided with the
+* distribution.
+*
+* Neither the name of the Ford Motor Company nor the names of its contributors
+* may be used to endorse or promote products derived from this software
+* without specific prior written permission.
+*
+* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+* POSSIBILITY OF SUCH DAMAGE.
+*/
#ifndef SRC_COMPONENTS_TIME_MANAGER_INCLUDE_TIME_MANAGER_MEDIA_MANAGER_H_
#define SRC_COMPONENTS_TIME_MANAGER_INCLUDE_TIME_MANAGER_MEDIA_MANAGER_H_
@@ -64,7 +64,7 @@ class TimeManager {
explicit Streamer(TimeManager* const server);
~Streamer();
void threadMain() OVERRIDE;
- void exitThreadMain() OVERRIDE;
+ bool exitThreadMain() OVERRIDE;
bool IsReady() const;
void Start();
void Stop();
diff --git a/src/components/time_tester/include/time_tester/transport_manager_observer.h b/src/components/time_tester/include/time_tester/transport_manager_observer.h
index bd46ba0822..ee83888329 100644
--- a/src/components/time_tester/include/time_tester/transport_manager_observer.h
+++ b/src/components/time_tester/include/time_tester/transport_manager_observer.h
@@ -1,34 +1,34 @@
/*
- * 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.
- */
+* Copyright (c) 2014, Ford Motor Company
+* All rights reserved.
+*
+* Redistribution and use in source and binary forms, with or without
+* modification, are permitted provided that the following conditions are met:
+*
+* Redistributions of source code must retain the above copyright notice, this
+* list of conditions and the following disclaimer.
+*
+* Redistributions in binary form must reproduce the above copyright notice,
+* this list of conditions and the following
+* disclaimer in the documentation and/or other materials provided with the
+* distribution.
+*
+* Neither the name of the Ford Motor Company nor the names of its contributors
+* may be used to endorse or promote products derived from this software
+* without specific prior written permission.
+*
+* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+* POSSIBILITY OF SUCH DAMAGE.
+*/
#ifndef SRC_COMPONENTS_TIME_TESTER_INCLUDE_TIME_TESTER_TRANSPORT_MANAGER_OBSERVER_H_
#define SRC_COMPONENTS_TIME_TESTER_INCLUDE_TIME_TESTER_TRANSPORT_MANAGER_OBSERVER_H_
diff --git a/src/components/time_tester/src/application_manager_observer.cc b/src/components/time_tester/src/application_manager_observer.cc
index c0d87a0551..67d7268da7 100644
--- a/src/components/time_tester/src/application_manager_observer.cc
+++ b/src/components/time_tester/src/application_manager_observer.cc
@@ -1,34 +1,34 @@
/*
- * 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.
- */
+* Copyright (c) 2014, Ford Motor Company
+* All rights reserved.
+*
+* Redistribution and use in source and binary forms, with or without
+* modification, are permitted provided that the following conditions are met:
+*
+* Redistributions of source code must retain the above copyright notice, this
+* list of conditions and the following disclaimer.
+*
+* Redistributions in binary form must reproduce the above copyright notice,
+* this list of conditions and the following
+* disclaimer in the documentation and/or other materials provided with the
+* distribution.
+*
+* Neither the name of the Ford Motor Company nor the names of its contributors
+* may be used to endorse or promote products derived from this software
+* without specific prior written permission.
+*
+* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+* POSSIBILITY OF SUCH DAMAGE.
+*/
#include "application_manager_observer.h"
#include "utils/shared_ptr.h"
#include "time_manager.h"
diff --git a/src/components/time_tester/src/time_manager.cc b/src/components/time_tester/src/time_manager.cc
index 87f23d15c2..6cabe3ad14 100644
--- a/src/components/time_tester/src/time_manager.cc
+++ b/src/components/time_tester/src/time_manager.cc
@@ -1,34 +1,34 @@
/*
- * 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.
- */
+* Copyright (c) 2014, Ford Motor Company
+* All rights reserved.
+*
+* Redistribution and use in source and binary forms, with or without
+* modification, are permitted provided that the following conditions are met:
+*
+* Redistributions of source code must retain the above copyright notice, this
+* list of conditions and the following disclaimer.
+*
+* Redistributions in binary form must reproduce the above copyright notice,
+* this list of conditions and the following
+* disclaimer in the documentation and/or other materials provided with the
+* distribution.
+*
+* Neither the name of the Ford Motor Company nor the names of its contributors
+* may be used to endorse or promote products derived from this software
+* without specific prior written permission.
+*
+* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+* POSSIBILITY OF SUCH DAMAGE.
+*/
#include "time_manager.h"
@@ -59,32 +59,34 @@ TimeManager::TimeManager():
ph_observer(this) {
ip_ = profile::Profile::instance()->server_address();
port_ = profile::Profile::instance()->time_testing_port();
- streamer_ = new Streamer(this);
- thread_ = threads::CreateThread("TimeManager", streamer_ );
}
TimeManager::~TimeManager() {
- LOG4CXX_AUTO_TRACE(logger_);
+ LOG4CXX_INFO(logger_, "Destroing TimeManager");
Stop();
- thread_->join();
- delete streamer_;
- threads::DeleteThread(thread_);
}
void TimeManager::Init(protocol_handler::ProtocolHandlerImpl* ph) {
DCHECK(ph);
- application_manager::ApplicationManagerImpl::instance()->SetTimeMetricObserver(&app_observer);
- transport_manager::TransportManagerDefault::instance()->SetTimeMetricObserver(&tm_observer);
- ph->SetTimeMetricObserver(&ph_observer);
- thread_->start(threads::ThreadOptions());
- LOG4CXX_INFO(logger_, "Create and start sending thread");
+ if (!thread_) {
+ streamer_ = new Streamer(this);
+ thread_ = threads::CreateThread("TimeManager", streamer_ );
+ application_manager::ApplicationManagerImpl::instance()->SetTimeMetricObserver(&app_observer);
+ transport_manager::TransportManagerDefault::instance()->SetTimeMetricObserver(&tm_observer);
+ ph->SetTimeMetricObserver(&ph_observer);
+ thread_->startWithOptions(threads::ThreadOptions());
+ LOG4CXX_INFO(logger_, "Create and start sending thread");
+ }
}
void TimeManager::Stop() {
- if (socket_fd_ != -1) {
- ::close(socket_fd_);
+ if (thread_) {
+ thread_->stop();
+ thread_ = NULL;
+ if (socket_fd_ != -1) {
+ ::close(socket_fd_);
+ }
}
- thread_->stop();
messages_.Reset();
LOG4CXX_INFO(logger_, "TimeManager stopped");
}
@@ -108,7 +110,7 @@ TimeManager::Streamer::~Streamer() {
}
void TimeManager::Streamer::threadMain() {
- LOG4CXX_AUTO_TRACE(logger_);
+ LOG4CXX_INFO(logger_, "Streamer::threadMain");
Start();
@@ -138,11 +140,12 @@ void TimeManager::Streamer::threadMain() {
}
}
-void TimeManager::Streamer::exitThreadMain() {
+bool TimeManager::Streamer::exitThreadMain() {
LOG4CXX_INFO(logger_, "Streamer::exitThreadMain");
stop_flag_ = true;
Stop();
server_->messages_.Shutdown();
+ return false;
}
void TimeManager::Streamer::Start() {
@@ -204,7 +207,7 @@ bool TimeManager::Streamer::IsReady() const {
fd_set fds;
FD_ZERO(&fds);
FD_SET(new_socket_fd_, &fds);
- TimevalStruct tv = {0, 0};
+ TimevalStruct tv;
tv.tv_sec = 5; // set a 5 second timeout
tv.tv_usec = 0;
diff --git a/src/components/time_tester/src/transport_manager_observer.cc b/src/components/time_tester/src/transport_manager_observer.cc
index 6c63a576e7..41cb30126a 100644
--- a/src/components/time_tester/src/transport_manager_observer.cc
+++ b/src/components/time_tester/src/transport_manager_observer.cc
@@ -1,34 +1,34 @@
/*
- * 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.
- */
+* Copyright (c) 2014, Ford Motor Company
+* All rights reserved.
+*
+* Redistribution and use in source and binary forms, with or without
+* modification, are permitted provided that the following conditions are met:
+*
+* Redistributions of source code must retain the above copyright notice, this
+* list of conditions and the following disclaimer.
+*
+* Redistributions in binary form must reproduce the above copyright notice,
+* this list of conditions and the following
+* disclaimer in the documentation and/or other materials provided with the
+* distribution.
+*
+* Neither the name of the Ford Motor Company nor the names of its contributors
+* may be used to endorse or promote products derived from this software
+* without specific prior written permission.
+*
+* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+* POSSIBILITY OF SUCH DAMAGE.
+*/
#include "transport_manager_observer.h"
#include <time.h>
diff --git a/src/components/transport_manager/CMakeLists.txt b/src/components/transport_manager/CMakeLists.txt
index 68358a5f3d..15ecc91619 100644
--- a/src/components/transport_manager/CMakeLists.txt
+++ b/src/components/transport_manager/CMakeLists.txt
@@ -92,4 +92,4 @@ if (BUILD_BT_SUPPORT)
endif()
if (CMAKE_SYSTEM_NAME STREQUAL "QNX")
-endif()
+endif() \ No newline at end of file
diff --git a/src/components/transport_manager/include/transport_manager/bluetooth/bluetooth_connection_factory.h b/src/components/transport_manager/include/transport_manager/bluetooth/bluetooth_connection_factory.h
index 4d1d474377..48d1f15538 100644
--- a/src/components/transport_manager/include/transport_manager/bluetooth/bluetooth_connection_factory.h
+++ b/src/components/transport_manager/include/transport_manager/bluetooth/bluetooth_connection_factory.h
@@ -1,4 +1,4 @@
-/*
+/**
* \file bluetooth_connection_factory.h
* \brief BluetoothConnectionFactory class header file.
*
diff --git a/src/components/transport_manager/include/transport_manager/bluetooth/bluetooth_device.h b/src/components/transport_manager/include/transport_manager/bluetooth/bluetooth_device.h
index f28147a3b5..4abef3c604 100644
--- a/src/components/transport_manager/include/transport_manager/bluetooth/bluetooth_device.h
+++ b/src/components/transport_manager/include/transport_manager/bluetooth/bluetooth_device.h
@@ -1,4 +1,4 @@
-/*
+/**
* \file bluetooth_device.h
* \brief BluetoothDevice class header file.
*
@@ -37,6 +37,11 @@
#define SRC_COMPONENTS_TRANSPORT_MANAGER_INCLUDE_TRANSPORT_MANAGER_BLUETOOTH_BLUETOOTH_DEVICE_H_
#include <bluetooth/bluetooth.h>
+#include <bluetooth/hci.h>
+#include <bluetooth/hci_lib.h>
+#include <bluetooth/sdp.h>
+#include <bluetooth/sdp_lib.h>
+#include <bluetooth/rfcomm.h>
#include <vector>
diff --git a/src/components/transport_manager/include/transport_manager/bluetooth/bluetooth_device_scanner.h b/src/components/transport_manager/include/transport_manager/bluetooth/bluetooth_device_scanner.h
index d1bed9b3dc..0c68c67216 100644
--- a/src/components/transport_manager/include/transport_manager/bluetooth/bluetooth_device_scanner.h
+++ b/src/components/transport_manager/include/transport_manager/bluetooth/bluetooth_device_scanner.h
@@ -1,4 +1,4 @@
-/*
+/**
* \file bluetooth_device_scanner.h
* \brief BluetoothDeviceScanner class header file.
*
@@ -46,9 +46,7 @@
#include "transport_manager/transport_adapter/device_scanner.h"
#include "utils/conditional_variable.h"
#include "utils/lock.h"
-#include "utils/threads/thread_delegate.h"
-
-class Thread;
+#include "utils/threads/thread.h"
namespace transport_manager {
namespace transport_adapter {
diff --git a/src/components/transport_manager/include/transport_manager/bluetooth/bluetooth_socket_connection.h b/src/components/transport_manager/include/transport_manager/bluetooth/bluetooth_socket_connection.h
index 3de77ab529..e1606da878 100644
--- a/src/components/transport_manager/include/transport_manager/bluetooth/bluetooth_socket_connection.h
+++ b/src/components/transport_manager/include/transport_manager/bluetooth/bluetooth_socket_connection.h
@@ -1,4 +1,4 @@
-/*
+/**
* \file bluetooth_socket_connection.h
* \brief BluetoothSocketConnection class header file.
*
diff --git a/src/components/transport_manager/include/transport_manager/bluetooth/bluetooth_transport_adapter.h b/src/components/transport_manager/include/transport_manager/bluetooth/bluetooth_transport_adapter.h
index 69a588fd37..075b5da55f 100644
--- a/src/components/transport_manager/include/transport_manager/bluetooth/bluetooth_transport_adapter.h
+++ b/src/components/transport_manager/include/transport_manager/bluetooth/bluetooth_transport_adapter.h
@@ -1,4 +1,4 @@
-/*
+/**
* \file bluetooth_transport_adapter.h
* \brief BluetoothAdapter class header file.
*
diff --git a/src/components/transport_manager/include/transport_manager/tcp/dnssd_service_browser.h b/src/components/transport_manager/include/transport_manager/tcp/dnssd_service_browser.h
index d31beea26c..cd319ca543 100644
--- a/src/components/transport_manager/include/transport_manager/tcp/dnssd_service_browser.h
+++ b/src/components/transport_manager/include/transport_manager/tcp/dnssd_service_browser.h
@@ -1,4 +1,4 @@
-/*
+/**
* \file dnssd_service_browser.h
* \brief DnssdServiceBrowser class header file.
*
@@ -38,12 +38,12 @@
#include <string>
#include <vector>
+#include <pthread.h>
#include <avahi-client/client.h>
#include <avahi-client/lookup.h>
#include <avahi-common/error.h>
#include <avahi-common/thread-watch.h>
-#include "utils/lock.h"
#include "transport_manager/transport_adapter/device_scanner.h"
#include "transport_manager/transport_adapter/transport_adapter.h"
@@ -121,7 +121,7 @@ class DnssdServiceBrowser : public DeviceScanner {
typedef std::vector<DnssdServiceRecord> ServiceRecords;
ServiceRecords service_records_;
- sync_primitives::Lock mutex_;
+ pthread_mutex_t mutex_;
bool initialised_;
}
diff --git a/src/components/transport_manager/include/transport_manager/tcp/tcp_client_listener.h b/src/components/transport_manager/include/transport_manager/tcp/tcp_client_listener.h
index f54e5a8fc2..12eab5a1b5 100644
--- a/src/components/transport_manager/include/transport_manager/tcp/tcp_client_listener.h
+++ b/src/components/transport_manager/include/transport_manager/tcp/tcp_client_listener.h
@@ -1,4 +1,4 @@
-/*
+/**
* \file tcp_client_listener.h
* \brief TcpClientListener class header file.
*
@@ -36,10 +36,10 @@
#ifndef SRC_COMPONENTS_TRANSPORT_MANAGER_INCLUDE_TRANSPORT_MANAGER_TCP_TCP_CLIENT_LISTENER_H_
#define SRC_COMPONENTS_TRANSPORT_MANAGER_INCLUDE_TRANSPORT_MANAGER_TCP_TCP_CLIENT_LISTENER_H_
-#include "utils/threads/thread_delegate.h"
#include "transport_manager/transport_adapter/client_connection_listener.h"
-class Thread;
+#include "utils/threads/thread_delegate.h"
+#include "utils/threads/thread.h"
namespace transport_manager {
namespace transport_adapter {
@@ -49,7 +49,8 @@ class TransportAdapterController;
/**
* @brief Listener of device adapter that use TCP transport.
*/
-class TcpClientListener : public ClientConnectionListener {
+class TcpClientListener : public ClientConnectionListener,
+ public threads::ThreadDelegate {
public:
/**
* @breaf Constructor.
@@ -63,6 +64,14 @@ class TcpClientListener : public ClientConnectionListener {
bool enable_keepalive);
/**
+ * @brief Start TCP client listener thread.
+ */
+ void threadMain();
+
+ bool exitThreadMain();
+ protected:
+
+ /**
* @brief Destructor.
*/
virtual ~TcpClientListener();
@@ -98,26 +107,15 @@ class TcpClientListener : public ClientConnectionListener {
* @brief Terminate TCP client listener thread.
*/
virtual TransportAdapter::Error StopListening();
-
private:
const uint16_t port_;
const bool enable_keepalive_;
TransportAdapterController* controller_;
+ // TODO(Eamakhov): change to threads::Thread usage
threads::Thread* thread_;
int socket_;
+ bool thread_started_;
bool thread_stop_requested_;
-
- void Loop();
- void StopLoop();
-
- class ListeningThreadDelegate : public threads::ThreadDelegate {
- public:
- explicit ListeningThreadDelegate(TcpClientListener* parent);
- virtual void threadMain();
- void exitThreadMain();
- private:
- TcpClientListener* parent_;
- };
};
} // namespace transport_adapter
diff --git a/src/components/transport_manager/include/transport_manager/tcp/tcp_connection_factory.h b/src/components/transport_manager/include/transport_manager/tcp/tcp_connection_factory.h
index 690c3127bd..fba85aa601 100644
--- a/src/components/transport_manager/include/transport_manager/tcp/tcp_connection_factory.h
+++ b/src/components/transport_manager/include/transport_manager/tcp/tcp_connection_factory.h
@@ -1,4 +1,4 @@
-/*
+/**
* \file tcp_connection_factory.h
* \brief TcpConnectionFactory class header file.
*
@@ -54,6 +54,7 @@ class TcpConnectionFactory : public ServerConnectionFactory {
* @param controller Pointer to the device adapter controller.
*/
TcpConnectionFactory(TransportAdapterController* controller);
+ protected:
/**
* @brief Start TCP connection factory.
@@ -68,8 +69,8 @@ class TcpConnectionFactory : public ServerConnectionFactory {
*
* @return Error information about possible reason of failure.
*/
- virtual TransportAdapter::Error CreateConnection(
- const DeviceUID& device_uid, const ApplicationHandle& app_handle);
+ virtual TransportAdapter::Error CreateConnection(const DeviceUID& device_uid,
+ const ApplicationHandle& app_handle);
/**
* @brief
diff --git a/src/components/transport_manager/include/transport_manager/tcp/tcp_device.h b/src/components/transport_manager/include/transport_manager/tcp/tcp_device.h
index 2b89e09020..08821ab3c4 100644
--- a/src/components/transport_manager/include/transport_manager/tcp/tcp_device.h
+++ b/src/components/transport_manager/include/transport_manager/tcp/tcp_device.h
@@ -1,4 +1,4 @@
-/*
+/**
* \file tcp_device.h
* \brief TcpDevice class header file.
*
@@ -47,8 +47,6 @@
#include <sys/types.h>
#include <sys/socket.h>
-#include "utils/lock.h"
-
namespace transport_manager {
namespace transport_adapter {
@@ -138,7 +136,7 @@ class TcpDevice : public Device {
uint16_t port;
};
std::map<ApplicationHandle, Application> applications_;
- mutable sync_primitives::Lock applications_mutex_;
+ mutable pthread_mutex_t applications_mutex_;
const in_addr_t in_addr_;
const std::string name_;
ApplicationHandle last_handle_;
diff --git a/src/components/transport_manager/include/transport_manager/tcp/tcp_socket_connection.h b/src/components/transport_manager/include/transport_manager/tcp/tcp_socket_connection.h
index 9af825ea93..8fe7b8e837 100644
--- a/src/components/transport_manager/include/transport_manager/tcp/tcp_socket_connection.h
+++ b/src/components/transport_manager/include/transport_manager/tcp/tcp_socket_connection.h
@@ -1,4 +1,4 @@
-/*
+/**
* \file tcp_socket_connection.h
* \brief TcpSocketConnection class header file.
*
diff --git a/src/components/transport_manager/include/transport_manager/tcp/tcp_transport_adapter.h b/src/components/transport_manager/include/transport_manager/tcp/tcp_transport_adapter.h
index 277194b512..1319c40eeb 100644
--- a/src/components/transport_manager/include/transport_manager/tcp/tcp_transport_adapter.h
+++ b/src/components/transport_manager/include/transport_manager/tcp/tcp_transport_adapter.h
@@ -1,4 +1,4 @@
-/*
+/**
* \file tcp_transport_adapter.h
* \brief TcpTransportAdapter class header file.
*
diff --git a/src/components/transport_manager/include/transport_manager/transport_adapter/client_connection_listener.h b/src/components/transport_manager/include/transport_manager/transport_adapter/client_connection_listener.h
index 018dd46810..41658fb45f 100644
--- a/src/components/transport_manager/include/transport_manager/transport_adapter/client_connection_listener.h
+++ b/src/components/transport_manager/include/transport_manager/transport_adapter/client_connection_listener.h
@@ -1,4 +1,6 @@
-/*
+/**
+ * \file client_connection_listener.h
+ * \brief ClientConnectionListener class header file.
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
diff --git a/src/components/transport_manager/include/transport_manager/transport_adapter/connection.h b/src/components/transport_manager/include/transport_manager/transport_adapter/connection.h
index d09e9643b1..094cb51921 100644
--- a/src/components/transport_manager/include/transport_manager/transport_adapter/connection.h
+++ b/src/components/transport_manager/include/transport_manager/transport_adapter/connection.h
@@ -1,4 +1,4 @@
-/*
+/**
* \file connection.h
* \brief Connection class header.
* Copyright (c) 2013, Ford Motor Company
diff --git a/src/components/transport_manager/include/transport_manager/transport_adapter/device_scanner.h b/src/components/transport_manager/include/transport_manager/transport_adapter/device_scanner.h
index 36759a9385..5b09a726e5 100644
--- a/src/components/transport_manager/include/transport_manager/transport_adapter/device_scanner.h
+++ b/src/components/transport_manager/include/transport_manager/transport_adapter/device_scanner.h
@@ -1,4 +1,4 @@
-/*
+/**
* \file device_scanner.h
* \brief DeviceScanner class header file.
* Copyright (c) 2013, Ford Motor Company
diff --git a/src/components/transport_manager/include/transport_manager/transport_adapter/server_connection_factory.h b/src/components/transport_manager/include/transport_manager/transport_adapter/server_connection_factory.h
index 19c37aa6a6..d944594d88 100644
--- a/src/components/transport_manager/include/transport_manager/transport_adapter/server_connection_factory.h
+++ b/src/components/transport_manager/include/transport_manager/transport_adapter/server_connection_factory.h
@@ -1,4 +1,4 @@
-/*
+/**
* \file server_connection_factory.h
* \brief ServerConnectionFactory class header file.
* Copyright (c) 2013, Ford Motor Company
diff --git a/src/components/transport_manager/include/transport_manager/transport_adapter/threaded_socket_connection.h b/src/components/transport_manager/include/transport_manager/transport_adapter/threaded_socket_connection.h
index 399ddb1fcf..851f250a88 100644
--- a/src/components/transport_manager/include/transport_manager/transport_adapter/threaded_socket_connection.h
+++ b/src/components/transport_manager/include/transport_manager/transport_adapter/threaded_socket_connection.h
@@ -1,4 +1,4 @@
-/*
+/**
* \file threaded_socket_connection.h
* \brief Header for classes responsible for communication over sockets.
* Copyright (c) 2013, Ford Motor Company
@@ -41,12 +41,10 @@
#include "transport_manager/transport_adapter/connection.h"
#include "protocol/common.h"
#include "utils/threads/thread_delegate.h"
-#include "utils/lock.h"
+#include "utils/threads/thread.h"
using ::transport_manager::transport_adapter::Connection;
-class Thread;
-
namespace transport_manager {
namespace transport_adapter {
@@ -135,7 +133,7 @@ class ThreadedSocketConnection : public Connection,
int read_fd_;
int write_fd_;
void threadMain();
- void exitThreadMain();
+ bool exitThreadMain();
void Transmit();
void Finalize();
TransportAdapter::Error Notify() const;
@@ -149,7 +147,7 @@ class ThreadedSocketConnection : public Connection,
**/
typedef std::queue<protocol_handler::RawMessagePtr> FrameQueue;
FrameQueue frames_to_send_;
- mutable sync_primitives::Lock frames_to_send_mutex_;
+ mutable pthread_mutex_t frames_to_send_mutex_;
int socket_;
bool terminate_flag_;
diff --git a/src/components/transport_manager/include/transport_manager/transport_adapter/transport_adapter_impl.h b/src/components/transport_manager/include/transport_manager/transport_adapter/transport_adapter_impl.h
index f66f1c6bb9..2c27e0d20f 100644
--- a/src/components/transport_manager/include/transport_manager/transport_adapter/transport_adapter_impl.h
+++ b/src/components/transport_manager/include/transport_manager/transport_adapter/transport_adapter_impl.h
@@ -39,8 +39,6 @@
#include <memory>
#include <string>
-#include "utils/lock.h"
-#include "utils/rwlock.h"
#include "transport_manager/transport_adapter/transport_adapter.h"
#include "transport_manager/transport_adapter/transport_adapter_controller.h"
#include "transport_manager/transport_adapter/connection.h"
@@ -101,12 +99,6 @@ class TransportAdapterImpl : public TransportAdapter,
virtual TransportAdapter::Error Init();
/**
- * @brief Stops device adapter
- * Called from transport manager to stop device adapter
- */
- virtual void Terminate();
-
- /**
* @brief Add listener to the container(list) of device adapter listeners.
*
* @param listener Pointer to the device adapter listener.
@@ -501,7 +493,7 @@ class TransportAdapterImpl : public TransportAdapter,
/**
* @brief Mutex restricting access to device map.
**/
- mutable sync_primitives::Lock devices_mutex_;
+ mutable pthread_mutex_t devices_mutex_;
/**
* @brief Container(map) of connections.
@@ -511,16 +503,9 @@ class TransportAdapterImpl : public TransportAdapter,
/**
* @brief Mutex restricting access to connections map.
**/
- mutable sync_primitives::RWLock connections_lock_;
+ mutable pthread_mutex_t connections_mutex_;
protected:
-#ifdef TIME_TESTER
- /**
- * @brief Pointer to time metric observer
- */
- TMMetricObserver* metric_observer_;
-#endif // TIME_TESTER
-
/**
* @brief Pointer to the device scanner.
*/
@@ -535,8 +520,14 @@ class TransportAdapterImpl : public TransportAdapter,
* @brief Pointer to the factory of connections initiated from client.
*/
ClientConnectionListener* client_connection_listener_;
-};
+#ifdef TIME_TESTER
+ /**
+ * @brief Pointer to time metric observer
+ */
+ TMMetricObserver* metric_observer_;
+#endif // TIME_TESTER
+};
} // namespace transport_adapter
} // namespace transport_manager
diff --git a/src/components/transport_manager/include/transport_manager/transport_manager_impl.h b/src/components/transport_manager/include/transport_manager/transport_manager_impl.h
index 4c38716f3f..62fdb3fa2e 100644
--- a/src/components/transport_manager/include/transport_manager/transport_manager_impl.h
+++ b/src/components/transport_manager/include/transport_manager/transport_manager_impl.h
@@ -33,12 +33,15 @@
#ifndef SRC_COMPONENTS_TRANSPORT_MANAGER_INCLUDE_TRANSPORT_MANAGER_TRANSPORT_MANAGER_IMPL_H_
#define SRC_COMPONENTS_TRANSPORT_MANAGER_INCLUDE_TRANSPORT_MANAGER_TRANSPORT_MANAGER_IMPL_H_
+#include <pthread.h>
+
#include <queue>
#include <map>
#include <list>
#include <algorithm>
#include "utils/timer_thread.h"
+#include "utils/rwlock.h"
#include "transport_manager/transport_manager.h"
#include "transport_manager/transport_manager_listener.h"
@@ -101,12 +104,6 @@ class TransportManagerImpl : public TransportManager,
virtual int Init();
/**
- * Reinitializes transport manager
- * @return Error code
- */
- virtual int Reinit();
-
- /**
* @brief Start scanning for new devices.
*
* @return Code error.
@@ -253,6 +250,12 @@ class TransportManagerImpl : public TransportManager,
**/
void PostEvent(const TransportAdapterEvent& event);
+ /**
+ * @brief flag that indicates that thread is active
+ * if it is false then threads exist main loop
+ **/
+ volatile bool all_thread_active_;
+
typedef std::list<TransportManagerListener*> TransportManagerListenerList;
/**
* @brief listener that would be called when TM's event happened.
@@ -260,6 +263,11 @@ class TransportManagerImpl : public TransportManager,
TransportManagerListenerList transport_manager_listener_;
/**
+ * @brief Condition variable to wake up event
+ **/
+ pthread_cond_t device_listener_thread_wakeup_;
+
+ /**
* @brief Flag that TM is initialized
*/
bool is_initialized_;
@@ -344,9 +352,6 @@ class TransportManagerImpl : public TransportManager,
unsigned char** frame);
void OnDeviceListUpdated(TransportAdapter* ta);
- void DisconnectAllDevices();
- void TerminateAllAdapters();
- int InitAllAdapters();
static Connection convert(const ConnectionInternal& p);
};
// class ;
diff --git a/src/components/transport_manager/include/transport_manager/usb/libusb/platform_usb_device.h b/src/components/transport_manager/include/transport_manager/usb/libusb/platform_usb_device.h
index b90c504a4b..d1f485c9d5 100644
--- a/src/components/transport_manager/include/transport_manager/usb/libusb/platform_usb_device.h
+++ b/src/components/transport_manager/include/transport_manager/usb/libusb/platform_usb_device.h
@@ -1,4 +1,4 @@
-/*
+/**
* \file platform_usb_device.h
* \brief libusb PlatformUsbDevice class header file.
*
diff --git a/src/components/transport_manager/include/transport_manager/usb/libusb/usb_connection.h b/src/components/transport_manager/include/transport_manager/usb/libusb/usb_connection.h
index 7c1fbd4551..fc6af46a47 100644
--- a/src/components/transport_manager/include/transport_manager/usb/libusb/usb_connection.h
+++ b/src/components/transport_manager/include/transport_manager/usb/libusb/usb_connection.h
@@ -49,7 +49,7 @@ class UsbConnection : public Connection {
UsbConnection(const DeviceUID& device_uid,
const ApplicationHandle& app_handle,
TransportAdapterController* controller,
- const UsbHandlerSptr usb_handler, PlatformUsbDevice* device);
+ const UsbHandlerSptr& usb_handler, PlatformUsbDevice* device);
bool Init();
virtual ~UsbConnection();
diff --git a/src/components/transport_manager/include/transport_manager/usb/libusb/usb_handler.h b/src/components/transport_manager/include/transport_manager/usb/libusb/usb_handler.h
index 215b66f6e3..fd6e77013a 100644
--- a/src/components/transport_manager/include/transport_manager/usb/libusb/usb_handler.h
+++ b/src/components/transport_manager/include/transport_manager/usb/libusb/usb_handler.h
@@ -1,4 +1,4 @@
-/*
+/**
* \file usb_handler.h
* \brief libusb USB handler class header file.
*
@@ -36,17 +36,16 @@
#ifndef SRC_COMPONENTS_TRANSPORT_MANAGER_INCLUDE_TRANSPORT_MANAGER_USB_LIBUSB_USB_HANDLER_H_
#define SRC_COMPONENTS_TRANSPORT_MANAGER_INCLUDE_TRANSPORT_MANAGER_USB_LIBUSB_USB_HANDLER_H_
+#include <pthread.h>
+
#include <libusb/libusb.h>
#include "transport_manager/transport_adapter/transport_adapter.h"
#include "transport_manager/usb/usb_control_transfer.h"
#include "transport_manager/usb/libusb/platform_usb_device.h"
-#include "utils/threads/thread.h"
-
-class Thread;
-
namespace transport_manager {
+
namespace transport_adapter {
class UsbHandler {
@@ -72,16 +71,9 @@ class UsbHandler {
friend void UsbTransferSequenceCallback(libusb_transfer* transfer);
private:
- class UsbHandlerDelegate: public threads::ThreadDelegate {
- public:
- explicit UsbHandlerDelegate(UsbHandler* handler);
- void threadMain() OVERRIDE;
- private:
- UsbHandler* handler_;
- };
-
bool shutdown_requested_;
- threads::Thread* thread_;
+ // TODO(Eamakhov): change to threads::Thread usage
+ pthread_t thread_;
friend class UsbDeviceListener;
std::list<class UsbDeviceListener*> usb_device_listeners_;
diff --git a/src/components/transport_manager/include/transport_manager/usb/qnx/platform_usb_device.h b/src/components/transport_manager/include/transport_manager/usb/qnx/platform_usb_device.h
index ab35f862c6..939a8fcb3c 100644
--- a/src/components/transport_manager/include/transport_manager/usb/qnx/platform_usb_device.h
+++ b/src/components/transport_manager/include/transport_manager/usb/qnx/platform_usb_device.h
@@ -1,4 +1,4 @@
-/*
+/**
* \file platform_usb_device.h
* \brief QNX PlatfromUsbDevice class header file.
*
diff --git a/src/components/transport_manager/include/transport_manager/usb/qnx/usb_connection.h b/src/components/transport_manager/include/transport_manager/usb/qnx/usb_connection.h
index d55c887bd1..3a0d2f8a26 100644
--- a/src/components/transport_manager/include/transport_manager/usb/qnx/usb_connection.h
+++ b/src/components/transport_manager/include/transport_manager/usb/qnx/usb_connection.h
@@ -36,7 +36,7 @@
#ifndef SRC_COMPONENTS_TRANSPORT_MANAGER_INCLUDE_TRANSPORT_MANAGER_USB_QNX_USB_CONNECTION_H_
#define SRC_COMPONENTS_TRANSPORT_MANAGER_INCLUDE_TRANSPORT_MANAGER_USB_QNX_USB_CONNECTION_H_
-#include "utils/lock.h"
+#include <pthread.h>
#include "transport_manager/transport_adapter/transport_adapter_controller.h"
#include "transport_manager/transport_adapter/connection.h"
@@ -51,7 +51,7 @@ class UsbConnection : public Connection {
UsbConnection(const DeviceUID& device_uid,
const ApplicationHandle& app_handle,
TransportAdapterController* controller,
- const UsbHandlerSptr libusb_handler,
+ const UsbHandlerSptr& libusb_handler,
PlatformUsbDevice* device);
bool Init();
@@ -82,13 +82,13 @@ class UsbConnection : public Connection {
unsigned char* in_buffer_;
void* out_buffer_;
-
+
usbd_urb* in_urb_;
usbd_urb* out_urb_;
std::list<protocol_handler::RawMessagePtr> out_messages_;
::protocol_handler::RawMessagePtr current_out_message_;
- sync_primitives::Lock out_messages_mutex_;
+ pthread_mutex_t out_messages_mutex_;
size_t bytes_sent_;
bool disconnecting_;
bool pending_in_transfer_;
diff --git a/src/components/transport_manager/include/transport_manager/usb/qnx/usb_handler.h b/src/components/transport_manager/include/transport_manager/usb/qnx/usb_handler.h
index c33e0f2361..26b00087ff 100644
--- a/src/components/transport_manager/include/transport_manager/usb/qnx/usb_handler.h
+++ b/src/components/transport_manager/include/transport_manager/usb/qnx/usb_handler.h
@@ -1,4 +1,4 @@
-/*
+/**
* \file usb_handler.h
* \brief QNX USB handler class header file.
*
diff --git a/src/components/transport_manager/include/transport_manager/usb/usb_aoa_adapter.h b/src/components/transport_manager/include/transport_manager/usb/usb_aoa_adapter.h
index b0d8c1e453..55fb028ef7 100644
--- a/src/components/transport_manager/include/transport_manager/usb/usb_aoa_adapter.h
+++ b/src/components/transport_manager/include/transport_manager/usb/usb_aoa_adapter.h
@@ -1,4 +1,4 @@
-/*
+/**
* \file usb_aoa_adapter.h
* \brief UsbAoaAdapter class header file.
*
diff --git a/src/components/transport_manager/include/transport_manager/usb/usb_connection_factory.h b/src/components/transport_manager/include/transport_manager/usb/usb_connection_factory.h
index ebd25bd37b..ed0fda91ee 100644
--- a/src/components/transport_manager/include/transport_manager/usb/usb_connection_factory.h
+++ b/src/components/transport_manager/include/transport_manager/usb/usb_connection_factory.h
@@ -1,4 +1,4 @@
-/*
+/**
* \file usb_connection_factory.h
* \brief UsbConnectionFactory class header file.
*
@@ -46,7 +46,7 @@ namespace transport_adapter {
class UsbConnectionFactory : public ServerConnectionFactory {
public:
UsbConnectionFactory(TransportAdapterController* controller);
- void SetUsbHandler(const UsbHandlerSptr usb_handler);
+ void SetUsbHandler(const UsbHandlerSptr& usb_handler);
protected:
virtual TransportAdapter::Error Init();
diff --git a/src/components/transport_manager/include/transport_manager/usb/usb_control_transfer.h b/src/components/transport_manager/include/transport_manager/usb/usb_control_transfer.h
index c701a86e0a..8c4f8a9d4c 100644
--- a/src/components/transport_manager/include/transport_manager/usb/usb_control_transfer.h
+++ b/src/components/transport_manager/include/transport_manager/usb/usb_control_transfer.h
@@ -1,4 +1,4 @@
-/*
+/**
* \file aoa_common.h
* \brief Google AOA protocol header file.
*
diff --git a/src/components/transport_manager/include/transport_manager/usb/usb_device_scanner.h b/src/components/transport_manager/include/transport_manager/usb/usb_device_scanner.h
index 9efb7ba58d..0937222155 100644
--- a/src/components/transport_manager/include/transport_manager/usb/usb_device_scanner.h
+++ b/src/components/transport_manager/include/transport_manager/usb/usb_device_scanner.h
@@ -1,4 +1,4 @@
-/*
+/**
* \file usb_device_scanner.h
* \brief UsbDeviceScanner class header file.
*
@@ -38,7 +38,8 @@
#include <list>
-#include "utils/lock.h"
+#include <pthread.h>
+
#include "transport_manager/transport_adapter/device_scanner.h"
#include "transport_manager/usb/common.h"
@@ -68,7 +69,7 @@ class UsbDeviceScanner : public DeviceScanner, public UsbDeviceListener {
typedef std::list<PlatformUsbDevice*> Devices;
Devices devices_;
- sync_primitives::Lock devices_mutex_;
+ pthread_mutex_t devices_mutex_;
};
} // namespace
diff --git a/src/components/transport_manager/src/bluetooth/bluetooth_connection_factory.cc b/src/components/transport_manager/src/bluetooth/bluetooth_connection_factory.cc
index 02224baf4e..421104422b 100644
--- a/src/components/transport_manager/src/bluetooth/bluetooth_connection_factory.cc
+++ b/src/components/transport_manager/src/bluetooth/bluetooth_connection_factory.cc
@@ -1,4 +1,4 @@
-/*
+/**
* \file bluetooth_connection_factory.cc
* \brief BluetoothConnectionFactory class source file.
*
diff --git a/src/components/transport_manager/src/bluetooth/bluetooth_device.cc b/src/components/transport_manager/src/bluetooth/bluetooth_device.cc
index c8061a7ac5..1a47f6c7ff 100644
--- a/src/components/transport_manager/src/bluetooth/bluetooth_device.cc
+++ b/src/components/transport_manager/src/bluetooth/bluetooth_device.cc
@@ -33,13 +33,6 @@
#include "transport_manager/bluetooth/bluetooth_device.h"
-#include <bluetooth/bluetooth.h>
-#include <bluetooth/hci.h>
-#include <bluetooth/hci_lib.h>
-#include <bluetooth/sdp.h>
-#include <bluetooth/sdp_lib.h>
-#include <bluetooth/rfcomm.h>
-
#include <errno.h>
#include <sys/types.h>
#include <sys/socket.h>
diff --git a/src/components/transport_manager/src/bluetooth/bluetooth_device_scanner.cc b/src/components/transport_manager/src/bluetooth/bluetooth_device_scanner.cc
index 0fbb9d2245..547dc463b2 100644
--- a/src/components/transport_manager/src/bluetooth/bluetooth_device_scanner.cc
+++ b/src/components/transport_manager/src/bluetooth/bluetooth_device_scanner.cc
@@ -1,4 +1,4 @@
-/*
+/**
* \file bluetooth_device_scanner.cc
* \brief BluetoothDeviceScanner class header file.
*
@@ -52,7 +52,6 @@
#include "transport_manager/bluetooth/bluetooth_device.h"
#include "utils/logger.h"
-#include "utils/threads/thread.h"
namespace transport_manager {
namespace transport_adapter {
@@ -118,45 +117,44 @@ BluetoothDeviceScanner::BluetoothDeviceScanner(
};
sdp_uuid128_create(&smart_device_link_service_uuid_,
smart_device_link_service_uuid_data);
- thread_ = threads::CreateThread("BT Device Scaner",
- new BluetoothDeviceScannerDelegate(this));
+ thread_ = threads::CreateThread("BT Device Scaner", new BluetoothDeviceScannerDelegate(this));
}
BluetoothDeviceScanner::~BluetoothDeviceScanner() {
- thread_->join();
- delete thread_->delegate();
- threads::DeleteThread(thread_);
}
bool BluetoothDeviceScanner::IsInitialised() const {
- return thread_ && thread_->is_running();
+ return thread_->is_running();
}
void BluetoothDeviceScanner::UpdateTotalDeviceList() {
- LOG4CXX_AUTO_TRACE(logger_);
+ LOG4CXX_TRACE(logger_, "enter");
DeviceVector devices;
devices.insert(devices.end(), paired_devices_with_sdl_.begin(),
paired_devices_with_sdl_.end());
devices.insert(devices.end(), found_devices_with_sdl_.begin(),
found_devices_with_sdl_.end());
controller_->SearchDeviceDone(devices);
+ LOG4CXX_TRACE(logger_, "exit");
}
void BluetoothDeviceScanner::DoInquiry() {
- LOG4CXX_AUTO_TRACE(logger_);
+ LOG4CXX_TRACE(logger_, "enter");
const int device_id = hci_get_route(0);
if (device_id < 0) {
LOG4CXX_INFO(logger_, "HCI device is not available");
shutdown_requested_ = true;
controller_->SearchDeviceFailed(SearchDeviceError());
+ LOG4CXX_TRACE(logger_, "exit. Condition: device_id < 0");
return;
}
int device_handle = hci_open_dev(device_id);
if (device_handle < 0) {
controller_->SearchDeviceFailed(SearchDeviceError());
+ LOG4CXX_TRACE(logger_, "exit. Condition: device_handle < 0");
return;
}
@@ -205,6 +203,8 @@ void BluetoothDeviceScanner::DoInquiry() {
LOG4CXX_DEBUG(logger_, "number_of_devices < 0");
controller_->SearchDeviceFailed(SearchDeviceError());
}
+
+ LOG4CXX_TRACE(logger_, "exit");
}
void BluetoothDeviceScanner::CheckSDLServiceOnDevices(
@@ -371,7 +371,7 @@ bool BluetoothDeviceScanner::DiscoverSmartDeviceLinkRFCOMMChannels(
}
void BluetoothDeviceScanner::Thread() {
- LOG4CXX_AUTO_TRACE(logger_);
+ LOG4CXX_TRACE(logger_, "enter");
ready_ = true;
if (auto_repeat_search_) {
while (!shutdown_requested_) {
@@ -394,10 +394,12 @@ void BluetoothDeviceScanner::Thread() {
device_scan_requested_ = false;
}
}
+
+ LOG4CXX_TRACE(logger_, "exit");
}
void BluetoothDeviceScanner::TimedWaitForDeviceScanRequest() {
- LOG4CXX_AUTO_TRACE(logger_);
+ LOG4CXX_TRACE(logger_, "enter");
if (auto_repeat_pause_sec_ == 0) {
LOG4CXX_TRACE(logger_, "exit. Condition: auto_repeat_pause_sec_ == 0");
@@ -415,22 +417,26 @@ void BluetoothDeviceScanner::TimedWaitForDeviceScanRequest() {
}
}
}
+
+ LOG4CXX_TRACE(logger_, "exit");
}
TransportAdapter::Error BluetoothDeviceScanner::Init() {
- LOG4CXX_AUTO_TRACE(logger_);
+ LOG4CXX_TRACE(logger_, "enter");
if(!thread_->start()) {
LOG4CXX_ERROR(logger_, "Bluetooth device scanner thread start failed");
+ LOG4CXX_TRACE(logger_, "exit with TransportAdapter:Fail");
return TransportAdapter::FAIL;
}
LOG4CXX_INFO(logger_, "Bluetooth device scanner thread started");
+ LOG4CXX_TRACE(logger_, "exit with TransportAdapter:OK");
return TransportAdapter::OK;
}
void BluetoothDeviceScanner::Terminate() {
- LOG4CXX_AUTO_TRACE(logger_);
+ LOG4CXX_TRACE(logger_, "enter");
shutdown_requested_ = true;
- if (thread_) {
+ if (thread_->is_running()) {
{
sync_primitives::AutoLock auto_lock(device_scan_requested_lock_);
device_scan_requested_ = false;
@@ -439,30 +445,36 @@ void BluetoothDeviceScanner::Terminate() {
LOG4CXX_INFO(logger_,
"Waiting for bluetooth device scanner thread termination");
thread_->stop();
- LOG4CXX_INFO(logger_, "Bluetooth device scanner thread stopped");
+ LOG4CXX_INFO(logger_, "PASA Bluetooth device scanner thread joined");
}
+ LOG4CXX_TRACE(logger_, "exit");
}
TransportAdapter::Error BluetoothDeviceScanner::Scan() {
- LOG4CXX_AUTO_TRACE(logger_);
+ LOG4CXX_TRACE(logger_, "enter");
if ((!IsInitialised()) || shutdown_requested_) {
- LOG4CXX_WARN(logger_, "BAD_STATE");
+ LOG4CXX_TRACE(logger_, "exit with TransportAdapter::BAD_STATE");
return TransportAdapter::BAD_STATE;
}
if (auto_repeat_pause_sec_ == 0) {
+ LOG4CXX_TRACE(logger_, "exit with TransportAdapter::OK");
return TransportAdapter::OK;
}
TransportAdapter::Error ret = TransportAdapter::OK;
- sync_primitives::AutoLock auto_lock(device_scan_requested_lock_);
- if (!device_scan_requested_) {
- LOG4CXX_TRACE(logger_, "Requesting device Scan");
- device_scan_requested_ = true;
- device_scan_requested_cv_.NotifyOne();
- } else {
- ret = TransportAdapter::BAD_STATE;
- LOG4CXX_WARN(logger_, "BAD_STATE");
+ {
+ sync_primitives::AutoLock auto_lock(device_scan_requested_lock_);
+ if (false == device_scan_requested_) {
+ LOG4CXX_INFO(logger_, "Requesting device Scan");
+ device_scan_requested_ = true;
+ device_scan_requested_cv_.NotifyOne();
+ } else {
+ ret = TransportAdapter::BAD_STATE;
+ LOG4CXX_INFO(logger_, "Device Scan is currently in progress");
+ }
}
+
+ LOG4CXX_TRACE(logger_, "exit with Error: " << ret);
return ret;
}
@@ -471,10 +483,12 @@ BluetoothDeviceScanner::BluetoothDeviceScannerDelegate::BluetoothDeviceScannerDe
: scanner_(scanner) {
}
-void BluetoothDeviceScanner::BluetoothDeviceScannerDelegate::threadMain() {
- LOG4CXX_AUTO_TRACE(logger_);
+void BluetoothDeviceScanner::BluetoothDeviceScannerDelegate::threadMain()
+{
+ LOG4CXX_TRACE_ENTER(logger_);
DCHECK(scanner_);
scanner_->Thread();
+ LOG4CXX_TRACE_EXIT(logger_);
}
} // namespace transport_adapter
diff --git a/src/components/transport_manager/src/bluetooth/bluetooth_socket_connection.cc b/src/components/transport_manager/src/bluetooth/bluetooth_socket_connection.cc
index d6f9f26317..ac1ccecfb5 100644
--- a/src/components/transport_manager/src/bluetooth/bluetooth_socket_connection.cc
+++ b/src/components/transport_manager/src/bluetooth/bluetooth_socket_connection.cc
@@ -1,4 +1,4 @@
-/*
+/**
*
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
@@ -60,8 +60,7 @@ BluetoothSocketConnection::~BluetoothSocketConnection() {
}
bool BluetoothSocketConnection::Establish(ConnectError** error) {
- LOG4CXX_AUTO_TRACE(logger_);
- LOG4CXX_DEBUG(logger_, "error: " << error);
+ LOG4CXX_TRACE(logger_, "enter. (#" << pthread_self() << "), error: " << error);
DeviceSptr device = controller()->FindDevice(device_handle());
BluetoothDevice* bluetooth_device =
diff --git a/src/components/transport_manager/src/bluetooth/bluetooth_transport_adapter.cc b/src/components/transport_manager/src/bluetooth/bluetooth_transport_adapter.cc
index 51ceebe5de..7d60213b01 100644
--- a/src/components/transport_manager/src/bluetooth/bluetooth_transport_adapter.cc
+++ b/src/components/transport_manager/src/bluetooth/bluetooth_transport_adapter.cc
@@ -1,4 +1,4 @@
-/*
+/**
* \file bluetooth_transport_adapter.cc
* \brief BluetoothTransportAdapter class source file.
*
diff --git a/src/components/transport_manager/src/tcp/dnssd_service_browser.cc b/src/components/transport_manager/src/tcp/dnssd_service_browser.cc
index e8ba2ea874..5580585766 100644
--- a/src/components/transport_manager/src/tcp/dnssd_service_browser.cc
+++ b/src/components/transport_manager/src/tcp/dnssd_service_browser.cc
@@ -1,4 +1,4 @@
-/*
+/**
*
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
@@ -56,15 +56,12 @@ void DnssdServiceBrowser::Terminate() {
}
if (0 != avahi_service_browser_) {
avahi_service_browser_free(avahi_service_browser_);
- avahi_service_browser_ = NULL;
}
if (0 != avahi_client_) {
avahi_client_free(avahi_client_);
- avahi_client_ = NULL;
}
if (0 != avahi_threaded_poll_) {
avahi_threaded_poll_free(avahi_threaded_poll_);
- avahi_threaded_poll_ = NULL;
}
LOG4CXX_TRACE(logger_, "exit");
}
@@ -81,9 +78,11 @@ DnssdServiceBrowser::DnssdServiceBrowser(TransportAdapterController* controller)
service_records_(),
mutex_(),
initialised_(false) {
+ pthread_mutex_init(&mutex_, 0);
}
DnssdServiceBrowser::~DnssdServiceBrowser() {
+ pthread_mutex_destroy(&mutex_);
}
void DnssdServiceBrowser::OnClientConnected() {
@@ -173,8 +172,8 @@ void AvahiServiceBrowserCallback(AvahiServiceBrowser* avahi_service_browser,
void DnssdServiceBrowser::ServiceResolved(
const DnssdServiceRecord& service_record) {
- LOG4CXX_AUTO_TRACE(logger_);
- sync_primitives::AutoLock locker(mutex_);
+ LOG4CXX_TRACE(logger_, "enter");
+ pthread_mutex_lock(&mutex_);
ServiceRecords::iterator service_record_it = std::find(
service_records_.begin(), service_records_.end(), service_record);
if (service_record_it != service_records_.end()) {
@@ -182,19 +181,23 @@ void DnssdServiceBrowser::ServiceResolved(
}
DeviceVector device_vector = PrepareDeviceVector();
controller_->SearchDeviceDone(device_vector);
+ pthread_mutex_unlock(&mutex_);
+ LOG4CXX_TRACE(logger_, "exit");
}
void DnssdServiceBrowser::ServiceResolveFailed(
const DnssdServiceRecord& service_record) {
- LOG4CXX_AUTO_TRACE(logger_);
- LOG4CXX_DEBUG(logger_,
+ LOG4CXX_TRACE(logger_, "enter");
+ LOG4CXX_ERROR(logger_,
"AvahiServiceResolver failure for: " << service_record.name);
- sync_primitives::AutoLock locker(mutex_);
+ pthread_mutex_lock(&mutex_);
ServiceRecords::iterator service_record_it = std::find(
service_records_.begin(), service_records_.end(), service_record);
if (service_record_it != service_records_.end()) {
service_records_.erase(service_record_it);
}
+ pthread_mutex_unlock(&mutex_);
+ LOG4CXX_TRACE(logger_, "exit");
}
void AvahiServiceResolverCallback(AvahiServiceResolver* avahi_service_resolver,
@@ -243,11 +246,9 @@ TransportAdapter::Error DnssdServiceBrowser::CreateAvahiClientAndBrowser() {
LOG4CXX_TRACE(logger_, "enter");
if (0 != avahi_service_browser_) {
avahi_service_browser_free(avahi_service_browser_);
- avahi_service_browser_ = NULL;
}
if (0 != avahi_client_) {
avahi_client_free(avahi_client_);
- avahi_client_ = NULL;
}
int avahi_error;
@@ -260,9 +261,9 @@ TransportAdapter::Error DnssdServiceBrowser::CreateAvahiClientAndBrowser() {
return TransportAdapter::FAIL;
}
- mutex_.Acquire();
+ pthread_mutex_lock(&mutex_);
service_records_.clear();
- mutex_.Release();
+ pthread_mutex_unlock(&mutex_);
avahi_service_browser_ = avahi_service_browser_new(
avahi_client_, AVAHI_IF_UNSPEC, /* TODO use only required iface */
@@ -304,8 +305,7 @@ TransportAdapter::Error DnssdServiceBrowser::Scan() {
void DnssdServiceBrowser::AddService(AvahiIfIndex interface,
AvahiProtocol protocol, const char* name,
const char* type, const char* domain) {
- LOG4CXX_AUTO_TRACE(logger_);
- LOG4CXX_DEBUG(logger_, "interface " << interface << " protocol " << protocol <<
+ LOG4CXX_TRACE(logger_, "enter: interface " << interface << " protocol " << protocol <<
" name " << name << " type " << type << " domain " << domain);
DnssdServiceRecord record;
record.interface = interface;
@@ -314,7 +314,7 @@ void DnssdServiceBrowser::AddService(AvahiIfIndex interface,
record.name = name;
record.type = type;
- sync_primitives::AutoLock locker(mutex_);
+ pthread_mutex_lock(&mutex_);
if (service_records_.end()
== std::find(service_records_.begin(), service_records_.end(), record)) {
service_records_.push_back(record);
@@ -323,14 +323,15 @@ void DnssdServiceBrowser::AddService(AvahiIfIndex interface,
AVAHI_PROTO_INET, static_cast<AvahiLookupFlags>(0),
AvahiServiceResolverCallback, this);
}
+ pthread_mutex_unlock(&mutex_);
+ LOG4CXX_TRACE(logger_, "exit");
}
void DnssdServiceBrowser::RemoveService(AvahiIfIndex interface,
AvahiProtocol protocol,
const char* name, const char* type,
const char* domain) {
- LOG4CXX_AUTO_TRACE(logger_);
- LOG4CXX_DEBUG(logger_, "interface " << interface << " protocol " << protocol <<
+ LOG4CXX_TRACE(logger_, "enter: interface " << interface << " protocol " << protocol <<
" name " << name << " type " << type << " domain " << domain);
DnssdServiceRecord record;
record.interface = interface;
@@ -339,14 +340,16 @@ void DnssdServiceBrowser::RemoveService(AvahiIfIndex interface,
record.type = type;
record.domain_name = domain;
- sync_primitives::AutoLock locker(mutex_);
+ pthread_mutex_lock(&mutex_);
service_records_.erase(
std::remove(service_records_.begin(), service_records_.end(), record),
service_records_.end());
+ pthread_mutex_unlock(&mutex_);
+ LOG4CXX_TRACE(logger_, "exit");
}
DeviceVector DnssdServiceBrowser::PrepareDeviceVector() const {
- LOG4CXX_AUTO_TRACE(logger_);
+ LOG4CXX_TRACE(logger_, "enter");
std::map<uint32_t, TcpDevice*> devices;
for (ServiceRecords::const_iterator it = service_records_.begin();
it != service_records_.end(); ++it) {
@@ -369,6 +372,7 @@ DeviceVector DnssdServiceBrowser::PrepareDeviceVector() const {
it != devices.end(); ++it) {
device_vector.push_back(DeviceSptr(it->second));
}
+ LOG4CXX_TRACE(logger_, "exit");
return device_vector;
}
diff --git a/src/components/transport_manager/src/tcp/tcp_client_listener.cc b/src/components/transport_manager/src/tcp/tcp_client_listener.cc
index 954c734d68..c0f39cc490 100644
--- a/src/components/transport_manager/src/tcp/tcp_client_listener.cc
+++ b/src/components/transport_manager/src/tcp/tcp_client_listener.cc
@@ -53,7 +53,7 @@
#include <sstream>
#include "utils/logger.h"
-#include "utils/threads/thread.h"
+
#include "transport_manager/transport_adapter/transport_adapter_controller.h"
#include "transport_manager/tcp/tcp_device.h"
#include "transport_manager/tcp/tcp_socket_connection.h"
@@ -66,35 +66,31 @@ CREATE_LOGGERPTR_GLOBAL(logger_, "TransportManager")
TcpClientListener::TcpClientListener(TransportAdapterController* controller,
const uint16_t port,
const bool enable_keepalive)
- : port_(port),
- enable_keepalive_(enable_keepalive),
- controller_(controller),
- thread_(0),
- socket_(-1),
- thread_stop_requested_(false) {
- thread_ = threads::CreateThread("TcpClientListener",
- new ListeningThreadDelegate(this));
-}
+ : port_(port),
+ enable_keepalive_(enable_keepalive),
+ controller_(controller),
+ thread_(threads::CreateThread("TcpClientListener", this)),
+ socket_(-1),
+ thread_stop_requested_(false) { }
TransportAdapter::Error TcpClientListener::Init() {
- LOG4CXX_AUTO_TRACE(logger_);
- thread_stop_requested_ = false;
return TransportAdapter::OK;
}
void TcpClientListener::Terminate() {
- thread_->stop();
+ LOG4CXX_TRACE(logger_, "enter");
+ if (TransportAdapter::OK != StopListening()) {
+ LOG4CXX_ERROR(logger_, "Cannot stop listening TCP");
+ }
+ LOG4CXX_TRACE(logger_, "exit");
}
bool TcpClientListener::IsInitialised() const {
- return thread_;
+ return true;
}
TcpClientListener::~TcpClientListener() {
- LOG4CXX_AUTO_TRACE(logger_);
- thread_->join();
- delete thread_->delegate();
- threads::DeleteThread(thread_);
+ LOG4CXX_INFO(logger_, "destructor");
}
void SetKeepaliveOptions(const int fd) {
@@ -134,7 +130,7 @@ void SetKeepaliveOptions(const int fd) {
mib[3] = TCPCTL_KEEPINTVL;
sysctl(mib, kMidLength, NULL, NULL, &keepintvl, sizeof(keepintvl));
- struct timeval tval = {0};
+ struct timeval tval = { 0 };
tval.tv_sec = keepidle;
setsockopt(fd, SOL_SOCKET, SO_KEEPALIVE, &yes, sizeof(yes));
setsockopt(fd, IPPROTO_TCP, TCP_KEEPALIVE, &tval, sizeof(tval));
@@ -142,13 +138,12 @@ void SetKeepaliveOptions(const int fd) {
LOG4CXX_TRACE(logger_, "exit");
}
-void TcpClientListener::Loop() {
+void TcpClientListener::threadMain() {
LOG4CXX_TRACE(logger_, "enter");
while (!thread_stop_requested_) {
sockaddr_in client_address;
socklen_t client_address_size = sizeof(client_address);
- const int connection_fd = accept(socket_,
- (struct sockaddr*) &client_address,
+ const int connection_fd = accept(socket_, (struct sockaddr*)&client_address,
&client_address_size);
if (thread_stop_requested_) {
LOG4CXX_DEBUG(logger_, "thread_stop_requested_");
@@ -162,7 +157,6 @@ void TcpClientListener::Loop() {
if (AF_INET != client_address.sin_family) {
LOG4CXX_DEBUG(logger_, "Address of connected client is invalid");
- close(connection_fd);
continue;
}
@@ -175,16 +169,15 @@ void TcpClientListener::Loop() {
SetKeepaliveOptions(connection_fd);
}
- TcpDevice* tcp_device = new TcpDevice(client_address.sin_addr.s_addr,
- device_name);
+ TcpDevice* tcp_device = new TcpDevice(client_address.sin_addr.s_addr, device_name);
DeviceSptr device = controller_->AddDevice(tcp_device);
tcp_device = static_cast<TcpDevice*>(device.get());
const ApplicationHandle app_handle = tcp_device->AddIncomingApplication(
- connection_fd);
+ connection_fd);
TcpSocketConnection* connection(
- new TcpSocketConnection(device->unique_device_id(), app_handle,
- controller_));
+ new TcpSocketConnection(device->unique_device_id(), app_handle,
+ controller_));
connection->set_socket(connection_fd);
const TransportAdapter::Error error = connection->Start();
if (error != TransportAdapter::OK) {
@@ -194,26 +187,11 @@ void TcpClientListener::Loop() {
LOG4CXX_TRACE(logger_, "exit");
}
-void TcpClientListener::StopLoop() {
- LOG4CXX_AUTO_TRACE(logger_);
- thread_stop_requested_ = true;
- // We need to connect to the listening socket to unblock accept() call
- int byesocket = socket(AF_INET, SOCK_STREAM, 0);
- sockaddr_in server_address = { 0 };
- server_address.sin_family = AF_INET;
- server_address.sin_port = htons(port_);
- server_address.sin_addr.s_addr = INADDR_ANY;
- connect(byesocket, (sockaddr*) &server_address, sizeof(server_address));
- shutdown(byesocket, SHUT_RDWR);
- close(byesocket);
-}
-
TransportAdapter::Error TcpClientListener::StartListening() {
LOG4CXX_TRACE(logger_, "enter");
- if (!thread_ || thread_->is_running()) {
- LOG4CXX_TRACE(
- logger_,
- "exit with TransportAdapter::BAD_STATE. Condition: thread_started_");
+ if (thread_->is_running()) {
+ LOG4CXX_TRACE(logger_,
+ "exit with TransportAdapter::BAD_STATE. Condition: thread_started_");
return TransportAdapter::BAD_STATE;
}
@@ -221,8 +199,7 @@ TransportAdapter::Error TcpClientListener::StartListening() {
if (-1 == socket_) {
LOG4CXX_ERROR_WITH_ERRNO(logger_, "Failed to create socket");
- LOG4CXX_TRACE(logger_,
- "exit with TransportAdapter::FAIL. Condition: -1 == socket_");
+ LOG4CXX_TRACE(logger_, "exit with TransportAdapter::FAIL. Condition: -1 == socket_");
return TransportAdapter::FAIL;
}
@@ -236,17 +213,15 @@ TransportAdapter::Error TcpClientListener::StartListening() {
if (0 != bind(socket_, (sockaddr*) &server_address, sizeof(server_address))) {
LOG4CXX_ERROR_WITH_ERRNO(logger_, "bind() failed");
- LOG4CXX_TRACE(
- logger_,
- "exit with TransportAdapter::FAIL. Condition: 0 != bind(socket_, (sockaddr*) &server_address, sizeof(server_address))");
+ LOG4CXX_TRACE(logger_,
+ "exit with TransportAdapter::FAIL. Condition: 0 != bind(socket_, (sockaddr*) &server_address, sizeof(server_address))");
return TransportAdapter::FAIL;
}
if (0 != listen(socket_, 128)) {
LOG4CXX_ERROR_WITH_ERRNO(logger_, "listen() failed");
- LOG4CXX_TRACE(
- logger_,
- "exit with TransportAdapter::FAIL. Condition: 0 != listen(socket_, 128)");
+ LOG4CXX_TRACE(logger_,
+ "exit with TransportAdapter::FAIL. Condition: 0 != listen(socket_, 128)");
return TransportAdapter::FAIL;
}
@@ -260,29 +235,33 @@ TransportAdapter::Error TcpClientListener::StartListening() {
return TransportAdapter::OK;
}
-void TcpClientListener::ListeningThreadDelegate::exitThreadMain() {
- parent_->StopLoop();
-}
-
-void TcpClientListener::ListeningThreadDelegate::threadMain() {
- parent_->Loop();
-}
-
-TcpClientListener::ListeningThreadDelegate::ListeningThreadDelegate(
- TcpClientListener* parent)
- : parent_(parent) {
+bool TcpClientListener::exitThreadMain() {
+ StopListening();
+ return true;
}
TransportAdapter::Error TcpClientListener::StopListening() {
- LOG4CXX_AUTO_TRACE(logger_);
- if (!thread_ || !thread_->is_running()) {
- LOG4CXX_TRACE(logger_, "TcpClientListener is not running now");
+ LOG4CXX_TRACE(logger_, "enter");
+ if (!thread_->is_running()) {
+ LOG4CXX_TRACE(logger_,
+ "exit with TransportAdapter::BAD_STATE. Condition !thread_started_");
return TransportAdapter::BAD_STATE;
}
- thread_->stop();
+ thread_stop_requested_ = true;
+ // We need to connect to the listening socket to unblock accept() call
+ int byesocket = socket(AF_INET, SOCK_STREAM, 0);
+ sockaddr_in server_address = { 0 };
+ server_address.sin_family = AF_INET;
+ server_address.sin_port = htons(port_);
+ server_address.sin_addr.s_addr = INADDR_ANY;
+ connect(byesocket, (sockaddr*)&server_address, sizeof(server_address));
+ shutdown(byesocket, SHUT_RDWR);
+ close(byesocket);
+ LOG4CXX_DEBUG(logger_, "Tcp client listener thread terminated");
close(socket_);
socket_ = -1;
+ LOG4CXX_TRACE(logger_, "exit with TransportAdapter::OK");
return TransportAdapter::OK;
}
diff --git a/src/components/transport_manager/src/tcp/tcp_connection_factory.cc b/src/components/transport_manager/src/tcp/tcp_connection_factory.cc
index a8c2bda600..69173a0e06 100644
--- a/src/components/transport_manager/src/tcp/tcp_connection_factory.cc
+++ b/src/components/transport_manager/src/tcp/tcp_connection_factory.cc
@@ -1,4 +1,4 @@
-/*
+/**
*
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
diff --git a/src/components/transport_manager/src/tcp/tcp_device.cc b/src/components/transport_manager/src/tcp/tcp_device.cc
index 130187c384..2540c26ed0 100644
--- a/src/components/transport_manager/src/tcp/tcp_device.cc
+++ b/src/components/transport_manager/src/tcp/tcp_device.cc
@@ -1,4 +1,4 @@
-/*
+/**
*
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
@@ -43,9 +43,9 @@ CREATE_LOGGERPTR_GLOBAL(logger_, "TransportManager")
TcpDevice::TcpDevice(const in_addr_t& in_addr, const std::string& name)
:
Device(name, name),
- applications_mutex_(),
in_addr_(in_addr),
last_handle_(0) {
+ pthread_mutex_init(&applications_mutex_, 0);
}
bool TcpDevice::IsSameAs(const Device* other) const {
@@ -63,53 +63,57 @@ bool TcpDevice::IsSameAs(const Device* other) const {
}
ApplicationList TcpDevice::GetApplicationList() const {
- LOG4CXX_AUTO_TRACE(logger_);
- sync_primitives::AutoLock locker(applications_mutex_);
+ LOG4CXX_TRACE(logger_, "enter");
+ pthread_mutex_lock(&applications_mutex_);
ApplicationList app_list;
for (std::map<ApplicationHandle, Application>::const_iterator it =
applications_.begin(); it != applications_.end(); ++it) {
app_list.push_back(it->first);
}
+ pthread_mutex_unlock(&applications_mutex_);
+ LOG4CXX_TRACE(logger_, "exit with app_list. It's size = " << app_list.size());
return app_list;
}
ApplicationHandle TcpDevice::AddIncomingApplication(int socket_fd) {
- LOG4CXX_AUTO_TRACE(logger_);
- LOG4CXX_DEBUG(logger_, "Socket_fd: " << socket_fd);
+ LOG4CXX_TRACE(logger_, "enter. Socket_fd: " << socket_fd);
Application app;
app.incoming = true;
app.socket = socket_fd;
app.port = 0; // this line removes compiler warning
- sync_primitives::AutoLock locker(applications_mutex_);
+ pthread_mutex_lock(&applications_mutex_);
const ApplicationHandle app_handle = ++last_handle_;
applications_[app_handle] = app;
- LOG4CXX_DEBUG(logger_, "App_handle " << app_handle);
+ pthread_mutex_unlock(&applications_mutex_);
+ LOG4CXX_TRACE(logger_, "exit with app_handle " << app_handle);
return app_handle;
}
ApplicationHandle TcpDevice::AddDiscoveredApplication(int port) {
- LOG4CXX_AUTO_TRACE(logger_);
- LOG4CXX_DEBUG(logger_, "Port " << port);
+ LOG4CXX_TRACE(logger_, "enter. port " << port);
Application app;
app.incoming = false;
app.socket = 0; // this line removes compiler warning
app.port = port;
- sync_primitives::AutoLock locker(applications_mutex_);
+ pthread_mutex_lock(&applications_mutex_);
const ApplicationHandle app_handle = ++last_handle_;
applications_[app_handle] = app;
- LOG4CXX_DEBUG(logger_, "App_handle " << app_handle);
+ pthread_mutex_unlock(&applications_mutex_);
+ LOG4CXX_TRACE(logger_, "exit with app_handle " << app_handle);
return app_handle;
}
void TcpDevice::RemoveApplication(const ApplicationHandle app_handle) {
- LOG4CXX_AUTO_TRACE(logger_);
- LOG4CXX_DEBUG(logger_, "ApplicationHandle: " << app_handle);
- sync_primitives::AutoLock locker(applications_mutex_);
+ LOG4CXX_TRACE(logger_, "enter. ApplicationHandle: " << app_handle);
+ pthread_mutex_lock(&applications_mutex_);
applications_.erase(app_handle);
+ pthread_mutex_unlock(&applications_mutex_);
+ LOG4CXX_TRACE(logger_, "exit");
}
TcpDevice::~TcpDevice() {
+ pthread_mutex_destroy(&applications_mutex_);
}
int TcpDevice::GetApplicationSocket(const ApplicationHandle app_handle) const {
diff --git a/src/components/transport_manager/src/tcp/tcp_socket_connection.cc b/src/components/transport_manager/src/tcp/tcp_socket_connection.cc
index a1160a84a8..3b208d8a07 100644
--- a/src/components/transport_manager/src/tcp/tcp_socket_connection.cc
+++ b/src/components/transport_manager/src/tcp/tcp_socket_connection.cc
@@ -1,4 +1,4 @@
-/*
+/**
*
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
@@ -35,12 +35,10 @@
#include "transport_manager/tcp/tcp_socket_connection.h"
#include "transport_manager/tcp/tcp_device.h"
#include "utils/logger.h"
-#include "utils/threads/thread.h"
#include <memory.h>
#include <signal.h>
#include <errno.h>
-#include <unistd.h>
namespace transport_manager {
namespace transport_adapter {
@@ -109,9 +107,6 @@ bool TcpServerOiginatedSocketConnection::Establish(ConnectError** error) {
<< application_handle() << ", error " << errno);
*error = new ConnectError();
LOG4CXX_TRACE(logger_, "exit with FALSE. Condition: failed to connect to application");
-
- ::close(socket);
-
return false;
}
diff --git a/src/components/transport_manager/src/tcp/tcp_transport_adapter.cc b/src/components/transport_manager/src/tcp/tcp_transport_adapter.cc
index 6c4ee0cd89..3747225a89 100644
--- a/src/components/transport_manager/src/tcp/tcp_transport_adapter.cc
+++ b/src/components/transport_manager/src/tcp/tcp_transport_adapter.cc
@@ -1,4 +1,5 @@
-/*
+/**
+ *
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
@@ -35,7 +36,6 @@
#include <errno.h>
#include <sstream>
#include <cstdlib>
-#include <stdio.h>
#include "resumption/last_state.h"
@@ -101,7 +101,7 @@ void TcpTransportAdapter::Store() const {
if (port != -1) { // don't want to store incoming applications
Json::Value application_dictionary;
char port_record[12];
- snprintf(port_record, sizeof(port_record), "%d", port);
+ sprintf(port_record, "%d", port);
application_dictionary["port"] = std::string(port_record);
applications_dictionary.append(application_dictionary);
}
diff --git a/src/components/transport_manager/src/transport_adapter/threaded_socket_connection.cc b/src/components/transport_manager/src/transport_adapter/threaded_socket_connection.cc
index 7bd54d337b..1e189ed101 100644
--- a/src/components/transport_manager/src/transport_adapter/threaded_socket_connection.cc
+++ b/src/components/transport_manager/src/transport_adapter/threaded_socket_connection.cc
@@ -1,4 +1,4 @@
-/*
+/**
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
@@ -36,9 +36,7 @@
#include <unistd.h>
#include <sys/types.h>
#include <sys/socket.h>
-
#include "utils/logger.h"
-#include "utils/threads/thread.h"
#include "transport_manager/transport_adapter/threaded_socket_connection.h"
#include "transport_manager/transport_adapter/transport_adapter_controller.h"
@@ -57,43 +55,42 @@ ThreadedSocketConnection::ThreadedSocketConnection(
terminate_flag_(false),
unexpected_disconnect_(false),
device_uid_(device_id),
- app_handle_(app_handle),
- thread_(NULL) {
+ app_handle_(app_handle)
+ {
+ pthread_mutex_init(&frames_to_send_mutex_, 0);
}
ThreadedSocketConnection::~ThreadedSocketConnection() {
terminate_flag_ = true;
Notify();
- if (thread_) {
- thread_->join();
- delete thread_->delegate();
- threads::DeleteThread(thread_);
- }
+ pthread_mutex_destroy(&frames_to_send_mutex_);
+
}
void ThreadedSocketConnection::Abort() {
- LOG4CXX_AUTO_TRACE(logger_);
+ LOG4CXX_TRACE(logger_, "enter");
unexpected_disconnect_ = true;
terminate_flag_ = true;
+ LOG4CXX_TRACE(logger_, "exit");
}
TransportAdapter::Error ThreadedSocketConnection::Start() {
- LOG4CXX_AUTO_TRACE(logger_);
+ LOG4CXX_TRACE(logger_, "enter");
int fds[2];
const int pipe_ret = pipe(fds);
if (0 == pipe_ret) {
- LOG4CXX_DEBUG(logger_, "pipe created");
+ LOG4CXX_DEBUG(logger_, "pipe created(#" << pthread_self() << ")");
read_fd_ = fds[0];
write_fd_ = fds[1];
} else {
- LOG4CXX_WARN(logger_, "pipe creation failed");
+ LOG4CXX_WARN(logger_, "pipe creation failed (#" << pthread_self() << ")");
LOG4CXX_TRACE(logger_, "exit with TransportAdapter::FAIL");
return TransportAdapter::FAIL;
}
const int fcntl_ret = fcntl(read_fd_, F_SETFL,
fcntl(read_fd_, F_GETFL) | O_NONBLOCK);
if (0 != fcntl_ret) {
- LOG4CXX_WARN(logger_, "fcntl failed");
+ LOG4CXX_WARN(logger_, "fcntl failed (#" << pthread_self() << ")");
LOG4CXX_TRACE(logger_, "exit with TransportAdapter::FAIL");
return TransportAdapter::FAIL;
}
@@ -102,23 +99,23 @@ TransportAdapter::Error ThreadedSocketConnection::Start() {
thread_ = threads::CreateThread(thread_name.c_str(), this);
if (!thread_->start()) {
- LOG4CXX_WARN(logger_, "thread creation failed");
+ LOG4CXX_WARN(logger_, "thread creation failed (#" << pthread_self() << ")");
LOG4CXX_TRACE(logger_, "exit with TransportAdapter::FAIL");
return TransportAdapter::FAIL;
}
- LOG4CXX_DEBUG(logger_, "thread created");
+ LOG4CXX_DEBUG(logger_, "thread created (#" << pthread_self() << ")");
LOG4CXX_TRACE(logger_, "exit with TransportAdapter::OK");
return TransportAdapter::OK;
}
void ThreadedSocketConnection::Finalize() {
- LOG4CXX_AUTO_TRACE(logger_);
+ LOG4CXX_TRACE(logger_, "enter");
if (unexpected_disconnect_) {
- LOG4CXX_DEBUG(logger_, "unexpected_disconnect");
+ LOG4CXX_DEBUG(logger_, "unexpected_disconnect (#" << pthread_self() << ")");
controller_->ConnectionAborted(device_handle(), application_handle(),
CommunicationError());
} else {
- LOG4CXX_DEBUG(logger_, "not unexpected_disconnect");
+ LOG4CXX_DEBUG(logger_, "not unexpected_disconnect (#" << pthread_self() << ")");
controller_->ConnectionFinished(device_handle(), application_handle());
}
close(socket_);
@@ -148,9 +145,9 @@ TransportAdapter::Error ThreadedSocketConnection::Notify() const {
TransportAdapter::Error ThreadedSocketConnection::SendData(
::protocol_handler::RawMessagePtr message) {
LOG4CXX_TRACE(logger_, "enter");
- frames_to_send_mutex_.Acquire();
+ pthread_mutex_lock(&frames_to_send_mutex_);
frames_to_send_.push(message);
- frames_to_send_mutex_.Release();
+ pthread_mutex_unlock(&frames_to_send_mutex_);
TransportAdapter::Error error = Notify();
LOG4CXX_TRACE(logger_, "exit with error" << error);
return error;
@@ -164,9 +161,10 @@ TransportAdapter::Error ThreadedSocketConnection::Disconnect() {
return error;
}
-void ThreadedSocketConnection::exitThreadMain() {
+bool ThreadedSocketConnection::exitThreadMain() {
terminate_flag_ = true;
Notify();
+ return true;
}
void ThreadedSocketConnection::threadMain() {
@@ -174,15 +172,15 @@ void ThreadedSocketConnection::threadMain() {
controller_->ConnectionCreated(this, device_uid_, app_handle_);
ConnectError* connect_error = NULL;
if (Establish(&connect_error)) {
- LOG4CXX_DEBUG(logger_, "Connection established");
+ LOG4CXX_DEBUG(logger_, "Connection established (#" << pthread_self() << ")");
controller_->ConnectDone(device_handle(), application_handle());
while (!terminate_flag_) {
Transmit();
}
- LOG4CXX_DEBUG(logger_, "Connection is to finalize");
+ LOG4CXX_DEBUG(logger_, "Connection is to finalize (#" << pthread_self() << ")");
Finalize();
while (!frames_to_send_.empty()) {
- LOG4CXX_INFO(logger_, "removing message");
+ LOG4CXX_INFO(logger_, "removing message (#" << pthread_self() << ")");
::protocol_handler::RawMessagePtr message = frames_to_send_.front();
frames_to_send_.pop();
controller_->DataSendFailed(device_handle(), application_handle(),
@@ -190,7 +188,7 @@ void ThreadedSocketConnection::threadMain() {
}
controller_->DisconnectDone(device_handle(), application_handle());
} else {
- LOG4CXX_ERROR(logger_, "Connection Establish failed");
+ LOG4CXX_ERROR(logger_, "Connection Establish failed (#" << pthread_self() << ")");
controller_->ConnectFailed(device_handle(), application_handle(),
*connect_error);
delete connect_error;
@@ -214,14 +212,14 @@ void ThreadedSocketConnection::Transmit() {
poll_fds[1].fd = read_fd_;
poll_fds[1].events = POLLIN | POLLPRI;
- LOG4CXX_DEBUG(logger_, "poll " << this);
+ LOG4CXX_DEBUG(logger_, "poll (#" << pthread_self() << ") " << this);
if (-1 == poll(poll_fds, poll_fds_size, -1)) {
LOG4CXX_ERROR_WITH_ERRNO(logger_, "poll failed for connection " << this);
Abort();
LOG4CXX_TRACE(logger_, "exit. Condition: -1 == poll(poll_fds, poll_fds_size, -1)");
return;
}
- LOG4CXX_DEBUG(logger_, "poll is ok " << this << " revents0:"
+ LOG4CXX_DEBUG(logger_, "poll is ok (#" << pthread_self() << ") " << this << " revents0:"
<<
std::hex << poll_fds[0].revents << " revents1:" << std::hex << poll_fds[1].revents);
// error check
@@ -258,12 +256,12 @@ void ThreadedSocketConnection::Transmit() {
// send data if possible
if (!frames_to_send_.empty() && (poll_fds[0].revents | POLLOUT)) {
- LOG4CXX_DEBUG(logger_, "frames_to_send_ not empty() ");
+ LOG4CXX_DEBUG(logger_, "frames_to_send_ not empty() (#" << pthread_self() << ")");
// send data
const bool send_ok = Send();
if (!send_ok) {
- LOG4CXX_ERROR(logger_, "Send() failed ");
+ LOG4CXX_ERROR(logger_, "Send() failed (#" << pthread_self() << ")");
Abort();
LOG4CXX_TRACE(logger_, "exit. Condition: !send_ok");
return;
@@ -274,7 +272,7 @@ void ThreadedSocketConnection::Transmit() {
if (poll_fds[0].revents & (POLLIN | POLLPRI)) {
const bool receive_ok = Receive();
if (!receive_ok) {
- LOG4CXX_ERROR(logger_, "Receive() failed ");
+ LOG4CXX_ERROR(logger_, "Receive() failed (#" << pthread_self() << ")");
Abort();
LOG4CXX_TRACE(logger_, "exit. Condition: !receive_ok");
return;
@@ -320,19 +318,19 @@ bool ThreadedSocketConnection::Receive() {
bool ThreadedSocketConnection::Send() {
LOG4CXX_TRACE(logger_, "enter");
FrameQueue frames_to_send;
- frames_to_send_mutex_.Acquire();
+ pthread_mutex_lock(&frames_to_send_mutex_);
std::swap(frames_to_send, frames_to_send_);
- frames_to_send_mutex_.Release();
+ pthread_mutex_unlock(&frames_to_send_mutex_);
size_t offset = 0;
while (!frames_to_send.empty()) {
- LOG4CXX_INFO(logger_, "frames_to_send is not empty");
+ LOG4CXX_INFO(logger_, "frames_to_send is not empty" << pthread_self() << ")");
::protocol_handler::RawMessagePtr frame = frames_to_send.front();
const ssize_t bytes_sent = ::send(socket_, frame->data() + offset,
frame->data_size() - offset, 0);
if (bytes_sent >= 0) {
- LOG4CXX_DEBUG(logger_, "bytes_sent >= 0");
+ LOG4CXX_DEBUG(logger_, "bytes_sent >= 0" << pthread_self() << ")");
offset += bytes_sent;
if (offset == frame->data_size()) {
frames_to_send.pop();
@@ -340,7 +338,7 @@ bool ThreadedSocketConnection::Send() {
controller_->DataSendDone(device_handle(), application_handle(), frame);
}
} else {
- LOG4CXX_DEBUG(logger_, "bytes_sent < 0");
+ LOG4CXX_DEBUG(logger_, "bytes_sent < 0" << pthread_self() << ")");
LOG4CXX_ERROR_WITH_ERRNO(logger_, "Send failed for connection " << this);
frames_to_send.pop();
offset = 0;
diff --git a/src/components/transport_manager/src/transport_adapter/transport_adapter_impl.cc b/src/components/transport_manager/src/transport_adapter/transport_adapter_impl.cc
index 67b2b1ad58..3330e93e31 100644
--- a/src/components/transport_manager/src/transport_adapter/transport_adapter_impl.cc
+++ b/src/components/transport_manager/src/transport_adapter/transport_adapter_impl.cc
@@ -53,64 +53,56 @@ TransportAdapterImpl::TransportAdapterImpl(
devices_(),
devices_mutex_(),
connections_(),
- connections_lock_(),
-#ifdef TIME_TESTER
- metric_observer_(NULL),
-#endif // TIME_TESTER
+ connections_mutex_(),
device_scanner_(device_scanner),
server_connection_factory_(server_connection_factory),
- client_connection_listener_(client_connection_listener) {
+ client_connection_listener_(client_connection_listener)
+#ifdef TIME_TESTER
+ , metric_observer_(NULL)
+#endif // TIME_TESTER
+{
+ pthread_mutex_init(&devices_mutex_, 0);
+ pthread_mutex_init(&connections_mutex_, 0);
}
TransportAdapterImpl::~TransportAdapterImpl() {
- Terminate();
-
- if (device_scanner_) {
- LOG4CXX_DEBUG(logger_, "Deleting device_scanner_ " << device_scanner_);
- delete device_scanner_;
- LOG4CXX_DEBUG(logger_, "device_scanner_ deleted.");
- }
- if (server_connection_factory_) {
- LOG4CXX_DEBUG(logger_, "Deleting server_connection_factory " << server_connection_factory_);
- delete server_connection_factory_;
- LOG4CXX_DEBUG(logger_, "server_connection_factory deleted.");
- }
- if (client_connection_listener_) {
- LOG4CXX_DEBUG(logger_, "Deleting client_connection_listener_ " << client_connection_listener_);
- delete client_connection_listener_;
- LOG4CXX_DEBUG(logger_, "client_connection_listener_ deleted.");
- }
-}
-
-void TransportAdapterImpl::Terminate() {
if (device_scanner_) {
device_scanner_->Terminate();
LOG4CXX_DEBUG(logger_, "device_scanner_ " << device_scanner_ << " terminated.");
+ delete device_scanner_;
+ LOG4CXX_DEBUG(logger_, "device_scanner_ " << device_scanner_ << " deleted.");
}
if (server_connection_factory_) {
server_connection_factory_->Terminate();
LOG4CXX_DEBUG(logger_, "server_connection_factory " << server_connection_factory_ << " terminated.");
+ delete server_connection_factory_;
+ LOG4CXX_DEBUG(logger_, "server_connection_factory " << server_connection_factory_ << " deleted.");
}
if (client_connection_listener_) {
client_connection_listener_->Terminate();
LOG4CXX_DEBUG(logger_, "client_connection_listener_ " << client_connection_listener_ << " terminated.");
+ delete client_connection_listener_;
+ LOG4CXX_DEBUG(logger_, "client_connection_listener_ " << client_connection_listener_ << " deleted.");
}
+ pthread_mutex_lock(&connections_mutex_);
ConnectionMap connections;
- connections_lock_.AcquireForWriting();
std::swap(connections, connections_);
- connections_lock_.Release();
+ pthread_mutex_unlock(&connections_mutex_);
connections.clear();
LOG4CXX_DEBUG(logger_, "Connections deleted");
- devices_mutex_.Acquire();
+ pthread_mutex_lock(&devices_mutex_);
DeviceMap devices;
std::swap(devices, devices_);
- devices_mutex_.Release();
+ pthread_mutex_unlock(&devices_mutex_);
devices.clear();
LOG4CXX_DEBUG(logger_, "Devices deleted");
+
+ pthread_mutex_destroy(&connections_mutex_);
+ pthread_mutex_destroy(&devices_mutex_);
}
TransportAdapter::Error TransportAdapterImpl::Init() {
@@ -167,7 +159,7 @@ TransportAdapter::Error TransportAdapterImpl::Connect(
return BAD_STATE;
}
- connections_lock_.AcquireForWriting();
+ pthread_mutex_lock(&connections_mutex_);
const bool already_exists =
connections_.end() !=
connections_.find(std::make_pair(device_id, app_handle));
@@ -177,7 +169,7 @@ TransportAdapter::Error TransportAdapterImpl::Connect(
info.device_id = device_id;
info.state = ConnectionInfo::NEW;
}
- connections_lock_.Release();
+ pthread_mutex_unlock(&connections_mutex_);
if (already_exists) {
LOG4CXX_TRACE(logger_, "exit with ALREADY_EXISTS");
return ALREADY_EXISTS;
@@ -186,9 +178,9 @@ TransportAdapter::Error TransportAdapterImpl::Connect(
const TransportAdapter::Error err =
server_connection_factory_->CreateConnection(device_id, app_handle);
if (TransportAdapter::OK != err) {
- connections_lock_.AcquireForWriting();
+ pthread_mutex_lock(&connections_mutex_);
connections_.erase(std::make_pair(device_id, app_handle));
- connections_lock_.Release();
+ pthread_mutex_unlock(&connections_mutex_);
}
LOG4CXX_TRACE(logger_, "exit with error: " << err);
return err;
@@ -236,25 +228,20 @@ TransportAdapter::Error TransportAdapterImpl::DisconnectDevice(
}
Error error = OK;
+ pthread_mutex_lock(&connections_mutex_);
+ for (ConnectionMap::iterator it = connections_.begin();
+ it != connections_.end(); ++it) {
- std::vector<ConnectionInfo> to_disconnect;
- connections_lock_.AcquireForReading();
- for (ConnectionMap::const_iterator i = connections_.begin(); i != connections_.end(); ++i) {
- ConnectionInfo info = i->second;
- if (info.device_id == device_id && info.state != ConnectionInfo::FINALISING) {
- to_disconnect.push_back(info);
- }
- }
- connections_lock_.Release();
-
- for (std::vector<ConnectionInfo>::const_iterator j = to_disconnect.begin(); j != to_disconnect.end(); ++j) {
- ConnectionInfo info = *j;
- if (OK != info.connection->Disconnect()) {
- error = FAIL;
- LOG4CXX_ERROR(logger_, "Error on disconnect " << error);
+ ConnectionInfo& info = it->second;
+ if (info.device_id == device_id &&
+ info.state != ConnectionInfo::FINALISING) {
+ if (OK != info.connection->Disconnect()) {
+ error = FAIL;
+ LOG4CXX_ERROR(logger_, "Error on disconnect" << error);
+ }
}
}
-
+ pthread_mutex_unlock(&connections_mutex_);
LOG4CXX_TRACE(logger_, "exit with error " << error);
return error;
}
@@ -306,23 +293,19 @@ TransportAdapter::Error TransportAdapterImpl::StopClientListening() {
return BAD_STATE;
}
TransportAdapter::Error err = client_connection_listener_->StopListening();
- for(DeviceMap::iterator it = devices_.begin();
- it != devices_.end();
- ++it) {
- it->second->Stop();
- }
LOG4CXX_TRACE(logger_, "exit with error: " << err);
return err;
}
DeviceList TransportAdapterImpl::GetDeviceList() const {
- LOG4CXX_AUTO_TRACE(logger_);
+ LOG4CXX_TRACE(logger_, "enter");
DeviceList devices;
- sync_primitives::AutoLock locker(devices_mutex_);
+ pthread_mutex_lock(&devices_mutex_);
for (DeviceMap::const_iterator it = devices_.begin(); it != devices_.end();
++it) {
devices.push_back(it->first);
}
+ pthread_mutex_unlock(&devices_mutex_);
LOG4CXX_TRACE(logger_, "exit with DeviceList. It's' size = " << devices.size());
return devices;
}
@@ -331,7 +314,7 @@ DeviceSptr TransportAdapterImpl::AddDevice(DeviceSptr device) {
LOG4CXX_TRACE(logger_, "enter. device: " << device);
DeviceSptr existing_device;
bool same_device_found = false;
- devices_mutex_.Acquire();
+ pthread_mutex_lock(&devices_mutex_);
for (DeviceMap::const_iterator i = devices_.begin(); i != devices_.end();
++i) {
existing_device = i->second;
@@ -344,7 +327,7 @@ DeviceSptr TransportAdapterImpl::AddDevice(DeviceSptr device) {
if (!same_device_found) {
devices_[device->unique_device_id()] = device;
}
- devices_mutex_.Release();
+ pthread_mutex_unlock(&devices_mutex_);
if (same_device_found) {
LOG4CXX_TRACE(logger_, "exit with TRUE. Condition: same_device_found");
return existing_device;
@@ -369,7 +352,7 @@ void TransportAdapterImpl::SearchDeviceDone(const DeviceVector& devices) {
DeviceSptr device = *it;
bool device_found = false;
- devices_mutex_.Acquire();
+ pthread_mutex_lock(&devices_mutex_);
for (DeviceMap::iterator it = devices_.begin(); it != devices_.end();
++it) {
DeviceSptr existing_device = it->second;
@@ -380,7 +363,7 @@ void TransportAdapterImpl::SearchDeviceDone(const DeviceVector& devices) {
break;
}
}
- devices_mutex_.Release();
+ pthread_mutex_unlock(&devices_mutex_);
if (!device_found) {
LOG4CXX_INFO(logger_, "Adding new device " << device->unique_device_id()
@@ -392,7 +375,7 @@ void TransportAdapterImpl::SearchDeviceDone(const DeviceVector& devices) {
new_devices[device->unique_device_id()] = device;
}
- connections_lock_.AcquireForReading();
+ pthread_mutex_lock(&connections_mutex_);
std::set<DeviceUID> connected_devices;
for (ConnectionMap::const_iterator it = connections_.begin();
it != connections_.end(); ++it) {
@@ -401,10 +384,10 @@ void TransportAdapterImpl::SearchDeviceDone(const DeviceVector& devices) {
connected_devices.insert(info.device_id);
}
}
- connections_lock_.Release();
+ pthread_mutex_unlock(&connections_mutex_);
DeviceMap all_devices = new_devices;
- devices_mutex_.Acquire();
+ pthread_mutex_lock(&devices_mutex_);
for (DeviceMap::iterator it = devices_.begin(); it != devices_.end(); ++it) {
DeviceSptr existing_device = it->second;
@@ -416,7 +399,7 @@ void TransportAdapterImpl::SearchDeviceDone(const DeviceVector& devices) {
}
}
devices_ = all_devices;
- devices_mutex_.Release();
+ pthread_mutex_unlock(&devices_mutex_);
for (TransportAdapterListenerList::iterator it = listeners_.begin();
it != listeners_.end(); ++it) {
@@ -470,8 +453,9 @@ bool TransportAdapterImpl::IsServerOriginatedConnectSupported() const {
}
bool TransportAdapterImpl::IsClientOriginatedConnectSupported() const {
- LOG4CXX_TRACE(logger_, "IsClientOriginatedConnectSupported");
+ LOG4CXX_TRACE(logger_, "enter");
return client_connection_listener_ != 0;
+ LOG4CXX_TRACE(logger_, "exit");
}
void TransportAdapterImpl::ConnectionCreated(
@@ -479,13 +463,14 @@ void TransportAdapterImpl::ConnectionCreated(
const ApplicationHandle& app_handle) {
LOG4CXX_TRACE(logger_, "enter connection:" << connection << ", device_id: " << &device_id
<< ", app_handle: " << &app_handle);
- connections_lock_.AcquireForReading();
+ pthread_mutex_lock(&connections_mutex_);
ConnectionInfo& info = connections_[std::make_pair(device_id, app_handle)];
info.app_handle = app_handle;
info.device_id = device_id;
info.connection = connection;
info.state = ConnectionInfo::NEW;
- connections_lock_.Release();
+ pthread_mutex_unlock(&connections_mutex_);
+ LOG4CXX_TRACE(logger_, "exit");
}
void TransportAdapterImpl::DeviceDisconnected(
@@ -503,18 +488,17 @@ void TransportAdapterImpl::DeviceDisconnected(
}
}
+ pthread_mutex_lock(&connections_mutex_);
for (TransportAdapterListenerList::iterator it = listeners_.begin();
it != listeners_.end(); ++it) {
TransportAdapterListener* listener = *it;
listener->OnDisconnectDeviceDone(this, device_uid);
}
-
- connections_lock_.AcquireForWriting();
for (ApplicationList::const_iterator i = app_list.begin(); i != app_list.end(); ++i) {
ApplicationHandle app_handle = *i;
connections_.erase(std::make_pair(device_uid, app_handle));
}
- connections_lock_.Release();
+ pthread_mutex_unlock(&connections_mutex_);
RemoveDevice(device_uid);
LOG4CXX_TRACE(logger_, "exit");
@@ -527,7 +511,7 @@ void TransportAdapterImpl::DisconnectDone(
LOG4CXX_TRACE(logger_, "enter. device_id: " << &device_uid << ", app_handle: " <<
&app_uid);
bool device_disconnected = true;
- connections_lock_.AcquireForReading();
+ pthread_mutex_lock(&connections_mutex_);
for (ConnectionMap::const_iterator it = connections_.begin();
it != connections_.end(); ++it) {
const DeviceUID& current_device_id = it->first.first;
@@ -539,7 +523,7 @@ void TransportAdapterImpl::DisconnectDone(
break;
}
}
- connections_lock_.Release();
+ pthread_mutex_unlock(&connections_mutex_);
for (TransportAdapterListenerList::iterator it = listeners_.begin();
it != listeners_.end(); ++it) {
TransportAdapterListener* listener = *it;
@@ -548,9 +532,9 @@ void TransportAdapterImpl::DisconnectDone(
listener->OnDisconnectDeviceDone(this, device_uid);
}
}
- connections_lock_.AcquireForWriting();
+ pthread_mutex_lock(&connections_mutex_);
connections_.erase(std::make_pair(device_uid, app_uid));
- connections_lock_.Release();
+ pthread_mutex_unlock(&connections_mutex_);
if (device_disconnected) {
RemoveDevice(device_uid);
@@ -616,13 +600,14 @@ DeviceSptr TransportAdapterImpl::FindDevice(const DeviceUID& device_id) const {
LOG4CXX_TRACE(logger_, "enter. device_id: " << &device_id);
DeviceSptr ret;
LOG4CXX_DEBUG(logger_, "devices_.size() = " << devices_.size());
- sync_primitives::AutoLock locker(devices_mutex_);
+ pthread_mutex_lock(&devices_mutex_);
DeviceMap::const_iterator it = devices_.find(device_id);
if (it != devices_.end()) {
ret = it->second;
} else {
LOG4CXX_WARN(logger_, "Device " << device_id << " not found.");
}
+ pthread_mutex_unlock(&devices_mutex_);
LOG4CXX_TRACE(logger_, "exit with DeviceSptr: " << ret);
return ret;
}
@@ -631,14 +616,14 @@ void TransportAdapterImpl::ConnectDone(const DeviceUID& device_id,
const ApplicationHandle& app_handle) {
LOG4CXX_TRACE(logger_, "enter. device_id: " << &device_id << ", app_handle: " <<
&app_handle);
- connections_lock_.AcquireForReading();
+ pthread_mutex_lock(&connections_mutex_);
ConnectionMap::iterator it_conn =
connections_.find(std::make_pair(device_id, app_handle));
if (it_conn != connections_.end()) {
ConnectionInfo& info = it_conn->second;
info.state = ConnectionInfo::ESTABLISHED;
}
- connections_lock_.Release();
+ pthread_mutex_unlock(&connections_mutex_);
for (TransportAdapterListenerList::iterator it = listeners_.begin();
it != listeners_.end(); ++it) {
@@ -655,9 +640,9 @@ void TransportAdapterImpl::ConnectFailed(const DeviceUID& device_handle,
const ApplicationHandle app_uid = app_handle;
LOG4CXX_TRACE(logger_, "enter. device_id: " << &device_uid << ", app_handle: " <<
&app_uid << ", error: " << &error);
- connections_lock_.AcquireForWriting();
+ pthread_mutex_lock(&connections_mutex_);
connections_.erase(std::make_pair(device_uid, app_uid));
- connections_lock_.Release();
+ pthread_mutex_unlock(&connections_mutex_);
for (TransportAdapterListenerList::iterator it = listeners_.begin();
it != listeners_.end(); ++it) {
(*it)->OnConnectFailed(this, device_uid, app_uid, error);
@@ -689,14 +674,15 @@ void TransportAdapterImpl::ConnectionFinished(
const DeviceUID& device_id, const ApplicationHandle& app_handle) {
LOG4CXX_TRACE(logger_, "enter. device_id: " << &device_id << ", app_handle: " <<
&app_handle);
- connections_lock_.AcquireForReading();
+ pthread_mutex_lock(&connections_mutex_);
ConnectionMap::iterator it =
connections_.find(std::make_pair(device_id, app_handle));
if (it != connections_.end()) {
ConnectionInfo& info = it->second;
info.state = ConnectionInfo::FINALISING;
}
- connections_lock_.Release();
+ pthread_mutex_unlock(&connections_mutex_);
+ LOG4CXX_TRACE(logger_, "exit");
}
void TransportAdapterImpl::ConnectionAborted(
@@ -782,7 +768,7 @@ Connection* TransportAdapterImpl::FindEstablishedConnection(
LOG4CXX_TRACE(logger_, "enter. device_id: " << &device_id << ", app_handle: " <<
&app_handle);
Connection* connection = NULL;
- connections_lock_.AcquireForReading();
+ pthread_mutex_lock(&connections_mutex_);
ConnectionMap::const_iterator it =
connections_.find(std::make_pair(device_id, app_handle));
if (it != connections_.end()) {
@@ -791,7 +777,7 @@ Connection* TransportAdapterImpl::FindEstablishedConnection(
connection = info.connection;
}
}
- connections_lock_.Release();
+ pthread_mutex_unlock(&connections_mutex_);
LOG4CXX_TRACE(logger_, "exit with Connection: " << connection);
return connection;
}
@@ -834,9 +820,8 @@ TransportAdapter::Error TransportAdapterImpl::ConnectDevice(DeviceSptr device) {
}
void TransportAdapterImpl::RemoveDevice(const DeviceUID& device_handle) {
- LOG4CXX_AUTO_TRACE(logger_);
- LOG4CXX_DEBUG(logger_, "Device_handle: " << &device_handle);
- sync_primitives::AutoLock locker(devices_mutex_);
+ LOG4CXX_TRACE(logger_, "enter. device_handle: " << &device_handle);
+ pthread_mutex_lock(&devices_mutex_);
DeviceMap::iterator i = devices_.find(
device_handle); //ykazakov: there is no erase for const iterator on QNX
if (i != devices_.end()) {
@@ -850,6 +835,8 @@ void TransportAdapterImpl::RemoveDevice(const DeviceUID& device_handle) {
}
}
}
+ pthread_mutex_unlock(&devices_mutex_);
+ LOG4CXX_TRACE(logger_, "exit");
}
diff --git a/src/components/transport_manager/src/transport_manager_default.cc b/src/components/transport_manager/src/transport_manager_default.cc
index 835c2c17ed..ffd1b3d860 100644
--- a/src/components/transport_manager/src/transport_manager_default.cc
+++ b/src/components/transport_manager/src/transport_manager_default.cc
@@ -43,6 +43,7 @@
#include "transport_manager/bluetooth/bluetooth_transport_adapter.h"
#endif
+// CUSTOMER_PASA
#if defined(USB_SUPPORT)
#include "transport_manager/usb/usb_aoa_adapter.h"
@@ -71,8 +72,6 @@ int TransportManagerDefault::Init() {
#endif // TIME_TESTER
AddTransportAdapter(ta);
#endif
-
-
uint16_t port = profile::Profile::instance()->transport_manager_tcp_adapter_port();
ta = new transport_adapter::TcpTransportAdapter(port);
#ifdef TIME_TESTER
@@ -82,6 +81,7 @@ int TransportManagerDefault::Init() {
#endif // TIME_TESTER
AddTransportAdapter(ta);
+// CUSTOMER_PASA
#if defined(USB_SUPPORT)
ta = new transport_adapter::UsbAoaAdapter();
diff --git a/src/components/transport_manager/src/transport_manager_impl.cc b/src/components/transport_manager/src/transport_manager_impl.cc
index 6c3edd7b91..0ee1d3304d 100644
--- a/src/components/transport_manager/src/transport_manager_impl.cc
+++ b/src/components/transport_manager/src/transport_manager_impl.cc
@@ -32,6 +32,7 @@
#include "transport_manager/transport_manager_impl.h"
+#include <pthread.h>
#include <stdint.h>
#include <cstring>
#include <queue>
@@ -69,20 +70,22 @@ TransportManagerImpl::Connection TransportManagerImpl::convert(
}
TransportManagerImpl::TransportManagerImpl()
- : is_initialized_(false),
+ : all_thread_active_(false),
+ device_listener_thread_wakeup_(),
+ is_initialized_(false),
#ifdef TIME_TESTER
metric_observer_(NULL),
#endif // TIME_TESTER
connection_id_counter_(0),
message_queue_("TM MessageQueue", this),
event_queue_("TM EventQueue", this) {
- LOG4CXX_TRACE(logger_, "TransportManager has created");
+ LOG4CXX_INFO(logger_, "==============================================");
+ pthread_cond_init(&device_listener_thread_wakeup_, NULL);
+ LOG4CXX_DEBUG(logger_, "TransportManager object created");
}
TransportManagerImpl::~TransportManagerImpl() {
LOG4CXX_DEBUG(logger_, "TransportManager object destroying");
- message_queue_.Shutdown();
- event_queue_.Shutdown();
for (std::vector<TransportAdapter*>::iterator it =
transport_adapters_.begin();
@@ -96,6 +99,7 @@ TransportManagerImpl::~TransportManagerImpl() {
delete it->second;
}
+ pthread_cond_destroy(&device_listener_thread_wakeup_);
LOG4CXX_INFO(logger_, "TransportManager object destroyed");
}
@@ -222,48 +226,18 @@ int TransportManagerImpl::AddEventListener(TransportManagerListener* listener) {
return E_SUCCESS;
}
-void TransportManagerImpl::DisconnectAllDevices() {
- LOG4CXX_AUTO_TRACE(logger_);
- for (DeviceInfoList::iterator i = device_list_.begin();
- i != device_list_.end(); ++i) {
- DeviceInfo& device = i->second;
- DisconnectDevice(device.device_handle());
- }
-}
-
-void TransportManagerImpl::TerminateAllAdapters() {
- LOG4CXX_AUTO_TRACE(logger_);
- for (std::vector<TransportAdapter*>::iterator i = transport_adapters_.begin();
- i != transport_adapters_.end(); ++i) {
- (*i)->Terminate();
- }
-}
-
-int TransportManagerImpl::InitAllAdapters() {
- LOG4CXX_AUTO_TRACE(logger_);
- for (std::vector<TransportAdapter*>::iterator i = transport_adapters_.begin();
- i != transport_adapters_.end(); ++i) {
- if ((*i)->Init() != TransportAdapter::OK) {
- return E_ADAPTERS_FAIL;
- }
- }
- return E_SUCCESS;
-}
-
int TransportManagerImpl::Stop() {
- LOG4CXX_AUTO_TRACE(logger_);
- if (!is_initialized_) {
- LOG4CXX_WARN(logger_, "TransportManager is not initialized_");
+ LOG4CXX_TRACE(logger_, "enter");
+ if (!all_thread_active_) {
+ LOG4CXX_TRACE(logger_,
+ "exit with E_TM_IS_NOT_INITIALIZED. Condition: !all_thread_active_");
return E_TM_IS_NOT_INITIALIZED;
}
+ all_thread_active_ = false;
- message_queue_.Shutdown();
- event_queue_.Shutdown();
-
- DisconnectAllDevices();
- TerminateAllAdapters();
+ pthread_cond_signal(&device_listener_thread_wakeup_);
- is_initialized_ = false;
+ LOG4CXX_TRACE(logger_, "exit with E_SUCCESS");
return E_SUCCESS;
}
@@ -416,19 +390,12 @@ int TransportManagerImpl::SearchDevices() {
int TransportManagerImpl::Init() {
LOG4CXX_TRACE(logger_, "enter");
+ all_thread_active_ = true;
is_initialized_ = true;
LOG4CXX_TRACE(logger_, "exit with E_SUCCESS");
return E_SUCCESS;
}
-int TransportManagerImpl::Reinit() {
- LOG4CXX_AUTO_TRACE(logger_);
- DisconnectAllDevices();
- TerminateAllAdapters();
- int ret = InitAllAdapters();
- return ret;
-}
-
int TransportManagerImpl::Visibility(const bool& on_off) const {
LOG4CXX_TRACE(logger_, "enter. On_off: " << &on_off);
TransportAdapter::Error ret;
@@ -511,9 +478,10 @@ void TransportManagerImpl::PostMessage(const ::protocol_handler::RawMessagePtr m
}
void TransportManagerImpl::PostEvent(const TransportAdapterEvent& event) {
- LOG4CXX_AUTO_TRACE(logger_);
- LOG4CXX_DEBUG(logger_, "TransportAdapterEvent: " << &event);
+ LOG4CXX_TRACE(logger_, "enter. TransportAdapterEvent: " << &event);
event_queue_.PostMessage(event);
+ pthread_cond_signal(&device_listener_thread_wakeup_);
+ LOG4CXX_TRACE(logger_, "exit");
}
void TransportManagerImpl::AddConnection(const ConnectionInternal& c) {
diff --git a/src/components/transport_manager/src/usb/libusb/platform_usb_device.cc b/src/components/transport_manager/src/usb/libusb/platform_usb_device.cc
index 1ca1a54b32..103e03a4f6 100644
--- a/src/components/transport_manager/src/usb/libusb/platform_usb_device.cc
+++ b/src/components/transport_manager/src/usb/libusb/platform_usb_device.cc
@@ -1,4 +1,4 @@
-/*
+/**
*
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
diff --git a/src/components/transport_manager/src/usb/libusb/usb_connection.cc b/src/components/transport_manager/src/usb/libusb/usb_connection.cc
index b8096514bc..40891d3513 100644
--- a/src/components/transport_manager/src/usb/libusb/usb_connection.cc
+++ b/src/components/transport_manager/src/usb/libusb/usb_connection.cc
@@ -30,7 +30,6 @@
* POSSIBILITY OF SUCH DAMAGE.
*/
-#include <pthread.h>
#include <unistd.h>
#include <iomanip>
@@ -52,7 +51,7 @@ CREATE_LOGGERPTR_GLOBAL(logger_, "TransportManager")
UsbConnection::UsbConnection(const DeviceUID& device_uid,
const ApplicationHandle& app_handle,
TransportAdapterController* controller,
- const UsbHandlerSptr usb_handler,
+ const UsbHandlerSptr& usb_handler,
PlatformUsbDevice* device)
: device_uid_(device_uid),
app_handle_(app_handle),
diff --git a/src/components/transport_manager/src/usb/libusb/usb_handler.cc b/src/components/transport_manager/src/usb/libusb/usb_handler.cc
index 776bb56c5d..eb0ffdb4dc 100644
--- a/src/components/transport_manager/src/usb/libusb/usb_handler.cc
+++ b/src/components/transport_manager/src/usb/libusb/usb_handler.cc
@@ -1,4 +1,4 @@
-/*
+/**
* \file usb_handler.cc
* \brief UsbHandler class source file.
*
@@ -39,9 +39,7 @@
#include "transport_manager/usb/common.h"
#include "transport_manager/transport_adapter/transport_adapter_impl.h"
-#include "utils/macro.h"
#include "utils/logger.h"
-#include "utils/threads/thread.h"
namespace transport_manager {
namespace transport_adapter {
@@ -77,16 +75,14 @@ class UsbHandler::ControlTransferSequenceState {
UsbHandler::UsbHandler()
: shutdown_requested_(false),
- thread_(NULL),
+ thread_(),
usb_device_listeners_(),
devices_(),
transfer_sequences_(),
device_handles_to_close_(),
libusb_context_(NULL),
arrived_callback_handle_(),
- left_callback_handle_() {
- thread_ = threads::CreateThread("UsbHandler", new UsbHandlerDelegate(this));
-}
+ left_callback_handle_() {}
UsbHandler::~UsbHandler() {
shutdown_requested_ = true;
@@ -95,15 +91,12 @@ UsbHandler::~UsbHandler() {
arrived_callback_handle_);
libusb_hotplug_deregister_callback(libusb_context_, left_callback_handle_);
}
- thread_->stop();
+ pthread_join(thread_, 0);
LOG4CXX_INFO(logger_, "UsbHandler thread finished");
if (libusb_context_) {
libusb_exit(libusb_context_);
libusb_context_ = 0;
}
- thread_->join();
- delete thread_->delegate();
- threads::DeleteThread(thread_);
}
void UsbHandler::DeviceArrived(libusb_device* device_libusb) {
@@ -216,6 +209,11 @@ void UsbHandler::CloseDeviceHandle(libusb_device_handle* device_handle) {
device_handles_to_close_.push_back(device_handle);
}
+void* UsbHandlerThread(void* data) {
+ static_cast<UsbHandler*>(data)->Thread();
+ return 0;
+}
+
int ArrivedCallback(libusb_context* context, libusb_device* device,
libusb_hotplug_event event, void* data) {
LOG4CXX_TRACE(logger_, "enter. libusb device arrived (bus number "
@@ -288,12 +286,19 @@ TransportAdapter::Error UsbHandler::Init() {
return TransportAdapter::FAIL;
}
- if (!thread_->start()) {
- LOG4CXX_ERROR(logger_, "USB device scanner thread start failed, error code");
+ const int thread_start_error =
+ pthread_create(&thread_, 0, &UsbHandlerThread, this);
+ if (0 != thread_start_error) {
+ LOG4CXX_ERROR(logger_, "USB device scanner thread start failed, error code "
+ << thread_start_error);
LOG4CXX_TRACE(logger_,
- "exit with TransportAdapter::FAIL.");
+ "exit with TransportAdapter::FAIL. Condition: 0 !== thread_start_error");
return TransportAdapter::FAIL;
}
+ LOG4CXX_INFO(logger_, "UsbHandler thread started");
+ pthread_setname_np(thread_, "UsbHandler" );
+ LOG4CXX_TRACE(logger_,
+ "exit with TransportAdapter::OK. Condition: 0 == thread_start_error");
return TransportAdapter::OK;
}
@@ -352,13 +357,13 @@ void UsbHandler::SubmitControlTransfer(
assert(transfer->Type() == UsbControlTransfer::VENDOR);
const libusb_request_type request_type = LIBUSB_REQUEST_TYPE_VENDOR;
- libusb_endpoint_direction endpoint_direction = LIBUSB_ENDPOINT_IN;
+ libusb_endpoint_direction endpoint_direction;
if (transfer->Direction() == UsbControlTransfer::IN) {
endpoint_direction = LIBUSB_ENDPOINT_IN;
} else if (transfer->Direction() == UsbControlTransfer::OUT) {
endpoint_direction = LIBUSB_ENDPOINT_OUT;
} else {
- NOTREACHED();
+ assert(0);
}
const uint8_t request = transfer->Request();
const uint16_t value = transfer->Value();
@@ -465,16 +470,5 @@ void UsbHandler::ControlTransferSequenceState::Finish() {
finished_ = true;
}
-UsbHandler::UsbHandlerDelegate::UsbHandlerDelegate(
- UsbHandler* handler)
- : handler_(handler) {
-}
-
-void UsbHandler::UsbHandlerDelegate::threadMain() {
- LOG4CXX_AUTO_TRACE(logger_);
- DCHECK(handler_);
- handler_->Thread();
-}
-
-} // namespace transport_adapter
-} // namespace transport_manager
+} // namespace
+} // namespace
diff --git a/src/components/transport_manager/src/usb/qnx/platform_usb_device.cc b/src/components/transport_manager/src/usb/qnx/platform_usb_device.cc
index 132fe52cae..0f35a16ae7 100644
--- a/src/components/transport_manager/src/usb/qnx/platform_usb_device.cc
+++ b/src/components/transport_manager/src/usb/qnx/platform_usb_device.cc
@@ -1,4 +1,4 @@
-/*
+/**
* \file platform_usb_device.cc
* \brief QNX PlatformUsbDevice class source file.
*
diff --git a/src/components/transport_manager/src/usb/qnx/usb_connection.cc b/src/components/transport_manager/src/usb/qnx/usb_connection.cc
index a3844b2e04..db3cac014d 100644
--- a/src/components/transport_manager/src/usb/qnx/usb_connection.cc
+++ b/src/components/transport_manager/src/usb/qnx/usb_connection.cc
@@ -50,7 +50,7 @@ CREATE_LOGGERPTR_GLOBAL(logger_, "TransportManager")
UsbConnection::UsbConnection(const DeviceUID& device_uid,
const ApplicationHandle& app_handle,
TransportAdapterController* controller,
- const UsbHandlerSptr libusb_handler,
+ const UsbHandlerSptr& libusb_handler,
PlatformUsbDevice* device)
: device_uid_(device_uid),
app_handle_(app_handle),
@@ -60,7 +60,6 @@ UsbConnection::UsbConnection(const DeviceUID& device_uid,
in_pipe_(NULL),
out_pipe_(NULL),
in_buffer_(NULL),
- out_buffer_(NULL),
in_urb_(NULL),
out_urb_(NULL),
out_messages_(),
@@ -70,6 +69,7 @@ UsbConnection::UsbConnection(const DeviceUID& device_uid,
disconnecting_(false),
pending_in_transfer_(false),
pending_out_transfer_(false) {
+ pthread_mutex_init(&out_messages_mutex_, 0);
}
UsbConnection::~UsbConnection() {
@@ -89,6 +89,8 @@ UsbConnection::~UsbConnection() {
LOG4CXX_ERROR(logger_, "Failed to close pipe: " << close_pipe_rc);
}
}
+
+ pthread_mutex_destroy(&out_messages_mutex_);
}
void InTransferCallback(usbd_urb* urb, usbd_pipe*, void* data) {
@@ -210,7 +212,7 @@ void UsbConnection::OnOutTransfer(usbd_urb* urb) {
}
}
- sync_primitives::AutoLock locker(out_messages_mutex_);
+ pthread_mutex_lock(&out_messages_mutex_);
if (error) {
LOG4CXX_ERROR(logger_, "USB out transfer failed");
@@ -232,13 +234,14 @@ void UsbConnection::OnOutTransfer(usbd_urb* urb) {
} else {
pending_out_transfer_ = false;
}
+ pthread_mutex_unlock(&out_messages_mutex_);
}
TransportAdapter::Error UsbConnection::SendData(::protocol_handler::RawMessagePtr message) {
if (disconnecting_) {
return TransportAdapter::BAD_STATE;
}
- sync_primitives::AutoLock locker(out_messages_mutex_);
+ pthread_mutex_lock(&out_messages_mutex_);
if (current_out_message_.valid()) {
out_messages_.push_back(message);
} else {
@@ -248,12 +251,13 @@ TransportAdapter::Error UsbConnection::SendData(::protocol_handler::RawMessagePt
DataSendError());
}
}
+ pthread_mutex_unlock(&out_messages_mutex_);
return TransportAdapter::OK;
}
void UsbConnection::Finalise() {
LOG4CXX_INFO(logger_, "Finalising");
- sync_primitives::AutoLock locker(out_messages_mutex_);
+ pthread_mutex_lock(&out_messages_mutex_);
disconnecting_ = true;
usbd_abort_pipe(in_pipe_);
usbd_abort_pipe(out_pipe_);
@@ -261,6 +265,7 @@ void UsbConnection::Finalise() {
it != out_messages_.end(); it = out_messages_.erase(it)) {
controller_->DataSendFailed(device_uid_, app_handle_, *it, DataSendError());
}
+ pthread_mutex_unlock(&out_messages_mutex_);
while (pending_in_transfer_ || pending_out_transfer_) sched_yield();
}
diff --git a/src/components/transport_manager/src/usb/qnx/usb_handler.cc b/src/components/transport_manager/src/usb/qnx/usb_handler.cc
index d78b6c8184..7ab36169b1 100644
--- a/src/components/transport_manager/src/usb/qnx/usb_handler.cc
+++ b/src/components/transport_manager/src/usb/qnx/usb_handler.cc
@@ -1,4 +1,4 @@
-/*
+/**
* \file usb_handler.cc
* \brief UsbHandler class source file.
*
diff --git a/src/components/transport_manager/src/usb/usb_aoa_adapter.cc b/src/components/transport_manager/src/usb/usb_aoa_adapter.cc
index b3ebb104dc..464b9ea35e 100644
--- a/src/components/transport_manager/src/usb/usb_aoa_adapter.cc
+++ b/src/components/transport_manager/src/usb/usb_aoa_adapter.cc
@@ -1,4 +1,4 @@
-/*
+/**
* \file usb_aoa_adapter.cpp
* \brief UsbAoaAdapter class source file.
*
diff --git a/src/components/transport_manager/src/usb/usb_connection_factory.cc b/src/components/transport_manager/src/usb/usb_connection_factory.cc
index 4562473536..d57391ebcc 100644
--- a/src/components/transport_manager/src/usb/usb_connection_factory.cc
+++ b/src/components/transport_manager/src/usb/usb_connection_factory.cc
@@ -54,7 +54,7 @@ TransportAdapter::Error UsbConnectionFactory::Init() {
return TransportAdapter::OK;
}
-void UsbConnectionFactory::SetUsbHandler(const UsbHandlerSptr usb_handler) {
+void UsbConnectionFactory::SetUsbHandler(const UsbHandlerSptr& usb_handler) {
usb_handler_ = usb_handler;
}
diff --git a/src/components/transport_manager/src/usb/usb_device_scanner.cc b/src/components/transport_manager/src/usb/usb_device_scanner.cc
index bddc20dd3c..bf9535941c 100644
--- a/src/components/transport_manager/src/usb/usb_device_scanner.cc
+++ b/src/components/transport_manager/src/usb/usb_device_scanner.cc
@@ -47,8 +47,7 @@ CREATE_LOGGERPTR_GLOBAL(logger_, "TransportManager")
class AoaInitSequence : public UsbControlTransferSequence {
public:
AoaInitSequence();
- virtual ~AoaInitSequence() {
- }
+ virtual ~AoaInitSequence() {}
private:
class AoaGetProtocolRequest;
@@ -57,7 +56,7 @@ class AoaInitSequence : public UsbControlTransferSequence {
};
void UsbDeviceScanner::OnDeviceArrived(PlatformUsbDevice* device) {
- LOG4CXX_AUTO_TRACE(logger_);
+ LOG4CXX_TRACE(logger_, "enter. PlatformUsbDevice* " << device);
if (IsAppleDevice(device)) {
SupportedDeviceFound(device);
} else {
@@ -67,13 +66,13 @@ void UsbDeviceScanner::OnDeviceArrived(PlatformUsbDevice* device) {
TurnIntoAccessoryMode(device);
}
}
+ LOG4CXX_TRACE(logger_, "exit");
}
void UsbDeviceScanner::OnDeviceLeft(PlatformUsbDevice* device) {
- LOG4CXX_AUTO_TRACE(logger_);
- LOG4CXX_DEBUG(logger_, "PlatformUsbDevice " << device);
+ LOG4CXX_TRACE(logger_, "enter. PlatformUsbDevice " << device);
bool list_changed = false;
- devices_mutex_.Acquire();
+ pthread_mutex_lock(&devices_mutex_);
for (Devices::iterator it = devices_.begin(); it != devices_.end(); ++it) {
if (device == *it) {
devices_.erase(it);
@@ -81,22 +80,24 @@ void UsbDeviceScanner::OnDeviceLeft(PlatformUsbDevice* device) {
break;
}
}
- devices_mutex_.Release();
+ pthread_mutex_unlock(&devices_mutex_);
if (list_changed) {
UpdateList();
}
+ LOG4CXX_TRACE(logger_, "exit");
}
UsbDeviceScanner::UsbDeviceScanner(TransportAdapterController* controller)
- : controller_(controller) {
+ : controller_(controller) {
+ pthread_mutex_init(&devices_mutex_, 0);
}
UsbDeviceScanner::~UsbDeviceScanner() {
+ pthread_mutex_destroy(&devices_mutex_);
}
class AoaInitSequence::AoaGetProtocolRequest : public UsbControlInTransfer {
- virtual ~AoaGetProtocolRequest() {
- }
+ virtual ~AoaGetProtocolRequest() {}
virtual RequestType Type() const {
return VENDOR;
}
@@ -114,7 +115,7 @@ class AoaInitSequence::AoaGetProtocolRequest : public UsbControlInTransfer {
}
virtual bool OnCompleted(unsigned char* data) const {
const int protocol_version = data[1] << 8 | data[0];
- LOG4CXX_DEBUG(logger_, "AOA protocol version " << protocol_version);
+ LOG4CXX_INFO(logger_, "AOA protocol version " << protocol_version);
if (protocol_version == 0) {
// AOA protocol not supported
return false;
@@ -126,14 +127,10 @@ class AoaInitSequence::AoaGetProtocolRequest : public UsbControlInTransfer {
class AoaInitSequence::AoaSendIdString : public UsbControlOutTransfer {
public:
AoaSendIdString(uint16_t index, const char* string, uint16_t length)
- : index_(index),
- string_(string),
- length_(length) {
- }
+ : index_(index), string_(string), length_(length) {}
private:
- virtual ~AoaSendIdString() {
- }
+ virtual ~AoaSendIdString() {}
virtual RequestType Type() const {
return VENDOR;
}
@@ -158,8 +155,7 @@ class AoaInitSequence::AoaSendIdString : public UsbControlOutTransfer {
};
class AoaInitSequence::AoaTurnIntoAccessoryMode : public UsbControlOutTransfer {
- virtual ~AoaTurnIntoAccessoryMode() {
- }
+ virtual ~AoaTurnIntoAccessoryMode() {}
virtual RequestType Type() const {
return VENDOR;
}
@@ -187,8 +183,7 @@ static char version[] = "1.0";
static char uri[] = "http://www.ford.com";
static char serial_num[] = "N000000";
-AoaInitSequence::AoaInitSequence()
- : UsbControlTransferSequence() {
+AoaInitSequence::AoaInitSequence() : UsbControlTransferSequence() {
AddTransfer(new AoaGetProtocolRequest);
AddTransfer(new AoaSendIdString(0, manufacturer, sizeof(manufacturer)));
AddTransfer(new AoaSendIdString(1, model_name, sizeof(model_name)));
@@ -200,26 +195,25 @@ AoaInitSequence::AoaInitSequence()
}
void UsbDeviceScanner::TurnIntoAccessoryMode(PlatformUsbDevice* device) {
- LOG4CXX_AUTO_TRACE(logger_);
- LOG4CXX_DEBUG(logger_, "PlatformUsbDevice: " << device);
+ LOG4CXX_TRACE(logger_, "enter. PlatformUsbDevice: " << device);
GetUsbHandler()->StartControlTransferSequence(new AoaInitSequence, device);
+ LOG4CXX_TRACE(logger_, "exit");
}
void UsbDeviceScanner::SupportedDeviceFound(PlatformUsbDevice* device) {
- LOG4CXX_AUTO_TRACE(logger_);
- LOG4CXX_TRACE(logger_, "PlatformUsbDevice: " << device);
+ LOG4CXX_TRACE(logger_, "enter PlatformUsbDevice: " << device);
- devices_mutex_.Acquire();
+ pthread_mutex_lock(&devices_mutex_);
devices_.push_back(device);
- devices_mutex_.Release();
- LOG4CXX_DEBUG(
- logger_,
- "USB device (bus number " << static_cast<int>(device->bus_number())
- << ", address " << static_cast<int>(device->address())
- << ") identified as: " << device->GetManufacturer()
- << ", " << device->GetProductName()
- << ", serial: " << device->GetSerialNumber());
+ pthread_mutex_unlock(&devices_mutex_);
+ LOG4CXX_INFO(logger_, "USB device (bus number "
+ << static_cast<int>(device->bus_number())
+ << ", address "
+ << static_cast<int>(device->address())
+ << ") identified as: " << device->GetManufacturer()
+ << ", " << device->GetProductName());
UpdateList();
+ LOG4CXX_TRACE(logger_, "exit");
}
TransportAdapter::Error UsbDeviceScanner::Init() {
@@ -231,28 +225,30 @@ TransportAdapter::Error UsbDeviceScanner::Scan() {
}
void UsbDeviceScanner::UpdateList() {
- LOG4CXX_AUTO_TRACE(logger_);
+ LOG4CXX_TRACE(logger_, "enter");
DeviceVector device_vector;
- devices_mutex_.Acquire();
+ pthread_mutex_lock(&devices_mutex_);
for (Devices::const_iterator it = devices_.begin(); it != devices_.end();
- ++it) {
- const std::string device_name = (*it)->GetManufacturer() + " "
- + (*it)->GetProductName();
+ ++it) {
+ const std::string device_name =
+ (*it)->GetManufacturer() + " " + (*it)->GetProductName();
std::ostringstream oss;
oss << (*it)->GetManufacturer() << ":" << (*it)->GetProductName() << ":"
- << (*it)->GetSerialNumber();
+ << (*it)->GetSerialNumber() << ":"
+ << static_cast<int>((*it)->bus_number()) << ":"
+ << static_cast<int>((*it)->address());
const DeviceUID device_uid = oss.str();
DeviceSptr device(new UsbDevice(*it, device_name, device_uid));
device_vector.push_back(device);
}
- devices_mutex_.Release();
+ pthread_mutex_unlock(&devices_mutex_);
- LOG4CXX_DEBUG(logger_, "USB search done " << device_vector.size());
+ LOG4CXX_INFO(logger_, "USB search done " << device_vector.size());
controller_->SearchDeviceDone(device_vector);
+ LOG4CXX_TRACE(logger_, "exit");
}
-void UsbDeviceScanner::Terminate() {
-}
+void UsbDeviceScanner::Terminate() {}
bool UsbDeviceScanner::IsInitialised() const {
return true;
diff --git a/src/components/utils/CMakeLists.txt b/src/components/utils/CMakeLists.txt
index 79347f4d9f..bbb74dc1e1 100644
--- a/src/components/utils/CMakeLists.txt
+++ b/src/components/utils/CMakeLists.txt
@@ -13,9 +13,8 @@ set (SOURCES
./src/conditional_variable_posix.cc
./src/file_system.cc
./src/threads/posix_thread.cc
- ./src/threads/thread_delegate.cc
+ ./src/threads/thread_manager.cc
./src/threads/thread_validator.cc
- ./src/threads/async_runner.cc
./src/lock_posix.cc
./src/rwlock_posix.cc
./src/date_time.cc
@@ -27,11 +26,9 @@ set (SOURCES
if(ENABLE_LOG)
list(APPEND SOURCES
- ./src/logger.cc
./src/push_log.cc
./src/log_message_loop_thread.cc
./src/logger_status.cc
- ./src/auto_trace.cc
)
endif()
diff --git a/src/components/utils/include/utils/back_trace.h b/src/components/utils/include/utils/back_trace.h
index f2410e36bc..7f8912faf9 100644
--- a/src/components/utils/include/utils/back_trace.h
+++ b/src/components/utils/include/utils/back_trace.h
@@ -1,4 +1,4 @@
-/*
+/**
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
@@ -61,10 +61,10 @@ class Backtrace {
// Captured symbols in order from topmost stack frame to last captured
std::vector<std::string> CallStack() const;
- threads::PlatformThreadHandle ThreadId() const;
+ threads::Thread::Id ThreadId() const;
private:
- threads::PlatformThreadHandle thread_id_;
+ threads::Thread::Id thread_id_;
std::vector<void*> backtrace_;
};
diff --git a/src/components/utils/include/utils/bitstream.h b/src/components/utils/include/utils/bitstream.h
index 9bf41d187f..cba15abd8b 100644
--- a/src/components/utils/include/utils/bitstream.h
+++ b/src/components/utils/include/utils/bitstream.h
@@ -1,4 +1,4 @@
-/*
+/**
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
diff --git a/src/components/utils/include/utils/file_system.h b/src/components/utils/include/utils/file_system.h
index 4340158467..d68ec484f9 100644
--- a/src/components/utils/include/utils/file_system.h
+++ b/src/components/utils/include/utils/file_system.h
@@ -1,4 +1,4 @@
-/*
+/**
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
diff --git a/src/components/utils/include/utils/log_message_loop_thread.h b/src/components/utils/include/utils/log_message_loop_thread.h
index 87b6c7e531..b23a246e13 100644
--- a/src/components/utils/include/utils/log_message_loop_thread.h
+++ b/src/components/utils/include/utils/log_message_loop_thread.h
@@ -37,7 +37,6 @@
#include <queue>
#include <log4cxx/logger.h>
-#include "utils/macro.h"
#include "utils/threads/message_loop_thread.h"
#include "utils/singleton.h"
diff --git a/src/components/utils/include/utils/resource_usage.h b/src/components/utils/include/utils/resource_usage.h
index 1f1a58b47c..a8fa4aa7d9 100644
--- a/src/components/utils/include/utils/resource_usage.h
+++ b/src/components/utils/include/utils/resource_usage.h
@@ -1,4 +1,4 @@
-/*
+/**
* Copyright (c) 2014, Ford Motor Company
* All rights reserved.
*
diff --git a/src/components/utils/include/utils/signals.h b/src/components/utils/include/utils/signals.h
index 6c91836309..28e8afd9d6 100644
--- a/src/components/utils/include/utils/signals.h
+++ b/src/components/utils/include/utils/signals.h
@@ -1,49 +1,41 @@
/*
- * 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.
- */
+* Copyright (c) 2014, Ford Motor Company
+* All rights reserved.
+*
+* Redistribution and use in source and binary forms, with or without
+* modification, are permitted provided that the following conditions are met:
+*
+* Redistributions of source code must retain the above copyright notice, this
+* list of conditions and the following disclaimer.
+*
+* Redistributions in binary form must reproduce the above copyright notice,
+* this list of conditions and the following
+* disclaimer in the documentation and/or other materials provided with the
+* distribution.
+*
+* Neither the name of the Ford Motor Company nor the names of its contributors
+* may be used to endorse or promote products derived from this software
+* without specific prior written permission.
+*
+* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+* POSSIBILITY OF SUCH DAMAGE.
+*/
#ifndef SRC_COMPONENTS_UTILS_INCLUDE_UTILS_SIGNALS_H_
#define SRC_COMPONENTS_UTILS_INCLUDE_UTILS_SIGNALS_H_
-#ifdef __QNXNTO__
-typedef void (*sighandler_t) (int);
-#else
-#include <signal.h>
-#endif
-
namespace utils {
-
-bool SubscribeToTerminateSignal(sighandler_t func);
-bool SubscribeToFaultSignal(sighandler_t func);
-
+bool SubscribeToTerminateSignal(void (*func)(int32_t p));
+bool ResetSubscribeToTerminateSignal();
} // namespace utils
#endif // SRC_COMPONENTS_UTILS_INCLUDE_UTILS_SIGNALS_H_
diff --git a/src/components/utils/include/utils/singleton.h b/src/components/utils/include/utils/singleton.h
index 41face4f2f..d7b625e0a1 100644
--- a/src/components/utils/include/utils/singleton.h
+++ b/src/components/utils/include/utils/singleton.h
@@ -28,7 +28,7 @@
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
- */
+*/
#ifndef SRC_COMPONENTS_UTILS_INCLUDE_UTILS_SINGLETON_H_
#define SRC_COMPONENTS_UTILS_INCLUDE_UTILS_SINGLETON_H_
diff --git a/src/components/utils/include/utils/stl_utils.h b/src/components/utils/include/utils/stl_utils.h
index afab995857..f525c6429f 100644
--- a/src/components/utils/include/utils/stl_utils.h
+++ b/src/components/utils/include/utils/stl_utils.h
@@ -1,4 +1,4 @@
-/*
+/**
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
diff --git a/src/components/utils/include/utils/system.h b/src/components/utils/include/utils/system.h
index f04a5780ca..16bdc03673 100644
--- a/src/components/utils/include/utils/system.h
+++ b/src/components/utils/include/utils/system.h
@@ -1,4 +1,4 @@
-/*
+/**
* Copyright (c) 2014, Ford Motor Company
* All rights reserved.
*
diff --git a/src/components/utils/include/utils/threads/pulse_thread_delegate.h b/src/components/utils/include/utils/threads/pulse_thread_delegate.h
index 207b64caaf..bb109bde94 100644
--- a/src/components/utils/include/utils/threads/pulse_thread_delegate.h
+++ b/src/components/utils/include/utils/threads/pulse_thread_delegate.h
@@ -57,7 +57,7 @@ class PulseThreadDelegate : public ThreadDelegate {
*/
PulseThreadDelegate();
virtual void threadMain();
- virtual void exitThreadMain();
+ virtual bool exitThreadMain();
protected:
/**
@@ -86,7 +86,7 @@ class PulseThreadDelegate : public ThreadDelegate {
private:
enum {PULSE_CODE = _PULSE_CODE_MINAVAIL + 1};
- volatile bool run_;
+ bool run_;
int chid_;
int coid_;
};
diff --git a/src/components/utils/include/utils/threads/thread_manager.h b/src/components/utils/include/utils/threads/thread_manager.h
index 38fecb58a2..d72abb428f 100644
--- a/src/components/utils/include/utils/threads/thread_manager.h
+++ b/src/components/utils/include/utils/threads/thread_manager.h
@@ -63,7 +63,12 @@ namespace threads {
*/
class ThreadManager : public utils::Singleton<ThreadManager> {
public:
+ struct ThreadDesc {
+ pthread_t handle;
+ ThreadDelegate* delegate;
+ };
ThreadManager() {}
+ MessageQueue<ThreadDesc> threads_to_terminate;
private:
DISALLOW_COPY_AND_ASSIGN(ThreadManager);
diff --git a/src/components/utils/include/utils/threads/thread_validator.h b/src/components/utils/include/utils/threads/thread_validator.h
index 214b96c3e5..def1994b76 100644
--- a/src/components/utils/include/utils/threads/thread_validator.h
+++ b/src/components/utils/include/utils/threads/thread_validator.h
@@ -1,4 +1,4 @@
-/*
+/**
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
@@ -68,7 +68,7 @@ class SingleThreadSimpleValidator {
// of classes being checked for absence of concurrent access
void AssertRunningOnCreationThread() const;
private:
- const PlatformThreadHandle creation_thread_id_;
+ const Thread::Id creation_thread_id_;
};
@@ -91,13 +91,13 @@ class SingleThreadValidator {
// Must be called prior to transferring object being validated to
// another thread or when passing it back
- void PassToThread(PlatformThreadHandle thread_id) const;
+ void PassToThread(Thread::Id thread_id) const;
// This method should be called in every public method
// of classes being checked for absence of unintended concurrent
// access
void AssertRunningOnValidThread() const;
private:
- mutable PlatformThreadHandle owning_thread_id_;
+ mutable Thread::Id owning_thread_id_;
};
} // namespace threads
diff --git a/src/components/utils/src/appenders_loader.cc b/src/components/utils/src/appenders_loader.cc
index 9741bd1b8d..cbbd039060 100644
--- a/src/components/utils/src/appenders_loader.cc
+++ b/src/components/utils/src/appenders_loader.cc
@@ -39,7 +39,7 @@ namespace utils {
AppendersLoader appenders_loader;
AppendersLoader::AppendersLoader() {
- handle_ = dlopen("libappenders.so", RTLD_LAZY);
+ handle_ = dlopen("libappenders.so", RTLD_LAZY | RTLD_NODELETE);
}
AppendersLoader::~AppendersLoader() {
diff --git a/src/components/utils/src/back_trace.cc b/src/components/utils/src/back_trace.cc
index f49c60b467..23b1b4d1e9 100644
--- a/src/components/utils/src/back_trace.cc
+++ b/src/components/utils/src/back_trace.cc
@@ -1,4 +1,4 @@
-/*
+/**
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
@@ -89,7 +89,7 @@ vector<string> Backtrace::CallStack() const {
return callstack;
}
-threads::PlatformThreadHandle Backtrace::ThreadId() const {
+Thread::Id Backtrace::ThreadId() const {
return thread_id_;
}
diff --git a/src/components/utils/src/bitstream.cc b/src/components/utils/src/bitstream.cc
index ae353b44c6..c616b1ae4a 100644
--- a/src/components/utils/src/bitstream.cc
+++ b/src/components/utils/src/bitstream.cc
@@ -1,4 +1,4 @@
-/*
+/**
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
diff --git a/src/components/utils/src/conditional_variable_posix.cc b/src/components/utils/src/conditional_variable_posix.cc
index 9efae01c53..a89f8cab65 100644
--- a/src/components/utils/src/conditional_variable_posix.cc
+++ b/src/components/utils/src/conditional_variable_posix.cc
@@ -1,4 +1,4 @@
-/*
+/**
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
@@ -83,15 +83,6 @@ void ConditionalVariable::Broadcast() {
}
-void ConditionalVariable::Wait(Lock& lock) {
- lock.AssertTakenAndMarkFree();
- int32_t wait_status = pthread_cond_wait(&cond_var_,
- &lock.mutex_);
- lock.AssertFreeAndMarkTaken();
- if (wait_status != 0)
- LOG4CXX_ERROR(logger_, "Failed to wait for conditional variable");
-}
-
void ConditionalVariable::Wait(AutoLock& auto_lock) {
Lock& lock = auto_lock.GetLock();
lock.AssertTakenAndMarkFree();
diff --git a/src/components/utils/src/date_time.cc b/src/components/utils/src/date_time.cc
index 6185bd0480..f190951647 100644
--- a/src/components/utils/src/date_time.cc
+++ b/src/components/utils/src/date_time.cc
@@ -1,34 +1,34 @@
/*
- * 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.
- */
+* Copyright (c) 2014, Ford Motor Company
+* All rights reserved.
+*
+* Redistribution and use in source and binary forms, with or without
+* modification, are permitted provided that the following conditions are met:
+*
+* Redistributions of source code must retain the above copyright notice, this
+* list of conditions and the following disclaimer.
+*
+* Redistributions in binary form must reproduce the above copyright notice,
+* this list of conditions and the following
+* disclaimer in the documentation and/or other materials provided with the
+* distribution.
+*
+* Neither the name of the Ford Motor Company nor the names of its contributors
+* may be used to endorse or promote products derived from this software
+* without specific prior written permission.
+*
+* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+* POSSIBILITY OF SUCH DAMAGE.
+*/
#include <sys/time.h>
#include <stdint.h>
@@ -100,11 +100,3 @@ TimeCompare date_time::DateTime::compareTime(const TimevalStruct &time1, const T
}
} // namespace date_time
-
-bool operator<(const TimevalStruct& time1, const TimevalStruct& time2) {
- return date_time::DateTime::Less(time1, time2);
-}
-
-bool operator==(const TimevalStruct& time1, const TimevalStruct& time2) {
- return date_time::DateTime::Equal(time1, time2);
-}
diff --git a/src/components/utils/src/file_system.cc b/src/components/utils/src/file_system.cc
index cb01e4c561..64e021a6f1 100644
--- a/src/components/utils/src/file_system.cc
+++ b/src/components/utils/src/file_system.cc
@@ -325,12 +325,10 @@ std::vector<std::string> file_system::ListFiles(
}
closedir(directory);
-
- }
-
#ifdef __QNXNTO__
- delete[] direntbuffer;
+ delete[] direntbuffer;
#endif
+ }
return listFiles;
}
diff --git a/src/components/utils/src/lock_posix.cc b/src/components/utils/src/lock_posix.cc
index 4048b7d939..f75b7ee9ea 100644
--- a/src/components/utils/src/lock_posix.cc
+++ b/src/components/utils/src/lock_posix.cc
@@ -1,4 +1,4 @@
-/*
+/**
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
@@ -34,8 +34,6 @@
#include <errno.h>
#include <stdint.h>
-#include <stdio.h>
-#include <string.h>
#include "utils/logger.h"
@@ -49,7 +47,7 @@ Lock::Lock()
is_mutex_recursive_(false)
#endif // NDEBUG
{
- const int32_t status = pthread_mutex_init(&mutex_, NULL);
+ int32_t status = pthread_mutex_init(&mutex_, NULL);
if (status != 0) {
LOG4CXX_ERROR(logger_, "Failed to initialize mutex");
}
@@ -81,29 +79,54 @@ Lock::Lock(bool is_mutex_recursive)
Lock::~Lock() {
#ifndef NDEBUG
if (lock_taken_ > 0) {
- LOG4CXX_ERROR(logger_, "Destroying non-released mutex " << &mutex_);
+ LOG4CXX_ERROR(logger_, "Destroying non-released mutex");
}
#endif
int32_t status = pthread_mutex_destroy(&mutex_);
if (status != 0) {
- LOG4CXX_ERROR(logger_, "Failed to destroy mutex " << &mutex_ << ": " << strerror(status)); }
+ LOG4CXX_ERROR(logger_, "Failed to destroy mutex");
+ }
}
void Lock::Acquire() {
int32_t status = pthread_mutex_lock(&mutex_);
if (status != 0) {
- LOG4CXX_ERROR(logger_, "Failed to acquire mutex " << &mutex_ << ": " << strerror(status));
- } else {
- AssertFreeAndMarkTaken();
+ LOG4CXX_ERROR(logger_, "Failed to acquire mutex");
}
+ AssertFreeAndMarkTaken();
}
void Lock::Release() {
AssertTakenAndMarkFree();
int32_t status = pthread_mutex_unlock(&mutex_);
if (status != 0) {
- LOG4CXX_ERROR(logger_, "Failed to unlock mutex" << &mutex_ << ": " << strerror(status));
+ LOG4CXX_ERROR(logger_, "Failed to unlock mutex");
+ }
+}
+
+bool Lock::Try() {
+ bool ackquired = false;
+#ifndef NDEBUG
+ if ((lock_taken_ > 0) && !is_mutex_recursive_) {
+ LOG4CXX_ERROR(logger_, "Trying to lock already taken not recurcive mutex");
+ }
+#endif
+ switch(pthread_mutex_trylock(&mutex_)) {
+ case 0: {
+ ackquired = true;
+#ifndef NDEBUG
+ lock_taken_++;
+#endif
+ } break;
+ case EBUSY: {
+ ackquired = false;
+ } break;
+ default: {
+ ackquired = false;
+ LOG4CXX_ERROR(logger_, "Failed to try lock the mutex");
+ }
}
+ return ackquired;
}
#ifndef NDEBUG
diff --git a/src/components/utils/src/logger_status.cc b/src/components/utils/src/logger_status.cc
index ea9dfa3f22..be341b9add 100644
--- a/src/components/utils/src/logger_status.cc
+++ b/src/components/utils/src/logger_status.cc
@@ -34,6 +34,6 @@
namespace logger {
-volatile LoggerStatus logger_status = LoggerThreadNotCreated;
+LoggerStatus logger_status = LoggerThreadNotCreated;
} // namespace logger
diff --git a/src/components/utils/src/resource_usage.cc b/src/components/utils/src/resource_usage.cc
index 62c8d25b82..aaa9c1b4a7 100644
--- a/src/components/utils/src/resource_usage.cc
+++ b/src/components/utils/src/resource_usage.cc
@@ -124,8 +124,6 @@ bool Resources::GetProcInfo(Resources::PidStats& output) {
if (0 >= fd) {
LOG4CXX_ERROR(logger_, "Failed open process proc file : " << GetProcPath() <<
"; error no : " << strerror( errno ) );
-
- close(fd);
return false;
}
devctl(fd, DCMD_PROC_INFO, &output, sizeof(output), 0);
@@ -150,14 +148,14 @@ bool Resources::GetMemInfo(Resources::MemInfo &output) {
std::string as_path = GetStatPath();
struct stat st;
struct _dir* proc_dir = 0;
+ struct dirent* proc_entry = 0;
if (0 == (proc_dir = opendir(proc))) {
LOG4CXX_ERROR(logger_, "Unable to access to " << proc);
result = false;
return result;
}
- if (0 == readdir(proc_dir)) {
+ if (0 == (proc_entry = readdir(proc_dir))) {
LOG4CXX_ERROR(logger_, "Unable to read : " << proc_dir);
- closedir(proc_dir);
result = false;
return result;
}
diff --git a/src/components/utils/src/signals_linux.cc b/src/components/utils/src/signals_linux.cc
index 2e598d1b0f..3ded6a5877 100644
--- a/src/components/utils/src/signals_linux.cc
+++ b/src/components/utils/src/signals_linux.cc
@@ -1,63 +1,54 @@
/*
- * 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.
- */
+* Copyright (c) 2014, Ford Motor Company
+* All rights reserved.
+*
+* Redistribution and use in source and binary forms, with or without
+* modification, are permitted provided that the following conditions are met:
+*
+* Redistributions of source code must retain the above copyright notice, this
+* list of conditions and the following disclaimer.
+*
+* Redistributions in binary form must reproduce the above copyright notice,
+* this list of conditions and the following
+* disclaimer in the documentation and/or other materials provided with the
+* distribution.
+*
+* Neither the name of the Ford Motor Company nor the names of its contributors
+* may be used to endorse or promote products derived from this software
+* without specific prior written permission.
+*
+* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+* POSSIBILITY OF SUCH DAMAGE.
+*/
#include <csignal>
#include <cstdlib>
#include <stdint.h>
-#include "utils/signals.h"
-
namespace utils {
-bool SubscribeToTerminateSignal(sighandler_t func) {
+bool SubscribeToTerminateSignal(void (*func)(int32_t p)) {
struct sigaction act;
act.sa_handler = func;
sigemptyset(&act.sa_mask);
act.sa_flags = 0;
- bool sigint_subscribed = (sigaction(SIGINT, &act, NULL) == 0);
- bool sigterm_subscribed = (sigaction(SIGTERM, &act, NULL) == 0);
-
- return sigint_subscribed && sigterm_subscribed;
+ return (sigaction(SIGINT, &act, NULL) == 0)
+ && (sigaction(SIGTERM, &act, NULL) == 0);
}
-bool SubscribeToFaultSignal(sighandler_t func) {
- struct sigaction act;
- act.sa_handler = func;
- sigemptyset(&act.sa_mask);
- act.sa_flags = SA_RESETHAND; // we only want to catch SIGSEGV once to flush logger queue
-
- bool sigsegv_subscribed = (sigaction(SIGSEGV, &act, NULL) == 0);
-
- return sigsegv_subscribed;
+bool ResetSubscribeToTerminateSignal() {
+ void (*prev_func)(int32_t p);
+ prev_func = signal(SIGINT, SIG_DFL);
+ return (SIG_ERR != prev_func);
}
} // namespace utils
diff --git a/src/components/utils/src/system.cc b/src/components/utils/src/system.cc
index c48539b054..ee90315db0 100644
--- a/src/components/utils/src/system.cc
+++ b/src/components/utils/src/system.cc
@@ -1,4 +1,4 @@
-/*
+/**
* Copyright (c) 2014, Ford Motor Company
* All rights reserved.
*
diff --git a/src/components/utils/src/threads/posix_thread.cc b/src/components/utils/src/threads/posix_thread.cc
index 76cc5800e0..3f7e006eca 100644
--- a/src/components/utils/src/threads/posix_thread.cc
+++ b/src/components/utils/src/threads/posix_thread.cc
@@ -30,21 +30,19 @@
* POSSIBILITY OF SUCH DAMAGE.
*/
-#include "utils/threads/thread.h"
-
#include <errno.h>
#include <limits.h>
#include <stddef.h>
#include <signal.h>
-#include <unistd.h>
#include "utils/atomic.h"
-#include "utils/threads/thread_delegate.h"
+#include "utils/threads/thread.h"
#include "utils/threads/thread_manager.h"
#include "utils/logger.h"
#include "pthread.h"
+
#ifndef __QNXNTO__
const int EOK = 0;
#endif
@@ -57,75 +55,50 @@ namespace threads {
CREATE_LOGGERPTR_GLOBAL(logger_, "Utils")
-size_t Thread::kMinStackSize = PTHREAD_STACK_MIN; /* Ubuntu : 16384 ; QNX : 256; */
-
-void Thread::cleanup(void* arg) {
- LOG4CXX_AUTO_TRACE(logger_);
- Thread* thread = reinterpret_cast<Thread*>(arg);
- sync_primitives::AutoLock auto_lock(thread->state_lock_);
- thread->isThreadRunning_ = false;
- thread->state_cond_.Broadcast();
+namespace {
+
+static void* threadFunc(void* arg) {
+ LOG4CXX_INFO(logger_, "Thread #" << pthread_self() << " started successfully");
+ threads::Thread* thread = static_cast<threads::Thread*>(arg);
+ threads::ThreadDelegate* delegate = thread->delegate();
+ delegate->threadMain();
+ thread->set_running(false);
+ MessageQueue<ThreadManager::ThreadDesc>& threads = ::threads::ThreadManager::instance()->threads_to_terminate;
+ if (!threads.IsShuttingDown()) {
+ LOG4CXX_INFO(logger_, "Pushing thread #" << pthread_self() << " to join queue");
+ ThreadManager::ThreadDesc desc = { pthread_self(), delegate };
+ threads.push(desc);
+ }
+ LOG4CXX_INFO(logger_, "Thread #" << pthread_self() << " exited successfully");
+ return NULL;
}
-void* Thread::threadFunc(void* arg) {
- // 0 - state_lock unlocked
- // stopped = 0
- // running = 0
- // finalized = 0
- // 4 - state_lock unlocked
- // stopped = 1
- // running = 1
- // finalized = 0
- // 5 - state_lock unlocked
- // stopped = 1
- // running = 1
- // finalized = 1
- pthread_setcancelstate(PTHREAD_CANCEL_DISABLE, NULL);
- LOG4CXX_DEBUG(logger_, "Thread #" << pthread_self() << " started successfully");
-
- threads::Thread* thread = reinterpret_cast<Thread*>(arg);
- DCHECK(thread);
-
- pthread_cleanup_push(&cleanup, thread);
-
- thread->state_lock_.Acquire();
- thread->state_cond_.Broadcast();
-
- while (!thread->finalized_) {
- LOG4CXX_DEBUG(logger_, "Thread #" << pthread_self() << " iteration");
- thread->run_cond_.Wait(thread->state_lock_);
- LOG4CXX_DEBUG(logger_, "Thread #" << pthread_self() << " execute. "
- << "stopped_ = " << thread->stopped_ << "; finalized_ = " << thread->finalized_);
- if (!thread->stopped_ && !thread->finalized_) {
- thread->isThreadRunning_ = true;
- pthread_setcancelstate(PTHREAD_CANCEL_ENABLE, NULL);
- pthread_testcancel();
-
- thread->state_lock_.Release();
- thread->delegate_->threadMain();
- thread->state_lock_.Acquire();
-
- pthread_setcancelstate(PTHREAD_CANCEL_DISABLE, NULL);
- thread->isThreadRunning_ = false;
- }
- thread->state_cond_.Broadcast();
- LOG4CXX_DEBUG(logger_, "Thread #" << pthread_self() << " finished iteration");
- }
+}
- thread->state_lock_.Release();
- pthread_cleanup_pop(1);
+size_t Thread::kMinStackSize = PTHREAD_STACK_MIN; /* Ubuntu : 16384 ; QNX : 256; */
- LOG4CXX_DEBUG(logger_, "Thread #" << pthread_self() << " exited successfully");
- return NULL;
+/*
+void ThreadBase::set_name(const std::string name) {
+ std::string trimname = name.erase(15);
+ if(pthread_setname_np(thread_handle_, trimname.c_str()) != EOK) {
+ LOG4CXX_WARN(logger_, "Couldn't set pthread name \""
+ << trimname
+ << "\", error code "
+ << pthread_result
+ << " ("
+ << strerror(pthread_result)
+ << ")");
+ }
}
+*/
-void Thread::SetNameForId(const PlatformThreadHandle& thread_id, std::string name) {
- if (name.size() > THREAD_NAME_SIZE)
- name.erase(THREAD_NAME_SIZE);
- const int rc = pthread_setname_np(thread_id, name.c_str());
- if(rc != EOK) {
+void Thread::SetNameForId(const Id& thread_id, const std::string& name) {
+ std::string nm = name;
+ std::string& trimname = nm.size() > 15 ? nm.erase(15) : nm;
+ const int rc = pthread_setname_np(thread_id.id_, trimname.c_str());
+ if(rc == EOK) {
LOG4CXX_WARN(logger_, "Couldn't set pthread name \""
- << name
+ << trimname
<< "\", error code "
<< rc
<< " ("
@@ -137,61 +110,46 @@ void Thread::SetNameForId(const PlatformThreadHandle& thread_id, std::string nam
Thread::Thread(const char* name, ThreadDelegate* delegate)
: name_(name ? name : "undefined"),
delegate_(delegate),
- handle_(0),
+ thread_handle_(0),
thread_options_(),
- isThreadRunning_(0),
- stopped_(false),
- finalized_(false),
- thread_created_(false) { }
-
-bool Thread::start() {
- return start(thread_options_);
+ isThreadRunning_(0) {
}
-PlatformThreadHandle Thread::CurrentId() {
- return pthread_self();
+ThreadDelegate* Thread::delegate() const {
+ return delegate_;
}
-void Thread::WaitForRun() {
- sync_primitives::AutoLock auto_lock(state_lock_);
- run_cond_.Wait(auto_lock);
+bool Thread::start() {
+ return startWithOptions(thread_options_);
}
-bool Thread::start(const ThreadOptions& options) {
- LOG4CXX_AUTO_TRACE(logger_);
-
- sync_primitives::AutoLock auto_lock(state_lock_);
- // 1 - state_lock locked
- // stopped = 0
- // running = 0
+Thread::Id Thread::CurrentId() {
+ return Id(pthread_self());
+}
+bool Thread::startWithOptions(const ThreadOptions& options) {
+ LOG4CXX_TRACE_ENTER(logger_);
if (!delegate_) {
- LOG4CXX_ERROR(logger_, "Cannot start thread" << name_
- << ": delegate is NULL");
- // 0 - state_lock unlocked
+ NOTREACHED();
+ LOG4CXX_ERROR(logger_, "NULL delegate");
+ LOG4CXX_TRACE_EXIT(logger_);
return false;
}
- if (isThreadRunning_) {
- LOG4CXX_TRACE(logger_, "EXIT thread "<< name_
- << " #" << handle_ << "is already runing");
- return true;
- }
-
thread_options_ = options;
pthread_attr_t attributes;
int pthread_result = pthread_attr_init(&attributes);
if (pthread_result != EOK) {
LOG4CXX_WARN(logger_,"Couldn't init pthread attributes. Error code = "
- << pthread_result << " (\"" << strerror(pthread_result) << "\")");
+ << pthread_result << "(\"" << strerror(pthread_result) << "\")");
}
if (!thread_options_.is_joinable()) {
pthread_result = pthread_attr_setdetachstate(&attributes, PTHREAD_CREATE_DETACHED);
if (pthread_result != EOK) {
- LOG4CXX_WARN(logger_,"Couldn't set detach state attribute. Error code = "
- << pthread_result << " (\"" << strerror(pthread_result) << "\")");
+ LOG4CXX_WARN(logger_,"Couldn't set detach state attribute.. Error code = "
+ << pthread_result << "(\"" << strerror(pthread_result) << "\")");
thread_options_.is_joinable(false);
}
}
@@ -201,78 +159,66 @@ bool Thread::start(const ThreadOptions& options) {
pthread_result = pthread_attr_setstacksize(&attributes, stack_size);
if (pthread_result != EOK) {
LOG4CXX_WARN(logger_,"Couldn't set stacksize = " << stack_size <<
- ". Error code = " << pthread_result
- << " (\"" << strerror(pthread_result) << "\")");
+ ". Error code = " << pthread_result << "(\""
+ << strerror(pthread_result) << "\")");
}
}
- if (!thread_created_) {
- // state_lock 1
- pthread_result = pthread_create(&handle_, &attributes, threadFunc, this);
- if (pthread_result == EOK) {
- LOG4CXX_INFO(logger_,"Created thread: " << name_);
- SetNameForId(handle_, name_);
- // state_lock 0
- // possible concurrencies: stop and threadFunc
- state_cond_.Wait(auto_lock);
- thread_created_ = true;
- } else {
- LOG4CXX_ERROR(logger_, "Couldn't create thread " << name_
- << ". Error code = " << pthread_result
- << " (\"" << strerror(pthread_result) << "\")");
- }
+ pthread_result = pthread_create(&thread_handle_, &attributes, threadFunc, this);
+ isThreadRunning_ = (pthread_result == EOK);
+ if (!isThreadRunning_) {
+ LOG4CXX_WARN(logger_, "Couldn't create thread. Error code = "
+ << pthread_result << "(\"" << strerror(pthread_result) << "\")");
+ } else {
+ LOG4CXX_INFO(logger_,"Created thread: " << name_);
+ SetNameForId(Id(thread_handle_), name_);
}
- stopped_ = false;
- run_cond_.NotifyOne();
- LOG4CXX_DEBUG(logger_,"Thread " << name_
- << " #" << handle_ << " started. pthread_result = "
- << pthread_result);
- return pthread_result == EOK;
+ LOG4CXX_TRACE_EXIT(logger_);
+ return isThreadRunning_;
}
void Thread::stop() {
- LOG4CXX_AUTO_TRACE(logger_);
- sync_primitives::AutoLock auto_lock(state_lock_);
-
- stopped_ = true;
+ LOG4CXX_TRACE_ENTER(logger_);
- LOG4CXX_DEBUG(logger_, "Stopping thread #" << handle_
- << " \"" << name_ << " \"");
+ if (!atomic_post_clr(&isThreadRunning_))
+ {
+ return;
+ }
- if (delegate_ && isThreadRunning_) {
- delegate_->exitThreadMain();
+ if (delegate_ && !delegate_->exitThreadMain()) {
+ if (thread_handle_ != pthread_self()) {
+ LOG4CXX_WARN(logger_, "Cancelling thread #" << thread_handle_);
+ const int pthread_result = pthread_cancel(thread_handle_);
+ if (pthread_result != EOK) {
+ LOG4CXX_WARN(logger_,
+ "Couldn't cancel thread (#" << thread_handle_ << " \"" << name_ <<
+ "\") from thread #" << pthread_self() << ". Error code = "
+ << pthread_result << " (\"" << strerror(pthread_result) << "\")");
+ }
+ } else {
+ LOG4CXX_ERROR(logger_,
+ "Couldn't cancel the same thread (#" << thread_handle_
+ << "\"" << name_ << "\")");
+ }
}
- LOG4CXX_DEBUG(logger_, "Stopped thread #" << handle_
- << " \"" << name_ << " \"");
+ LOG4CXX_TRACE_EXIT(logger_);
}
-void Thread::join() {
- LOG4CXX_AUTO_TRACE(logger_);
- DCHECK(!pthread_equal(pthread_self(), handle_));
-
- stop();
-
- sync_primitives::AutoLock auto_lock(state_lock_);
- run_cond_.NotifyOne();
- if (isThreadRunning_) {
- if(!pthread_equal(pthread_self(), handle_)) {
- state_cond_.Wait(auto_lock);
- }
- }
+bool Thread::Id::operator==(const Thread::Id& other) const {
+ return pthread_equal(id_, other.id_) != 0;
}
-Thread::~Thread() {
- finalized_ = true;
- stopped_ = true;
- join();
- pthread_join(handle_, NULL);
+std::ostream& operator<<(std::ostream& os, const Thread::Id& thread_id) {
+ char name[32];
+ if(pthread_getname_np(thread_id.Handle(), name, 32) == 0) {
+ os << name;
+ }
+ return os;
}
Thread* CreateThread(const char* name, ThreadDelegate* delegate) {
- Thread* thread = new Thread(name, delegate);
- delegate->set_thread(thread);
- return thread;
+ return new Thread(name, delegate);
}
void DeleteThread(Thread* thread) {
@@ -280,5 +226,4 @@ void DeleteThread(Thread* thread) {
}
-
} // namespace threads
diff --git a/src/components/utils/src/threads/pulse_thread_delegate.cc b/src/components/utils/src/threads/pulse_thread_delegate.cc
index 68db5dcbea..8c580bea83 100644
--- a/src/components/utils/src/threads/pulse_thread_delegate.cc
+++ b/src/components/utils/src/threads/pulse_thread_delegate.cc
@@ -91,7 +91,7 @@ void PulseThreadDelegate::threadMain() {
Finalize();
}
-void PulseThreadDelegate::exitThreadMain() {
+bool PulseThreadDelegate::exitThreadMain() {
run_ = false;
LOG4CXX_TRACE(logger_, "Disconnecting from QNX channel " << chid_);
@@ -109,6 +109,8 @@ void PulseThreadDelegate::exitThreadMain() {
else {
LOG4CXX_WARN(logger_, "Failed to destroy QNX channel " << chid_);
}
+
+ return true;
}
} // namespace threads
diff --git a/src/components/utils/src/threads/thread_validator.cc b/src/components/utils/src/threads/thread_validator.cc
index d10a736078..5e9c88a7c9 100644
--- a/src/components/utils/src/threads/thread_validator.cc
+++ b/src/components/utils/src/threads/thread_validator.cc
@@ -1,4 +1,4 @@
-/*
+/**
* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
@@ -46,7 +46,7 @@ SingleThreadSimpleValidator::~SingleThreadSimpleValidator() {
}
void SingleThreadSimpleValidator::AssertRunningOnCreationThread() const {
- PlatformThreadHandle current_id = Thread::CurrentId();
+ Thread::Id current_id = Thread::CurrentId();
if (creation_thread_id_ != current_id) {
LOG4CXX_ERROR(logger_, "Single-threaded object created at thread "
<< creation_thread_id_
@@ -68,12 +68,12 @@ SingleThreadValidator::SingleThreadValidator()
SingleThreadValidator::~SingleThreadValidator() {
}
-void SingleThreadValidator::PassToThread(PlatformThreadHandle thread_id) const {
+void SingleThreadValidator::PassToThread(Thread::Id thread_id) const {
owning_thread_id_ = thread_id;
}
void SingleThreadValidator::AssertRunningOnValidThread() const {
- PlatformThreadHandle current_id = Thread::CurrentId();
+ Thread::Id current_id = Thread::CurrentId();
if (owning_thread_id_ != current_id) {
LOG4CXX_ERROR(logger_, "Single-threaded object owned by thread "
<< owning_thread_id_
diff --git a/src/components/utils/test/CMakeLists.txt b/src/components/utils/test/CMakeLists.txt
index 15e086b117..a9ed5acdac 100644
--- a/src/components/utils/test/CMakeLists.txt
+++ b/src/components/utils/test/CMakeLists.txt
@@ -4,7 +4,6 @@ include_directories (
set(testSources
main.cc
- messagemeter_test.cc
file_system_test.cc
date_time_test.cc)
diff --git a/src/components/utils/test/date_time_test.cc b/src/components/utils/test/date_time_test.cc
index e092d16293..ddcf679a16 100644
--- a/src/components/utils/test/date_time_test.cc
+++ b/src/components/utils/test/date_time_test.cc
@@ -1,34 +1,34 @@
/*
- * 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.
- */
+* Copyright (c) 2014, Ford Motor Company
+* All rights reserved.
+*
+* Redistribution and use in source and binary forms, with or without
+* modification, are permitted provided that the following conditions are met:
+*
+* Redistributions of source code must retain the above copyright notice, this
+* list of conditions and the following disclaimer.
+*
+* Redistributions in binary form must reproduce the above copyright notice,
+* this list of conditions and the following
+* disclaimer in the documentation and/or other materials provided with the
+* distribution.
+*
+* Neither the name of the Ford Motor Company nor the names of its contributors
+* may be used to endorse or promote products derived from this software
+* without specific prior written permission.
+*
+* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+* POSSIBILITY OF SUCH DAMAGE.
+*/
#include <unistd.h>
diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt
index b75135e9b0..73c0db32f4 100644
--- a/test/CMakeLists.txt
+++ b/test/CMakeLists.txt
@@ -17,7 +17,6 @@ set (INCLUDE_DIR
${JSONCPP_INCLUDE_DIRECTORY}
${MESSAGE_BROKER_INCLUDE_DIRECTORY}
${LOG4CXX_INCLUDE_DIRECTORY}
- ${CMAKE_SOURCE_DIR}/src/components/utils/include
../src/appMain
../src/components/application_manager/include
../src/components/hmi_message_handler/include
diff --git a/test/components/application_manager/CMakeLists.txt b/test/components/application_manager/CMakeLists.txt
index 9d5e3802b4..cdf43100d0 100644
--- a/test/components/application_manager/CMakeLists.txt
+++ b/test/components/application_manager/CMakeLists.txt
@@ -7,10 +7,10 @@
include_directories (
${LOG4CXX_INCLUDE_DIRECTORY}
${GMOCK_INCLUDE_DIRECTORY}
- ${CMAKE_SOURCE_DIR}/src/components/utils/include
../../../src/components/application_manager/include
../../../src/components/smart_objects/include
../../../src/components/formatters/include/
+ ../../../src/components/utils/include/
${JSONCPP_INCLUDE_DIRECTORY}
${CMAKE_BINARY_DIR}/src/components/
)
diff --git a/test/components/application_manager/generated_factory.h b/test/components/application_manager/generated_factory.h
index 27ac61def9..b84c504d8b 100644
--- a/test/components/application_manager/generated_factory.h
+++ b/test/components/application_manager/generated_factory.h
@@ -77,7 +77,7 @@ TEST(generated_factory, create) {
"application_manager::SomeClass",
new test_command::SomeClass);
- if (!thread->start(
+ if (!thread->startWithOptions(
threads::ThreadOptions(16384))) {
std::cout << "Something went wrong with thread." << std::endl;
return;
diff --git a/test/components/connection_handler/CMakeLists.txt b/test/components/connection_handler/CMakeLists.txt
index 9e0a8ba97d..7d281e33ec 100644
--- a/test/components/connection_handler/CMakeLists.txt
+++ b/test/components/connection_handler/CMakeLists.txt
@@ -4,7 +4,6 @@ include_directories (
./include
${CMAKE_SOURCE_DIR}/src/components/connection_handler/include
${CMAKE_SOURCE_DIR}/src/components/protocol_handler/include
- ${CMAKE_SOURCE_DIR}/src/components/utils/include
../../../src/components/utils/include
../../../src/components/config_profile/include
../security_manager/include
diff --git a/test/components/connection_handler/include/connection_handler/heart_beat_monitor_test.h b/test/components/connection_handler/include/connection_handler/heart_beat_monitor_test.h
index 84ecbb8e0b..b6fba79e26 100644
--- a/test/components/connection_handler/include/connection_handler/heart_beat_monitor_test.h
+++ b/test/components/connection_handler/include/connection_handler/heart_beat_monitor_test.h
@@ -1,4 +1,4 @@
-/*
+/*
* Copyright (c) 2013-2014, Ford Motor Company
* All rights reserved.
*
@@ -65,12 +65,11 @@ class ConnectionHandlerMock : public connection_handler::ConnectionHandler {
MOCK_METHOD2(GetDeviceID,
bool(const std::string& mac_address,
connection_handler::DeviceHandle* device_handle));
+ MOCK_METHOD1(CloseSession,
+ void(uint32_t key));
MOCK_METHOD2(CloseSession,
- void(uint32_t key, connection_handler::CloseSessionReason));
- MOCK_METHOD3(CloseSession,
void(connection_handler::ConnectionHandle connection_handle,
- uint8_t session_id,
- connection_handler::CloseSessionReason));
+ uint8_t session_id));
MOCK_METHOD1(StartSessionHeartBeat,
void(uint32_t key));
MOCK_METHOD2(SendHeartBeat,
@@ -128,8 +127,7 @@ TEST_F(HeartBeatMonitorTest, TimerNotElapsed) {
TEST_F(HeartBeatMonitorTest, TimerElapsed) {
const uint32_t session = conn->AddNewSession();
- EXPECT_CALL(connection_handler_mock, CloseSession(
- _,session, connection_handler::kCommon)).Times(1)
+ EXPECT_CALL(connection_handler_mock, CloseSession(_, session)).Times(1)
.WillOnce(RemoveSession(conn, session));
EXPECT_CALL(connection_handler_mock, CloseConnection(_)).Times(1);
EXPECT_CALL(connection_handler_mock, SendHeartBeat(_, session)).Times(1);
@@ -139,8 +137,7 @@ TEST_F(HeartBeatMonitorTest, TimerElapsed) {
}
TEST_F(HeartBeatMonitorTest, KeptAlive) {
- EXPECT_CALL(connection_handler_mock, CloseSession(
- _, _, connection_handler::kCommon)).Times(0);
+ EXPECT_CALL(connection_handler_mock, CloseSession(_, _)).Times(0);
EXPECT_CALL(connection_handler_mock, CloseConnection(_)).Times(0);
EXPECT_CALL(connection_handler_mock, SendHeartBeat(_, _)).Times(0);
@@ -158,8 +155,7 @@ TEST_F(HeartBeatMonitorTest, KeptAlive) {
TEST_F(HeartBeatMonitorTest, NotKeptAlive) {
const uint32_t session = conn->AddNewSession();
- EXPECT_CALL(connection_handler_mock, CloseSession(
- _, session, connection_handler::kCommon)).Times(1)
+ EXPECT_CALL(connection_handler_mock, CloseSession(_, session)).Times(1)
.WillOnce(RemoveSession(conn, session));
EXPECT_CALL(connection_handler_mock, CloseConnection(_)).Times(1);
EXPECT_CALL(connection_handler_mock, SendHeartBeat(_, session)).Times(1);
@@ -178,11 +174,9 @@ TEST_F(HeartBeatMonitorTest, TwoSessionsElapsed) {
const uint32_t kSession1 = conn->AddNewSession();
const uint32_t kSession2 = conn->AddNewSession();
- EXPECT_CALL(connection_handler_mock, CloseSession(
- _, kSession1, connection_handler::kCommon)).Times(1)
+ EXPECT_CALL(connection_handler_mock, CloseSession(_, kSession1)).Times(1)
.WillOnce(RemoveSession(conn, kSession1));
- EXPECT_CALL(connection_handler_mock, CloseSession(
- _, kSession2, connection_handler::kCommon)).Times(1)
+ EXPECT_CALL(connection_handler_mock, CloseSession(_, kSession2)).Times(1)
.WillOnce(RemoveSession(conn, kSession2));
EXPECT_CALL(connection_handler_mock, CloseConnection(_)).Times(1);
EXPECT_CALL(connection_handler_mock, SendHeartBeat(_, kSession1)).Times(1);
@@ -196,8 +190,7 @@ TEST_F(HeartBeatMonitorTest, TwoSessionsElapsed) {
TEST_F(HeartBeatMonitorTest, IncreaseHeartBeatTimeout) {
const uint32_t kSession = conn->AddNewSession();
- EXPECT_CALL(connection_handler_mock, CloseSession(
- _, _, connection_handler::kCommon)).Times(0);
+ EXPECT_CALL(connection_handler_mock, CloseSession(_, _)).Times(0);
EXPECT_CALL(connection_handler_mock, CloseConnection(_)).Times(0);
EXPECT_CALL(connection_handler_mock, SendHeartBeat(_, _)).Times(0);
@@ -212,8 +205,7 @@ TEST_F(HeartBeatMonitorTest, IncreaseHeartBeatTimeout) {
TEST_F(HeartBeatMonitorTest, DecreaseHeartBeatTimeout) {
const uint32_t kSession = conn->AddNewSession();
- EXPECT_CALL(connection_handler_mock, CloseSession(
- _, kSession, connection_handler::kCommon)).Times(1)
+ EXPECT_CALL(connection_handler_mock, CloseSession(_, kSession)).Times(1)
.WillOnce(RemoveSession(conn, kSession));;
EXPECT_CALL(connection_handler_mock, CloseConnection(_)).Times(1);
EXPECT_CALL(connection_handler_mock, SendHeartBeat(_, kSession)).Times(1);
diff --git a/test/components/include/protocol_handler/control_message_matcher.h b/test/components/include/protocol_handler/control_message_matcher.h
index f392e4a200..70b4a573e1 100644
--- a/test/components/include/protocol_handler/control_message_matcher.h
+++ b/test/components/include/protocol_handler/control_message_matcher.h
@@ -34,7 +34,6 @@
#include <gmock/gmock.h>
#include <string>
-#include <vector>
#include "protocol/raw_message.h"
#include "protocol_handler/protocol_packet.h"
@@ -52,14 +51,9 @@ MATCHER_P4(ControlMessage, ExpectedFrameData, ExpectedEncryption,
// Nack shall be always with flag protected off
DCHECK(ExpectedFrameData != 0x03 /*FRAME_DATA_START_SERVICE_NACK*/ ||
!ExpectedEncryption);
- const ::protocol_handler::RawMessagePtr message = arg;
- ::protocol_handler::ProtocolPacket packet(message->connection_key());
- const protocol_handler::RESULT_CODE result =
- packet.deserializePacket(message->data(), message->data_size());
- if (result != protocol_handler::RESULT_OK) {
- *result_listener << "Error while message deserialization.";
- return false;
- }
+ const RawMessagePtr message = arg;
+ const ::protocol_handler::ProtocolPacket packet(
+ message->connection_key(), message->data(), message->data_size());
if (::protocol_handler::FRAME_TYPE_CONTROL != packet.frame_type()) {
*result_listener << "Is not control message";
return false;
@@ -96,39 +90,6 @@ MATCHER_P4(ControlMessage, ExpectedFrameData, ExpectedEncryption,
}
return true;
}
-
-MATCHER_P2(ControlMessage, ExpectedFrameData, ExpectedEncryption,
- (std::string(ExpectedEncryption ? "Protected" : "Unprotected")
- + " control message ")) {
- // Nack shall be always with flag protected off
- DCHECK(ExpectedFrameData != 0x03 /*FRAME_DATA_START_SERVICE_NACK*/ ||
- !ExpectedEncryption);
- const ::protocol_handler::RawMessagePtr message = arg;
- ::protocol_handler::ProtocolPacket packet(message->connection_key());
- const protocol_handler::RESULT_CODE result =
- packet.deserializePacket(message->data(), message->data_size());
- if (result != protocol_handler::RESULT_OK) {
- *result_listener << "Error while message deserialization.";
- return false;
- }
- if (::protocol_handler::FRAME_TYPE_CONTROL != packet.frame_type()) {
- *result_listener << "Is not control message";
- return false;
- }
- if (ExpectedFrameData != packet.frame_data()) {
- *result_listener << "Control message with data 0x"
- << std::hex << static_cast<int>(packet.frame_data())
- << ", not 0x"
- << std::hex << static_cast<int>(ExpectedFrameData);
- return false;
- }
- if (ExpectedEncryption != packet.protection_flag()) {
- *result_listener << "Control message is " <<
- (ExpectedEncryption ? "" : "not ") << "protected";
- return false;
- }
- return true;
-}
} // namespace protocol_handler_test
} // namespace components
} // namespace test
diff --git a/test/components/include/protocol_handler/protocol_handler_mock.h b/test/components/include/protocol_handler/protocol_handler_mock.h
index d9e7759757..eac6ecf546 100644
--- a/test/components/include/protocol_handler/protocol_handler_mock.h
+++ b/test/components/include/protocol_handler/protocol_handler_mock.h
@@ -45,7 +45,7 @@ namespace protocol_handler_test {
class ProtocolHandlerMock: public ::protocol_handler::ProtocolHandler {
public:
MOCK_METHOD2(SendMessageToMobileApp,
- void(const ::protocol_handler::RawMessagePtr message,
+ void(const RawMessagePtr message,
bool final_message));
MOCK_METHOD1(AddProtocolObserver,
void(::protocol_handler::ProtocolObserver *observer));
diff --git a/test/components/include/protocol_handler/protocol_observer_mock.h b/test/components/include/protocol_handler/protocol_observer_mock.h
index 9049c9db9b..6153216fff 100644
--- a/test/components/include/protocol_handler/protocol_observer_mock.h
+++ b/test/components/include/protocol_handler/protocol_observer_mock.h
@@ -47,9 +47,9 @@ namespace protocol_handler_test {
class ProtocolObserverMock: public ::protocol_handler::ProtocolObserver {
public:
MOCK_METHOD1(OnMessageReceived,
- void(const ::protocol_handler::RawMessagePtr));
+ void(const RawMessagePtr));
MOCK_METHOD1(OnMobileMessageSent,
- void(const ::protocol_handler::RawMessagePtr));
+ void(const RawMessagePtr));
};
} // namespace protocol_handler_test
} // namespace components
diff --git a/test/components/include/protocol_handler/session_observer_mock.h b/test/components/include/protocol_handler/session_observer_mock.h
index 91d9b40b3f..c2fe89cc95 100644
--- a/test/components/include/protocol_handler/session_observer_mock.h
+++ b/test/components/include/protocol_handler/session_observer_mock.h
@@ -58,8 +58,6 @@ class SessionObserverMock: public ::protocol_handler::SessionObserver {
const uint8_t sessionId,
const uint32_t &hashCode,
const ::protocol_handler::ServiceType &service_type));
- MOCK_METHOD1(OnApplicationFloodCallBack,
- void(const uint32_t&));
MOCK_METHOD2(KeyFromPair,
uint32_t(
transport_manager::ConnectionUID connection_handle,
diff --git a/test/components/include/transport_manager/transport_manager_mock.h b/test/components/include/transport_manager/transport_manager_mock.h
index eb8e9b4b53..db333b4da3 100644
--- a/test/components/include/transport_manager/transport_manager_mock.h
+++ b/test/components/include/transport_manager/transport_manager_mock.h
@@ -78,8 +78,6 @@ class TransportManagerMock: public ::transport_manager::TransportManager {
int(const DeviceHandle &));
MOCK_CONST_METHOD1(Visibility,
int(const bool &));
- MOCK_METHOD0(Reinit,
- int());
};
} // namespace transport_manager_test
} // namespace components
diff --git a/test/components/protocol_handler/CMakeLists.txt b/test/components/protocol_handler/CMakeLists.txt
index 5c0dbbdcd1..804119ce27 100644
--- a/test/components/protocol_handler/CMakeLists.txt
+++ b/test/components/protocol_handler/CMakeLists.txt
@@ -1,7 +1,6 @@
include_directories(
${GMOCK_INCLUDE_DIRECTORY}
${LOG4CXX_INCLUDE_DIRECTORY}
- ${CMAKE_SOURCE_DIR}/src/components/utils/include
./include
${CMAKE_SOURCE_DIR}/src/components/protocol_handler/include
${SecurityManagerIncludeDir}
@@ -23,8 +22,6 @@ set(LIBRARIES
set(SOURCES
src/protocol_handler_tm_test.cc
- src/incoming_data_handler_test.cc
- src/protocol_header_validator_test.cc
)
create_test(test_ProtocolHandler "${SOURCES}" "${LIBRARIES}")
diff --git a/test/components/protocol_handler/include/protocol_handler/protocol_handler_mock.h b/test/components/protocol_handler/include/protocol_handler/protocol_handler_mock.h
index 3d5a45d7d2..efa9ecfada 100644
--- a/test/components/protocol_handler/include/protocol_handler/protocol_handler_mock.h
+++ b/test/components/protocol_handler/include/protocol_handler/protocol_handler_mock.h
@@ -68,7 +68,7 @@ class TransportManagerMock: public TransportManager{
MOCK_METHOD1(DisconnectForce,
int(const ConnectionUID &));
MOCK_METHOD1(SendMessageToDevice,
- int(const ::protocol_handler::RawMessagePtr));
+ int(const RawMessageSptr));
MOCK_METHOD1(ReceiveEventFromDevice,
int(const TransportAdapterEvent&));
MOCK_METHOD1(AddTransportAdapter,
@@ -113,8 +113,6 @@ class SessionObserverMock: public protocol_handler::SessionObserver {
const uint8_t sessionId,
const uint32_t& hashCode,
const protocol_handler::ServiceType& service_type));
- MOCK_METHOD1(OnApplicationFloodCallBack,
- void(const uint32_t&));
MOCK_METHOD2(KeyFromPair,
uint32_t(
transport_manager::ConnectionUID connection_handle,
@@ -160,6 +158,34 @@ class SecurityManagerMock: public security_manager::SecurityManager {
const uint32_t ));
};
#endif // ENABLE_SECURITY
+
+/*
+ * Matcher for checking RawMessage with InternalError Query
+ * Check error id
+ */
+MATCHER_P2(ControlMessage, ExpectedFrameData, ExpectedEncryption,
+ std::string(ExpectedEncryption ? "Protected" : "Unprotected") + " control message ") {
+ // Nack shall be always with flag protected off
+ DCHECK(ExpectedFrameData != 0x03 /*FRAME_DATA_START_SERVICE_NACK*/ ||
+ !ExpectedEncryption);
+ const RawMessagePtr message = arg;
+ const ProtocolPacket packet(message->connection_key(), message->data(), message->data_size());
+ if (FRAME_TYPE_CONTROL != packet.frame_type()) {
+ *result_listener << "Is not control message";
+ return false;
+ }
+ if (ExpectedFrameData != packet.frame_data()) {
+ *result_listener << "Control message is not with data 0x"
+ << std::hex << (int)ExpectedFrameData;
+ return false;
+ }
+ if (ExpectedEncryption != packet.protection_flag()) {
+ *result_listener << "Control message is " <<
+ (ExpectedEncryption ? "" : "not ") << "protected";
+ return false;
+ }
+ return true;
+}
} // namespace test
} // namespace components
} // namespace protocol_handler_test
diff --git a/test/components/protocol_handler/include/protocol_handler/protocol_handler_tm_test.h b/test/components/protocol_handler/include/protocol_handler/protocol_handler_tm_test.h
index 08f661b806..0139d0e0de 100644
--- a/test/components/protocol_handler/include/protocol_handler/protocol_handler_tm_test.h
+++ b/test/components/protocol_handler/include/protocol_handler/protocol_handler_tm_test.h
@@ -48,7 +48,6 @@
#include "security_manager/security_manager_mock.h"
#include "security_manager/ssl_context_mock.h"
#include "transport_manager/transport_manager_mock.h"
-#include "protocol_handler/control_message_matcher.h"
namespace test {
namespace components {
@@ -65,7 +64,7 @@ using ::transport_manager::TransportManagerListener;
using protocol_handler_test::ControlMessage;
using ::testing::Return;
using ::testing::ReturnNull;
-using ::testing::AnyOf;
+using ::testing::AllOf;
using ::testing::Ge;
using ::testing::Le;
using ::testing::_;
@@ -73,23 +72,18 @@ using ::testing::Invoke;
class ProtocolHandlerImplTest : public ::testing::Test {
protected:
- void IntitProtocolHandlerImpl(const size_t period_msec, const size_t max_messages) {
- protocol_handler_impl.reset(new ProtocolHandlerImpl(&transport_manager_mock,
- period_msec, max_messages));
+ void SetUp() OVERRIDE {
+ protocol_handler_impl.reset(new ProtocolHandlerImpl(&transport_manager_mock));
protocol_handler_impl->set_session_observer(&session_observer_mock);
tm_listener = protocol_handler_impl.get();
- }
- void SetUp() OVERRIDE {
- IntitProtocolHandlerImpl(0u, 0u);
connection_id = 0xAu;
session_id = 0xFFu;
connection_key = 0xFF00AAu;
message_id = 0xABCDEFu;
- some_date.resize(256, 0xAB);
// expect ConnectionHandler support methods call (conversion, check heartbeat)
EXPECT_CALL(session_observer_mock,
- KeyFromPair(connection_id, _)).
+ KeyFromPair(connection_id, session_id)).
//return some connection_key
WillRepeatedly(Return(connection_key));
EXPECT_CALL(session_observer_mock,
@@ -97,7 +91,6 @@ class ProtocolHandlerImplTest : public ::testing::Test {
//return false to avoid call KeepConnectionAlive
WillRepeatedly(Return(false));
}
-
void TearDown() OVERRIDE {
// Wait call methods in thread
usleep(100000);
@@ -125,7 +118,7 @@ class ProtocolHandlerImplTest : public ::testing::Test {
// expect ConnectionHandler check
EXPECT_CALL(session_observer_mock,
OnSessionStartedCallback(connection_id, NEW_SESSION_ID, start_service,
- callback_protection_flag, _)).
+ callback_protection_flag)).
//return sessions start success
WillOnce(Return(session_id));
@@ -147,20 +140,20 @@ class ProtocolHandlerImplTest : public ::testing::Test {
uint8_t version, bool protection, uint8_t frameType,
uint8_t serviceType, uint8_t frameData,
uint8_t sessionId, uint32_t dataSize,
- uint32_t messageID, const uint8_t *data = 0) {
+ uint32_t messageID, const uint8_t *data = 0,
+ uint32_t packet_id = 0) {
// Create packet
const ProtocolPacket packet(
connection_id, version, protection, frameType,
serviceType, frameData, sessionId, dataSize,
- messageID, data);
+ messageID, data, packet_id);
// Emulate resive packet from transoprt manager
tm_listener->OnTMMessageReceived(packet.serializePacket());
}
void SendControlMessage(bool protection, uint8_t service_type,
- uint8_t sessionId, uint32_t frame_data,
- uint32_t dataSize = 0u, const uint8_t *data = NULL) {
+ uint8_t sessionId, uint32_t frame_data) {
SendTMMessage(connection_id, PROTOCOL_VERSION_3, protection, FRAME_TYPE_CONTROL,
- service_type, frame_data, sessionId, dataSize, message_id, data);
+ service_type, frame_data, sessionId, 0, message_id);
}
::utils::SharedPtr<ProtocolHandlerImpl> protocol_handler_impl;
@@ -172,7 +165,6 @@ class ProtocolHandlerImplTest : public ::testing::Test {
// uniq id as connection_id and session_id in one
uint32_t connection_key;
uint32_t message_id;
- std::vector<uint8_t> some_date;
// Strict mocks (same as all methods EXPECT_CALL().Times(0))
testing::StrictMock<transport_manager_test::TransportManagerMock> transport_manager_mock;
testing::StrictMock<protocol_handler_test::SessionObserverMock> session_observer_mock;
@@ -206,7 +198,7 @@ TEST_F(ProtocolHandlerImplTest, RecieveEmptyRawMessage) {
* ProtocolHandler shall disconnect on no connection
*/
TEST_F(ProtocolHandlerImplTest, RecieveOnUnknownConenction) {
- // expect force dicsonnect on no connection for received data
+ // expect force dicsonnect on no connection for recieved data
EXPECT_CALL(transport_manager_mock,
DisconnectForce(connection_id)).
WillOnce(Return(E_SUCCESS));
@@ -219,13 +211,12 @@ TEST_F(ProtocolHandlerImplTest, RecieveOnUnknownConenction) {
* Check protection flag OFF for all services from kControl to kBulk
*/
TEST_F(ProtocolHandlerImplTest, StartSession_Unprotected_SessionObserverReject) {
- const int call_times = 5;
+ const int call_times = kBulk - kControl;
AddConnection();
// expect ConnectionHandler check
EXPECT_CALL(session_observer_mock,
OnSessionStartedCallback(
- connection_id, NEW_SESSION_ID, AnyOf(kControl, kRpc, kAudio,
- kMobileNav, kBulk), PROTECTION_OFF, _)).
+ connection_id, NEW_SESSION_ID, AllOf(Ge(kControl), Le(kBulk)), PROTECTION_OFF)).
Times(call_times).
//return sessions start rejection
WillRepeatedly(Return(SESSION_START_REJECT));
@@ -236,11 +227,9 @@ TEST_F(ProtocolHandlerImplTest, StartSession_Unprotected_SessionObserverReject)
Times(call_times).
WillRepeatedly(Return(E_SUCCESS));
- SendControlMessage(PROTECTION_OFF, kControl, NEW_SESSION_ID, FRAME_DATA_START_SERVICE);
- SendControlMessage(PROTECTION_OFF, kRpc, NEW_SESSION_ID, FRAME_DATA_START_SERVICE);
- SendControlMessage(PROTECTION_OFF, kAudio, NEW_SESSION_ID, FRAME_DATA_START_SERVICE);
- SendControlMessage(PROTECTION_OFF, kMobileNav,NEW_SESSION_ID, FRAME_DATA_START_SERVICE);
- SendControlMessage(PROTECTION_OFF, kBulk, NEW_SESSION_ID, FRAME_DATA_START_SERVICE);
+ for (uint8_t service_type = kControl; service_type < kBulk; ++service_type) {
+ SendControlMessage(PROTECTION_OFF, kControl, NEW_SESSION_ID, FRAME_DATA_START_SERVICE);
+ }
}
/*
* ProtocolHandler shall send NAck on session_observer rejection
@@ -248,7 +237,7 @@ TEST_F(ProtocolHandlerImplTest, StartSession_Unprotected_SessionObserverReject)
* For ENABLE_SECURITY=OFF session_observer shall be called with protection flag OFF
*/
TEST_F(ProtocolHandlerImplTest, StartSession_Protected_SessionObserverReject) {
- const int call_times = 5;
+ const int call_times = kBulk - kControl;
AddConnection();
#ifdef ENABLE_SECURITY
// For enabled protection callback shall use protection ON
@@ -259,9 +248,8 @@ TEST_F(ProtocolHandlerImplTest, StartSession_Protected_SessionObserverReject) {
#endif // ENABLE_SECURITY
// expect ConnectionHandler check
EXPECT_CALL(session_observer_mock,
- OnSessionStartedCallback(
- connection_id, NEW_SESSION_ID, AnyOf(kControl, kRpc, kAudio,
- kMobileNav, kBulk), callback_protection_flag, _)).
+ OnSessionStartedCallback(connection_id, NEW_SESSION_ID, AllOf(Ge(kControl), Le(kBulk)),
+ callback_protection_flag)).
Times(call_times).
//return sessions start rejection
WillRepeatedly(Return(SESSION_START_REJECT));
@@ -272,11 +260,9 @@ TEST_F(ProtocolHandlerImplTest, StartSession_Protected_SessionObserverReject) {
Times(call_times).
WillRepeatedly(Return(E_SUCCESS));
- SendControlMessage(PROTECTION_ON, kControl, NEW_SESSION_ID, FRAME_DATA_START_SERVICE);
- SendControlMessage(PROTECTION_ON, kRpc, NEW_SESSION_ID, FRAME_DATA_START_SERVICE);
- SendControlMessage(PROTECTION_ON, kAudio, NEW_SESSION_ID, FRAME_DATA_START_SERVICE);
- SendControlMessage(PROTECTION_ON, kMobileNav,NEW_SESSION_ID, FRAME_DATA_START_SERVICE);
- SendControlMessage(PROTECTION_ON, kBulk, NEW_SESSION_ID, FRAME_DATA_START_SERVICE);
+ for (uint8_t service_type = kControl; service_type < kBulk; ++service_type) {
+ SendControlMessage(PROTECTION_ON, kControl, NEW_SESSION_ID, FRAME_DATA_START_SERVICE);
+ }
}
/*
* ProtocolHandler shall send Ack on session_observer accept
@@ -287,7 +273,7 @@ TEST_F(ProtocolHandlerImplTest, StartSession_Unprotected_SessionObserverAccept)
const ServiceType start_service = kRpc;
// expect ConnectionHandler check
EXPECT_CALL(session_observer_mock,
- OnSessionStartedCallback(connection_id, NEW_SESSION_ID, start_service, PROTECTION_OFF, _)).
+ OnSessionStartedCallback(connection_id, NEW_SESSION_ID, start_service, PROTECTION_OFF)).
//return sessions start success
WillOnce(Return(session_id));
@@ -306,7 +292,6 @@ TEST_F(ProtocolHandlerImplTest, StartSession_Unprotected_SessionObserverAccept)
TEST_F(ProtocolHandlerImplTest, StartSession_Protected_SessionObserverAccept) {
AddSession();
}
-// TODO(EZamakhov): add test for get_hash_id/set_hash_id from protocol_handler_impl.cc
/*
* ProtocolHandler shall send NAck on session_observer rejection
*/
@@ -316,11 +301,31 @@ TEST_F(ProtocolHandlerImplTest, EndSession_SessionObserverReject) {
// expect ConnectionHandler check
EXPECT_CALL(session_observer_mock,
- OnSessionEndedCallback(connection_id, session_id, _, service)).
- // reject session start
+ OnSessionEndedCallback(connection_id, session_id, message_id, service)).
+ //return sessions start success
WillOnce(Return(SESSION_START_REJECT));
- // expect send NAck
+ // expect send Ack
+ EXPECT_CALL(transport_manager_mock,
+ SendMessageToDevice(ControlMessage(FRAME_DATA_END_SERVICE_NACK, PROTECTION_OFF))).
+ WillOnce(Return(E_SUCCESS));
+
+ SendControlMessage(PROTECTION_OFF, service, session_id, FRAME_DATA_END_SERVICE);
+}
+/*
+ * ProtocolHandler shall send NAck on wrong hash code
+ */
+TEST_F(ProtocolHandlerImplTest, EndSession_WrongHash) {
+ AddSession();
+ const ServiceType service = kRpc;
+
+ // expect ConnectionHandler check
+ EXPECT_CALL(session_observer_mock,
+ OnSessionEndedCallback(connection_id, session_id, message_id, service)).
+ //return sessions start success
+ WillOnce(Return(connection_key ^ 0xFF));
+
+ // expect send Ack
EXPECT_CALL(transport_manager_mock,
SendMessageToDevice(ControlMessage(FRAME_DATA_END_SERVICE_NACK, PROTECTION_OFF))).
WillOnce(Return(E_SUCCESS));
@@ -334,10 +339,13 @@ TEST_F(ProtocolHandlerImplTest, EndSession_Success) {
AddSession();
const ServiceType service = kRpc;
+ //Send with correct hash code
+ const uint32_t hash = connection_key;
+
// expect ConnectionHandler check
EXPECT_CALL(session_observer_mock,
- OnSessionEndedCallback(connection_id, session_id, _, service)).
- // return sessions start success
+ OnSessionEndedCallback(connection_id, session_id, hash, service)).
+ //return sessions start success
WillOnce(Return(connection_key));
// expect send Ack
@@ -345,7 +353,8 @@ TEST_F(ProtocolHandlerImplTest, EndSession_Success) {
SendMessageToDevice(ControlMessage(FRAME_DATA_END_SERVICE_ACK, PROTECTION_OFF))).
WillOnce(Return(E_SUCCESS));
- SendControlMessage(PROTECTION_OFF, service, session_id, FRAME_DATA_END_SERVICE);
+ SendTMMessage(connection_id, PROTOCOL_VERSION_3, PROTECTION_OFF, FRAME_TYPE_CONTROL,
+ service, FRAME_DATA_END_SERVICE, session_id, 0, hash);
}
#ifdef ENABLE_SECURITY
@@ -360,7 +369,7 @@ TEST_F(ProtocolHandlerImplTest, SecurityEnable_StartSessionProtocoloV1) {
const ServiceType start_service = kRpc;
// expect ConnectionHandler check
EXPECT_CALL(session_observer_mock,
- OnSessionStartedCallback(connection_id, NEW_SESSION_ID, start_service, PROTECTION_OFF, _)).
+ OnSessionStartedCallback(connection_id, NEW_SESSION_ID, start_service, PROTECTION_OFF)).
//return sessions start success
WillOnce(Return(session_id));
@@ -382,7 +391,7 @@ TEST_F(ProtocolHandlerImplTest, SecurityEnable_StartSessionUnprotected) {
const ServiceType start_service = kRpc;
// expect ConnectionHandler check
EXPECT_CALL(session_observer_mock,
- OnSessionStartedCallback(connection_id, NEW_SESSION_ID, start_service, PROTECTION_OFF, _)).
+ OnSessionStartedCallback(connection_id, NEW_SESSION_ID, start_service, PROTECTION_OFF)).
//return sessions start success
WillOnce(Return(session_id));
@@ -402,7 +411,7 @@ TEST_F(ProtocolHandlerImplTest, SecurityEnable_StartSessionProtected_Fail) {
const ServiceType start_service = kRpc;
// expect ConnectionHandler check
EXPECT_CALL(session_observer_mock,
- OnSessionStartedCallback(connection_id, NEW_SESSION_ID, start_service, PROTECTION_ON, _)).
+ OnSessionStartedCallback(connection_id, NEW_SESSION_ID, start_service, PROTECTION_ON)).
//return sessions start success
WillOnce(Return(session_id));
@@ -428,7 +437,7 @@ TEST_F(ProtocolHandlerImplTest,SecurityEnable_StartSessionProtected_SSLInitializ
const ServiceType start_service = kRpc;
// expect ConnectionHandler check
EXPECT_CALL(session_observer_mock,
- OnSessionStartedCallback(connection_id, NEW_SESSION_ID, start_service, PROTECTION_ON, _)).
+ OnSessionStartedCallback(connection_id, NEW_SESSION_ID, start_service, PROTECTION_ON)).
//return sessions start success
WillOnce(Return(session_id));
@@ -464,7 +473,7 @@ TEST_F(ProtocolHandlerImplTest, SecurityEnable_StartSessionProtected_HandshakeFa
const ServiceType start_service = kRpc;
// expect ConnectionHandler check
EXPECT_CALL(session_observer_mock,
- OnSessionStartedCallback(connection_id, NEW_SESSION_ID, start_service, PROTECTION_ON, _)).
+ OnSessionStartedCallback(connection_id, NEW_SESSION_ID, start_service, PROTECTION_ON)).
//return sessions start success
WillOnce(Return(session_id));
@@ -514,7 +523,7 @@ TEST_F(ProtocolHandlerImplTest, SecurityEnable_StartSessionProtected_HandshakeSu
const ServiceType start_service = kRpc;
// expect ConnectionHandler check
EXPECT_CALL(session_observer_mock,
- OnSessionStartedCallback(connection_id, NEW_SESSION_ID, start_service, PROTECTION_ON, _)).
+ OnSessionStartedCallback(connection_id, NEW_SESSION_ID, start_service, PROTECTION_ON)).
//return sessions start success
WillOnce(Return(session_id));
@@ -569,7 +578,7 @@ TEST_F(ProtocolHandlerImplTest,
const ServiceType start_service = kRpc;
// expect ConnectionHandler check
EXPECT_CALL(session_observer_mock,
- OnSessionStartedCallback(connection_id, NEW_SESSION_ID, start_service, PROTECTION_ON, _)).
+ OnSessionStartedCallback(connection_id, NEW_SESSION_ID, start_service, PROTECTION_ON)).
//return sessions start success
WillOnce(Return(session_id));
@@ -624,7 +633,7 @@ TEST_F(ProtocolHandlerImplTest,
const ServiceType start_service = kRpc;
// expect ConnectionHandler check
EXPECT_CALL(session_observer_mock,
- OnSessionStartedCallback(connection_id, NEW_SESSION_ID, start_service, PROTECTION_ON, _)).
+ OnSessionStartedCallback(connection_id, NEW_SESSION_ID, start_service, PROTECTION_ON)).
//return sessions start success
WillOnce(Return(session_id));
@@ -673,85 +682,6 @@ TEST_F(ProtocolHandlerImplTest,
SendControlMessage(PROTECTION_ON, start_service, NEW_SESSION_ID, FRAME_DATA_START_SERVICE);
}
-TEST_F(ProtocolHandlerImplTest,
- FloodVerification) {
- const size_t period_msec = 1000;
- const size_t max_messages = 1000;
- IntitProtocolHandlerImpl(period_msec, max_messages);
- AddConnection();
- AddSession();
-
- // expect flood notification to CH
- EXPECT_CALL(session_observer_mock,
- OnApplicationFloodCallBack(connection_key)).
- Times(1);
-
- for (size_t i = 0; i < max_messages + 1; ++i) {
- SendTMMessage(connection_id, PROTOCOL_VERSION_3, PROTECTION_OFF, FRAME_TYPE_SINGLE,
- kControl, FRAME_DATA_SINGLE, session_id,
- some_date.size(), message_id, &some_date[0]);
- }
-}
-TEST_F(ProtocolHandlerImplTest,
- FloodVerification_ThresholdValue) {
- const size_t period_msec = 1000;
- const size_t max_messages = 1000;
- IntitProtocolHandlerImpl(period_msec, max_messages);
- AddConnection();
- AddSession();
-
- // expect NO flood notification to CH
- for (size_t i = 0; i < max_messages - 1; ++i) {
- SendTMMessage(connection_id, PROTOCOL_VERSION_3, PROTECTION_OFF, FRAME_TYPE_SINGLE,
- kControl, FRAME_DATA_SINGLE, session_id,
- some_date.size(), message_id, &some_date[0]);
- }
-}
-TEST_F(ProtocolHandlerImplTest,
- FloodVerification_VideoFrameSkip) {
- const size_t period_msec = 1000;
- const size_t max_messages = 1000;
- IntitProtocolHandlerImpl(period_msec, max_messages);
- AddConnection();
- AddSession();
-
- // expect NO flood notification to CH on video data streaming
- for (size_t i = 0; i < max_messages + 1; ++i) {
- SendTMMessage(connection_id, PROTOCOL_VERSION_3, PROTECTION_OFF, FRAME_TYPE_SINGLE,
- kMobileNav, FRAME_DATA_SINGLE, session_id,
- some_date.size(), message_id, &some_date[0]);
- }
-}
-TEST_F(ProtocolHandlerImplTest,
- FloodVerification_AudioFrameSkip) {
- const size_t period_msec = 1000;
- const size_t max_messages = 1000;
- IntitProtocolHandlerImpl(period_msec, max_messages);
- AddConnection();
- AddSession();
-
- // expect NO flood notification to CH on video data streaming
- for (size_t i = 0; i < max_messages + 1; ++i) {
- SendTMMessage(connection_id, PROTOCOL_VERSION_3, PROTECTION_OFF, FRAME_TYPE_SINGLE,
- kAudio, FRAME_DATA_SINGLE, session_id,
- some_date.size(), message_id, &some_date[0]);
- }
-}
-TEST_F(ProtocolHandlerImplTest,
- FloodVerificationDisable) {
- const size_t period_msec = 0;
- const size_t max_messages = 0;
- IntitProtocolHandlerImpl(period_msec, max_messages);
- AddConnection();
- AddSession();
-
- // expect NO flood notification to session observer
- for (size_t i = 0; i < max_messages + 1; ++i) {
- SendTMMessage(connection_id, PROTOCOL_VERSION_3, PROTECTION_OFF, FRAME_TYPE_SINGLE,
- kControl, FRAME_DATA_SINGLE, session_id,
- some_date.size(), message_id, &some_date[0]);
- }
-}
#endif // ENABLE_SECURITY
} // namespace test
} // namespace components
diff --git a/test/components/security_manager/CMakeLists.txt b/test/components/security_manager/CMakeLists.txt
index 8d73065009..072f83d7d6 100644
--- a/test/components/security_manager/CMakeLists.txt
+++ b/test/components/security_manager/CMakeLists.txt
@@ -36,7 +36,6 @@ include_directories(
../../../src/thirdPartyLibs/gmock-1.7.0/gtest/include
${SecurityManagerIncludeDir}
${CMAKE_SOURCE_DIR}/src/components/protocol_handler/include
- ${CMAKE_SOURCE_DIR}/src/components/utils/include/
)
set(SOURCES
diff --git a/test/components/security_manager/include/security_manager/security_manager_mock.h b/test/components/security_manager/include/security_manager/security_manager_mock.h
index a2c3301efb..4d4657500b 100644
--- a/test/components/security_manager/include/security_manager/security_manager_mock.h
+++ b/test/components/security_manager/include/security_manager/security_manager_mock.h
@@ -71,8 +71,6 @@ namespace security_manager_test {
const uint8_t sessionId,
const uint32_t& hashCode,
const protocol_handler::ServiceType& service_type));
- MOCK_METHOD1(OnApplicationFloodCallBack,
- void(const uint32_t&));
MOCK_METHOD2(KeyFromPair,
uint32_t(
transport_manager::ConnectionUID connection_handle,
diff --git a/test/components/security_manager/include/security_manager/security_manager_test.h b/test/components/security_manager/include/security_manager/security_manager_test.h
index e4dd9d1bb9..ece82c8d90 100644
--- a/test/components/security_manager/include/security_manager/security_manager_test.h
+++ b/test/components/security_manager/include/security_manager/security_manager_test.h
@@ -277,7 +277,7 @@ using namespace ::security_manager;
call_OnMessageReceived(NULL, 0, kInvalidServiceType);
}
/*
- * Shall send InternallError on null data received
+ * Shall send InternallError on null data recieved
*/
TEST_F(SecurityManagerTest, GetEmptyQuery) {
EXPECT_CALL(mock_protocol_handler,
@@ -289,7 +289,7 @@ using namespace ::security_manager;
call_OnMessageReceived(NULL, 0, secureServiceType);
}
/*
- * Shall send InternallError on null data received
+ * Shall send InternallError on null data recieved
*/
TEST_F(SecurityManagerTest, GetWrongJSONSize) {
SetMockCryptoManger();
diff --git a/test/components/transport_manager/CMakeLists.txt b/test/components/transport_manager/CMakeLists.txt
index 9ffa4dd39c..dfc87ebd1a 100644
--- a/test/components/transport_manager/CMakeLists.txt
+++ b/test/components/transport_manager/CMakeLists.txt
@@ -3,7 +3,6 @@ include_directories (
./include
${CMAKE_SOURCE_DIR}/src/components/transport_manager/include
${CMAKE_SOURCE_DIR}/src/components/config_profile/include/
- ${CMAKE_SOURCE_DIR}/src/components/utils/include/
${LIBUSB_INCLUDE_DIRECTORY}
${LOG4CXX_INCLUDE_DIRECTORY}
)
diff --git a/test/components/transport_manager/include/transport_manager/mock_transport_adapter_listener.h b/test/components/transport_manager/include/transport_manager/mock_transport_adapter_listener.h
index 6f5ceb4846..43fa693376 100644
--- a/test/components/transport_manager/include/transport_manager/mock_transport_adapter_listener.h
+++ b/test/components/transport_manager/include/transport_manager/mock_transport_adapter_listener.h
@@ -43,7 +43,6 @@
using namespace transport_manager;
using transport_manager::transport_adapter::TransportAdapter;
using transport_manager::transport_adapter::TransportAdapterListener;
-using ::protocol_handler::RawMessagePtr;
namespace test {
namespace components {
diff --git a/test/components/transport_manager/include/transport_manager/raw_message_matcher.h b/test/components/transport_manager/include/transport_manager/raw_message_matcher.h
index 18408378b4..3d7ec5a2b5 100644
--- a/test/components/transport_manager/include/transport_manager/raw_message_matcher.h
+++ b/test/components/transport_manager/include/transport_manager/raw_message_matcher.h
@@ -45,9 +45,6 @@ using ::testing::Matcher;
using ::testing::MatcherInterface;
using ::testing::MatchResultListener;
-using RawMessagePtr = ::protocol_handler::RawMessagePtr;
-using RawMessage = ::protocol_handler::RawMessage;
-
namespace test {
namespace components {
namespace transport_manager {
diff --git a/test/components/transport_manager/src/test_tcp_transport_adapter.cc b/test/components/transport_manager/src/test_tcp_transport_adapter.cc
index 9f9a6f10cd..c0f28270cc 100644
--- a/test/components/transport_manager/src/test_tcp_transport_adapter.cc
+++ b/test/components/transport_manager/src/test_tcp_transport_adapter.cc
@@ -13,8 +13,6 @@
namespace transport_manager {
namespace transport_adapter {
-using RawMessage = ::protocol_handler::RawMessage;
-
TEST(TcpAdapterBasicTest, Basic) {
TransportAdapter* transport_adapter = new TcpTransportAdapter(12345);
diff --git a/test/test_suit.cc b/test/test_suit.cc
index b76396df58..6a5554d1bb 100644
--- a/test/test_suit.cc
+++ b/test/test_suit.cc
@@ -37,8 +37,6 @@
#include "utils/logger.h"
#include "protocol_handler/protocol_handler_tm_test.h"
-#include "protocol_handler/incoming_data_handler_test.h"
-#include "protocol_handler/protocol_header_validator_test.h"
#include "application_manager/formatters_commands.h"
#include "connection_handler/heart_beat_monitor_test.h"