summaryrefslogtreecommitdiff
path: root/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/mobile/perform_interaction_request.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/mobile/perform_interaction_request.h')
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/mobile/perform_interaction_request.h50
1 files changed, 49 insertions, 1 deletions
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/mobile/perform_interaction_request.h b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/mobile/perform_interaction_request.h
index 0572679c85..52a0ad4dc1 100644
--- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/mobile/perform_interaction_request.h
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/mobile/perform_interaction_request.h
@@ -93,6 +93,33 @@ class PerformInteractionRequest
*/
virtual void onTimeOut();
+ protected:
+ /**
+ * @brief Prepare result code for sending to mobile application
+ * @param ui_response contains result_code from HMI response and
+ * interface that returns response
+ * @param vr_response contains result_code from HMI response and
+ * interface that returns response.
+ * @return resulting code for sending to mobile application.
+ */
+ mobile_apis::Result::eType PrepareResultCodeForResponse(
+ const app_mngr::commands::ResponseInfo& ui_response,
+ const app_mngr::commands::ResponseInfo& vr_response);
+
+ /**
+ * @brief Checks result code from HMI for splitted RPC
+ * and returns parameter for sending to mobile app.
+ * @param ui_response contains result_code from HMI response and
+ * interface that returns response
+ * @param vr_response contains result_code from HMI response and
+ * interface that returns response
+ * @return true if result code complies successful result code
+ * otherwise returns false
+ */
+ bool PrepareResultForMobileResponse(
+ app_mngr::commands::ResponseInfo& out_first,
+ app_mngr::commands::ResponseInfo& out_second) const;
+
private:
/**
* @brief Function will be called when VR_OnCommand event
@@ -194,7 +221,7 @@ class PerformInteractionRequest
* otherwise returns FALSE.
*/
bool CheckChoiceIDFromResponse(app_mngr::ApplicationSharedPtr app,
- int32_t choice_id);
+ const int32_t choice_id);
/**
* @brief Checks for a match of choice ID, in
@@ -232,7 +259,27 @@ class PerformInteractionRequest
*/
void SendBothModeResponse(const smart_objects::SmartObject& msg_param);
+ /**
+ * @brief Sends UiClosePopUp request to HMI
+ */
+ void SendClosePopupRequestToHMI();
+
+ /**
+ * @brief Sets the choice according to the current interaction mode and first
+ * received choice id (UI or VR).
+ *
+ * @param msg_param Message parameters which will be included in the response
+ * to mobile device.
+ * @return Returns false, if choice_id received from UI and VR are valid and
+ * not equal. Otherwise returns true.
+ */
+ bool SetChoiceIdToResponseMsgParams(
+ smart_objects::SmartObject& msg_param) const;
+
mobile_apis::InteractionMode::eType interaction_mode_;
+ std::int32_t ui_choice_id_received_;
+ std::int32_t vr_choice_id_received_;
+
bool ui_response_received_;
bool vr_response_received_;
bool app_pi_was_active_before_;
@@ -241,6 +288,7 @@ class PerformInteractionRequest
hmi_apis::Common_Result::eType ui_result_code_;
std::string ui_info_;
std::string vr_info_;
+ smart_objects::SmartObject response_msg_params;
DISALLOW_COPY_AND_ASSIGN(PerformInteractionRequest);
};