SimplePermission

gio.SimplePermission is a trivial implementation of gio.Permission that represents a permission that is either always or never allowed. The value is given at construction and doesn't change.

Calling request or release will result in errors.

Constructors

this
this(GSimplePermission* gSimplePermission, bool ownedRef = false)

Sets our main struct and passes it to the parent class.

this
this(bool allowed)

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

Members

Functions

getSimplePermissionStruct
GSimplePermission* getSimplePermissionStruct(bool transferOwnership = false)

Get the main Gtk struct

getStruct
void* getStruct()

the main Gtk struct as a void*

Static functions

getType
GType getType()

Variables

gSimplePermission
GSimplePermission* gSimplePermission;

the main Gtk struct

Inherited Members

From Permission

gPermission
GPermission* gPermission;

the main Gtk struct

getPermissionStruct
GPermission* getPermissionStruct(bool transferOwnership = false)

Get the main Gtk struct

getStruct
void* getStruct()

the main Gtk struct as a void*

getType
GType getType()
acquire
bool acquire(Cancellable cancellable)

Attempts to acquire the permission represented by permission.

acquireAsync
void acquireAsync(Cancellable cancellable, GAsyncReadyCallback callback, void* userData)

Attempts to acquire the permission represented by permission.

acquireFinish
bool acquireFinish(AsyncResultIF result)

Collects the result of attempting to acquire the permission represented by permission.

getAllowed
bool getAllowed()

Gets the value of the 'allowed' property. This property is TRUE if the caller currently has permission to perform the action that permission represents the permission to perform.

getCanAcquire
bool getCanAcquire()

Gets the value of the 'can-acquire' property. This property is TRUE if it is generally possible to acquire the permission by calling Permission.acquire.

getCanRelease
bool getCanRelease()

Gets the value of the 'can-release' property. This property is TRUE if it is generally possible to release the permission by calling Permission.release.

implUpdate
void implUpdate(bool allowed, bool canAcquire, bool canRelease)

This function is called by the gio.Permission implementation to update the properties of the permission. You should never call this function except from a gio.Permission implementation.

release
bool release(Cancellable cancellable)

Attempts to release the permission represented by permission.

releaseAsync
void releaseAsync(Cancellable cancellable, GAsyncReadyCallback callback, void* userData)

Attempts to release the permission represented by permission.

releaseFinish
bool releaseFinish(AsyncResultIF result)

Collects the result of attempting to release the permission represented by permission.

Meta