diff options
Diffstat (limited to 'src/components/application_manager/src/commands/hmi/request_from_hmi.cc')
-rw-r--r-- | src/components/application_manager/src/commands/hmi/request_from_hmi.cc | 47 |
1 files changed, 23 insertions, 24 deletions
diff --git a/src/components/application_manager/src/commands/hmi/request_from_hmi.cc b/src/components/application_manager/src/commands/hmi/request_from_hmi.cc index 03a8bcfe8b..be3cd6314c 100644 --- a/src/components/application_manager/src/commands/hmi/request_from_hmi.cc +++ b/src/components/application_manager/src/commands/hmi/request_from_hmi.cc @@ -40,14 +40,13 @@ namespace commands { RequestFromHMI::RequestFromHMI(const MessageSharedPtr& message, ApplicationManager& application_manager) - : CommandImpl(message, application_manager), - EventObserver(application_manager.event_dispatcher()) { + : CommandImpl(message, application_manager) + , EventObserver(application_manager.event_dispatcher()) { // Replace HMI app id with Mobile connection id ReplaceHMIByMobileAppId(*(message.get())); } -RequestFromHMI::~RequestFromHMI() { -} +RequestFromHMI::~RequestFromHMI() {} bool RequestFromHMI::Init() { return true; @@ -57,18 +56,17 @@ bool RequestFromHMI::CleanUp() { return true; } -void RequestFromHMI::Run() { -} +void RequestFromHMI::Run() {} -void RequestFromHMI::on_event(const event_engine::Event& event) { -} +void RequestFromHMI::on_event(const event_engine::Event& event) {} -void RequestFromHMI::SendResponse(const bool success, - const uint32_t correlation_id, - const hmi_apis::FunctionID::eType function_id, - const hmi_apis::Common_Result::eType result_code) { - smart_objects::SmartObject* message = new smart_objects::SmartObject( - smart_objects::SmartType_Map); +void RequestFromHMI::SendResponse( + const bool success, + const uint32_t correlation_id, + const hmi_apis::FunctionID::eType function_id, + const hmi_apis::Common_Result::eType result_code) { + smart_objects::SmartObject* message = + new smart_objects::SmartObject(smart_objects::SmartType_Map); FillCommonParametersOfSO(message, correlation_id, function_id); (*message)[strings::params][strings::message_type] = MessageType::kResponse; (*message)[strings::params][hmi_response::code] = 0; @@ -78,30 +76,31 @@ void RequestFromHMI::SendResponse(const bool success, application_manager_.ManageHMICommand(message); } -//void RequestFromHMI::SendErrorResponse(uint32_t correlation_id, -// hmi_apis::FunctionID::eType function_id, -// hmi_apis::Common_Result::eType result_code) { +// void RequestFromHMI::SendErrorResponse(uint32_t correlation_id, +// hmi_apis::FunctionID::eType +// function_id, +// hmi_apis::Common_Result::eType +// result_code) { // smart_objects::SmartObject* message = new smart_objects::SmartObject( // smart_objects::SmartType_Map); // FillCommonParametersOfSO(message, correlation_id, function_id); -// (*message)[strings::params][strings::message_type] = MessageType::kErrorResponse; +// (*message)[strings::params][strings::message_type] = +// MessageType::kErrorResponse; // (*message)[strings::params][hmi_response::code] = result_code; // (*message)[strings::params][strings::error_msg] = "HMIDeactivate is active"; // application_manager_.ManageHMICommand(message); //} -void RequestFromHMI::FillCommonParametersOfSO(smart_objects::SmartObject* message, - uint32_t correlation_id, - hmi_apis::FunctionID::eType function_id) { - +void RequestFromHMI::FillCommonParametersOfSO( + smart_objects::SmartObject* message, + uint32_t correlation_id, + hmi_apis::FunctionID::eType function_id) { (*message)[strings::params][strings::function_id] = function_id; (*message)[strings::params][strings::protocol_type] = hmi_protocol_type_; (*message)[strings::params][strings::protocol_version] = protocol_version_; (*message)[strings::params][strings::correlation_id] = correlation_id; } - } // namespace commands } // namespace application_manager - |