From adcca686d6374d5fdd2e24414516a61847ea8b9f Mon Sep 17 00:00:00 2001 From: Ira Lytvynenko Date: Tue, 6 Feb 2018 16:40:17 +0200 Subject: Refactor CommandFactory Fix SendAudioPassThroughNotification Rename Command Origin to Command Source --- .../application_manager/src/commands/command_request_impl.cc | 4 ++-- .../application_manager/src/commands/hmi/notification_from_hmi.cc | 2 +- .../src/commands/hmi/on_exit_application_notification.cc | 4 ++-- .../src/commands/hmi/on_tts_language_change_notification.cc | 2 +- .../src/commands/hmi/on_ui_language_change_notification.cc | 2 +- .../src/commands/hmi/on_vr_language_change_notification.cc | 2 +- .../application_manager/src/commands/hmi/response_from_hmi.cc | 2 +- .../src/commands/mobile/register_app_interface_request.cc | 2 +- .../src/commands/mobile/unregister_app_interface_request.cc | 2 +- 9 files changed, 11 insertions(+), 11 deletions(-) (limited to 'src/components/application_manager/src/commands') diff --git a/src/components/application_manager/src/commands/command_request_impl.cc b/src/components/application_manager/src/commands/command_request_impl.cc index 69266b1b65..36217e9bc3 100644 --- a/src/components/application_manager/src/commands/command_request_impl.cc +++ b/src/components/application_manager/src/commands/command_request_impl.cc @@ -244,7 +244,7 @@ void CommandRequestImpl::onTimeOut() { mobile_api::Result::GENERIC_ERROR); AddTimeOutComponentInfoToMessage(*response); application_manager_.GetRPCService().ManageMobileCommand(response, - ORIGIN_SDL); + SOURCE_SDL); } void CommandRequestImpl::on_event(const event_engine::Event& event) {} @@ -307,7 +307,7 @@ void CommandRequestImpl::SendResponse( is_success_result_ = success; - application_manager_.GetRPCService().ManageMobileCommand(result, ORIGIN_SDL); + application_manager_.GetRPCService().ManageMobileCommand(result, SOURCE_SDL); } bool CommandRequestImpl::CheckSyntax(const std::string& str, 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 55ecfd6643..2135431f10 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 @@ -62,7 +62,7 @@ void NotificationFromHMI::SendNotificationToMobile( const MessageSharedPtr& message) { (*message)[strings::params][strings::message_type] = static_cast(application_manager::MessageType::kNotification); - application_manager_.GetRPCService().ManageMobileCommand(message, ORIGIN_SDL); + application_manager_.GetRPCService().ManageMobileCommand(message, SOURCE_SDL); } void NotificationFromHMI::CreateHMIRequest( 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 8e43fdfd01..4b48650265 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 @@ -86,7 +86,7 @@ void OnExitApplicationNotification::Run() { application_manager_.GetRPCService().ManageMobileCommand( MessageHelper::GetOnAppInterfaceUnregisteredNotificationToMobile( app_id, AppInterfaceUnregisteredReason::APP_UNAUTHORIZED), - commands::Command::ORIGIN_SDL); + commands::Command::SOURCE_SDL); // HMI rejects registration for navi application application_manager_.UnregisterApplication(app_id, Result::SUCCESS); return; @@ -95,7 +95,7 @@ void OnExitApplicationNotification::Run() { application_manager_.GetRPCService().ManageMobileCommand( MessageHelper::GetOnAppInterfaceUnregisteredNotificationToMobile( app_id, AppInterfaceUnregisteredReason::UNSUPPORTED_HMI_RESOURCE), - commands::Command::ORIGIN_SDL); + commands::Command::SOURCE_SDL); application_manager_.UnregisterApplication(app_id, Result::SUCCESS); return; } 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 f7fe10f332..4571cfeb5b 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 @@ -82,7 +82,7 @@ void OnTTSLanguageChangeNotification::Run() { MessageHelper::GetOnAppInterfaceUnregisteredNotificationToMobile( app->app_id(), mobile_api::AppInterfaceUnregisteredReason::LANGUAGE_CHANGE), - commands::Command::ORIGIN_SDL); + commands::Command::SOURCE_SDL); application_manager_.UnregisterApplication( app->app_id(), mobile_apis::Result::SUCCESS, false); } 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 caea874371..8eac4a1c80 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 @@ -81,7 +81,7 @@ void OnUILanguageChangeNotification::Run() { MessageHelper::GetOnAppInterfaceUnregisteredNotificationToMobile( app->app_id(), mobile_api::AppInterfaceUnregisteredReason::LANGUAGE_CHANGE), - commands::Command::ORIGIN_SDL); + commands::Command::SOURCE_SDL); application_manager_.UnregisterApplication( app->app_id(), mobile_apis::Result::SUCCESS, false); } 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 c94a341fcb..740c51a211 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 @@ -80,7 +80,7 @@ void OnVRLanguageChangeNotification::Run() { MessageHelper::GetOnAppInterfaceUnregisteredNotificationToMobile( app->app_id(), mobile_api::AppInterfaceUnregisteredReason::LANGUAGE_CHANGE), - commands::Command::ORIGIN_SDL); + commands::Command::SOURCE_SDL); application_manager_.UnregisterApplication( app->app_id(), mobile_apis::Result::SUCCESS, false); } diff --git a/src/components/application_manager/src/commands/hmi/response_from_hmi.cc b/src/components/application_manager/src/commands/hmi/response_from_hmi.cc index 6ec83debb0..123789730c 100644 --- a/src/components/application_manager/src/commands/hmi/response_from_hmi.cc +++ b/src/components/application_manager/src/commands/hmi/response_from_hmi.cc @@ -67,7 +67,7 @@ void ResponseFromHMI::SendResponseToMobile( const MessageSharedPtr& message, ApplicationManager& application_manager) { (*message)[strings::params][strings::message_type] = MessageType::kResponse; - application_manager_.GetRPCService().ManageMobileCommand(message, ORIGIN_SDL); + application_manager_.GetRPCService().ManageMobileCommand(message, SOURCE_SDL); } void ResponseFromHMI::CreateHMIRequest( 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 41edfad205..c0e46ea4e0 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 @@ -398,7 +398,7 @@ void RegisterAppInterfaceRequest::Run() { smart_objects::SmartObjectSPtr so = GetLockScreenIconUrlNotification(connection_key(), application); application_manager_.GetRPCService().ManageMobileCommand( - so, commands::Command::ORIGIN_SDL); + so, commands::Command::SOURCE_SDL); } smart_objects::SmartObjectSPtr 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 10cb54a8a1..08c3e228cb 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 @@ -52,7 +52,7 @@ void UnregisterAppInterfaceRequest::Run() { MessageHelper::GetOnAppInterfaceUnregisteredNotificationToMobile( connection_key(), mobile_api::AppInterfaceUnregisteredReason::INVALID_ENUM), - commands::Command::ORIGIN_SDL); + commands::Command::SOURCE_SDL); application_manager_.EndNaviServices(connection_key()); application_manager_.UnregisterApplication(connection_key(), mobile_apis::Result::SUCCESS); -- cgit v1.2.1