diff options
Diffstat (limited to 'src/components/application_manager/src/commands/mobile/get_way_points_request.cc')
-rw-r--r-- | src/components/application_manager/src/commands/mobile/get_way_points_request.cc | 21 |
1 files changed, 15 insertions, 6 deletions
diff --git a/src/components/application_manager/src/commands/mobile/get_way_points_request.cc b/src/components/application_manager/src/commands/mobile/get_way_points_request.cc index 9baf747ee4..3a253d1d7f 100644 --- a/src/components/application_manager/src/commands/mobile/get_way_points_request.cc +++ b/src/components/application_manager/src/commands/mobile/get_way_points_request.cc @@ -1,5 +1,6 @@ #include "application_manager/application_manager.h" #include "application_manager/commands/mobile/get_way_points_request.h" +#include "application_manager/message_helper.h" namespace application_manager { @@ -35,16 +36,24 @@ void GetWayPointsRequest::Run() { void GetWayPointsRequest::on_event(const event_engine::Event& event) { LOG4CXX_AUTO_TRACE(logger_); - ApplicationSharedPtr app = application_manager_.application(connection_key()); const smart_objects::SmartObject& message = event.smart_object(); switch (event.id()) { case hmi_apis::FunctionID::Navigation_GetWayPoints: { LOG4CXX_INFO(logger_, "Received Navigation_GetWayPoints event"); - mobile_apis::Result::eType result_code = - GetMobileResultCode(static_cast<hmi_apis::Common_Result::eType>( - message[strings::params][hmi_response::code].asUInt())); - bool result = mobile_apis::Result::SUCCESS == result_code; - SendResponse(result, result_code, NULL, &(message[strings::msg_params])); + const hmi_apis::Common_Result::eType result_code = + static_cast<hmi_apis::Common_Result::eType>( + message[strings::params][hmi_response::code].asInt()); + std::string response_info; + GetInfo(HmiInterfaces::HMI_INTERFACE_Navigation, + result_code, + message, + response_info); + const bool result = PrepareResultForMobileResponse( + result_code, HmiInterfaces::HMI_INTERFACE_Navigation); + SendResponse(result, + MessageHelper::HMIToMobileResult(result_code), + response_info.empty() ? NULL : response_info.c_str(), + &(message[strings::msg_params])); break; } default: { |