diff options
Diffstat (limited to 'src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands')
10 files changed, 38 insertions, 17 deletions
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/alert_request.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/alert_request.cc index dc225df3be..7a0fd79b08 100644 --- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/alert_request.cc +++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/alert_request.cc @@ -251,7 +251,8 @@ bool AlertRequest::Validate(uint32_t app_id) { return false; } - if (mobile_apis::HMILevel::HMI_BACKGROUND == app->hmi_level() && + if (mobile_apis::HMILevel::HMI_BACKGROUND == + app->hmi_level(mobile_apis::PredefinedWindows::DEFAULT_WINDOW) && app->AreCommandLimitsExceeded( static_cast<mobile_apis::FunctionID::eType>(function_id()), application_manager::TLimitSource::POLICY_TABLE)) { diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/delete_file_request.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/delete_file_request.cc index b2c9a3377f..46af8353b7 100644 --- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/delete_file_request.cc +++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/delete_file_request.cc @@ -68,7 +68,9 @@ void DeleteFileRequest::Run() { return; } - if ((mobile_api::HMILevel::HMI_NONE == application->hmi_level()) && + if ((mobile_api::HMILevel::HMI_NONE == + application->hmi_level( + mobile_apis::PredefinedWindows::DEFAULT_WINDOW)) && (application_manager_.get_settings().delete_file_in_none() <= application->delete_file_in_none_count())) { // If application is in the HMI_NONE level the quantity of allowed diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/list_files_request.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/list_files_request.cc index 46a39513d5..b8714b4784 100644 --- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/list_files_request.cc +++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/list_files_request.cc @@ -70,7 +70,9 @@ void ListFilesRequest::Run() { return; } - if ((mobile_api::HMILevel::HMI_NONE == application->hmi_level()) && + if ((mobile_api::HMILevel::HMI_NONE == + application->hmi_level( + mobile_apis::PredefinedWindows::DEFAULT_WINDOW)) && (application_manager_.get_settings().list_files_in_none() <= application->list_files_in_none_count())) { // If application is in the HMI_NONE level the quantity of allowed diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/on_button_event_notification.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/on_button_event_notification.cc index f0368a742d..a3a77cd4e2 100644 --- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/on_button_event_notification.cc +++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/on_button_event_notification.cc @@ -102,8 +102,10 @@ void OnButtonEventNotification::Run() { return; } - if ((mobile_api::HMILevel::HMI_FULL != app->hmi_level()) && - (mobile_api::HMILevel::HMI_LIMITED != app->hmi_level())) { + const mobile_apis::HMILevel::eType app_hmi_level = + app->hmi_level(mobile_apis::PredefinedWindows::DEFAULT_WINDOW); + if ((mobile_api::HMILevel::HMI_FULL != app_hmi_level) && + (mobile_api::HMILevel::HMI_LIMITED != app_hmi_level)) { LOG4CXX_WARN(logger_, "CUSTOM_BUTTON OnButtonEvent notification is allowed only " << "in FULL or LIMITED hmi level"); @@ -127,8 +129,11 @@ void OnButtonEventNotification::Run() { } // Send ButtonEvent notification only in HMI_FULL or HMI_LIMITED mode - if ((mobile_api::HMILevel::HMI_FULL != subscribed_app->hmi_level()) && - (mobile_api::HMILevel::HMI_LIMITED != subscribed_app->hmi_level())) { + const mobile_apis::HMILevel::eType app_hmi_level = + subscribed_app->hmi_level( + mobile_apis::PredefinedWindows::DEFAULT_WINDOW); + if ((mobile_api::HMILevel::HMI_FULL != app_hmi_level) && + (mobile_api::HMILevel::HMI_LIMITED != app_hmi_level)) { LOG4CXX_WARN(logger_, "OnButtonEvent notification is allowed only" << "in FULL or LIMITED hmi level"); diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/on_button_press_notification.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/on_button_press_notification.cc index 7c77e29298..f0083586e9 100644 --- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/on_button_press_notification.cc +++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/on_button_press_notification.cc @@ -104,8 +104,10 @@ void OnButtonPressNotification::Run() { } // Send ButtonPress notification only in HMI_FULL or HMI_LIMITED mode - if ((mobile_api::HMILevel::HMI_FULL != app->hmi_level()) && - (mobile_api::HMILevel::HMI_LIMITED != app->hmi_level())) { + const mobile_apis::HMILevel::eType app_hmi_level = + app->hmi_level(mobile_apis::PredefinedWindows::DEFAULT_WINDOW); + if ((mobile_api::HMILevel::HMI_FULL != app_hmi_level) && + (mobile_api::HMILevel::HMI_LIMITED != app_hmi_level)) { LOG4CXX_WARN(logger_, "CUSTOM_BUTTON OnButtonPress notification is allowed only " << "in FULL or LIMITED hmi level"); @@ -129,8 +131,11 @@ void OnButtonPressNotification::Run() { } // Send ButtonPress notification only in HMI_FULL or HMI_LIMITED mode - if ((mobile_api::HMILevel::HMI_FULL != subscribed_app->hmi_level()) && - (mobile_api::HMILevel::HMI_LIMITED != subscribed_app->hmi_level())) { + const mobile_apis::HMILevel::eType app_hmi_level = + subscribed_app->hmi_level( + mobile_apis::PredefinedWindows::DEFAULT_WINDOW); + if ((mobile_api::HMILevel::HMI_FULL != app_hmi_level) && + (mobile_api::HMILevel::HMI_LIMITED != app_hmi_level)) { LOG4CXX_WARN(logger_, "OnButtonPress notification is allowed only" << "in FULL or LIMITED hmi level"); diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/on_keyboard_input_notification.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/on_keyboard_input_notification.cc index 8ec8a86554..1c0609e17d 100644 --- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/on_keyboard_input_notification.cc +++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/on_keyboard_input_notification.cc @@ -76,7 +76,8 @@ void OnKeyBoardInputNotification::Run() { break; } - if (mobile_apis::HMILevel::eType::HMI_FULL == app->hmi_level()) { + if (mobile_apis::HMILevel::eType::HMI_FULL == + app->hmi_level(mobile_apis::PredefinedWindows::DEFAULT_WINDOW)) { LOG4CXX_INFO(logger_, "There is application in HMI_FULL level"); app_to_notify = app; } diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/on_tbt_client_state_notification.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/on_tbt_client_state_notification.cc index ccbdab15c9..0a8420b6a3 100644 --- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/on_tbt_client_state_notification.cc +++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/on_tbt_client_state_notification.cc @@ -67,7 +67,8 @@ void OnTBTClientStateNotification::Run() { std::vector<ApplicationSharedPtr>::const_iterator it = applications.begin(); for (; applications.end() != it; ++it) { ApplicationSharedPtr app = *it; - if (mobile_apis::HMILevel::eType::HMI_NONE != app->hmi_level()) { + if (mobile_apis::HMILevel::eType::HMI_NONE != + app->hmi_level(mobile_apis::PredefinedWindows::DEFAULT_WINDOW)) { (*message_)[strings::params][strings::connection_key] = app->app_id(); SendNotification(); } diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/perform_audio_pass_thru_request.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/perform_audio_pass_thru_request.cc index 8f8e4dbf6f..0481542565 100644 --- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/perform_audio_pass_thru_request.cc +++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/perform_audio_pass_thru_request.cc @@ -87,7 +87,8 @@ void PerformAudioPassThruRequest::Run() { return; } - if (mobile_api::HMILevel::HMI_NONE == app->hmi_level()) { + if (mobile_api::HMILevel::HMI_NONE == + app->hmi_level(mobile_apis::PredefinedWindows::DEFAULT_WINDOW)) { LOG4CXX_ERROR(logger_, "application isn't activated"); SendResponse(false, mobile_apis::Result::REJECTED); return; diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/put_file_request.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/put_file_request.cc index f68596ce27..e25215fb48 100644 --- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/put_file_request.cc +++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/put_file_request.cc @@ -94,7 +94,9 @@ void PutFileRequest::Run() { return; } - if (mobile_api::HMILevel::HMI_NONE == application->hmi_level() && + if (mobile_api::HMILevel::HMI_NONE == + application->hmi_level( + mobile_apis::PredefinedWindows::DEFAULT_WINDOW) && application_manager_.get_settings().put_file_in_none() <= application->put_file_in_none_count()) { // If application is in the HMI_NONE level the quantity of allowed diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/show_app_menu_request.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/show_app_menu_request.cc index 2a8dc6cb70..36278168dc 100644 --- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/show_app_menu_request.cc +++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/show_app_menu_request.cc @@ -68,11 +68,12 @@ void ShowAppMenuRequest::Run() { return; } - if (mobile_apis::HMILevel::HMI_FULL != app->hmi_level() || + if (mobile_apis::HMILevel::HMI_FULL != + app->hmi_level(mobile_apis::PredefinedWindows::DEFAULT_WINDOW) || helpers::Compare<mobile_apis::SystemContext::eType, helpers::NEQ, helpers::ALL>( - app->system_context(), + app->system_context(mobile_apis::PredefinedWindows::DEFAULT_WINDOW), mobile_apis::SystemContext::SYSCTXT_MAIN, mobile_apis::SystemContext::SYSCTXT_MENU)) { LOG4CXX_ERROR( |