Permission
A GPermission
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 GPermission
might represent the ability for the user to write to a class@Gio.Settings object. This GPermission
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.
Inheritors
Constructors
Properties
Functions
Attempts to acquire the permission represented by @permission.
Attempts to acquire the permission represented by @permission.
Collects the result of attempting to acquire the permission represented by @permission.
Gets the value of the 'allowed' property. This property is true if the caller currently has permission to perform the action that
Gets the value of the 'can-acquire' property. This property is true if it is generally possible to acquire the permission by calling g_permission_acquire().
Gets the value of the 'can-release' property. This property is true if it is generally possible to release the permission by calling g_permission_release().
This function is called by the #GPermission implementation to update the properties of the permission. You should never call this function except from a #GPermission implementation.
Attempts to release the permission represented by @permission.
Attempts to release the permission represented by @permission.
Collects the result of attempting to release the permission represented by @permission.