diff options
Diffstat (limited to 'src/components/application_manager/include/application_manager/application_impl.h')
-rw-r--r-- | src/components/application_manager/include/application_manager/application_impl.h | 82 |
1 files changed, 47 insertions, 35 deletions
diff --git a/src/components/application_manager/include/application_manager/application_impl.h b/src/components/application_manager/include/application_manager/application_impl.h index e033570435..549ccc6d0d 100644 --- a/src/components/application_manager/include/application_manager/application_impl.h +++ b/src/components/application_manager/include/application_manager/application_impl.h @@ -41,18 +41,20 @@ #include <forward_list> #include <stdint.h> -#include "utils/date_time.h" +#include "application_manager/application.h" #include "application_manager/application_data_impl.h" #include "application_manager/usage_statistics.h" +#include "application_manager/help_prompt_manager_impl.h" #include "application_manager/hmi_state.h" #include "protocol_handler/protocol_handler.h" #include "connection_handler/device.h" #include "utils/lock.h" -#include "utils/atomic_object.h" +#include <atomic> #include "utils/custom_string.h" #include "utils/timer.h" #include "utils/macro.h" +#include "utils/date_time.h" namespace usage_statistics { @@ -89,7 +91,7 @@ class ApplicationImpl : public virtual Application, const std::string& mac_address, const connection_handler::DeviceHandle device_id, const custom_str::CustomString& app_name, - utils::SharedPtr<usage_statistics::StatisticsManager> statistics_manager, + std::shared_ptr<usage_statistics::StatisticsManager> statistics_manager, ApplicationManager& application_manager); DEPRECATED ApplicationImpl( @@ -97,7 +99,7 @@ class ApplicationImpl : public virtual Application, const std::string& policy_app_id, const std::string& mac_address, const custom_str::CustomString& app_name, - utils::SharedPtr<usage_statistics::StatisticsManager> statistics_manager, + std::shared_ptr<usage_statistics::StatisticsManager> statistics_manager, ApplicationManager& application_manager); ~ApplicationImpl(); @@ -121,6 +123,10 @@ class ApplicationImpl : public virtual Application, } void set_is_navi(bool allow); + virtual bool is_remote_control_supported() const; + + void set_remote_control_supported(const bool allow); + void set_mobile_projection_enabled(bool option); bool mobile_projection_enabled() const; @@ -171,6 +177,7 @@ class ApplicationImpl : public virtual Application, const; const std::string& app_icon_path() const; connection_handler::DeviceHandle device() const; + connection_handler::DeviceHandle secondary_device() const; const std::string& mac_address() const OVERRIDE; const std::string& bundle_id() const OVERRIDE; void set_bundle_id(const std::string& bundle_id) OVERRIDE; @@ -187,6 +194,7 @@ class ApplicationImpl : public virtual Application, bool set_app_icon_path(const std::string& path); void set_app_allowed(const bool allowed); void set_device(connection_handler::DeviceHandle device); + void set_secondary_device(connection_handler::DeviceHandle secondary_device); virtual uint32_t get_grammar_id() const; virtual void set_grammar_id(uint32_t value); bool is_audio() const OVERRIDE; @@ -198,6 +206,24 @@ class ApplicationImpl : public virtual Application, virtual void set_is_resuming(bool is_resuming); virtual bool is_resuming() const; + /** + * @brief Remembers the HMI level which the app would resume into if high- + * bandwidth transport were available. + * @param level The HMI level which the app would resume into. Specify + * INVALID_ENUM to clear the state. + */ + void set_deferred_resumption_hmi_level( + mobile_api::HMILevel::eType level) OVERRIDE; + /** + * @brief Returns the HMI level which the app would resume into if high- + * bandwidth transport were available. + * + * A value of INVALID_ENUM indicates that the app does not have deferred + * HMI level. + * @return HMI level which the app would resume into + */ + mobile_api::HMILevel::eType deferred_resumption_hmi_level() const OVERRIDE; + bool AddFile(const AppFile& file); bool UpdateFile(const AppFile& file); bool DeleteFile(const std::string& file_name); @@ -209,10 +235,6 @@ class ApplicationImpl : public virtual Application, bool IsSubscribedToButton(mobile_apis::ButtonName::eType btn_name); bool UnsubscribeFromButton(mobile_apis::ButtonName::eType btn_name); - bool SubscribeToIVI(uint32_t vehicle_info_type) OVERRIDE; - bool IsSubscribedToIVI(uint32_t vehicle_info_type) const OVERRIDE; - bool UnsubscribeFromIVI(uint32_t vehicle_info_type) OVERRIDE; - DataAccessor<VehicleInfoSubscriptions> SubscribedIVI() const OVERRIDE; inline bool IsRegistered() const OVERRIDE; /** @@ -247,6 +269,12 @@ class ApplicationImpl : public virtual Application, UsageStatistics& usage_report(); + /** + * @brief Access to HelpPromptManager interface + * @return object for Handling VR help + */ + HelpPromptManager& help_prompt_manager() OVERRIDE; + bool AreCommandLimitsExceeded(mobile_apis::FunctionID::eType cmd_id, TLimitSource source); virtual void SubscribeToSoftButtons(int32_t cmd_id, @@ -358,7 +386,6 @@ class ApplicationImpl : public virtual Application, */ uint32_t GetAvailableDiskSpace() OVERRIDE; -#ifdef SDL_REMOTE_CONTROL /** * @brief Sets current system context * @param system_context new system context @@ -377,20 +404,6 @@ class ApplicationImpl : public virtual Application, */ void set_hmi_level(const mobile_api::HMILevel::eType& hmi_level) OVERRIDE; - /** - * @brief Get list of subscriptions to vehicle info notifications - * @return list of subscriptions to vehicle info notifications - */ - const VehicleInfoSubscriptions& SubscribesIVI() const OVERRIDE; - - /** - * @brief Return pointer to extension by uid - * @param uid uid of extension - * @return Pointer to extension, if extension was initialized, otherwise NULL - */ - AppExtensionPtr QueryInterface(AppExtensionUID uid) OVERRIDE; -#endif - void PushMobileMessage( smart_objects::SmartObjectSPtr mobile_message) OVERRIDE; @@ -425,7 +438,8 @@ class ApplicationImpl : public virtual Application, */ void OnAudioStreamSuspend(); -#ifdef SDL_REMOTE_CONTROL + AppExtensionPtr QueryInterface(AppExtensionUID uid) OVERRIDE; + /** * @brief Add extension to application * @param extension pointer to extension @@ -440,11 +454,7 @@ class ApplicationImpl : public virtual Application, */ bool RemoveExtension(AppExtensionUID uid) OVERRIDE; - /** - * @brief Removes all extensions - */ - void RemoveExtensions() OVERRIDE; -#endif // SDL_REMOTE_CONTROL + const std::list<AppExtensionPtr>& Extensions() const OVERRIDE; std::string hash_val_; uint32_t grammar_id_; @@ -456,6 +466,7 @@ class ApplicationImpl : public virtual Application, smart_objects::SmartObject* active_message_; bool is_media_; bool is_navi_; + bool is_remote_control_supported_; bool mobile_projection_enabled_; bool video_streaming_approved_; @@ -466,6 +477,7 @@ class ApplicationImpl : public virtual Application, bool audio_streaming_suspended_; sync_primitives::Lock video_streaming_suspended_lock_; sync_primitives::Lock audio_streaming_suspended_lock_; + sync_primitives::Lock streaming_stop_lock_; bool is_app_allowed_; bool has_been_activated_; @@ -479,14 +491,16 @@ class ApplicationImpl : public virtual Application, std::string app_icon_path_; std::string mac_address_; connection_handler::DeviceHandle device_id_; + connection_handler::DeviceHandle secondary_device_id_; std::string bundle_id_; AppFilesMap app_files_; std::set<mobile_apis::ButtonName::eType> subscribed_buttons_; - VehicleInfoSubscriptions subscribed_vehicle_info_; UsageStatistics usage_report_; + HelpPromptManagerImpl help_prompt_manager_impl_; protocol_handler::MajorProtocolVersion protocol_version_; bool is_voice_communication_application_; - sync_primitives::atomic_bool is_resuming_; + std::atomic_bool is_resuming_; + mobile_api::HMILevel::eType deferred_resumption_hmi_level_; bool is_hash_changed_during_suspend_; uint32_t video_stream_retry_number_; @@ -496,9 +510,7 @@ class ApplicationImpl : public virtual Application, Timer video_stream_suspend_timer_; Timer audio_stream_suspend_timer_; -#ifdef SDL_REMOTE_CONTROL std::list<AppExtensionPtr> extensions_; -#endif // SDL_REMOTE_CONTROL /** * @brief Defines number per time in seconds limits @@ -519,8 +531,8 @@ class ApplicationImpl : public virtual Application, CommandSoftButtonID cmd_softbuttonid_; // Lock for command soft button id sync_primitives::Lock cmd_softbuttonid_lock_; - mutable sync_primitives::Lock vi_lock_; - sync_primitives::Lock button_lock_; + mutable std::shared_ptr<sync_primitives::Lock> vi_lock_ptr_; + mutable std::shared_ptr<sync_primitives::Lock> button_lock_ptr_; std::string folder_name_; ApplicationManager& application_manager_; |