/usr/share/gtk-doc/html/libinfinity-0.5/InfSimulatedConnection.html is in libinfinity-0.5-doc 0.5.5-1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 | <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>InfSimulatedConnection</title>
<meta name="generator" content="DocBook XSL Stylesheets V1.78.1">
<link rel="home" href="index.html" title="libinfinity-0.5 Reference Manual">
<link rel="up" href="ch02.html" title="Common libinfinity API">
<link rel="prev" href="InfXmppConnection.html" title="InfXmppConnection">
<link rel="next" href="InfDiscoveryAvahi.html" title="InfDiscoveryAvahi">
<meta name="generator" content="GTK-Doc V1.19 (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="2">
<tr valign="middle">
<td><a accesskey="p" href="InfXmppConnection.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td>
<td><a accesskey="u" href="ch02.html"><img src="up.png" width="24" height="24" border="0" alt="Up"></a></td>
<td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"></a></td>
<th width="100%" align="center">libinfinity-0.5 Reference Manual</th>
<td><a accesskey="n" href="InfDiscoveryAvahi.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td>
</tr>
<tr><td colspan="5" class="shortcuts">
<a href="#InfSimulatedConnection.synopsis" class="shortcut">Top</a>
|
<a href="#InfSimulatedConnection.description" class="shortcut">Description</a>
|
<a href="#InfSimulatedConnection.object-hierarchy" class="shortcut">Object Hierarchy</a>
|
<a href="#InfSimulatedConnection.implemented-interfaces" class="shortcut">Implemented Interfaces</a>
|
<a href="#InfSimulatedConnection.properties" class="shortcut">Properties</a>
</td></tr>
</table>
<div class="refentry">
<a name="InfSimulatedConnection"></a><div class="titlepage"></div>
<div class="refnamediv"><table width="100%"><tr>
<td valign="top">
<h2><span class="refentrytitle"><a name="InfSimulatedConnection.top_of_page"></a>InfSimulatedConnection</span></h2>
<p>InfSimulatedConnection — Simulated network connection</p>
</td>
<td valign="top" align="right"></td>
</tr></table></div>
<div class="refsect1">
<a name="InfSimulatedConnection.stability-level"></a><h2>Stability Level</h2>
Unstable, unless otherwise indicated
</div>
<div class="refsynopsisdiv">
<a name="InfSimulatedConnection.synopsis"></a><h2>Synopsis</h2>
<a name="InfSimulatedConnectionMode"></a><pre class="synopsis">
#include <libinfinity/common/inf-simulated-connection.h>
<a class="link" href="InfSimulatedConnection.html#InfSimulatedConnection-struct" title="InfSimulatedConnection">InfSimulatedConnection</a>;
struct <a class="link" href="InfSimulatedConnection.html#InfSimulatedConnectionClass" title="struct InfSimulatedConnectionClass">InfSimulatedConnectionClass</a>;
enum <a class="link" href="InfSimulatedConnection.html#InfSimulatedConnectionMode-enum" title="enum InfSimulatedConnectionMode">InfSimulatedConnectionMode</a>;
<a class="link" href="InfSimulatedConnection.html" title="InfSimulatedConnection"><span class="returnvalue">InfSimulatedConnection</span></a> * <a class="link" href="InfSimulatedConnection.html#inf-simulated-connection-new" title="inf_simulated_connection_new ()">inf_simulated_connection_new</a> (<em class="parameter"><code><span class="type">void</span></code></em>);
<a class="link" href="InfSimulatedConnection.html" title="InfSimulatedConnection"><span class="returnvalue">InfSimulatedConnection</span></a> * <a class="link" href="InfSimulatedConnection.html#inf-simulated-connection-new-with-io" title="inf_simulated_connection_new_with_io ()">inf_simulated_connection_new_with_io</a>
(<em class="parameter"><code><a class="link" href="InfIo.html" title="InfIo"><span class="type">InfIo</span></a> *io</code></em>);
<span class="returnvalue">void</span> <a class="link" href="InfSimulatedConnection.html#inf-simulated-connection-connect" title="inf_simulated_connection_connect ()">inf_simulated_connection_connect</a> (<em class="parameter"><code><a class="link" href="InfSimulatedConnection.html" title="InfSimulatedConnection"><span class="type">InfSimulatedConnection</span></a> *connection</code></em>,
<em class="parameter"><code><a class="link" href="InfSimulatedConnection.html" title="InfSimulatedConnection"><span class="type">InfSimulatedConnection</span></a> *to</code></em>);
<span class="returnvalue">void</span> <a class="link" href="InfSimulatedConnection.html#inf-simulated-connection-set-mode" title="inf_simulated_connection_set_mode ()">inf_simulated_connection_set_mode</a> (<em class="parameter"><code><a class="link" href="InfSimulatedConnection.html" title="InfSimulatedConnection"><span class="type">InfSimulatedConnection</span></a> *connection</code></em>,
<em class="parameter"><code><a class="link" href="InfSimulatedConnection.html#InfSimulatedConnectionMode"><span class="type">InfSimulatedConnectionMode</span></a> mode</code></em>);
<span class="returnvalue">void</span> <a class="link" href="InfSimulatedConnection.html#inf-simulated-connection-flush" title="inf_simulated_connection_flush ()">inf_simulated_connection_flush</a> (<em class="parameter"><code><a class="link" href="InfSimulatedConnection.html" title="InfSimulatedConnection"><span class="type">InfSimulatedConnection</span></a> *connection</code></em>);
</pre>
</div>
<div class="refsect1">
<a name="InfSimulatedConnection.object-hierarchy"></a><h2>Object Hierarchy</h2>
<pre class="synopsis">
GObject
+----InfSimulatedConnection
</pre>
<pre class="synopsis">
GEnum
+----InfSimulatedConnectionMode
</pre>
</div>
<div class="refsect1">
<a name="InfSimulatedConnection.implemented-interfaces"></a><h2>Implemented Interfaces</h2>
<p>
InfSimulatedConnection implements
<a class="link" href="InfXmlConnection.html" title="InfXmlConnection">InfXmlConnection</a>.</p>
</div>
<div class="refsect1">
<a name="InfSimulatedConnection.properties"></a><h2>Properties</h2>
<pre class="synopsis">
"<a class="link" href="InfSimulatedConnection.html#InfSimulatedConnection--io" title='The "io" property'>io</a>" <a class="link" href="InfIo.html" title="InfIo"><span class="type">InfIo</span></a>* : Read / Write / Construct Only
"<a class="link" href="InfSimulatedConnection.html#InfSimulatedConnection--mode" title='The "mode" property'>mode</a>" <a class="link" href="InfSimulatedConnection.html#InfSimulatedConnectionMode"><span class="type">InfSimulatedConnectionMode</span></a> : Read / Write / Construct
"<a class="link" href="InfSimulatedConnection.html#InfSimulatedConnection--target" title='The "target" property'>target</a>" <a class="link" href="InfSimulatedConnection.html" title="InfSimulatedConnection"><span class="type">InfSimulatedConnection</span></a>* : Read / Write
</pre>
</div>
<div class="refsect1">
<a name="InfSimulatedConnection.description"></a><h2>Description</h2>
<p>
<a class="link" href="InfSimulatedConnection.html" title="InfSimulatedConnection"><span class="type">InfSimulatedConnection</span></a> simulates a connection and can be used everywhere
where a <a class="link" href="InfXmlConnection.html" title="InfXmlConnection"><span class="type">InfXmlConnection</span></a> is expected. Use
<a class="link" href="InfSimulatedConnection.html#inf-simulated-connection-connect" title="inf_simulated_connection_connect ()"><code class="function">inf_simulated_connection_connect()</code></a> to connect two such connections so that
data sent through one is received by the other.
</p>
</div>
<div class="refsect1">
<a name="InfSimulatedConnection.details"></a><h2>Details</h2>
<div class="refsect2">
<a name="InfSimulatedConnection-struct"></a><h3>InfSimulatedConnection</h3>
<pre class="programlisting">typedef struct _InfSimulatedConnection InfSimulatedConnection;</pre>
<p>
<a class="link" href="InfSimulatedConnection.html" title="InfSimulatedConnection"><span class="type">InfSimulatedConnection</span></a> is an opaque data type. You should only access it
via the public API functions.
</p>
</div>
<hr>
<div class="refsect2">
<a name="InfSimulatedConnectionClass"></a><h3>struct InfSimulatedConnectionClass</h3>
<pre class="programlisting">struct InfSimulatedConnectionClass {
};
</pre>
<p>
This structure does not contain any public fields.
</p>
</div>
<hr>
<div class="refsect2">
<a name="InfSimulatedConnectionMode-enum"></a><h3>enum InfSimulatedConnectionMode</h3>
<pre class="programlisting">typedef enum {
INF_SIMULATED_CONNECTION_IMMEDIATE,
INF_SIMULATED_CONNECTION_DELAYED,
INF_SIMULATED_CONNECTION_IO_CONTROLLED
} InfSimulatedConnectionMode;
</pre>
<p>
The mode of a simulated connection defines when sent messages arrive at
the target connection.
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><a name="INF-SIMULATED-CONNECTION-IMMEDIATE:CAPS"></a><span class="term"><code class="literal">INF_SIMULATED_CONNECTION_IMMEDIATE</code></span></p></td>
<td>Messages are received directly by the
target site when calling <a class="link" href="InfXmlConnection.html#inf-xml-connection-send" title="inf_xml_connection_send ()"><code class="function">inf_xml_connection_send()</code></a>.
</td>
</tr>
<tr>
<td><p><a name="INF-SIMULATED-CONNECTION-DELAYED:CAPS"></a><span class="term"><code class="literal">INF_SIMULATED_CONNECTION_DELAYED</code></span></p></td>
<td>Messages are queued, and delivered to
the target site when <a class="link" href="InfSimulatedConnection.html#inf-simulated-connection-flush" title="inf_simulated_connection_flush ()"><code class="function">inf_simulated_connection_flush()</code></a> is called.
</td>
</tr>
<tr>
<td><p><a name="INF-SIMULATED-CONNECTION-IO-CONTROLLED:CAPS"></a><span class="term"><code class="literal">INF_SIMULATED_CONNECTION_IO_CONTROLLED</code></span></p></td>
<td>Messages are queued and delivered
once the application main loop regains control. This requires the simulated
connection to have been created with
<a class="link" href="InfSimulatedConnection.html#inf-simulated-connection-new-with-io" title="inf_simulated_connection_new_with_io ()"><code class="function">inf_simulated_connection_new_with_io()</code></a>.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="inf-simulated-connection-new"></a><h3>inf_simulated_connection_new ()</h3>
<pre class="programlisting"><a class="link" href="InfSimulatedConnection.html" title="InfSimulatedConnection"><span class="returnvalue">InfSimulatedConnection</span></a> * inf_simulated_connection_new (<em class="parameter"><code><span class="type">void</span></code></em>);</pre>
<p>
Creates a new <a class="link" href="InfSimulatedConnection.html" title="InfSimulatedConnection"><span class="type">InfSimulatedConnection</span></a>. A connection created this way cannot
be switched to <a class="link" href="InfSimulatedConnection.html#INF-SIMULATED-CONNECTION-IO-CONTROLLED:CAPS"><code class="literal">INF_SIMULATED_CONNECTION_IO_CONTROLLED</code></a> mode. Use
<a class="link" href="InfSimulatedConnection.html#inf-simulated-connection-new-with-io" title="inf_simulated_connection_new_with_io ()"><code class="function">inf_simulated_connection_new_with_io()</code></a> instead if you intend to do that.
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody><tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>A new <a class="link" href="InfSimulatedConnection.html" title="InfSimulatedConnection"><span class="type">InfSimulatedConnection</span></a>.</td>
</tr></tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="inf-simulated-connection-new-with-io"></a><h3>inf_simulated_connection_new_with_io ()</h3>
<pre class="programlisting"><a class="link" href="InfSimulatedConnection.html" title="InfSimulatedConnection"><span class="returnvalue">InfSimulatedConnection</span></a> * inf_simulated_connection_new_with_io
(<em class="parameter"><code><a class="link" href="InfIo.html" title="InfIo"><span class="type">InfIo</span></a> *io</code></em>);</pre>
<p>
Creates a new <a class="link" href="InfSimulatedConnection.html" title="InfSimulatedConnection"><span class="type">InfSimulatedConnection</span></a> with the given <a class="link" href="InfIo.html" title="InfIo"><span class="type">InfIo</span></a>. This
connection can be used with <a class="link" href="InfSimulatedConnection.html#INF-SIMULATED-CONNECTION-IO-CONTROLLED:CAPS"><code class="literal">INF_SIMULATED_CONNECTION_IO_CONTROLLED</code></a> mode.
If you don't intend to use that mode then using
<a class="link" href="InfSimulatedConnection.html#inf-simulated-connection-new" title="inf_simulated_connection_new ()"><code class="function">inf_simulated_connection_new()</code></a> is also good enough since the <a class="link" href="InfIo.html" title="InfIo"><span class="type">InfIo</span></a> object
is not required in that case.
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>io</code></em> :</span></p></td>
<td>The main loop to be used for <a class="link" href="InfSimulatedConnection.html#INF-SIMULATED-CONNECTION-IO-CONTROLLED:CAPS"><code class="literal">INF_SIMULATED_CONNECTION_IO_CONTROLLED</code></a>
mode.</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>A new <a class="link" href="InfSimulatedConnection.html" title="InfSimulatedConnection"><span class="type">InfSimulatedConnection</span></a>.</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="inf-simulated-connection-connect"></a><h3>inf_simulated_connection_connect ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span> inf_simulated_connection_connect (<em class="parameter"><code><a class="link" href="InfSimulatedConnection.html" title="InfSimulatedConnection"><span class="type">InfSimulatedConnection</span></a> *connection</code></em>,
<em class="parameter"><code><a class="link" href="InfSimulatedConnection.html" title="InfSimulatedConnection"><span class="type">InfSimulatedConnection</span></a> *to</code></em>);</pre>
<p>
Connects two simulated connections, so that data sent through one of them
is received by the other one and vice versa. So one call to this function
connects both <a class="link" href="InfSimulatedConnection.html" title="InfSimulatedConnection"><span class="type">InfSimulatedConnection</span></a>s to each other. There is no
need to call this function once for each connection.
</p>
<p>
If one or both of the connections already have another target, then the
simulated connection between those is closed first.
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>connection</code></em> :</span></p></td>
<td>A <a class="link" href="InfSimulatedConnection.html" title="InfSimulatedConnection"><span class="type">InfSimulatedConnection</span></a>.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>to</code></em> :</span></p></td>
<td>The target connection.</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="inf-simulated-connection-set-mode"></a><h3>inf_simulated_connection_set_mode ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span> inf_simulated_connection_set_mode (<em class="parameter"><code><a class="link" href="InfSimulatedConnection.html" title="InfSimulatedConnection"><span class="type">InfSimulatedConnection</span></a> *connection</code></em>,
<em class="parameter"><code><a class="link" href="InfSimulatedConnection.html#InfSimulatedConnectionMode"><span class="type">InfSimulatedConnectionMode</span></a> mode</code></em>);</pre>
<p>
Sets the mode of the simulated connection.
</p>
<p>
In <a class="link" href="InfSimulatedConnection.html#INF-SIMULATED-CONNECTION-IMMEDIATE:CAPS"><code class="literal">INF_SIMULATED_CONNECTION_IMMEDIATE</code></a> mode, messages sent through the
connection are received by the target during the call to
<a class="link" href="InfXmlConnection.html#inf-xml-connection-send" title="inf_xml_connection_send ()"><code class="function">inf_xml_connection_send()</code></a>.
</p>
<p>
In <a class="link" href="InfSimulatedConnection.html#INF-SIMULATED-CONNECTION-DELAYED:CAPS"><code class="literal">INF_SIMULATED_CONNECTION_DELAYED</code></a> mode, messages sent are queued and
received by the target when <a class="link" href="InfSimulatedConnection.html#inf-simulated-connection-flush" title="inf_simulated_connection_flush ()"><code class="function">inf_simulated_connection_flush()</code></a> is called.
</p>
<p>
In <a class="link" href="InfSimulatedConnection.html#INF-SIMULATED-CONNECTION-IO-CONTROLLED:CAPS"><code class="literal">INF_SIMULATED_CONNECTION_IO_CONTROLLED</code></a> mode, messages are queued and
received by the target as soon as a dispatch handler (see
<a class="link" href="InfIo.html#inf-io-add-dispatch" title="inf_io_add_dispatch ()"><code class="function">inf_io_add_dispatch()</code></a>) installed on the main loop is called.
</p>
<p>
When changing the mode from <a class="link" href="InfSimulatedConnection.html#INF-SIMULATED-CONNECTION-DELAYED:CAPS"><code class="literal">INF_SIMULATED_CONNECTION_DELAYED</code></a> or
<a class="link" href="InfSimulatedConnection.html#INF-SIMULATED-CONNECTION-IO-CONTROLLED:CAPS"><code class="literal">INF_SIMULATED_CONNECTION_IO_CONTROLLED</code></a> to
<a class="link" href="InfSimulatedConnection.html#INF-SIMULATED-CONNECTION-IMMEDIATE:CAPS"><code class="literal">INF_SIMULATED_CONNECTION_IMMEDIATE</code></a>, then the queue is flushed, too.
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>connection</code></em> :</span></p></td>
<td>A <a class="link" href="InfSimulatedConnection.html" title="InfSimulatedConnection"><span class="type">InfSimulatedConnection</span></a>.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>mode</code></em> :</span></p></td>
<td>The new mode to set.</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="inf-simulated-connection-flush"></a><h3>inf_simulated_connection_flush ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span> inf_simulated_connection_flush (<em class="parameter"><code><a class="link" href="InfSimulatedConnection.html" title="InfSimulatedConnection"><span class="type">InfSimulatedConnection</span></a> *connection</code></em>);</pre>
<p>
When <em class="parameter"><code>connection</code></em>'s mode is <a class="link" href="InfSimulatedConnection.html#INF-SIMULATED-CONNECTION-DELAYED:CAPS"><code class="literal">INF_SIMULATED_CONNECTION_DELAYED</code></a> or
<a class="link" href="InfSimulatedConnection.html#INF-SIMULATED-CONNECTION-IO-CONTROLLED:CAPS"><code class="literal">INF_SIMULATED_CONNECTION_IO_CONTROLLED</code></a>, then calling this function makes
the target connection receive all the queued messages.
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody><tr>
<td><p><span class="term"><em class="parameter"><code>connection</code></em> :</span></p></td>
<td>A <a class="link" href="InfSimulatedConnection.html" title="InfSimulatedConnection"><span class="type">InfSimulatedConnection</span></a>.</td>
</tr></tbody>
</table></div>
</div>
</div>
<div class="refsect1">
<a name="InfSimulatedConnection.property-details"></a><h2>Property Details</h2>
<div class="refsect2">
<a name="InfSimulatedConnection--io"></a><h3>The <code class="literal">"io"</code> property</h3>
<pre class="programlisting"> "io" <a class="link" href="InfIo.html" title="InfIo"><span class="type">InfIo</span></a>* : Read / Write / Construct Only</pre>
<p>The main loop to be used for IO_CONTROLLED mode.</p>
</div>
<hr>
<div class="refsect2">
<a name="InfSimulatedConnection--mode"></a><h3>The <code class="literal">"mode"</code> property</h3>
<pre class="programlisting"> "mode" <a class="link" href="InfSimulatedConnection.html#InfSimulatedConnectionMode"><span class="type">InfSimulatedConnectionMode</span></a> : Read / Write / Construct</pre>
<p>The mode of the simulated connection.</p>
<p>Default value: INF_SIMULATED_CONNECTION_IMMEDIATE</p>
</div>
<hr>
<div class="refsect2">
<a name="InfSimulatedConnection--target"></a><h3>The <code class="literal">"target"</code> property</h3>
<pre class="programlisting"> "target" <a class="link" href="InfSimulatedConnection.html" title="InfSimulatedConnection"><span class="type">InfSimulatedConnection</span></a>* : Read / Write</pre>
<p>The simulated connection receiving data sent through this connection.</p>
</div>
</div>
</div>
<div class="footer">
<hr>
Generated by GTK-Doc V1.19</div>
</body>
</html>
|