This file is indexed.

/usr/share/gtk-doc/html/libinfinity-0.5/InfAdoptedOperation.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
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>InfAdoptedOperation</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="ch03.html" title="Libinfinity's adOPTed implementation">
<link rel="prev" href="InfAdoptedRequest.html" title="InfAdoptedRequest">
<link rel="next" href="InfAdoptedNoOperation.html" title="InfAdoptedNoOperation">
<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="InfAdoptedRequest.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td>
<td><a accesskey="u" href="ch03.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="InfAdoptedNoOperation.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td>
</tr>
<tr><td colspan="5" class="shortcuts">
<a href="#InfAdoptedOperation.synopsis" class="shortcut">Top</a>
                   | 
                  <a href="#InfAdoptedOperation.description" class="shortcut">Description</a>
                   | 
                  <a href="#InfAdoptedOperation.object-hierarchy" class="shortcut">Object Hierarchy</a>
                   | 
                  <a href="#InfAdoptedOperation.prerequisites" class="shortcut">Prerequisites</a>
                   | 
                  <a href="#InfAdoptedOperation.implementations" class="shortcut">Known Implementations</a>
</td></tr>
</table>
<div class="refentry">
<a name="InfAdoptedOperation"></a><div class="titlepage"></div>
<div class="refnamediv"><table width="100%"><tr>
<td valign="top">
<h2><span class="refentrytitle"><a name="InfAdoptedOperation.top_of_page"></a>InfAdoptedOperation</span></h2>
<p>InfAdoptedOperation — Operation that can be processed by
<a class="link" href="InfAdoptedAlgorithm.html" title="InfAdoptedAlgorithm"><span class="type">InfAdoptedAlgorithm</span></a>.</p>
</td>
<td valign="top" align="right"></td>
</tr></table></div>
<div class="refsect1">
<a name="InfAdoptedOperation.stability-level"></a><h2>Stability Level</h2>
Unstable, unless otherwise indicated
</div>
<div class="refsynopsisdiv">
<a name="InfAdoptedOperation.synopsis"></a><h2>Synopsis</h2>
<a name="InfAdoptedOperationFlags"></a><a name="InfAdoptedConcurrencyId"></a><pre class="synopsis">
#include &lt;libinfinity/adopted/inf-adopted-operation.h&gt;

                    <a class="link" href="InfAdoptedOperation.html#InfAdoptedOperation-struct" title="InfAdoptedOperation">InfAdoptedOperation</a>;
struct              <a class="link" href="InfAdoptedOperation.html#InfAdoptedOperationIface" title="struct InfAdoptedOperationIface">InfAdoptedOperationIface</a>;
enum                <a class="link" href="InfAdoptedOperation.html#InfAdoptedOperationFlags-enum" title="enum InfAdoptedOperationFlags">InfAdoptedOperationFlags</a>;
enum                <a class="link" href="InfAdoptedOperation.html#InfAdoptedConcurrencyId-enum" title="enum InfAdoptedConcurrencyId">InfAdoptedConcurrencyId</a>;
<span class="returnvalue">gboolean</span>            <a class="link" href="InfAdoptedOperation.html#inf-adopted-operation-need-concurrency-id" title="inf_adopted_operation_need_concurrency_id ()">inf_adopted_operation_need_concurrency_id</a>
                                                        (<em class="parameter"><code><a class="link" href="InfAdoptedOperation.html" title="InfAdoptedOperation"><span class="type">InfAdoptedOperation</span></a> *operation</code></em>,
                                                         <em class="parameter"><code><a class="link" href="InfAdoptedOperation.html" title="InfAdoptedOperation"><span class="type">InfAdoptedOperation</span></a> *against</code></em>);
<a class="link" href="InfAdoptedOperation.html#InfAdoptedConcurrencyId"><span class="returnvalue">InfAdoptedConcurrencyId</span></a> <a class="link" href="InfAdoptedOperation.html#inf-adopted-operation-get-concurrency-id" title="inf_adopted_operation_get_concurrency_id ()">inf_adopted_operation_get_concurrency_id</a>
                                                        (<em class="parameter"><code><a class="link" href="InfAdoptedOperation.html" title="InfAdoptedOperation"><span class="type">InfAdoptedOperation</span></a> *operation</code></em>,
                                                         <em class="parameter"><code><a class="link" href="InfAdoptedOperation.html" title="InfAdoptedOperation"><span class="type">InfAdoptedOperation</span></a> *against</code></em>);
<a class="link" href="InfAdoptedOperation.html" title="InfAdoptedOperation"><span class="returnvalue">InfAdoptedOperation</span></a> * <a class="link" href="InfAdoptedOperation.html#inf-adopted-operation-transform" title="inf_adopted_operation_transform ()">inf_adopted_operation_transform</a>   (<em class="parameter"><code><a class="link" href="InfAdoptedOperation.html" title="InfAdoptedOperation"><span class="type">InfAdoptedOperation</span></a> *operation</code></em>,
                                                         <em class="parameter"><code><a class="link" href="InfAdoptedOperation.html" title="InfAdoptedOperation"><span class="type">InfAdoptedOperation</span></a> *against</code></em>,
                                                         <em class="parameter"><code><span class="type">gint</span> concurrency_id</code></em>);
<a class="link" href="InfAdoptedOperation.html" title="InfAdoptedOperation"><span class="returnvalue">InfAdoptedOperation</span></a> * <a class="link" href="InfAdoptedOperation.html#inf-adopted-operation-copy" title="inf_adopted_operation_copy ()">inf_adopted_operation_copy</a>        (<em class="parameter"><code><a class="link" href="InfAdoptedOperation.html" title="InfAdoptedOperation"><span class="type">InfAdoptedOperation</span></a> *operation</code></em>);
<a class="link" href="InfAdoptedOperation.html#InfAdoptedOperationFlags"><span class="returnvalue">InfAdoptedOperationFlags</span></a> <a class="link" href="InfAdoptedOperation.html#inf-adopted-operation-get-flags" title="inf_adopted_operation_get_flags ()">inf_adopted_operation_get_flags</a>
                                                        (<em class="parameter"><code><a class="link" href="InfAdoptedOperation.html" title="InfAdoptedOperation"><span class="type">InfAdoptedOperation</span></a> *operation</code></em>);
<span class="returnvalue">void</span>                <a class="link" href="InfAdoptedOperation.html#inf-adopted-operation-apply" title="inf_adopted_operation_apply ()">inf_adopted_operation_apply</a>         (<em class="parameter"><code><a class="link" href="InfAdoptedOperation.html" title="InfAdoptedOperation"><span class="type">InfAdoptedOperation</span></a> *operation</code></em>,
                                                         <em class="parameter"><code><a class="link" href="InfAdoptedUser.html" title="InfAdoptedUser"><span class="type">InfAdoptedUser</span></a> *by</code></em>,
                                                         <em class="parameter"><code><a class="link" href="InfBuffer.html" title="InfBuffer"><span class="type">InfBuffer</span></a> *buffer</code></em>);
<span class="returnvalue">gboolean</span>            <a class="link" href="InfAdoptedOperation.html#inf-adopted-operation-is-reversible" title="inf_adopted_operation_is_reversible ()">inf_adopted_operation_is_reversible</a> (<em class="parameter"><code><a class="link" href="InfAdoptedOperation.html" title="InfAdoptedOperation"><span class="type">InfAdoptedOperation</span></a> *operation</code></em>);
<a class="link" href="InfAdoptedOperation.html" title="InfAdoptedOperation"><span class="returnvalue">InfAdoptedOperation</span></a> * <a class="link" href="InfAdoptedOperation.html#inf-adopted-operation-revert" title="inf_adopted_operation_revert ()">inf_adopted_operation_revert</a>      (<em class="parameter"><code><a class="link" href="InfAdoptedOperation.html" title="InfAdoptedOperation"><span class="type">InfAdoptedOperation</span></a> *operation</code></em>);
<a class="link" href="InfAdoptedOperation.html" title="InfAdoptedOperation"><span class="returnvalue">InfAdoptedOperation</span></a> * <a class="link" href="InfAdoptedOperation.html#inf-adopted-operation-make-reversible" title="inf_adopted_operation_make_reversible ()">inf_adopted_operation_make_reversible</a>
                                                        (<em class="parameter"><code><a class="link" href="InfAdoptedOperation.html" title="InfAdoptedOperation"><span class="type">InfAdoptedOperation</span></a> *operation</code></em>,
                                                         <em class="parameter"><code><a class="link" href="InfAdoptedOperation.html" title="InfAdoptedOperation"><span class="type">InfAdoptedOperation</span></a> *with</code></em>,
                                                         <em class="parameter"><code><a class="link" href="InfBuffer.html" title="InfBuffer"><span class="type">InfBuffer</span></a> *buffer</code></em>);
</pre>
</div>
<div class="refsect1">
<a name="InfAdoptedOperation.object-hierarchy"></a><h2>Object Hierarchy</h2>
<pre class="synopsis">
  GInterface
   +----InfAdoptedOperation
</pre>
<pre class="synopsis">
  GFlags
   +----InfAdoptedOperationFlags
</pre>
<pre class="synopsis">
  GEnum
   +----InfAdoptedConcurrencyId
</pre>
</div>
<div class="refsect1">
<a name="InfAdoptedOperation.prerequisites"></a><h2>Prerequisites</h2>
<p>
InfAdoptedOperation requires
 GObject.</p>
</div>
<div class="refsect1">
<a name="InfAdoptedOperation.implementations"></a><h2>Known Implementations</h2>
<p>
InfAdoptedOperation is implemented by
 <a class="link" href="InfAdoptedNoOperation.html" title="InfAdoptedNoOperation">InfAdoptedNoOperation</a> and  <a class="link" href="InfAdoptedSplitOperation.html" title="InfAdoptedSplitOperation">InfAdoptedSplitOperation</a>.</p>
</div>
<div class="refsect1">
<a name="InfAdoptedOperation.description"></a><h2>Description</h2>
<p>
The <a class="link" href="InfAdoptedOperation.html" title="InfAdoptedOperation"><span class="type">InfAdoptedOperation</span></a> interface must be implemented by operations that
are supposed to be used by <a class="link" href="InfAdoptedAlgorithm.html" title="InfAdoptedAlgorithm"><span class="type">InfAdoptedAlgorithm</span></a>. They basically need to
define transformation rules for transformation against other operations.
</p>
</div>
<div class="refsect1">
<a name="InfAdoptedOperation.details"></a><h2>Details</h2>
<div class="refsect2">
<a name="InfAdoptedOperation-struct"></a><h3>InfAdoptedOperation</h3>
<pre class="programlisting">typedef struct _InfAdoptedOperation InfAdoptedOperation;</pre>
<p>
<a class="link" href="InfAdoptedOperation.html" title="InfAdoptedOperation"><span class="type">InfAdoptedOperation</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="InfAdoptedOperationIface"></a><h3>struct InfAdoptedOperationIface</h3>
<pre class="programlisting">struct InfAdoptedOperationIface {
  gboolean (*need_concurrency_id)(InfAdoptedOperation* operation,
                                  InfAdoptedOperation* against);

  InfAdoptedConcurrencyId (*get_concurrency_id)(InfAdoptedOperation* op,
                                                InfAdoptedOperation* against);

  InfAdoptedOperation* (*transform)(InfAdoptedOperation* operation,
                                    InfAdoptedOperation* against,
                                    InfAdoptedConcurrencyId concurrency_id);

  InfAdoptedOperation* (*copy)(InfAdoptedOperation* operation);

  InfAdoptedOperationFlags (*get_flags)(InfAdoptedOperation* operation);

  void (*apply)(InfAdoptedOperation* operation,
                InfAdoptedUser* by,
                InfBuffer* buffer);

  InfAdoptedOperation* (*revert)(InfAdoptedOperation* operation);

  InfAdoptedOperation* (*make_reversible)(InfAdoptedOperation* operation,
                                          InfAdoptedOperation* with,
                                          InfBuffer* buffer);
};
</pre>
<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="structfield"><code><a name="InfAdoptedOperationIface.need-concurrency-id"></a>need_concurrency_id</code></em> ()</span></p></td>
<td>Virtual function to determine whether a concurrency
ID is required to transform <em class="parameter"><code>operation</code></em> against <em class="parameter"><code>against</code></em>.</td>
</tr>
<tr>
<td><p><span class="term"><em class="structfield"><code><a name="InfAdoptedOperationIface.get-concurrency-id"></a>get_concurrency_id</code></em> ()</span></p></td>
<td>Virtual function to obtain a concurrency ID for
transforming <em class="parameter"><code>op</code></em> against <em class="parameter"><code>against</code></em>.</td>
</tr>
<tr>
<td><p><span class="term"><em class="structfield"><code><a name="InfAdoptedOperationIface.transform"></a>transform</code></em> ()</span></p></td>
<td>Virtual function that transform <em class="parameter"><code>operation</code></em> against <em class="parameter"><code>against</code></em> and</td>
</tr>
<tr>
<td><p><span class="term"><em class="structfield"><code><a name="InfAdoptedOperationIface.copy"></a>copy</code></em> ()</span></p></td>
<td></td>
</tr>
<tr>
<td><p><span class="term"><em class="structfield"><code><a name="InfAdoptedOperationIface.get-flags"></a>get_flags</code></em> ()</span></p></td>
<td></td>
</tr>
<tr>
<td><p><span class="term"><em class="structfield"><code><a name="InfAdoptedOperationIface.apply"></a>apply</code></em> ()</span></p></td>
<td></td>
</tr>
<tr>
<td><p><span class="term"><em class="structfield"><code><a name="InfAdoptedOperationIface.revert"></a>revert</code></em> ()</span></p></td>
<td></td>
</tr>
<tr>
<td><p><span class="term"><em class="structfield"><code><a name="InfAdoptedOperationIface.make-reversible"></a>make_reversible</code></em> ()</span></p></td>
<td></td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="InfAdoptedOperationFlags-enum"></a><h3>enum InfAdoptedOperationFlags</h3>
<pre class="programlisting">typedef enum {
  INF_ADOPTED_OPERATION_AFFECTS_BUFFER = 1 &lt;&lt; 0,
  INF_ADOPTED_OPERATION_REVERSIBLE = 1 &lt;&lt; 1
} InfAdoptedOperationFlags;
</pre>
<p>
Various flags for <a class="link" href="InfAdoptedOperation.html" title="InfAdoptedOperation"><span class="type">InfAdoptedOperation</span></a>.
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><a name="INF-ADOPTED-OPERATION-AFFECTS-BUFFER:CAPS"></a><span class="term"><code class="literal">INF_ADOPTED_OPERATION_AFFECTS_BUFFER</code></span></p></td>
<td>The operation changes the content of
the buffer.
</td>
</tr>
<tr>
<td><p><a name="INF-ADOPTED-OPERATION-REVERSIBLE:CAPS"></a><span class="term"><code class="literal">INF_ADOPTED_OPERATION_REVERSIBLE</code></span></p></td>
<td>The operation is reversible, which means
that <a class="link" href="InfAdoptedOperation.html#inf-adopted-operation-revert" title="inf_adopted_operation_revert ()"><code class="function">inf_adopted_operation_revert()</code></a> can be called to generate an operation
that undoes the effect of the operation.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="InfAdoptedConcurrencyId-enum"></a><h3>enum InfAdoptedConcurrencyId</h3>
<pre class="programlisting">typedef enum {
  INF_ADOPTED_CONCURRENCY_SELF = 1,
  INF_ADOPTED_CONCURRENCY_NONE = 0,
  INF_ADOPTED_CONCURRENCY_OTHER = -1
} InfAdoptedConcurrencyId;
</pre>
<p>
A concurrency ID is used to determine which operation to transform in case
two similar operations are transformed against each other.
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><a name="INF-ADOPTED-CONCURRENCY-SELF:CAPS"></a><span class="term"><code class="literal">INF_ADOPTED_CONCURRENCY_SELF</code></span></p></td>
<td>Transform the operation itself.
</td>
</tr>
<tr>
<td><p><a name="INF-ADOPTED-CONCURRENCY-NONE:CAPS"></a><span class="term"><code class="literal">INF_ADOPTED_CONCURRENCY_NONE</code></span></p></td>
<td>Unspecified which operation to transform.
</td>
</tr>
<tr>
<td><p><a name="INF-ADOPTED-CONCURRENCY-OTHER:CAPS"></a><span class="term"><code class="literal">INF_ADOPTED_CONCURRENCY_OTHER</code></span></p></td>
<td>Transform the other operation.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="inf-adopted-operation-need-concurrency-id"></a><h3>inf_adopted_operation_need_concurrency_id ()</h3>
<pre class="programlisting"><span class="returnvalue">gboolean</span>            inf_adopted_operation_need_concurrency_id
                                                        (<em class="parameter"><code><a class="link" href="InfAdoptedOperation.html" title="InfAdoptedOperation"><span class="type">InfAdoptedOperation</span></a> *operation</code></em>,
                                                         <em class="parameter"><code><a class="link" href="InfAdoptedOperation.html" title="InfAdoptedOperation"><span class="type">InfAdoptedOperation</span></a> *against</code></em>);</pre>
<p>
This function returns whether transforming <em class="parameter"><code>operation</code></em> against <em class="parameter"><code>against</code></em>
is not defined unambiguously. In that case, transformation requires a
so-called concurrency ID which determines which of the two operations
is transformed.
</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>operation</code></em> :</span></p></td>
<td>The <a class="link" href="InfAdoptedOperation.html" title="InfAdoptedOperation"><span class="type">InfAdoptedOperation</span></a> to transform.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>against</code></em> :</span></p></td>
<td>The operation to transform against.</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>Whether transformation of <em class="parameter"><code>operation</code></em> against <em class="parameter"><code>against</code></em> requires a
concurrency ID to be defined.</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="inf-adopted-operation-get-concurrency-id"></a><h3>inf_adopted_operation_get_concurrency_id ()</h3>
<pre class="programlisting"><a class="link" href="InfAdoptedOperation.html#InfAdoptedConcurrencyId"><span class="returnvalue">InfAdoptedConcurrencyId</span></a> inf_adopted_operation_get_concurrency_id
                                                        (<em class="parameter"><code><a class="link" href="InfAdoptedOperation.html" title="InfAdoptedOperation"><span class="type">InfAdoptedOperation</span></a> *operation</code></em>,
                                                         <em class="parameter"><code><a class="link" href="InfAdoptedOperation.html" title="InfAdoptedOperation"><span class="type">InfAdoptedOperation</span></a> *against</code></em>);</pre>
<p>
This function returns a concurrency ID for transformation of <em class="parameter"><code>operation</code></em>
against <em class="parameter"><code>against</code></em>. It always returns <a class="link" href="InfAdoptedOperation.html#INF-ADOPTED-CONCURRENCY-NONE:CAPS"><code class="literal">INF_ADOPTED_CONCURRENCY_NONE</code></a> when
<a class="link" href="InfAdoptedOperation.html#inf-adopted-operation-need-concurrency-id" title="inf_adopted_operation_need_concurrency_id ()"><code class="function">inf_adopted_operation_need_concurrency_id()</code></a> returns <code class="literal">TRUE</code> for
<em class="parameter"><code>operation</code></em> and <em class="parameter"><code>against</code></em> (but that's not necessarily true the other way
around), since it is not possible to decide which operation to transform
without any additional information.
</p>
<p>
However, the function can be called on the same operations in a previous
state. In some cases, a decision can be made based on those previous
operations. This can then be used as concurrency ID to call
<a class="link" href="InfAdoptedOperation.html#inf-adopted-operation-transform" title="inf_adopted_operation_transform ()"><code class="function">inf_adopted_operation_transform()</code></a>.
</p>
<p>
Note that the function is antisymmetric. If it returns
<a class="link" href="InfAdoptedOperation.html#INF-ADOPTED-CONCURRENCY-SELF:CAPS"><code class="literal">INF_ADOPTED_CONCURRENCY_SELF</code></a>, then it returns
<a class="link" href="InfAdoptedOperation.html#INF-ADOPTED-CONCURRENCY-OTHER:CAPS"><code class="literal">INF_ADOPTED_CONCURRENCY_OTHER</code></a> for swapped arguments.
</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>operation</code></em> :</span></p></td>
<td>The <a class="link" href="InfAdoptedOperation.html" title="InfAdoptedOperation"><span class="type">InfAdoptedOperation</span></a> to transform.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>against</code></em> :</span></p></td>
<td>The operation to transform against.</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>A concurrency ID between <em class="parameter"><code>operation</code></em> and <em class="parameter"><code>against</code></em>. Can be
<a class="link" href="InfAdoptedOperation.html#INF-ADOPTED-CONCURRENCY-NONE:CAPS"><code class="literal">INF_ADOPTED_CONCURRENCY_NONE</code></a> in case no decision can be made.</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="inf-adopted-operation-transform"></a><h3>inf_adopted_operation_transform ()</h3>
<pre class="programlisting"><a class="link" href="InfAdoptedOperation.html" title="InfAdoptedOperation"><span class="returnvalue">InfAdoptedOperation</span></a> * inf_adopted_operation_transform   (<em class="parameter"><code><a class="link" href="InfAdoptedOperation.html" title="InfAdoptedOperation"><span class="type">InfAdoptedOperation</span></a> *operation</code></em>,
                                                         <em class="parameter"><code><a class="link" href="InfAdoptedOperation.html" title="InfAdoptedOperation"><span class="type">InfAdoptedOperation</span></a> *against</code></em>,
                                                         <em class="parameter"><code><span class="type">gint</span> concurrency_id</code></em>);</pre>
<p>
Performs an inclusion transformation of <em class="parameter"><code>operation</code></em> against <em class="parameter"><code>against</code></em>,
meaning that the effect of <em class="parameter"><code>against</code></em> is included in <em class="parameter"><code>operation</code></em>.
</p>
<p>
If <a class="link" href="InfAdoptedOperation.html#inf-adopted-operation-need-concurrency-id" title="inf_adopted_operation_need_concurrency_id ()"><code class="function">inf_adopted_operation_need_concurrency_id()</code></a> returns <code class="literal">TRUE</code> for <em class="parameter"><code>operation</code></em>
and <em class="parameter"><code>against</code></em>, then <em class="parameter"><code>concurrency_id</code></em> must not be
<a class="link" href="InfAdoptedOperation.html#INF-ADOPTED-CONCURRENCY-NONE:CAPS"><code class="literal">INF_ADOPTED_CONCURRENCY_NONE</code></a>. Otherwise, the parameter is ignored.
</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>operation</code></em> :</span></p></td>
<td>The <a class="link" href="InfAdoptedOperation.html" title="InfAdoptedOperation"><span class="type">InfAdoptedOperation</span></a> to transform.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>against</code></em> :</span></p></td>
<td>The operation to transform against.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>concurrency_id</code></em> :</span></p></td>
<td>The concurrency ID for the transformation.</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>The transformed <a class="link" href="InfAdoptedOperation.html" title="InfAdoptedOperation"><span class="type">InfAdoptedOperation</span></a>, or <code class="literal">NULL</code> if the
transformation failed.</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="inf-adopted-operation-copy"></a><h3>inf_adopted_operation_copy ()</h3>
<pre class="programlisting"><a class="link" href="InfAdoptedOperation.html" title="InfAdoptedOperation"><span class="returnvalue">InfAdoptedOperation</span></a> * inf_adopted_operation_copy        (<em class="parameter"><code><a class="link" href="InfAdoptedOperation.html" title="InfAdoptedOperation"><span class="type">InfAdoptedOperation</span></a> *operation</code></em>);</pre>
<p>
Returns a copy of <em class="parameter"><code>operation</code></em>.
</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>operation</code></em> :</span></p></td>
<td>The <a class="link" href="InfAdoptedOperation.html" title="InfAdoptedOperation"><span class="type">InfAdoptedOperation</span></a> to copy.</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>A copy of <em class="parameter"><code>operation</code></em>.</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="inf-adopted-operation-get-flags"></a><h3>inf_adopted_operation_get_flags ()</h3>
<pre class="programlisting"><a class="link" href="InfAdoptedOperation.html#InfAdoptedOperationFlags"><span class="returnvalue">InfAdoptedOperationFlags</span></a> inf_adopted_operation_get_flags
                                                        (<em class="parameter"><code><a class="link" href="InfAdoptedOperation.html" title="InfAdoptedOperation"><span class="type">InfAdoptedOperation</span></a> *operation</code></em>);</pre>
<p>
Returns the flags for <em class="parameter"><code>operation</code></em>.
</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>operation</code></em> :</span></p></td>
<td>A <a class="link" href="InfAdoptedOperation.html" title="InfAdoptedOperation"><span class="type">InfAdoptedOperation</span></a>.</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>
<a class="link" href="InfAdoptedOperation.html#InfAdoptedOperationFlags"><span class="type">InfAdoptedOperationFlags</span></a> for <em class="parameter"><code>operation</code></em>.</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="inf-adopted-operation-apply"></a><h3>inf_adopted_operation_apply ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                inf_adopted_operation_apply         (<em class="parameter"><code><a class="link" href="InfAdoptedOperation.html" title="InfAdoptedOperation"><span class="type">InfAdoptedOperation</span></a> *operation</code></em>,
                                                         <em class="parameter"><code><a class="link" href="InfAdoptedUser.html" title="InfAdoptedUser"><span class="type">InfAdoptedUser</span></a> *by</code></em>,
                                                         <em class="parameter"><code><a class="link" href="InfBuffer.html" title="InfBuffer"><span class="type">InfBuffer</span></a> *buffer</code></em>);</pre>
<p>
Applies <em class="parameter"><code>operation</code></em> to <em class="parameter"><code>buffer</code></em>. The operation is considered to be applied by
user <em class="parameter"><code>by</code></em>.
</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>operation</code></em> :</span></p></td>
<td>A <a class="link" href="InfAdoptedOperation.html" title="InfAdoptedOperation"><span class="type">InfAdoptedOperation</span></a>.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>by</code></em> :</span></p></td>
<td>A <a class="link" href="InfAdoptedUser.html" title="InfAdoptedUser"><span class="type">InfAdoptedUser</span></a>.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>buffer</code></em> :</span></p></td>
<td>The <a class="link" href="InfBuffer.html" title="InfBuffer"><span class="type">InfBuffer</span></a> to apply the operation to.</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="inf-adopted-operation-is-reversible"></a><h3>inf_adopted_operation_is_reversible ()</h3>
<pre class="programlisting"><span class="returnvalue">gboolean</span>            inf_adopted_operation_is_reversible (<em class="parameter"><code><a class="link" href="InfAdoptedOperation.html" title="InfAdoptedOperation"><span class="type">InfAdoptedOperation</span></a> *operation</code></em>);</pre>
<p>
Returns whether <em class="parameter"><code>operation</code></em> is reversible.
</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>operation</code></em> :</span></p></td>
<td>A <a class="link" href="InfAdoptedOperation.html" title="InfAdoptedOperation"><span class="type">InfAdoptedOperation</span></a>.</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>Whether <em class="parameter"><code>operation</code></em> is reversible.</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="inf-adopted-operation-revert"></a><h3>inf_adopted_operation_revert ()</h3>
<pre class="programlisting"><a class="link" href="InfAdoptedOperation.html" title="InfAdoptedOperation"><span class="returnvalue">InfAdoptedOperation</span></a> * inf_adopted_operation_revert      (<em class="parameter"><code><a class="link" href="InfAdoptedOperation.html" title="InfAdoptedOperation"><span class="type">InfAdoptedOperation</span></a> *operation</code></em>);</pre>
<p>
Returns a new <a class="link" href="InfAdoptedOperation.html" title="InfAdoptedOperation"><span class="type">InfAdoptedOperation</span></a> that undoes the effect of <em class="parameter"><code>operation</code></em>. If
<em class="parameter"><code>operation</code></em> and then its reverse operation are applied to a buffer (in that
order), the buffer remains unchanged.
</p>
<p>
<em class="parameter"><code>operation</code></em> must be reversible for this function to be called (i.e.
<a class="link" href="InfAdoptedOperation.html#inf-adopted-operation-is-reversible" title="inf_adopted_operation_is_reversible ()"><code class="function">inf_adopted_operation_is_reversible()</code></a> must return TRUE).
</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>operation</code></em> :</span></p></td>
<td>A <a class="link" href="InfAdoptedOperation.html" title="InfAdoptedOperation"><span class="type">InfAdoptedOperation</span></a>.</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>The reverse operation of <em class="parameter"><code>operation</code></em>.</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="inf-adopted-operation-make-reversible"></a><h3>inf_adopted_operation_make_reversible ()</h3>
<pre class="programlisting"><a class="link" href="InfAdoptedOperation.html" title="InfAdoptedOperation"><span class="returnvalue">InfAdoptedOperation</span></a> * inf_adopted_operation_make_reversible
                                                        (<em class="parameter"><code><a class="link" href="InfAdoptedOperation.html" title="InfAdoptedOperation"><span class="type">InfAdoptedOperation</span></a> *operation</code></em>,
                                                         <em class="parameter"><code><a class="link" href="InfAdoptedOperation.html" title="InfAdoptedOperation"><span class="type">InfAdoptedOperation</span></a> *with</code></em>,
                                                         <em class="parameter"><code><a class="link" href="InfBuffer.html" title="InfBuffer"><span class="type">InfBuffer</span></a> *buffer</code></em>);</pre>
<p>
Some operations may not be reversible, but can be made reversible with
some extra information such as another operation that collected
enough information while being transformed, and the current buffer.
</p>
<p>
This function can only be called when <em class="parameter"><code>operation</code></em> is not yet reversible
and returns a new operation that has the same effect as <em class="parameter"><code>operation</code></em>, but is
reversible.
</p>
<p>
For example, an operation that deletes some range of text in a text editor
is not reversible if it only stores the position and length of the range,
but can be made reversible when it looks up what there is at that position
in the buffer.
</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>operation</code></em> :</span></p></td>
<td>A <a class="link" href="InfAdoptedOperation.html" title="InfAdoptedOperation"><span class="type">InfAdoptedOperation</span></a>.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>with</code></em> :</span></p></td>
<td>Another <a class="link" href="InfAdoptedOperation.html" title="InfAdoptedOperation"><span class="type">InfAdoptedOperation</span></a> that emerged from <em class="parameter"><code>operation</code></em> by
transforming it.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>buffer</code></em> :</span></p></td>
<td>A <a class="link" href="InfBuffer.html" title="InfBuffer"><span class="type">InfBuffer</span></a>.</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>A reversible <a class="link" href="InfAdoptedOperation.html" title="InfAdoptedOperation"><span class="type">InfAdoptedOperation</span></a>, or <code class="literal">NULL</code> if <em class="parameter"><code>operation</code></em>
cannot be made reversible with the given transformed operation <em class="parameter"><code>with</code></em> and
<em class="parameter"><code>buffer</code></em>.</td>
</tr>
</tbody>
</table></div>
</div>
</div>
<div class="refsect1">
<a name="InfAdoptedOperation.see-also"></a><h2>See Also</h2>
<a class="link" href="InfAdoptedRequest.html" title="InfAdoptedRequest"><span class="type">InfAdoptedRequest</span></a>, <a class="link" href="InfAdoptedAlgorithm.html" title="InfAdoptedAlgorithm"><span class="type">InfAdoptedAlgorithm</span></a>
</div>
</div>
<div class="footer">
<hr>
          Generated by GTK-Doc V1.19</div>
</body>
</html>