![]() |
![]() |
![]() |
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_N_RESULTS } PolKitResult;
Result codes from queries to PolicyKit. This enumeration may grow in the future.
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()
.
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 |