Current File : //proc/self/root/kunden/usr/share/gtk-doc/html/polkit-1/PolkitUnixSession.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>PolkitUnixSession: 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="subjects.html" title="Subjects">
<link rel="prev" href="PolkitUnixProcess.html" title="PolkitUnixProcess">
<link rel="next" href="PolkitSystemBusName.html" title="PolkitSystemBusName">
<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="#PolkitUnixSession.description" class="shortcut">Description</a></span><span id="nav_hierarchy"> <span class="dim">|</span>
<a href="#PolkitUnixSession.object-hierarchy" class="shortcut">Object Hierarchy</a></span><span id="nav_interfaces"> <span class="dim">|</span>
<a href="#PolkitUnixSession.implemented-interfaces" class="shortcut">Implemented Interfaces</a></span><span id="nav_properties"> <span class="dim">|</span>
<a href="#PolkitUnixSession.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="subjects.html"><img src="up.png" width="16" height="16" border="0" alt="Up"></a></td>
<td><a accesskey="p" href="PolkitUnixProcess.html"><img src="left.png" width="16" height="16" border="0" alt="Prev"></a></td>
<td><a accesskey="n" href="PolkitSystemBusName.html"><img src="right.png" width="16" height="16" border="0" alt="Next"></a></td>
</tr></table>
<div class="refentry">
<a name="PolkitUnixSession"></a><div class="titlepage"></div>
<div class="refnamediv"><table width="100%"><tr>
<td valign="top">
<h2><span class="refentrytitle"><a name="PolkitUnixSession.top_of_page"></a>PolkitUnixSession</span></h2>
<p>PolkitUnixSession — Unix sessions</p>
</td>
<td class="gallery_image" valign="top" align="right"></td>
</tr></table></div>
<div class="refsect1">
<a name="PolkitUnixSession.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">
<a class="link" href="PolkitSubject.html" title="PolkitSubject"><span class="returnvalue">PolkitSubject</span></a> *
</td>
<td class="function_name">
<a class="link" href="PolkitUnixSession.html#polkit-unix-session-new" title="polkit_unix_session_new ()">polkit_unix_session_new</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="PolkitUnixSession.html#polkit-unix-session-new-for-process" title="polkit_unix_session_new_for_process ()">polkit_unix_session_new_for_process</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="PolkitUnixSession.html#polkit-unix-session-new-for-process-finish" title="polkit_unix_session_new_for_process_finish ()">polkit_unix_session_new_for_process_finish</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="PolkitUnixSession.html#polkit-unix-session-new-for-process-sync" title="polkit_unix_session_new_for_process_sync ()">polkit_unix_session_new_for_process_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="PolkitUnixSession.html#polkit-unix-session-get-session-id" title="polkit_unix_session_get_session_id ()">polkit_unix_session_get_session_id</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="PolkitUnixSession.html#polkit-unix-session-set-session-id" title="polkit_unix_session_set_session_id ()">polkit_unix_session_set_session_id</a> <span class="c_punctuation">()</span>
</td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect1">
<a name="PolkitUnixSession.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">int</span></td>
<td class="property_name"><a class="link" href="PolkitUnixSession.html#PolkitUnixSession--pid" title="The “pid” property">pid</a></td>
<td class="property_flags">Write / Construct Only</td>
</tr>
<tr>
<td class="property_type">
<span class="type">char</span> *</td>
<td class="property_name"><a class="link" href="PolkitUnixSession.html#PolkitUnixSession--session-id" title="The “session-id” property">session-id</a></td>
<td class="property_flags">Read / Write / Construct</td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect1">
<a name="PolkitUnixSession.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="PolkitUnixSession.html#PolkitUnixSession-struct" title="PolkitUnixSession">PolkitUnixSession</a></td>
</tr></tbody>
</table></div>
</div>
<div class="refsect1">
<a name="PolkitUnixSession.object-hierarchy"></a><h2>Object Hierarchy</h2>
<pre class="screen"> GObject
<span class="lineart">╰──</span> PolkitUnixSession
</pre>
</div>
<div class="refsect1">
<a name="PolkitUnixSession.implemented-interfaces"></a><h2>Implemented Interfaces</h2>
<p>
PolkitUnixSession implements
<a class="link" href="PolkitSubject.html" title="PolkitSubject">PolkitSubject</a>, GInitable and GAsyncInitable.</p>
</div>
<div class="refsect1">
<a name="PolkitUnixSession.description"></a><h2>Description</h2>
<p>An object that represents an user session.</p>
<p>The session id is an opaque string obtained from ConsoleKit.</p>
</div>
<div class="refsect1">
<a name="PolkitUnixSession.functions_details"></a><h2>Functions</h2>
<div class="refsect2">
<a name="polkit-unix-session-new"></a><h3>polkit_unix_session_new ()</h3>
<pre class="programlisting"><a class="link" href="PolkitSubject.html" title="PolkitSubject"><span class="returnvalue">PolkitSubject</span></a> *
polkit_unix_session_new (<em class="parameter"><code>const <span class="type">gchar</span> *session_id</code></em>);</pre>
<p>Creates a new <a class="link" href="PolkitUnixSession.html" title="PolkitUnixSession"><span class="type">PolkitUnixSession</span></a> for <em class="parameter"><code>session_id</code></em>
.</p>
<div class="refsect3">
<a name="polkit-unix-session-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>session_id</p></td>
<td class="parameter_description"><p>The session id.</p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="polkit-unix-session-new.returns"></a><h4>Returns</h4>
<p>A <a class="link" href="PolkitUnixSession.html" title="PolkitUnixSession"><span class="type">PolkitUnixSession</span></a>. Free with <code class="function">g_object_unref()</code>. </p>
<p><span class="annotation">[<acronym title="The caller owns the data, and is responsible for free it."><span class="acronym">transfer full</span></acronym>]</span></p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="polkit-unix-session-new-for-process"></a><h3>polkit_unix_session_new_for_process ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
polkit_unix_session_new_for_process (<em class="parameter"><code><span class="type">gint</span> pid</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>Asynchronously creates a new <a class="link" href="PolkitUnixSession.html" title="PolkitUnixSession"><span class="type">PolkitUnixSession</span></a> object for the
process with process id <em class="parameter"><code>pid</code></em>
.</p>
<p>When the operation is finished, <em class="parameter"><code>callback</code></em>
will be invoked in the</p>
<GTKDOCLINK HREF="g-main-context-push-thread-default">thread-default
main loop</GTKDOCLINK> of the thread you are calling this method
<p>from. You can then call
<a class="link" href="PolkitUnixSession.html#polkit-unix-session-new-for-process-finish" title="polkit_unix_session_new_for_process_finish ()"><code class="function">polkit_unix_session_new_for_process_finish()</code></a> to get the result of
the operation.</p>
<p>This method constructs the object asynchronously, for the synchronous and blocking version
use <a class="link" href="PolkitUnixSession.html#polkit-unix-session-new-for-process-sync" title="polkit_unix_session_new_for_process_sync ()"><code class="function">polkit_unix_session_new_for_process_sync()</code></a>.</p>
<div class="refsect3">
<a name="polkit-unix-session-new-for-process.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>pid</p></td>
<td class="parameter_description"><p>The process id of the process to get the session for.</p></td>
<td class="parameter_annotations"> </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-unix-session-new-for-process-finish"></a><h3>polkit_unix_session_new_for_process_finish ()</h3>
<pre class="programlisting"><a class="link" href="PolkitSubject.html" title="PolkitSubject"><span class="returnvalue">PolkitSubject</span></a> *
polkit_unix_session_new_for_process_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 constructing a <a class="link" href="PolkitSubject.html" title="PolkitSubject"><span class="type">PolkitSubject</span></a> for a process id.</p>
<div class="refsect3">
<a name="polkit-unix-session-new-for-process-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="PolkitUnixSession.html#polkit-unix-session-new-for-process" title="polkit_unix_session_new_for_process ()"><code class="function">polkit_unix_session_new_for_process()</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. </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-unix-session-new-for-process-finish.returns"></a><h4>Returns</h4>
<p>A <a class="link" href="PolkitUnixSession.html" title="PolkitUnixSession"><span class="type">PolkitUnixSession</span></a> for the <em class="parameter"><code>pid</code></em>
passed to
<a class="link" href="PolkitUnixSession.html#polkit-unix-session-new-for-process" title="polkit_unix_session_new_for_process ()"><code class="function">polkit_unix_session_new_for_process()</code></a> or <code class="literal">NULL</code> if <em class="parameter"><code>error</code></em>
is
set. Free with <code class="function">g_object_unref()</code>. </p>
<p><span class="annotation">[<acronym title="The caller owns the data, and is responsible for free it."><span class="acronym">transfer full</span></acronym>][<acronym title="NULL is OK, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span></p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="polkit-unix-session-new-for-process-sync"></a><h3>polkit_unix_session_new_for_process_sync ()</h3>
<pre class="programlisting"><a class="link" href="PolkitSubject.html" title="PolkitSubject"><span class="returnvalue">PolkitSubject</span></a> *
polkit_unix_session_new_for_process_sync
(<em class="parameter"><code><span class="type">gint</span> pid</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 new <a class="link" href="PolkitUnixSession.html" title="PolkitUnixSession"><span class="type">PolkitUnixSession</span></a> for the process with process id <em class="parameter"><code>pid</code></em>
.</p>
<p>This is a synchronous call - the calling thread is blocked until a
reply is received. For the asynchronous version, see
<a class="link" href="PolkitUnixSession.html#polkit-unix-session-new-for-process" title="polkit_unix_session_new_for_process ()"><code class="function">polkit_unix_session_new_for_process()</code></a>.</p>
<div class="refsect3">
<a name="polkit-unix-session-new-for-process-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>pid</p></td>
<td class="parameter_description"><p>The process id of the process to get the session for.</p></td>
<td class="parameter_annotations"> </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. </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-unix-session-new-for-process-sync.returns"></a><h4>Returns</h4>
<p>A <a class="link" href="PolkitUnixSession.html" title="PolkitUnixSession"><span class="type">PolkitUnixSession</span></a> for
<em class="parameter"><code>pid</code></em>
or <code class="literal">NULL</code> if <em class="parameter"><code>error</code></em>
is set. Free with <code class="function">g_object_unref()</code>. </p>
<p><span class="annotation">[<acronym title="NULL is OK, both for passing and for returning."><span class="acronym">allow-none</span></acronym>][<acronym title="The caller owns the data, and is responsible for free it."><span class="acronym">transfer full</span></acronym>]</span></p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="polkit-unix-session-get-session-id"></a><h3>polkit_unix_session_get_session_id ()</h3>
<pre class="programlisting">const <span class="returnvalue">gchar</span> *
polkit_unix_session_get_session_id (<em class="parameter"><code><a class="link" href="PolkitUnixSession.html" title="PolkitUnixSession"><span class="type">PolkitUnixSession</span></a> *session</code></em>);</pre>
<p>Gets the session id for <em class="parameter"><code>session</code></em>
.</p>
<div class="refsect3">
<a name="polkit-unix-session-get-session-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>session</p></td>
<td class="parameter_description"><p>A <a class="link" href="PolkitUnixSession.html" title="PolkitUnixSession"><span class="type">PolkitUnixSession</span></a>.</p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="polkit-unix-session-get-session-id.returns"></a><h4>Returns</h4>
<p> The session id for <em class="parameter"><code>session</code></em>
. Do not free this string, it
is owned by <em class="parameter"><code>session</code></em>
.</p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="polkit-unix-session-set-session-id"></a><h3>polkit_unix_session_set_session_id ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
polkit_unix_session_set_session_id (<em class="parameter"><code><a class="link" href="PolkitUnixSession.html" title="PolkitUnixSession"><span class="type">PolkitUnixSession</span></a> *session</code></em>,
<em class="parameter"><code>const <span class="type">gchar</span> *session_id</code></em>);</pre>
<p>Sets the session id for <em class="parameter"><code>session</code></em>
to <em class="parameter"><code>session_id</code></em>
.</p>
<div class="refsect3">
<a name="polkit-unix-session-set-session-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>session</p></td>
<td class="parameter_description"><p>A <a class="link" href="PolkitUnixSession.html" title="PolkitUnixSession"><span class="type">PolkitUnixSession</span></a>.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>session_id</p></td>
<td class="parameter_description"><p>The session id.</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
</div>
</div>
<div class="refsect1">
<a name="PolkitUnixSession.other_details"></a><h2>Types and Values</h2>
<div class="refsect2">
<a name="PolkitUnixSession-struct"></a><h3>PolkitUnixSession</h3>
<pre class="programlisting">typedef struct _PolkitUnixSession PolkitUnixSession;</pre>
<p>The <a class="link" href="PolkitUnixSession.html" title="PolkitUnixSession"><span class="type">PolkitUnixSession</span></a> struct should not be accessed directly.</p>
</div>
</div>
<div class="refsect1">
<a name="PolkitUnixSession.property-details"></a><h2>Property Details</h2>
<div class="refsect2">
<a name="PolkitUnixSession--pid"></a><h3>The <code class="literal">“pid”</code> property</h3>
<pre class="programlisting"> “pid” <span class="type">int</span></pre>
<p>The UNIX process id to look up the session.</p>
<p>Owner: PolkitUnixSession</p>
<p>Flags: Write / Construct Only</p>
<p>Allowed values: >= 0</p>
<p>Default value: 0</p>
</div>
<hr>
<div class="refsect2">
<a name="PolkitUnixSession--session-id"></a><h3>The <code class="literal">“session-id”</code> property</h3>
<pre class="programlisting"> “session-id” <span class="type">char</span> *</pre>
<p>The UNIX session id.</p>
<p>Owner: PolkitUnixSession</p>
<p>Flags: Read / Write / Construct</p>
<p>Default value: NULL</p>
</div>
</div>
</div>
<div class="footer">
<hr>Generated by GTK-Doc V1.33.1</div>
</body>
</html>