⚝
One Hat Cyber Team
⚝
Your IP:
216.73.216.10
Server IP:
157.245.101.34
Server:
Linux skvinfotech-website 5.4.0-131-generic #147-Ubuntu SMP Fri Oct 14 17:07:22 UTC 2022 x86_64
Server Software:
Apache/2.4.41 (Ubuntu)
PHP Version:
7.4.33
Buat File
|
Buat Folder
Eksekusi
Dir :
~
/
proc
/
self
/
root
/
usr
/
share
/
doc
/
libglib2.0-doc
/
gio
/
View File Name :
GPermission.html
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> <title>GPermission: GIO Reference Manual</title> <meta name="generator" content="DocBook XSL Stylesheets V1.79.1"> <link rel="home" href="index.html" title="GIO Reference Manual"> <link rel="up" href="permissions.html" title="Permissions"> <link rel="prev" href="permissions.html" title="Permissions"> <link rel="next" href="GSimplePermission.html" title="GSimplePermission"> <meta name="generator" content="GTK-Doc V1.32 (XML mode)"> <link rel="stylesheet" href="style.css" type="text/css"> </head> <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> <table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="5"><tr valign="middle"> <td width="100%" align="left" class="shortcuts"> <a href="#" class="shortcut">Top</a><span id="nav_description"> <span class="dim">|</span> <a href="#GPermission.description" class="shortcut">Description</a></span><span id="nav_hierarchy"> <span class="dim">|</span> <a href="#GPermission.object-hierarchy" class="shortcut">Object Hierarchy</a></span><span id="nav_properties"> <span class="dim">|</span> <a href="#GPermission.properties" class="shortcut">Properties</a></span> </td> <td><a accesskey="h" href="index.html"><img src="home.png" width="16" height="16" border="0" alt="Home"></a></td> <td><a accesskey="u" href="permissions.html"><img src="up.png" width="16" height="16" border="0" alt="Up"></a></td> <td><a accesskey="p" href="permissions.html"><img src="left.png" width="16" height="16" border="0" alt="Prev"></a></td> <td><a accesskey="n" href="GSimplePermission.html"><img src="right.png" width="16" height="16" border="0" alt="Next"></a></td> </tr></table> <div class="refentry"> <a name="GPermission"></a><div class="titlepage"></div> <div class="refnamediv"><table width="100%"><tr> <td valign="top"> <h2><span class="refentrytitle"><a name="GPermission.top_of_page"></a>GPermission</span></h2> <p>GPermission — An object representing the permission to perform a certain action</p> </td> <td class="gallery_image" valign="top" align="right"></td> </tr></table></div> <div class="refsect1"> <a name="GPermission.functions"></a><h2>Functions</h2> <div class="informaltable"><table class="informaltable" width="100%" border="0"> <colgroup> <col width="150px" class="functions_proto_type"> <col class="functions_proto_name"> </colgroup> <tbody> <tr> <td class="function_type"> <span class="returnvalue">gboolean</span> </td> <td class="function_name"> <a class="link" href="GPermission.html#g-permission-get-allowed" title="g_permission_get_allowed ()">g_permission_get_allowed</a> <span class="c_punctuation">()</span> </td> </tr> <tr> <td class="function_type"> <span class="returnvalue">gboolean</span> </td> <td class="function_name"> <a class="link" href="GPermission.html#g-permission-get-can-acquire" title="g_permission_get_can_acquire ()">g_permission_get_can_acquire</a> <span class="c_punctuation">()</span> </td> </tr> <tr> <td class="function_type"> <span class="returnvalue">gboolean</span> </td> <td class="function_name"> <a class="link" href="GPermission.html#g-permission-get-can-release" title="g_permission_get_can_release ()">g_permission_get_can_release</a> <span class="c_punctuation">()</span> </td> </tr> <tr> <td class="function_type"> <span class="returnvalue">gboolean</span> </td> <td class="function_name"> <a class="link" href="GPermission.html#g-permission-acquire" title="g_permission_acquire ()">g_permission_acquire</a> <span class="c_punctuation">()</span> </td> </tr> <tr> <td class="function_type"> <span class="returnvalue">void</span> </td> <td class="function_name"> <a class="link" href="GPermission.html#g-permission-acquire-async" title="g_permission_acquire_async ()">g_permission_acquire_async</a> <span class="c_punctuation">()</span> </td> </tr> <tr> <td class="function_type"> <span class="returnvalue">gboolean</span> </td> <td class="function_name"> <a class="link" href="GPermission.html#g-permission-acquire-finish" title="g_permission_acquire_finish ()">g_permission_acquire_finish</a> <span class="c_punctuation">()</span> </td> </tr> <tr> <td class="function_type"> <span class="returnvalue">gboolean</span> </td> <td class="function_name"> <a class="link" href="GPermission.html#g-permission-release" title="g_permission_release ()">g_permission_release</a> <span class="c_punctuation">()</span> </td> </tr> <tr> <td class="function_type"> <span class="returnvalue">void</span> </td> <td class="function_name"> <a class="link" href="GPermission.html#g-permission-release-async" title="g_permission_release_async ()">g_permission_release_async</a> <span class="c_punctuation">()</span> </td> </tr> <tr> <td class="function_type"> <span class="returnvalue">gboolean</span> </td> <td class="function_name"> <a class="link" href="GPermission.html#g-permission-release-finish" title="g_permission_release_finish ()">g_permission_release_finish</a> <span class="c_punctuation">()</span> </td> </tr> <tr> <td class="function_type"> <span class="returnvalue">void</span> </td> <td class="function_name"> <a class="link" href="GPermission.html#g-permission-impl-update" title="g_permission_impl_update ()">g_permission_impl_update</a> <span class="c_punctuation">()</span> </td> </tr> </tbody> </table></div> </div> <div class="refsect1"> <a name="GPermission.properties"></a><h2>Properties</h2> <div class="informaltable"><table class="informaltable" border="0"> <colgroup> <col width="150px" class="properties_type"> <col width="300px" class="properties_name"> <col width="200px" class="properties_flags"> </colgroup> <tbody> <tr> <td class="property_type"><span class="type">gboolean</span></td> <td class="property_name"><a class="link" href="GPermission.html#GPermission--allowed" title="The “allowed” property">allowed</a></td> <td class="property_flags">Read</td> </tr> <tr> <td class="property_type"><span class="type">gboolean</span></td> <td class="property_name"><a class="link" href="GPermission.html#GPermission--can-acquire" title="The “can-acquire” property">can-acquire</a></td> <td class="property_flags">Read</td> </tr> <tr> <td class="property_type"><span class="type">gboolean</span></td> <td class="property_name"><a class="link" href="GPermission.html#GPermission--can-release" title="The “can-release” property">can-release</a></td> <td class="property_flags">Read</td> </tr> </tbody> </table></div> </div> <div class="refsect1"> <a name="GPermission.other"></a><h2>Types and Values</h2> <div class="informaltable"><table class="informaltable" width="100%" border="0"> <colgroup> <col width="150px" class="other_proto_type"> <col class="other_proto_name"> </colgroup> <tbody><tr> <td class="datatype_keyword"> </td> <td class="function_name"><a class="link" href="GPermission.html#GPermission-struct" title="GPermission">GPermission</a></td> </tr></tbody> </table></div> </div> <div class="refsect1"> <a name="GPermission.object-hierarchy"></a><h2>Object Hierarchy</h2> <pre class="screen"> GObject <span class="lineart">╰──</span> GPermission <span class="lineart">╰──</span> <a class="link" href="GSimplePermission.html" title="GSimplePermission">GSimplePermission</a> </pre> </div> <div class="refsect1"> <a name="GPermission.includes"></a><h2>Includes</h2> <pre class="synopsis">#include <gio/gio.h> </pre> </div> <div class="refsect1"> <a name="GPermission.description"></a><h2>Description</h2> <p>A <a class="link" href="GPermission.html" title="GPermission"><span class="type">GPermission</span></a> represents the status of the caller's permission to perform a certain action.</p> <p>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.</p> <p>There is also an API to actually acquire the permission and one to release it.</p> <p>As an example, a <a class="link" href="GPermission.html" title="GPermission"><span class="type">GPermission</span></a> might represent the ability for the user to write to a <a class="link" href="GSettings.html" title="GSettings"><span class="type">GSettings</span></a> object. This <a class="link" href="GPermission.html" title="GPermission"><span class="type">GPermission</span></a> 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.</p> </div> <div class="refsect1"> <a name="GPermission.functions_details"></a><h2>Functions</h2> <div class="refsect2"> <a name="g-permission-get-allowed"></a><h3>g_permission_get_allowed ()</h3> <pre class="programlisting"><span class="returnvalue">gboolean</span> g_permission_get_allowed (<em class="parameter"><code><a class="link" href="GPermission.html" title="GPermission"><span class="type">GPermission</span></a> *permission</code></em>);</pre> <p>Gets the value of the 'allowed' property. This property is <code class="literal">TRUE</code> if the caller currently has permission to perform the action that <em class="parameter"><code>permission</code></em> represents the permission to perform.</p> <div class="refsect3"> <a name="g-permission-get-allowed.parameters"></a><h4>Parameters</h4> <div class="informaltable"><table class="informaltable" width="100%" border="0"> <colgroup> <col width="150px" class="parameters_name"> <col class="parameters_description"> <col width="200px" class="parameters_annotations"> </colgroup> <tbody><tr> <td class="parameter_name"><p>permission</p></td> <td class="parameter_description"><p>a <a class="link" href="GPermission.html" title="GPermission"><span class="type">GPermission</span></a> instance</p></td> <td class="parameter_annotations"> </td> </tr></tbody> </table></div> </div> <div class="refsect3"> <a name="g-permission-get-allowed.returns"></a><h4>Returns</h4> <p> the value of the 'allowed' property</p> </div> <p class="since">Since: <a class="link" href="api-index-2-26.html#api-index-2.26">2.26</a></p> </div> <hr> <div class="refsect2"> <a name="g-permission-get-can-acquire"></a><h3>g_permission_get_can_acquire ()</h3> <pre class="programlisting"><span class="returnvalue">gboolean</span> g_permission_get_can_acquire (<em class="parameter"><code><a class="link" href="GPermission.html" title="GPermission"><span class="type">GPermission</span></a> *permission</code></em>);</pre> <p>Gets the value of the 'can-acquire' property. This property is <code class="literal">TRUE</code> if it is generally possible to acquire the permission by calling <a class="link" href="GPermission.html#g-permission-acquire" title="g_permission_acquire ()"><code class="function">g_permission_acquire()</code></a>.</p> <div class="refsect3"> <a name="g-permission-get-can-acquire.parameters"></a><h4>Parameters</h4> <div class="informaltable"><table class="informaltable" width="100%" border="0"> <colgroup> <col width="150px" class="parameters_name"> <col class="parameters_description"> <col width="200px" class="parameters_annotations"> </colgroup> <tbody><tr> <td class="parameter_name"><p>permission</p></td> <td class="parameter_description"><p>a <a class="link" href="GPermission.html" title="GPermission"><span class="type">GPermission</span></a> instance</p></td> <td class="parameter_annotations"> </td> </tr></tbody> </table></div> </div> <div class="refsect3"> <a name="g-permission-get-can-acquire.returns"></a><h4>Returns</h4> <p> the value of the 'can-acquire' property</p> </div> <p class="since">Since: <a class="link" href="api-index-2-26.html#api-index-2.26">2.26</a></p> </div> <hr> <div class="refsect2"> <a name="g-permission-get-can-release"></a><h3>g_permission_get_can_release ()</h3> <pre class="programlisting"><span class="returnvalue">gboolean</span> g_permission_get_can_release (<em class="parameter"><code><a class="link" href="GPermission.html" title="GPermission"><span class="type">GPermission</span></a> *permission</code></em>);</pre> <p>Gets the value of the 'can-release' property. This property is <code class="literal">TRUE</code> if it is generally possible to release the permission by calling <a class="link" href="GPermission.html#g-permission-release" title="g_permission_release ()"><code class="function">g_permission_release()</code></a>.</p> <div class="refsect3"> <a name="g-permission-get-can-release.parameters"></a><h4>Parameters</h4> <div class="informaltable"><table class="informaltable" width="100%" border="0"> <colgroup> <col width="150px" class="parameters_name"> <col class="parameters_description"> <col width="200px" class="parameters_annotations"> </colgroup> <tbody><tr> <td class="parameter_name"><p>permission</p></td> <td class="parameter_description"><p>a <a class="link" href="GPermission.html" title="GPermission"><span class="type">GPermission</span></a> instance</p></td> <td class="parameter_annotations"> </td> </tr></tbody> </table></div> </div> <div class="refsect3"> <a name="g-permission-get-can-release.returns"></a><h4>Returns</h4> <p> the value of the 'can-release' property</p> </div> <p class="since">Since: <a class="link" href="api-index-2-26.html#api-index-2.26">2.26</a></p> </div> <hr> <div class="refsect2"> <a name="g-permission-acquire"></a><h3>g_permission_acquire ()</h3> <pre class="programlisting"><span class="returnvalue">gboolean</span> g_permission_acquire (<em class="parameter"><code><a class="link" href="GPermission.html" title="GPermission"><span class="type">GPermission</span></a> *permission</code></em>, <em class="parameter"><code><a class="link" href="GCancellable.html" title="GCancellable"><span class="type">GCancellable</span></a> *cancellable</code></em>, <em class="parameter"><code><span class="type">GError</span> **error</code></em>);</pre> <p>Attempts to acquire the permission represented by <em class="parameter"><code>permission</code></em> .</p> <p>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.</p> <p>You should check with <a class="link" href="GPermission.html#g-permission-get-can-acquire" title="g_permission_get_can_acquire ()"><code class="function">g_permission_get_can_acquire()</code></a> before calling this function.</p> <p>If the permission is acquired then <code class="literal">TRUE</code> is returned. Otherwise, <code class="literal">FALSE</code> is returned and <em class="parameter"><code>error</code></em> is set appropriately.</p> <p>This call is blocking, likely for a very long time (in the case that user interaction is required). See <a class="link" href="GPermission.html#g-permission-acquire-async" title="g_permission_acquire_async ()"><code class="function">g_permission_acquire_async()</code></a> for the non-blocking version.</p> <div class="refsect3"> <a name="g-permission-acquire.parameters"></a><h4>Parameters</h4> <div class="informaltable"><table class="informaltable" width="100%" border="0"> <colgroup> <col width="150px" class="parameters_name"> <col class="parameters_description"> <col width="200px" class="parameters_annotations"> </colgroup> <tbody> <tr> <td class="parameter_name"><p>permission</p></td> <td class="parameter_description"><p>a <a class="link" href="GPermission.html" title="GPermission"><span class="type">GPermission</span></a> instance</p></td> <td class="parameter_annotations"> </td> </tr> <tr> <td class="parameter_name"><p>cancellable</p></td> <td class="parameter_description"><p>a <a class="link" href="GCancellable.html" title="GCancellable"><span class="type">GCancellable</span></a>, or <code class="literal">NULL</code>. </p></td> <td class="parameter_annotations"><span class="annotation">[<acronym title="NULL may be passed as the value in, out, in-out; or as a return value."><span class="acronym">nullable</span></acronym>]</span></td> </tr> <tr> <td class="parameter_name"><p>error</p></td> <td class="parameter_description"><p>a pointer to a <code class="literal">NULL</code> <span class="type">GError</span>, or <code class="literal">NULL</code></p></td> <td class="parameter_annotations"> </td> </tr> </tbody> </table></div> </div> <div class="refsect3"> <a name="g-permission-acquire.returns"></a><h4>Returns</h4> <p> <code class="literal">TRUE</code> if the permission was successfully acquired</p> </div> <p class="since">Since: <a class="link" href="api-index-2-26.html#api-index-2.26">2.26</a></p> </div> <hr> <div class="refsect2"> <a name="g-permission-acquire-async"></a><h3>g_permission_acquire_async ()</h3> <pre class="programlisting"><span class="returnvalue">void</span> g_permission_acquire_async (<em class="parameter"><code><a class="link" href="GPermission.html" title="GPermission"><span class="type">GPermission</span></a> *permission</code></em>, <em class="parameter"><code><a class="link" href="GCancellable.html" title="GCancellable"><span class="type">GCancellable</span></a> *cancellable</code></em>, <em class="parameter"><code><a class="link" href="GAsyncResult.html#GAsyncReadyCallback" title="GAsyncReadyCallback ()"><span class="type">GAsyncReadyCallback</span></a> callback</code></em>, <em class="parameter"><code><span class="type">gpointer</span> user_data</code></em>);</pre> <p>Attempts to acquire the permission represented by <em class="parameter"><code>permission</code></em> .</p> <p>This is the first half of the asynchronous version of <a class="link" href="GPermission.html#g-permission-acquire" title="g_permission_acquire ()"><code class="function">g_permission_acquire()</code></a>.</p> <div class="refsect3"> <a name="g-permission-acquire-async.parameters"></a><h4>Parameters</h4> <div class="informaltable"><table class="informaltable" width="100%" border="0"> <colgroup> <col width="150px" class="parameters_name"> <col class="parameters_description"> <col width="200px" class="parameters_annotations"> </colgroup> <tbody> <tr> <td class="parameter_name"><p>permission</p></td> <td class="parameter_description"><p>a <a class="link" href="GPermission.html" title="GPermission"><span class="type">GPermission</span></a> instance</p></td> <td class="parameter_annotations"> </td> </tr> <tr> <td class="parameter_name"><p>cancellable</p></td> <td class="parameter_description"><p>a <a class="link" href="GCancellable.html" title="GCancellable"><span class="type">GCancellable</span></a>, or <code class="literal">NULL</code>. </p></td> <td class="parameter_annotations"><span class="annotation">[<acronym title="NULL may be passed as the value in, out, in-out; or as a return value."><span class="acronym">nullable</span></acronym>]</span></td> </tr> <tr> <td class="parameter_name"><p>callback</p></td> <td class="parameter_description"><p>the <a class="link" href="GAsyncResult.html#GAsyncReadyCallback" title="GAsyncReadyCallback ()"><span class="type">GAsyncReadyCallback</span></a> to call when done</p></td> <td class="parameter_annotations"> </td> </tr> <tr> <td class="parameter_name"><p>user_data</p></td> <td class="parameter_description"><p>the user data to pass to <em class="parameter"><code>callback</code></em> </p></td> <td class="parameter_annotations"> </td> </tr> </tbody> </table></div> </div> <p class="since">Since: <a class="link" href="api-index-2-26.html#api-index-2.26">2.26</a></p> </div> <hr> <div class="refsect2"> <a name="g-permission-acquire-finish"></a><h3>g_permission_acquire_finish ()</h3> <pre class="programlisting"><span class="returnvalue">gboolean</span> g_permission_acquire_finish (<em class="parameter"><code><a class="link" href="GPermission.html" title="GPermission"><span class="type">GPermission</span></a> *permission</code></em>, <em class="parameter"><code><a class="link" href="GAsyncResult.html" title="GAsyncResult"><span class="type">GAsyncResult</span></a> *result</code></em>, <em class="parameter"><code><span class="type">GError</span> **error</code></em>);</pre> <p>Collects the result of attempting to acquire the permission represented by <em class="parameter"><code>permission</code></em> .</p> <p>This is the second half of the asynchronous version of <a class="link" href="GPermission.html#g-permission-acquire" title="g_permission_acquire ()"><code class="function">g_permission_acquire()</code></a>.</p> <div class="refsect3"> <a name="g-permission-acquire-finish.parameters"></a><h4>Parameters</h4> <div class="informaltable"><table class="informaltable" width="100%" border="0"> <colgroup> <col width="150px" class="parameters_name"> <col class="parameters_description"> <col width="200px" class="parameters_annotations"> </colgroup> <tbody> <tr> <td class="parameter_name"><p>permission</p></td> <td class="parameter_description"><p>a <a class="link" href="GPermission.html" title="GPermission"><span class="type">GPermission</span></a> instance</p></td> <td class="parameter_annotations"> </td> </tr> <tr> <td class="parameter_name"><p>result</p></td> <td class="parameter_description"><p>the <a class="link" href="GAsyncResult.html" title="GAsyncResult"><span class="type">GAsyncResult</span></a> given to the <a class="link" href="GAsyncResult.html#GAsyncReadyCallback" title="GAsyncReadyCallback ()"><span class="type">GAsyncReadyCallback</span></a></p></td> <td class="parameter_annotations"> </td> </tr> <tr> <td class="parameter_name"><p>error</p></td> <td class="parameter_description"><p>a pointer to a <code class="literal">NULL</code> <span class="type">GError</span>, or <code class="literal">NULL</code></p></td> <td class="parameter_annotations"> </td> </tr> </tbody> </table></div> </div> <div class="refsect3"> <a name="g-permission-acquire-finish.returns"></a><h4>Returns</h4> <p> <code class="literal">TRUE</code> if the permission was successfully acquired</p> </div> <p class="since">Since: <a class="link" href="api-index-2-26.html#api-index-2.26">2.26</a></p> </div> <hr> <div class="refsect2"> <a name="g-permission-release"></a><h3>g_permission_release ()</h3> <pre class="programlisting"><span class="returnvalue">gboolean</span> g_permission_release (<em class="parameter"><code><a class="link" href="GPermission.html" title="GPermission"><span class="type">GPermission</span></a> *permission</code></em>, <em class="parameter"><code><a class="link" href="GCancellable.html" title="GCancellable"><span class="type">GCancellable</span></a> *cancellable</code></em>, <em class="parameter"><code><span class="type">GError</span> **error</code></em>);</pre> <p>Attempts to release the permission represented by <em class="parameter"><code>permission</code></em> .</p> <p>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.</p> <p>You should check with <a class="link" href="GPermission.html#g-permission-get-can-release" title="g_permission_get_can_release ()"><code class="function">g_permission_get_can_release()</code></a> before calling this function.</p> <p>If the permission is released then <code class="literal">TRUE</code> is returned. Otherwise, <code class="literal">FALSE</code> is returned and <em class="parameter"><code>error</code></em> is set appropriately.</p> <p>This call is blocking, likely for a very long time (in the case that user interaction is required). See <a class="link" href="GPermission.html#g-permission-release-async" title="g_permission_release_async ()"><code class="function">g_permission_release_async()</code></a> for the non-blocking version.</p> <div class="refsect3"> <a name="g-permission-release.parameters"></a><h4>Parameters</h4> <div class="informaltable"><table class="informaltable" width="100%" border="0"> <colgroup> <col width="150px" class="parameters_name"> <col class="parameters_description"> <col width="200px" class="parameters_annotations"> </colgroup> <tbody> <tr> <td class="parameter_name"><p>permission</p></td> <td class="parameter_description"><p>a <a class="link" href="GPermission.html" title="GPermission"><span class="type">GPermission</span></a> instance</p></td> <td class="parameter_annotations"> </td> </tr> <tr> <td class="parameter_name"><p>cancellable</p></td> <td class="parameter_description"><p>a <a class="link" href="GCancellable.html" title="GCancellable"><span class="type">GCancellable</span></a>, or <code class="literal">NULL</code>. </p></td> <td class="parameter_annotations"><span class="annotation">[<acronym title="NULL may be passed as the value in, out, in-out; or as a return value."><span class="acronym">nullable</span></acronym>]</span></td> </tr> <tr> <td class="parameter_name"><p>error</p></td> <td class="parameter_description"><p>a pointer to a <code class="literal">NULL</code> <span class="type">GError</span>, or <code class="literal">NULL</code></p></td> <td class="parameter_annotations"> </td> </tr> </tbody> </table></div> </div> <div class="refsect3"> <a name="g-permission-release.returns"></a><h4>Returns</h4> <p> <code class="literal">TRUE</code> if the permission was successfully released</p> </div> <p class="since">Since: <a class="link" href="api-index-2-26.html#api-index-2.26">2.26</a></p> </div> <hr> <div class="refsect2"> <a name="g-permission-release-async"></a><h3>g_permission_release_async ()</h3> <pre class="programlisting"><span class="returnvalue">void</span> g_permission_release_async (<em class="parameter"><code><a class="link" href="GPermission.html" title="GPermission"><span class="type">GPermission</span></a> *permission</code></em>, <em class="parameter"><code><a class="link" href="GCancellable.html" title="GCancellable"><span class="type">GCancellable</span></a> *cancellable</code></em>, <em class="parameter"><code><a class="link" href="GAsyncResult.html#GAsyncReadyCallback" title="GAsyncReadyCallback ()"><span class="type">GAsyncReadyCallback</span></a> callback</code></em>, <em class="parameter"><code><span class="type">gpointer</span> user_data</code></em>);</pre> <p>Attempts to release the permission represented by <em class="parameter"><code>permission</code></em> .</p> <p>This is the first half of the asynchronous version of <a class="link" href="GPermission.html#g-permission-release" title="g_permission_release ()"><code class="function">g_permission_release()</code></a>.</p> <div class="refsect3"> <a name="g-permission-release-async.parameters"></a><h4>Parameters</h4> <div class="informaltable"><table class="informaltable" width="100%" border="0"> <colgroup> <col width="150px" class="parameters_name"> <col class="parameters_description"> <col width="200px" class="parameters_annotations"> </colgroup> <tbody> <tr> <td class="parameter_name"><p>permission</p></td> <td class="parameter_description"><p>a <a class="link" href="GPermission.html" title="GPermission"><span class="type">GPermission</span></a> instance</p></td> <td class="parameter_annotations"> </td> </tr> <tr> <td class="parameter_name"><p>cancellable</p></td> <td class="parameter_description"><p>a <a class="link" href="GCancellable.html" title="GCancellable"><span class="type">GCancellable</span></a>, or <code class="literal">NULL</code>. </p></td> <td class="parameter_annotations"><span class="annotation">[<acronym title="NULL may be passed as the value in, out, in-out; or as a return value."><span class="acronym">nullable</span></acronym>]</span></td> </tr> <tr> <td class="parameter_name"><p>callback</p></td> <td class="parameter_description"><p>the <a class="link" href="GAsyncResult.html#GAsyncReadyCallback" title="GAsyncReadyCallback ()"><span class="type">GAsyncReadyCallback</span></a> to call when done</p></td> <td class="parameter_annotations"> </td> </tr> <tr> <td class="parameter_name"><p>user_data</p></td> <td class="parameter_description"><p>the user data to pass to <em class="parameter"><code>callback</code></em> </p></td> <td class="parameter_annotations"> </td> </tr> </tbody> </table></div> </div> <p class="since">Since: <a class="link" href="api-index-2-26.html#api-index-2.26">2.26</a></p> </div> <hr> <div class="refsect2"> <a name="g-permission-release-finish"></a><h3>g_permission_release_finish ()</h3> <pre class="programlisting"><span class="returnvalue">gboolean</span> g_permission_release_finish (<em class="parameter"><code><a class="link" href="GPermission.html" title="GPermission"><span class="type">GPermission</span></a> *permission</code></em>, <em class="parameter"><code><a class="link" href="GAsyncResult.html" title="GAsyncResult"><span class="type">GAsyncResult</span></a> *result</code></em>, <em class="parameter"><code><span class="type">GError</span> **error</code></em>);</pre> <p>Collects the result of attempting to release the permission represented by <em class="parameter"><code>permission</code></em> .</p> <p>This is the second half of the asynchronous version of <a class="link" href="GPermission.html#g-permission-release" title="g_permission_release ()"><code class="function">g_permission_release()</code></a>.</p> <div class="refsect3"> <a name="g-permission-release-finish.parameters"></a><h4>Parameters</h4> <div class="informaltable"><table class="informaltable" width="100%" border="0"> <colgroup> <col width="150px" class="parameters_name"> <col class="parameters_description"> <col width="200px" class="parameters_annotations"> </colgroup> <tbody> <tr> <td class="parameter_name"><p>permission</p></td> <td class="parameter_description"><p>a <a class="link" href="GPermission.html" title="GPermission"><span class="type">GPermission</span></a> instance</p></td> <td class="parameter_annotations"> </td> </tr> <tr> <td class="parameter_name"><p>result</p></td> <td class="parameter_description"><p>the <a class="link" href="GAsyncResult.html" title="GAsyncResult"><span class="type">GAsyncResult</span></a> given to the <a class="link" href="GAsyncResult.html#GAsyncReadyCallback" title="GAsyncReadyCallback ()"><span class="type">GAsyncReadyCallback</span></a></p></td> <td class="parameter_annotations"> </td> </tr> <tr> <td class="parameter_name"><p>error</p></td> <td class="parameter_description"><p>a pointer to a <code class="literal">NULL</code> <span class="type">GError</span>, or <code class="literal">NULL</code></p></td> <td class="parameter_annotations"> </td> </tr> </tbody> </table></div> </div> <div class="refsect3"> <a name="g-permission-release-finish.returns"></a><h4>Returns</h4> <p> <code class="literal">TRUE</code> if the permission was successfully released</p> </div> <p class="since">Since: <a class="link" href="api-index-2-26.html#api-index-2.26">2.26</a></p> </div> <hr> <div class="refsect2"> <a name="g-permission-impl-update"></a><h3>g_permission_impl_update ()</h3> <pre class="programlisting"><span class="returnvalue">void</span> g_permission_impl_update (<em class="parameter"><code><a class="link" href="GPermission.html" title="GPermission"><span class="type">GPermission</span></a> *permission</code></em>, <em class="parameter"><code><span class="type">gboolean</span> allowed</code></em>, <em class="parameter"><code><span class="type">gboolean</span> can_acquire</code></em>, <em class="parameter"><code><span class="type">gboolean</span> can_release</code></em>);</pre> <p>This function is called by the <a class="link" href="GPermission.html" title="GPermission"><span class="type">GPermission</span></a> implementation to update the properties of the permission. You should never call this function except from a <a class="link" href="GPermission.html" title="GPermission"><span class="type">GPermission</span></a> implementation.</p> <p>GObject notify signals are generated, as appropriate.</p> <div class="refsect3"> <a name="g-permission-impl-update.parameters"></a><h4>Parameters</h4> <div class="informaltable"><table class="informaltable" width="100%" border="0"> <colgroup> <col width="150px" class="parameters_name"> <col class="parameters_description"> <col width="200px" class="parameters_annotations"> </colgroup> <tbody> <tr> <td class="parameter_name"><p>permission</p></td> <td class="parameter_description"><p>a <a class="link" href="GPermission.html" title="GPermission"><span class="type">GPermission</span></a> instance</p></td> <td class="parameter_annotations"> </td> </tr> <tr> <td class="parameter_name"><p>allowed</p></td> <td class="parameter_description"><p>the new value for the 'allowed' property</p></td> <td class="parameter_annotations"> </td> </tr> <tr> <td class="parameter_name"><p>can_acquire</p></td> <td class="parameter_description"><p>the new value for the 'can-acquire' property</p></td> <td class="parameter_annotations"> </td> </tr> <tr> <td class="parameter_name"><p>can_release</p></td> <td class="parameter_description"><p>the new value for the 'can-release' property</p></td> <td class="parameter_annotations"> </td> </tr> </tbody> </table></div> </div> <p class="since">Since: <a class="link" href="api-index-2-26.html#api-index-2.26">2.26</a></p> </div> </div> <div class="refsect1"> <a name="GPermission.other_details"></a><h2>Types and Values</h2> <div class="refsect2"> <a name="GPermission-struct"></a><h3>GPermission</h3> <pre class="programlisting">typedef struct _GPermission GPermission;</pre> <p><a class="link" href="GPermission.html" title="GPermission"><span class="type">GPermission</span></a> is an opaque data structure and can only be accessed using the following functions.</p> </div> </div> <div class="refsect1"> <a name="GPermission.property-details"></a><h2>Property Details</h2> <div class="refsect2"> <a name="GPermission--allowed"></a><h3>The <code class="literal">“allowed”</code> property</h3> <pre class="programlisting"> “allowed” <span class="type">gboolean</span></pre> <p><code class="literal">TRUE</code> if the caller currently has permission to perform the action that <em class="parameter"><code>permission</code></em> represents the permission to perform.</p> <p>Owner: GPermission</p> <p>Flags: Read</p> <p>Default value: FALSE</p> </div> <hr> <div class="refsect2"> <a name="GPermission--can-acquire"></a><h3>The <code class="literal">“can-acquire”</code> property</h3> <pre class="programlisting"> “can-acquire” <span class="type">gboolean</span></pre> <p><code class="literal">TRUE</code> if it is generally possible to acquire the permission by calling <a class="link" href="GPermission.html#g-permission-acquire" title="g_permission_acquire ()"><code class="function">g_permission_acquire()</code></a>.</p> <p>Owner: GPermission</p> <p>Flags: Read</p> <p>Default value: FALSE</p> </div> <hr> <div class="refsect2"> <a name="GPermission--can-release"></a><h3>The <code class="literal">“can-release”</code> property</h3> <pre class="programlisting"> “can-release” <span class="type">gboolean</span></pre> <p><code class="literal">TRUE</code> if it is generally possible to release the permission by calling <a class="link" href="GPermission.html#g-permission-release" title="g_permission_release ()"><code class="function">g_permission_release()</code></a>.</p> <p>Owner: GPermission</p> <p>Flags: Read</p> <p>Default value: FALSE</p> </div> </div> </div> <div class="footer"> <hr>Generated by GTK-Doc V1.32</div> </body> </html>