![]() |
![]() |
![]() |
PolicyKit Library Reference Manual | ![]() |
---|---|---|---|---|
PolKitPolicyFileEntry; void (*PolKitPolicyFileEntryAnnotationsForeachFunc) (PolKitPolicyFileEntry *policy_file_entry, const char *key, const char *value, void *user_data); PolKitPolicyFileEntry* polkit_policy_file_entry_ref (PolKitPolicyFileEntry *policy_file_entry); void polkit_policy_file_entry_unref (PolKitPolicyFileEntry *policy_file_entry); void polkit_policy_file_entry_debug (PolKitPolicyFileEntry *policy_file_entry); const char* polkit_policy_file_entry_get_id (PolKitPolicyFileEntry *policy_file_entry); PolKitPolicyDefault* polkit_policy_file_entry_get_default (PolKitPolicyFileEntry *policy_file_entry); const char* polkit_policy_file_entry_get_action_description (PolKitPolicyFileEntry *policy_file_entry); const char* polkit_policy_file_entry_get_action_message (PolKitPolicyFileEntry *policy_file_entry); void polkit_policy_file_entry_annotations_foreach (PolKitPolicyFileEntry *policy_file_entry, PolKitPolicyFileEntryAnnotationsForeachFunc cb, void *user_data); const char* polkit_policy_file_entry_get_annotation (PolKitPolicyFileEntry *policy_file_entry, const char *key);
typedef struct _PolKitPolicyFileEntry PolKitPolicyFileEntry;
Objects of this class are used to record information about a policy.
void (*PolKitPolicyFileEntryAnnotationsForeachFunc) (PolKitPolicyFileEntry *policy_file_entry, const char *key, const char *value, void *user_data);
Callback function for polkit_policy_file_entry_annotations_foreach()
.
|
the policy file entry |
|
key of the annotation |
|
corrosponding value of the annotation |
|
user data passed to polkit_policy_file_entry_annotations_foreach()
|
PolKitPolicyFileEntry* polkit_policy_file_entry_ref (PolKitPolicyFileEntry *policy_file_entry);
Increase reference count.
|
the policy file object |
Returns : |
the object |
void polkit_policy_file_entry_unref (PolKitPolicyFileEntry *policy_file_entry);
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 |
void polkit_policy_file_entry_debug (PolKitPolicyFileEntry *policy_file_entry);
Print debug information about object
|
the entry |
const char* polkit_policy_file_entry_get_id (PolKitPolicyFileEntry *policy_file_entry);
Get the action identifier.
|
the file entry |
Returns : |
A string - caller shall not free this string. |
PolKitPolicyDefault* polkit_policy_file_entry_get_default (PolKitPolicyFileEntry *policy_file_entry);
Get the the default policy for this policy.
|
the file entry |
Returns : |
A PolKitPolicyDefault object - caller shall not unref this object. |
const char* polkit_policy_file_entry_get_action_description (PolKitPolicyFileEntry *policy_file_entry);
Get the description of the action that this policy entry describes. This
is intended to be used in policy editors, for example "Mount internal
volumes". Contrast with polkit_policy_file_entry_get_action_message()
. The
textual string will be returned in the current locale.
Note, if polkit_context_set_load_descriptions()
on the
PolKitContext object used to get this object wasn't called, this
method will return NULL.
|
the object |
Returns : |
string or NULL if descriptions are not loaded - caller shall not free this string |
const char* polkit_policy_file_entry_get_action_message (PolKitPolicyFileEntry *policy_file_entry);
Get the message describing the action that this policy entry
describes. This is to be used in dialogs, for example "System
Policy prevents mounting this volume". Contrast with
polkit_policy_file_entry_get_action_description()
. The textual string
will be returned in the current locale.
Note, if polkit_context_set_load_descriptions()
on the
PolKitContext object used to get this object wasn't called, this
method will return NULL.
|
the object |
Returns : |
string or NULL if descriptions are not loaded - caller shall not free this string |
void polkit_policy_file_entry_annotations_foreach (PolKitPolicyFileEntry *policy_file_entry, PolKitPolicyFileEntryAnnotationsForeachFunc cb, void *user_data);
Iterate over all annotations on the policy file entry.
|
the policy file entry |
|
callback function |
|
user data to pass to the callback function |
const char* polkit_policy_file_entry_get_annotation (PolKitPolicyFileEntry *policy_file_entry, const char *key);
Look of the value of a given annotation.
|
the policy file entry |
|
the key of the annotation |
Returns : |
The value of the annotation or NULL if not found. |