|  |  |  | 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,
        POLKIT_RESULT_NO,
        POLKIT_RESULT_ONLY_VIA_ADMIN_AUTH,
        POLKIT_RESULT_ONLY_VIA_ADMIN_AUTH_KEEP_SESSION,
        POLKIT_RESULT_ONLY_VIA_ADMIN_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_ONLY_VIA_ADMIN_AUTH_ONE_SHOT,
        POLKIT_RESULT_ONLY_VIA_SELF_AUTH_ONE_SHOT,
        POLKIT_RESULT_N_RESULTS
} PolKitResult;
Result codes from queries to PolicyKit. This enumeration may grow in the future. One should never rely on the ordering
| The result is unknown / cannot be computed. This is mostly used internally in libpolkit. | |
| Access denied. | |
| Access denied, but authentication by the caller as administrator (e.g. root or a member in the wheel group depending on configuration) will grant access to the process the caller is originating from. | |
| Access denied, but authentication by the caller as administrator (e.g. root or a member in the wheel group depending on configuration) will grant access for the remainder of the session | |
| Access denied, but authentication by the caller as administrator (e.g. root or a member in the wheel group depending on configuration) will grant access in the future. | |
| Access denied, but authentication by the caller as himself will grant access to the process the caller is originating from. | |
| Access denied, but authentication by the caller as himself will grant access to the resource for the remainder of the session | |
| Access denied, but authentication by the caller as himself will grant access to the resource in the future. | |
| Access granted. | |
| Access denied, but
authentication by the caller as administrator (e.g. root or a
member in the wheel group depending on configuration) will grant
access exactly one time to the process the caller is originating
from. See polkit_context_is_caller_authorized()for discussion (and
limitations) about one-shot authorizations. | |
| Access denied, but
authentication by the caller as himself will grant access exactly
one time to the process the caller is originating from. See polkit_context_is_caller_authorized()for discussion (and
limitations) about one-shot authorizations. | |
| Number of result codes | 
const char*         polkit_result_to_string_representation
                                                        (PolKitResult result);
Gives a textual representation of a PolKitResult object. This
string is not suitable for displaying to an end user (it's not
localized for starters) but is useful for serialization as it can
be converted back to a PolKitResult object using
polkit_result_from_string_representation().
| 
 | 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.
| 
 | textual representation of a PolKitResult object | 
| 
 | return location for PolKitResult | 
| Returns: | TRUE if the textual representation was valid, otherwise FALSE |