diff options
author | Andrii Kalinich <AKalinich@luxoft.com> | 2018-07-04 16:20:20 +0300 |
---|---|---|
committer | Andrii Kalinich <AKalinich@luxoft.com> | 2018-07-04 16:20:20 +0300 |
commit | 56b01ce0d32d1a4059125a350ad108d35c529c9f (patch) | |
tree | da519afed6998a20ae6e2802935a3e08eb7bc6d1 /src/components/application_manager/include/application_manager/help_prompt_manager_impl.h | |
parent | a73efbdfe97eab17fd9541bd213a89af0a49e1d5 (diff) | |
download | sdl_core-56b01ce0d32d1a4059125a350ad108d35c529c9f.tar.gz |
Added lock for VRcommands map
Also renamed AddCommands function
Added DeleteCommand function
Diffstat (limited to 'src/components/application_manager/include/application_manager/help_prompt_manager_impl.h')
-rw-r--r-- | src/components/application_manager/include/application_manager/help_prompt_manager_impl.h | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/components/application_manager/include/application_manager/help_prompt_manager_impl.h b/src/components/application_manager/include/application_manager/help_prompt_manager_impl.h index f11f11c06d..a34f034e3e 100644 --- a/src/components/application_manager/include/application_manager/help_prompt_manager_impl.h +++ b/src/components/application_manager/include/application_manager/help_prompt_manager_impl.h @@ -34,6 +34,7 @@ #define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_HELP_PROMPT_MANAGER_IMPL_H_ #include "application_manager/help_prompt_manager.h" +#include "utils/lock.h" #include "utils/timer.h" namespace application_manager { @@ -101,6 +102,19 @@ class HelpPromptManagerImpl : public HelpPromptManager { private: DISALLOW_COPY_AND_ASSIGN(HelpPromptManagerImpl); /** + * @brief Add new smart object with VR command to the map + * @param cmd_id ID of VR command + * @param command smart object containing VR command structure + */ + void AddCommand(const uint32_t cmd_id, + const smart_objects::SmartObject& command); + /** + * @brief Delete VR command from map by its cmd_id + * @param cmd_id ID of VR command + * @return true if command was successfully deleted otherwise returns false + */ + bool DeleteCommand(const uint32_t cmd_id); + /** * @brief Send TTS request to HMI */ void SendTTSRequest(); @@ -138,6 +152,7 @@ class HelpPromptManagerImpl : public HelpPromptManager { Application& app_; ApplicationManager& app_manager_; VRCommandsMap vr_commands_; + sync_primitives::Lock vr_commands_lock_; SendingType sending_type_; std::size_t count_requests_commands_; bool is_tts_send_; |