GObject.Object
Gio.Permission
Polkit.Permission
Import line: | Polkit = imports.gi.Polkit; |
GIR File: | Polkit-1.0.gir |
C documentation: | PolkitPermission |
Class : | Permission |
Implements: | Gio.AsyncInitable, Gio.Initable |
Extends: | Gio.Permission |
Properties | Defined By | |
---|---|---|
action_id : String
|
Polkit.Permission | |
allowed : gboolean
read only
TRUE if the caller currently has permission to perform the action that
TRUE if the caller currently has permission to perform the action that
|
Gio.Permission | |
can_acquire : gboolean
read only
TRUE if it is generally possible to acquire the permission by calling
g_permission_acquire(). TRUE if it is generally possible to acquire the permission by calling
g_permission_acquire(). |
Gio.Permission | |
can_release : gboolean
read only
TRUE if it is generally possible to release the permission by calling
g_permission_release(). TRUE if it is generally possible to release the permission by calling
g_permission_release(). |
Gio.Permission | |
parent_instance : GObject.Object
read only
|
Gio.Permission | |
priv : Gio.PermissionPrivate
read only
|
Gio.Permission | |
subject : Polkit.Subject
|
Polkit.Permission |
Method / Constructor | Defined By | |
---|---|---|
new Polkit.Permission
(Object properties)
Create a new Polkit.Permission
Create a new Polkit.Permission
|
||
Create a new Polkit.Permission
Create a new Polkit.Permission
|
||
new Polkit.Permission.sync
(String action_id, Subject subject, Cancellable cancellable)
:
Gio.Permission
Create a new Polkit.Permission
Create a new Polkit.Permission
|
||
Polkit.Permission.c_new
(String action_id, Subject subject, Cancellable cancellable, Function callback, void* user_data)
:
none
|
Polkit.Permission | |
acquire
(Cancellable cancellable)
:
gboolean
Attempts to acquire the permission represented by permission.
Attempts to acquire the permission represented by permission.
The precise method by which this happens depends on the permission and the underlying authentication mechanism. A simple example is that a dialog may appear asking the user to enter their password. You should check with g_permission_get_can_acquire() before calling this function. If the permission is acquired then TRUE is returned. Otherwise, FALSE is returned and error is set appropriately. This call is blocking, likely for a very long time (in the case that user interaction is required). See g_permission_acquire_async() for the non-blocking version.
|
Gio.Permission | |
Attempts to acquire the permission represented by permission.
Attempts to acquire the permission represented by permission.
This is the first half of the asynchronous version of g_permission_acquire().
|
Gio.Permission | |
acquire_finish
(AsyncResult result)
:
gboolean
Collects the result of attempting to acquire the permission
represented by permission.
Collects the result of attempting to acquire the permission
represented by permission. This is the second half of the asynchronous version of g_permission_acquire().
|
Gio.Permission | |
get_action_id
()
:
String
|
Polkit.Permission | |
get_allowed
()
:
gboolean
Gets the value of the 'allowed' property.
Gets the value of the 'allowed' property. This property is TRUE if
the caller currently has permission to perform the action that
|
Gio.Permission | |
get_can_acquire
()
:
gboolean
Gets the value of the 'can-acquire' property.
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().
|
Gio.Permission | |
get_can_release
()
:
gboolean
Gets the value of the 'can-release' property.
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().
|
Gio.Permission | |
get_subject
()
:
Polkit.Subject
|
Polkit.Permission | |
This function is called by the GPermission implementation to update
the properties of the permission.
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. GObject notify signals are generated, as appropriate.
|
Gio.Permission | |
init
(Cancellable cancellable)
:
gboolean
Initializes the object implementing the interface.
Initializes the object implementing the interface. This must be
done before any real use of the object after initial construction. Implementations may also support cancellation. If cancellable is not NULL, then initialization can be cancelled by triggering the cancellable object from another thread. If the operation was cancelled, the error G_IO_ERROR_CANCELLED will be returned. If cancellable is not NULL and the object doesn't support cancellable initialization the error G_IO_ERROR_NOT_SUPPORTED will be returned. If this function is not called, or returns with an error then all operations on the object should fail, generally returning the error G_IO_ERROR_NOT_INITIALIZED. Implementations of this method must be idempotent, i.e. multiple calls to this function with the same argument should return the same results. Only the first call initializes the object, further calls return the result of the first call. This is so that its safe to implement the singleton pattern in the GObject constructor function. return FALSE and set error appropriately if present.
|
Gio.Initable | |
Starts asynchronous initialization of the object implementing the
interface.
Starts asynchronous initialization of the object implementing the
interface. This must be done before any real use of the object after initial construction. If the object also implements GInitable you can optionally call g_initable_init() instead. When the initialization is finished, callback will be called. You can then call g_async_initable_init_finish() to get the result of the initialization. Implementations may also support cancellation. If cancellable is not NULL, then initialization can be cancelled by triggering the cancellable object from another thread. If the operation was cancelled, the error G_IO_ERROR_CANCELLED will be returned. If cancellable is not NULL, and the object doesn't support cancellable initialization, the error G_IO_ERROR_NOT_SUPPORTED will be returned. If this function is not called, or returns with an error, then all operations on the object should fail, generally returning the error G_IO_ERROR_NOT_INITIALIZED. to this function with the same argument should return the same results. Only the first call initializes the object; further calls return the result of the first call. This is so that it's safe to implement the singleton pattern in the GObject constructor function. For classes that also support the GInitable interface, the default implementation of this method will run the g_initable_init() function in a thread, so if you want to support asynchronous initialization via threads, just implement the GAsyncInitable interface without overriding any interface methods.
|
Gio.AsyncInitable | |
init_finish
(AsyncResult res)
:
gboolean
Finishes asynchronous initialization and returns the result.
Finishes asynchronous initialization and returns the result.
See g_async_initable_init_async(). will return FALSE and set error appropriately if present.
|
Gio.AsyncInitable | |
new_finish
(AsyncResult res)
:
GObject.Object
Finishes the async construction for the various g_async_initable_new calls,
returning the created object or NULL on error.
Finishes the async construction for the various g_async_initable_new calls,
returning the created object or NULL on error. g_object_unref().
|
Gio.AsyncInitable | |
release
(Cancellable cancellable)
:
gboolean
Attempts to release the permission represented by permission.
Attempts to release the permission represented by permission.
The precise method by which this happens depends on the permission and the underlying authentication mechanism. In most cases the permission will be dropped immediately without further action. You should check with g_permission_get_can_release() before calling this function. If the permission is released then TRUE is returned. Otherwise, FALSE is returned and error is set appropriately. This call is blocking, likely for a very long time (in the case that user interaction is required). See g_permission_release_async() for the non-blocking version.
|
Gio.Permission | |
Attempts to release the permission represented by permission.
Attempts to release the permission represented by permission.
This is the first half of the asynchronous version of g_permission_release().
|
Gio.Permission | |
release_finish
(AsyncResult result)
:
gboolean
Collects the result of attempting to release the permission
represented by permission.
Collects the result of attempting to release the permission
represented by permission. This is the second half of the asynchronous version of g_permission_release().
|
Gio.Permission |
None |