| 1 |
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> |
| 2 |
<html> |
| 3 |
<head> |
| 4 |
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> |
| 5 |
<title>OobsSession</title> |
| 6 |
<meta name="generator" content="DocBook XSL Stylesheets V1.75.2"> |
| 7 |
<link rel="home" href="index.html" title="Liboobs (System configuration management) Reference Manual"> |
| 8 |
<link rel="up" href="ch01.html" title="Common API"> |
| 9 |
<link rel="prev" href="ch01.html" title="Common API"> |
| 10 |
<link rel="next" href="OobsObject.html" title="OobsObject"> |
| 11 |
<meta name="generator" content="GTK-Doc V1.15 (XML mode)"> |
| 12 |
<link rel="stylesheet" href="style.css" type="text/css"> |
| 13 |
</head> |
| 14 |
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> |
| 15 |
<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2"> |
| 16 |
<tr valign="middle"> |
| 17 |
<td><a accesskey="p" href="ch01.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td> |
| 18 |
<td><a accesskey="u" href="ch01.html"><img src="up.png" width="24" height="24" border="0" alt="Up"></a></td> |
| 19 |
<td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"></a></td> |
| 20 |
<th width="100%" align="center">Liboobs (System configuration management) Reference Manual</th> |
| 21 |
<td><a accesskey="n" href="OobsObject.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td> |
| 22 |
</tr> |
| 23 |
<tr><td colspan="5" class="shortcuts"> |
| 24 |
<a href="#OobsSession.synopsis" class="shortcut">Top</a> |
| 25 |
| |
| 26 |
<a href="#OobsSession.description" class="shortcut">Description</a> |
| 27 |
| |
| 28 |
<a href="#OobsSession.object-hierarchy" class="shortcut">Object Hierarchy</a> |
| 29 |
| |
| 30 |
<a href="#OobsSession.properties" class="shortcut">Properties</a> |
| 31 |
</td></tr> |
| 32 |
</table> |
| 33 |
<div class="refentry" title="OobsSession"> |
| 34 |
<a name="OobsSession"></a><div class="titlepage"></div> |
| 35 |
<div class="refnamediv"><table width="100%"><tr> |
| 36 |
<td valign="top"> |
| 37 |
<h2><span class="refentrytitle"><a name="OobsSession.top_of_page"></a>OobsSession</span></h2> |
| 38 |
<p>OobsSession — Manager of the connection to the backends</p> |
| 39 |
</td> |
| 40 |
<td valign="top" align="right"></td> |
| 41 |
</tr></table></div> |
| 42 |
<div class="refsynopsisdiv" title="Synopsis"> |
| 43 |
<a name="OobsSession.synopsis"></a><h2>Synopsis</h2> |
| 44 |
<pre class="synopsis"> <a class="link" href="OobsSession.html#OobsPlatform" title="OobsPlatform">OobsPlatform</a>; |
| 45 |
<a class="link" href="OobsSession.html#OobsSession-struct" title="OobsSession">OobsSession</a>; |
| 46 |
<a class="link" href="OobsSession.html#OobsSessionClass" title="OobsSessionClass">OobsSessionClass</a>; |
| 47 |
<a class="link" href="OobsSession.html" title="OobsSession"><span class="returnvalue">OobsSession</span></a> * <a class="link" href="OobsSession.html#oobs-session-get" title="oobs_session_get ()">oobs_session_get</a> (<em class="parameter"><code><span class="type">void</span></code></em>); |
| 48 |
<span class="returnvalue">OobsResult</span> <a class="link" href="OobsSession.html#oobs-session-commit" title="oobs_session_commit ()">oobs_session_commit</a> (<em class="parameter"><code><a class="link" href="OobsSession.html" title="OobsSession"><span class="type">OobsSession</span></a> *session</code></em>); |
| 49 |
<span class="returnvalue">gboolean</span> <a class="link" href="OobsSession.html#oobs-session-get-connected" title="oobs_session_get_connected ()">oobs_session_get_connected</a> (<em class="parameter"><code><a class="link" href="OobsSession.html" title="OobsSession"><span class="type">OobsSession</span></a> *session</code></em>); |
| 50 |
<span class="returnvalue">OobsResult</span> <a class="link" href="OobsSession.html#oobs-session-get-supported-platforms" title="oobs_session_get_supported_platforms ()">oobs_session_get_supported_platforms</a> |
| 51 |
(<em class="parameter"><code><a class="link" href="OobsSession.html" title="OobsSession"><span class="type">OobsSession</span></a> *session</code></em>, |
| 52 |
<em class="parameter"><code><span class="type">GList</span> **platforms</code></em>); |
| 53 |
<span class="returnvalue">OobsResult</span> <a class="link" href="OobsSession.html#oobs-session-get-platform" title="oobs_session_get_platform ()">oobs_session_get_platform</a> (<em class="parameter"><code><a class="link" href="OobsSession.html" title="OobsSession"><span class="type">OobsSession</span></a> *session</code></em>, |
| 54 |
<em class="parameter"><code><span class="type">gchar</span> **platform</code></em>); |
| 55 |
<span class="returnvalue">OobsResult</span> <a class="link" href="OobsSession.html#oobs-session-set-platform" title="oobs_session_set_platform ()">oobs_session_set_platform</a> (<em class="parameter"><code><a class="link" href="OobsSession.html" title="OobsSession"><span class="type">OobsSession</span></a> *session</code></em>, |
| 56 |
<em class="parameter"><code>const <span class="type">gchar</span> *platform</code></em>); |
| 57 |
<span class="returnvalue">void</span> <a class="link" href="OobsSession.html#oobs-session-process-requests" title="oobs_session_process_requests ()">oobs_session_process_requests</a> (<em class="parameter"><code><a class="link" href="OobsSession.html" title="OobsSession"><span class="type">OobsSession</span></a> *session</code></em>); |
| 58 |
const <span class="returnvalue">gchar</span> * <a class="link" href="OobsSession.html#oobs-session-get-authentication-action" title="oobs_session_get_authentication_action ()">oobs_session_get_authentication_action</a> |
| 59 |
(<em class="parameter"><code><a class="link" href="OobsSession.html" title="OobsSession"><span class="type">OobsSession</span></a> *session</code></em>); |
| 60 |
</pre> |
| 61 |
</div> |
| 62 |
<div class="refsect1" title="Object Hierarchy"> |
| 63 |
<a name="OobsSession.object-hierarchy"></a><h2>Object Hierarchy</h2> |
| 64 |
<pre class="synopsis"> |
| 65 |
GObject |
| 66 |
+----OobsSession |
| 67 |
</pre> |
| 68 |
</div> |
| 69 |
<div class="refsect1" title="Properties"> |
| 70 |
<a name="OobsSession.properties"></a><h2>Properties</h2> |
| 71 |
<pre class="synopsis"> |
| 72 |
"<a class="link" href="OobsSession.html#OobsSession--platform" title='The "platform" property'>platform</a>" <span class="type">gchar</span>* : Read / Write |
| 73 |
</pre> |
| 74 |
</div> |
| 75 |
<div class="refsect1" title="Description"> |
| 76 |
<a name="OobsSession.description"></a><h2>Description</h2> |
| 77 |
</div> |
| 78 |
<div class="refsect1" title="Details"> |
| 79 |
<a name="OobsSession.details"></a><h2>Details</h2> |
| 80 |
<div class="refsect2" title="OobsPlatform"> |
| 81 |
<a name="OobsPlatform"></a><h3>OobsPlatform</h3> |
| 82 |
<pre class="programlisting">typedef struct { |
| 83 |
const gchar *id; |
| 84 |
const gchar *name; |
| 85 |
const gchar *version; |
| 86 |
const gchar *codename; |
| 87 |
} OobsPlatform; |
| 88 |
</pre> |
| 89 |
<p> |
| 90 |
</p> |
| 91 |
</div> |
| 92 |
<hr> |
| 93 |
<div class="refsect2" title="OobsSession"> |
| 94 |
<a name="OobsSession-struct"></a><h3>OobsSession</h3> |
| 95 |
<pre class="programlisting">typedef struct _OobsSession OobsSession;</pre> |
| 96 |
<p> |
| 97 |
</p> |
| 98 |
</div> |
| 99 |
<hr> |
| 100 |
<div class="refsect2" title="OobsSessionClass"> |
| 101 |
<a name="OobsSessionClass"></a><h3>OobsSessionClass</h3> |
| 102 |
<pre class="programlisting">typedef struct { |
| 103 |
GObjectClass parent_class; |
| 104 |
|
| 105 |
void (*_oobs_padding1) (void); |
| 106 |
void (*_oobs_padding2) (void); |
| 107 |
} OobsSessionClass; |
| 108 |
</pre> |
| 109 |
<p> |
| 110 |
</p> |
| 111 |
</div> |
| 112 |
<hr> |
| 113 |
<div class="refsect2" title="oobs_session_get ()"> |
| 114 |
<a name="oobs-session-get"></a><h3>oobs_session_get ()</h3> |
| 115 |
<pre class="programlisting"><a class="link" href="OobsSession.html" title="OobsSession"><span class="returnvalue">OobsSession</span></a> * oobs_session_get (<em class="parameter"><code><span class="type">void</span></code></em>);</pre> |
| 116 |
<p> |
| 117 |
Returns the <a class="link" href="OobsSession.html" title="OobsSession"><span class="type">OobsSession</span></a> singleton, which represents |
| 118 |
the session with the system tools backends. |
| 119 |
</p> |
| 120 |
<div class="variablelist"><table border="0"> |
| 121 |
<col align="left" valign="top"> |
| 122 |
<tbody><tr> |
| 123 |
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td> |
| 124 |
<td> the singleton <span class="type">OobSession</span> object. |
| 125 |
</td> |
| 126 |
</tr></tbody> |
| 127 |
</table></div> |
| 128 |
</div> |
| 129 |
<hr> |
| 130 |
<div class="refsect2" title="oobs_session_commit ()"> |
| 131 |
<a name="oobs-session-commit"></a><h3>oobs_session_commit ()</h3> |
| 132 |
<pre class="programlisting"><span class="returnvalue">OobsResult</span> oobs_session_commit (<em class="parameter"><code><a class="link" href="OobsSession.html" title="OobsSession"><span class="type">OobsSession</span></a> *session</code></em>);</pre> |
| 133 |
<p> |
| 134 |
Commits inmediately all the changes to the configuration |
| 135 |
objects that have been requested through this <a class="link" href="OobsSession.html" title="OobsSession"><span class="type">OobsSession</span></a>. |
| 136 |
Note that it will stop if it finds any error. |
| 137 |
</p> |
| 138 |
<div class="variablelist"><table border="0"> |
| 139 |
<col align="left" valign="top"> |
| 140 |
<tbody> |
| 141 |
<tr> |
| 142 |
<td><p><span class="term"><em class="parameter"><code>session</code></em> :</span></p></td> |
| 143 |
<td>an <a class="link" href="OobsSession.html" title="OobsSession"><span class="type">OobsSession</span></a> |
| 144 |
</td> |
| 145 |
</tr> |
| 146 |
<tr> |
| 147 |
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td> |
| 148 |
<td> An <span class="type">OobsResult</span> representing the error. |
| 149 |
</td> |
| 150 |
</tr> |
| 151 |
</tbody> |
| 152 |
</table></div> |
| 153 |
</div> |
| 154 |
<hr> |
| 155 |
<div class="refsect2" title="oobs_session_get_connected ()"> |
| 156 |
<a name="oobs-session-get-connected"></a><h3>oobs_session_get_connected ()</h3> |
| 157 |
<pre class="programlisting"><span class="returnvalue">gboolean</span> oobs_session_get_connected (<em class="parameter"><code><a class="link" href="OobsSession.html" title="OobsSession"><span class="type">OobsSession</span></a> *session</code></em>);</pre> |
| 158 |
<p> |
| 159 |
Returns whether the connection with the backends is established. |
| 160 |
</p> |
| 161 |
<div class="variablelist"><table border="0"> |
| 162 |
<col align="left" valign="top"> |
| 163 |
<tbody> |
| 164 |
<tr> |
| 165 |
<td><p><span class="term"><em class="parameter"><code>session</code></em> :</span></p></td> |
| 166 |
<td>An <a class="link" href="OobsSession.html" title="OobsSession"><span class="type">OobsSession</span></a> |
| 167 |
</td> |
| 168 |
</tr> |
| 169 |
<tr> |
| 170 |
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td> |
| 171 |
<td> <span class="type">TRUE</span> if there's connection with the backends. |
| 172 |
</td> |
| 173 |
</tr> |
| 174 |
</tbody> |
| 175 |
</table></div> |
| 176 |
</div> |
| 177 |
<hr> |
| 178 |
<div class="refsect2" title="oobs_session_get_supported_platforms ()"> |
| 179 |
<a name="oobs-session-get-supported-platforms"></a><h3>oobs_session_get_supported_platforms ()</h3> |
| 180 |
<pre class="programlisting"><span class="returnvalue">OobsResult</span> oobs_session_get_supported_platforms |
| 181 |
(<em class="parameter"><code><a class="link" href="OobsSession.html" title="OobsSession"><span class="type">OobsSession</span></a> *session</code></em>, |
| 182 |
<em class="parameter"><code><span class="type">GList</span> **platforms</code></em>);</pre> |
| 183 |
<p> |
| 184 |
Retrieves the list of supported platforms, this is only necessary when |
| 185 |
+ <a class="link" href="OobsSession.html#oobs-session-get-platform" title="oobs_session_get_platform ()"><code class="function">oobs_session_get_platform()</code></a> has returned <span class="type">OOBS_RESULT_NO_PLATFORM</span>. To |
| 186 |
specify a platform, you must use <a class="link" href="OobsSession.html#oobs-session-set-platform" title="oobs_session_set_platform ()"><code class="function">oobs_session_set_platform()</code></a>, being |
| 187 |
the platform string in that function the platform->id value inside |
| 188 |
the <a class="link" href="OobsSession.html#OobsPlatform" title="OobsPlatform"><span class="type">OobsPlatform</span></a> struct. |
| 189 |
</p> |
| 190 |
<div class="variablelist"><table border="0"> |
| 191 |
<col align="left" valign="top"> |
| 192 |
<tbody> |
| 193 |
<tr> |
| 194 |
<td><p><span class="term"><em class="parameter"><code>session</code></em> :</span></p></td> |
| 195 |
<td>An <a class="link" href="OobsSession.html" title="OobsSession"><span class="type">OobsSession</span></a>. |
| 196 |
</td> |
| 197 |
</tr> |
| 198 |
<tr> |
| 199 |
<td><p><span class="term"><em class="parameter"><code>platforms</code></em> :</span></p></td> |
| 200 |
<td>return location for the list of platforms. It's a |
| 201 |
<span class="type">GList</span> of <a class="link" href="OobsSession.html#OobsPlatform" title="OobsPlatform"><span class="type">OobsPlatform</span></a> structs. You must free |
| 202 |
this list with <code class="function">g_list_free()</code>. |
| 203 |
</td> |
| 204 |
</tr> |
| 205 |
<tr> |
| 206 |
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td> |
| 207 |
<td> An <span class="type">OobsResult</span> representing the error. |
| 208 |
</td> |
| 209 |
</tr> |
| 210 |
</tbody> |
| 211 |
</table></div> |
| 212 |
</div> |
| 213 |
<hr> |
| 214 |
<div class="refsect2" title="oobs_session_get_platform ()"> |
| 215 |
<a name="oobs-session-get-platform"></a><h3>oobs_session_get_platform ()</h3> |
| 216 |
<pre class="programlisting"><span class="returnvalue">OobsResult</span> oobs_session_get_platform (<em class="parameter"><code><a class="link" href="OobsSession.html" title="OobsSession"><span class="type">OobsSession</span></a> *session</code></em>, |
| 217 |
<em class="parameter"><code><span class="type">gchar</span> **platform</code></em>);</pre> |
| 218 |
<p> |
| 219 |
Retrieves the platform your system has been identified with, or |
| 220 |
<span class="type">NULL</span> in case your platform is not recognized or other error happens. |
| 221 |
</p> |
| 222 |
<div class="variablelist"><table border="0"> |
| 223 |
<col align="left" valign="top"> |
| 224 |
<tbody> |
| 225 |
<tr> |
| 226 |
<td><p><span class="term"><em class="parameter"><code>session</code></em> :</span></p></td> |
| 227 |
<td>An <a class="link" href="OobsSession.html" title="OobsSession"><span class="type">OobsSession</span></a>. |
| 228 |
</td> |
| 229 |
</tr> |
| 230 |
<tr> |
| 231 |
<td><p><span class="term"><em class="parameter"><code>platform</code></em> :</span></p></td> |
| 232 |
<td>location to store the current platform, or <span class="type">NULL</span>. This |
| 233 |
string is of internal use, and must not be freed or modified. |
| 234 |
</td> |
| 235 |
</tr> |
| 236 |
<tr> |
| 237 |
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td> |
| 238 |
<td> An <span class="type">OobsResult</span> representing the error. |
| 239 |
</td> |
| 240 |
</tr> |
| 241 |
</tbody> |
| 242 |
</table></div> |
| 243 |
</div> |
| 244 |
<hr> |
| 245 |
<div class="refsect2" title="oobs_session_set_platform ()"> |
| 246 |
<a name="oobs-session-set-platform"></a><h3>oobs_session_set_platform ()</h3> |
| 247 |
<pre class="programlisting"><span class="returnvalue">OobsResult</span> oobs_session_set_platform (<em class="parameter"><code><a class="link" href="OobsSession.html" title="OobsSession"><span class="type">OobsSession</span></a> *session</code></em>, |
| 248 |
<em class="parameter"><code>const <span class="type">gchar</span> *platform</code></em>);</pre> |
| 249 |
<p> |
| 250 |
Identifies your platform as the one set in <em class="parameter"><code>platform</code></em>. This is only necessary if |
| 251 |
your platform could not be guessed (and thus <a class="link" href="OobsSession.html#oobs-session-get-platform" title="oobs_session_get_platform ()"><code class="function">oobs_session_get_platform()</code></a> would |
| 252 |
return <span class="type">OOBS_RESULT_NO_PLATFORM</span> in this case). |
| 253 |
</p> |
| 254 |
<div class="variablelist"><table border="0"> |
| 255 |
<col align="left" valign="top"> |
| 256 |
<tbody> |
| 257 |
<tr> |
| 258 |
<td><p><span class="term"><em class="parameter"><code>session</code></em> :</span></p></td> |
| 259 |
<td>An <a class="link" href="OobsSession.html" title="OobsSession"><span class="type">OobsSession</span></a>. |
| 260 |
</td> |
| 261 |
</tr> |
| 262 |
<tr> |
| 263 |
<td><p><span class="term"><em class="parameter"><code>platform</code></em> :</span></p></td> |
| 264 |
<td>A string defining the platform. see |
| 265 |
<code class="function">oobs_session_get_platforms_list()</code> to know where to get this string. |
| 266 |
</td> |
| 267 |
</tr> |
| 268 |
<tr> |
| 269 |
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td> |
| 270 |
<td> An <span class="type">OobsResult</span> representing the error. |
| 271 |
</td> |
| 272 |
</tr> |
| 273 |
</tbody> |
| 274 |
</table></div> |
| 275 |
</div> |
| 276 |
<hr> |
| 277 |
<div class="refsect2" title="oobs_session_process_requests ()"> |
| 278 |
<a name="oobs-session-process-requests"></a><h3>oobs_session_process_requests ()</h3> |
| 279 |
<pre class="programlisting"><span class="returnvalue">void</span> oobs_session_process_requests (<em class="parameter"><code><a class="link" href="OobsSession.html" title="OobsSession"><span class="type">OobsSession</span></a> *session</code></em>);</pre> |
| 280 |
<p> |
| 281 |
Blocks until all pending asynchronous requests have been processed. |
| 282 |
</p> |
| 283 |
<div class="variablelist"><table border="0"> |
| 284 |
<col align="left" valign="top"> |
| 285 |
<tbody><tr> |
| 286 |
<td><p><span class="term"><em class="parameter"><code>session</code></em> :</span></p></td> |
| 287 |
<td>An <a class="link" href="OobsSession.html" title="OobsSession"><span class="type">OobsSession</span></a> |
| 288 |
</td> |
| 289 |
</tr></tbody> |
| 290 |
</table></div> |
| 291 |
</div> |
| 292 |
<hr> |
| 293 |
<div class="refsect2" title="oobs_session_get_authentication_action ()"> |
| 294 |
<a name="oobs-session-get-authentication-action"></a><h3>oobs_session_get_authentication_action ()</h3> |
| 295 |
<pre class="programlisting">const <span class="returnvalue">gchar</span> * oobs_session_get_authentication_action |
| 296 |
(<em class="parameter"><code><a class="link" href="OobsSession.html" title="OobsSession"><span class="type">OobsSession</span></a> *session</code></em>);</pre> |
| 297 |
<p> |
| 298 |
Returns the PolicyKit action the user has to be authenticated to in order to |
| 299 |
commit changes to configuration objects in this session. If the user has not |
| 300 |
the required permissions, any attempt to commit will return <span class="type">OOBS_RESULT_ACCESS_DENIED</span>. |
| 301 |
</p> |
| 302 |
<div class="variablelist"><table border="0"> |
| 303 |
<col align="left" valign="top"> |
| 304 |
<tbody> |
| 305 |
<tr> |
| 306 |
<td><p><span class="term"><em class="parameter"><code>session</code></em> :</span></p></td> |
| 307 |
<td>An <a class="link" href="OobsSession.html" title="OobsSession"><span class="type">OobsSession</span></a> |
| 308 |
</td> |
| 309 |
</tr> |
| 310 |
<tr> |
| 311 |
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td> |
| 312 |
<td> string defining the PolicyKit action |
| 313 |
required to modify objects in the session. |
| 314 |
</td> |
| 315 |
</tr> |
| 316 |
</tbody> |
| 317 |
</table></div> |
| 318 |
</div> |
| 319 |
</div> |
| 320 |
<div class="refsect1" title="Property Details"> |
| 321 |
<a name="OobsSession.property-details"></a><h2>Property Details</h2> |
| 322 |
<div class="refsect2" title='The "platform" property'> |
| 323 |
<a name="OobsSession--platform"></a><h3>The <code class="literal">"platform"</code> property</h3> |
| 324 |
<pre class="programlisting"> "platform" <span class="type">gchar</span>* : Read / Write</pre> |
| 325 |
<p>Name of the platform the session is running on.</p> |
| 326 |
<p>Default value: NULL</p> |
| 327 |
</div> |
| 328 |
</div> |
| 329 |
</div> |
| 330 |
<div class="footer"> |
| 331 |
<hr> |
| 332 |
Generated by GTK-Doc V1.15</div> |
| 333 |
</body> |
| 334 |
</html> |