PolicyKit Library Reference Manual | ||||
---|---|---|---|---|
Top | Description |
Synopsis
PolKitPolicyFile; polkit_bool_t (*PolKitPolicyFileEntryForeachFunc) (PolKitPolicyFile *policy_file, PolKitPolicyFileEntry *policy_file_entry, void *user_data); PolKitPolicyFile * polkit_policy_file_new (const char *path, polkit_bool_t load_descriptions, PolKitError **error); PolKitPolicyFile * polkit_policy_file_ref (PolKitPolicyFile *policy_file); void polkit_policy_file_unref (PolKitPolicyFile *policy_file); polkit_bool_t polkit_policy_file_entry_foreach (PolKitPolicyFile *policy_file, PolKitPolicyFileEntryForeachFunc cb, void *user_data);
Details
PolKitPolicyFile
typedef struct _PolKitPolicyFile PolKitPolicyFile;
Objects of this class are used to record information about a policy file.
PolKitPolicyFileEntryForeachFunc ()
polkit_bool_t (*PolKitPolicyFileEntryForeachFunc) (PolKitPolicyFile *policy_file, PolKitPolicyFileEntry *policy_file_entry, void *user_data);
Type for function used in polkit_policy_file_entry_foreach()
.
|
the policy file |
|
the entry |
|
user data |
Returns : |
TRUE to short-circuit, e.g. stop the iteration |
polkit_policy_file_new ()
PolKitPolicyFile * polkit_policy_file_new (const char *path, polkit_bool_t load_descriptions, PolKitError **error);
Load a policy file.
|
path to file |
|
whether descriptions should be loaded |
|
Return location for error |
Returns : |
The new object or NULL if error is set |
polkit_policy_file_ref ()
PolKitPolicyFile * polkit_policy_file_ref (PolKitPolicyFile *policy_file);
Increase reference count.
|
the policy file object |
Returns : |
the object |
polkit_policy_file_unref ()
void polkit_policy_file_unref (PolKitPolicyFile *policy_file);
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 file object |
polkit_policy_file_entry_foreach ()
polkit_bool_t polkit_policy_file_entry_foreach (PolKitPolicyFile *policy_file, PolKitPolicyFileEntryForeachFunc cb, void *user_data);
Visits all entries in a policy file.
|
the policy file object |
|
callback to invoke for each entry |
|
user data |
Returns : |
TRUE if the iteration was short-circuited |