1
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
4
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
5
<title>InfTextSession</title>
6
<meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
7
<link rel="home" href="index.html" title="libinftext-0.5 Reference Manual">
8
<link rel="up" href="ch01.html" title="libinftext API reference">
9
<link rel="prev" href="ch01.html" title="libinftext API reference">
10
<link rel="next" href="libinftext-0.5-inf-text-buffer.html" title="inf-text-buffer">
11
<meta name="generator" content="GTK-Doc V1.17 (XML mode)">
12
<link rel="stylesheet" href="style.css" type="text/css">
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">
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">libinftext-0.5 Reference Manual</th>
21
<td><a accesskey="n" href="libinftext-0.5-inf-text-buffer.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td>
23
<tr><td colspan="5" class="shortcuts">
24
<a href="#libinftext-0.5-inf-text-session.synopsis" class="shortcut">Top</a>
26
<a href="#libinftext-0.5-inf-text-session.description" class="shortcut">Description</a>
28
<a href="#libinftext-0.5-inf-text-session.object-hierarchy" class="shortcut">Object Hierarchy</a>
30
<a href="#libinftext-0.5-inf-text-session.implemented-interfaces" class="shortcut">Implemented Interfaces</a>
32
<a href="#libinftext-0.5-inf-text-session.properties" class="shortcut">Properties</a>
35
<div class="refentry">
36
<a name="libinftext-0.5-inf-text-session"></a><div class="titlepage"></div>
37
<div class="refnamediv"><table width="100%"><tr>
39
<h2><span class="refentrytitle"><a name="libinftext-0.5-inf-text-session.top_of_page"></a>InfTextSession</span></h2>
42
<td valign="top" align="right"></td>
44
<div class="refsynopsisdiv">
45
<a name="libinftext-0.5-inf-text-session.synopsis"></a><h2>Synopsis</h2>
46
<a name="InfTextSession"></a><pre class="synopsis">enum <a class="link" href="libinftext-0.5-inf-text-session.html#InfTextSessionError" title="enum InfTextSessionError">InfTextSessionError</a>;
47
<a class="link" href="libinftext-0.5-inf-text-session.html#InfTextSession-struct" title="InfTextSession">InfTextSession</a>;
48
<a class="link" href="libinftext-0.5-inf-text-session.html#InfTextSession"><span class="returnvalue">InfTextSession</span></a> * <a class="link" href="libinftext-0.5-inf-text-session.html#inf-text-session-new" title="inf_text_session_new ()">inf_text_session_new</a> (<em class="parameter"><code><a href="http://infinote.0x539.de/libinfinity/API/libinfinity/InfCommunicationManager.html"><span class="type">InfCommunicationManager</span></a> *manager</code></em>,
49
<em class="parameter"><code><a class="link" href="libinftext-0.5-inf-text-buffer.html#InfTextBuffer"><span class="type">InfTextBuffer</span></a> *buffer</code></em>,
50
<em class="parameter"><code><a href="http://infinote.0x539.de/libinfinity/API/libinfinity/InfIo.html"><span class="type">InfIo</span></a> *io</code></em>,
51
<em class="parameter"><code><a href="http://infinote.0x539.de/libinfinity/API/libinfinity/InfSession.html#InfSessionStatus"><span class="type">InfSessionStatus</span></a> status</code></em>,
52
<em class="parameter"><code><a href="http://infinote.0x539.de/libinfinity/API/libinfinity/InfCommunicationGroup.html"><span class="type">InfCommunicationGroup</span></a> *sync_group</code></em>,
53
<em class="parameter"><code><a href="http://infinote.0x539.de/libinfinity/API/libinfinity/InfXmlConnection.html"><span class="type">InfXmlConnection</span></a> *sync_connection</code></em>);
54
<a class="link" href="libinftext-0.5-inf-text-session.html#InfTextSession"><span class="returnvalue">InfTextSession</span></a> * <a class="link" href="libinftext-0.5-inf-text-session.html#inf-text-session-new-with-user-table" title="inf_text_session_new_with_user_table ()">inf_text_session_new_with_user_table</a>
55
(<em class="parameter"><code><a href="http://infinote.0x539.de/libinfinity/API/libinfinity/InfCommunicationManager.html"><span class="type">InfCommunicationManager</span></a> *manager</code></em>,
56
<em class="parameter"><code><a class="link" href="libinftext-0.5-inf-text-buffer.html#InfTextBuffer"><span class="type">InfTextBuffer</span></a> *buffer</code></em>,
57
<em class="parameter"><code><a href="http://infinote.0x539.de/libinfinity/API/libinfinity/InfIo.html"><span class="type">InfIo</span></a> *io</code></em>,
58
<em class="parameter"><code><a href="http://infinote.0x539.de/libinfinity/API/libinfinity/InfUserTable.html"><span class="type">InfUserTable</span></a> *user_table</code></em>,
59
<em class="parameter"><code><a href="http://infinote.0x539.de/libinfinity/API/libinfinity/InfSession.html#InfSessionStatus"><span class="type">InfSessionStatus</span></a> status</code></em>,
60
<em class="parameter"><code><a href="http://infinote.0x539.de/libinfinity/API/libinfinity/InfCommunicationGroup.html"><span class="type">InfCommunicationGroup</span></a> *sync_group</code></em>,
61
<em class="parameter"><code><a href="http://infinote.0x539.de/libinfinity/API/libinfinity/InfXmlConnection.html"><span class="type">InfXmlConnection</span></a> *sync_connection</code></em>);
62
<span class="returnvalue">void</span> <a class="link" href="libinftext-0.5-inf-text-session.html#inf-text-session-set-user-color" title="inf_text_session_set_user_color ()">inf_text_session_set_user_color</a> (<em class="parameter"><code><a class="link" href="libinftext-0.5-inf-text-session.html#InfTextSession"><span class="type">InfTextSession</span></a> *session</code></em>,
63
<em class="parameter"><code><a class="link" href="InfTextUser.html" title="InfTextUser"><span class="type">InfTextUser</span></a> *user</code></em>,
64
<em class="parameter"><code><span class="type">gdouble</span> hue</code></em>);
65
<span class="returnvalue">void</span> <a class="link" href="libinftext-0.5-inf-text-session.html#inf-text-session-flush-requests-for-user" title="inf_text_session_flush_requests_for_user ()">inf_text_session_flush_requests_for_user</a>
66
(<em class="parameter"><code><a class="link" href="libinftext-0.5-inf-text-session.html#InfTextSession"><span class="type">InfTextSession</span></a> *session</code></em>,
67
<em class="parameter"><code><a class="link" href="InfTextUser.html" title="InfTextUser"><span class="type">InfTextUser</span></a> *user</code></em>);
70
<div class="refsect1">
71
<a name="libinftext-0.5-inf-text-session.object-hierarchy"></a><h2>Object Hierarchy</h2>
72
<pre class="synopsis">
74
+----<a href="http://infinote.0x539.de/libinfinity/API/libinfinity/InfSession.html">InfSession</a>
75
+----<a href="http://infinote.0x539.de/libinfinity/API/libinfinity/InfAdoptedSession.html">InfAdoptedSession</a>
79
<div class="refsect1">
80
<a name="libinftext-0.5-inf-text-session.implemented-interfaces"></a><h2>Implemented Interfaces</h2>
82
InfTextSession implements
83
<a href="http://infinote.0x539.de/libinfinity/API/libinfinity/InfCommunicationObject.html">InfCommunicationObject</a>.</p>
85
<div class="refsect1">
86
<a name="libinftext-0.5-inf-text-session.properties"></a><h2>Properties</h2>
87
<pre class="synopsis">
88
"<a class="link" href="libinftext-0.5-inf-text-session.html#InfTextSession--caret-update-interval" title='The "caret-update-interval" property'>caret-update-interval</a>" <span class="type">guint</span> : Read / Write / Construct
91
<div class="refsect1">
92
<a name="libinftext-0.5-inf-text-session.description"></a><h2>Description</h2>
96
<div class="refsect1">
97
<a name="libinftext-0.5-inf-text-session.details"></a><h2>Details</h2>
98
<div class="refsect2">
99
<a name="InfTextSessionError"></a><h3>enum InfTextSessionError</h3>
100
<pre class="programlisting">typedef enum _InfTextSessionError {
101
INF_TEXT_SESSION_ERROR_INVALID_HUE,
103
INF_TEXT_SESSION_ERROR_FAILED
104
} InfTextSessionError;
110
<div class="refsect2">
111
<a name="InfTextSession-struct"></a><h3>InfTextSession</h3>
112
<pre class="programlisting">typedef struct _InfTextSession InfTextSession;</pre>
117
<div class="refsect2">
118
<a name="inf-text-session-new"></a><h3>inf_text_session_new ()</h3>
119
<pre class="programlisting"><a class="link" href="libinftext-0.5-inf-text-session.html#InfTextSession"><span class="returnvalue">InfTextSession</span></a> * inf_text_session_new (<em class="parameter"><code><a href="http://infinote.0x539.de/libinfinity/API/libinfinity/InfCommunicationManager.html"><span class="type">InfCommunicationManager</span></a> *manager</code></em>,
120
<em class="parameter"><code><a class="link" href="libinftext-0.5-inf-text-buffer.html#InfTextBuffer"><span class="type">InfTextBuffer</span></a> *buffer</code></em>,
121
<em class="parameter"><code><a href="http://infinote.0x539.de/libinfinity/API/libinfinity/InfIo.html"><span class="type">InfIo</span></a> *io</code></em>,
122
<em class="parameter"><code><a href="http://infinote.0x539.de/libinfinity/API/libinfinity/InfSession.html#InfSessionStatus"><span class="type">InfSessionStatus</span></a> status</code></em>,
123
<em class="parameter"><code><a href="http://infinote.0x539.de/libinfinity/API/libinfinity/InfCommunicationGroup.html"><span class="type">InfCommunicationGroup</span></a> *sync_group</code></em>,
124
<em class="parameter"><code><a href="http://infinote.0x539.de/libinfinity/API/libinfinity/InfXmlConnection.html"><span class="type">InfXmlConnection</span></a> *sync_connection</code></em>);</pre>
126
Creates a new <a class="link" href="libinftext-0.5-inf-text-session.html#InfTextSession"><span class="type">InfTextSession</span></a>. The communication manager is used to send
127
and receive requests from subscription and synchronization. <em class="parameter"><code>buffer</code></em> will be
128
set to be initially empty if the session is initially synchronized
129
(see below). <em class="parameter"><code>io</code></em> is required to trigger timeouts.
132
If <em class="parameter"><code>status</code></em> is <a href="http://infinote.0x539.de/libinfinity/API/libinfinity/InfSession.html#INF-SESSION-PRESYNC:CAPS"><code class="literal">INF_SESSION_PRESYNC</code></a> or <a href="http://infinote.0x539.de/libinfinity/API/libinfinity/InfSession.html#INF-SESSION-SYNCHRONIZING:CAPS"><code class="literal">INF_SESSION_SYNCHRONIZING</code></a>, then the
133
session will initially be sychronized, meaning the initial content is
134
retrieved from <em class="parameter"><code>sync_connection</code></em>. If you are subscribed to the session, set
135
the subscription group via <a href="http://infinote.0x539.de/libinfinity/API/libinfinity/InfSession.html#inf-session-set-subscription-group"><code class="function">inf_session_set_subscription_group()</code></a>.
137
<div class="variablelist"><table border="0">
138
<col align="left" valign="top">
141
<td><p><span class="term"><em class="parameter"><code>manager</code></em> :</span></p></td>
142
<td>A <a href="http://infinote.0x539.de/libinfinity/API/libinfinity/InfCommunicationManager.html"><span class="type">InfCommunicationManager</span></a>.</td>
145
<td><p><span class="term"><em class="parameter"><code>buffer</code></em> :</span></p></td>
146
<td>An initial <a class="link" href="libinftext-0.5-inf-text-buffer.html#InfTextBuffer"><span class="type">InfTextBuffer</span></a>.</td>
149
<td><p><span class="term"><em class="parameter"><code>io</code></em> :</span></p></td>
150
<td>A <a href="http://infinote.0x539.de/libinfinity/API/libinfinity/InfIo.html"><span class="type">InfIo</span></a> object.</td>
153
<td><p><span class="term"><em class="parameter"><code>status</code></em> :</span></p></td>
154
<td>The initial status of the session.</td>
157
<td><p><span class="term"><em class="parameter"><code>sync_group</code></em> :</span></p></td>
158
<td>A group in which the session is synchronized. Ignored if
159
<em class="parameter"><code>status</code></em> is <a href="http://infinote.0x539.de/libinfinity/API/libinfinity/InfSession.html#INF-SESSION-RUNNING:CAPS"><code class="literal">INF_SESSION_RUNNING</code></a>.</td>
162
<td><p><span class="term"><em class="parameter"><code>sync_connection</code></em> :</span></p></td>
163
<td>A connection to synchronize the session from. Ignored if
164
<em class="parameter"><code>status</code></em> is <a href="http://infinote.0x539.de/libinfinity/API/libinfinity/InfSession.html#INF-SESSION-RUNNING:CAPS"><code class="literal">INF_SESSION_RUNNING</code></a>.</td>
167
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
168
<td>A new <a class="link" href="libinftext-0.5-inf-text-session.html#InfTextSession"><span class="type">InfTextSession</span></a>.</td>
174
<div class="refsect2">
175
<a name="inf-text-session-new-with-user-table"></a><h3>inf_text_session_new_with_user_table ()</h3>
176
<pre class="programlisting"><a class="link" href="libinftext-0.5-inf-text-session.html#InfTextSession"><span class="returnvalue">InfTextSession</span></a> * inf_text_session_new_with_user_table
177
(<em class="parameter"><code><a href="http://infinote.0x539.de/libinfinity/API/libinfinity/InfCommunicationManager.html"><span class="type">InfCommunicationManager</span></a> *manager</code></em>,
178
<em class="parameter"><code><a class="link" href="libinftext-0.5-inf-text-buffer.html#InfTextBuffer"><span class="type">InfTextBuffer</span></a> *buffer</code></em>,
179
<em class="parameter"><code><a href="http://infinote.0x539.de/libinfinity/API/libinfinity/InfIo.html"><span class="type">InfIo</span></a> *io</code></em>,
180
<em class="parameter"><code><a href="http://infinote.0x539.de/libinfinity/API/libinfinity/InfUserTable.html"><span class="type">InfUserTable</span></a> *user_table</code></em>,
181
<em class="parameter"><code><a href="http://infinote.0x539.de/libinfinity/API/libinfinity/InfSession.html#InfSessionStatus"><span class="type">InfSessionStatus</span></a> status</code></em>,
182
<em class="parameter"><code><a href="http://infinote.0x539.de/libinfinity/API/libinfinity/InfCommunicationGroup.html"><span class="type">InfCommunicationGroup</span></a> *sync_group</code></em>,
183
<em class="parameter"><code><a href="http://infinote.0x539.de/libinfinity/API/libinfinity/InfXmlConnection.html"><span class="type">InfXmlConnection</span></a> *sync_connection</code></em>);</pre>
185
Creates a new <a class="link" href="libinftext-0.5-inf-text-session.html#InfTextSession"><span class="type">InfTextSession</span></a>. The connection manager is used to send and
186
receive requests from subscription and synchronization. <em class="parameter"><code>buffer</code></em> will be
187
set to be initially empty if the session is initially synchronized
188
(see below). <em class="parameter"><code>io</code></em> is required to trigger timeouts.
191
If <em class="parameter"><code>status</code></em> is <a href="http://infinote.0x539.de/libinfinity/API/libinfinity/InfSession.html#INF-SESSION-PRESYNC:CAPS"><code class="literal">INF_SESSION_PRESYNC</code></a> or <a href="http://infinote.0x539.de/libinfinity/API/libinfinity/InfSession.html#INF-SESSION-SYNCHRONIZING:CAPS"><code class="literal">INF_SESSION_SYNCHRONIZING</code></a>, then the
192
session will initially be sychronized, meaning the initial content is
193
retrieved from <em class="parameter"><code>sync_connection</code></em>. If you are subscribed to the session, set
194
the subscription group via <a href="http://infinote.0x539.de/libinfinity/API/libinfinity/InfSession.html#inf-session-set-subscription-group"><code class="function">inf_session_set_subscription_group()</code></a>.
197
<em class="parameter"><code>user_table</code></em> is used as an initial user table. The user table should only
198
contain unavailable users, if any, that may rejoin during the session. If
199
there was an available user in the user table, it would probably belong
200
to another session, but different sessions cannot share the same user
203
<div class="variablelist"><table border="0">
204
<col align="left" valign="top">
207
<td><p><span class="term"><em class="parameter"><code>manager</code></em> :</span></p></td>
208
<td>A <a href="http://infinote.0x539.de/libinfinity/API/libinfinity/InfCommunicationManager.html"><span class="type">InfCommunicationManager</span></a>.</td>
211
<td><p><span class="term"><em class="parameter"><code>buffer</code></em> :</span></p></td>
212
<td>An initial <a class="link" href="libinftext-0.5-inf-text-buffer.html#InfTextBuffer"><span class="type">InfTextBuffer</span></a>.</td>
215
<td><p><span class="term"><em class="parameter"><code>io</code></em> :</span></p></td>
216
<td>A <a href="http://infinote.0x539.de/libinfinity/API/libinfinity/InfIo.html"><span class="type">InfIo</span></a> object.</td>
219
<td><p><span class="term"><em class="parameter"><code>user_table</code></em> :</span></p></td>
220
<td>A <a href="http://infinote.0x539.de/libinfinity/API/libinfinity/InfUserTable.html"><span class="type">InfUserTable</span></a>.</td>
223
<td><p><span class="term"><em class="parameter"><code>status</code></em> :</span></p></td>
224
<td>The initial status for the session.</td>
227
<td><p><span class="term"><em class="parameter"><code>sync_group</code></em> :</span></p></td>
228
<td>A group in which the session is synchronized. Ignored if
229
<em class="parameter"><code>status</code></em> is <a href="http://infinote.0x539.de/libinfinity/API/libinfinity/InfSession.html#INF-SESSION-RUNNING:CAPS"><code class="literal">INF_SESSION_RUNNING</code></a>.</td>
232
<td><p><span class="term"><em class="parameter"><code>sync_connection</code></em> :</span></p></td>
233
<td>A connection to synchronize the session from. Ignored if
234
<em class="parameter"><code>status</code></em> is <a href="http://infinote.0x539.de/libinfinity/API/libinfinity/InfSession.html#INF-SESSION-RUNNING:CAPS"><code class="literal">INF_SESSION_RUNNING</code></a>.</td>
237
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
238
<td>A new <a class="link" href="libinftext-0.5-inf-text-session.html#InfTextSession"><span class="type">InfTextSession</span></a>.</td>
244
<div class="refsect2">
245
<a name="inf-text-session-set-user-color"></a><h3>inf_text_session_set_user_color ()</h3>
246
<pre class="programlisting"><span class="returnvalue">void</span> inf_text_session_set_user_color (<em class="parameter"><code><a class="link" href="libinftext-0.5-inf-text-session.html#InfTextSession"><span class="type">InfTextSession</span></a> *session</code></em>,
247
<em class="parameter"><code><a class="link" href="InfTextUser.html" title="InfTextUser"><span class="type">InfTextUser</span></a> *user</code></em>,
248
<em class="parameter"><code><span class="type">gdouble</span> hue</code></em>);</pre>
250
Changes the user color of <em class="parameter"><code>user</code></em>. <em class="parameter"><code>user</code></em> must have the <code class="literal">INF_USER_LOCAL</code> flag
253
<div class="variablelist"><table border="0">
254
<col align="left" valign="top">
257
<td><p><span class="term"><em class="parameter"><code>session</code></em> :</span></p></td>
258
<td>A <a class="link" href="libinftext-0.5-inf-text-session.html#InfTextSession"><span class="type">InfTextSession</span></a>.</td>
261
<td><p><span class="term"><em class="parameter"><code>user</code></em> :</span></p></td>
262
<td>A local <a class="link" href="InfTextUser.html" title="InfTextUser"><span class="type">InfTextUser</span></a> from <em class="parameter"><code>session</code></em>'s user table.</td>
265
<td><p><span class="term"><em class="parameter"><code>hue</code></em> :</span></p></td>
266
<td>New hue value for <em class="parameter"><code>user</code></em>'s color. Ranges from 0.0 (red) to 1.0 (red).</td>
272
<div class="refsect2">
273
<a name="inf-text-session-flush-requests-for-user"></a><h3>inf_text_session_flush_requests_for_user ()</h3>
274
<pre class="programlisting"><span class="returnvalue">void</span> inf_text_session_flush_requests_for_user
275
(<em class="parameter"><code><a class="link" href="libinftext-0.5-inf-text-session.html#InfTextSession"><span class="type">InfTextSession</span></a> *session</code></em>,
276
<em class="parameter"><code><a class="link" href="InfTextUser.html" title="InfTextUser"><span class="type">InfTextUser</span></a> *user</code></em>);</pre>
278
This function sends all pending requests for <em class="parameter"><code>user</code></em> immediately. Requests
279
that modify the buffer are not queued normally, but cursor movement
280
requests are delayed in case are issued frequently, to save bandwidth.
283
The main purpose of this function is to send all pending requests before
284
changing a user's status to inactive or unavailable since inactive users
285
are automatically activated as soon as they issue a request.
288
TODO: We should probably detect this automatically, without requiring
289
people to call this function, i.e. flush requests for local users just
290
before they become inactive.
293
<em class="parameter"><code>user</code></em> must have the <code class="literal">INF_USER_LOCAL</code> flag set.
295
<div class="variablelist"><table border="0">
296
<col align="left" valign="top">
299
<td><p><span class="term"><em class="parameter"><code>session</code></em> :</span></p></td>
300
<td>A <a class="link" href="libinftext-0.5-inf-text-session.html#InfTextSession"><span class="type">InfTextSession</span></a>.</td>
303
<td><p><span class="term"><em class="parameter"><code>user</code></em> :</span></p></td>
304
<td>The <a class="link" href="InfTextUser.html" title="InfTextUser"><span class="type">InfTextUser</span></a> for which to flush messages.</td>
310
<div class="refsect1">
311
<a name="libinftext-0.5-inf-text-session.property-details"></a><h2>Property Details</h2>
312
<div class="refsect2">
313
<a name="InfTextSession--caret-update-interval"></a><h3>The <code class="literal">"caret-update-interval"</code> property</h3>
314
<pre class="programlisting"> "caret-update-interval" <span class="type">guint</span> : Read / Write / Construct</pre>
315
<p>Minimum number of milliseconds between caret update broadcasts.</p>
316
<p>Default value: 500</p>
322
Generated by GTK-Doc V1.17</div>
b'\\ No newline at end of file'