| Top |  |  |  |  | 
| void | polkit_permission_new () | 
| GPermission * | polkit_permission_new_finish () | 
| GPermission * | polkit_permission_new_sync () | 
| const gchar * | polkit_permission_get_action_id () | 
| PolkitSubject * | polkit_permission_get_subject () | 
| gchar * | action-id | Read / Write / Construct Only | 
| PolkitSubject * | subject | Read / Write / Construct Only | 
PolkitPermission is a GPermission implementation. It can be used with e.g. GtkLockButton. See the GPermission documentation for more information.
void polkit_permission_new (const gchar *action_id,PolkitSubject *subject,GCancellable *cancellable,GAsyncReadyCallback callback,gpointer user_data);
Creates a GPermission instance for the PolicyKit action
action_id
.
When the operation is finished, callback
 will be invoked. You can
then call polkit_permission_new_finish() to get the result of the
operation.
This is a asynchronous failable constructor. See
polkit_permission_new_sync() for the synchronous version.
| action_id | The PolicyKit action identifier. | |
| subject | A PolkitSubject or  | [allow-none] | 
| cancellable | A GCancellable or  | [allow-none] | 
| callback | A GAsyncReadyCallback to call when the request is satisfied. | |
| user_data | The data to pass to  | 
GPermission * polkit_permission_new_finish (GAsyncResult *res,GError **error);
Finishes an operation started with polkit_permission_new().
| res | A GAsyncResult obtained from the GAsyncReadyCallback passed to  | |
| error | Return location for error or  | [allow-none] | 
GPermission * polkit_permission_new_sync (const gchar *action_id,PolkitSubject *subject,GCancellable *cancellable,GError **error);
Creates a GPermission instance for the PolicyKit action
action_id
.
This is a synchronous failable constructor. See
polkit_permission_new() for the asynchronous version.
| action_id | The PolicyKit action identifier. | |
| subject | A PolkitSubject or  | [allow-none] | 
| cancellable | A GCancellable or  | [allow-none] | 
| error | Return location for error or  | [allow-none] | 
const gchar *
polkit_permission_get_action_id (PolkitPermission *permission);
Gets the PolicyKit action identifier used for permission
.
PolkitSubject *
polkit_permission_get_subject (PolkitPermission *permission);
Gets the subject used for permission
.
typedef struct _PolkitPermission PolkitPermission;
The PolkitPermission struct should not be accessed directly.
“action-id” property  “action-id”                gchar *
The action identifier to use for the permission.
Owner: PolkitPermission
Flags: Read / Write / Construct Only
Default value: NULL
“subject” property“subject” PolkitSubject *
The PolkitSubject to use for the permission. If not set during construction, it will be set to match the current process.
Owner: PolkitPermission
Flags: Read / Write / Construct Only