Gio.SimplePermission

g GObject.Object GObject.Object Gio.Permission Gio.Permission GObject.Object->Gio.Permission Gio.SimplePermission Gio.SimplePermission Gio.Permission->Gio.SimplePermission

Subclasses:

None

Methods

Inherited:

Gio.Permission (10), GObject.Object (37)

Structs:

GObject.ObjectClass (5)

class

new (allowed)

Virtual Methods

Inherited:

Gio.Permission (6), GObject.Object (7)

Properties

Inherited:

Gio.Permission (3)

Signals

Inherited:

GObject.Object (1)

Fields

Inherited:

GObject.Object (1)

Class Details

class Gio.SimplePermission(**kwargs)
Bases:

Gio.Permission

Abstract:

No

GSimplePermission is a trivial implementation of [class`Gio`.Permission] that represents a permission that is either always or never allowed. The value is given at construction and doesn’t change.

Calling [method`Gio`.Permission.acquire] or [method`Gio`.Permission.release] on a GSimplePermission will result in errors.

classmethod new(allowed)[source]
Parameters:

allowed (bool) – True if the action is allowed

Returns:

the Gio.SimplePermission, as a Gio.Permission

Return type:

Gio.Permission

Creates a new Gio.Permission instance that represents an action that is either always or never allowed.

New in version 2.26.