[ CCode ( cname = "polkit_permission_new" , has_construct_function = false ) ]
public async Permission (string action_id, Subject? subject, Cancellable? cancellable = null) throws Error
Creates a Permission instance for the PolicyKit action
action_id.
When the operation is finished, callback will be invoked. You can then call Permission.end
to get the result of the operation.
This is a asynchronous failable constructor. See Permission.sync for the synchronous version.
| action_id |
The PolicyKit action identifier. |
| subject |
A Subject or null for the current process. |
| cancellable |
A Cancellable or null. |
| callback |
A TaskReadyCallback to call when the request is satisfied. |
| user_data |
The data to pass to |