This file is indexed.

/usr/share/gtk-doc/html/libinfinity-0.6/InfAdoptedOperation.html is in libinfinity-0.6-doc 0.6.7-1~deb8u1.

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
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>libinfinity-0.6 Reference Manual: InfAdoptedOperation</title>
<meta name="generator" content="DocBook XSL Stylesheets V1.78.1">
<link rel="home" href="index.html" title="libinfinity-0.6 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.21 (XML mode)">
<link rel="stylesheet" href="style.css" type="text/css">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="5"><tr valign="middle">
<td width="100%" align="left" class="shortcuts">
<a href="#" class="shortcut">Top</a><span id="nav_description">  <span class="dim">|</span> 
                  <a href="#InfAdoptedOperation.description" class="shortcut">Description</a></span><span id="nav_hierarchy">  <span class="dim">|</span> 
                  <a href="#InfAdoptedOperation.object-hierarchy" class="shortcut">Object Hierarchy</a></span><span id="nav_prerequisites">  <span class="dim">|</span> 
                  <a href="#InfAdoptedOperation.prerequisites" class="shortcut">Prerequisites</a></span><span id="nav_implementations">  <span class="dim">|</span> 
                  <a href="#InfAdoptedOperation.implementations" class="shortcut">Known Implementations</a></span>
</td>
<td><a accesskey="h" href="index.html"><img src="home.png" width="16" height="16" border="0" alt="Home"></a></td>
<td><a accesskey="u" href="ch03.html"><img src="up.png" width="16" height="16" border="0" alt="Up"></a></td>
<td><a accesskey="p" href="InfAdoptedRequest.html"><img src="left.png" width="16" height="16" border="0" alt="Prev"></a></td>
<td><a accesskey="n" href="InfAdoptedNoOperation.html"><img src="right.png" width="16" height="16" border="0" alt="Next"></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 class="gallery_image" valign="top" align="right"></td>
</tr></table></div>
<div class="refsect1">
<a name="InfAdoptedOperation.stability-level"></a><h2>Stability Level</h2>
<a href="http://foldoc.org/Unstable"><span class="acronym">Unstable</span></a>, unless otherwise indicated
</div>
<div class="refsect1">
<a name="InfAdoptedOperation.functions"></a><h2>Functions</h2>
<div class="informaltable"><table width="100%" border="0">
<colgroup>
<col width="150px" class="functions_return">
<col class="functions_name">
</colgroup>
<tbody>
<tr>
<td class="function_type">
<span class="returnvalue">gboolean</span>
</td>
<td class="function_name">
<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> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a class="link" href="InfAdoptedOperation.html" title="InfAdoptedOperation"><span class="returnvalue">InfAdoptedOperation</span></a> *
</td>
<td class="function_name">
<a class="link" href="InfAdoptedOperation.html#inf-adopted-operation-transform" title="inf_adopted_operation_transform ()">inf_adopted_operation_transform</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a class="link" href="InfAdoptedOperation.html" title="InfAdoptedOperation"><span class="returnvalue">InfAdoptedOperation</span></a> *
</td>
<td class="function_name">
<a class="link" href="InfAdoptedOperation.html#inf-adopted-operation-copy" title="inf_adopted_operation_copy ()">inf_adopted_operation_copy</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a class="link" href="InfAdoptedOperation.html#InfAdoptedOperationFlags" title="enum InfAdoptedOperationFlags"><span class="returnvalue">InfAdoptedOperationFlags</span></a>
</td>
<td class="function_name">
<a class="link" href="InfAdoptedOperation.html#inf-adopted-operation-get-flags" title="inf_adopted_operation_get_flags ()">inf_adopted_operation_get_flags</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">gboolean</span>
</td>
<td class="function_name">
<a class="link" href="InfAdoptedOperation.html#inf-adopted-operation-apply" title="inf_adopted_operation_apply ()">inf_adopted_operation_apply</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a class="link" href="InfAdoptedOperation.html" title="InfAdoptedOperation"><span class="returnvalue">InfAdoptedOperation</span></a> *
</td>
<td class="function_name">
<a class="link" href="InfAdoptedOperation.html#inf-adopted-operation-apply-transformed" title="inf_adopted_operation_apply_transformed ()">inf_adopted_operation_apply_transformed</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">gboolean</span>
</td>
<td class="function_name">
<a class="link" href="InfAdoptedOperation.html#inf-adopted-operation-is-reversible" title="inf_adopted_operation_is_reversible ()">inf_adopted_operation_is_reversible</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a class="link" href="InfAdoptedOperation.html" title="InfAdoptedOperation"><span class="returnvalue">InfAdoptedOperation</span></a> *
</td>
<td class="function_name">
<a class="link" href="InfAdoptedOperation.html#inf-adopted-operation-revert" title="inf_adopted_operation_revert ()">inf_adopted_operation_revert</a> <span class="c_punctuation">()</span>
</td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect1">
<a name="InfAdoptedOperation.other"></a><h2>Types and Values</h2>
<div class="informaltable"><table width="100%" border="0">
<colgroup>
<col width="150px" class="name">
<col class="description">
</colgroup>
<tbody>
<tr>
<td class="datatype_keyword"> </td>
<td class="function_name"><a class="link" href="InfAdoptedOperation.html#InfAdoptedOperation-struct" title="InfAdoptedOperation">InfAdoptedOperation</a></td>
</tr>
<tr>
<td class="datatype_keyword">struct</td>
<td class="function_name"><a class="link" href="InfAdoptedOperation.html#InfAdoptedOperationIface" title="struct InfAdoptedOperationIface">InfAdoptedOperationIface</a></td>
</tr>
<tr>
<td class="datatype_keyword">enum</td>
<td class="function_name"><a class="link" href="InfAdoptedOperation.html#InfAdoptedOperationFlags" title="enum InfAdoptedOperationFlags">InfAdoptedOperationFlags</a></td>
</tr>
<tr>
<td class="datatype_keyword">enum</td>
<td class="function_name"><a class="link" href="InfAdoptedOperation.html#InfAdoptedConcurrencyId" title="enum InfAdoptedConcurrencyId">InfAdoptedConcurrencyId</a></td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect1">
<a name="InfAdoptedOperation.object-hierarchy"></a><h2>Object Hierarchy</h2>
<pre class="screen">    GEnum
    <span class="lineart">╰──</span> InfAdoptedConcurrencyId
    GFlags
    <span class="lineart">╰──</span> InfAdoptedOperationFlags
    GInterface
    <span class="lineart">╰──</span> InfAdoptedOperation
</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.includes"></a><h2>Includes</h2>
<pre class="synopsis">#include &lt;libinfinity/adopted/inf-adopted-operation.h&gt;
</pre>
</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.functions_details"></a><h2>Functions</h2>
<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="refsect3">
<a name="id-1.4.9.11.2.5"></a><h4>Parameters</h4>
<div class="informaltable"><table width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>operation</p></td>
<td class="parameter_description"><p>The <a class="link" href="InfAdoptedOperation.html" title="InfAdoptedOperation"><span class="type">InfAdoptedOperation</span></a> to transform.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>against</p></td>
<td class="parameter_description"><p>The operation to transform against.</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="id-1.4.9.11.2.6"></a><h4>Returns</h4>
<p> 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.</p>
<p></p>
</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><a class="link" href="InfAdoptedOperation.html" title="InfAdoptedOperation"><span class="type">InfAdoptedOperation</span></a> *operation_lcs</code></em>,
                                 <em class="parameter"><code><a class="link" href="InfAdoptedOperation.html" title="InfAdoptedOperation"><span class="type">InfAdoptedOperation</span></a> *against_lcs</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>operation_lcs</code></em>
 and <em class="parameter"><code>against_lcs</code></em>
 must not be <code class="literal">NULL</code>. In
this case they must be the same operations as <em class="parameter"><code>operation</code></em>
 and <em class="parameter"><code>against</code></em>
 at
the earlierst state to which both of them can be transformed. This
information can then be used to resolve any conflicts in the transformation
of <em class="parameter"><code>operation</code></em>
 against <em class="parameter"><code>against</code></em>
.</p>
<p>The <em class="parameter"><code>concurrency_id</code></em>
 parameter is used 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> and no conflict
resolution can be deduced from <em class="parameter"><code>operation_lcs</code></em>
 and <em class="parameter"><code>against_lcs</code></em>
. In this
case <em class="parameter"><code>concurrency_id</code></em>
 defines a unique way to transform the two operations.
Usually, this is derived from the user IDs of the users who issued the two
conflicting operations.</p>
<div class="refsect3">
<a name="id-1.4.9.11.3.7"></a><h4>Parameters</h4>
<div class="informaltable"><table width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>operation</p></td>
<td class="parameter_description"><p>The <a class="link" href="InfAdoptedOperation.html" title="InfAdoptedOperation"><span class="type">InfAdoptedOperation</span></a> to transform.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>against</p></td>
<td class="parameter_description"><p>The operation to transform against.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>operation_lcs</p></td>
<td class="parameter_description"><p>The operation at a previous state, or <code class="literal">NULL</code>.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>against_lcs</p></td>
<td class="parameter_description"><p>The <em class="parameter"><code>against</code></em>
operation at a previous state, or <code class="literal">NULL</code>.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>concurrency_id</p></td>
<td class="parameter_description"><p>The concurrency ID for the transformation.</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="id-1.4.9.11.3.8"></a><h4>Returns</h4>
<p> 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.</p>
<p></p>
</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="refsect3">
<a name="id-1.4.9.11.4.5"></a><h4>Parameters</h4>
<div class="informaltable"><table width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>operation</p></td>
<td class="parameter_description"><p>The <a class="link" href="InfAdoptedOperation.html" title="InfAdoptedOperation"><span class="type">InfAdoptedOperation</span></a> to copy.</p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="id-1.4.9.11.4.6"></a><h4>Returns</h4>
<p> A copy of <em class="parameter"><code>operation</code></em>
.</p>
<p></p>
</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" title="enum 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="refsect3">
<a name="id-1.4.9.11.5.5"></a><h4>Parameters</h4>
<div class="informaltable"><table width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>operation</p></td>
<td class="parameter_description"><p>A <a class="link" href="InfAdoptedOperation.html" title="InfAdoptedOperation"><span class="type">InfAdoptedOperation</span></a>.</p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="id-1.4.9.11.5.6"></a><h4>Returns</h4>
<p> <a class="link" href="InfAdoptedOperation.html#InfAdoptedOperationFlags" title="enum InfAdoptedOperationFlags"><span class="type">InfAdoptedOperationFlags</span></a> for <em class="parameter"><code>operation</code></em>
.</p>
<p></p>
</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">gboolean</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>,
                             <em class="parameter"><code><span class="type">GError</span> **error</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>
. If the operation cannot be applied then <em class="parameter"><code>error</code></em>
 is set and the
function returns <code class="literal">FALSE</code>.</p>
<div class="refsect3">
<a name="id-1.4.9.11.6.5"></a><h4>Parameters</h4>
<div class="informaltable"><table width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>operation</p></td>
<td class="parameter_description"><p>A <a class="link" href="InfAdoptedOperation.html" title="InfAdoptedOperation"><span class="type">InfAdoptedOperation</span></a>.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>by</p></td>
<td class="parameter_description"><p>A <a class="link" href="InfAdoptedUser.html" title="InfAdoptedUser"><span class="type">InfAdoptedUser</span></a>.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>buffer</p></td>
<td class="parameter_description"><p>The <a class="link" href="InfBuffer.html" title="InfBuffer"><span class="type">InfBuffer</span></a> to apply the operation to.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>error</p></td>
<td class="parameter_description"><p>Location to store error information, if any, or <code class="literal">NULL</code>.</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="id-1.4.9.11.6.6"></a><h4>Returns</h4>
<p> <code class="literal">TRUE</code> on success or <code class="literal">FALSE</code> on error.</p>
<p></p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="inf-adopted-operation-apply-transformed"></a><h3>inf_adopted_operation_apply_transformed ()</h3>
<pre class="programlisting"><a class="link" href="InfAdoptedOperation.html" title="InfAdoptedOperation"><span class="returnvalue">InfAdoptedOperation</span></a> *
inf_adopted_operation_apply_transformed
                               (<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> *transformed</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>,
                                <em class="parameter"><code><span class="type">GError</span> **error</code></em>);</pre>
<p>Applies <em class="parameter"><code>transformed</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>
. The operation <em class="parameter"><code>transformed</code></em>
 must have originated from
<em class="parameter"><code>operation</code></em>
 by transformation with <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>If <em class="parameter"><code>operation</code></em>
 is reversible or does not affect the buffer (see
<a class="link" href="InfAdoptedOperation.html#InfAdoptedOperationFlags" title="enum InfAdoptedOperationFlags"><span class="type">InfAdoptedOperationFlags</span></a>), this function is equivalent to</p>
<code class="code">inf_adopted_operation_apply(transformed, by, buffer)</code>, with
<p>the exception of the return value. In that case the return value will be
<em class="parameter"><code>operation</code></em>
 itself, with a reference added.</p>
<p>However, if <em class="parameter"><code>operation</code></em>
 is not reversible and affects the buffer, the
function attempts to construct an operation which is identical to
<em class="parameter"><code>operation</code></em>
, but reversible, and returns it. The function can use
information from the transformed operation and the buffer to construct
the reversible operation. If a reversible operation cannot be constructed,
the function returns an additional reference on <em class="parameter"><code>operation</code></em>
, and still
applies the transformed operation
to the buffer.</p>
<p>For example, an operation that deletes text in a text editor would be
transmitting only the position and the length of the text to delete over
the network. From that information alone, the operation cannot be made
reversible. However, when the operation is applied to the buffer, the
actual text that is being removed can be restored by looking it up in
the buffer, making the operation reversible.</p>
<div class="refsect3">
<a name="id-1.4.9.11.7.10"></a><h4>Parameters</h4>
<div class="informaltable"><table width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>operation</p></td>
<td class="parameter_description"><p>A <a class="link" href="InfAdoptedOperation.html" title="InfAdoptedOperation"><span class="type">InfAdoptedOperation</span></a>.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>transformed</p></td>
<td class="parameter_description"><p>A transformed version of <em class="parameter"><code>operation</code></em>
.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>by</p></td>
<td class="parameter_description"><p>The <a class="link" href="InfAdoptedUser.html" title="InfAdoptedUser"><span class="type">InfAdoptedUser</span></a> applying the operation.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>buffer</p></td>
<td class="parameter_description"><p>The <a class="link" href="InfBuffer.html" title="InfBuffer"><span class="type">InfBuffer</span></a> to apply the operation to.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>error</p></td>
<td class="parameter_description"><p>Location to store error information, if any, or <code class="literal">NULL</code>.</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="id-1.4.9.11.7.11"></a><h4>Returns</h4>
<p> A <a class="link" href="InfAdoptedOperation.html" title="InfAdoptedOperation"><span class="type">InfAdoptedOperation</span></a>, or <code class="literal">NULL</code> on error. Free with
<code class="function">g_object_unref()</code> when no longer needed.</p>
<p></p>
</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="refsect3">
<a name="id-1.4.9.11.8.5"></a><h4>Parameters</h4>
<div class="informaltable"><table width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>operation</p></td>
<td class="parameter_description"><p>A <a class="link" href="InfAdoptedOperation.html" title="InfAdoptedOperation"><span class="type">InfAdoptedOperation</span></a>.</p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="id-1.4.9.11.8.6"></a><h4>Returns</h4>
<p> Whether <em class="parameter"><code>operation</code></em>
is reversible.</p>
<p></p>
</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="refsect3">
<a name="id-1.4.9.11.9.6"></a><h4>Parameters</h4>
<div class="informaltable"><table width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>operation</p></td>
<td class="parameter_description"><p>A <a class="link" href="InfAdoptedOperation.html" title="InfAdoptedOperation"><span class="type">InfAdoptedOperation</span></a>.</p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="id-1.4.9.11.9.7"></a><h4>Returns</h4>
<p> The reverse operation of <em class="parameter"><code>operation</code></em>
.</p>
<p></p>
</div>
</div>
</div>
<div class="refsect1">
<a name="InfAdoptedOperation.other_details"></a><h2>Types and Values</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);

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

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

  InfAdoptedOperationFlags (*get_flags)(InfAdoptedOperation* operation);

  gboolean (*apply)(InfAdoptedOperation* operation,
                    InfAdoptedUser* by,
                    InfBuffer* buffer,
                    GError** error);

  InfAdoptedOperation* (*apply_transformed)(InfAdoptedOperation* operation,
                                            InfAdoptedOperation* transformed,
                                            InfAdoptedUser* by,
                                            InfBuffer* buffer,
                                            GError** error);

  InfAdoptedOperation* (*revert)(InfAdoptedOperation* operation);
};
</pre>
<p>The virtual methods that need to be implemented by an operation to be used
with <a class="link" href="InfAdoptedAlgorithm.html" title="InfAdoptedAlgorithm"><span class="type">InfAdoptedAlgorithm</span></a>.</p>
<div class="refsect3">
<a name="id-1.4.9.12.3.5"></a><h4>Members</h4>
<div class="informaltable"><table width="100%" border="0">
<colgroup>
<col width="300px" class="struct_members_name">
<col class="struct_members_description">
<col width="200px" class="struct_members_annotations">
</colgroup>
<tbody>
<tr>
<td class="struct_member_name"><p><em class="structfield"><code><a name="InfAdoptedOperationIface.need-concurrency-id"></a>need_concurrency_id</code></em> ()</p></td>
<td class="struct_member_description"><p>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>
.</p></td>
<td class="struct_member_annotations"> </td>
</tr>
<tr>
<td class="struct_member_name"><p><em class="structfield"><code><a name="InfAdoptedOperationIface.transform"></a>transform</code></em> ()</p></td>
<td class="struct_member_description"><p>Virtual function that transform <em class="parameter"><code>operation</code></em>
against <em class="parameter"><code>against</code></em>
and
returns a new <a class="link" href="InfAdoptedOperation.html" title="InfAdoptedOperation"><span class="type">InfAdoptedOperation</span></a> as the result of the transformation.
<em class="parameter"><code>concurrency_id</code></em>
is either 1 or -1 and can be used to make a decision in
case there is no other criteria to decide how to do the transformation, for
example when both <em class="parameter"><code>operation</code></em>
and <em class="parameter"><code>against</code></em>
are inserting text at the same
position in the buffer.</p></td>
<td class="struct_member_annotations"> </td>
</tr>
<tr>
<td class="struct_member_name"><p><em class="structfield"><code><a name="InfAdoptedOperationIface.copy"></a>copy</code></em> ()</p></td>
<td class="struct_member_description"><p>Virtual function that returns a copy of the operation.</p></td>
<td class="struct_member_annotations"> </td>
</tr>
<tr>
<td class="struct_member_name"><p><em class="structfield"><code><a name="InfAdoptedOperationIface.get-flags"></a>get_flags</code></em> ()</p></td>
<td class="struct_member_description"><p>Virtual function that returns the flags of the operation,
see <a class="link" href="InfAdoptedOperation.html#InfAdoptedOperationFlags" title="enum InfAdoptedOperationFlags"><span class="type">InfAdoptedOperationFlags</span></a>.</p></td>
<td class="struct_member_annotations"> </td>
</tr>
<tr>
<td class="struct_member_name"><p><em class="structfield"><code><a name="InfAdoptedOperationIface.apply"></a>apply</code></em> ()</p></td>
<td class="struct_member_description"><p>Virtual function that applies the operation to the buffer. <em class="parameter"><code>by</code></em>
is
the user that applies the operation.</p></td>
<td class="struct_member_annotations"> </td>
</tr>
<tr>
<td class="struct_member_name"><p><em class="structfield"><code><a name="InfAdoptedOperationIface.apply-transformed"></a>apply_transformed</code></em> ()</p></td>
<td class="struct_member_description"><p>Virtual function that applies a transformed version
of the operation to the buffer. It attempts to use information from the
buffer to make the original operation reversible, if it is not already.
The implementation of this function is optional, and only needs to be
implemented if the operation is not reversible but can be made reversible
with additional information from the buffer or the transformed operation.</p></td>
<td class="struct_member_annotations"> </td>
</tr>
<tr>
<td class="struct_member_name"><p><em class="structfield"><code><a name="InfAdoptedOperationIface.revert"></a>revert</code></em> ()</p></td>
<td class="struct_member_description"><p>Virtual function that creates a new operation that undoes the
effect of the operation. If <em class="parameter"><code>get_flags</code></em>
does never return the
<a class="link" href="InfAdoptedOperation.html#INF-ADOPTED-OPERATION-REVERSIBLE:CAPS"><code class="literal">INF_ADOPTED_OPERATION_REVERSIBLE</code></a> flag set, then this is allowed to be
<code class="literal">NULL</code>.</p></td>
<td class="struct_member_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
</div>
<hr>
<div class="refsect2">
<a name="InfAdoptedOperationFlags"></a><h3>enum InfAdoptedOperationFlags</h3>
<p>Various flags for <a class="link" href="InfAdoptedOperation.html" title="InfAdoptedOperation"><span class="type">InfAdoptedOperation</span></a>.</p>
<div class="refsect3">
<a name="id-1.4.9.12.4.4"></a><h4>Members</h4>
<div class="informaltable"><table width="100%" border="0">
<colgroup>
<col width="300px" class="enum_members_name">
<col class="enum_members_description">
<col width="200px" class="enum_members_annotations">
</colgroup>
<tbody>
<tr>
<td class="enum_member_name"><p><a name="INF-ADOPTED-OPERATION-AFFECTS-BUFFER:CAPS"></a>INF_ADOPTED_OPERATION_AFFECTS_BUFFER</p></td>
<td class="enum_member_description">
<p>The operation changes the content of
the buffer.</p>
</td>
<td class="enum_member_annotations"> </td>
</tr>
<tr>
<td class="enum_member_name"><p><a name="INF-ADOPTED-OPERATION-REVERSIBLE:CAPS"></a>INF_ADOPTED_OPERATION_REVERSIBLE</p></td>
<td class="enum_member_description">
<p>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.</p>
</td>
<td class="enum_member_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
</div>
<hr>
<div class="refsect2">
<a name="InfAdoptedConcurrencyId"></a><h3>enum InfAdoptedConcurrencyId</h3>
<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="refsect3">
<a name="id-1.4.9.12.5.4"></a><h4>Members</h4>
<div class="informaltable"><table width="100%" border="0">
<colgroup>
<col width="300px" class="enum_members_name">
<col class="enum_members_description">
<col width="200px" class="enum_members_annotations">
</colgroup>
<tbody>
<tr>
<td class="enum_member_name"><p><a name="INF-ADOPTED-CONCURRENCY-SELF:CAPS"></a>INF_ADOPTED_CONCURRENCY_SELF</p></td>
<td class="enum_member_description">
<p>Transform the operation itself.</p>
</td>
<td class="enum_member_annotations"> </td>
</tr>
<tr>
<td class="enum_member_name"><p><a name="INF-ADOPTED-CONCURRENCY-NONE:CAPS"></a>INF_ADOPTED_CONCURRENCY_NONE</p></td>
<td class="enum_member_description">
<p>Unspecified which operation to transform.</p>
</td>
<td class="enum_member_annotations"> </td>
</tr>
<tr>
<td class="enum_member_name"><p><a name="INF-ADOPTED-CONCURRENCY-OTHER:CAPS"></a>INF_ADOPTED_CONCURRENCY_OTHER</p></td>
<td class="enum_member_description">
<p>Transform the other operation.</p>
</td>
<td class="enum_member_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
</div>
</div>
<div class="refsect1">
<a name="InfAdoptedOperation.see-also"></a><h2>See Also</h2>
<p><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></p>
</div>
</div>
<div class="footer">
<hr>
          Generated by GTK-Doc V1.21</div>
</body>
</html>