diff options
author | JackLivio <jack@livio.io> | 2018-10-19 15:05:09 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-10-19 15:05:09 -0400 |
commit | d36316738785c96dab2ee892762ed08c059fffde (patch) | |
tree | 168a7c0705b5bc8f0dee7ce4b511ccf71759d9b4 /src/components/application_manager/include/application_manager/policies/policy_handler.h | |
parent | 7f7fcbb998fb17f2954fd103349af67ea9b71a3f (diff) | |
parent | 83c5e805346d55ec7fb9f4ba8b6f6855d992273e (diff) | |
download | sdl_core-hotfix/templates_updates.tar.gz |
Merge pull request #2572 from smartdevicelink/release/5.0.05.0.0hotfix/templates_updatesfeature/show_app_menufeature/progress_bar_seekfeature/open-menu-rpcfeature/open-menu-rfeature/button
Release 5.0.0
Diffstat (limited to 'src/components/application_manager/include/application_manager/policies/policy_handler.h')
-rw-r--r-- | src/components/application_manager/include/application_manager/policies/policy_handler.h | 50 |
1 files changed, 40 insertions, 10 deletions
diff --git a/src/components/application_manager/include/application_manager/policies/policy_handler.h b/src/components/application_manager/include/application_manager/policies/policy_handler.h index b4653c6cb2..c8f3bcf888 100644 --- a/src/components/application_manager/include/application_manager/policies/policy_handler.h +++ b/src/components/application_manager/include/application_manager/policies/policy_handler.h @@ -113,7 +113,6 @@ class PolicyHandler : public PolicyHandlerInterface, virtual DeviceConsent GetUserConsentForDevice( const std::string& device_id) const OVERRIDE; -#ifdef SDL_REMOTE_CONTROL /** * @brief Sets HMI default type for specified application * @param application_id ID application @@ -177,7 +176,6 @@ class PolicyHandler : public PolicyHandlerInterface, */ bool GetModuleTypes(const std::string& policy_app_id, std::vector<std::string>* modules) const OVERRIDE; -#endif // SDL_REMOTE_CONTROL bool GetDefaultHmi(const std::string& policy_app_id, std::string* default_hmi) const OVERRIDE; @@ -208,7 +206,7 @@ class PolicyHandler : public PolicyHandlerInterface, void add_listener(PolicyHandlerObserver* listener) OVERRIDE; void remove_listener(PolicyHandlerObserver* listener) OVERRIDE; - utils::SharedPtr<usage_statistics::StatisticsManager> GetStatisticManager() + std::shared_ptr<usage_statistics::StatisticsManager> GetStatisticManager() const OVERRIDE; /** @@ -487,6 +485,32 @@ class PolicyHandler : public PolicyHandlerInterface, mobile_apis::RequestType::eType type) const OVERRIDE; /** + * @brief Checks if certain request subtype is allowed for application + * @param policy_app_id Unique applicaion id + * @param request_subtype Request subtype + * @return true, if allowed, otherwise - false + */ + bool IsRequestSubTypeAllowed( + const std::string& policy_app_id, + const std::string& request_subtype) const OVERRIDE; + + /** + * @brief Gets application request types state + * @param policy_app_id Unique application id + * @return request types state + */ + RequestType::State GetAppRequestTypeState( + const std::string& policy_app_id) const OVERRIDE; + + /** + * @brief Gets application request subtypes state + * @param policy_app_id Unique application id + * @return request subtypes state + */ + RequestSubType::State GetAppRequestSubTypeState( + const std::string& policy_app_id) const OVERRIDE; + + /** * @brief Gets application request types * @param policy_app_id Unique application id * @return request types @@ -495,6 +519,14 @@ class PolicyHandler : public PolicyHandlerInterface, const std::string& policy_app_id) const OVERRIDE; /** + * @brief Gets application request subtypes + * @param policy_app_id Unique application id + * @return app request subtypes + */ + const std::vector<std::string> GetAppRequestSubTypes( + const std::string& policy_app_id) const OVERRIDE; + + /** * @brief Gets vehicle information * @return Structure with vehicle information */ @@ -520,7 +552,7 @@ class PolicyHandler : public PolicyHandlerInterface, int32_t timespan_seconds) OVERRIDE; #ifdef BUILD_TESTS - void SetPolicyManager(utils::SharedPtr<PolicyManager> pm) { + void SetPolicyManager(std::shared_ptr<PolicyManager> pm) { policy_manager_ = pm; } #endif // BUILD_TESTS @@ -593,7 +625,6 @@ class PolicyHandler : public PolicyHandlerInterface, PermissionConsent& out_permissions) OVERRIDE; #endif -#ifdef SDL_REMOTE_CONTROL /** * @brief Updates HMI level for specified application and send notification * @param app application where HMI level was changed @@ -603,7 +634,6 @@ class PolicyHandler : public PolicyHandlerInterface, mobile_apis::HMILevel::eType level); std::vector<std::string> GetDevicesIds( const std::string& policy_app_id) OVERRIDE; -#endif // SDL_REMOTE_CONTROL /** * @brief Sets days after epoch on successful policy update @@ -702,9 +732,9 @@ class PolicyHandler : public PolicyHandlerInterface, private: mutable sync_primitives::RWLock policy_manager_lock_; - utils::SharedPtr<PolicyManager> policy_manager_; + std::shared_ptr<PolicyManager> policy_manager_; void* dl_handle_; - utils::SharedPtr<PolicyEventObserver> event_observer_; + std::shared_ptr<PolicyEventObserver> event_observer_; uint32_t last_activated_app_id_; /** @@ -726,9 +756,9 @@ class PolicyHandler : public PolicyHandlerInterface, std::map<std::string, std::string> app_to_device_link_; // Lock for app to device list - sync_primitives::Lock app_to_device_link_lock_; + sync_primitives::RecursiveLock app_to_device_link_lock_; - utils::SharedPtr<StatisticManagerImpl> statistic_manager_impl_; + std::shared_ptr<StatisticManagerImpl> statistic_manager_impl_; const PolicySettings& settings_; application_manager::ApplicationManager& application_manager_; friend class AppPermissionDelegate; |