SimplePermission

open class SimplePermission(pointer: <Error class: unknown class><<Error class: unknown class>>) : Permission

#GSimplePermission is a trivial implementation of #GPermission 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

Link copied to clipboard
constructor(allowed: Boolean)

Creates a new #GPermission instance that represents an action that is either always or never allowed.

constructor(pointer: <Error class: unknown class><<Error class: unknown class>>)

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard
open val allowed: Boolean

true if the caller currently has permission to perform the action that

Link copied to clipboard

true if it is generally possible to acquire the permission by calling g_permission_acquire().

Link copied to clipboard

true if it is generally possible to release the permission by calling g_permission_release().

Link copied to clipboard
val gioPermissionPointer: <Error class: unknown class><<Error class: unknown class>>
Link copied to clipboard
val gioSimplePermissionPointer: <Error class: unknown class><<Error class: unknown class>>

Functions

Link copied to clipboard
open fun acquire(cancellable: Cancellable? = null): <Error class: unknown class><Boolean>

Attempts to acquire the permission represented by @permission.

Link copied to clipboard
open fun acquireAsync(cancellable: Cancellable? = null, callback: AsyncReadyCallback)

Attempts to acquire the permission represented by @permission.

Link copied to clipboard
open fun acquireFinish(result: AsyncResult): <Error class: unknown class><Boolean>

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

Link copied to clipboard
open fun getAllowed(): Boolean

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

Link copied to clipboard

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().

Link copied to clipboard

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().

Link copied to clipboard
open fun implUpdate(allowed: Boolean, canAcquire: Boolean, canRelease: Boolean)

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.

Link copied to clipboard
open fun release(cancellable: Cancellable? = null): <Error class: unknown class><Boolean>

Attempts to release the permission represented by @permission.

Link copied to clipboard
open fun releaseAsync(cancellable: Cancellable? = null, callback: AsyncReadyCallback)

Attempts to release the permission represented by @permission.

Link copied to clipboard
open fun releaseFinish(result: AsyncResult): <Error class: unknown class><Boolean>

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