summaryrefslogtreecommitdiff
path: root/src/components/policy/policy_external/include/policy
diff options
context:
space:
mode:
Diffstat (limited to 'src/components/policy/policy_external/include/policy')
-rw-r--r--src/components/policy/policy_external/include/policy/cache_manager.h16
-rw-r--r--src/components/policy/policy_external/include/policy/cache_manager_interface.h9
-rw-r--r--src/components/policy/policy_external/include/policy/policy_manager_impl.h3
3 files changed, 28 insertions, 0 deletions
diff --git a/src/components/policy/policy_external/include/policy/cache_manager.h b/src/components/policy/policy_external/include/policy/cache_manager.h
index 428a9bd2f6..ef93ec72ab 100644
--- a/src/components/policy/policy_external/include/policy/cache_manager.h
+++ b/src/components/policy/policy_external/include/policy/cache_manager.h
@@ -701,6 +701,15 @@ class CacheManager : public CacheManagerInterface {
const PolicySettings& get_settings() const;
+ /**
+ * @brief OnDeviceSwitching Processes existing policy permissions for devices
+ * switching transport
+ * @param device_id_from Device ID original
+ * @param device_id_to Device ID new
+ */
+ void OnDeviceSwitching(const std::string& device_id_from,
+ const std::string& device_id_to) OVERRIDE;
+
private:
std::string currentDateTime();
struct AppHMITypeToString {
@@ -731,6 +740,13 @@ class CacheManager : public CacheManagerInterface {
*/
void ResetCalculatedPermissionsForDevice(const std::string& device_id);
+ /**
+ * @brief Transform to lower case all non default application names in
+ * applications policies section
+ * @param pt polict rable for update
+ */
+ void MakeLowerCaseAppNames(policy_table::Table& pt) const;
+
void AddCalculatedPermissions(const std::string& device_id,
const std::string& policy_app_id,
const policy::Permissions& permissions);
diff --git a/src/components/policy/policy_external/include/policy/cache_manager_interface.h b/src/components/policy/policy_external/include/policy/cache_manager_interface.h
index ae1f8922ba..b9e9f73646 100644
--- a/src/components/policy/policy_external/include/policy/cache_manager_interface.h
+++ b/src/components/policy/policy_external/include/policy/cache_manager_interface.h
@@ -778,6 +778,15 @@ class CacheManagerInterface {
virtual void SetExternalConsentForApp(
const PermissionConsent& permissions) = 0;
+ /**
+ * @brief OnDeviceSwitching Processes existing policy permissions for devices
+ * switching transport
+ * @param device_id_from Device ID original
+ * @param device_id_to Device ID new
+ */
+ virtual void OnDeviceSwitching(const std::string& device_id_from,
+ const std::string& device_id_to) = 0;
+
#ifdef BUILD_TESTS
/**
* @brief GetPT allows to obtain SharedPtr to PT.
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 80ceb06e7e..97a2e60055 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
@@ -559,6 +559,9 @@ class PolicyManagerImpl : public PolicyManager {
*/
void OnAppRegisteredOnMobile(const std::string& application_id) OVERRIDE;
+ void OnDeviceSwitching(const std::string& device_id_from,
+ const std::string& device_id_to) OVERRIDE;
+
/**
* @brief Gets meta information
* @return meta information