|  |  |  | polkit Reference Manual |  | 
|---|---|---|---|---|
| Top | Description | Object Hierarchy | ||||
PolkitAuthorizationResult; PolkitAuthorizationResult * polkit_authorization_result_new (gboolean is_authorized,gboolean is_challenge,PolkitDetails *details); gboolean polkit_authorization_result_get_is_authorized (PolkitAuthorizationResult *result); gboolean polkit_authorization_result_get_is_challenge (PolkitAuthorizationResult *result); gboolean polkit_authorization_result_get_retains_authorization (PolkitAuthorizationResult *result); const gchar * polkit_authorization_result_get_temporary_authorization_id (PolkitAuthorizationResult *result); gboolean polkit_authorization_result_get_dismissed (PolkitAuthorizationResult *result); PolkitDetails * polkit_authorization_result_get_details (PolkitAuthorizationResult *result);
typedef struct _PolkitAuthorizationResult PolkitAuthorizationResult;
The PolkitAuthorizationResult struct should not be accessed directly.
PolkitAuthorizationResult * polkit_authorization_result_new (gboolean is_authorized,gboolean is_challenge,PolkitDetails *details);
Creates a new PolkitAuthorizationResult object.
| 
 | Whether the subject is authorized. | 
| 
 | Whether the subject is authorized if more
information is provided. Must be FALSEunlessis_authorizedisTRUE. | 
| 
 | Must be NULLunlessis_authorizedisTRUE. [allow-none] | 
| Returns : | A PolkitAuthorizationResult object. Free with g_object_unref(). | 
gboolean            polkit_authorization_result_get_is_authorized
                                                        (PolkitAuthorizationResult *result);
Gets whether the subject is authorized.
If the authorization is temporary, use polkit_authorization_result_get_temporary_authorization_id()
to get the opaque identifier for the temporary authorization.
| 
 | A PolkitAuthorizationResult. | 
| Returns : | Whether the subject is authorized. | 
gboolean            polkit_authorization_result_get_is_challenge
                                                        (PolkitAuthorizationResult *result);
Gets whether the subject is authorized if more information is provided.
| 
 | A PolkitAuthorizationResult. | 
| Returns : | Whether the subject is authorized if more information is provided. | 
gboolean            polkit_authorization_result_get_retains_authorization
                                                        (PolkitAuthorizationResult *result);
Gets whether authorization is retained if obtained via authentication. This can only be the case
if result indicates that the subject can obtain authorization after challenge (cf.
polkit_authorization_result_get_is_challenge()), e.g. when the subject is not already authorized (cf.
polkit_authorization_result_get_is_authorized()).
If the subject is already authorized, use polkit_authorization_result_get_temporary_authorization_id()
to check if the authorization is temporary.
This method simply reads the value of the key/value pair in details with the
key polkit.retains_authorization_after_challenge.
| 
 | A PolkitAuthorizationResult. | 
| Returns : | TRUEif the authorization is or will be temporary. | 
const gchar *       polkit_authorization_result_get_temporary_authorization_id
                                                        (PolkitAuthorizationResult *result);
Gets the opaque temporary authorization id for result if result indicates the
subject is authorized and the authorization is temporary rather than one-shot or
permanent.
You can use this string together with the result from
polkit_authority_enumerate_temporary_authorizations() to get more details
about the temporary authorization or polkit_authority_revoke_temporary_authorization_by_id()
to revoke the temporary authorization.
If the subject is not authorized, use polkit_authorization_result_get_retains_authorization()
to check if the authorization will be retained if obtained via authentication.
This method simply reads the value of the key/value pair in details with the
key polkit.temporary_authorization_id.
| 
 | A PolkitAuthorizationResult. | 
| Returns : | The opaque temporary authorization id for resultorNULLif not available. Do not free this string, it
is owned byresult. [allow-none] | 
gboolean            polkit_authorization_result_get_dismissed
                                                        (PolkitAuthorizationResult *result);
Gets whether the authentication request was dismissed / canceled by the user.
This method simply reads the value of the key/value pair in details with the
key polkit.dismissed.
| 
 | A PolkitAuthorizationResult. | 
| Returns : | TRUEif the authentication request was dismissed,FALSEotherwise. | 
Since 0.101
PolkitDetails *     polkit_authorization_result_get_details
                                                        (PolkitAuthorizationResult *result);
Gets the details about the result.
| 
 | A PolkitAuthorizationResult. | 
| Returns : | A PolkitDetails object or NULLif there are no details. This object is owned byresultand
should not be freed by the caller. [allow-none][transfer none] |