summaryrefslogtreecommitdiff
path: root/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/mobile/delete_interaction_choice_set_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/delete_interaction_choice_set_request.h')
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/mobile/delete_interaction_choice_set_request.h34
1 files changed, 33 insertions, 1 deletions
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/mobile/delete_interaction_choice_set_request.h b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/mobile/delete_interaction_choice_set_request.h
index c1d8759962..ad478bc70d 100644
--- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/mobile/delete_interaction_choice_set_request.h
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/mobile/delete_interaction_choice_set_request.h
@@ -34,8 +34,12 @@
#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_MOBILE_DELETE_INTERACTION_CHOICE_SET_REQUEST_H_
#define SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_MOBILE_DELETE_INTERACTION_CHOICE_SET_REQUEST_H_
+#include <cstdint>
+#include <set>
+
#include "application_manager/application.h"
#include "application_manager/commands/command_request_impl.h"
+#include "application_manager/commands/request_from_mobile_impl.h"
#include "utils/macro.h"
namespace sdl_rpc_plugin {
@@ -43,11 +47,13 @@ namespace app_mngr = application_manager;
namespace commands {
+typedef std::set<uint32_t> SentRequestsSet;
+
/**
* @brief DeleteInteractionChoiceSetRequest command class
**/
class DeleteInteractionChoiceSetRequest
- : public app_mngr::commands::CommandRequestImpl {
+ : public app_mngr::commands::RequestFromMobileImpl {
public:
/**
* @brief DeleteInteractionChoiceSetRequest class constructor
@@ -76,6 +82,14 @@ class DeleteInteractionChoiceSetRequest
*/
bool Init() FINAL;
+ /**
+ * @brief Interface method that is called whenever new event received
+ * Need to observe VR_DeleteCommand event, to send
+ * DeleteInteractionChoiceSetResponse when VR command was delete from HMI.
+ * @param event The received event.
+ */
+ void on_event(const app_mngr::event_engine::Event& event) FINAL;
+
private:
/*
* @brief Check if requested choice set ID in use by perform interaction
@@ -86,6 +100,24 @@ class DeleteInteractionChoiceSetRequest
void SendVrDeleteCommand(app_mngr::ApplicationSharedPtr app);
+ void SendDeleteInteractionChoiceSetResponse();
+
+ /**
+ * @brief Final result_code for sending to Mobile.
+ */
+ std::vector<hmi_apis::Common_Result::eType> response_result_codes_;
+
+ sync_primitives::Lock requests_lock_;
+
+ /**
+ * @brief Collection that contains sent request to HMI.
+ * When HMI response will start come, that collection will helps to control,
+ * when SDL should sends DeleteInteractionChoiceSetResponse to Mobile.
+ * Because, for send DeleteInteractionChoiceSetResponse SDL should will be saw
+ * all response results from HMI.
+ */
+ SentRequestsSet sent_requests_;
+
DISALLOW_COPY_AND_ASSIGN(DeleteInteractionChoiceSetRequest);
};