diff options
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.h | 42 |
1 files changed, 34 insertions, 8 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 e3cb509c15..2054485ef5 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 @@ -243,13 +261,13 @@ struct FillActionsForAppPolicies { */ struct FillNotificationData { /** - * @brief Constructor - * @param data Output structure with filled data - * @param group_state Consent of the group processed by instance - * @param undefined_group_consent Defines how to treat 'undefined' consent - * @param does_require_user_consent Specifies whether processed group requires - * user consent - */ + * @brief Constructor + * @param data Output structure with filled data + * @param group_state Consent of the group processed by instance + * @param undefined_group_consent Defines how to treat 'undefined' consent + * @param does_require_user_consent Specifies whether processed group requires + * user consent + */ FillNotificationData(Permissions& data, GroupConsent group_state, GroupConsent undefined_group_consent, @@ -307,6 +325,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_; |