![]() |
![]() |
![]() |
PolicyKit Library Reference Manual | ![]() |
---|---|---|---|---|
struct PolKitPolicyCache; void (*PolKitPolicyCacheForeachFunc) (PolKitPolicyCache *policy_cache, PolKitPolicyFileEntry *entry, void *user_data); PolKitPolicyCache* polkit_policy_cache_ref (PolKitPolicyCache *policy_cache); void polkit_policy_cache_unref (PolKitPolicyCache *policy_cache); void polkit_policy_cache_debug (PolKitPolicyCache *policy_cache); PolKitPolicyFileEntry* polkit_policy_cache_get_entry (PolKitPolicyCache *policy_cache, PolKitAction *action); void polkit_policy_cache_foreach (PolKitPolicyCache *policy_cache, PolKitPolicyCacheForeachFunc callback, void *user_data);
This class is used to hold all policy objects (stemming from policy files) and provide look-up functions.
struct PolKitPolicyCache;
Instances of this class are used to hold all policy objects (stemming from policy files) and provide look-up functions.
void (*PolKitPolicyCacheForeachFunc) (PolKitPolicyCache *policy_cache, PolKitPolicyFileEntry *entry, void *user_data);
Callback function for polkit_policy_cache_foreach().
policy_cache : | the policy cache |
entry : | an entry in the cache - do not unref |
user_data : | user data passed to polkit_policy_cache_foreach() |
PolKitPolicyCache* polkit_policy_cache_ref (PolKitPolicyCache *policy_cache);
Increase reference count.
policy_cache : | the policy cache object |
Returns : | the object |
void polkit_policy_cache_unref (PolKitPolicyCache *policy_cache);
Decreases the reference count of the object. If it becomes zero, the object is freed. Before freeing, reference counts on embedded objects are decresed by one.
policy_cache : | the policy cache object |
void polkit_policy_cache_debug (PolKitPolicyCache *policy_cache);
Print debug information about object
policy_cache : | the cache |
PolKitPolicyFileEntry* polkit_policy_cache_get_entry (PolKitPolicyCache *policy_cache, PolKitAction *action);
Given a action, find the object describing the definition of the policy; e.g. data stemming from files in /etc/PolicyKit/policy.
policy_cache : | the cache |
action : | the action |
Returns : | A PolKitPolicyFileEntry entry on sucess; otherwise NULL if the action wasn't identified. Caller shall not unref this object. |
void polkit_policy_cache_foreach (PolKitPolicyCache *policy_cache, PolKitPolicyCacheForeachFunc callback, void *user_data);
Visit all entries in the policy cache.
policy_cache : | the policy cache |
callback : | callback function |
user_data : | user data to pass to callback function |