From 6b43ffcdc661eb97a973c3a028af10076dd5e927 Mon Sep 17 00:00:00 2001 From: Ira Lytvynenko Date: Fri, 16 Mar 2018 11:18:26 +0200 Subject: Initial implementation --- src/components/application_manager/src/hmi_state.cc | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'src/components/application_manager/src/hmi_state.cc') diff --git a/src/components/application_manager/src/hmi_state.cc b/src/components/application_manager/src/hmi_state.cc index bc1ccd8f42..17cbdb429d 100644 --- a/src/components/application_manager/src/hmi_state.cc +++ b/src/components/application_manager/src/hmi_state.cc @@ -45,6 +45,7 @@ HmiState::HmiState(utils::SharedPtr app, , app_mngr_(app_mngr) , hmi_level_(mobile_apis::HMILevel::INVALID_ENUM) , audio_streaming_state_(mobile_apis::AudioStreamingState::INVALID_ENUM) + , video_streaming_state_(mobile_apis::VideoStreamingState::INVALID_ENUM) , system_context_(mobile_apis::SystemContext::INVALID_ENUM) {} HmiState::HmiState(utils::SharedPtr app, @@ -54,6 +55,7 @@ HmiState::HmiState(utils::SharedPtr app, , app_mngr_(app_mngr) , hmi_level_(mobile_apis::HMILevel::INVALID_ENUM) , audio_streaming_state_(mobile_apis::AudioStreamingState::INVALID_ENUM) + , video_streaming_state_(mobile_apis::VideoStreamingState::INVALID_ENUM) , system_context_(mobile_apis::SystemContext::INVALID_ENUM) {} DEPRECATED HmiState::HmiState(uint32_t app_id, @@ -159,6 +161,18 @@ NaviStreamingHmiState::audio_streaming_state() const { return expected_state; } +mobile_apis::VideoStreamingState::eType +NaviStreamingHmiState::video_streaming_state() const { + using namespace helpers; + using namespace mobile_apis; + + VideoStreamingState::eType expected_state = parent()->video_streaming_state(); + if (!is_navi_app() && VideoStreamingState::STREAMABLE == expected_state) { + expected_state = VideoStreamingState::NOT_STREAMABLE; + } + return expected_state; +} + PhoneCallHmiState::PhoneCallHmiState(utils::SharedPtr app, const ApplicationManager& app_mngr) : HmiState(app, app_mngr, STATE_ID_PHONE_CALL) {} -- cgit v1.2.1