![]() |
![]() |
![]() |
PolicyKit Library Reference Manual | ![]() |
---|---|---|---|---|
enum PolKitErrorCode; PolKitError; PolKitErrorCode polkit_error_get_error_code (PolKitError *error); const char* polkit_error_get_error_message (PolKitError *error); void polkit_error_free (PolKitError *error); void polkit_error_set_error (PolKitError **error, PolKitErrorCode error_code, const char *format, ...);
typedef enum { POLKIT_ERROR_OUT_OF_MEMORY, POLKIT_ERROR_POLICY_FILE_INVALID } PolKitErrorCode;
Error codes returned by PolicyKit
typedef struct _PolKitError PolKitError;
Objects of this class are used for error reporting.
PolKitErrorCode polkit_error_get_error_code (PolKitError *error);
Returns the error code.
|
the error object |
Returns : |
A value from the PolKitErrorCode enumeration. |
const char* polkit_error_get_error_message (PolKitError *error);
Get the error message.
|
the error object |
Returns : |
A string describing the error. Caller shall not free this string. |
void polkit_error_set_error (PolKitError **error, PolKitErrorCode error_code, const char *format, ...);
Sets an error. If OOM, the error will be set to a pre-allocated OOM error.
|
the error object |
|
A value from the PolKitErrorCode enumeration. |
|
printf style formatting string |
|
printf style arguments |