Takes two url resources compares theme, and returns an appropriate result.
#include "am_policy.h" AM_EXPORT am_resource_match_t am_policy_compare_urls(const am_resource_traits_t *rsrc_traits, const char *policy_resource_name, const char *resource_name, boolean_t use_patterns);
If the usePatterns is AM_TRUE, this function will consider occurrences of ’*’ in the policy resource name as wildcards. If usePatterns is AM_FALSE, ’*’ occurrences are taken as a literal characters.
This function returns am_resource_match_t with one of the following values:
If both the resource names exactly matched.
If the resourceName is a sub-resource to the resource name defined in the policy.
If the resourcName is a ancestor of the policy resource name.
If the there is no kind of match between the policy resource and the requested resource name.
This result will be returned only if the policy is matches resource name. Distinction is not made whether it was a EXACT_MATCH or a pattern match.
In cases of SUB/SUPER_RESOURCE_MATCH, if the usePatterns is * AM_TRUE, the patterns are sub/super matching patterns.