This file is indexed.

/usr/share/gtk-doc/html/libinfinity-0.6/InfSaslContext.html is in libinfinity-0.6-doc 0.6.7-2.

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
 805
 806
 807
 808
 809
 810
 811
 812
 813
 814
 815
 816
 817
 818
 819
 820
 821
 822
 823
 824
 825
 826
 827
 828
 829
 830
 831
 832
 833
 834
 835
 836
 837
 838
 839
 840
 841
 842
 843
 844
 845
 846
 847
 848
 849
 850
 851
 852
 853
 854
 855
 856
 857
 858
 859
 860
 861
 862
 863
 864
 865
 866
 867
 868
 869
 870
 871
 872
 873
 874
 875
 876
 877
 878
 879
 880
 881
 882
 883
 884
 885
 886
 887
 888
 889
 890
 891
 892
 893
 894
 895
 896
 897
 898
 899
 900
 901
 902
 903
 904
 905
 906
 907
 908
 909
 910
 911
 912
 913
 914
 915
 916
 917
 918
 919
 920
 921
 922
 923
 924
 925
 926
 927
 928
 929
 930
 931
 932
 933
 934
 935
 936
 937
 938
 939
 940
 941
 942
 943
 944
 945
 946
 947
 948
 949
 950
 951
 952
 953
 954
 955
 956
 957
 958
 959
 960
 961
 962
 963
 964
 965
 966
 967
 968
 969
 970
 971
 972
 973
 974
 975
 976
 977
 978
 979
 980
 981
 982
 983
 984
 985
 986
 987
 988
 989
 990
 991
 992
 993
 994
 995
 996
 997
 998
 999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
<!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: libinfinity-0.6 Reference Manual</title>
<meta name="generator" content="DocBook XSL Stylesheets V1.79.1">
<link rel="home" href="index.html" title="libinfinity-0.6 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.6-InfError.html" title="InfError">
<meta name="generator" content="GTK-Doc V1.25 (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="#InfSaslContext.description" class="shortcut">Description</a></span><span id="nav_hierarchy">  <span class="dim">|</span> 
                  <a href="#InfSaslContext.object-hierarchy" class="shortcut">Object Hierarchy</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="ch02.html"><img src="up.png" width="16" height="16" border="0" alt="Up"></a></td>
<td><a accesskey="p" href="InfCertificateCredentials.html"><img src="left.png" width="16" height="16" border="0" alt="Prev"></a></td>
<td><a accesskey="n" href="libinfinity-0.6-InfError.html"><img src="right.png" width="16" height="16" border="0" alt="Next"></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 class="gallery_image" valign="top" align="right"></td>
</tr></table></div>
<div class="refsect1">
<a name="InfSaslContext.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="InfSaslContext.functions"></a><h2>Functions</h2>
<div class="informaltable"><table class="informaltable" 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">void</span>
</td>
<td class="function_name">
<span class="c_punctuation">(</span><a class="link" href="InfSaslContext.html#InfSaslContextCallbackFunc" title="InfSaslContextCallbackFunc ()">*InfSaslContextCallbackFunc</a><span class="c_punctuation">)</span> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">void</span>
</td>
<td class="function_name">
<span class="c_punctuation">(</span><a class="link" href="InfSaslContext.html#InfSaslContextSessionFeedFunc" title="InfSaslContextSessionFeedFunc ()">*InfSaslContextSessionFeedFunc</a><span class="c_punctuation">)</span> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a class="link" href="InfSaslContext.html" title="InfSaslContext"><span class="returnvalue">InfSaslContext</span></a> *
</td>
<td class="function_name">
<a class="link" href="InfSaslContext.html#inf-sasl-context-new" title="inf_sasl_context_new ()">inf_sasl_context_new</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a class="link" href="InfSaslContext.html" title="InfSaslContext"><span class="returnvalue">InfSaslContext</span></a> *
</td>
<td class="function_name">
<a class="link" href="InfSaslContext.html#inf-sasl-context-ref" title="inf_sasl_context_ref ()">inf_sasl_context_ref</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">void</span>
</td>
<td class="function_name">
<a class="link" href="InfSaslContext.html#inf-sasl-context-unref" title="inf_sasl_context_unref ()">inf_sasl_context_unref</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">void</span>
</td>
<td class="function_name">
<a class="link" href="InfSaslContext.html#inf-sasl-context-set-callback" title="inf_sasl_context_set_callback ()">inf_sasl_context_set_callback</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a class="link" href="InfSaslContext.html#InfSaslContextSession" title="InfSaslContextSession"><span class="returnvalue">InfSaslContextSession</span></a> *
</td>
<td class="function_name">
<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> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">char</span> *
</td>
<td class="function_name">
<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> <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="InfSaslContext.html#inf-sasl-context-client-supports-mechanism" title="inf_sasl_context_client_supports_mechanism ()">inf_sasl_context_client_supports_mechanism</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">const <span class="returnvalue">char</span> *
</td>
<td class="function_name">
<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> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a class="link" href="InfSaslContext.html#InfSaslContextSession" title="InfSaslContextSession"><span class="returnvalue">InfSaslContextSession</span></a> *
</td>
<td class="function_name">
<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> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">char</span> *
</td>
<td class="function_name">
<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> <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="InfSaslContext.html#inf-sasl-context-server-supports-mechanism" title="inf_sasl_context_server_supports_mechanism ()">inf_sasl_context_server_supports_mechanism</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">void</span>
</td>
<td class="function_name">
<a class="link" href="InfSaslContext.html#inf-sasl-context-stop-session" title="inf_sasl_context_stop_session ()">inf_sasl_context_stop_session</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">const <span class="returnvalue">char</span> *
</td>
<td class="function_name">
<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> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">void</span>
</td>
<td class="function_name">
<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> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">void</span>
</td>
<td class="function_name">
<a class="link" href="InfSaslContext.html#inf-sasl-context-session-continue" title="inf_sasl_context_session_continue ()">inf_sasl_context_session_continue</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">void</span>
</td>
<td class="function_name">
<a class="link" href="InfSaslContext.html#inf-sasl-context-session-feed" title="inf_sasl_context_session_feed ()">inf_sasl_context_session_feed</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="InfSaslContext.html#inf-sasl-context-session-is-processing" title="inf_sasl_context_session_is_processing ()">inf_sasl_context_session_is_processing</a> <span class="c_punctuation">()</span>
</td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect1">
<a name="InfSaslContext.other"></a><h2>Types and Values</h2>
<div class="informaltable"><table class="informaltable" 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="InfSaslContext.html#InfSaslContext-struct" title="InfSaslContext">InfSaslContext</a></td>
</tr>
<tr>
<td class="datatype_keyword"> </td>
<td class="function_name"><a class="link" href="InfSaslContext.html#InfSaslContextSession" title="InfSaslContextSession">InfSaslContextSession</a></td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect1">
<a name="InfSaslContext.object-hierarchy"></a><h2>Object Hierarchy</h2>
<pre class="screen">    <a href="/usr/share/gtk-doc/html/gobject/gobject-Boxed-Types.html">GBoxed</a>
    <span class="lineart">╰──</span> InfSaslContext
</pre>
</div>
<div class="refsect1">
<a name="InfSaslContext.includes"></a><h2>Includes</h2>
<pre class="synopsis">#include &lt;libinfinity/common/inf-sasl-context.h&gt;
</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.functions_details"></a><h2>Functions</h2>
<div class="refsect2">
<a name="InfSaslContextCallbackFunc"></a><h3>InfSaslContextCallbackFunc ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
<span class="c_punctuation">(</span>*InfSaslContextCallbackFunc<span class="c_punctuation">)</span> (<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="refsect3">
<a name="InfSaslContextCallbackFunc.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" 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>session</p></td>
<td class="parameter_description"><p>A <a class="link" href="InfSaslContext.html#InfSaslContextSession" title="InfSaslContextSession"><span class="type">InfSaslContextSession</span></a>.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>property</p></td>
<td class="parameter_description"><p>The property requested.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>session_data</p></td>
<td class="parameter_description"><p>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>.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>user_data</p></td>
<td class="parameter_description"><p>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>.</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
</div>
<hr>
<div class="refsect2">
<a name="InfSaslContextSessionFeedFunc"></a><h3>InfSaslContextSessionFeedFunc ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
<span class="c_punctuation">(</span>*InfSaslContextSessionFeedFunc<span class="c_punctuation">)</span> (<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="refsect3">
<a name="InfSaslContextSessionFeedFunc.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" 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>session</p></td>
<td class="parameter_description"><p>A <a class="link" href="InfSaslContext.html#InfSaslContextSession" title="InfSaslContextSession"><span class="type">InfSaslContextSession</span></a>.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>data</p></td>
<td class="parameter_description"><p>The response to the fed data, base64 encoded and null-terminated.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>needs_more</p></td>
<td class="parameter_description"><p>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.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>error</p></td>
<td class="parameter_description"><p>This is nonzero if an error occured while processing the input
data.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>user_data</p></td>
<td class="parameter_description"><p>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>.</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</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="refsect3">
<a name="inf-sasl-context-new.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" 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>error</p></td>
<td class="parameter_description"><p>Location to store error information, if any.</p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="inf-sasl-context-new.returns"></a><h4>Returns</h4>
<p> 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.</p>
</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="refsect3">
<a name="inf-sasl-context-ref.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" 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>context</p></td>
<td class="parameter_description"><p>A <a class="link" href="InfSaslContext.html" title="InfSaslContext"><span class="type">InfSaslContext</span></a>.</p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="inf-sasl-context-ref.returns"></a><h4>Returns</h4>
<p> The passed in pointer, <em class="parameter"><code>context</code></em>
.</p>
</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="refsect3">
<a name="inf-sasl-context-unref.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" 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>context</p></td>
<td class="parameter_description"><p>A <a class="link" href="InfSaslContext.html" title="InfSaslContext"><span class="type">InfSaslContext</span></a>.</p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</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="refsect3">
<a name="inf-sasl-context-set-callback.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" 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>context</p></td>
<td class="parameter_description"><p>A <a class="link" href="InfSaslContext.html" title="InfSaslContext"><span class="type">InfSaslContext</span></a>.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>callback</p></td>
<td class="parameter_description"><p>A function to call to query properties for authentication.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>user_data</p></td>
<td class="parameter_description"><p>Additional context to pass to <em class="parameter"><code>callback</code></em>
.</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</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="refsect3">
<a name="inf-sasl-context-client-start-session.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" 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>context</p></td>
<td class="parameter_description"><p>A <a class="link" href="InfSaslContext.html" title="InfSaslContext"><span class="type">InfSaslContext</span></a>.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>io</p></td>
<td class="parameter_description"><p>The <a class="link" href="InfIo.html" title="InfIo"><span class="type">InfIo</span></a> main loop to which to dispatch callbacks.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>mech</p></td>
<td class="parameter_description"><p>The mechanism to use for the session.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>session_data</p></td>
<td class="parameter_description"><p>Session-specific data to provide to the
<a class="link" href="InfSaslContext.html#InfSaslContextCallbackFunc" title="InfSaslContextCallbackFunc ()"><span class="type">InfSaslContextCallbackFunc</span></a>.</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.</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="inf-sasl-context-client-start-session.returns"></a><h4>Returns</h4>
<p> A <a class="link" href="InfSaslContext.html#InfSaslContextSession" title="InfSaslContextSession"><span class="type">InfSaslContextSession</span></a>.</p>
</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="refsect3">
<a name="inf-sasl-context-client-list-mechanisms.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" 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>context</p></td>
<td class="parameter_description"><p>A <a class="link" href="InfSaslContext.html" title="InfSaslContext"><span class="type">InfSaslContext</span></a>.</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.</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="inf-sasl-context-client-list-mechanisms.returns"></a><h4>Returns</h4>
<p> A newly allocated string. Free with <code class="function">gsasl_free()</code> when no longer
in use.</p>
</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="refsect3">
<a name="inf-sasl-context-client-supports-mechanism.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" 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>context</p></td>
<td class="parameter_description"><p>A <a class="link" href="InfSaslContext.html" title="InfSaslContext"><span class="type">InfSaslContext</span></a>.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>mech</p></td>
<td class="parameter_description"><p>The name of the mechanism to be tested.</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="inf-sasl-context-client-supports-mechanism.returns"></a><h4>Returns</h4>
<p> <code class="literal">TRUE</code> if <em class="parameter"><code>mech</code></em>
is supported or <code class="literal">FALSE</code> otherwise.</p>
</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="refsect3">
<a name="inf-sasl-context-client-suggest-mechanism.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" 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>context</p></td>
<td class="parameter_description"><p>A <a class="link" href="InfSaslContext.html" title="InfSaslContext"><span class="type">InfSaslContext</span></a>.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>mechanisms</p></td>
<td class="parameter_description"><p>Space-separated list of SASL mechanism names.</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="inf-sasl-context-client-suggest-mechanism.returns"></a><h4>Returns</h4>
<p> The name of the suggested mechanism.</p>
</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="refsect3">
<a name="inf-sasl-context-server-start-session.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" 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>context</p></td>
<td class="parameter_description"><p>A <a class="link" href="InfSaslContext.html" title="InfSaslContext"><span class="type">InfSaslContext</span></a>.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>io</p></td>
<td class="parameter_description"><p>The <a class="link" href="InfIo.html" title="InfIo"><span class="type">InfIo</span></a> main loop to which to dispatch callbacks.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>mech</p></td>
<td class="parameter_description"><p>The mechanism to use for the session.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>session_data</p></td>
<td class="parameter_description"><p>Session-specific data to provide to the
<a class="link" href="InfSaslContext.html#InfSaslContextCallbackFunc" title="InfSaslContextCallbackFunc ()"><span class="type">InfSaslContextCallbackFunc</span></a>.</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.</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="inf-sasl-context-server-start-session.returns"></a><h4>Returns</h4>
<p> A <a class="link" href="InfSaslContext.html#InfSaslContextSession" title="InfSaslContextSession"><span class="type">InfSaslContextSession</span></a>.</p>
</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="refsect3">
<a name="inf-sasl-context-server-list-mechanisms.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" 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>context</p></td>
<td class="parameter_description"><p>A <a class="link" href="InfSaslContext.html" title="InfSaslContext"><span class="type">InfSaslContext</span></a>.</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.</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="inf-sasl-context-server-list-mechanisms.returns"></a><h4>Returns</h4>
<p> A newly allocated string. Free with <code class="function">gsasl_free()</code> when no longer
in use.</p>
</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="refsect3">
<a name="inf-sasl-context-server-supports-mechanism.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" 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>context</p></td>
<td class="parameter_description"><p>A <a class="link" href="InfSaslContext.html" title="InfSaslContext"><span class="type">InfSaslContext</span></a>.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>mech</p></td>
<td class="parameter_description"><p>The name of the mechanism to be tested.</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="inf-sasl-context-server-supports-mechanism.returns"></a><h4>Returns</h4>
<p> <code class="literal">TRUE</code> if <em class="parameter"><code>mech</code></em>
is supported or <code class="literal">FALSE</code> otherwise.</p>
</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="refsect3">
<a name="inf-sasl-context-stop-session.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" 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>context</p></td>
<td class="parameter_description"><p>A <a class="link" href="InfSaslContext.html" title="InfSaslContext"><span class="type">InfSaslContext</span></a>.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>session</p></td>
<td class="parameter_description"><p>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>
.</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</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="refsect3">
<a name="inf-sasl-context-session-get-property.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" 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>session</p></td>
<td class="parameter_description"><p>A <a class="link" href="InfSaslContext.html#InfSaslContextSession" title="InfSaslContextSession"><span class="type">InfSaslContextSession</span></a>.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>prop</p></td>
<td class="parameter_description"><p>A SASL property.</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="inf-sasl-context-session-get-property.returns"></a><h4>Returns</h4>
<p> The value of the property, or <code class="literal">NULL</code>. The value is owned by the
session and must not be freed.</p>
</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="refsect3">
<a name="inf-sasl-context-session-set-property.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" 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>session</p></td>
<td class="parameter_description"><p>A <a class="link" href="InfSaslContext.html#InfSaslContextSession" title="InfSaslContextSession"><span class="type">InfSaslContextSession</span></a>.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>prop</p></td>
<td class="parameter_description"><p>A SASL property.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>value</p></td>
<td class="parameter_description"><p>The value to set the property to.</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</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="refsect3">
<a name="inf-sasl-context-session-continue.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" 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>session</p></td>
<td class="parameter_description"><p>A <a class="link" href="InfSaslContext.html#InfSaslContextSession" title="InfSaslContextSession"><span class="type">InfSaslContextSession</span></a>.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>retval</p></td>
<td class="parameter_description"><p>Error code of the operation requested.</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</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="refsect3">
<a name="inf-sasl-context-session-feed.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" 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>session</p></td>
<td class="parameter_description"><p>A <a class="link" href="InfSaslContext.html#InfSaslContextSession" title="InfSaslContextSession"><span class="type">InfSaslContextSession</span></a>.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>data</p></td>
<td class="parameter_description"><p>The data to feed to the SASL session.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>func</p></td>
<td class="parameter_description"><p>The function to call when the data has been processed.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>user_data</p></td>
<td class="parameter_description"><p>Additional user data to pass to <em class="parameter"><code>func</code></em>
.</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
</div>
<hr>
<div class="refsect2">
<a name="inf-sasl-context-session-is-processing"></a><h3>inf_sasl_context_session_is_processing ()</h3>
<pre class="programlisting"><span class="returnvalue">gboolean</span>
inf_sasl_context_session_is_processing
                               (<em class="parameter"><code><a class="link" href="InfSaslContext.html#InfSaslContextSession" title="InfSaslContextSession"><span class="type">InfSaslContextSession</span></a> *session</code></em>);</pre>
<p>Returns whether the session is currently asynchronously processing data
fed to it with <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>. In this case the first
call needs to finish before another one is allowed to be made.</p>
<div class="refsect3">
<a name="inf-sasl-context-session-is-processing.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" 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>session</p></td>
<td class="parameter_description"><p>A <a class="link" href="InfSaslContext.html#InfSaslContextSession" title="InfSaslContextSession"><span class="type">InfSaslContextSession</span></a>.</p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="inf-sasl-context-session-is-processing.returns"></a><h4>Returns</h4>
<p> Whether <em class="parameter"><code>session</code></em>
is currently processing data asynchronously.</p>
</div>
</div>
</div>
<div class="refsect1">
<a name="InfSaslContext.other_details"></a><h2>Types and Values</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>
</div>
</div>
<div class="footer">
<hr>Generated by GTK-Doc V1.25</div>
</body>
</html>