summaryrefslogtreecommitdiff
path: root/src/components/policy/policy_external/include/policy/policy_manager_impl.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/components/policy/policy_external/include/policy/policy_manager_impl.h')
-rw-r--r--src/components/policy/policy_external/include/policy/policy_manager_impl.h47
1 files changed, 31 insertions, 16 deletions
diff --git a/src/components/policy/policy_external/include/policy/policy_manager_impl.h b/src/components/policy/policy_external/include/policy/policy_manager_impl.h
index 97a2e60055..3837dda1fa 100644
--- a/src/components/policy/policy_external/include/policy/policy_manager_impl.h
+++ b/src/components/policy/policy_external/include/policy/policy_manager_impl.h
@@ -34,7 +34,7 @@
#define SRC_COMPONENTS_POLICY_POLICY_EXTERNAL_INCLUDE_POLICY_POLICY_MANAGER_IMPL_H_
#include <list>
-#include "utils/shared_ptr.h"
+
#include "utils/lock.h"
#include "policy/policy_manager.h"
#include "policy/policy_table.h"
@@ -42,11 +42,8 @@
#include "policy/update_status_manager.h"
#include "policy/policy_table/functions.h"
#include "policy/usage_statistics/statistics_manager.h"
-
-#ifdef SDL_REMOTE_CONTROL
#include "policy/access_remote.h"
#include "policy/access_remote_impl.h"
-#endif // SDL_REMOTE_CONTROL
namespace policy_table = rpc::policy_table_interface_base;
@@ -454,7 +451,6 @@ class PolicyManagerImpl : public PolicyManager {
const std::string& application_id,
const rpc::policy_table_interface_base::AppHmiTypes& hmi_types) OVERRIDE;
-#ifdef SDL_REMOTE_CONTROL
/**
* @brief Assigns new HMI types for specified application
* @param application_id Unique application id
@@ -476,7 +472,7 @@ class PolicyManagerImpl : public PolicyManager {
* @brief Setter for access_remote instance
* @param access_remote pointer to new access_remote instance
*/
- void set_access_remote(utils::SharedPtr<AccessRemote> access_remote) OVERRIDE;
+ void set_access_remote(std::shared_ptr<AccessRemote> access_remote) OVERRIDE;
/**
* @brief Sends notification about application HMI level changed
@@ -489,7 +485,6 @@ class PolicyManagerImpl : public PolicyManager {
* @param application_id Unique id of application
*/
void OnPrimaryGroupsChanged(const std::string& application_id);
-#endif // SDL_REMOTE_CONTROL
/**
* @brief Removes consent for application functional group
@@ -538,6 +533,22 @@ class PolicyManagerImpl : public PolicyManager {
void OnAppsSearchCompleted(const bool trigger_ptu) OVERRIDE;
/**
+ * @brief Get state of request types for given application
+ * @param policy_app_id Unique application id
+ * @return request type state
+ */
+ RequestType::State GetAppRequestTypesState(
+ const std::string& policy_app_id) const OVERRIDE;
+
+ /**
+ * @brief Get state of request subtypes for given application
+ * @param policy_app_id Unique application id
+ * @return request subtype state
+ */
+ RequestSubType::State GetAppRequestSubTypesState(
+ const std::string& policy_app_id) const OVERRIDE;
+
+ /**
* @brief Gets request types for application
* @param policy_app_id Unique application id
* @return request types of application
@@ -546,6 +557,14 @@ class PolicyManagerImpl : public PolicyManager {
const std::string policy_app_id) const OVERRIDE;
/**
+ * @brief Gets request subtypes for application
+ * @param policy_app_id Unique application id
+ * @return request subtypes of application
+ */
+ const std::vector<std::string> GetAppRequestSubTypes(
+ const std::string& policy_app_id) const OVERRIDE;
+
+ /**
* @brief Get information about vehicle
* @return vehicle information
*/
@@ -698,7 +717,7 @@ class PolicyManagerImpl : public PolicyManager {
* @param pt_content binary content of PT
* @return pointer to converted PT
*/
- virtual utils::SharedPtr<policy_table::Table> Parse(
+ virtual std::shared_ptr<policy_table::Table> Parse(
const BinaryMessage& pt_content);
private:
@@ -717,8 +736,8 @@ class PolicyManagerImpl : public PolicyManager {
* @return Collection per-application results
*/
CheckAppPolicyResults CheckPermissionsChanges(
- const utils::SharedPtr<policy_table::Table> update,
- const utils::SharedPtr<policy_table::Table> snapshot);
+ const std::shared_ptr<policy_table::Table> update,
+ const std::shared_ptr<policy_table::Table> snapshot);
/**
* @brief Processes results from policy table update analysis done by
@@ -841,10 +860,9 @@ class PolicyManagerImpl : public PolicyManager {
* @param type policy table type
* @return true if policy table valid, otherwise false
*/
- bool IsPTValid(utils::SharedPtr<policy_table::Table> policy_table,
+ bool IsPTValid(std::shared_ptr<policy_table::Table> policy_table,
policy_table::PolicyTableType type) const;
-#ifdef SDL_REMOTE_CONTROL
/**
* @brief Get resulting RPCs permissions for application which started on
* specific device
@@ -881,7 +899,6 @@ class PolicyManagerImpl : public PolicyManager {
*/
bool GetModuleTypes(const std::string& policy_app_id,
std::vector<std::string>* modules) const OVERRIDE;
-#endif // SDL_REMOTE_CONTROL
/**
* @brief Notify application about its permissions changes by preparing and
@@ -997,12 +1014,10 @@ class PolicyManagerImpl : public PolicyManager {
* @brief pointer to CacheManagerInterface instance for getting policy data
*/
CacheManagerInterfaceSPtr cache_;
-#ifdef SDL_REMOTE_CONTROL
/**
* @brief pointer to AccessRemote instance for working with RC applications
*/
- utils::SharedPtr<AccessRemote> access_remote_;
-#endif
+ std::shared_ptr<AccessRemote> access_remote_;
/**
* @brief lock guard for protecting applications list access