diff options
author | mked-luxoft <mked@luxoft.com> | 2019-07-26 21:36:08 +0300 |
---|---|---|
committer | Andriy Byzhynar (GitHub) <AByzhynar@luxoft.com> | 2019-08-20 21:17:13 +0300 |
commit | e53e40eecc9a851d129d068887f9918b226a67fd (patch) | |
tree | 60af5e7c260fe24d93bc15c356f7e38e13887e03 /src/components/application_manager/src/message_helper/message_helper.cc | |
parent | 65c409e08f50d2c6743448897bd793d9402e4463 (diff) | |
download | sdl_core-e53e40eecc9a851d129d068887f9918b226a67fd.tar.gz |
Send one OnSystemCapabilitiesUpdated on resumption
Diffstat (limited to 'src/components/application_manager/src/message_helper/message_helper.cc')
-rw-r--r-- | src/components/application_manager/src/message_helper/message_helper.cc | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/src/components/application_manager/src/message_helper/message_helper.cc b/src/components/application_manager/src/message_helper/message_helper.cc index 105e1115a9..d3896115ee 100644 --- a/src/components/application_manager/src/message_helper/message_helper.cc +++ b/src/components/application_manager/src/message_helper/message_helper.cc @@ -357,6 +357,33 @@ smart_objects::SmartObjectSPtr MessageHelper::CreateMessageForHMI( return message; } +smart_objects::SmartObjectSPtr +MessageHelper::CreateDisplayCapabilityUpdateToMobile( + const smart_objects::SmartObject& display_capabilities, Application& app) { + LOG4CXX_AUTO_TRACE(logger_); + auto message = std::make_shared<smart_objects::SmartObject>( + smart_objects::SmartType_Map); + + (*message)[strings::params][strings::message_type] = + MessageType::kNotification; + (*message)[strings::params][strings::function_id] = + mobile_apis::FunctionID::OnSystemCapabilityUpdatedID; + (*message)[strings::params][strings::connection_key] = app.app_id(); + (*message)[strings::params][strings::protocol_type] = + commands::CommandImpl::mobile_protocol_type_; + (*message)[strings::params][strings::protocol_version] = + commands::CommandImpl::protocol_version_; + + smart_objects::SmartObject system_capability(smart_objects::SmartType_Map); + system_capability[strings::system_capability_type] = + static_cast<int32_t>(mobile_apis::SystemCapabilityType::DISPLAY); + system_capability[strings::display_capabilities] = display_capabilities; + (*message)[strings::msg_params][strings::system_capability] = + system_capability; + + return message; +} + void MessageHelper::BroadcastCapabilityUpdate( smart_objects::SmartObject& msg_params, ApplicationManager& app_mngr) { LOG4CXX_AUTO_TRACE(logger_); |