This file is indexed.

/usr/share/gtk-doc/html/libinfinity-0.5/InfXmppConnection.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
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
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>InfXmppConnection</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="InfXmlConnection.html" title="InfXmlConnection">
<link rel="next" href="InfSimulatedConnection.html" title="InfSimulatedConnection">
<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="InfXmlConnection.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="InfSimulatedConnection.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td>
</tr>
<tr><td colspan="5" class="shortcuts">
<a href="#InfXmppConnection.synopsis" class="shortcut">Top</a>
                   | 
                  <a href="#InfXmppConnection.description" class="shortcut">Description</a>
                   | 
                  <a href="#InfXmppConnection.object-hierarchy" class="shortcut">Object Hierarchy</a>
                   | 
                  <a href="#InfXmppConnection.implemented-interfaces" class="shortcut">Implemented Interfaces</a>
                   | 
                  <a href="#InfXmppConnection.properties" class="shortcut">Properties</a>
</td></tr>
</table>
<div class="refentry">
<a name="InfXmppConnection"></a><div class="titlepage"></div>
<div class="refnamediv"><table width="100%"><tr>
<td valign="top">
<h2><span class="refentrytitle"><a name="InfXmppConnection.top_of_page"></a>InfXmppConnection</span></h2>
<p>InfXmppConnection</p>
</td>
<td valign="top" align="right"></td>
</tr></table></div>
<div class="refsynopsisdiv">
<a name="InfXmppConnection.synopsis"></a><h2>Synopsis</h2>
<a name="InfXmppConnectionSite"></a><a name="InfXmppConnectionSecurityPolicy"></a><pre class="synopsis"><span class="returnvalue">void</span>                (<a class="link" href="InfXmppConnection.html#InfXmppConnectionCrtCallback" title="InfXmppConnectionCrtCallback ()">*InfXmppConnectionCrtCallback</a>)     (<em class="parameter"><code><a class="link" href="InfXmppConnection.html" title="InfXmppConnection"><span class="type">InfXmppConnection</span></a> *xmpp</code></em>,
                                                         <em class="parameter"><code><a class="link" href="InfCertificateChain.html" title="InfCertificateChain"><span class="type">InfCertificateChain</span></a> *chain</code></em>,
                                                         <em class="parameter"><code><span class="type">gpointer</span> user_data</code></em>);
enum                <a class="link" href="InfXmppConnection.html#InfXmppConnectionSite-enum" title="enum InfXmppConnectionSite">InfXmppConnectionSite</a>;
enum                <a class="link" href="InfXmppConnection.html#InfXmppConnectionSecurityPolicy-enum" title="enum InfXmppConnectionSecurityPolicy">InfXmppConnectionSecurityPolicy</a>;
enum                <a class="link" href="InfXmppConnection.html#InfXmppConnectionError" title="enum InfXmppConnectionError">InfXmppConnectionError</a>;
enum                <a class="link" href="InfXmppConnection.html#InfXmppConnectionStreamError" title="enum InfXmppConnectionStreamError">InfXmppConnectionStreamError</a>;
enum                <a class="link" href="InfXmppConnection.html#InfXmppConnectionAuthError" title="enum InfXmppConnectionAuthError">InfXmppConnectionAuthError</a>;
                    <a class="link" href="InfXmppConnection.html#InfXmppConnection-struct" title="InfXmppConnection">InfXmppConnection</a>;
struct              <a class="link" href="InfXmppConnection.html#InfXmppConnectionClass" title="struct InfXmppConnectionClass">InfXmppConnectionClass</a>;
<a class="link" href="InfXmppConnection.html" title="InfXmppConnection"><span class="returnvalue">InfXmppConnection</span></a> * <a class="link" href="InfXmppConnection.html#inf-xmpp-connection-new" title="inf_xmpp_connection_new ()">inf_xmpp_connection_new</a>             (<em class="parameter"><code><a class="link" href="InfTcpConnection.html" title="InfTcpConnection"><span class="type">InfTcpConnection</span></a> *tcp</code></em>,
                                                         <em class="parameter"><code><a class="link" href="InfXmppConnection.html#InfXmppConnectionSite"><span class="type">InfXmppConnectionSite</span></a> site</code></em>,
                                                         <em class="parameter"><code>const <span class="type">gchar</span> *local_hostname</code></em>,
                                                         <em class="parameter"><code>const <span class="type">gchar</span> *remote_hostname</code></em>,
                                                         <em class="parameter"><code><a class="link" href="InfXmppConnection.html#InfXmppConnectionSecurityPolicy"><span class="type">InfXmppConnectionSecurityPolicy</span></a> security_policy</code></em>,
                                                         <em class="parameter"><code><a class="link" href="InfCertificateCredentials.html" title="InfCertificateCredentials"><span class="type">InfCertificateCredentials</span></a> *creds</code></em>,
                                                         <em class="parameter"><code><a class="link" href="InfSaslContext.html" title="InfSaslContext"><span class="type">InfSaslContext</span></a> *sasl_context</code></em>,
                                                         <em class="parameter"><code>const <span class="type">gchar</span> *sasl_mechanisms</code></em>);
<span class="returnvalue">gboolean</span>            <a class="link" href="InfXmppConnection.html#inf-xmpp-connection-get-tls-enabled" title="inf_xmpp_connection_get_tls_enabled ()">inf_xmpp_connection_get_tls_enabled</a> (<em class="parameter"><code><a class="link" href="InfXmppConnection.html" title="InfXmppConnection"><span class="type">InfXmppConnection</span></a> *xmpp</code></em>);
<span class="returnvalue">void</span>                <a class="link" href="InfXmppConnection.html#inf-xmpp-connection-set-certificate-callback" title="inf_xmpp_connection_set_certificate_callback ()">inf_xmpp_connection_set_certificate_callback</a>
                                                        (<em class="parameter"><code><a class="link" href="InfXmppConnection.html" title="InfXmppConnection"><span class="type">InfXmppConnection</span></a> *xmpp</code></em>,
                                                         <em class="parameter"><code><a class="link" href="InfXmppConnection.html#InfXmppConnectionCrtCallback" title="InfXmppConnectionCrtCallback ()"><span class="type">InfXmppConnectionCrtCallback</span></a> cb</code></em>,
                                                         <em class="parameter"><code><span class="type">gpointer</span> user_data</code></em>);
<span class="returnvalue">void</span>                <a class="link" href="InfXmppConnection.html#inf-xmpp-connection-certificate-verify-continue" title="inf_xmpp_connection_certificate_verify_continue ()">inf_xmpp_connection_certificate_verify_continue</a>
                                                        (<em class="parameter"><code><a class="link" href="InfXmppConnection.html" title="InfXmppConnection"><span class="type">InfXmppConnection</span></a> *xmpp</code></em>);
<span class="returnvalue">void</span>                <a class="link" href="InfXmppConnection.html#inf-xmpp-connection-certificate-verify-cancel" title="inf_xmpp_connection_certificate_verify_cancel ()">inf_xmpp_connection_certificate_verify_cancel</a>
                                                        (<em class="parameter"><code><a class="link" href="InfXmppConnection.html" title="InfXmppConnection"><span class="type">InfXmppConnection</span></a> *xmpp</code></em>);
<span class="returnvalue">void</span>                <a class="link" href="InfXmppConnection.html#inf-xmpp-connection-reset-sasl-authentication" title="inf_xmpp_connection_reset_sasl_authentication ()">inf_xmpp_connection_reset_sasl_authentication</a>
                                                        (<em class="parameter"><code><a class="link" href="InfXmppConnection.html" title="InfXmppConnection"><span class="type">InfXmppConnection</span></a> *xmpp</code></em>,
                                                         <em class="parameter"><code><a class="link" href="InfSaslContext.html" title="InfSaslContext"><span class="type">InfSaslContext</span></a> *new_context</code></em>,
                                                         <em class="parameter"><code>const <span class="type">gchar</span> *new_mechanisms</code></em>);
<span class="returnvalue">gboolean</span>            <a class="link" href="InfXmppConnection.html#inf-xmpp-connection-retry-sasl-authentication" title="inf_xmpp_connection_retry_sasl_authentication ()">inf_xmpp_connection_retry_sasl_authentication</a>
                                                        (<em class="parameter"><code><a class="link" href="InfXmppConnection.html" title="InfXmppConnection"><span class="type">InfXmppConnection</span></a> *xmpp</code></em>,
                                                         <em class="parameter"><code><span class="type">GError</span> **error</code></em>);
<span class="returnvalue">void</span>                <a class="link" href="InfXmppConnection.html#inf-xmpp-connection-set-sasl-error" title="inf_xmpp_connection_set_sasl_error ()">inf_xmpp_connection_set_sasl_error</a>  (<em class="parameter"><code><a class="link" href="InfXmppConnection.html" title="InfXmppConnection"><span class="type">InfXmppConnection</span></a> *xmpp</code></em>,
                                                         <em class="parameter"><code>const <span class="type">GError</span> *error</code></em>);
const <span class="returnvalue">GError</span> *      <a class="link" href="InfXmppConnection.html#inf-xmpp-connection-get-sasl-error" title="inf_xmpp_connection_get_sasl_error ()">inf_xmpp_connection_get_sasl_error</a>  (<em class="parameter"><code><a class="link" href="InfXmppConnection.html" title="InfXmppConnection"><span class="type">InfXmppConnection</span></a> *xmpp</code></em>);
</pre>
</div>
<div class="refsect1">
<a name="InfXmppConnection.object-hierarchy"></a><h2>Object Hierarchy</h2>
<pre class="synopsis">
  GEnum
   +----InfXmppConnectionSite
</pre>
<pre class="synopsis">
  GEnum
   +----InfXmppConnectionSecurityPolicy
</pre>
<pre class="synopsis">
  GObject
   +----InfXmppConnection
</pre>
</div>
<div class="refsect1">
<a name="InfXmppConnection.implemented-interfaces"></a><h2>Implemented Interfaces</h2>
<p>
InfXmppConnection implements
 <a class="link" href="InfXmlConnection.html" title="InfXmlConnection">InfXmlConnection</a>.</p>
</div>
<div class="refsect1">
<a name="InfXmppConnection.properties"></a><h2>Properties</h2>
<pre class="synopsis">
  "<a class="link" href="InfXmppConnection.html#InfXmppConnection--credentials" title='The "credentials" property'>credentials</a>"              <a class="link" href="InfCertificateCredentials.html" title="InfCertificateCredentials"><span class="type">InfCertificateCredentials</span></a>*  : Read / Write / Construct Only
  "<a class="link" href="InfXmppConnection.html#InfXmppConnection--local-hostname" title='The "local-hostname" property'>local-hostname</a>"           <span class="type">gchar</span>*                : Read / Write / Construct Only
  "<a class="link" href="InfXmppConnection.html#InfXmppConnection--remote-hostname" title='The "remote-hostname" property'>remote-hostname</a>"          <span class="type">gchar</span>*                : Read / Write / Construct Only
  "<a class="link" href="InfXmppConnection.html#InfXmppConnection--sasl-context" title='The "sasl-context" property'>sasl-context</a>"             <a class="link" href="InfSaslContext.html" title="InfSaslContext"><span class="type">InfSaslContext</span></a>*       : Read / Write / Construct Only
  "<a class="link" href="InfXmppConnection.html#InfXmppConnection--sasl-mechanisms" title='The "sasl-mechanisms" property'>sasl-mechanisms</a>"          <span class="type">gchar</span>*                : Read / Write / Construct Only
  "<a class="link" href="InfXmppConnection.html#InfXmppConnection--security-policy" title='The "security-policy" property'>security-policy</a>"          <a class="link" href="InfXmppConnection.html#InfXmppConnectionSecurityPolicy"><span class="type">InfXmppConnectionSecurityPolicy</span></a>  : Read / Write / Construct Only
  "<a class="link" href="InfXmppConnection.html#InfXmppConnection--site" title='The "site" property'>site</a>"                     <a class="link" href="InfXmppConnection.html#InfXmppConnectionSite"><span class="type">InfXmppConnectionSite</span></a>  : Read / Write / Construct Only
  "<a class="link" href="InfXmppConnection.html#InfXmppConnection--tcp-connection" title='The "tcp-connection" property'>tcp-connection</a>"           <a class="link" href="InfTcpConnection.html" title="InfTcpConnection"><span class="type">InfTcpConnection</span></a>*     : Read / Write / Construct Only
  "<a class="link" href="InfXmppConnection.html#InfXmppConnection--tls-enabled" title='The "tls-enabled" property'>tls-enabled</a>"              <span class="type">gboolean</span>              : Read
</pre>
</div>
<div class="refsect1">
<a name="InfXmppConnection.description"></a><h2>Description</h2>
<p>
</p>
</div>
<div class="refsect1">
<a name="InfXmppConnection.details"></a><h2>Details</h2>
<div class="refsect2">
<a name="InfXmppConnectionCrtCallback"></a><h3>InfXmppConnectionCrtCallback ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                (*InfXmppConnectionCrtCallback)     (<em class="parameter"><code><a class="link" href="InfXmppConnection.html" title="InfXmppConnection"><span class="type">InfXmppConnection</span></a> *xmpp</code></em>,
                                                         <em class="parameter"><code><a class="link" href="InfCertificateChain.html" title="InfCertificateChain"><span class="type">InfCertificateChain</span></a> *chain</code></em>,
                                                         <em class="parameter"><code><span class="type">gpointer</span> user_data</code></em>);</pre>
<p>
</p>
</div>
<hr>
<div class="refsect2">
<a name="InfXmppConnectionSite-enum"></a><h3>enum InfXmppConnectionSite</h3>
<pre class="programlisting">typedef enum {
  INF_XMPP_CONNECTION_SERVER,
  INF_XMPP_CONNECTION_CLIENT
} InfXmppConnectionSite;
</pre>
<p>
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><a name="INF-XMPP-CONNECTION-SERVER:CAPS"></a><span class="term"><code class="literal">INF_XMPP_CONNECTION_SERVER</code></span></p></td>
<td>
</td>
</tr>
<tr>
<td><p><a name="INF-XMPP-CONNECTION-CLIENT:CAPS"></a><span class="term"><code class="literal">INF_XMPP_CONNECTION_CLIENT</code></span></p></td>
<td>
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="InfXmppConnectionSecurityPolicy-enum"></a><h3>enum InfXmppConnectionSecurityPolicy</h3>
<pre class="programlisting">typedef enum {
  /* Server: Do not offer TLS.
   * Client: Only connect if TLS is not required. */
  INF_XMPP_CONNECTION_SECURITY_ONLY_UNSECURED,
  /* Server: Require TLS.
   * Client: Only connect if TLS is available. */
  INF_XMPP_CONNECTION_SECURITY_ONLY_TLS,
  /* Server: Offer both.
   * Client: Use unsecured communication unless TLS is required */
  INF_XMPP_CONNECTION_SECURITY_BOTH_PREFER_UNSECURED,
  /* Server: Offer both.
   * Client: Use TLS-secured communication unless TLS is not available. */
  INF_XMPP_CONNECTION_SECURITY_BOTH_PREFER_TLS
} InfXmppConnectionSecurityPolicy;
</pre>
<p>
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><a name="INF-XMPP-CONNECTION-SECURITY-ONLY-UNSECURED:CAPS"></a><span class="term"><code class="literal">INF_XMPP_CONNECTION_SECURITY_ONLY_UNSECURED</code></span></p></td>
<td>
</td>
</tr>
<tr>
<td><p><a name="INF-XMPP-CONNECTION-SECURITY-ONLY-TLS:CAPS"></a><span class="term"><code class="literal">INF_XMPP_CONNECTION_SECURITY_ONLY_TLS</code></span></p></td>
<td>
</td>
</tr>
<tr>
<td><p><a name="INF-XMPP-CONNECTION-SECURITY-BOTH-PREFER-UNSECURED:CAPS"></a><span class="term"><code class="literal">INF_XMPP_CONNECTION_SECURITY_BOTH_PREFER_UNSECURED</code></span></p></td>
<td>
</td>
</tr>
<tr>
<td><p><a name="INF-XMPP-CONNECTION-SECURITY-BOTH-PREFER-TLS:CAPS"></a><span class="term"><code class="literal">INF_XMPP_CONNECTION_SECURITY_BOTH_PREFER_TLS</code></span></p></td>
<td>
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="InfXmppConnectionError"></a><h3>enum InfXmppConnectionError</h3>
<pre class="programlisting">typedef enum {
  /* Server does not support TLS */
  INF_XMPP_CONNECTION_ERROR_TLS_UNSUPPORTED,
  /* The server requires TLS, but we don't want TLS */
  INF_XMPP_CONNECTION_ERROR_TLS_REQUIRED,
  /* Got &lt;failure&gt; as response to &lt;starttls&gt; */
  INF_XMPP_CONNECTION_ERROR_TLS_FAILURE,
  /* The server did not provide a certificate */
  INF_XMPP_CONNECTION_ERROR_NO_CERTIFICATE_PROVIDED,
  /* The server certificate is not trusted */
  INF_XMPP_CONNECTION_ERROR_CERTIFICATE_NOT_TRUSTED,
  /* Server does not provide authentication mechanisms */
  INF_XMPP_CONNECTION_ERROR_AUTHENTICATION_UNSUPPORTED,
  /* Server does not offer a suitable machnism */
  INF_XMPP_CONNECTION_ERROR_NO_SUITABLE_MECHANISM,

  INF_XMPP_CONNECTION_ERROR_FAILED
} InfXmppConnectionError;
</pre>
<p>
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><a name="INF-XMPP-CONNECTION-ERROR-TLS-UNSUPPORTED:CAPS"></a><span class="term"><code class="literal">INF_XMPP_CONNECTION_ERROR_TLS_UNSUPPORTED</code></span></p></td>
<td>
</td>
</tr>
<tr>
<td><p><a name="INF-XMPP-CONNECTION-ERROR-TLS-REQUIRED:CAPS"></a><span class="term"><code class="literal">INF_XMPP_CONNECTION_ERROR_TLS_REQUIRED</code></span></p></td>
<td>
</td>
</tr>
<tr>
<td><p><a name="INF-XMPP-CONNECTION-ERROR-TLS-FAILURE:CAPS"></a><span class="term"><code class="literal">INF_XMPP_CONNECTION_ERROR_TLS_FAILURE</code></span></p></td>
<td>
</td>
</tr>
<tr>
<td><p><a name="INF-XMPP-CONNECTION-ERROR-NO-CERTIFICATE-PROVIDED:CAPS"></a><span class="term"><code class="literal">INF_XMPP_CONNECTION_ERROR_NO_CERTIFICATE_PROVIDED</code></span></p></td>
<td>
</td>
</tr>
<tr>
<td><p><a name="INF-XMPP-CONNECTION-ERROR-CERTIFICATE-NOT-TRUSTED:CAPS"></a><span class="term"><code class="literal">INF_XMPP_CONNECTION_ERROR_CERTIFICATE_NOT_TRUSTED</code></span></p></td>
<td>
</td>
</tr>
<tr>
<td><p><a name="INF-XMPP-CONNECTION-ERROR-AUTHENTICATION-UNSUPPORTED:CAPS"></a><span class="term"><code class="literal">INF_XMPP_CONNECTION_ERROR_AUTHENTICATION_UNSUPPORTED</code></span></p></td>
<td>
</td>
</tr>
<tr>
<td><p><a name="INF-XMPP-CONNECTION-ERROR-NO-SUITABLE-MECHANISM:CAPS"></a><span class="term"><code class="literal">INF_XMPP_CONNECTION_ERROR_NO_SUITABLE_MECHANISM</code></span></p></td>
<td>
</td>
</tr>
<tr>
<td><p><a name="INF-XMPP-CONNECTION-ERROR-FAILED:CAPS"></a><span class="term"><code class="literal">INF_XMPP_CONNECTION_ERROR_FAILED</code></span></p></td>
<td>
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="InfXmppConnectionStreamError"></a><h3>enum InfXmppConnectionStreamError</h3>
<pre class="programlisting">typedef enum {
  INF_XMPP_CONNECTION_STREAM_ERROR_BAD_FORMAT,
  INF_XMPP_CONNECTION_STREAM_ERROR_BAD_NAMESPACE_PREFIX,
  INF_XMPP_CONNECTION_STREAM_ERROR_CONFLICT,
  INF_XMPP_CONNECTION_STREAM_ERROR_CONNECTION_TIMEOUT,
  INF_XMPP_CONNECTION_STREAM_ERROR_HOST_GONE,
  INF_XMPP_CONNECTION_STREAM_ERROR_HOST_UNKNOWN,
  INF_XMPP_CONNECTION_STREAM_ERROR_IMPROPER_ADDRESSING,
  INF_XMPP_CONNECTION_STREAM_ERROR_INTERNAL_SERVER_ERROR,
  INF_XMPP_CONNECTION_STREAM_ERROR_INVALID_FROM,
  INF_XMPP_CONNECTION_STREAM_ERROR_INVALID_ID,
  INF_XMPP_CONNECTION_STREAM_ERROR_INVALID_NAMESPACE,
  INF_XMPP_CONNECTION_STREAM_ERROR_INVALID_XML,
  INF_XMPP_CONNECTION_STREAM_ERROR_NOT_AUTHORIZED,
  INF_XMPP_CONNECTION_STREAM_ERROR_POLICY_VIOLATION,
  INF_XMPP_CONNECTION_STREAM_ERROR_REMOTE_CONNECTION_FAILED,
  INF_XMPP_CONNECTION_STREAM_ERROR_RESOURCE_CONSTRAINT,
  INF_XMPP_CONNECTION_STREAM_ERROR_RESTRICTED_XML,
  INF_XMPP_CONNECTION_STREAM_ERROR_SEE_OTHER_HOST,
  INF_XMPP_CONNECTION_STREAM_ERROR_SYSTEM_SHUTDOWN,
  INF_XMPP_CONNECTION_STREAM_ERROR_UNDEFINED_CONDITION,
  INF_XMPP_CONNECTION_STREAM_ERROR_UNSUPPORTED_ENCODING,
  INF_XMPP_CONNECTION_STREAM_ERROR_UNSUPPORTED_STANZA_TYPE,
  INF_XMPP_CONNECTION_STREAM_ERROR_UNSUPPORTED_VERSION,
  INF_XMPP_CONNECTION_STREAM_ERROR_XML_NOT_WELL_FORMED,

  INF_XMPP_CONNECTION_STREAM_ERROR_FAILED
} InfXmppConnectionStreamError;
</pre>
<p>
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><a name="INF-XMPP-CONNECTION-STREAM-ERROR-BAD-FORMAT:CAPS"></a><span class="term"><code class="literal">INF_XMPP_CONNECTION_STREAM_ERROR_BAD_FORMAT</code></span></p></td>
<td>
</td>
</tr>
<tr>
<td><p><a name="INF-XMPP-CONNECTION-STREAM-ERROR-BAD-NAMESPACE-PREFIX:CAPS"></a><span class="term"><code class="literal">INF_XMPP_CONNECTION_STREAM_ERROR_BAD_NAMESPACE_PREFIX</code></span></p></td>
<td>
</td>
</tr>
<tr>
<td><p><a name="INF-XMPP-CONNECTION-STREAM-ERROR-CONFLICT:CAPS"></a><span class="term"><code class="literal">INF_XMPP_CONNECTION_STREAM_ERROR_CONFLICT</code></span></p></td>
<td>
</td>
</tr>
<tr>
<td><p><a name="INF-XMPP-CONNECTION-STREAM-ERROR-CONNECTION-TIMEOUT:CAPS"></a><span class="term"><code class="literal">INF_XMPP_CONNECTION_STREAM_ERROR_CONNECTION_TIMEOUT</code></span></p></td>
<td>
</td>
</tr>
<tr>
<td><p><a name="INF-XMPP-CONNECTION-STREAM-ERROR-HOST-GONE:CAPS"></a><span class="term"><code class="literal">INF_XMPP_CONNECTION_STREAM_ERROR_HOST_GONE</code></span></p></td>
<td>
</td>
</tr>
<tr>
<td><p><a name="INF-XMPP-CONNECTION-STREAM-ERROR-HOST-UNKNOWN:CAPS"></a><span class="term"><code class="literal">INF_XMPP_CONNECTION_STREAM_ERROR_HOST_UNKNOWN</code></span></p></td>
<td>
</td>
</tr>
<tr>
<td><p><a name="INF-XMPP-CONNECTION-STREAM-ERROR-IMPROPER-ADDRESSING:CAPS"></a><span class="term"><code class="literal">INF_XMPP_CONNECTION_STREAM_ERROR_IMPROPER_ADDRESSING</code></span></p></td>
<td>
</td>
</tr>
<tr>
<td><p><a name="INF-XMPP-CONNECTION-STREAM-ERROR-INTERNAL-SERVER-ERROR:CAPS"></a><span class="term"><code class="literal">INF_XMPP_CONNECTION_STREAM_ERROR_INTERNAL_SERVER_ERROR</code></span></p></td>
<td>
</td>
</tr>
<tr>
<td><p><a name="INF-XMPP-CONNECTION-STREAM-ERROR-INVALID-FROM:CAPS"></a><span class="term"><code class="literal">INF_XMPP_CONNECTION_STREAM_ERROR_INVALID_FROM</code></span></p></td>
<td>
</td>
</tr>
<tr>
<td><p><a name="INF-XMPP-CONNECTION-STREAM-ERROR-INVALID-ID:CAPS"></a><span class="term"><code class="literal">INF_XMPP_CONNECTION_STREAM_ERROR_INVALID_ID</code></span></p></td>
<td>
</td>
</tr>
<tr>
<td><p><a name="INF-XMPP-CONNECTION-STREAM-ERROR-INVALID-NAMESPACE:CAPS"></a><span class="term"><code class="literal">INF_XMPP_CONNECTION_STREAM_ERROR_INVALID_NAMESPACE</code></span></p></td>
<td>
</td>
</tr>
<tr>
<td><p><a name="INF-XMPP-CONNECTION-STREAM-ERROR-INVALID-XML:CAPS"></a><span class="term"><code class="literal">INF_XMPP_CONNECTION_STREAM_ERROR_INVALID_XML</code></span></p></td>
<td>
</td>
</tr>
<tr>
<td><p><a name="INF-XMPP-CONNECTION-STREAM-ERROR-NOT-AUTHORIZED:CAPS"></a><span class="term"><code class="literal">INF_XMPP_CONNECTION_STREAM_ERROR_NOT_AUTHORIZED</code></span></p></td>
<td>
</td>
</tr>
<tr>
<td><p><a name="INF-XMPP-CONNECTION-STREAM-ERROR-POLICY-VIOLATION:CAPS"></a><span class="term"><code class="literal">INF_XMPP_CONNECTION_STREAM_ERROR_POLICY_VIOLATION</code></span></p></td>
<td>
</td>
</tr>
<tr>
<td><p><a name="INF-XMPP-CONNECTION-STREAM-ERROR-REMOTE-CONNECTION-FAILED:CAPS"></a><span class="term"><code class="literal">INF_XMPP_CONNECTION_STREAM_ERROR_REMOTE_CONNECTION_FAILED</code></span></p></td>
<td>
</td>
</tr>
<tr>
<td><p><a name="INF-XMPP-CONNECTION-STREAM-ERROR-RESOURCE-CONSTRAINT:CAPS"></a><span class="term"><code class="literal">INF_XMPP_CONNECTION_STREAM_ERROR_RESOURCE_CONSTRAINT</code></span></p></td>
<td>
</td>
</tr>
<tr>
<td><p><a name="INF-XMPP-CONNECTION-STREAM-ERROR-RESTRICTED-XML:CAPS"></a><span class="term"><code class="literal">INF_XMPP_CONNECTION_STREAM_ERROR_RESTRICTED_XML</code></span></p></td>
<td>
</td>
</tr>
<tr>
<td><p><a name="INF-XMPP-CONNECTION-STREAM-ERROR-SEE-OTHER-HOST:CAPS"></a><span class="term"><code class="literal">INF_XMPP_CONNECTION_STREAM_ERROR_SEE_OTHER_HOST</code></span></p></td>
<td>
</td>
</tr>
<tr>
<td><p><a name="INF-XMPP-CONNECTION-STREAM-ERROR-SYSTEM-SHUTDOWN:CAPS"></a><span class="term"><code class="literal">INF_XMPP_CONNECTION_STREAM_ERROR_SYSTEM_SHUTDOWN</code></span></p></td>
<td>
</td>
</tr>
<tr>
<td><p><a name="INF-XMPP-CONNECTION-STREAM-ERROR-UNDEFINED-CONDITION:CAPS"></a><span class="term"><code class="literal">INF_XMPP_CONNECTION_STREAM_ERROR_UNDEFINED_CONDITION</code></span></p></td>
<td>
</td>
</tr>
<tr>
<td><p><a name="INF-XMPP-CONNECTION-STREAM-ERROR-UNSUPPORTED-ENCODING:CAPS"></a><span class="term"><code class="literal">INF_XMPP_CONNECTION_STREAM_ERROR_UNSUPPORTED_ENCODING</code></span></p></td>
<td>
</td>
</tr>
<tr>
<td><p><a name="INF-XMPP-CONNECTION-STREAM-ERROR-UNSUPPORTED-STANZA-TYPE:CAPS"></a><span class="term"><code class="literal">INF_XMPP_CONNECTION_STREAM_ERROR_UNSUPPORTED_STANZA_TYPE</code></span></p></td>
<td>
</td>
</tr>
<tr>
<td><p><a name="INF-XMPP-CONNECTION-STREAM-ERROR-UNSUPPORTED-VERSION:CAPS"></a><span class="term"><code class="literal">INF_XMPP_CONNECTION_STREAM_ERROR_UNSUPPORTED_VERSION</code></span></p></td>
<td>
</td>
</tr>
<tr>
<td><p><a name="INF-XMPP-CONNECTION-STREAM-ERROR-XML-NOT-WELL-FORMED:CAPS"></a><span class="term"><code class="literal">INF_XMPP_CONNECTION_STREAM_ERROR_XML_NOT_WELL_FORMED</code></span></p></td>
<td>
</td>
</tr>
<tr>
<td><p><a name="INF-XMPP-CONNECTION-STREAM-ERROR-FAILED:CAPS"></a><span class="term"><code class="literal">INF_XMPP_CONNECTION_STREAM_ERROR_FAILED</code></span></p></td>
<td>
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="InfXmppConnectionAuthError"></a><h3>enum InfXmppConnectionAuthError</h3>
<pre class="programlisting">typedef enum {
  INF_XMPP_CONNECTION_AUTH_ERROR_ABORTED,
  INF_XMPP_CONNECTION_AUTH_ERROR_INCORRECT_ENCODING,
  INF_XMPP_CONNECTION_AUTH_ERROR_INVALID_AUTHZID,
  INF_XMPP_CONNECTION_AUTH_ERROR_INVALID_MECHANISM,
  INF_XMPP_CONNECTION_AUTH_ERROR_MECHANISM_TOO_WEAK,
  INF_XMPP_CONNECTION_AUTH_ERROR_NOT_AUTHORIZED,
  INF_XMPP_CONNECTION_AUTH_ERROR_TEMPORARY_AUTH_FAILURE,

  INF_XMPP_CONNECTION_AUTH_ERROR_FAILED
} InfXmppConnectionAuthError;
</pre>
<p>
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><a name="INF-XMPP-CONNECTION-AUTH-ERROR-ABORTED:CAPS"></a><span class="term"><code class="literal">INF_XMPP_CONNECTION_AUTH_ERROR_ABORTED</code></span></p></td>
<td>
</td>
</tr>
<tr>
<td><p><a name="INF-XMPP-CONNECTION-AUTH-ERROR-INCORRECT-ENCODING:CAPS"></a><span class="term"><code class="literal">INF_XMPP_CONNECTION_AUTH_ERROR_INCORRECT_ENCODING</code></span></p></td>
<td>
</td>
</tr>
<tr>
<td><p><a name="INF-XMPP-CONNECTION-AUTH-ERROR-INVALID-AUTHZID:CAPS"></a><span class="term"><code class="literal">INF_XMPP_CONNECTION_AUTH_ERROR_INVALID_AUTHZID</code></span></p></td>
<td>
</td>
</tr>
<tr>
<td><p><a name="INF-XMPP-CONNECTION-AUTH-ERROR-INVALID-MECHANISM:CAPS"></a><span class="term"><code class="literal">INF_XMPP_CONNECTION_AUTH_ERROR_INVALID_MECHANISM</code></span></p></td>
<td>
</td>
</tr>
<tr>
<td><p><a name="INF-XMPP-CONNECTION-AUTH-ERROR-MECHANISM-TOO-WEAK:CAPS"></a><span class="term"><code class="literal">INF_XMPP_CONNECTION_AUTH_ERROR_MECHANISM_TOO_WEAK</code></span></p></td>
<td>
</td>
</tr>
<tr>
<td><p><a name="INF-XMPP-CONNECTION-AUTH-ERROR-NOT-AUTHORIZED:CAPS"></a><span class="term"><code class="literal">INF_XMPP_CONNECTION_AUTH_ERROR_NOT_AUTHORIZED</code></span></p></td>
<td>
</td>
</tr>
<tr>
<td><p><a name="INF-XMPP-CONNECTION-AUTH-ERROR-TEMPORARY-AUTH-FAILURE:CAPS"></a><span class="term"><code class="literal">INF_XMPP_CONNECTION_AUTH_ERROR_TEMPORARY_AUTH_FAILURE</code></span></p></td>
<td>
</td>
</tr>
<tr>
<td><p><a name="INF-XMPP-CONNECTION-AUTH-ERROR-FAILED:CAPS"></a><span class="term"><code class="literal">INF_XMPP_CONNECTION_AUTH_ERROR_FAILED</code></span></p></td>
<td>
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="InfXmppConnection-struct"></a><h3>InfXmppConnection</h3>
<pre class="programlisting">typedef struct _InfXmppConnection InfXmppConnection;</pre>
<p>
</p>
</div>
<hr>
<div class="refsect2">
<a name="InfXmppConnectionClass"></a><h3>struct InfXmppConnectionClass</h3>
<pre class="programlisting">struct InfXmppConnectionClass {
  GObjectClass parent_class;
};
</pre>
<p>
</p>
</div>
<hr>
<div class="refsect2">
<a name="inf-xmpp-connection-new"></a><h3>inf_xmpp_connection_new ()</h3>
<pre class="programlisting"><a class="link" href="InfXmppConnection.html" title="InfXmppConnection"><span class="returnvalue">InfXmppConnection</span></a> * inf_xmpp_connection_new             (<em class="parameter"><code><a class="link" href="InfTcpConnection.html" title="InfTcpConnection"><span class="type">InfTcpConnection</span></a> *tcp</code></em>,
                                                         <em class="parameter"><code><a class="link" href="InfXmppConnection.html#InfXmppConnectionSite"><span class="type">InfXmppConnectionSite</span></a> site</code></em>,
                                                         <em class="parameter"><code>const <span class="type">gchar</span> *local_hostname</code></em>,
                                                         <em class="parameter"><code>const <span class="type">gchar</span> *remote_hostname</code></em>,
                                                         <em class="parameter"><code><a class="link" href="InfXmppConnection.html#InfXmppConnectionSecurityPolicy"><span class="type">InfXmppConnectionSecurityPolicy</span></a> security_policy</code></em>,
                                                         <em class="parameter"><code><a class="link" href="InfCertificateCredentials.html" title="InfCertificateCredentials"><span class="type">InfCertificateCredentials</span></a> *creds</code></em>,
                                                         <em class="parameter"><code><a class="link" href="InfSaslContext.html" title="InfSaslContext"><span class="type">InfSaslContext</span></a> *sasl_context</code></em>,
                                                         <em class="parameter"><code>const <span class="type">gchar</span> *sasl_mechanisms</code></em>);</pre>
<p>
Creates a new <a class="link" href="InfXmppConnection.html" title="InfXmppConnection"><span class="type">InfXmppConnection</span></a> with <em class="parameter"><code>tcp</code></em> as communication channel. No
attempt is being made to open <em class="parameter"><code>tcp</code></em>, if it is not already open. However,
communication is initiated as soon as <em class="parameter"><code>tcp</code></em> gets into
<a class="link" href="InfTcpConnection.html#INF-TCP-CONNECTION-CONNECTED:CAPS"><code class="literal">INF_TCP_CONNECTION_CONNECTED</code></a> state, so you might still open it
lateron yourself.
</p>
<p>
<em class="parameter"><code>local_hostname</code></em> specifies the hostname of the local host, and
<em class="parameter"><code>remote_hostname</code></em> specifies the hostname of the remote host, as known to
the caller. These can be a string representation of the IP address of
<em class="parameter"><code>tcp</code></em>, or a DNS name such as "example.com". <em class="parameter"><code>local_hostname</code></em> can be <code class="literal">NULL</code>
in which case the host name as reported by <code class="function">g_get_host_name()</code> is used.
</p>
<p>
<em class="parameter"><code>creds</code></em> may be <code class="literal">NULL</code> in which case the connection creates the credentials
as soon as they are required. However, this only works if
<em class="parameter"><code>site</code></em> is <a class="link" href="InfXmppConnection.html#INF-XMPP-CONNECTION-CLIENT:CAPS"><code class="literal">INF_XMPP_CONNECTION_CLIENT</code></a> or <em class="parameter"><code>security_policy</code></em> is
<a class="link" href="InfXmppConnection.html#INF-XMPP-CONNECTION-SECURITY-ONLY-UNSECURED:CAPS"><code class="literal">INF_XMPP_CONNECTION_SECURITY_ONLY_UNSECURED</code></a> (or both, of course). For
server connections <em class="parameter"><code>creds</code></em> must contain a valid server certificate in case
<em class="parameter"><code>security_policy</code></em> is not <a class="link" href="InfXmppConnection.html#INF-XMPP-CONNECTION-SECURITY-ONLY-UNSECURED:CAPS"><code class="literal">INF_XMPP_CONNECTION_SECURITY_ONLY_UNSECURED</code></a>.
</p>
<p>
If <em class="parameter"><code>sasl_context</code></em> is <code class="literal">NULL</code>, <a class="link" href="InfXmppConnection.html" title="InfXmppConnection"><span class="type">InfXmppConnection</span></a> uses a built-in context
that only supports ANONYMOUS authentication. In <em class="parameter"><code>sasl_context</code></em>'s
callback function, the <a class="link" href="InfXmppConnection.html" title="InfXmppConnection"><span class="type">InfXmppConnection</span></a> for which the authentication
shall be performed can be accessed via the <em class="parameter"><code>session_data</code></em> parameter of
<a class="link" href="InfSaslContext.html#InfSaslContextCallbackFunc" title="InfSaslContextCallbackFunc ()"><span class="type">InfSaslContextCallbackFunc</span></a>.
</p>
<p>
If <em class="parameter"><code>sasl_context</code></em> is not <code class="literal">NULL</code>, then the <em class="parameter"><code>sasl_mechanisms</code></em> parameter defines
what SASL mechanisms are used. On the server side, these are the mechanisms
offered to the client, and on the client side, these are the accepted
mechanisms (meaning that if a server does not offer any of these, the
connection will be closed). If <em class="parameter"><code>sasl_context</code></em> is <code class="literal">NULL</code>, then this parameter
is ignored. <em class="parameter"><code>sasl_mechanisms</code></em> can be <code class="literal">NULL</code> in which case all available
mechanisms are accepted or offered, respectively.
</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>tcp</code></em> :</span></p></td>
<td>The underlaying TCP connection to use.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>site</code></em> :</span></p></td>
<td>Whether this is a XMPP client or server.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>local_hostname</code></em> :</span></p></td>
<td>The hostname of the local host, or <code class="literal">NULL</code>.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>remote_hostname</code></em> :</span></p></td>
<td>The hostname of the remote host.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>security_policy</code></em> :</span></p></td>
<td>Whether to use (or offer, as a server) TLS. See
<a class="link" href="InfXmppConnection.html#InfXmppConnectionSecurityPolicy"><span class="type">InfXmppConnectionSecurityPolicy</span></a> for the meaning of this parameter.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>creds</code></em> :</span></p></td>
<td>Certificate credentials used to secure the communication.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>sasl_context</code></em> :</span></p></td>
<td>A SASL context used for authentication.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>sasl_mechanisms</code></em> :</span></p></td>
<td>A whitespace-separated list of SASL mechanisms to
accept/offer, or <code class="literal">NULL</code>.</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="InfXmppConnection.html" title="InfXmppConnection"><span class="type">InfXmppConnection</span></a>.</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="inf-xmpp-connection-get-tls-enabled"></a><h3>inf_xmpp_connection_get_tls_enabled ()</h3>
<pre class="programlisting"><span class="returnvalue">gboolean</span>            inf_xmpp_connection_get_tls_enabled (<em class="parameter"><code><a class="link" href="InfXmppConnection.html" title="InfXmppConnection"><span class="type">InfXmppConnection</span></a> *xmpp</code></em>);</pre>
<p>
Returns whether TLS encryption is enabled for <em class="parameter"><code>xmpp</code></em>. This returns <code class="literal">TRUE</code>
as soon as the TLS handshake is completed but before the server certificate
was verified (see <a class="link" href="InfXmppConnection.html#inf-xmpp-connection-set-certificate-callback" title="inf_xmpp_connection_set_certificate_callback ()"><code class="function">inf_xmpp_connection_set_certificate_callback()</code></a>).
</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>xmpp</code></em> :</span></p></td>
<td>A <a class="link" href="InfXmppConnection.html" title="InfXmppConnection"><span class="type">InfXmppConnection</span></a>.</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 TLS is enabled and <code class="literal">FALSE</code> otherwise.</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="inf-xmpp-connection-set-certificate-callback"></a><h3>inf_xmpp_connection_set_certificate_callback ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                inf_xmpp_connection_set_certificate_callback
                                                        (<em class="parameter"><code><a class="link" href="InfXmppConnection.html" title="InfXmppConnection"><span class="type">InfXmppConnection</span></a> *xmpp</code></em>,
                                                         <em class="parameter"><code><a class="link" href="InfXmppConnection.html#InfXmppConnectionCrtCallback" title="InfXmppConnectionCrtCallback ()"><span class="type">InfXmppConnectionCrtCallback</span></a> cb</code></em>,
                                                         <em class="parameter"><code><span class="type">gpointer</span> user_data</code></em>);</pre>
<p>
This function sets a callback that is called when the connection needs to
verify the server's certificate. It does not need to respond immediately,
but can, for example, show a dialog to a user and continue when the user
finished with it.
</p>
<p>
When the certificate is trusted, then call
<a class="link" href="InfXmppConnection.html#inf-xmpp-connection-certificate-verify-continue" title="inf_xmpp_connection_certificate_verify_continue ()"><code class="function">inf_xmpp_connection_certificate_verify_continue()</code></a>,
otherwise <a class="link" href="InfXmppConnection.html#inf-xmpp-connection-certificate-verify-cancel" title="inf_xmpp_connection_certificate_verify_cancel ()"><code class="function">inf_xmpp_connection_certificate_verify_cancel()</code></a>. This can happen
in the callback or some time later. The connection process is stopped until
either of these functions is called.
</p>
<p>
If <em class="parameter"><code>cb</code></em> is <code class="literal">NULL</code>, or this function has not been called before a certificate
needs to be verified, then the certificate is always trusted.
</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>xmpp</code></em> :</span></p></td>
<td>A <a class="link" href="InfXmppConnection.html" title="InfXmppConnection"><span class="type">InfXmppConnection</span></a>.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>cb</code></em> :</span></p></td>
<td>Function to be called to verify the server certificate, or <code class="literal">NULL</code>.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>user_data</code></em> :</span></p></td>
<td>Additional data to pass to the callback function.</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="inf-xmpp-connection-certificate-verify-continue"></a><h3>inf_xmpp_connection_certificate_verify_continue ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                inf_xmpp_connection_certificate_verify_continue
                                                        (<em class="parameter"><code><a class="link" href="InfXmppConnection.html" title="InfXmppConnection"><span class="type">InfXmppConnection</span></a> *xmpp</code></em>);</pre>
<p>
Call this function when your callback set in
<a class="link" href="InfXmppConnection.html#inf-xmpp-connection-set-certificate-callback" title="inf_xmpp_connection_set_certificate_callback ()"><code class="function">inf_xmpp_connection_set_certificate_callback()</code></a> was called and you do trust
the server's certificate. The connection process will then continue.
</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>xmpp</code></em> :</span></p></td>
<td>A <a class="link" href="InfXmppConnection.html" title="InfXmppConnection"><span class="type">InfXmppConnection</span></a>.</td>
</tr></tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="inf-xmpp-connection-certificate-verify-cancel"></a><h3>inf_xmpp_connection_certificate_verify_cancel ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                inf_xmpp_connection_certificate_verify_cancel
                                                        (<em class="parameter"><code><a class="link" href="InfXmppConnection.html" title="InfXmppConnection"><span class="type">InfXmppConnection</span></a> *xmpp</code></em>);</pre>
<p>
Call this function when your callback set in
<a class="link" href="InfXmppConnection.html#inf-xmpp-connection-set-certificate-callback" title="inf_xmpp_connection_set_certificate_callback ()"><code class="function">inf_xmpp_connection_set_certificate_callback()</code></a> was called and you do not
trust the server's certificate. The connection will then be closed with a
corresponding error.
</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>xmpp</code></em> :</span></p></td>
<td>A <a class="link" href="InfXmppConnection.html" title="InfXmppConnection"><span class="type">InfXmppConnection</span></a>.</td>
</tr></tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="inf-xmpp-connection-reset-sasl-authentication"></a><h3>inf_xmpp_connection_reset_sasl_authentication ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                inf_xmpp_connection_reset_sasl_authentication
                                                        (<em class="parameter"><code><a class="link" href="InfXmppConnection.html" title="InfXmppConnection"><span class="type">InfXmppConnection</span></a> *xmpp</code></em>,
                                                         <em class="parameter"><code><a class="link" href="InfSaslContext.html" title="InfSaslContext"><span class="type">InfSaslContext</span></a> *new_context</code></em>,
                                                         <em class="parameter"><code>const <span class="type">gchar</span> *new_mechanisms</code></em>);</pre>
<p>
Sets a new SASL context and mechanisms to use for authentication. This does
not have any effect if authentication has already been performed. This can
be useful if a server decides to use a stricter authentication policy and
gets away with its previous SASL context. If <em class="parameter"><code>new_context</code></em> is <code class="literal">NULL</code>, then a
built-in SASL context is used which only accepts anonymous authentication.
</p>
<p>
If the authentication is currently in progress then it is aborted. The
server sends an <a class="link" href="InfXmppConnection.html#INF-XMPP-CONNECTION-AUTH-ERROR-TEMPORARY-AUTH-FAILURE:CAPS"><code class="literal">INF_XMPP_CONNECTION_AUTH_ERROR_TEMPORARY_AUTH_FAILURE</code></a>
error to the client with <a class="link" href="libinfinity-0.5-InfError.html#INF-AUTHENTICATION-DETAIL-ERROR-TRY-AGAIN:CAPS"><code class="literal">INF_AUTHENTICATION_DETAIL_ERROR_TRY_AGAIN</code></a> detail
(see <a class="link" href="InfXmppConnection.html#inf-xmpp-connection-get-sasl-error" title="inf_xmpp_connection_get_sasl_error ()"><code class="function">inf_xmpp_connection_get_sasl_error()</code></a>).
</p>
<p>
On the client side, if authentication is in progress, a request to abort
the authentication is sent to the server. The server will then reply with
an <a class="link" href="InfXmppConnection.html#INF-XMPP-CONNECTION-AUTH-ERROR-ABORTED:CAPS"><code class="literal">INF_XMPP_CONNECTION_AUTH_ERROR_ABORTED</code></a> error. In the signal handler of
the <a class="link" href="InfXmlConnection.html#InfXmlConnection-error" title='The "error" signal'><span class="type">"error"</span></a> signal you should reinitiate the authentication
with <a class="link" href="InfXmppConnection.html#inf-xmpp-connection-retry-sasl-authentication" title="inf_xmpp_connection_retry_sasl_authentication ()"><code class="function">inf_xmpp_connection_retry_sasl_authentication()</code></a> or the connection will
be closed. It is also possible that the final authentication request has
already been sent, and the server replies with successful authentication
instead. In that case calling this function will have no effect apart from
closing and reopening the connection will use the new context and
mechanisms.
</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>xmpp</code></em> :</span></p></td>
<td>A <a class="link" href="InfXmppConnection.html" title="InfXmppConnection"><span class="type">InfXmppConnection</span></a>.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>new_context</code></em> :</span></p></td>
<td>The new sasl context to set, or <code class="literal">NULL</code>.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>new_mechanisms</code></em> :</span></p></td>
<td>Allowed SASL mechanisms to use. Ignored if <em class="parameter"><code>new_context</code></em>
is <code class="literal">NULL</code>.</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="inf-xmpp-connection-retry-sasl-authentication"></a><h3>inf_xmpp_connection_retry_sasl_authentication ()</h3>
<pre class="programlisting"><span class="returnvalue">gboolean</span>            inf_xmpp_connection_retry_sasl_authentication
                                                        (<em class="parameter"><code><a class="link" href="InfXmppConnection.html" title="InfXmppConnection"><span class="type">InfXmppConnection</span></a> *xmpp</code></em>,
                                                         <em class="parameter"><code><span class="type">GError</span> **error</code></em>);</pre>
<p>
When SASL authentication failed then the <a class="link" href="InfXmlConnection.html#InfXmlConnection-error" title='The "error" signal'><span class="type">"error"</span></a> signal
is emitted with an error from the INF_XMPP_CONNECTION_AUTH_ERROR domain.
If the signal handler wants to retry authentication then it should call
this function, possibly modifying the <a class="link" href="InfXmppConnection.html#InfXmppConnection--sasl-mechanisms" title='The "sasl-mechanisms" property'><span class="type">"sasl-mechanisms"</span></a>
property before. If this function is not called then the connection will
terminate.
</p>
<p>
The function can fail if the server does not support any of the available
mechanisms given in <a class="link" href="InfXmppConnection.html#InfXmppConnection--sasl-mechanisms" title='The "sasl-mechanisms" property'><span class="type">"sasl-mechanisms"</span></a>. If so, the function
returns <code class="literal">FALSE</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>xmpp</code></em> :</span></p></td>
<td>A <a class="link" href="InfXmppConnection.html" title="InfXmppConnection"><span class="type">InfXmppConnection</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>
<code class="literal">TRUE</code> if auth retry is being performed, <code class="literal">FALSE</code> otherwise.</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="inf-xmpp-connection-set-sasl-error"></a><h3>inf_xmpp_connection_set_sasl_error ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                inf_xmpp_connection_set_sasl_error  (<em class="parameter"><code><a class="link" href="InfXmppConnection.html" title="InfXmppConnection"><span class="type">InfXmppConnection</span></a> *xmpp</code></em>,
                                                         <em class="parameter"><code>const <span class="type">GError</span> *error</code></em>);</pre>
<p>
Sets the SASL error of <em class="parameter"><code>xmpp</code></em>. The SASL error is an additional hint of what
went wrong during authentication. It should be set on the server side
in the gsasl callback checking the user authentication. If on the
client side <a class="link" href="InfXmlConnection.html#InfXmlConnection-error" title='The "error" signal'><span class="type">"error"</span></a> is emitted with an error from the 
INF_XMPP_CONNECTION_AUTH_ERROR domain then
<a class="link" href="InfXmppConnection.html#inf-xmpp-connection-get-sasl-error" title="inf_xmpp_connection_get_sasl_error ()"><code class="function">inf_xmpp_connection_get_sasl_error()</code></a> can be used to obtain more detailed
error information.
</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>xmpp</code></em> :</span></p></td>
<td>A <a class="link" href="InfXmppConnection.html" title="InfXmppConnection"><span class="type">InfXmppConnection</span></a>.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>error</code></em> :</span></p></td>
<td>The SASL error to set.</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="inf-xmpp-connection-get-sasl-error"></a><h3>inf_xmpp_connection_get_sasl_error ()</h3>
<pre class="programlisting">const <span class="returnvalue">GError</span> *      inf_xmpp_connection_get_sasl_error  (<em class="parameter"><code><a class="link" href="InfXmppConnection.html" title="InfXmppConnection"><span class="type">InfXmppConnection</span></a> *xmpp</code></em>);</pre>
<p>
Gets the SASL error of <em class="parameter"><code>xmpp</code></em>. See <a class="link" href="InfXmppConnection.html#inf-xmpp-connection-set-sasl-error" title="inf_xmpp_connection_set_sasl_error ()"><code class="function">inf_xmpp_connection_set_sasl_error()</code></a>.
</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>xmpp</code></em> :</span></p></td>
<td>A <a class="link" href="InfXmppConnection.html" title="InfXmppConnection"><span class="type">InfXmppConnection</span></a>.</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>A pointer to a <span class="type">GError</span> object owned by <em class="parameter"><code>xmpp</code></em>.</td>
</tr>
</tbody>
</table></div>
</div>
</div>
<div class="refsect1">
<a name="InfXmppConnection.property-details"></a><h2>Property Details</h2>
<div class="refsect2">
<a name="InfXmppConnection--credentials"></a><h3>The <code class="literal">"credentials"</code> property</h3>
<pre class="programlisting">  "credentials"              <a class="link" href="InfCertificateCredentials.html" title="InfCertificateCredentials"><span class="type">InfCertificateCredentials</span></a>*  : Read / Write / Construct Only</pre>
<p>The certificate credentials for GnuTLS.</p>
</div>
<hr>
<div class="refsect2">
<a name="InfXmppConnection--local-hostname"></a><h3>The <code class="literal">"local-hostname"</code> property</h3>
<pre class="programlisting">  "local-hostname"           <span class="type">gchar</span>*                : Read / Write / Construct Only</pre>
<p>The hostname of the local host.</p>
<p>Default value: NULL</p>
</div>
<hr>
<div class="refsect2">
<a name="InfXmppConnection--remote-hostname"></a><h3>The <code class="literal">"remote-hostname"</code> property</h3>
<pre class="programlisting">  "remote-hostname"          <span class="type">gchar</span>*                : Read / Write / Construct Only</pre>
<p>The hostname of the remote host.</p>
<p>Default value: NULL</p>
</div>
<hr>
<div class="refsect2">
<a name="InfXmppConnection--sasl-context"></a><h3>The <code class="literal">"sasl-context"</code> property</h3>
<pre class="programlisting">  "sasl-context"             <a class="link" href="InfSaslContext.html" title="InfSaslContext"><span class="type">InfSaslContext</span></a>*       : Read / Write / Construct Only</pre>
<p>The SASL context used for authentication.</p>
</div>
<hr>
<div class="refsect2">
<a name="InfXmppConnection--sasl-mechanisms"></a><h3>The <code class="literal">"sasl-mechanisms"</code> property</h3>
<pre class="programlisting">  "sasl-mechanisms"          <span class="type">gchar</span>*                : Read / Write / Construct Only</pre>
<p>Whitespace separated list of SASL mechanisms to accept/offer.</p>
<p>Default value: NULL</p>
</div>
<hr>
<div class="refsect2">
<a name="InfXmppConnection--security-policy"></a><h3>The <code class="literal">"security-policy"</code> property</h3>
<pre class="programlisting">  "security-policy"          <a class="link" href="InfXmppConnection.html#InfXmppConnectionSecurityPolicy"><span class="type">InfXmppConnectionSecurityPolicy</span></a>  : Read / Write / Construct Only</pre>
<p>How to choose whether to use (or offer, as a server) TLS.</p>
<p>Default value: INF_XMPP_CONNECTION_SECURITY_BOTH_PREFER_TLS</p>
</div>
<hr>
<div class="refsect2">
<a name="InfXmppConnection--site"></a><h3>The <code class="literal">"site"</code> property</h3>
<pre class="programlisting">  "site"                     <a class="link" href="InfXmppConnection.html#InfXmppConnectionSite"><span class="type">InfXmppConnectionSite</span></a>  : Read / Write / Construct Only</pre>
<p>Site of the connection (client or server).</p>
<p>Default value: INF_XMPP_CONNECTION_CLIENT</p>
</div>
<hr>
<div class="refsect2">
<a name="InfXmppConnection--tcp-connection"></a><h3>The <code class="literal">"tcp-connection"</code> property</h3>
<pre class="programlisting">  "tcp-connection"           <a class="link" href="InfTcpConnection.html" title="InfTcpConnection"><span class="type">InfTcpConnection</span></a>*     : Read / Write / Construct Only</pre>
<p>Underlaying TCP connection.</p>
</div>
<hr>
<div class="refsect2">
<a name="InfXmppConnection--tls-enabled"></a><h3>The <code class="literal">"tls-enabled"</code> property</h3>
<pre class="programlisting">  "tls-enabled"              <span class="type">gboolean</span>              : Read</pre>
<p>Whether TLS is enabled for the connection or not.</p>
<p>Default value: FALSE</p>
</div>
</div>
</div>
<div class="footer">
<hr>
          Generated by GTK-Doc V1.19</div>
</body>
</html>