diff options
Diffstat (limited to 'src/components/application_manager/src/commands/notification_from_hmi.cc')
-rw-r--r-- | src/components/application_manager/src/commands/notification_from_hmi.cc | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/src/components/application_manager/src/commands/notification_from_hmi.cc b/src/components/application_manager/src/commands/notification_from_hmi.cc index 75e49b180e..b6bb8d4e3c 100644 --- a/src/components/application_manager/src/commands/notification_from_hmi.cc +++ b/src/components/application_manager/src/commands/notification_from_hmi.cc @@ -73,6 +73,20 @@ void NotificationFromHMI::SendNotificationToMobile( rpc_service_.ManageMobileCommand(message, SOURCE_SDL); } +void NotificationFromHMI::SendNotificationToMobile( + const MessageSharedPtr& message, + const mobile_apis::FunctionID::eType& mobile_function_id) { + (*message)[strings::params][strings::message_type] = + static_cast<int32_t>(application_manager::MessageType::kNotification); + (*message)[strings::params][strings::function_id] = mobile_function_id; + rpc_service_.ManageMobileCommand(message, SOURCE_SDL); +} + +void NotificationFromHMI::SendNotificationToHMI(MessageSharedPtr& message) { + (*message)[strings::params][strings::protocol_type] = hmi_protocol_type_; + rpc_service_.SendMessageToHMI(message); +} + void NotificationFromHMI::CreateHMIRequest( const hmi_apis::FunctionID::eType& function_id, const smart_objects::SmartObject& msg_params) const { @@ -106,6 +120,12 @@ void NotificationFromHMI::CreateHMIRequest( } } +void NotificationFromHMI::SendNotificationToConsumers( + const mobile_apis::FunctionID::eType& mobile_function_id) { + SendNotificationToHMI(message_); + SendNotificationToMobile(message_, mobile_function_id); +} + } // namespace commands } // namespace application_manager |