Gio.Permission
const Gio = imports.gi.Gio; let permission = new Gio.Permission({ });
A Gio.Permission represents the status of the caller's permission to perform a certain action.
You can query if the action is currently allowed and if it is possible to acquire the permission so that the action will be allowed in the future.
There is also an API to actually acquire the permission and one to release it.
As an example, a Gio.Permission might represent the ability for the user to write to a Gio.Settings object. This Gio.Permission object could then be used to decide if it is appropriate to show a "Click here to unlock" button in a dialog and to provide the mechanism to invoke when that button is clicked.
Hierarchy
-
GObject.Object
- Gio.Permission
Methods
- Gio.Permission.prototype.acquire
- Gio.Permission.prototype.acquire_async
- Gio.Permission.prototype.acquire_finish
- Gio.Permission.prototype.get_allowed
- Gio.Permission.prototype.get_can_acquire
- Gio.Permission.prototype.get_can_release
- Gio.Permission.prototype.impl_update
- Gio.Permission.prototype.release
- Gio.Permission.prototype.release_async
- Gio.Permission.prototype.release_finish