This file is indexed.

/usr/share/gtk-doc/html/libinfinity-0.5/InfSaslContext.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
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
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>InfSaslContext</title>
<meta name="generator" content="DocBook XSL Stylesheets V1.78.1">
<link rel="home" href="index.html" title="libinfinity-0.5 Reference Manual">
<link rel="up" href="ch02.html" title="Common libinfinity API">
<link rel="prev" href="InfCertificateCredentials.html" title="InfCertificateCredentials">
<link rel="next" href="libinfinity-0.5-InfError.html" title="InfError">
<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="InfCertificateCredentials.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td>
<td><a accesskey="u" href="ch02.html"><img src="up.png" width="24" height="24" border="0" alt="Up"></a></td>
<td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"></a></td>
<th width="100%" align="center">libinfinity-0.5 Reference Manual</th>
<td><a accesskey="n" href="libinfinity-0.5-InfError.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td>
</tr>
<tr><td colspan="5" class="shortcuts">
<a href="#InfSaslContext.synopsis" class="shortcut">Top</a>
                   | 
                  <a href="#InfSaslContext.description" class="shortcut">Description</a>
                   | 
                  <a href="#InfSaslContext.object-hierarchy" class="shortcut">Object Hierarchy</a>
</td></tr>
</table>
<div class="refentry">
<a name="InfSaslContext"></a><div class="titlepage"></div>
<div class="refnamediv"><table width="100%"><tr>
<td valign="top">
<h2><span class="refentrytitle"><a name="InfSaslContext.top_of_page"></a>InfSaslContext</span></h2>
<p>InfSaslContext — Asynchronous SASL processing</p>
</td>
<td valign="top" align="right"></td>
</tr></table></div>
<div class="refsect1">
<a name="InfSaslContext.stability-level"></a><h2>Stability Level</h2>
Unstable, unless otherwise indicated
</div>
<div class="refsynopsisdiv">
<a name="InfSaslContext.synopsis"></a><h2>Synopsis</h2>
<pre class="synopsis">
#include &lt;libinfinity/common/inf-sasl-context.h&gt;

                    <a class="link" href="InfSaslContext.html#InfSaslContext-struct" title="InfSaslContext">InfSaslContext</a>;
                    <a class="link" href="InfSaslContext.html#InfSaslContextSession" title="InfSaslContextSession">InfSaslContextSession</a>;
<span class="returnvalue">void</span>                (<a class="link" href="InfSaslContext.html#InfSaslContextCallbackFunc" title="InfSaslContextCallbackFunc ()">*InfSaslContextCallbackFunc</a>)       (<em class="parameter"><code><a class="link" href="InfSaslContext.html#InfSaslContextSession" title="InfSaslContextSession"><span class="type">InfSaslContextSession</span></a> *session</code></em>,
                                                         <em class="parameter"><code><span class="type">Gsasl_property</span> property</code></em>,
                                                         <em class="parameter"><code><span class="type">gpointer</span> session_data</code></em>,
                                                         <em class="parameter"><code><span class="type">gpointer</span> user_data</code></em>);
<span class="returnvalue">void</span>                (<a class="link" href="InfSaslContext.html#InfSaslContextSessionFeedFunc" title="InfSaslContextSessionFeedFunc ()">*InfSaslContextSessionFeedFunc</a>)    (<em class="parameter"><code><a class="link" href="InfSaslContext.html#InfSaslContextSession" title="InfSaslContextSession"><span class="type">InfSaslContextSession</span></a> *session</code></em>,
                                                         <em class="parameter"><code>const <span class="type">char</span> *data</code></em>,
                                                         <em class="parameter"><code><span class="type">gboolean</span> needs_more</code></em>,
                                                         <em class="parameter"><code>const <span class="type">GError</span> *error</code></em>,
                                                         <em class="parameter"><code><span class="type">gpointer</span> user_data</code></em>);
<a class="link" href="InfSaslContext.html" title="InfSaslContext"><span class="returnvalue">InfSaslContext</span></a> *    <a class="link" href="InfSaslContext.html#inf-sasl-context-new" title="inf_sasl_context_new ()">inf_sasl_context_new</a>                (<em class="parameter"><code><span class="type">GError</span> **error</code></em>);
<a class="link" href="InfSaslContext.html" title="InfSaslContext"><span class="returnvalue">InfSaslContext</span></a> *    <a class="link" href="InfSaslContext.html#inf-sasl-context-ref" title="inf_sasl_context_ref ()">inf_sasl_context_ref</a>                (<em class="parameter"><code><a class="link" href="InfSaslContext.html" title="InfSaslContext"><span class="type">InfSaslContext</span></a> *context</code></em>);
<span class="returnvalue">void</span>                <a class="link" href="InfSaslContext.html#inf-sasl-context-unref" title="inf_sasl_context_unref ()">inf_sasl_context_unref</a>              (<em class="parameter"><code><a class="link" href="InfSaslContext.html" title="InfSaslContext"><span class="type">InfSaslContext</span></a> *context</code></em>);
<span class="returnvalue">void</span>                <a class="link" href="InfSaslContext.html#inf-sasl-context-set-callback" title="inf_sasl_context_set_callback ()">inf_sasl_context_set_callback</a>       (<em class="parameter"><code><a class="link" href="InfSaslContext.html" title="InfSaslContext"><span class="type">InfSaslContext</span></a> *context</code></em>,
                                                         <em class="parameter"><code><a class="link" href="InfSaslContext.html#InfSaslContextCallbackFunc" title="InfSaslContextCallbackFunc ()"><span class="type">InfSaslContextCallbackFunc</span></a> callback</code></em>,
                                                         <em class="parameter"><code><span class="type">gpointer</span> user_data</code></em>);
<a class="link" href="InfSaslContext.html#InfSaslContextSession" title="InfSaslContextSession"><span class="returnvalue">InfSaslContextSession</span></a> * <a class="link" href="InfSaslContext.html#inf-sasl-context-client-start-session" title="inf_sasl_context_client_start_session ()">inf_sasl_context_client_start_session</a>
                                                        (<em class="parameter"><code><a class="link" href="InfSaslContext.html" title="InfSaslContext"><span class="type">InfSaslContext</span></a> *context</code></em>,
                                                         <em class="parameter"><code><a class="link" href="InfIo.html" title="InfIo"><span class="type">InfIo</span></a> *io</code></em>,
                                                         <em class="parameter"><code>const <span class="type">char</span> *mech</code></em>,
                                                         <em class="parameter"><code><span class="type">gpointer</span> session_data</code></em>,
                                                         <em class="parameter"><code><span class="type">GError</span> **error</code></em>);
<span class="returnvalue">char</span> *              <a class="link" href="InfSaslContext.html#inf-sasl-context-client-list-mechanisms" title="inf_sasl_context_client_list_mechanisms ()">inf_sasl_context_client_list_mechanisms</a>
                                                        (<em class="parameter"><code><a class="link" href="InfSaslContext.html" title="InfSaslContext"><span class="type">InfSaslContext</span></a> *context</code></em>,
                                                         <em class="parameter"><code><span class="type">GError</span> **error</code></em>);
<span class="returnvalue">gboolean</span>            <a class="link" href="InfSaslContext.html#inf-sasl-context-client-supports-mechanism" title="inf_sasl_context_client_supports_mechanism ()">inf_sasl_context_client_supports_mechanism</a>
                                                        (<em class="parameter"><code><a class="link" href="InfSaslContext.html" title="InfSaslContext"><span class="type">InfSaslContext</span></a> *context</code></em>,
                                                         <em class="parameter"><code>const <span class="type">char</span> *mech</code></em>);
const <span class="returnvalue">char</span> *        <a class="link" href="InfSaslContext.html#inf-sasl-context-client-suggest-mechanism" title="inf_sasl_context_client_suggest_mechanism ()">inf_sasl_context_client_suggest_mechanism</a>
                                                        (<em class="parameter"><code><a class="link" href="InfSaslContext.html" title="InfSaslContext"><span class="type">InfSaslContext</span></a> *context</code></em>,
                                                         <em class="parameter"><code>const <span class="type">char</span> *mechanisms</code></em>);
<a class="link" href="InfSaslContext.html#InfSaslContextSession" title="InfSaslContextSession"><span class="returnvalue">InfSaslContextSession</span></a> * <a class="link" href="InfSaslContext.html#inf-sasl-context-server-start-session" title="inf_sasl_context_server_start_session ()">inf_sasl_context_server_start_session</a>
                                                        (<em class="parameter"><code><a class="link" href="InfSaslContext.html" title="InfSaslContext"><span class="type">InfSaslContext</span></a> *context</code></em>,
                                                         <em class="parameter"><code><a class="link" href="InfIo.html" title="InfIo"><span class="type">InfIo</span></a> *io</code></em>,
                                                         <em class="parameter"><code>const <span class="type">char</span> *mech</code></em>,
                                                         <em class="parameter"><code><span class="type">gpointer</span> session_data</code></em>,
                                                         <em class="parameter"><code><span class="type">GError</span> **error</code></em>);
<span class="returnvalue">char</span> *              <a class="link" href="InfSaslContext.html#inf-sasl-context-server-list-mechanisms" title="inf_sasl_context_server_list_mechanisms ()">inf_sasl_context_server_list_mechanisms</a>
                                                        (<em class="parameter"><code><a class="link" href="InfSaslContext.html" title="InfSaslContext"><span class="type">InfSaslContext</span></a> *context</code></em>,
                                                         <em class="parameter"><code><span class="type">GError</span> **error</code></em>);
<span class="returnvalue">gboolean</span>            <a class="link" href="InfSaslContext.html#inf-sasl-context-server-supports-mechanism" title="inf_sasl_context_server_supports_mechanism ()">inf_sasl_context_server_supports_mechanism</a>
                                                        (<em class="parameter"><code><a class="link" href="InfSaslContext.html" title="InfSaslContext"><span class="type">InfSaslContext</span></a> *context</code></em>,
                                                         <em class="parameter"><code>const <span class="type">char</span> *mech</code></em>);
<span class="returnvalue">void</span>                <a class="link" href="InfSaslContext.html#inf-sasl-context-stop-session" title="inf_sasl_context_stop_session ()">inf_sasl_context_stop_session</a>       (<em class="parameter"><code><a class="link" href="InfSaslContext.html" title="InfSaslContext"><span class="type">InfSaslContext</span></a> *context</code></em>,
                                                         <em class="parameter"><code><a class="link" href="InfSaslContext.html#InfSaslContextSession" title="InfSaslContextSession"><span class="type">InfSaslContextSession</span></a> *session</code></em>);
const <span class="returnvalue">char</span> *        <a class="link" href="InfSaslContext.html#inf-sasl-context-session-get-property" title="inf_sasl_context_session_get_property ()">inf_sasl_context_session_get_property</a>
                                                        (<em class="parameter"><code><a class="link" href="InfSaslContext.html#InfSaslContextSession" title="InfSaslContextSession"><span class="type">InfSaslContextSession</span></a> *session</code></em>,
                                                         <em class="parameter"><code><span class="type">Gsasl_property</span> prop</code></em>);
<span class="returnvalue">void</span>                <a class="link" href="InfSaslContext.html#inf-sasl-context-session-set-property" title="inf_sasl_context_session_set_property ()">inf_sasl_context_session_set_property</a>
                                                        (<em class="parameter"><code><a class="link" href="InfSaslContext.html#InfSaslContextSession" title="InfSaslContextSession"><span class="type">InfSaslContextSession</span></a> *session</code></em>,
                                                         <em class="parameter"><code><span class="type">Gsasl_property</span> prop</code></em>,
                                                         <em class="parameter"><code>const <span class="type">char</span> *value</code></em>);
<span class="returnvalue">void</span>                <a class="link" href="InfSaslContext.html#inf-sasl-context-session-continue" title="inf_sasl_context_session_continue ()">inf_sasl_context_session_continue</a>   (<em class="parameter"><code><a class="link" href="InfSaslContext.html#InfSaslContextSession" title="InfSaslContextSession"><span class="type">InfSaslContextSession</span></a> *session</code></em>,
                                                         <em class="parameter"><code><span class="type">int</span> retval</code></em>);
<span class="returnvalue">void</span>                <a class="link" href="InfSaslContext.html#inf-sasl-context-session-feed" title="inf_sasl_context_session_feed ()">inf_sasl_context_session_feed</a>       (<em class="parameter"><code><a class="link" href="InfSaslContext.html#InfSaslContextSession" title="InfSaslContextSession"><span class="type">InfSaslContextSession</span></a> *session</code></em>,
                                                         <em class="parameter"><code>const <span class="type">char</span> *data</code></em>,
                                                         <em class="parameter"><code><a class="link" href="InfSaslContext.html#InfSaslContextSessionFeedFunc" title="InfSaslContextSessionFeedFunc ()"><span class="type">InfSaslContextSessionFeedFunc</span></a> func</code></em>,
                                                         <em class="parameter"><code><span class="type">gpointer</span> user_data</code></em>);
</pre>
</div>
<div class="refsect1">
<a name="InfSaslContext.object-hierarchy"></a><h2>Object Hierarchy</h2>
<pre class="synopsis">
  GBoxed
   +----InfSaslContext
</pre>
</div>
<div class="refsect1">
<a name="InfSaslContext.description"></a><h2>Description</h2>
<p>
<a class="link" href="InfSaslContext.html" title="InfSaslContext"><span class="type">InfSaslContext</span></a> is a wrapper for the Gsasl library. It basically adds
functionality to provide properties asynchronously to Gsasl, so that for
example a dialog can be shown to the user before continuing with the
authentication process. With Gsasl, it is expected that the callback
function sets the requested property before returning, which makes it hard
to give control back to a main loop while waiting for user input.
</p>
<p>
This wrapper makes sure the callback is called in another thread so that it
can block without affecting the rest of the program.
Use <a class="link" href="InfSaslContext.html#inf-sasl-context-session-feed" title="inf_sasl_context_session_feed ()"><code class="function">inf_sasl_context_session_feed()</code></a> as a replacement for <code class="function">gsasl_step64()</code>.
Instead of returning the result data directly, the function calls a
callback once all properties requested have been provided.
</p>
<p>
All threading internals are hidden by the wrapper, so all callbacks are
issued in the user thread. However, it requires an <a class="link" href="InfIo.html" title="InfIo"><span class="type">InfIo</span></a> object to
dispatch messages to it. Also, all <a class="link" href="InfSaslContext.html" title="InfSaslContext"><span class="type">InfSaslContext</span></a> functions are fully
thread-safe.
</p>
</div>
<div class="refsect1">
<a name="InfSaslContext.details"></a><h2>Details</h2>
<div class="refsect2">
<a name="InfSaslContext-struct"></a><h3>InfSaslContext</h3>
<pre class="programlisting">typedef struct _InfSaslContext InfSaslContext;</pre>
<p>
<a class="link" href="InfSaslContext.html" title="InfSaslContext"><span class="type">InfSaslContext</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="InfSaslContextSession"></a><h3>InfSaslContextSession</h3>
<pre class="programlisting">typedef struct _InfSaslContextSession InfSaslContextSession;</pre>
<p>
<a class="link" href="InfSaslContext.html#InfSaslContextSession" title="InfSaslContextSession"><span class="type">InfSaslContextSession</span></a> represents an ongoing authentication session. Create
with <a class="link" href="InfSaslContext.html#inf-sasl-context-server-start-session" title="inf_sasl_context_server_start_session ()"><code class="function">inf_sasl_context_server_start_session()</code></a> or
<a class="link" href="InfSaslContext.html#inf-sasl-context-client-start-session" title="inf_sasl_context_client_start_session ()"><code class="function">inf_sasl_context_client_start_session()</code></a>.
</p>
</div>
<hr>
<div class="refsect2">
<a name="InfSaslContextCallbackFunc"></a><h3>InfSaslContextCallbackFunc ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                (*InfSaslContextCallbackFunc)       (<em class="parameter"><code><a class="link" href="InfSaslContext.html#InfSaslContextSession" title="InfSaslContextSession"><span class="type">InfSaslContextSession</span></a> *session</code></em>,
                                                         <em class="parameter"><code><span class="type">Gsasl_property</span> property</code></em>,
                                                         <em class="parameter"><code><span class="type">gpointer</span> session_data</code></em>,
                                                         <em class="parameter"><code><span class="type">gpointer</span> user_data</code></em>);</pre>
<p>
This callback is called whenever a property is required to proceed with
authentication. For example, when a password is required, the callback is
called with <em class="parameter"><code>property</code></em> set to <code class="literal">GSASL_PASSCODE</code>.
</p>
<p>
The function is then expected to set that property using
<a class="link" href="InfSaslContext.html#inf-sasl-context-session-set-property" title="inf_sasl_context_session_set_property ()"><code class="function">inf_sasl_context_session_set_property()</code></a> and, once it is done, call
<a class="link" href="InfSaslContext.html#inf-sasl-context-session-continue" title="inf_sasl_context_session_continue ()"><code class="function">inf_sasl_context_session_continue()</code></a>. This can happen fully asynchronously,
that is it does not need to take place directly within the callback but the
callback can, for example, open a dialog for the user to enter a password
and then once the user closes the dialog call the two functions mentioned
above.
</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>session</code></em> :</span></p></td>
<td>A <a class="link" href="InfSaslContext.html#InfSaslContextSession" title="InfSaslContextSession"><span class="type">InfSaslContextSession</span></a>.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>property</code></em> :</span></p></td>
<td>The property requested.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>session_data</code></em> :</span></p></td>
<td>The session data for session specified in
<a class="link" href="InfSaslContext.html#inf-sasl-context-server-start-session" title="inf_sasl_context_server_start_session ()"><code class="function">inf_sasl_context_server_start_session()</code></a> or
<a class="link" href="InfSaslContext.html#inf-sasl-context-client-start-session" title="inf_sasl_context_client_start_session ()"><code class="function">inf_sasl_context_client_start_session()</code></a>.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>user_data</code></em> :</span></p></td>
<td>The user data specified in <a class="link" href="InfSaslContext.html#inf-sasl-context-set-callback" title="inf_sasl_context_set_callback ()"><code class="function">inf_sasl_context_set_callback()</code></a>.</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="InfSaslContextSessionFeedFunc"></a><h3>InfSaslContextSessionFeedFunc ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                (*InfSaslContextSessionFeedFunc)    (<em class="parameter"><code><a class="link" href="InfSaslContext.html#InfSaslContextSession" title="InfSaslContextSession"><span class="type">InfSaslContextSession</span></a> *session</code></em>,
                                                         <em class="parameter"><code>const <span class="type">char</span> *data</code></em>,
                                                         <em class="parameter"><code><span class="type">gboolean</span> needs_more</code></em>,
                                                         <em class="parameter"><code>const <span class="type">GError</span> *error</code></em>,
                                                         <em class="parameter"><code><span class="type">gpointer</span> user_data</code></em>);</pre>
<p>
This function is called in response to <a class="link" href="InfSaslContext.html#inf-sasl-context-session-feed" title="inf_sasl_context_session_feed ()"><code class="function">inf_sasl_context_session_feed()</code></a>.
When all required properties (if any) have been provided by the callback
function then this function is called with the response to send to the
remote site.
</p>
<p>
If an error occurred then <em class="parameter"><code>error</code></em> will be set and <em class="parameter"><code>data</code></em> will be <code class="literal">NULL</code>.
</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>session</code></em> :</span></p></td>
<td>A <a class="link" href="InfSaslContext.html#InfSaslContextSession" title="InfSaslContextSession"><span class="type">InfSaslContextSession</span></a>.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>data</code></em> :</span></p></td>
<td>The response to the fed data, base64 encoded and null-terminated.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>needs_more</code></em> :</span></p></td>
<td>If <code class="literal">TRUE</code> then <a class="link" href="InfSaslContext.html#inf-sasl-context-session-feed" title="inf_sasl_context_session_feed ()"><code class="function">inf_sasl_context_session_feed()</code></a> needs to be
called again with more data, otherwise the authentication has finished.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>error</code></em> :</span></p></td>
<td>This is nonzero if an error occured while processing the input
data.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>user_data</code></em> :</span></p></td>
<td>The user data specified in <a class="link" href="InfSaslContext.html#inf-sasl-context-session-feed" title="inf_sasl_context_session_feed ()"><code class="function">inf_sasl_context_session_feed()</code></a>.</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="inf-sasl-context-new"></a><h3>inf_sasl_context_new ()</h3>
<pre class="programlisting"><a class="link" href="InfSaslContext.html" title="InfSaslContext"><span class="returnvalue">InfSaslContext</span></a> *    inf_sasl_context_new                (<em class="parameter"><code><span class="type">GError</span> **error</code></em>);</pre>
<p>
Creates a new <a class="link" href="InfSaslContext.html" title="InfSaslContext"><span class="type">InfSaslContext</span></a> with a reference count of 1. If the function
fails it returns <code class="literal">NULL</code> and <em class="parameter"><code>error</code></em> is set.
</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>error</code></em> :</span></p></td>
<td>Location to store error information, if any.</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>A new <a class="link" href="InfSaslContext.html" title="InfSaslContext"><span class="type">InfSaslContext</span></a>, or <code class="literal">NULL</code> on error. Free with
<a class="link" href="InfSaslContext.html#inf-sasl-context-unref" title="inf_sasl_context_unref ()"><code class="function">inf_sasl_context_unref()</code></a> when no longer needed.</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="inf-sasl-context-ref"></a><h3>inf_sasl_context_ref ()</h3>
<pre class="programlisting"><a class="link" href="InfSaslContext.html" title="InfSaslContext"><span class="returnvalue">InfSaslContext</span></a> *    inf_sasl_context_ref                (<em class="parameter"><code><a class="link" href="InfSaslContext.html" title="InfSaslContext"><span class="type">InfSaslContext</span></a> *context</code></em>);</pre>
<p>
Increases the reference count of <em class="parameter"><code>context</code></em> by one.
</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>context</code></em> :</span></p></td>
<td>A <a class="link" href="InfSaslContext.html" title="InfSaslContext"><span class="type">InfSaslContext</span></a>.</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>The passed in pointer, <em class="parameter"><code>context</code></em>.</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="inf-sasl-context-unref"></a><h3>inf_sasl_context_unref ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                inf_sasl_context_unref              (<em class="parameter"><code><a class="link" href="InfSaslContext.html" title="InfSaslContext"><span class="type">InfSaslContext</span></a> *context</code></em>);</pre>
<p>
Decreases the reference count of <em class="parameter"><code>sasl</code></em> by one. When the reference count
reaches zero then the object is freed and may no longer be used. If that
happens then also all sessions created with
<a class="link" href="InfSaslContext.html#inf-sasl-context-client-start-session" title="inf_sasl_context_client_start_session ()"><code class="function">inf_sasl_context_client_start_session()</code></a> or
<a class="link" href="InfSaslContext.html#inf-sasl-context-server-start-session" title="inf_sasl_context_server_start_session ()"><code class="function">inf_sasl_context_server_start_session()</code></a> are stopped automatically.
</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>context</code></em> :</span></p></td>
<td>A <a class="link" href="InfSaslContext.html" title="InfSaslContext"><span class="type">InfSaslContext</span></a>.</td>
</tr></tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="inf-sasl-context-set-callback"></a><h3>inf_sasl_context_set_callback ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                inf_sasl_context_set_callback       (<em class="parameter"><code><a class="link" href="InfSaslContext.html" title="InfSaslContext"><span class="type">InfSaslContext</span></a> *context</code></em>,
                                                         <em class="parameter"><code><a class="link" href="InfSaslContext.html#InfSaslContextCallbackFunc" title="InfSaslContextCallbackFunc ()"><span class="type">InfSaslContextCallbackFunc</span></a> callback</code></em>,
                                                         <em class="parameter"><code><span class="type">gpointer</span> user_data</code></em>);</pre>
<p>
Sets the callback to call when, during authentication, a certain properties
needs to be provided, such as a username or a password. The callback
function is expected to set the requested property using
<a class="link" href="InfSaslContext.html#inf-sasl-context-session-set-property" title="inf_sasl_context_session_set_property ()"><code class="function">inf_sasl_context_session_set_property()</code></a> and then call
<a class="link" href="InfSaslContext.html#inf-sasl-context-session-continue" title="inf_sasl_context_session_continue ()"><code class="function">inf_sasl_context_session_continue()</code></a> with retval being GSASL_OK. If it
cannot provide the property then it should only call
<a class="link" href="InfSaslContext.html#inf-sasl-context-session-continue" title="inf_sasl_context_session_continue ()"><code class="function">inf_sasl_context_session_continue()</code></a> with retval indicating the problem.
</p>
<p>
The callback function does not need to provide the property immediately.
It is also allowed return and call <a class="link" href="InfSaslContext.html#inf-sasl-context-session-continue" title="inf_sasl_context_session_continue ()"><code class="function">inf_sasl_context_session_continue()</code></a>
later.
</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>context</code></em> :</span></p></td>
<td>A <a class="link" href="InfSaslContext.html" title="InfSaslContext"><span class="type">InfSaslContext</span></a>.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>callback</code></em> :</span></p></td>
<td>A function to call to query properties for authentication.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>user_data</code></em> :</span></p></td>
<td>Additional context to pass to <em class="parameter"><code>callback</code></em>.</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="inf-sasl-context-client-start-session"></a><h3>inf_sasl_context_client_start_session ()</h3>
<pre class="programlisting"><a class="link" href="InfSaslContext.html#InfSaslContextSession" title="InfSaslContextSession"><span class="returnvalue">InfSaslContextSession</span></a> * inf_sasl_context_client_start_session
                                                        (<em class="parameter"><code><a class="link" href="InfSaslContext.html" title="InfSaslContext"><span class="type">InfSaslContext</span></a> *context</code></em>,
                                                         <em class="parameter"><code><a class="link" href="InfIo.html" title="InfIo"><span class="type">InfIo</span></a> *io</code></em>,
                                                         <em class="parameter"><code>const <span class="type">char</span> *mech</code></em>,
                                                         <em class="parameter"><code><span class="type">gpointer</span> session_data</code></em>,
                                                         <em class="parameter"><code><span class="type">GError</span> **error</code></em>);</pre>
<p>
Starts a new client-side SASL session using <em class="parameter"><code>mech</code></em> for authentication. When
the session finished, that is either when an error occurred or the
authentication finished successfully, use <a class="link" href="InfSaslContext.html#inf-sasl-context-stop-session" title="inf_sasl_context_stop_session ()"><code class="function">inf_sasl_context_stop_session()</code></a>.
</p>
<p>
The callback function will be called in the thread that <em class="parameter"><code>io</code></em> runs in.
</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>context</code></em> :</span></p></td>
<td>A <a class="link" href="InfSaslContext.html" title="InfSaslContext"><span class="type">InfSaslContext</span></a>.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>io</code></em> :</span></p></td>
<td>The <a class="link" href="InfIo.html" title="InfIo"><span class="type">InfIo</span></a> main loop to which to dispatch callbacks.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>mech</code></em> :</span></p></td>
<td>The mechanism to use for the session.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>session_data</code></em> :</span></p></td>
<td>Session-specific data to provide to the
<a class="link" href="InfSaslContext.html#InfSaslContextCallbackFunc" title="InfSaslContextCallbackFunc ()"><span class="type">InfSaslContextCallbackFunc</span></a>.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>error</code></em> :</span></p></td>
<td>Location to store error information, if any.</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>A <a class="link" href="InfSaslContext.html#InfSaslContextSession" title="InfSaslContextSession"><span class="type">InfSaslContextSession</span></a>.</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="inf-sasl-context-client-list-mechanisms"></a><h3>inf_sasl_context_client_list_mechanisms ()</h3>
<pre class="programlisting"><span class="returnvalue">char</span> *              inf_sasl_context_client_list_mechanisms
                                                        (<em class="parameter"><code><a class="link" href="InfSaslContext.html" title="InfSaslContext"><span class="type">InfSaslContext</span></a> *context</code></em>,
                                                         <em class="parameter"><code><span class="type">GError</span> **error</code></em>);</pre>
<p>
Returns a newly allocated space-separated string containing SASL mechanisms
that <em class="parameter"><code>context</code></em> supports for client sessions.
</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>context</code></em> :</span></p></td>
<td>A <a class="link" href="InfSaslContext.html" title="InfSaslContext"><span class="type">InfSaslContext</span></a>.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>error</code></em> :</span></p></td>
<td>Location to store error information, if any.</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>A newly allocated string. Free with <code class="function">gsasl_free()</code> when no longer
in use.</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="inf-sasl-context-client-supports-mechanism"></a><h3>inf_sasl_context_client_supports_mechanism ()</h3>
<pre class="programlisting"><span class="returnvalue">gboolean</span>            inf_sasl_context_client_supports_mechanism
                                                        (<em class="parameter"><code><a class="link" href="InfSaslContext.html" title="InfSaslContext"><span class="type">InfSaslContext</span></a> *context</code></em>,
                                                         <em class="parameter"><code>const <span class="type">char</span> *mech</code></em>);</pre>
<p>
Checks whether <em class="parameter"><code>context</code></em> supports the mechanism with name <em class="parameter"><code>mech</code></em> for
client sessions.
</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>context</code></em> :</span></p></td>
<td>A <a class="link" href="InfSaslContext.html" title="InfSaslContext"><span class="type">InfSaslContext</span></a>.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>mech</code></em> :</span></p></td>
<td>The name of the mechanism to be tested.</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>
<code class="literal">TRUE</code> if <em class="parameter"><code>mech</code></em> is supported or <code class="literal">FALSE</code> otherwise.</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="inf-sasl-context-client-suggest-mechanism"></a><h3>inf_sasl_context_client_suggest_mechanism ()</h3>
<pre class="programlisting">const <span class="returnvalue">char</span> *        inf_sasl_context_client_suggest_mechanism
                                                        (<em class="parameter"><code><a class="link" href="InfSaslContext.html" title="InfSaslContext"><span class="type">InfSaslContext</span></a> *context</code></em>,
                                                         <em class="parameter"><code>const <span class="type">char</span> *mechanisms</code></em>);</pre>
<p>
Given a list of SASL mechanisms this function suggests the which is the
"best" one to be used.
</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>context</code></em> :</span></p></td>
<td>A <a class="link" href="InfSaslContext.html" title="InfSaslContext"><span class="type">InfSaslContext</span></a>.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>mechanisms</code></em> :</span></p></td>
<td>Space-separated list of SASL mechanism names.</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>The name of the suggested mechanism.</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="inf-sasl-context-server-start-session"></a><h3>inf_sasl_context_server_start_session ()</h3>
<pre class="programlisting"><a class="link" href="InfSaslContext.html#InfSaslContextSession" title="InfSaslContextSession"><span class="returnvalue">InfSaslContextSession</span></a> * inf_sasl_context_server_start_session
                                                        (<em class="parameter"><code><a class="link" href="InfSaslContext.html" title="InfSaslContext"><span class="type">InfSaslContext</span></a> *context</code></em>,
                                                         <em class="parameter"><code><a class="link" href="InfIo.html" title="InfIo"><span class="type">InfIo</span></a> *io</code></em>,
                                                         <em class="parameter"><code>const <span class="type">char</span> *mech</code></em>,
                                                         <em class="parameter"><code><span class="type">gpointer</span> session_data</code></em>,
                                                         <em class="parameter"><code><span class="type">GError</span> **error</code></em>);</pre>
<p>
Starts a new server-side SASL session using <em class="parameter"><code>mech</code></em> for authentication. When
the session finished, that is either when an error occurred or the
authentication finished successfully, use <a class="link" href="InfSaslContext.html#inf-sasl-context-stop-session" title="inf_sasl_context_stop_session ()"><code class="function">inf_sasl_context_stop_session()</code></a>.
</p>
<p>
The callback function will be called in the thread that <em class="parameter"><code>io</code></em> runs in.
</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>context</code></em> :</span></p></td>
<td>A <a class="link" href="InfSaslContext.html" title="InfSaslContext"><span class="type">InfSaslContext</span></a>.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>io</code></em> :</span></p></td>
<td>The <a class="link" href="InfIo.html" title="InfIo"><span class="type">InfIo</span></a> main loop to which to dispatch callbacks.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>mech</code></em> :</span></p></td>
<td>The mechanism to use for the session.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>session_data</code></em> :</span></p></td>
<td>Session-specific data to provide to the
<a class="link" href="InfSaslContext.html#InfSaslContextCallbackFunc" title="InfSaslContextCallbackFunc ()"><span class="type">InfSaslContextCallbackFunc</span></a>.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>error</code></em> :</span></p></td>
<td>Location to store error information, if any.</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>A <a class="link" href="InfSaslContext.html#InfSaslContextSession" title="InfSaslContextSession"><span class="type">InfSaslContextSession</span></a>.</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="inf-sasl-context-server-list-mechanisms"></a><h3>inf_sasl_context_server_list_mechanisms ()</h3>
<pre class="programlisting"><span class="returnvalue">char</span> *              inf_sasl_context_server_list_mechanisms
                                                        (<em class="parameter"><code><a class="link" href="InfSaslContext.html" title="InfSaslContext"><span class="type">InfSaslContext</span></a> *context</code></em>,
                                                         <em class="parameter"><code><span class="type">GError</span> **error</code></em>);</pre>
<p>
Returns a newly allocated space-separated string containing SASL mechanisms
that <em class="parameter"><code>context</code></em> supports for server sessions.
</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>context</code></em> :</span></p></td>
<td>A <a class="link" href="InfSaslContext.html" title="InfSaslContext"><span class="type">InfSaslContext</span></a>.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>error</code></em> :</span></p></td>
<td>Location to store error information, if any.</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>A newly allocated string. Free with <code class="function">gsasl_free()</code> when no longer
in use.</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="inf-sasl-context-server-supports-mechanism"></a><h3>inf_sasl_context_server_supports_mechanism ()</h3>
<pre class="programlisting"><span class="returnvalue">gboolean</span>            inf_sasl_context_server_supports_mechanism
                                                        (<em class="parameter"><code><a class="link" href="InfSaslContext.html" title="InfSaslContext"><span class="type">InfSaslContext</span></a> *context</code></em>,
                                                         <em class="parameter"><code>const <span class="type">char</span> *mech</code></em>);</pre>
<p>
Checks whether <em class="parameter"><code>context</code></em> supports the mechanism with name <em class="parameter"><code>mech</code></em> for
server sessions.
</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>context</code></em> :</span></p></td>
<td>A <a class="link" href="InfSaslContext.html" title="InfSaslContext"><span class="type">InfSaslContext</span></a>.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>mech</code></em> :</span></p></td>
<td>The name of the mechanism to be tested.</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>
<code class="literal">TRUE</code> if <em class="parameter"><code>mech</code></em> is supported or <code class="literal">FALSE</code> otherwise.</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="inf-sasl-context-stop-session"></a><h3>inf_sasl_context_stop_session ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                inf_sasl_context_stop_session       (<em class="parameter"><code><a class="link" href="InfSaslContext.html" title="InfSaslContext"><span class="type">InfSaslContext</span></a> *context</code></em>,
                                                         <em class="parameter"><code><a class="link" href="InfSaslContext.html#InfSaslContextSession" title="InfSaslContextSession"><span class="type">InfSaslContextSession</span></a> *session</code></em>);</pre>
<p>
Finishes <em class="parameter"><code>session</code></em> and frees all resources allocated to it. This can be used
to cancel an authentication session, or to free it after it finished
(either successfully or not).
</p>
<p>
<em class="parameter"><code>session</code></em> should no longer be used after this function was called.
</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>context</code></em> :</span></p></td>
<td>A <a class="link" href="InfSaslContext.html" title="InfSaslContext"><span class="type">InfSaslContext</span></a>.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>session</code></em> :</span></p></td>
<td>A <a class="link" href="InfSaslContext.html#InfSaslContextSession" title="InfSaslContextSession"><span class="type">InfSaslContextSession</span></a> created with <em class="parameter"><code>context</code></em>.</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="inf-sasl-context-session-get-property"></a><h3>inf_sasl_context_session_get_property ()</h3>
<pre class="programlisting">const <span class="returnvalue">char</span> *        inf_sasl_context_session_get_property
                                                        (<em class="parameter"><code><a class="link" href="InfSaslContext.html#InfSaslContextSession" title="InfSaslContextSession"><span class="type">InfSaslContextSession</span></a> *session</code></em>,
                                                         <em class="parameter"><code><span class="type">Gsasl_property</span> prop</code></em>);</pre>
<p>
Returns the value of the property <em class="parameter"><code>prop</code></em> in <em class="parameter"><code>session</code></em>. If the value does not
yet exist then this function returns <code class="literal">NULL</code>. It does not invoke the
<a class="link" href="InfSaslContext.html#InfSaslContextCallbackFunc" title="InfSaslContextCallbackFunc ()"><span class="type">InfSaslContextCallbackFunc</span></a> to query it.
</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>session</code></em> :</span></p></td>
<td>A <a class="link" href="InfSaslContext.html#InfSaslContextSession" title="InfSaslContextSession"><span class="type">InfSaslContextSession</span></a>.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>prop</code></em> :</span></p></td>
<td>A SASL property.</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>The value of the property, or <code class="literal">NULL</code>. The value is owned by the
session and must not be freed.</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="inf-sasl-context-session-set-property"></a><h3>inf_sasl_context_session_set_property ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                inf_sasl_context_session_set_property
                                                        (<em class="parameter"><code><a class="link" href="InfSaslContext.html#InfSaslContextSession" title="InfSaslContextSession"><span class="type">InfSaslContextSession</span></a> *session</code></em>,
                                                         <em class="parameter"><code><span class="type">Gsasl_property</span> prop</code></em>,
                                                         <em class="parameter"><code>const <span class="type">char</span> *value</code></em>);</pre>
<p>
Sets the property <em class="parameter"><code>prop</code></em> in <em class="parameter"><code>session</code></em> to <em class="parameter"><code>value</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>session</code></em> :</span></p></td>
<td>A <a class="link" href="InfSaslContext.html#InfSaslContextSession" title="InfSaslContextSession"><span class="type">InfSaslContextSession</span></a>.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>prop</code></em> :</span></p></td>
<td>A SASL property.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>value</code></em> :</span></p></td>
<td>The value to set the property to.</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="inf-sasl-context-session-continue"></a><h3>inf_sasl_context_session_continue ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                inf_sasl_context_session_continue   (<em class="parameter"><code><a class="link" href="InfSaslContext.html#InfSaslContextSession" title="InfSaslContextSession"><span class="type">InfSaslContextSession</span></a> *session</code></em>,
                                                         <em class="parameter"><code><span class="type">int</span> retval</code></em>);</pre>
<p>
When the callback function specified in <a class="link" href="InfSaslContext.html#inf-sasl-context-set-callback" title="inf_sasl_context_set_callback ()"><code class="function">inf_sasl_context_set_callback()</code></a>
is called then <em class="parameter"><code>session</code></em> waits for the user to call
<a class="link" href="InfSaslContext.html#inf-sasl-context-session-continue" title="inf_sasl_context_session_continue ()"><code class="function">inf_sasl_context_session_continue()</code></a>. It should do so once it provided the
requested property using <a class="link" href="InfSaslContext.html#inf-sasl-context-session-set-property" title="inf_sasl_context_session_set_property ()"><code class="function">inf_sasl_context_session_set_property()</code></a> with
<em class="parameter"><code>retval</code></em> being <code class="literal">GSASL_OK</code>. If it decides that the property cannot be provided
then it should still call this function with <em class="parameter"><code>retval</code></em> being a SASL error
code specifying the problem.
</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>session</code></em> :</span></p></td>
<td>A <a class="link" href="InfSaslContext.html#InfSaslContextSession" title="InfSaslContextSession"><span class="type">InfSaslContextSession</span></a>.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>retval</code></em> :</span></p></td>
<td>Error code of the operation requested.</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="inf-sasl-context-session-feed"></a><h3>inf_sasl_context_session_feed ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                inf_sasl_context_session_feed       (<em class="parameter"><code><a class="link" href="InfSaslContext.html#InfSaslContextSession" title="InfSaslContextSession"><span class="type">InfSaslContextSession</span></a> *session</code></em>,
                                                         <em class="parameter"><code>const <span class="type">char</span> *data</code></em>,
                                                         <em class="parameter"><code><a class="link" href="InfSaslContext.html#InfSaslContextSessionFeedFunc" title="InfSaslContextSessionFeedFunc ()"><span class="type">InfSaslContextSessionFeedFunc</span></a> func</code></em>,
                                                         <em class="parameter"><code><span class="type">gpointer</span> user_data</code></em>);</pre>
<p>
This function feeds data from the session's remote counterpart to <em class="parameter"><code>session</code></em>.
It should be base64 encoded. This function will, asynchronously, process
the data and query for properties it requires to do so. Once it has
finished, <em class="parameter"><code>func</code></em> is called with output data to send to the remote side to
be fed to its session counterpart.
</p>
<p>
This function must not be called again before <em class="parameter"><code>func</code></em> was called.
</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>session</code></em> :</span></p></td>
<td>A <a class="link" href="InfSaslContext.html#InfSaslContextSession" title="InfSaslContextSession"><span class="type">InfSaslContextSession</span></a>.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>data</code></em> :</span></p></td>
<td>The data to feed to the SASL session.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>func</code></em> :</span></p></td>
<td>The function to call when the data has been processed.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>user_data</code></em> :</span></p></td>
<td>Additional user data to pass to <em class="parameter"><code>func</code></em>.</td>
</tr>
</tbody>
</table></div>
</div>
</div>
</div>
<div class="footer">
<hr>
          Generated by GTK-Doc V1.19</div>
</body>
</html>