diff options
author | JackLivio <jack@livio.io> | 2020-02-17 13:05:54 -0500 |
---|---|---|
committer | JackLivio <jack@livio.io> | 2020-02-17 13:05:54 -0500 |
commit | 86dea8793023f986c7c10d7f9e5b7a932d89a49a (patch) | |
tree | bf44b0d5b6bf6b6c78dd2d0602b67f05ebe2a17c /src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include | |
parent | 4310b2dfd5e1078df0df53138a73d49d000c9c62 (diff) | |
parent | ece258838a44a5461d718c5eeae380ad11a3769b (diff) | |
download | sdl_core-fix/3rd_party_build_issues.tar.gz |
Merge remote-tracking branch 'origin/develop' into fix/3rd_party_build_issuesfix/3rd_party_build_issues
Diffstat (limited to 'src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include')
2 files changed, 56 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); }; diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/sdl_rpc_plugin.h b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/sdl_rpc_plugin.h index 91298f4883..9c770279ab 100644 --- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/sdl_rpc_plugin.h +++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/sdl_rpc_plugin.h @@ -48,6 +48,13 @@ class SDLRPCPlugin : public plugins::RPCPlugin { app_mngr::rpc_service::RPCService& rpc_service, app_mngr::HMICapabilities& hmi_capabilities, policy::PolicyHandlerInterface& policy_handler, + resumption::LastStateWrapperPtr last_state) OVERRIDE; + + DEPRECATED + bool Init(app_mngr::ApplicationManager& app_manager, + app_mngr::rpc_service::RPCService& rpc_service, + app_mngr::HMICapabilities& hmi_capabilities, + policy::PolicyHandlerInterface& policy_handler, resumption::LastState& last_state) OVERRIDE; bool IsAbleToProcess( |