Class

GioPermission

Description [src]

abstract class Gio.Permission : GObject.Object
{
  /* No available fields */
}

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 GSettings 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.

Ancestors

Descendants

Instance methods

g_permission_acquire

Attempts to acquire the permission represented by permission.

since: 2.26

g_permission_acquire_async

Attempts to acquire the permission represented by permission.

since: 2.26

g_permission_acquire_finish

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

since: 2.26

g_permission_get_allowed

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.

since: 2.26

g_permission_get_can_acquire

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

since: 2.26

g_permission_get_can_release

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

since: 2.26

g_permission_impl_update

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.

since: 2.26

g_permission_release

Attempts to release the permission represented by permission.

since: 2.26

g_permission_release_async

Attempts to release the permission represented by permission.

since: 2.26

g_permission_release_finish

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

since: 2.26

Methods inherited from GObject (43)

Please see GObject for a full list of methods.

Properties

Gio.Permission:allowed

TRUE if the caller currently has permission to perform the action that permission represents the permission to perform.

Gio.Permission:can-acquire

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

Gio.Permission:can-release

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

Signals

Signals inherited from GObject (1)
GObject::notify

The notify signal is emitted on an object when one of its properties has its value set through g_object_set_property(), g_object_set(), et al.

Class structure

struct GioPermissionClass {
  GObjectClass parent_class;
  gboolean (* acquire) (
    GPermission* permission,
    GCancellable* cancellable,
    GError** error
  );
  void (* acquire_async) (
    GPermission* permission,
    GCancellable* cancellable,
    GAsyncReadyCallback callback,
    gpointer user_data
  );
  gboolean (* acquire_finish) (
    GPermission* permission,
    GAsyncResult* result,
    GError** error
  );
  gboolean (* release) (
    GPermission* permission,
    GCancellable* cancellable,
    GError** error
  );
  void (* release_async) (
    GPermission* permission,
    GCancellable* cancellable,
    GAsyncReadyCallback callback,
    gpointer user_data
  );
  gboolean (* release_finish) (
    GPermission* permission,
    GAsyncResult* result,
    GError** error
  );
  None reserved;
  
}

No description available.

Class members
parent_class: GObjectClass

No description available.

acquire: gboolean (* acquire) ( GPermission* permission, GCancellable* cancellable, GError** error )

No description available.

acquire_async: void (* acquire_async) ( GPermission* permission, GCancellable* cancellable, GAsyncReadyCallback callback, gpointer user_data )

No description available.

acquire_finish: gboolean (* acquire_finish) ( GPermission* permission, GAsyncResult* result, GError** error )

No description available.

release: gboolean (* release) ( GPermission* permission, GCancellable* cancellable, GError** error )

No description available.

release_async: void (* release_async) ( GPermission* permission, GCancellable* cancellable, GAsyncReadyCallback callback, gpointer user_data )

No description available.

release_finish: gboolean (* release_finish) ( GPermission* permission, GAsyncResult* result, GError** error )

No description available.

reserved: None

No description available.

Virtual methods

Gio.PermissionClass.acquire

Attempts to acquire the permission represented by permission.

since: 2.26

Gio.PermissionClass.acquire_async

Attempts to acquire the permission represented by permission.

since: 2.26

Gio.PermissionClass.acquire_finish

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

since: 2.26

Gio.PermissionClass.release

Attempts to release the permission represented by permission.

since: 2.26

Gio.PermissionClass.release_async

Attempts to release the permission represented by permission.

since: 2.26

Gio.PermissionClass.release_finish

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

since: 2.26