| PolicyKit Library Reference Manual | ||||
|---|---|---|---|---|
enum PolKitResult; const char* polkit_result_to_string_representation (PolKitResult result); polkit_bool_t polkit_result_from_string_representation (const char *string, PolKitResult *out_result);
typedef enum
{
POLKIT_RESULT_UNKNOWN_ACTION,
POLKIT_RESULT_NOT_AUTHORIZED_TO_KNOW,
POLKIT_RESULT_NO,
POLKIT_RESULT_ONLY_VIA_ROOT_AUTH,
POLKIT_RESULT_ONLY_VIA_ROOT_AUTH_KEEP_SESSION,
POLKIT_RESULT_ONLY_VIA_ROOT_AUTH_KEEP_ALWAYS,
POLKIT_RESULT_ONLY_VIA_SELF_AUTH,
POLKIT_RESULT_ONLY_VIA_SELF_AUTH_KEEP_SESSION,
POLKIT_RESULT_ONLY_VIA_SELF_AUTH_KEEP_ALWAYS,
POLKIT_RESULT_YES,
POLKIT_RESULT_N_RESULTS
} PolKitResult;
Result codes from queries to PolicyKit. These are ordered and we say that a result A is "more strict" than a result B, if A has a lower numerical value. (e.g. POLKIT_RESULT_NO is more strict than POLKIT_RESULT_YES).
const char* polkit_result_to_string_representation
(PolKitResult result);
Gives a textual representation of a PolKitResult object.
| result : | the given result to get a textual representation of |
| Returns : | string representing the result (do not free) or NULL if the given result is invalid |
polkit_bool_t polkit_result_from_string_representation (const char *string, PolKitResult *out_result);
Given a textual representation of a PolKitResult object, find the PolKitResult value.
| string : | textual representation of a PolKitResult object |
| out_result : | return location for PolKitResult |
| Returns : | TRUE if the textual representation was valid, otherwise FALSE |