![]() |
![]() |
![]() |
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()
.
|
the policy cache |
|
an entry in the cache - do not unref |
|
user data passed to polkit_policy_cache_foreach()
|
PolKitPolicyCache* polkit_policy_cache_ref (PolKitPolicyCache *policy_cache);
Increase reference count.
|
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.
|
the policy cache object |
void polkit_policy_cache_debug (PolKitPolicyCache *policy_cache);
Print debug information about object
|
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.
|
the cache |
|
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.
|
the policy cache |
|
callback function |
|
user data to pass to callback function |