summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordtrunov <dtrunov@luxoft.com>2016-10-04 17:44:06 +0300
committerdtrunov <dtrunov@luxoft.com>2016-10-04 17:44:06 +0300
commit333644a3993bede76609a306757d689164bd24b2 (patch)
tree5987892cca290ffe4b1e7a0556d4b140db9c99f7
parenta2cb12e9de3eb64e590f650d2c45aee82cdfe349 (diff)
downloadsdl_core-333644a3993bede76609a306757d689164bd24b2.tar.gz
Fix comments after review
Add constructor to structure, and reorder parameter in method Related issue [APPLINK-25088](https://adc.luxoft.com/jira/browse/APPLINK-25088)
-rw-r--r--src/components/application_manager/include/application_manager/commands/command_request_impl.h25
-rw-r--r--src/components/application_manager/include/application_manager/commands/hmi/tts_is_ready_request.h8
-rw-r--r--src/components/application_manager/include/application_manager/commands/hmi/ui_is_ready_request.h8
-rw-r--r--src/components/application_manager/include/application_manager/commands/hmi/vi_is_ready_request.h8
-rw-r--r--src/components/application_manager/src/commands/command_request_impl.cc89
-rw-r--r--src/components/application_manager/src/commands/hmi/request_to_hmi.cc6
-rw-r--r--src/components/application_manager/src/commands/mobile/add_command_request.cc4
-rw-r--r--src/components/application_manager/src/commands/mobile/add_sub_menu_request.cc2
-rw-r--r--src/components/application_manager/src/commands/mobile/alert_request.cc23
-rw-r--r--src/components/application_manager/src/commands/mobile/change_registration_request.cc12
-rw-r--r--src/components/application_manager/src/commands/mobile/delete_command_request.cc18
-rw-r--r--src/components/application_manager/src/commands/mobile/delete_sub_menu_request.cc2
-rw-r--r--src/components/application_manager/src/commands/mobile/end_audio_pass_thru_request.cc2
-rw-r--r--src/components/application_manager/src/commands/mobile/perform_audio_pass_thru_request.cc24
-rw-r--r--src/components/application_manager/src/commands/mobile/perform_interaction_request.cc21
-rw-r--r--src/components/application_manager/src/commands/mobile/scrollable_message_request.cc2
-rw-r--r--src/components/application_manager/src/commands/mobile/set_app_icon_request.cc2
-rw-r--r--src/components/application_manager/src/commands/mobile/set_display_layout_request.cc2
-rw-r--r--src/components/application_manager/src/commands/mobile/set_global_properties_request.cc27
-rw-r--r--src/components/application_manager/src/commands/mobile/set_media_clock_timer_request.cc2
-rw-r--r--src/components/application_manager/src/commands/mobile/show_request.cc4
-rw-r--r--src/components/application_manager/src/commands/mobile/slider_request.cc2
22 files changed, 137 insertions, 156 deletions
diff --git a/src/components/application_manager/include/application_manager/commands/command_request_impl.h b/src/components/application_manager/include/application_manager/commands/command_request_impl.h
index 524b6dbc8c..30859765ba 100644
--- a/src/components/application_manager/include/application_manager/commands/command_request_impl.h
+++ b/src/components/application_manager/include/application_manager/commands/command_request_impl.h
@@ -48,6 +48,21 @@ namespace application_manager {
namespace commands {
struct ResponseInfo {
+ ResponseInfo()
+ : result_code(hmi_apis::Common_Result::INVALID_ENUM)
+ , interface(HmiInterfaces::HMI_INTERFACE_INVALID_ENUM)
+ , interface_state(HmiInterfaces::STATE_NOT_RESPONSE)
+ , is_ok(false)
+ , is_unsupported_resource(false)
+ , is_invalid_enum(false) {}
+ ResponseInfo(hmi_apis::Common_Result::eType result,
+ HmiInterfaces::InterfaceID interface)
+ : result_code(result)
+ , interface(interface)
+ , interface_state(HmiInterfaces::STATE_NOT_RESPONSE)
+ , is_ok(false)
+ , is_unsupported_resource(false)
+ , is_invalid_enum(false) {}
hmi_apis::Common_Result::eType result_code;
HmiInterfaces::InterfaceID interface;
HmiInterfaces::InterfaceState interface_state;
@@ -206,21 +221,21 @@ class CommandRequestImpl : public CommandImpl,
* @return true if result code complies successful result code
* otherwise returns false
*/
- bool PrepareResultForMobileResponse(ResponseInfo& first,
- ResponseInfo& second) const;
+ bool PrepareResultForMobileResponse(ResponseInfo& out_first,
+ ResponseInfo& out_second) const;
/**
* @brief If message from HMI contains returns this info
* or process result code from HMI and checks state of interface
* and create info.
* @param interface contains interface for which HMI sent response
* @param result_code contains result code from HMI
- * @param info contain info for sending to application
* @param response_from_hmi contains response from HMI
+ * @param out_info contain info for sending to application
*/
void GetInfo(HmiInterfaces::InterfaceID interface,
hmi_apis::Common_Result::eType result_code,
- std::string& info,
- const smart_objects::SmartObject& response_from_hmi);
+ const smart_objects::SmartObject& response_from_hmi,
+ std::string& out_info);
/**
* @brief Prepare result code for sending to mobile application
diff --git a/src/components/application_manager/include/application_manager/commands/hmi/tts_is_ready_request.h b/src/components/application_manager/include/application_manager/commands/hmi/tts_is_ready_request.h
index df4c772ffa..b0acec73b2 100644
--- a/src/components/application_manager/include/application_manager/commands/hmi/tts_is_ready_request.h
+++ b/src/components/application_manager/include/application_manager/commands/hmi/tts_is_ready_request.h
@@ -56,22 +56,22 @@ class TTSIsReadyRequest : public RequestToHMI,
/**
* @brief TTSIsReadyRequest class destructor
**/
- virtual ~TTSIsReadyRequest();
+ ~TTSIsReadyRequest() OVERRIDE;
/**
* @brief Execute command
**/
- virtual void Run();
+ void Run() OVERRIDE;
/**
* @brief On event callback
**/
- virtual void on_event(const event_engine::Event& event);
+ void on_event(const event_engine::Event& event) OVERRIDE;
/**
* @brief onTimeOut from requrst Controller
*/
- virtual void onTimeOut();
+ void onTimeOut() OVERRIDE;
/**
* @brief Send request to HMI for fetching of cappabilities
diff --git a/src/components/application_manager/include/application_manager/commands/hmi/ui_is_ready_request.h b/src/components/application_manager/include/application_manager/commands/hmi/ui_is_ready_request.h
index 7ab9454c7a..33da7a67b7 100644
--- a/src/components/application_manager/include/application_manager/commands/hmi/ui_is_ready_request.h
+++ b/src/components/application_manager/include/application_manager/commands/hmi/ui_is_ready_request.h
@@ -56,22 +56,22 @@ class UIIsReadyRequest : public RequestToHMI,
/**
* @brief UIIsReadyRequest class destructor
**/
- virtual ~UIIsReadyRequest();
+ ~UIIsReadyRequest() OVERRIDE;
/**
* @brief Execute command
**/
- virtual void Run();
+ void Run() OVERRIDE;
/**
* @brief On event callback
**/
- virtual void on_event(const event_engine::Event& event);
+ void on_event(const event_engine::Event& event) OVERRIDE;
/**
* @brief onTimeOut from requrst Controller
*/
- virtual void onTimeOut();
+ virtual void onTimeOut() OVERRIDE;
/**
* @brief Send request to HMI for fetching of cappabilities
diff --git a/src/components/application_manager/include/application_manager/commands/hmi/vi_is_ready_request.h b/src/components/application_manager/include/application_manager/commands/hmi/vi_is_ready_request.h
index 8c312f70d9..a81a8c8b7c 100644
--- a/src/components/application_manager/include/application_manager/commands/hmi/vi_is_ready_request.h
+++ b/src/components/application_manager/include/application_manager/commands/hmi/vi_is_ready_request.h
@@ -56,22 +56,22 @@ class VIIsReadyRequest : public RequestToHMI,
/**
* @brief VIIsReadyRequest class destructor
**/
- virtual ~VIIsReadyRequest();
+ ~VIIsReadyRequest() OVERRIDE;
/**
* @brief Execute command
**/
- virtual void Run();
+ void Run() OVERRIDE;
/**
* @brief On event callback
**/
- virtual void on_event(const event_engine::Event& event);
+ void on_event(const event_engine::Event& event) OVERRIDE;
/**
* @brief onTimeOut from requrst Controller
*/
- virtual void onTimeOut();
+ void onTimeOut() OVERRIDE;
/**
* @brief Send request to HMI for fetching of cappabilities
diff --git a/src/components/application_manager/src/commands/command_request_impl.cc b/src/components/application_manager/src/commands/command_request_impl.cc
index 37ddcddc89..609180197c 100644
--- a/src/components/application_manager/src/commands/command_request_impl.cc
+++ b/src/components/application_manager/src/commands/command_request_impl.cc
@@ -69,6 +69,13 @@ const std::string CreateInfoForUnsupportedResult(
return "Navi is not supported by system";
}
default:
+#ifdef ENABLE_LOG
+ CREATE_LOGGERPTR_LOCAL(logger, "Commands");
+ LOG4CXX_WARN(logger,
+ "Could not create info because"
+ " interface isn't valid. Interface is:"
+ << static_cast<int32_t>(interface));
+#endif // ENABLE_LOG
return "";
}
}
@@ -645,80 +652,86 @@ bool CommandRequestImpl::PrepareResultForMobileResponse(
hmi_apis::Common_Result::eType result_code,
HmiInterfaces::InterfaceID interface) const {
using namespace helpers;
- bool result = Compare<hmi_apis::Common_Result::eType, EQ, ONE>(
- result_code,
- hmi_apis::Common_Result::SUCCESS,
- hmi_apis::Common_Result::WARNINGS,
- hmi_apis::Common_Result::WRONG_LANGUAGE,
- hmi_apis::Common_Result::RETRY,
- hmi_apis::Common_Result::SAVED);
+
+ if (Compare<hmi_apis::Common_Result::eType, EQ, ONE>(
+ result_code,
+ hmi_apis::Common_Result::SUCCESS,
+ hmi_apis::Common_Result::WARNINGS,
+ hmi_apis::Common_Result::WRONG_LANGUAGE,
+ hmi_apis::Common_Result::RETRY,
+ hmi_apis::Common_Result::SAVED)) {
+ return true;
+ }
+
const HmiInterfaces::InterfaceState state =
application_manager_.hmi_interfaces().GetInterfaceState(interface);
-
- result =
- result || (hmi_apis::Common_Result::UNSUPPORTED_RESOURCE == result_code &&
- HmiInterfaces::STATE_NOT_AVAILABLE != state);
- return result;
+ if ((hmi_apis::Common_Result::UNSUPPORTED_RESOURCE == result_code) &&
+ (HmiInterfaces::STATE_NOT_AVAILABLE != state)) {
+ return true;
+ }
+ return false;
}
bool CommandRequestImpl::PrepareResultForMobileResponse(
- ResponseInfo& first, ResponseInfo& second) const {
+ ResponseInfo& out_first, ResponseInfo& out_second) const {
using namespace helpers;
- first.is_ok = Compare<hmi_apis::Common_Result::eType, EQ, ONE>(
- first.result_code,
+ out_first.is_ok = Compare<hmi_apis::Common_Result::eType, EQ, ONE>(
+ out_first.result_code,
hmi_apis::Common_Result::SUCCESS,
hmi_apis::Common_Result::WARNINGS,
hmi_apis::Common_Result::WRONG_LANGUAGE,
hmi_apis::Common_Result::RETRY,
hmi_apis::Common_Result::SAVED);
- second.is_ok = Compare<hmi_apis::Common_Result::eType, EQ, ONE>(
- second.result_code,
+ out_second.is_ok = Compare<hmi_apis::Common_Result::eType, EQ, ONE>(
+ out_second.result_code,
hmi_apis::Common_Result::SUCCESS,
hmi_apis::Common_Result::WARNINGS,
hmi_apis::Common_Result::WRONG_LANGUAGE,
hmi_apis::Common_Result::RETRY,
hmi_apis::Common_Result::SAVED);
- first.is_invalid_enum =
- hmi_apis::Common_Result::INVALID_ENUM == first.result_code;
+ out_first.is_invalid_enum =
+ hmi_apis::Common_Result::INVALID_ENUM == out_first.result_code;
- second.is_invalid_enum =
- hmi_apis::Common_Result::INVALID_ENUM == second.result_code;
+ out_second.is_invalid_enum =
+ hmi_apis::Common_Result::INVALID_ENUM == out_second.result_code;
- first.is_unsupported_resource =
- hmi_apis::Common_Result::UNSUPPORTED_RESOURCE == first.result_code;
+ out_first.is_unsupported_resource =
+ hmi_apis::Common_Result::UNSUPPORTED_RESOURCE == out_first.result_code;
- second.is_unsupported_resource =
- hmi_apis::Common_Result::UNSUPPORTED_RESOURCE == second.result_code;
+ out_second.is_unsupported_resource =
+ hmi_apis::Common_Result::UNSUPPORTED_RESOURCE == out_second.result_code;
- first.interface_state =
- application_manager_.hmi_interfaces().GetInterfaceState(first.interface);
- second.interface_state =
- application_manager_.hmi_interfaces().GetInterfaceState(second.interface);
+ out_first.interface_state =
+ application_manager_.hmi_interfaces().GetInterfaceState(
+ out_first.interface);
+ out_second.interface_state =
+ application_manager_.hmi_interfaces().GetInterfaceState(
+ out_second.interface);
- bool result = (first.is_ok && second.is_ok) ||
- (second.is_invalid_enum && first.is_ok) ||
- (first.is_invalid_enum && second.is_ok);
- result = result || CheckResultCode(first, second);
- result = result || CheckResultCode(second, first);
+ bool result = (out_first.is_ok && out_second.is_ok) ||
+ (out_second.is_invalid_enum && out_first.is_ok) ||
+ (out_first.is_invalid_enum && out_second.is_ok);
+ result = result || CheckResultCode(out_first, out_second);
+ result = result || CheckResultCode(out_second, out_first);
return result;
}
void CommandRequestImpl::GetInfo(
HmiInterfaces::InterfaceID interface,
hmi_apis::Common_Result::eType result_code,
- std::string& info,
- const smart_objects::SmartObject& response_from_hmi) {
+ const smart_objects::SmartObject& response_from_hmi,
+ std::string& out_info) {
if (response_from_hmi[strings::msg_params].keyExists(strings::info)) {
- info = response_from_hmi[strings::msg_params][strings::info].asString();
+ out_info = response_from_hmi[strings::msg_params][strings::info].asString();
} else {
HmiInterfaces::InterfaceState interface_state =
application_manager_.hmi_interfaces().GetInterfaceState(interface);
if (hmi_apis::Common_Result::UNSUPPORTED_RESOURCE == result_code &&
HmiInterfaces::InterfaceState::STATE_NOT_RESPONSE == interface_state) {
- info = CreateInfoForUnsupportedResult(interface);
+ out_info = CreateInfoForUnsupportedResult(interface);
}
}
}
diff --git a/src/components/application_manager/src/commands/hmi/request_to_hmi.cc b/src/components/application_manager/src/commands/hmi/request_to_hmi.cc
index 6364cc2fc8..39d549ac72 100644
--- a/src/components/application_manager/src/commands/hmi/request_to_hmi.cc
+++ b/src/components/application_manager/src/commands/hmi/request_to_hmi.cc
@@ -46,17 +46,17 @@ bool CheckAvailabilityHMIInterfaces(ApplicationManager& application_manager,
bool ChangeInterfaceState(ApplicationManager& application_manager,
const smart_objects::SmartObject& response_from_hmi,
HmiInterfaces::InterfaceID interface) {
- bool is_available = false;
if (response_from_hmi[strings::msg_params].keyExists(strings::available)) {
- is_available =
+ const bool is_available =
response_from_hmi[strings::msg_params][strings::available].asBool();
const HmiInterfaces::InterfaceState interface_state =
is_available ? HmiInterfaces::STATE_AVAILABLE
: HmiInterfaces::STATE_NOT_AVAILABLE;
application_manager.hmi_interfaces().SetInterfaceState(interface,
interface_state);
+ return is_available;
}
- return is_available;
+ return false;
}
RequestToHMI::RequestToHMI(const MessageSharedPtr& message,
diff --git a/src/components/application_manager/src/commands/mobile/add_command_request.cc b/src/components/application_manager/src/commands/mobile/add_command_request.cc
index bc211b44a4..9d46f67aee 100644
--- a/src/components/application_manager/src/commands/mobile/add_command_request.cc
+++ b/src/components/application_manager/src/commands/mobile/add_command_request.cc
@@ -315,7 +315,7 @@ void AddCommandRequest::on_event(const event_engine::Event& event) {
is_ui_received_ = true;
ui_result_ = static_cast<hmi_apis::Common_Result::eType>(
message[strings::params][hmi_response::code].asInt());
- GetInfo(HmiInterfaces::HMI_INTERFACE_UI, ui_result_, ui_info_, message);
+ GetInfo(HmiInterfaces::HMI_INTERFACE_UI, ui_result_, message, ui_info_);
if (hmi_apis::Common_Result::SUCCESS != ui_result_) {
(*message_)[strings::msg_params].erase(strings::menu_params);
}
@@ -326,7 +326,7 @@ void AddCommandRequest::on_event(const event_engine::Event& event) {
is_vr_received_ = true;
vr_result_ = static_cast<hmi_apis::Common_Result::eType>(
message[strings::params][hmi_response::code].asInt());
- GetInfo(HmiInterfaces::HMI_INTERFACE_VR, vr_result_, vr_info_, message);
+ GetInfo(HmiInterfaces::HMI_INTERFACE_VR, vr_result_, message, vr_info_);
if (hmi_apis::Common_Result::SUCCESS != vr_result_) {
(*message_)[strings::msg_params].erase(strings::vr_commands);
}
diff --git a/src/components/application_manager/src/commands/mobile/add_sub_menu_request.cc b/src/components/application_manager/src/commands/mobile/add_sub_menu_request.cc
index ffa827beaf..3d91dbecfc 100644
--- a/src/components/application_manager/src/commands/mobile/add_sub_menu_request.cc
+++ b/src/components/application_manager/src/commands/mobile/add_sub_menu_request.cc
@@ -108,7 +108,7 @@ void AddSubMenuRequest::on_event(const event_engine::Event& event) {
message[strings::params][hmi_response::code].asInt());
std::string response_info;
GetInfo(
- HmiInterfaces::HMI_INTERFACE_UI, result_code, response_info, message);
+ HmiInterfaces::HMI_INTERFACE_UI, result_code, message, response_info);
const bool result = PrepareResultForMobileResponse(
result_code, HmiInterfaces::HMI_INTERFACE_UI);
diff --git a/src/components/application_manager/src/commands/mobile/alert_request.cc b/src/components/application_manager/src/commands/mobile/alert_request.cc
index 5fe91b915d..069b21cb66 100644
--- a/src/components/application_manager/src/commands/mobile/alert_request.cc
+++ b/src/components/application_manager/src/commands/mobile/alert_request.cc
@@ -167,8 +167,8 @@ void AlertRequest::on_event(const event_engine::Event& event) {
alert_response_params_ = message[strings::msg_params];
GetInfo(HmiInterfaces::HMI_INTERFACE_UI,
alert_result_,
- ui_response_info_,
- message);
+ message,
+ ui_response_info_);
break;
}
case hmi_apis::FunctionID::TTS_Speak: {
@@ -180,8 +180,8 @@ void AlertRequest::on_event(const event_engine::Event& event) {
message[strings::params][hmi_response::code].asInt());
GetInfo(HmiInterfaces::HMI_INTERFACE_TTS,
tts_speak_result_,
- tts_response_info_,
- message);
+ message,
+ tts_response_info_);
break;
}
case hmi_apis::FunctionID::TTS_StopSpeaking: {
@@ -211,18 +211,9 @@ void AlertRequest::on_event(const event_engine::Event& event) {
bool AlertRequest::PrepareResponseParameters(
mobile_apis::Result::eType& result_code, std::string& info) {
- ResponseInfo ui_alert_info{alert_result_,
- HmiInterfaces::HMI_INTERFACE_UI,
- HmiInterfaces::STATE_NOT_RESPONSE,
- false,
- false,
- false};
- ResponseInfo tts_alert_info{tts_speak_result_,
- HmiInterfaces::HMI_INTERFACE_TTS,
- HmiInterfaces::STATE_NOT_RESPONSE,
- false,
- false,
- false};
+ ResponseInfo ui_alert_info(alert_result_, HmiInterfaces::HMI_INTERFACE_UI);
+ ResponseInfo tts_alert_info(tts_speak_result_,
+ HmiInterfaces::HMI_INTERFACE_TTS);
bool result = PrepareResultForMobileResponse(ui_alert_info, tts_alert_info);
diff --git a/src/components/application_manager/src/commands/mobile/change_registration_request.cc b/src/components/application_manager/src/commands/mobile/change_registration_request.cc
index 6d3c435932..9477c3beae 100644
--- a/src/components/application_manager/src/commands/mobile/change_registration_request.cc
+++ b/src/components/application_manager/src/commands/mobile/change_registration_request.cc
@@ -174,8 +174,8 @@ void ChangeRegistrationRequest::on_event(const event_engine::Event& event) {
message[strings::params][hmi_response::code].asInt());
GetInfo(HmiInterfaces::HMI_INTERFACE_UI,
ui_result_,
- ui_response_info_,
- message);
+ message,
+ ui_response_info_);
break;
}
case hmi_apis::FunctionID::VR_ChangeRegistration: {
@@ -185,8 +185,8 @@ void ChangeRegistrationRequest::on_event(const event_engine::Event& event) {
message[strings::params][hmi_response::code].asInt());
GetInfo(HmiInterfaces::HMI_INTERFACE_VR,
vr_result_,
- vr_response_info_,
- message);
+ message,
+ vr_response_info_);
break;
}
case hmi_apis::FunctionID::TTS_ChangeRegistration: {
@@ -196,8 +196,8 @@ void ChangeRegistrationRequest::on_event(const event_engine::Event& event) {
message[strings::params][hmi_response::code].asInt());
GetInfo(HmiInterfaces::HMI_INTERFACE_TTS,
tts_result_,
- tts_response_info_,
- message);
+ message,
+ tts_response_info_);
break;
}
default: {
diff --git a/src/components/application_manager/src/commands/mobile/delete_command_request.cc b/src/components/application_manager/src/commands/mobile/delete_command_request.cc
index 8c67f5f9d1..f6146e080e 100644
--- a/src/components/application_manager/src/commands/mobile/delete_command_request.cc
+++ b/src/components/application_manager/src/commands/mobile/delete_command_request.cc
@@ -117,18 +117,8 @@ void DeleteCommandRequest::Run() {
bool DeleteCommandRequest::PrepareResponseParameters(
mobile_apis::Result::eType& result_code, std::string& info) {
using namespace helpers;
- ResponseInfo ui_delete_info{ui_result_,
- HmiInterfaces::HMI_INTERFACE_UI,
- HmiInterfaces::STATE_NOT_RESPONSE,
- false,
- false,
- false};
- ResponseInfo vr_delete_info{vr_result_,
- HmiInterfaces::HMI_INTERFACE_VR,
- HmiInterfaces::STATE_NOT_RESPONSE,
- false,
- false,
- false};
+ ResponseInfo ui_delete_info(ui_result_, HmiInterfaces::HMI_INTERFACE_UI);
+ ResponseInfo vr_delete_info(vr_result_, HmiInterfaces::HMI_INTERFACE_VR);
const bool result =
PrepareResultForMobileResponse(ui_delete_info, vr_delete_info);
@@ -164,7 +154,7 @@ void DeleteCommandRequest::on_event(const event_engine::Event& event) {
LOG4CXX_DEBUG(logger_,
"Received UI_DeleteCommand event with result "
<< MessageHelper::HMIResultToString(ui_result_));
- GetInfo(HmiInterfaces::HMI_INTERFACE_UI, ui_result_, ui_info_, message);
+ GetInfo(HmiInterfaces::HMI_INTERFACE_UI, ui_result_, message, ui_info_);
break;
}
case hmi_apis::FunctionID::VR_DeleteCommand: {
@@ -174,7 +164,7 @@ void DeleteCommandRequest::on_event(const event_engine::Event& event) {
LOG4CXX_DEBUG(logger_,
"Received VR_DeleteCommand event with result "
<< MessageHelper::HMIResultToString(vr_result_));
- GetInfo(HmiInterfaces::HMI_INTERFACE_VR, vr_result_, vr_info_, message);
+ GetInfo(HmiInterfaces::HMI_INTERFACE_VR, vr_result_, message, vr_info_);
break;
}
default: {
diff --git a/src/components/application_manager/src/commands/mobile/delete_sub_menu_request.cc b/src/components/application_manager/src/commands/mobile/delete_sub_menu_request.cc
index 853578d60b..eec7960df8 100644
--- a/src/components/application_manager/src/commands/mobile/delete_sub_menu_request.cc
+++ b/src/components/application_manager/src/commands/mobile/delete_sub_menu_request.cc
@@ -148,7 +148,7 @@ void DeleteSubMenuRequest::on_event(const event_engine::Event& event) {
message[strings::params][hmi_response::code].asInt());
std::string response_info;
GetInfo(
- HmiInterfaces::HMI_INTERFACE_UI, result_code, response_info, message);
+ HmiInterfaces::HMI_INTERFACE_UI, result_code, message, response_info);
const bool result = PrepareResultForMobileResponse(
result_code, HmiInterfaces::HMI_INTERFACE_UI);
diff --git a/src/components/application_manager/src/commands/mobile/end_audio_pass_thru_request.cc b/src/components/application_manager/src/commands/mobile/end_audio_pass_thru_request.cc
index 349a542c15..25a83e5aef 100644
--- a/src/components/application_manager/src/commands/mobile/end_audio_pass_thru_request.cc
+++ b/src/components/application_manager/src/commands/mobile/end_audio_pass_thru_request.cc
@@ -61,7 +61,7 @@ void EndAudioPassThruRequest::on_event(const event_engine::Event& event) {
message[strings::params][hmi_response::code].asUInt());
std::string response_info;
GetInfo(
- HmiInterfaces::HMI_INTERFACE_UI, result_code, response_info, message);
+ HmiInterfaces::HMI_INTERFACE_UI, result_code, message, response_info);
const bool result = PrepareResultForMobileResponse(
result_code, HmiInterfaces::HMI_INTERFACE_UI);
if (result) {
diff --git a/src/components/application_manager/src/commands/mobile/perform_audio_pass_thru_request.cc b/src/components/application_manager/src/commands/mobile/perform_audio_pass_thru_request.cc
index 52771ea8a0..b44d2144ee 100644
--- a/src/components/application_manager/src/commands/mobile/perform_audio_pass_thru_request.cc
+++ b/src/components/application_manager/src/commands/mobile/perform_audio_pass_thru_request.cc
@@ -123,7 +123,7 @@ void PerformAudioPassThruRequest::on_event(const event_engine::Event& event) {
result_ui_ = static_cast<hmi_apis::Common_Result::eType>(
message[strings::params][hmi_response::code].asUInt());
- GetInfo(HmiInterfaces::HMI_INTERFACE_UI, result_ui_, ui_info_, message);
+ GetInfo(HmiInterfaces::HMI_INTERFACE_UI, result_ui_, message, ui_info_);
// in case perform audio is started by other request skip stopping
if (hmi_apis::Common_Result::REJECTED == result_ui_) {
@@ -143,8 +143,8 @@ void PerformAudioPassThruRequest::on_event(const event_engine::Event& event) {
message[strings::params][hmi_response::code].asUInt());
GetInfo(HmiInterfaces::HMI_INTERFACE_TTS,
result_tts_speak_,
- tts_info_,
- message);
+ message,
+ tts_info_);
awaiting_tts_speak_response_ = false;
const bool is_tts_speak_success_unsuported =
Compare<hmi_apis::Common_Result::eType, EQ, ONE>(
@@ -196,20 +196,10 @@ bool PerformAudioPassThruRequest::PrepareResponseParameters(
mobile_apis::Result::eType& result_code, std::string& info) {
LOG4CXX_AUTO_TRACE(logger_);
- ResponseInfo ui_perform_info{result_ui_,
- HmiInterfaces::HMI_INTERFACE_UI,
- HmiInterfaces::STATE_NOT_RESPONSE,
- false,
- false,
- false};
- ResponseInfo tts_perform_info{result_tts_speak_,
- HmiInterfaces::HMI_INTERFACE_TTS,
- HmiInterfaces::STATE_NOT_RESPONSE,
- false,
- false,
- false};
-
- bool result =
+ ResponseInfo ui_perform_info(result_ui_, HmiInterfaces::HMI_INTERFACE_UI);
+ ResponseInfo tts_perform_info(result_tts_speak_,
+ HmiInterfaces::HMI_INTERFACE_TTS);
+ const bool result =
PrepareResultForMobileResponse(ui_perform_info, tts_perform_info);
if (ui_perform_info.is_ok && tts_perform_info.is_unsupported_resource &&
diff --git a/src/components/application_manager/src/commands/mobile/perform_interaction_request.cc b/src/components/application_manager/src/commands/mobile/perform_interaction_request.cc
index 38faf84b62..37987e5f5b 100644
--- a/src/components/application_manager/src/commands/mobile/perform_interaction_request.cc
+++ b/src/components/application_manager/src/commands/mobile/perform_interaction_request.cc
@@ -231,7 +231,7 @@ void PerformInteractionRequest::on_event(const event_engine::Event& event) {
ui_result_code_ = static_cast<hmi_apis::Common_Result::eType>(
message[strings::params][hmi_response::code].asUInt());
GetInfo(
- HmiInterfaces::HMI_INTERFACE_UI, ui_result_code_, ui_info_, message);
+ HmiInterfaces::HMI_INTERFACE_UI, ui_result_code_, message, ui_info_);
if (ProcessUIResponse(event.smart_object(), msg_param)) {
return;
}
@@ -244,7 +244,7 @@ void PerformInteractionRequest::on_event(const event_engine::Event& event) {
vr_result_code_ = static_cast<hmi_apis::Common_Result::eType>(
message[strings::params][hmi_response::code].asUInt());
GetInfo(
- HmiInterfaces::HMI_INTERFACE_VR, vr_result_code_, vr_info_, message);
+ HmiInterfaces::HMI_INTERFACE_VR, vr_result_code_, message, vr_info_);
if (ProcessVRResponse(event.smart_object(), msg_param)) {
return;
}
@@ -937,19 +937,10 @@ void PerformInteractionRequest::SendBothModeResponse(
LOG4CXX_AUTO_TRACE(logger_);
mobile_apis::Result::eType perform_interaction_result_code =
mobile_apis::Result::INVALID_ENUM;
- ResponseInfo ui_perform_info{ui_result_code_,
- HmiInterfaces::HMI_INTERFACE_UI,
- HmiInterfaces::STATE_NOT_RESPONSE,
- false,
- false,
- false};
- ResponseInfo vr_perform_info{vr_result_code_,
- HmiInterfaces::HMI_INTERFACE_VR,
- HmiInterfaces::STATE_NOT_RESPONSE,
- false,
- false,
- false};
-
+ ResponseInfo ui_perform_info(ui_result_code_,
+ HmiInterfaces::HMI_INTERFACE_UI);
+ ResponseInfo vr_perform_info(vr_result_code_,
+ HmiInterfaces::HMI_INTERFACE_VR);
const bool result =
PrepareResultForMobileResponse(ui_perform_info, vr_perform_info);
perform_interaction_result_code =
diff --git a/src/components/application_manager/src/commands/mobile/scrollable_message_request.cc b/src/components/application_manager/src/commands/mobile/scrollable_message_request.cc
index f0cc3aa3dd..a897aba811 100644
--- a/src/components/application_manager/src/commands/mobile/scrollable_message_request.cc
+++ b/src/components/application_manager/src/commands/mobile/scrollable_message_request.cc
@@ -132,7 +132,7 @@ void ScrollableMessageRequest::on_event(const event_engine::Event& event) {
message[strings::params][hmi_response::code].asInt());
std::string response_info;
GetInfo(
- HmiInterfaces::HMI_INTERFACE_UI, result_code, response_info, message);
+ HmiInterfaces::HMI_INTERFACE_UI, result_code, message, response_info);
const bool result = PrepareResultForMobileResponse(
result_code, HmiInterfaces::HMI_INTERFACE_UI);
diff --git a/src/components/application_manager/src/commands/mobile/set_app_icon_request.cc b/src/components/application_manager/src/commands/mobile/set_app_icon_request.cc
index e2dc10be26..e7130d8e17 100644
--- a/src/components/application_manager/src/commands/mobile/set_app_icon_request.cc
+++ b/src/components/application_manager/src/commands/mobile/set_app_icon_request.cc
@@ -241,7 +241,7 @@ void SetAppIconRequest::on_event(const event_engine::Event& event) {
result_code, HmiInterfaces::HMI_INTERFACE_UI);
std::string response_info;
GetInfo(
- HmiInterfaces::HMI_INTERFACE_UI, result_code, response_info, message);
+ HmiInterfaces::HMI_INTERFACE_UI, result_code, message, response_info);
if (result) {
ApplicationSharedPtr app =
application_manager_.application(connection_key());
diff --git a/src/components/application_manager/src/commands/mobile/set_display_layout_request.cc b/src/components/application_manager/src/commands/mobile/set_display_layout_request.cc
index 8036692eea..b4122b9210 100644
--- a/src/components/application_manager/src/commands/mobile/set_display_layout_request.cc
+++ b/src/components/application_manager/src/commands/mobile/set_display_layout_request.cc
@@ -76,7 +76,7 @@ void SetDisplayLayoutRequest::on_event(const event_engine::Event& event) {
const bool response_success = PrepareResultForMobileResponse(
result_code, HmiInterfaces::HMI_INTERFACE_UI);
std::string info;
- GetInfo(HmiInterfaces::HMI_INTERFACE_UI, result_code, info, message);
+ GetInfo(HmiInterfaces::HMI_INTERFACE_UI, result_code, message, info);
smart_objects::SmartObject msg_params = message[strings::msg_params];
if (response_success) {
HMICapabilities& hmi_capabilities =
diff --git a/src/components/application_manager/src/commands/mobile/set_global_properties_request.cc b/src/components/application_manager/src/commands/mobile/set_global_properties_request.cc
index dc9de7e69d..1dd56faea5 100644
--- a/src/components/application_manager/src/commands/mobile/set_global_properties_request.cc
+++ b/src/components/application_manager/src/commands/mobile/set_global_properties_request.cc
@@ -234,8 +234,8 @@ void SetGlobalPropertiesRequest::on_event(const event_engine::Event& event) {
message[strings::params][hmi_response::code].asInt());
GetInfo(HmiInterfaces::HMI_INTERFACE_UI,
ui_result_,
- ui_response_info_,
- message);
+ message,
+ ui_response_info_);
break;
}
case hmi_apis::FunctionID::TTS_SetGlobalProperties: {
@@ -245,8 +245,8 @@ void SetGlobalPropertiesRequest::on_event(const event_engine::Event& event) {
message[strings::params][hmi_response::code].asInt());
GetInfo(HmiInterfaces::HMI_INTERFACE_TTS,
tts_result_,
- tts_response_info_,
- message);
+ message,
+ tts_response_info_);
break;
}
default: {
@@ -287,20 +287,11 @@ bool SetGlobalPropertiesRequest::PrepareResponseParameters(
LOG4CXX_AUTO_TRACE(logger_);
using namespace helpers;
- ResponseInfo ui_properties_info{ui_result_,
- HmiInterfaces::HMI_INTERFACE_UI,
- HmiInterfaces::STATE_NOT_RESPONSE,
- false,
- false,
- false};
- ResponseInfo tts_properties_info{tts_result_,
- HmiInterfaces::HMI_INTERFACE_TTS,
- HmiInterfaces::STATE_NOT_RESPONSE,
- false,
- false,
- false};
-
- bool result =
+ ResponseInfo ui_properties_info(ui_result_, HmiInterfaces::HMI_INTERFACE_UI);
+
+ ResponseInfo tts_properties_info(tts_result_,
+ HmiInterfaces::HMI_INTERFACE_TTS);
+ const bool result =
PrepareResultForMobileResponse(ui_properties_info, tts_properties_info);
if (result &&
(HmiInterfaces::STATE_AVAILABLE == tts_properties_info.interface_state) &&
diff --git a/src/components/application_manager/src/commands/mobile/set_media_clock_timer_request.cc b/src/components/application_manager/src/commands/mobile/set_media_clock_timer_request.cc
index 085e55c3af..1ec6a26ae5 100644
--- a/src/components/application_manager/src/commands/mobile/set_media_clock_timer_request.cc
+++ b/src/components/application_manager/src/commands/mobile/set_media_clock_timer_request.cc
@@ -92,7 +92,7 @@ void SetMediaClockRequest::on_event(const event_engine::Event& event) {
result_code, HmiInterfaces::HMI_INTERFACE_UI);
std::string response_info;
GetInfo(
- HmiInterfaces::HMI_INTERFACE_UI, result_code, response_info, message);
+ HmiInterfaces::HMI_INTERFACE_UI, result_code, message, response_info);
SendResponse(result,
MessageHelper::HMIToMobileResult(result_code),
diff --git a/src/components/application_manager/src/commands/mobile/show_request.cc b/src/components/application_manager/src/commands/mobile/show_request.cc
index efb3d1fb67..d518c8fdc3 100644
--- a/src/components/application_manager/src/commands/mobile/show_request.cc
+++ b/src/components/application_manager/src/commands/mobile/show_request.cc
@@ -235,8 +235,8 @@ void ShowRequest::on_event(const event_engine::Event& event) {
result_code, HmiInterfaces::HMI_INTERFACE_UI);
GetInfo(HmiInterfaces::InterfaceID::HMI_INTERFACE_UI,
result_code,
- response_info,
- message);
+ message,
+ response_info);
if (hmi_apis::Common_Result::WARNINGS == result_code &&
message[strings::params].keyExists(hmi_response::message)) {
response_info =
diff --git a/src/components/application_manager/src/commands/mobile/slider_request.cc b/src/components/application_manager/src/commands/mobile/slider_request.cc
index 892f6c3f5d..8170c3ce52 100644
--- a/src/components/application_manager/src/commands/mobile/slider_request.cc
+++ b/src/components/application_manager/src/commands/mobile/slider_request.cc
@@ -156,7 +156,7 @@ void SliderRequest::on_event(const event_engine::Event& event) {
}
std::string response_info;
GetInfo(
- HmiInterfaces::HMI_INTERFACE_UI, response_code, response_info, message);
+ HmiInterfaces::HMI_INTERFACE_UI, response_code, message, response_info);
const bool is_response_success = PrepareResultForMobileResponse(
response_code, HmiInterfaces::HMI_INTERFACE_UI);