summaryrefslogtreecommitdiff
path: root/src/components/policy/policy_external/include/policy/policy_helper.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/components/policy/policy_external/include/policy/policy_helper.h')
-rw-r--r--src/components/policy/policy_external/include/policy/policy_helper.h32
1 files changed, 31 insertions, 1 deletions
diff --git a/src/components/policy/policy_external/include/policy/policy_helper.h b/src/components/policy/policy_external/include/policy/policy_helper.h
index bce2559431..69ba8806d4 100644
--- a/src/components/policy/policy_external/include/policy/policy_helper.h
+++ b/src/components/policy/policy_external/include/policy/policy_helper.h
@@ -1,4 +1,4 @@
-/*
+/*
Copyright (c) 2013, Ford Motor Company
All rights reserved.
@@ -129,6 +129,15 @@ struct CheckAppPolicy {
bool HasNewGroups(const AppPoliciesValueType& app_policy,
policy_table::Strings* new_groups = NULL) const;
/**
+ * @brief Checks whether updated application policy contains group content
+ * update in compare to current one
+ * @param app_policy Reference to updated application policy
+ * @param updated_groups List of updated groups if any
+ * @return True if updated groups found, otherwise - false
+ */
+ bool HasUpdatedGroups(const policy::AppPoliciesValueType& app_policy,
+ policy_table::Strings* updated_groups = NULL) const;
+ /**
* @brief Checks whether updated policy has groups which require user consent
* @param app_policy Reference to updated application policy
* @return True if has groups requiring user consents, otherwise - false
@@ -202,6 +211,15 @@ struct CheckAppPolicy {
bool IsRequestSubTypeChanged(const AppPoliciesValueType& app_policy) const;
/**
+ * @brief IsEncryptionRequiredFlagChanged check if encryption_needed flag was
+ * changed for application or application groups
+ * @param app_policy application policies
+ * @return true if encryption_needed state was changed otherwise - false
+ */
+ bool IsEncryptionRequiredFlagChanged(
+ const AppPoliciesValueType& app_policy) const;
+
+ /**
* @brief Helper function that inserts permissions into app_permissions_diff_
* map.
* udpated
@@ -213,6 +231,10 @@ struct CheckAppPolicy {
void InsertPermission(const std::string& app_id,
const AppPermissions& permissions_diff);
+ bool IsAppPropertiesChanged(const AppPoliciesValueType& app_policy) const;
+
+ bool IsAppPropertiesProvided(const AppPoliciesValueType& app_policy) const;
+
private:
PolicyManagerImpl* pm_;
const std::shared_ptr<policy_table::Table> update_;
@@ -307,6 +329,14 @@ struct ProcessFunctionalGroup {
private:
GroupConsent GetGroupState(const std::string& group_name);
+ /*
+ * @brief Fills encryption required flags for all rpcs in functional group
+ * @param encryption_required Optional object containing encryption required
+ * flag
+ */
+ void FillEncryptionFlagForRpcs(
+ const policy_table::Rpc& rpcs,
+ const policy::EncryptionRequired encryption_required);
const policy_table::FunctionalGroupings& fg_;
const std::vector<FunctionalGroupPermission>& group_permissions_;
Permissions& data_;