Permission
Object Hierarchy:
GLib.Permission
GLib.Permission
GLib.Permission
GLib.Object
GLib.Object
GLib.Object->GLib.Permission
Description:
[ CCode ( type_id = "g_permission_get_type ()" ) ]public abstract class Permission : Object
A 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 Permission might represent the ability for the user to write to a
Settings object. This 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.
Content:
Properties:
Creation methods:
Methods:
public virtual bool acquire (Cancellable ? cancellable = null ) throws Error
Attempts to acquire the permission represented by
this .
public virtual async bool acquire_async (Cancellable ? cancellable = null ) throws Error
Attempts to acquire the permission represented by
this .
public bool get_allowed ()
Gets the value of the 'allowed' property.
public bool get_can_acquire ()
Gets the value of the 'can-acquire' property.
public bool get_can_release ()
Gets the value of the 'can-release' property.
public void impl_update (bool allowed, bool can_acquire, bool can_release)
This function is called by the Permission
implementation to update the properties of the permission.
public virtual bool release (Cancellable ? cancellable = null ) throws Error
Attempts to release the permission represented by
this .
public virtual async bool release_async (Cancellable ? cancellable = null ) throws Error
Attempts to release the permission represented by
this .
Inherited Members:
All known members inherited from class GLib.Object
@get
@new
@ref
@set
add_toggle_ref
add_weak_pointer
bind_property
connect
constructed
disconnect
dispose
dup_data
dup_qdata
force_floating
freeze_notify
get_class
get_data
get_property
get_qdata
get_type
getv
interface_find_property
interface_install_property
interface_list_properties
is_floating
new_valist
new_with_properties
newv
notify
notify_property
ref_count
ref_sink
remove_toggle_ref
remove_weak_pointer
replace_data
replace_qdata
set_data
set_data_full
set_property
set_qdata
set_qdata_full
set_valist
setv
steal_data
steal_qdata
thaw_notify
unref
watch_closure
weak_ref
weak_unref