Current File : //proc/self/root/kunden/usr/share/gtk-doc/html/polkit-1/PolkitPermission.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>PolkitPermission: polkit Reference Manual</title>
<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot">
<link rel="home" href="index.html" title="polkit Reference Manual">
<link rel="up" href="ref-api.html" title="Part III. Library API Reference">
<link rel="prev" href="PolkitTemporaryAuthorization.html" title="PolkitTemporaryAuthorization">
<link rel="next" href="subjects.html" title="Subjects">
<meta name="generator" content="GTK-Doc V1.33.1 (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="#PolkitPermission.description" class="shortcut">Description</a></span><span id="nav_hierarchy"> <span class="dim">|</span>
<a href="#PolkitPermission.object-hierarchy" class="shortcut">Object Hierarchy</a></span><span id="nav_interfaces"> <span class="dim">|</span>
<a href="#PolkitPermission.implemented-interfaces" class="shortcut">Implemented Interfaces</a></span><span id="nav_properties"> <span class="dim">|</span>
<a href="#PolkitPermission.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="ref-api.html"><img src="up.png" width="16" height="16" border="0" alt="Up"></a></td>
<td><a accesskey="p" href="PolkitTemporaryAuthorization.html"><img src="left.png" width="16" height="16" border="0" alt="Prev"></a></td>
<td><a accesskey="n" href="subjects.html"><img src="right.png" width="16" height="16" border="0" alt="Next"></a></td>
</tr></table>
<div class="refentry">
<a name="PolkitPermission"></a><div class="titlepage"></div>
<div class="refnamediv"><table width="100%"><tr>
<td valign="top">
<h2><span class="refentrytitle"><a name="PolkitPermission.top_of_page"></a>PolkitPermission</span></h2>
<p>PolkitPermission — PolicyKit <span class="type">GPermission</span> implementation</p>
</td>
<td class="gallery_image" valign="top" align="right"></td>
</tr></table></div>
<div class="refsect1">
<a name="PolkitPermission.stability-level"></a><h2>Stability Level</h2>
<acronym title="The intention of a Stable interface is to enable arbitrary third parties to
develop applications to these interfaces, release them, and have confidence that
they will run on all minor releases of the product (after the one in which the
interface was introduced, and within the same major release). Even at a major
release, incompatible changes are expected to be rare, and to have strong
justifications.
"><span class="acronym">Stable</span></acronym>, unless otherwise indicated
</div>
<div class="refsect1">
<a name="PolkitPermission.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">void</span>
</td>
<td class="function_name">
<a class="link" href="PolkitPermission.html#polkit-permission-new" title="polkit_permission_new ()">polkit_permission_new</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">GPermission</span> *
</td>
<td class="function_name">
<a class="link" href="PolkitPermission.html#polkit-permission-new-finish" title="polkit_permission_new_finish ()">polkit_permission_new_finish</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">GPermission</span> *
</td>
<td class="function_name">
<a class="link" href="PolkitPermission.html#polkit-permission-new-sync" title="polkit_permission_new_sync ()">polkit_permission_new_sync</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">const <span class="returnvalue">gchar</span> *
</td>
<td class="function_name">
<a class="link" href="PolkitPermission.html#polkit-permission-get-action-id" title="polkit_permission_get_action_id ()">polkit_permission_get_action_id</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a class="link" href="PolkitSubject.html" title="PolkitSubject"><span class="returnvalue">PolkitSubject</span></a> *
</td>
<td class="function_name">
<a class="link" href="PolkitPermission.html#polkit-permission-get-subject" title="polkit_permission_get_subject ()">polkit_permission_get_subject</a> <span class="c_punctuation">()</span>
</td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect1">
<a name="PolkitPermission.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">char</span> *</td>
<td class="property_name"><a class="link" href="PolkitPermission.html#PolkitPermission--action-id" title="The “action-id” property">action-id</a></td>
<td class="property_flags">Read / Write / Construct Only</td>
</tr>
<tr>
<td class="property_type">
<a class="link" href="PolkitSubject.html" title="PolkitSubject"><span class="type">PolkitSubject</span></a> *</td>
<td class="property_name"><a class="link" href="PolkitPermission.html#PolkitPermission--subject" title="The “subject” property">subject</a></td>
<td class="property_flags">Read / Write / Construct Only</td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect1">
<a name="PolkitPermission.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="PolkitPermission.html#PolkitPermission-struct" title="PolkitPermission">PolkitPermission</a></td>
</tr></tbody>
</table></div>
</div>
<div class="refsect1">
<a name="PolkitPermission.object-hierarchy"></a><h2>Object Hierarchy</h2>
<pre class="screen"> GObject
<span class="lineart">╰──</span> GPermission
<span class="lineart">╰──</span> PolkitPermission
</pre>
</div>
<div class="refsect1">
<a name="PolkitPermission.implemented-interfaces"></a><h2>Implemented Interfaces</h2>
<p>
PolkitPermission implements
GInitable and GAsyncInitable.</p>
</div>
<div class="refsect1">
<a name="PolkitPermission.description"></a><h2>Description</h2>
<p><a class="link" href="PolkitPermission.html" title="PolkitPermission"><span class="type">PolkitPermission</span></a> is a <span class="type">GPermission</span> implementation. It can be used
with e.g. <span class="type">GtkLockButton</span>. See the <span class="type">GPermission</span> documentation for
more information.</p>
</div>
<div class="refsect1">
<a name="PolkitPermission.functions_details"></a><h2>Functions</h2>
<div class="refsect2">
<a name="polkit-permission-new"></a><h3>polkit_permission_new ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
polkit_permission_new (<em class="parameter"><code>const <span class="type">gchar</span> *action_id</code></em>,
<em class="parameter"><code><a class="link" href="PolkitSubject.html" title="PolkitSubject"><span class="type">PolkitSubject</span></a> *subject</code></em>,
<em class="parameter"><code><span class="type">GCancellable</span> *cancellable</code></em>,
<em class="parameter"><code><span class="type">GAsyncReadyCallback</span> callback</code></em>,
<em class="parameter"><code><span class="type">gpointer</span> user_data</code></em>);</pre>
<p>Creates a <span class="type">GPermission</span> instance for the PolicyKit action
<em class="parameter"><code>action_id</code></em>
.</p>
<p>When the operation is finished, <em class="parameter"><code>callback</code></em>
will be invoked. You can
then call <a class="link" href="PolkitPermission.html#polkit-permission-new-finish" title="polkit_permission_new_finish ()"><code class="function">polkit_permission_new_finish()</code></a> to get the result of the
operation.</p>
<p>This is a asynchronous failable constructor. See
<a class="link" href="PolkitPermission.html#polkit-permission-new-sync" title="polkit_permission_new_sync ()"><code class="function">polkit_permission_new_sync()</code></a> for the synchronous version.</p>
<div class="refsect3">
<a name="polkit-permission-new.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>action_id</p></td>
<td class="parameter_description"><p>The PolicyKit action identifier.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>subject</p></td>
<td class="parameter_description"><p>A <a class="link" href="PolkitSubject.html" title="PolkitSubject"><span class="type">PolkitSubject</span></a> or <code class="literal">NULL</code> for the current process. </p></td>
<td class="parameter_annotations"><span class="annotation">[<acronym title="NULL is OK, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span></td>
</tr>
<tr>
<td class="parameter_name"><p>cancellable</p></td>
<td class="parameter_description"><p>A <span class="type">GCancellable</span> or <code class="literal">NULL</code>. </p></td>
<td class="parameter_annotations"><span class="annotation">[<acronym title="NULL is OK, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span></td>
</tr>
<tr>
<td class="parameter_name"><p>callback</p></td>
<td class="parameter_description"><p>A <span class="type">GAsyncReadyCallback</span> to call when the request is satisfied.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>user_data</p></td>
<td class="parameter_description"><p>The data to pass to <em class="parameter"><code>callback</code></em>
.</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
</div>
<hr>
<div class="refsect2">
<a name="polkit-permission-new-finish"></a><h3>polkit_permission_new_finish ()</h3>
<pre class="programlisting"><span class="returnvalue">GPermission</span> *
polkit_permission_new_finish (<em class="parameter"><code><span class="type">GAsyncResult</span> *res</code></em>,
<em class="parameter"><code><span class="type">GError</span> **error</code></em>);</pre>
<p>Finishes an operation started with <a class="link" href="PolkitPermission.html#polkit-permission-new" title="polkit_permission_new ()"><code class="function">polkit_permission_new()</code></a>.</p>
<div class="refsect3">
<a name="polkit-permission-new-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>res</p></td>
<td class="parameter_description"><p>A <span class="type">GAsyncResult</span> obtained from the <span class="type">GAsyncReadyCallback</span> passed to <a class="link" href="PolkitPermission.html#polkit-permission-new" title="polkit_permission_new ()"><code class="function">polkit_permission_new()</code></a>.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>error</p></td>
<td class="parameter_description"><p>Return location for error or <code class="literal">NULL</code>. </p></td>
<td class="parameter_annotations"><span class="annotation">[<acronym title="NULL is OK, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span></td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="polkit-permission-new-finish.returns"></a><h4>Returns</h4>
<p> A <span class="type">GPermission</span> or <code class="literal">NULL</code> if <em class="parameter"><code>error</code></em>
is set.</p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="polkit-permission-new-sync"></a><h3>polkit_permission_new_sync ()</h3>
<pre class="programlisting"><span class="returnvalue">GPermission</span> *
polkit_permission_new_sync (<em class="parameter"><code>const <span class="type">gchar</span> *action_id</code></em>,
<em class="parameter"><code><a class="link" href="PolkitSubject.html" title="PolkitSubject"><span class="type">PolkitSubject</span></a> *subject</code></em>,
<em class="parameter"><code><span class="type">GCancellable</span> *cancellable</code></em>,
<em class="parameter"><code><span class="type">GError</span> **error</code></em>);</pre>
<p>Creates a <span class="type">GPermission</span> instance for the PolicyKit action
<em class="parameter"><code>action_id</code></em>
.</p>
<p>This is a synchronous failable constructor. See
<a class="link" href="PolkitPermission.html#polkit-permission-new" title="polkit_permission_new ()"><code class="function">polkit_permission_new()</code></a> for the asynchronous version.</p>
<div class="refsect3">
<a name="polkit-permission-new-sync.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>action_id</p></td>
<td class="parameter_description"><p>The PolicyKit action identifier.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>subject</p></td>
<td class="parameter_description"><p>A <a class="link" href="PolkitSubject.html" title="PolkitSubject"><span class="type">PolkitSubject</span></a> or <code class="literal">NULL</code> for the current process. </p></td>
<td class="parameter_annotations"><span class="annotation">[<acronym title="NULL is OK, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span></td>
</tr>
<tr>
<td class="parameter_name"><p>cancellable</p></td>
<td class="parameter_description"><p>A <span class="type">GCancellable</span> or <code class="literal">NULL</code>. </p></td>
<td class="parameter_annotations"><span class="annotation">[<acronym title="NULL is OK, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span></td>
</tr>
<tr>
<td class="parameter_name"><p>error</p></td>
<td class="parameter_description"><p>Return location for error or <code class="literal">NULL</code>. </p></td>
<td class="parameter_annotations"><span class="annotation">[<acronym title="NULL is OK, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span></td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="polkit-permission-new-sync.returns"></a><h4>Returns</h4>
<p> A <span class="type">GPermission</span> or <code class="literal">NULL</code> if <em class="parameter"><code>error</code></em>
is set.</p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="polkit-permission-get-action-id"></a><h3>polkit_permission_get_action_id ()</h3>
<pre class="programlisting">const <span class="returnvalue">gchar</span> *
polkit_permission_get_action_id (<em class="parameter"><code><a class="link" href="PolkitPermission.html" title="PolkitPermission"><span class="type">PolkitPermission</span></a> *permission</code></em>);</pre>
<p>Gets the PolicyKit action identifier used for <em class="parameter"><code>permission</code></em>
.</p>
<div class="refsect3">
<a name="polkit-permission-get-action-id.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="PolkitPermission.html" title="PolkitPermission"><span class="type">PolkitPermission</span></a>.</p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="polkit-permission-get-action-id.returns"></a><h4>Returns</h4>
<p> A string owned by <em class="parameter"><code>permission</code></em>
. Do not free.</p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="polkit-permission-get-subject"></a><h3>polkit_permission_get_subject ()</h3>
<pre class="programlisting"><a class="link" href="PolkitSubject.html" title="PolkitSubject"><span class="returnvalue">PolkitSubject</span></a> *
polkit_permission_get_subject (<em class="parameter"><code><a class="link" href="PolkitPermission.html" title="PolkitPermission"><span class="type">PolkitPermission</span></a> *permission</code></em>);</pre>
<p>Gets the subject used for <em class="parameter"><code>permission</code></em>
.</p>
<div class="refsect3">
<a name="polkit-permission-get-subject.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="PolkitPermission.html" title="PolkitPermission"><span class="type">PolkitPermission</span></a>.</p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="polkit-permission-get-subject.returns"></a><h4>Returns</h4>
<p>An object owned by <em class="parameter"><code>permission</code></em>
. Do not free. </p>
<p><span class="annotation">[<acronym title="The data is owned by the callee, which is responsible of freeing it."><span class="acronym">transfer none</span></acronym>]</span></p>
</div>
</div>
</div>
<div class="refsect1">
<a name="PolkitPermission.other_details"></a><h2>Types and Values</h2>
<div class="refsect2">
<a name="PolkitPermission-struct"></a><h3>PolkitPermission</h3>
<pre class="programlisting">typedef struct _PolkitPermission PolkitPermission;</pre>
<p>The <a class="link" href="PolkitPermission.html" title="PolkitPermission"><span class="type">PolkitPermission</span></a> struct should not be accessed directly.</p>
</div>
</div>
<div class="refsect1">
<a name="PolkitPermission.property-details"></a><h2>Property Details</h2>
<div class="refsect2">
<a name="PolkitPermission--action-id"></a><h3>The <code class="literal">“action-id”</code> property</h3>
<pre class="programlisting"> “action-id” <span class="type">char</span> *</pre>
<p>The action identifier to use for the permission.</p>
<p>Owner: PolkitPermission</p>
<p>Flags: Read / Write / Construct Only</p>
<p>Default value: NULL</p>
</div>
<hr>
<div class="refsect2">
<a name="PolkitPermission--subject"></a><h3>The <code class="literal">“subject”</code> property</h3>
<pre class="programlisting"> “subject” <a class="link" href="PolkitSubject.html" title="PolkitSubject"><span class="type">PolkitSubject</span></a> *</pre>
<p>The <a class="link" href="PolkitSubject.html" title="PolkitSubject"><span class="type">PolkitSubject</span></a> to use for the permission. If not set during
construction, it will be set to match the current process.</p>
<p>Owner: PolkitPermission</p>
<p>Flags: Read / Write / Construct Only</p>
</div>
</div>
</div>
<div class="footer">
<hr>Generated by GTK-Doc V1.33.1</div>
</body>
</html>