summaryrefstree
path: root/usr/share/gtk-doc/html/gio/GResolver.html
blob: 80a23a2c76f9a542d62778aefc98c0ce35546b6e (plain)
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
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>GResolver</title>
<meta name="generator" content="DocBook XSL Stylesheets V1.78.1">
<link rel="home" href="index.html" title="GIO Reference Manual">
<link rel="up" href="resolver.html" title="DNS resolution">
<link rel="prev" href="resolver.html" title="DNS resolution">
<link rel="next" href="GProxyResolver.html" title="GProxyResolver">
<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="resolver.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td>
<td><a accesskey="u" href="resolver.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">GIO Reference Manual</th>
<td><a accesskey="n" href="GProxyResolver.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td>
</tr>
<tr><td colspan="5" class="shortcuts">
<a href="#GResolver.synopsis" class="shortcut">Top</a>
                   | 
                  <a href="#GResolver.description" class="shortcut">Description</a>
                   | 
                  <a href="#GResolver.object-hierarchy" class="shortcut">Object Hierarchy</a>
                   | 
                  <a href="#GResolver.signals" class="shortcut">Signals</a>
</td></tr>
</table>
<div class="refentry">
<a name="GResolver"></a><div class="titlepage"></div>
<div class="refnamediv"><table width="100%"><tr>
<td valign="top">
<h2><span class="refentrytitle"><a name="GResolver.top_of_page"></a>GResolver</span></h2>
<p>GResolver — Asynchronous and cancellable DNS resolver</p>
</td>
<td valign="top" align="right"></td>
</tr></table></div>
<div class="refsynopsisdiv">
<a name="GResolver.synopsis"></a><h2>Synopsis</h2>
<pre class="synopsis">
#include &lt;gio/gio.h&gt;

                    <a class="link" href="GResolver.html#GResolver-struct" title="GResolver">GResolver</a>;
<a class="link" href="GResolver.html" title="GResolver"><span class="returnvalue">GResolver</span></a> *         <a class="link" href="GResolver.html#g-resolver-get-default" title="g_resolver_get_default ()">g_resolver_get_default</a>              (<em class="parameter"><code><span class="type">void</span></code></em>);
<span class="returnvalue">void</span>                <a class="link" href="GResolver.html#g-resolver-set-default" title="g_resolver_set_default ()">g_resolver_set_default</a>              (<em class="parameter"><code><a class="link" href="GResolver.html" title="GResolver"><span class="type">GResolver</span></a> *resolver</code></em>);
<a href="http://library.gnome.org/devel/glib/unstable/glib-Doubly-Linked-Lists.html#GList"><span class="returnvalue">GList</span></a> *             <a class="link" href="GResolver.html#g-resolver-lookup-by-name" title="g_resolver_lookup_by_name ()">g_resolver_lookup_by_name</a>           (<em class="parameter"><code><a class="link" href="GResolver.html" title="GResolver"><span class="type">GResolver</span></a> *resolver</code></em>,
                                                         <em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *hostname</code></em>,
                                                         <em class="parameter"><code><a class="link" href="GCancellable.html" title="GCancellable"><span class="type">GCancellable</span></a> *cancellable</code></em>,
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);
<span class="returnvalue">void</span>                <a class="link" href="GResolver.html#g-resolver-lookup-by-name-async" title="g_resolver_lookup_by_name_async ()">g_resolver_lookup_by_name_async</a>     (<em class="parameter"><code><a class="link" href="GResolver.html" title="GResolver"><span class="type">GResolver</span></a> *resolver</code></em>,
                                                         <em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *hostname</code></em>,
                                                         <em class="parameter"><code><a class="link" href="GCancellable.html" title="GCancellable"><span class="type">GCancellable</span></a> *cancellable</code></em>,
                                                         <em class="parameter"><code><a class="link" href="GAsyncResult.html#GAsyncReadyCallback" title="GAsyncReadyCallback ()"><span class="type">GAsyncReadyCallback</span></a> callback</code></em>,
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> user_data</code></em>);
<a href="http://library.gnome.org/devel/glib/unstable/glib-Doubly-Linked-Lists.html#GList"><span class="returnvalue">GList</span></a> *             <a class="link" href="GResolver.html#g-resolver-lookup-by-name-finish" title="g_resolver_lookup_by_name_finish ()">g_resolver_lookup_by_name_finish</a>    (<em class="parameter"><code><a class="link" href="GResolver.html" title="GResolver"><span class="type">GResolver</span></a> *resolver</code></em>,
                                                         <em class="parameter"><code><a class="link" href="GAsyncResult.html" title="GAsyncResult"><span class="type">GAsyncResult</span></a> *result</code></em>,
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);
<span class="returnvalue">void</span>                <a class="link" href="GResolver.html#g-resolver-free-addresses" title="g_resolver_free_addresses ()">g_resolver_free_addresses</a>           (<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Doubly-Linked-Lists.html#GList"><span class="type">GList</span></a> *addresses</code></em>);
<a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> *             <a class="link" href="GResolver.html#g-resolver-lookup-by-address" title="g_resolver_lookup_by_address ()">g_resolver_lookup_by_address</a>        (<em class="parameter"><code><a class="link" href="GResolver.html" title="GResolver"><span class="type">GResolver</span></a> *resolver</code></em>,
                                                         <em class="parameter"><code><a class="link" href="GInetAddress.html" title="GInetAddress"><span class="type">GInetAddress</span></a> *address</code></em>,
                                                         <em class="parameter"><code><a class="link" href="GCancellable.html" title="GCancellable"><span class="type">GCancellable</span></a> *cancellable</code></em>,
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);
<span class="returnvalue">void</span>                <a class="link" href="GResolver.html#g-resolver-lookup-by-address-async" title="g_resolver_lookup_by_address_async ()">g_resolver_lookup_by_address_async</a>  (<em class="parameter"><code><a class="link" href="GResolver.html" title="GResolver"><span class="type">GResolver</span></a> *resolver</code></em>,
                                                         <em class="parameter"><code><a class="link" href="GInetAddress.html" title="GInetAddress"><span class="type">GInetAddress</span></a> *address</code></em>,
                                                         <em class="parameter"><code><a class="link" href="GCancellable.html" title="GCancellable"><span class="type">GCancellable</span></a> *cancellable</code></em>,
                                                         <em class="parameter"><code><a class="link" href="GAsyncResult.html#GAsyncReadyCallback" title="GAsyncReadyCallback ()"><span class="type">GAsyncReadyCallback</span></a> callback</code></em>,
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> user_data</code></em>);
<a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> *             <a class="link" href="GResolver.html#g-resolver-lookup-by-address-finish" title="g_resolver_lookup_by_address_finish ()">g_resolver_lookup_by_address_finish</a> (<em class="parameter"><code><a class="link" href="GResolver.html" title="GResolver"><span class="type">GResolver</span></a> *resolver</code></em>,
                                                         <em class="parameter"><code><a class="link" href="GAsyncResult.html" title="GAsyncResult"><span class="type">GAsyncResult</span></a> *result</code></em>,
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);
<a href="http://library.gnome.org/devel/glib/unstable/glib-Doubly-Linked-Lists.html#GList"><span class="returnvalue">GList</span></a> *             <a class="link" href="GResolver.html#g-resolver-lookup-service" title="g_resolver_lookup_service ()">g_resolver_lookup_service</a>           (<em class="parameter"><code><a class="link" href="GResolver.html" title="GResolver"><span class="type">GResolver</span></a> *resolver</code></em>,
                                                         <em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *service</code></em>,
                                                         <em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *protocol</code></em>,
                                                         <em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *domain</code></em>,
                                                         <em class="parameter"><code><a class="link" href="GCancellable.html" title="GCancellable"><span class="type">GCancellable</span></a> *cancellable</code></em>,
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);
<span class="returnvalue">void</span>                <a class="link" href="GResolver.html#g-resolver-lookup-service-async" title="g_resolver_lookup_service_async ()">g_resolver_lookup_service_async</a>     (<em class="parameter"><code><a class="link" href="GResolver.html" title="GResolver"><span class="type">GResolver</span></a> *resolver</code></em>,
                                                         <em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *service</code></em>,
                                                         <em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *protocol</code></em>,
                                                         <em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *domain</code></em>,
                                                         <em class="parameter"><code><a class="link" href="GCancellable.html" title="GCancellable"><span class="type">GCancellable</span></a> *cancellable</code></em>,
                                                         <em class="parameter"><code><a class="link" href="GAsyncResult.html#GAsyncReadyCallback" title="GAsyncReadyCallback ()"><span class="type">GAsyncReadyCallback</span></a> callback</code></em>,
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> user_data</code></em>);
<a href="http://library.gnome.org/devel/glib/unstable/glib-Doubly-Linked-Lists.html#GList"><span class="returnvalue">GList</span></a> *             <a class="link" href="GResolver.html#g-resolver-lookup-service-finish" title="g_resolver_lookup_service_finish ()">g_resolver_lookup_service_finish</a>    (<em class="parameter"><code><a class="link" href="GResolver.html" title="GResolver"><span class="type">GResolver</span></a> *resolver</code></em>,
                                                         <em class="parameter"><code><a class="link" href="GAsyncResult.html" title="GAsyncResult"><span class="type">GAsyncResult</span></a> *result</code></em>,
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);
<span class="returnvalue">void</span>                <a class="link" href="GResolver.html#g-resolver-free-targets" title="g_resolver_free_targets ()">g_resolver_free_targets</a>             (<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Doubly-Linked-Lists.html#GList"><span class="type">GList</span></a> *targets</code></em>);
<a href="http://library.gnome.org/devel/glib/unstable/glib-Doubly-Linked-Lists.html#GList"><span class="returnvalue">GList</span></a> *             <a class="link" href="GResolver.html#g-resolver-lookup-records" title="g_resolver_lookup_records ()">g_resolver_lookup_records</a>           (<em class="parameter"><code><a class="link" href="GResolver.html" title="GResolver"><span class="type">GResolver</span></a> *resolver</code></em>,
                                                         <em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *rrname</code></em>,
                                                         <em class="parameter"><code><span class="type">GResolverRecordType</span> record_type</code></em>,
                                                         <em class="parameter"><code><a class="link" href="GCancellable.html" title="GCancellable"><span class="type">GCancellable</span></a> *cancellable</code></em>,
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);
<span class="returnvalue">void</span>                <a class="link" href="GResolver.html#g-resolver-lookup-records-async" title="g_resolver_lookup_records_async ()">g_resolver_lookup_records_async</a>     (<em class="parameter"><code><a class="link" href="GResolver.html" title="GResolver"><span class="type">GResolver</span></a> *resolver</code></em>,
                                                         <em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *rrname</code></em>,
                                                         <em class="parameter"><code><span class="type">GResolverRecordType</span> record_type</code></em>,
                                                         <em class="parameter"><code><a class="link" href="GCancellable.html" title="GCancellable"><span class="type">GCancellable</span></a> *cancellable</code></em>,
                                                         <em class="parameter"><code><a class="link" href="GAsyncResult.html#GAsyncReadyCallback" title="GAsyncReadyCallback ()"><span class="type">GAsyncReadyCallback</span></a> callback</code></em>,
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> user_data</code></em>);
<a href="http://library.gnome.org/devel/glib/unstable/glib-Doubly-Linked-Lists.html#GList"><span class="returnvalue">GList</span></a> *             <a class="link" href="GResolver.html#g-resolver-lookup-records-finish" title="g_resolver_lookup_records_finish ()">g_resolver_lookup_records_finish</a>    (<em class="parameter"><code><a class="link" href="GResolver.html" title="GResolver"><span class="type">GResolver</span></a> *resolver</code></em>,
                                                         <em class="parameter"><code><a class="link" href="GAsyncResult.html" title="GAsyncResult"><span class="type">GAsyncResult</span></a> *result</code></em>,
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);

#define             <a class="link" href="GResolver.html#G-RESOLVER-ERROR:CAPS" title="G_RESOLVER_ERROR">G_RESOLVER_ERROR</a>
enum                <a class="link" href="GResolver.html#GResolverError" title="enum GResolverError">GResolverError</a>;
</pre>
</div>
<div class="refsect1">
<a name="GResolver.object-hierarchy"></a><h2>Object Hierarchy</h2>
<pre class="synopsis">
  <a href="http://library.gnome.org/devel/gobject/unstable/gobject-The-Base-Object-Type.html#GObject">GObject</a>
   +----GResolver
</pre>
</div>
<div class="refsect1">
<a name="GResolver.signals"></a><h2>Signals</h2>
<pre class="synopsis">
  "<a class="link" href="GResolver.html#GResolver-reload" title='The "reload" signal'>reload</a>"                                         : <a href="http://library.gnome.org/devel/gobject/unstable/gobject-Signals.html#G-SIGNAL-RUN-LAST:CAPS"><code class="literal">Run Last</code></a>
</pre>
</div>
<div class="refsect1">
<a name="GResolver.description"></a><h2>Description</h2>
<p>
<a class="link" href="GResolver.html" title="GResolver"><span class="type">GResolver</span></a> provides cancellable synchronous and asynchronous DNS
resolution, for hostnames (<a class="link" href="GResolver.html#g-resolver-lookup-by-address" title="g_resolver_lookup_by_address ()"><code class="function">g_resolver_lookup_by_address()</code></a>,
<a class="link" href="GResolver.html#g-resolver-lookup-by-name" title="g_resolver_lookup_by_name ()"><code class="function">g_resolver_lookup_by_name()</code></a> and their async variants) and SRV
(service) records (<a class="link" href="GResolver.html#g-resolver-lookup-service" title="g_resolver_lookup_service ()"><code class="function">g_resolver_lookup_service()</code></a>).
</p>
<p>
<a class="link" href="GNetworkAddress.html" title="GNetworkAddress"><span class="type">GNetworkAddress</span></a> and <a class="link" href="GNetworkService.html" title="GNetworkService"><span class="type">GNetworkService</span></a> provide wrappers around
<a class="link" href="GResolver.html" title="GResolver"><span class="type">GResolver</span></a> functionality that also implement <a class="link" href="GSocketConnectable.html" title="GSocketConnectable"><span class="type">GSocketConnectable</span></a>,
making it easy to connect to a remote host/service.
</p>
</div>
<div class="refsect1">
<a name="GResolver.details"></a><h2>Details</h2>
<div class="refsect2">
<a name="GResolver-struct"></a><h3>GResolver</h3>
<pre class="programlisting">typedef struct _GResolver GResolver;</pre>
<p>
The object that handles DNS resolution. Use <a class="link" href="GResolver.html#g-resolver-get-default" title="g_resolver_get_default ()"><code class="function">g_resolver_get_default()</code></a>
to get the default resolver.
</p>
</div>
<hr>
<div class="refsect2">
<a name="g-resolver-get-default"></a><h3>g_resolver_get_default ()</h3>
<pre class="programlisting"><a class="link" href="GResolver.html" title="GResolver"><span class="returnvalue">GResolver</span></a> *         g_resolver_get_default              (<em class="parameter"><code><span class="type">void</span></code></em>);</pre>
<p>
Gets the default <a class="link" href="GResolver.html" title="GResolver"><span class="type">GResolver</span></a>. You should unref it when you are done
with it. <a class="link" href="GResolver.html" title="GResolver"><span class="type">GResolver</span></a> may use its reference count as a hint about how
many threads it should allocate for concurrent DNS resolutions.
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody><tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>the default <a class="link" href="GResolver.html" title="GResolver"><span class="type">GResolver</span></a>. <span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span>
</td>
</tr></tbody>
</table></div>
<p class="since">Since 2.22</p>
</div>
<hr>
<div class="refsect2">
<a name="g-resolver-set-default"></a><h3>g_resolver_set_default ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                g_resolver_set_default              (<em class="parameter"><code><a class="link" href="GResolver.html" title="GResolver"><span class="type">GResolver</span></a> *resolver</code></em>);</pre>
<p>
Sets <em class="parameter"><code>resolver</code></em> to be the application's default resolver (reffing
<em class="parameter"><code>resolver</code></em>, and unreffing the previous default resolver, if any).
Future calls to <a class="link" href="GResolver.html#g-resolver-get-default" title="g_resolver_get_default ()"><code class="function">g_resolver_get_default()</code></a> will return this resolver.
</p>
<p>
This can be used if an application wants to perform any sort of DNS
caching or "pinning"; it can implement its own <a class="link" href="GResolver.html" title="GResolver"><span class="type">GResolver</span></a> that
calls the original default resolver for DNS operations, and
implements its own cache policies on top of that, and then set
itself as the default resolver for all later code to use.
</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>resolver</code></em> :</span></p></td>
<td>the new default <a class="link" href="GResolver.html" title="GResolver"><span class="type">GResolver</span></a>
</td>
</tr></tbody>
</table></div>
<p class="since">Since 2.22</p>
</div>
<hr>
<div class="refsect2">
<a name="g-resolver-lookup-by-name"></a><h3>g_resolver_lookup_by_name ()</h3>
<pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Doubly-Linked-Lists.html#GList"><span class="returnvalue">GList</span></a> *             g_resolver_lookup_by_name           (<em class="parameter"><code><a class="link" href="GResolver.html" title="GResolver"><span class="type">GResolver</span></a> *resolver</code></em>,
                                                         <em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *hostname</code></em>,
                                                         <em class="parameter"><code><a class="link" href="GCancellable.html" title="GCancellable"><span class="type">GCancellable</span></a> *cancellable</code></em>,
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);</pre>
<p>
Synchronously resolves <em class="parameter"><code>hostname</code></em> to determine its associated IP
address(es). <em class="parameter"><code>hostname</code></em> may be an ASCII-only or UTF-8 hostname, or
the textual form of an IP address (in which case this just becomes
a wrapper around <a class="link" href="GInetAddress.html#g-inet-address-new-from-string" title="g_inet_address_new_from_string ()"><code class="function">g_inet_address_new_from_string()</code></a>).
</p>
<p>
On success, <a class="link" href="GResolver.html#g-resolver-lookup-by-name" title="g_resolver_lookup_by_name ()"><code class="function">g_resolver_lookup_by_name()</code></a> will return a <a href="http://library.gnome.org/devel/glib/unstable/glib-Doubly-Linked-Lists.html#GList"><span class="type">GList</span></a> of
<a class="link" href="GInetAddress.html" title="GInetAddress"><span class="type">GInetAddress</span></a>, sorted in order of preference and guaranteed to not
contain duplicates. That is, if using the result to connect to
<em class="parameter"><code>hostname</code></em>, you should attempt to connect to the first address
first, then the second if the first fails, etc. If you are using
the result to listen on a socket, it is appropriate to add each
result using e.g. <a class="link" href="GSocketListener.html#g-socket-listener-add-address" title="g_socket_listener_add_address ()"><code class="function">g_socket_listener_add_address()</code></a>.
</p>
<p>
If the DNS resolution fails, <em class="parameter"><code>error</code></em> (if non-<a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>) will be set to a
value from <a class="link" href="GResolver.html#GResolverError" title="enum GResolverError"><span class="type">GResolverError</span></a>.
</p>
<p>
If <em class="parameter"><code>cancellable</code></em> is non-<a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>, it can be used to cancel the
operation, in which case <em class="parameter"><code>error</code></em> (if non-<a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>) will be set to
<a class="link" href="gio-GIOError.html#G-IO-ERROR-CANCELLED:CAPS"><code class="literal">G_IO_ERROR_CANCELLED</code></a>.
</p>
<p>
If you are planning to connect to a socket on the resolved IP
address, it may be easier to create a <a class="link" href="GNetworkAddress.html" title="GNetworkAddress"><span class="type">GNetworkAddress</span></a> and use its
<a class="link" href="GSocketConnectable.html" title="GSocketConnectable"><span class="type">GSocketConnectable</span></a> interface.
</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>resolver</code></em> :</span></p></td>
<td>a <a class="link" href="GResolver.html" title="GResolver"><span class="type">GResolver</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>hostname</code></em> :</span></p></td>
<td>the hostname to look up</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>cancellable</code></em> :</span></p></td>
<td>a <a class="link" href="GCancellable.html" title="GCancellable"><span class="type">GCancellable</span></a>, or <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>. <span class="annotation">[<acronym title="NULL is ok, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>error</code></em> :</span></p></td>
<td>return location for a <a href="http://library.gnome.org/devel/glib/unstable/glib-Error-Reporting.html#GError"><span class="type">GError</span></a>, or <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>a <a href="http://library.gnome.org/devel/glib/unstable/glib-Doubly-Linked-Lists.html#GList"><span class="type">GList</span></a>
of <a class="link" href="GInetAddress.html" title="GInetAddress"><span class="type">GInetAddress</span></a>, or <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> on error. You
must unref each of the addresses and free the list when you are
done with it. (You can use <a class="link" href="GResolver.html#g-resolver-free-addresses" title="g_resolver_free_addresses ()"><code class="function">g_resolver_free_addresses()</code></a> to do this.). <span class="annotation">[<acronym title="Generics and defining elements of containers and arrays."><span class="acronym">element-type</span></acronym> GInetAddress][<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span>
</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 2.22</p>
</div>
<hr>
<div class="refsect2">
<a name="g-resolver-lookup-by-name-async"></a><h3>g_resolver_lookup_by_name_async ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                g_resolver_lookup_by_name_async     (<em class="parameter"><code><a class="link" href="GResolver.html" title="GResolver"><span class="type">GResolver</span></a> *resolver</code></em>,
                                                         <em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *hostname</code></em>,
                                                         <em class="parameter"><code><a class="link" href="GCancellable.html" title="GCancellable"><span class="type">GCancellable</span></a> *cancellable</code></em>,
                                                         <em class="parameter"><code><a class="link" href="GAsyncResult.html#GAsyncReadyCallback" title="GAsyncReadyCallback ()"><span class="type">GAsyncReadyCallback</span></a> callback</code></em>,
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> user_data</code></em>);</pre>
<p>
Begins asynchronously resolving <em class="parameter"><code>hostname</code></em> to determine its
associated IP address(es), and eventually calls <em class="parameter"><code>callback</code></em>, which
must call <a class="link" href="GResolver.html#g-resolver-lookup-by-name-finish" title="g_resolver_lookup_by_name_finish ()"><code class="function">g_resolver_lookup_by_name_finish()</code></a> to get the result.
See <a class="link" href="GResolver.html#g-resolver-lookup-by-name" title="g_resolver_lookup_by_name ()"><code class="function">g_resolver_lookup_by_name()</code></a> for more details.
</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>resolver</code></em> :</span></p></td>
<td>a <a class="link" href="GResolver.html" title="GResolver"><span class="type">GResolver</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>hostname</code></em> :</span></p></td>
<td>the hostname to look up the address of</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>cancellable</code></em> :</span></p></td>
<td>a <a class="link" href="GCancellable.html" title="GCancellable"><span class="type">GCancellable</span></a>, or <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>. <span class="annotation">[<acronym title="NULL is ok, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>callback</code></em> :</span></p></td>
<td>callback to call after resolution completes. <span class="annotation">[<acronym title="The callback is valid until first called."><span class="acronym">scope async</span></acronym>]</span>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>user_data</code></em> :</span></p></td>
<td>data for <em class="parameter"><code>callback</code></em>. <span class="annotation">[<acronym title="This parameter is a 'user_data', for callbacks; many bindings can pass NULL here."><span class="acronym">closure</span></acronym>]</span>
</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 2.22</p>
</div>
<hr>
<div class="refsect2">
<a name="g-resolver-lookup-by-name-finish"></a><h3>g_resolver_lookup_by_name_finish ()</h3>
<pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Doubly-Linked-Lists.html#GList"><span class="returnvalue">GList</span></a> *             g_resolver_lookup_by_name_finish    (<em class="parameter"><code><a class="link" href="GResolver.html" title="GResolver"><span class="type">GResolver</span></a> *resolver</code></em>,
                                                         <em class="parameter"><code><a class="link" href="GAsyncResult.html" title="GAsyncResult"><span class="type">GAsyncResult</span></a> *result</code></em>,
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);</pre>
<p>
Retrieves the result of a call to
<a class="link" href="GResolver.html#g-resolver-lookup-by-name-async" title="g_resolver_lookup_by_name_async ()"><code class="function">g_resolver_lookup_by_name_async()</code></a>.
</p>
<p>
If the DNS resolution failed, <em class="parameter"><code>error</code></em> (if non-<a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>) will be set to
a value from <a class="link" href="GResolver.html#GResolverError" title="enum GResolverError"><span class="type">GResolverError</span></a>. If the operation was cancelled,
<em class="parameter"><code>error</code></em> will be set to <a class="link" href="gio-GIOError.html#G-IO-ERROR-CANCELLED:CAPS"><code class="literal">G_IO_ERROR_CANCELLED</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>resolver</code></em> :</span></p></td>
<td>a <a class="link" href="GResolver.html" title="GResolver"><span class="type">GResolver</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>result</code></em> :</span></p></td>
<td>the result passed to your <a class="link" href="GAsyncResult.html#GAsyncReadyCallback" title="GAsyncReadyCallback ()"><span class="type">GAsyncReadyCallback</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>error</code></em> :</span></p></td>
<td>return location for a <a href="http://library.gnome.org/devel/glib/unstable/glib-Error-Reporting.html#GError"><span class="type">GError</span></a>, or <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>a <a href="http://library.gnome.org/devel/glib/unstable/glib-Doubly-Linked-Lists.html#GList"><span class="type">GList</span></a>
of <a class="link" href="GInetAddress.html" title="GInetAddress"><span class="type">GInetAddress</span></a>, or <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> on error. See <a class="link" href="GResolver.html#g-resolver-lookup-by-name" title="g_resolver_lookup_by_name ()"><code class="function">g_resolver_lookup_by_name()</code></a>
for more details. <span class="annotation">[<acronym title="Generics and defining elements of containers and arrays."><span class="acronym">element-type</span></acronym> GInetAddress][<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span>
</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 2.22</p>
</div>
<hr>
<div class="refsect2">
<a name="g-resolver-free-addresses"></a><h3>g_resolver_free_addresses ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                g_resolver_free_addresses           (<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Doubly-Linked-Lists.html#GList"><span class="type">GList</span></a> *addresses</code></em>);</pre>
<p>
Frees <em class="parameter"><code>addresses</code></em> (which should be the return value from
<a class="link" href="GResolver.html#g-resolver-lookup-by-name" title="g_resolver_lookup_by_name ()"><code class="function">g_resolver_lookup_by_name()</code></a> or <a class="link" href="GResolver.html#g-resolver-lookup-by-name-finish" title="g_resolver_lookup_by_name_finish ()"><code class="function">g_resolver_lookup_by_name_finish()</code></a>).
(This is a convenience method; you can also simply free the results
by hand.)
</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>addresses</code></em> :</span></p></td>
<td>a <a href="http://library.gnome.org/devel/glib/unstable/glib-Doubly-Linked-Lists.html#GList"><span class="type">GList</span></a> of <a class="link" href="GInetAddress.html" title="GInetAddress"><span class="type">GInetAddress</span></a>
</td>
</tr></tbody>
</table></div>
<p class="since">Since 2.22</p>
</div>
<hr>
<div class="refsect2">
<a name="g-resolver-lookup-by-address"></a><h3>g_resolver_lookup_by_address ()</h3>
<pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> *             g_resolver_lookup_by_address        (<em class="parameter"><code><a class="link" href="GResolver.html" title="GResolver"><span class="type">GResolver</span></a> *resolver</code></em>,
                                                         <em class="parameter"><code><a class="link" href="GInetAddress.html" title="GInetAddress"><span class="type">GInetAddress</span></a> *address</code></em>,
                                                         <em class="parameter"><code><a class="link" href="GCancellable.html" title="GCancellable"><span class="type">GCancellable</span></a> *cancellable</code></em>,
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);</pre>
<p>
Synchronously reverse-resolves <em class="parameter"><code>address</code></em> to determine its
associated hostname.
</p>
<p>
If the DNS resolution fails, <em class="parameter"><code>error</code></em> (if non-<a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>) will be set to
a value from <a class="link" href="GResolver.html#GResolverError" title="enum GResolverError"><span class="type">GResolverError</span></a>.
</p>
<p>
If <em class="parameter"><code>cancellable</code></em> is non-<a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>, it can be used to cancel the
operation, in which case <em class="parameter"><code>error</code></em> (if non-<a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>) will be set to
<a class="link" href="gio-GIOError.html#G-IO-ERROR-CANCELLED:CAPS"><code class="literal">G_IO_ERROR_CANCELLED</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>resolver</code></em> :</span></p></td>
<td>a <a class="link" href="GResolver.html" title="GResolver"><span class="type">GResolver</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>address</code></em> :</span></p></td>
<td>the address to reverse-resolve</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>cancellable</code></em> :</span></p></td>
<td>a <a class="link" href="GCancellable.html" title="GCancellable"><span class="type">GCancellable</span></a>, or <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>. <span class="annotation">[<acronym title="NULL is ok, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>error</code></em> :</span></p></td>
<td>return location for a <a href="http://library.gnome.org/devel/glib/unstable/glib-Error-Reporting.html#GError"><span class="type">GError</span></a>, or <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>a hostname (either ASCII-only, or in ASCII-encoded
form), or <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> on error.</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 2.22</p>
</div>
<hr>
<div class="refsect2">
<a name="g-resolver-lookup-by-address-async"></a><h3>g_resolver_lookup_by_address_async ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                g_resolver_lookup_by_address_async  (<em class="parameter"><code><a class="link" href="GResolver.html" title="GResolver"><span class="type">GResolver</span></a> *resolver</code></em>,
                                                         <em class="parameter"><code><a class="link" href="GInetAddress.html" title="GInetAddress"><span class="type">GInetAddress</span></a> *address</code></em>,
                                                         <em class="parameter"><code><a class="link" href="GCancellable.html" title="GCancellable"><span class="type">GCancellable</span></a> *cancellable</code></em>,
                                                         <em class="parameter"><code><a class="link" href="GAsyncResult.html#GAsyncReadyCallback" title="GAsyncReadyCallback ()"><span class="type">GAsyncReadyCallback</span></a> callback</code></em>,
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> user_data</code></em>);</pre>
<p>
Begins asynchronously reverse-resolving <em class="parameter"><code>address</code></em> to determine its
associated hostname, and eventually calls <em class="parameter"><code>callback</code></em>, which must
call <a class="link" href="GResolver.html#g-resolver-lookup-by-address-finish" title="g_resolver_lookup_by_address_finish ()"><code class="function">g_resolver_lookup_by_address_finish()</code></a> to get the final result.
</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>resolver</code></em> :</span></p></td>
<td>a <a class="link" href="GResolver.html" title="GResolver"><span class="type">GResolver</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>address</code></em> :</span></p></td>
<td>the address to reverse-resolve</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>cancellable</code></em> :</span></p></td>
<td>a <a class="link" href="GCancellable.html" title="GCancellable"><span class="type">GCancellable</span></a>, or <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>. <span class="annotation">[<acronym title="NULL is ok, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>callback</code></em> :</span></p></td>
<td>callback to call after resolution completes. <span class="annotation">[<acronym title="The callback is valid until first called."><span class="acronym">scope async</span></acronym>]</span>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>user_data</code></em> :</span></p></td>
<td>data for <em class="parameter"><code>callback</code></em>. <span class="annotation">[<acronym title="This parameter is a 'user_data', for callbacks; many bindings can pass NULL here."><span class="acronym">closure</span></acronym>]</span>
</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 2.22</p>
</div>
<hr>
<div class="refsect2">
<a name="g-resolver-lookup-by-address-finish"></a><h3>g_resolver_lookup_by_address_finish ()</h3>
<pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> *             g_resolver_lookup_by_address_finish (<em class="parameter"><code><a class="link" href="GResolver.html" title="GResolver"><span class="type">GResolver</span></a> *resolver</code></em>,
                                                         <em class="parameter"><code><a class="link" href="GAsyncResult.html" title="GAsyncResult"><span class="type">GAsyncResult</span></a> *result</code></em>,
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);</pre>
<p>
Retrieves the result of a previous call to
<a class="link" href="GResolver.html#g-resolver-lookup-by-address-async" title="g_resolver_lookup_by_address_async ()"><code class="function">g_resolver_lookup_by_address_async()</code></a>.
</p>
<p>
If the DNS resolution failed, <em class="parameter"><code>error</code></em> (if non-<a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>) will be set to
a value from <a class="link" href="GResolver.html#GResolverError" title="enum GResolverError"><span class="type">GResolverError</span></a>. If the operation was cancelled,
<em class="parameter"><code>error</code></em> will be set to <a class="link" href="gio-GIOError.html#G-IO-ERROR-CANCELLED:CAPS"><code class="literal">G_IO_ERROR_CANCELLED</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>resolver</code></em> :</span></p></td>
<td>a <a class="link" href="GResolver.html" title="GResolver"><span class="type">GResolver</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>result</code></em> :</span></p></td>
<td>the result passed to your <a class="link" href="GAsyncResult.html#GAsyncReadyCallback" title="GAsyncReadyCallback ()"><span class="type">GAsyncReadyCallback</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>error</code></em> :</span></p></td>
<td>return location for a <a href="http://library.gnome.org/devel/glib/unstable/glib-Error-Reporting.html#GError"><span class="type">GError</span></a>, or <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>a hostname (either ASCII-only, or in ASCII-encoded
form), or <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> on error.</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 2.22</p>
</div>
<hr>
<div class="refsect2">
<a name="g-resolver-lookup-service"></a><h3>g_resolver_lookup_service ()</h3>
<pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Doubly-Linked-Lists.html#GList"><span class="returnvalue">GList</span></a> *             g_resolver_lookup_service           (<em class="parameter"><code><a class="link" href="GResolver.html" title="GResolver"><span class="type">GResolver</span></a> *resolver</code></em>,
                                                         <em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *service</code></em>,
                                                         <em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *protocol</code></em>,
                                                         <em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *domain</code></em>,
                                                         <em class="parameter"><code><a class="link" href="GCancellable.html" title="GCancellable"><span class="type">GCancellable</span></a> *cancellable</code></em>,
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);</pre>
<p>
Synchronously performs a DNS SRV lookup for the given <em class="parameter"><code>service</code></em> and
<em class="parameter"><code>protocol</code></em> in the given <em class="parameter"><code>domain</code></em> and returns an array of <a class="link" href="GSrvTarget.html" title="GSrvTarget"><span class="type">GSrvTarget</span></a>.
<em class="parameter"><code>domain</code></em> may be an ASCII-only or UTF-8 hostname. Note also that the
<em class="parameter"><code>service</code></em> and <em class="parameter"><code>protocol</code></em> arguments <span class="emphasis"><em>do not</em></span>
include the leading underscore that appears in the actual DNS
entry.
</p>
<p>
On success, <a class="link" href="GResolver.html#g-resolver-lookup-service" title="g_resolver_lookup_service ()"><code class="function">g_resolver_lookup_service()</code></a> will return a <a href="http://library.gnome.org/devel/glib/unstable/glib-Doubly-Linked-Lists.html#GList"><span class="type">GList</span></a> of
<a class="link" href="GSrvTarget.html" title="GSrvTarget"><span class="type">GSrvTarget</span></a>, sorted in order of preference. (That is, you should
attempt to connect to the first target first, then the second if
the first fails, etc.)
</p>
<p>
If the DNS resolution fails, <em class="parameter"><code>error</code></em> (if non-<a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>) will be set to
a value from <a class="link" href="GResolver.html#GResolverError" title="enum GResolverError"><span class="type">GResolverError</span></a>.
</p>
<p>
If <em class="parameter"><code>cancellable</code></em> is non-<a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>, it can be used to cancel the
operation, in which case <em class="parameter"><code>error</code></em> (if non-<a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>) will be set to
<a class="link" href="gio-GIOError.html#G-IO-ERROR-CANCELLED:CAPS"><code class="literal">G_IO_ERROR_CANCELLED</code></a>.
</p>
<p>
If you are planning to connect to the service, it is usually easier
to create a <a class="link" href="GNetworkService.html" title="GNetworkService"><span class="type">GNetworkService</span></a> and use its <a class="link" href="GSocketConnectable.html" title="GSocketConnectable"><span class="type">GSocketConnectable</span></a>
interface.
</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>resolver</code></em> :</span></p></td>
<td>a <a class="link" href="GResolver.html" title="GResolver"><span class="type">GResolver</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>service</code></em> :</span></p></td>
<td>the service type to look up (eg, "ldap")</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>protocol</code></em> :</span></p></td>
<td>the networking protocol to use for <em class="parameter"><code>service</code></em> (eg, "tcp")</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>domain</code></em> :</span></p></td>
<td>the DNS domain to look up the service in</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>cancellable</code></em> :</span></p></td>
<td>a <a class="link" href="GCancellable.html" title="GCancellable"><span class="type">GCancellable</span></a>, or <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>. <span class="annotation">[<acronym title="NULL is ok, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>error</code></em> :</span></p></td>
<td>return location for a <a href="http://library.gnome.org/devel/glib/unstable/glib-Error-Reporting.html#GError"><span class="type">GError</span></a>, or <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>a <a href="http://library.gnome.org/devel/glib/unstable/glib-Doubly-Linked-Lists.html#GList"><span class="type">GList</span></a> of <a class="link" href="GSrvTarget.html" title="GSrvTarget"><span class="type">GSrvTarget</span></a>,
or <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> on error. You must free each of the targets and the list when you are
done with it. (You can use <a class="link" href="GResolver.html#g-resolver-free-targets" title="g_resolver_free_targets ()"><code class="function">g_resolver_free_targets()</code></a> to do this.). <span class="annotation">[<acronym title="Generics and defining elements of containers and arrays."><span class="acronym">element-type</span></acronym> GSrvTarget][<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span>
</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 2.22</p>
</div>
<hr>
<div class="refsect2">
<a name="g-resolver-lookup-service-async"></a><h3>g_resolver_lookup_service_async ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                g_resolver_lookup_service_async     (<em class="parameter"><code><a class="link" href="GResolver.html" title="GResolver"><span class="type">GResolver</span></a> *resolver</code></em>,
                                                         <em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *service</code></em>,
                                                         <em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *protocol</code></em>,
                                                         <em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *domain</code></em>,
                                                         <em class="parameter"><code><a class="link" href="GCancellable.html" title="GCancellable"><span class="type">GCancellable</span></a> *cancellable</code></em>,
                                                         <em class="parameter"><code><a class="link" href="GAsyncResult.html#GAsyncReadyCallback" title="GAsyncReadyCallback ()"><span class="type">GAsyncReadyCallback</span></a> callback</code></em>,
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> user_data</code></em>);</pre>
<p>
Begins asynchronously performing a DNS SRV lookup for the given
<em class="parameter"><code>service</code></em> and <em class="parameter"><code>protocol</code></em> in the given <em class="parameter"><code>domain</code></em>, and eventually calls
<em class="parameter"><code>callback</code></em>, which must call <a class="link" href="GResolver.html#g-resolver-lookup-service-finish" title="g_resolver_lookup_service_finish ()"><code class="function">g_resolver_lookup_service_finish()</code></a> to
get the final result. See <a class="link" href="GResolver.html#g-resolver-lookup-service" title="g_resolver_lookup_service ()"><code class="function">g_resolver_lookup_service()</code></a> for more
details.
</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>resolver</code></em> :</span></p></td>
<td>a <a class="link" href="GResolver.html" title="GResolver"><span class="type">GResolver</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>service</code></em> :</span></p></td>
<td>the service type to look up (eg, "ldap")</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>protocol</code></em> :</span></p></td>
<td>the networking protocol to use for <em class="parameter"><code>service</code></em> (eg, "tcp")</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>domain</code></em> :</span></p></td>
<td>the DNS domain to look up the service in</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>cancellable</code></em> :</span></p></td>
<td>a <a class="link" href="GCancellable.html" title="GCancellable"><span class="type">GCancellable</span></a>, or <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>. <span class="annotation">[<acronym title="NULL is ok, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>callback</code></em> :</span></p></td>
<td>callback to call after resolution completes. <span class="annotation">[<acronym title="The callback is valid until first called."><span class="acronym">scope async</span></acronym>]</span>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>user_data</code></em> :</span></p></td>
<td>data for <em class="parameter"><code>callback</code></em>. <span class="annotation">[<acronym title="This parameter is a 'user_data', for callbacks; many bindings can pass NULL here."><span class="acronym">closure</span></acronym>]</span>
</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 2.22</p>
</div>
<hr>
<div class="refsect2">
<a name="g-resolver-lookup-service-finish"></a><h3>g_resolver_lookup_service_finish ()</h3>
<pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Doubly-Linked-Lists.html#GList"><span class="returnvalue">GList</span></a> *             g_resolver_lookup_service_finish    (<em class="parameter"><code><a class="link" href="GResolver.html" title="GResolver"><span class="type">GResolver</span></a> *resolver</code></em>,
                                                         <em class="parameter"><code><a class="link" href="GAsyncResult.html" title="GAsyncResult"><span class="type">GAsyncResult</span></a> *result</code></em>,
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);</pre>
<p>
Retrieves the result of a previous call to
<a class="link" href="GResolver.html#g-resolver-lookup-service-async" title="g_resolver_lookup_service_async ()"><code class="function">g_resolver_lookup_service_async()</code></a>.
</p>
<p>
If the DNS resolution failed, <em class="parameter"><code>error</code></em> (if non-<a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>) will be set to
a value from <a class="link" href="GResolver.html#GResolverError" title="enum GResolverError"><span class="type">GResolverError</span></a>. If the operation was cancelled,
<em class="parameter"><code>error</code></em> will be set to <a class="link" href="gio-GIOError.html#G-IO-ERROR-CANCELLED:CAPS"><code class="literal">G_IO_ERROR_CANCELLED</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>resolver</code></em> :</span></p></td>
<td>a <a class="link" href="GResolver.html" title="GResolver"><span class="type">GResolver</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>result</code></em> :</span></p></td>
<td>the result passed to your <a class="link" href="GAsyncResult.html#GAsyncReadyCallback" title="GAsyncReadyCallback ()"><span class="type">GAsyncReadyCallback</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>error</code></em> :</span></p></td>
<td>return location for a <a href="http://library.gnome.org/devel/glib/unstable/glib-Error-Reporting.html#GError"><span class="type">GError</span></a>, or <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>a <a href="http://library.gnome.org/devel/glib/unstable/glib-Doubly-Linked-Lists.html#GList"><span class="type">GList</span></a> of <a class="link" href="GSrvTarget.html" title="GSrvTarget"><span class="type">GSrvTarget</span></a>,
or <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> on error. See <a class="link" href="GResolver.html#g-resolver-lookup-service" title="g_resolver_lookup_service ()"><code class="function">g_resolver_lookup_service()</code></a> for more details. <span class="annotation">[<acronym title="Generics and defining elements of containers and arrays."><span class="acronym">element-type</span></acronym> GSrvTarget][<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span>
</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 2.22</p>
</div>
<hr>
<div class="refsect2">
<a name="g-resolver-free-targets"></a><h3>g_resolver_free_targets ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                g_resolver_free_targets             (<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Doubly-Linked-Lists.html#GList"><span class="type">GList</span></a> *targets</code></em>);</pre>
<p>
Frees <em class="parameter"><code>targets</code></em> (which should be the return value from
<a class="link" href="GResolver.html#g-resolver-lookup-service" title="g_resolver_lookup_service ()"><code class="function">g_resolver_lookup_service()</code></a> or <a class="link" href="GResolver.html#g-resolver-lookup-service-finish" title="g_resolver_lookup_service_finish ()"><code class="function">g_resolver_lookup_service_finish()</code></a>).
(This is a convenience method; you can also simply free the
results by hand.)
</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>targets</code></em> :</span></p></td>
<td>a <a href="http://library.gnome.org/devel/glib/unstable/glib-Doubly-Linked-Lists.html#GList"><span class="type">GList</span></a> of <a class="link" href="GSrvTarget.html" title="GSrvTarget"><span class="type">GSrvTarget</span></a>
</td>
</tr></tbody>
</table></div>
<p class="since">Since 2.22</p>
</div>
<hr>
<div class="refsect2">
<a name="g-resolver-lookup-records"></a><h3>g_resolver_lookup_records ()</h3>
<pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Doubly-Linked-Lists.html#GList"><span class="returnvalue">GList</span></a> *             g_resolver_lookup_records           (<em class="parameter"><code><a class="link" href="GResolver.html" title="GResolver"><span class="type">GResolver</span></a> *resolver</code></em>,
                                                         <em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *rrname</code></em>,
                                                         <em class="parameter"><code><span class="type">GResolverRecordType</span> record_type</code></em>,
                                                         <em class="parameter"><code><a class="link" href="GCancellable.html" title="GCancellable"><span class="type">GCancellable</span></a> *cancellable</code></em>,
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);</pre>
<p>
Synchronously performs a DNS record lookup for the given <em class="parameter"><code>rrname</code></em> and returns
a list of records as <a href="http://library.gnome.org/devel/glib/unstable/glib-GVariant.html#GVariant"><span class="type">GVariant</span></a> tuples. See <span class="type">GResolverRecordType</span> for
information on what the records contain for each <em class="parameter"><code>record_type</code></em>.
</p>
<p>
If the DNS resolution fails, <em class="parameter"><code>error</code></em> (if non-<a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>) will be set to
a value from <a class="link" href="GResolver.html#GResolverError" title="enum GResolverError"><span class="type">GResolverError</span></a>.
</p>
<p>
If <em class="parameter"><code>cancellable</code></em> is non-<a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>, it can be used to cancel the
operation, in which case <em class="parameter"><code>error</code></em> (if non-<a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>) will be set to
<a class="link" href="gio-GIOError.html#G-IO-ERROR-CANCELLED:CAPS"><code class="literal">G_IO_ERROR_CANCELLED</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>resolver</code></em> :</span></p></td>
<td>a <a class="link" href="GResolver.html" title="GResolver"><span class="type">GResolver</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>rrname</code></em> :</span></p></td>
<td>the DNS name to lookup the record for</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>record_type</code></em> :</span></p></td>
<td>the type of DNS record to lookup</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>cancellable</code></em> :</span></p></td>
<td>a <a class="link" href="GCancellable.html" title="GCancellable"><span class="type">GCancellable</span></a>, or <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>. <span class="annotation">[<acronym title="NULL is ok, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>error</code></em> :</span></p></td>
<td>return location for a <a href="http://library.gnome.org/devel/glib/unstable/glib-Error-Reporting.html#GError"><span class="type">GError</span></a>, or <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>a <a href="http://library.gnome.org/devel/glib/unstable/glib-Doubly-Linked-Lists.html#GList"><span class="type">GList</span></a> of <a href="http://library.gnome.org/devel/glib/unstable/glib-GVariant.html#GVariant"><span class="type">GVariant</span></a>,
or <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> on error. You must free each of the records and the list when you are
done with it. (You can use <a href="http://library.gnome.org/devel/glib/unstable/glib-Doubly-Linked-Lists.html#g-list-free-full"><code class="function">g_list_free_full()</code></a> with <a href="http://library.gnome.org/devel/glib/unstable/glib-GVariant.html#g-variant-unref"><code class="function">g_variant_unref()</code></a> to do this.). <span class="annotation">[<acronym title="Generics and defining elements of containers and arrays."><span class="acronym">element-type</span></acronym> GVariant][<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span>
</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 2.34</p>
</div>
<hr>
<div class="refsect2">
<a name="g-resolver-lookup-records-async"></a><h3>g_resolver_lookup_records_async ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                g_resolver_lookup_records_async     (<em class="parameter"><code><a class="link" href="GResolver.html" title="GResolver"><span class="type">GResolver</span></a> *resolver</code></em>,
                                                         <em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *rrname</code></em>,
                                                         <em class="parameter"><code><span class="type">GResolverRecordType</span> record_type</code></em>,
                                                         <em class="parameter"><code><a class="link" href="GCancellable.html" title="GCancellable"><span class="type">GCancellable</span></a> *cancellable</code></em>,
                                                         <em class="parameter"><code><a class="link" href="GAsyncResult.html#GAsyncReadyCallback" title="GAsyncReadyCallback ()"><span class="type">GAsyncReadyCallback</span></a> callback</code></em>,
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> user_data</code></em>);</pre>
<p>
Begins asynchronously performing a DNS lookup for the given
<em class="parameter"><code>rrname</code></em>, and eventually calls <em class="parameter"><code>callback</code></em>, which must call
<a class="link" href="GResolver.html#g-resolver-lookup-records-finish" title="g_resolver_lookup_records_finish ()"><code class="function">g_resolver_lookup_records_finish()</code></a> to get the final result. See
<a class="link" href="GResolver.html#g-resolver-lookup-records" title="g_resolver_lookup_records ()"><code class="function">g_resolver_lookup_records()</code></a> for more details.
</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>resolver</code></em> :</span></p></td>
<td>a <a class="link" href="GResolver.html" title="GResolver"><span class="type">GResolver</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>rrname</code></em> :</span></p></td>
<td>the DNS name to lookup the record for</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>record_type</code></em> :</span></p></td>
<td>the type of DNS record to lookup</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>cancellable</code></em> :</span></p></td>
<td>a <a class="link" href="GCancellable.html" title="GCancellable"><span class="type">GCancellable</span></a>, or <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>. <span class="annotation">[<acronym title="NULL is ok, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>callback</code></em> :</span></p></td>
<td>callback to call after resolution completes. <span class="annotation">[<acronym title="The callback is valid until first called."><span class="acronym">scope async</span></acronym>]</span>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>user_data</code></em> :</span></p></td>
<td>data for <em class="parameter"><code>callback</code></em>. <span class="annotation">[<acronym title="This parameter is a 'user_data', for callbacks; many bindings can pass NULL here."><span class="acronym">closure</span></acronym>]</span>
</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 2.34</p>
</div>
<hr>
<div class="refsect2">
<a name="g-resolver-lookup-records-finish"></a><h3>g_resolver_lookup_records_finish ()</h3>
<pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Doubly-Linked-Lists.html#GList"><span class="returnvalue">GList</span></a> *             g_resolver_lookup_records_finish    (<em class="parameter"><code><a class="link" href="GResolver.html" title="GResolver"><span class="type">GResolver</span></a> *resolver</code></em>,
                                                         <em class="parameter"><code><a class="link" href="GAsyncResult.html" title="GAsyncResult"><span class="type">GAsyncResult</span></a> *result</code></em>,
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);</pre>
<p>
Retrieves the result of a previous call to
<a class="link" href="GResolver.html#g-resolver-lookup-records-async" title="g_resolver_lookup_records_async ()"><code class="function">g_resolver_lookup_records_async()</code></a>. Returns a list of records as <a href="http://library.gnome.org/devel/glib/unstable/glib-GVariant.html#GVariant"><span class="type">GVariant</span></a>
tuples. See <span class="type">GResolverRecordType</span> for information on what the records contain.
</p>
<p>
If the DNS resolution failed, <em class="parameter"><code>error</code></em> (if non-<a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>) will be set to
a value from <a class="link" href="GResolver.html#GResolverError" title="enum GResolverError"><span class="type">GResolverError</span></a>. If the operation was cancelled,
<em class="parameter"><code>error</code></em> will be set to <a class="link" href="gio-GIOError.html#G-IO-ERROR-CANCELLED:CAPS"><code class="literal">G_IO_ERROR_CANCELLED</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>resolver</code></em> :</span></p></td>
<td>a <a class="link" href="GResolver.html" title="GResolver"><span class="type">GResolver</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>result</code></em> :</span></p></td>
<td>the result passed to your <a class="link" href="GAsyncResult.html#GAsyncReadyCallback" title="GAsyncReadyCallback ()"><span class="type">GAsyncReadyCallback</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>error</code></em> :</span></p></td>
<td>return location for a <a href="http://library.gnome.org/devel/glib/unstable/glib-Error-Reporting.html#GError"><span class="type">GError</span></a>, or <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>a <a href="http://library.gnome.org/devel/glib/unstable/glib-Doubly-Linked-Lists.html#GList"><span class="type">GList</span></a> of <a href="http://library.gnome.org/devel/glib/unstable/glib-GVariant.html#GVariant"><span class="type">GVariant</span></a>,
or <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> on error. You must free each of the records and the list when you are
done with it. (You can use <a href="http://library.gnome.org/devel/glib/unstable/glib-Doubly-Linked-Lists.html#g-list-free-full"><code class="function">g_list_free_full()</code></a> with <a href="http://library.gnome.org/devel/glib/unstable/glib-GVariant.html#g-variant-unref"><code class="function">g_variant_unref()</code></a> to do this.). <span class="annotation">[<acronym title="Generics and defining elements of containers and arrays."><span class="acronym">element-type</span></acronym> GVariant][<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span>
</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 2.34</p>
</div>
<hr>
<div class="refsect2">
<a name="G-RESOLVER-ERROR:CAPS"></a><h3>G_RESOLVER_ERROR</h3>
<pre class="programlisting">#define G_RESOLVER_ERROR (g_resolver_error_quark ())
</pre>
<p>
Error domain for <a class="link" href="GResolver.html" title="GResolver"><span class="type">GResolver</span></a>. Errors in this domain will be from the
<a class="link" href="GResolver.html#GResolverError" title="enum GResolverError"><span class="type">GResolverError</span></a> enumeration. See <a href="http://library.gnome.org/devel/glib/unstable/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> for more information on
error domains.
</p>
</div>
<hr>
<div class="refsect2">
<a name="GResolverError"></a><h3>enum GResolverError</h3>
<pre class="programlisting">typedef enum {
  G_RESOLVER_ERROR_NOT_FOUND,
  G_RESOLVER_ERROR_TEMPORARY_FAILURE,
  G_RESOLVER_ERROR_INTERNAL
} GResolverError;
</pre>
<p>
An error code used with <a class="link" href="GResolver.html#G-RESOLVER-ERROR:CAPS" title="G_RESOLVER_ERROR"><code class="literal">G_RESOLVER_ERROR</code></a> in a <a href="http://library.gnome.org/devel/glib/unstable/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> returned
from a <a class="link" href="GResolver.html" title="GResolver"><span class="type">GResolver</span></a> routine.
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><a name="G-RESOLVER-ERROR-NOT-FOUND:CAPS"></a><span class="term"><code class="literal">G_RESOLVER_ERROR_NOT_FOUND</code></span></p></td>
<td>the requested name/address/service was not
    found
</td>
</tr>
<tr>
<td><p><a name="G-RESOLVER-ERROR-TEMPORARY-FAILURE:CAPS"></a><span class="term"><code class="literal">G_RESOLVER_ERROR_TEMPORARY_FAILURE</code></span></p></td>
<td>the requested information could not
    be looked up due to a network error or similar problem
</td>
</tr>
<tr>
<td><p><a name="G-RESOLVER-ERROR-INTERNAL:CAPS"></a><span class="term"><code class="literal">G_RESOLVER_ERROR_INTERNAL</code></span></p></td>
<td>unknown error
</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 2.22</p>
</div>
</div>
<div class="refsect1">
<a name="GResolver.signal-details"></a><h2>Signal Details</h2>
<div class="refsect2">
<a name="GResolver-reload"></a><h3>The <code class="literal">"reload"</code> signal</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                user_function                      (<a class="link" href="GResolver.html" title="GResolver"><span class="type">GResolver</span></a> *resolver,
                                                        <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a>   user_data)      : <a href="http://library.gnome.org/devel/gobject/unstable/gobject-Signals.html#G-SIGNAL-RUN-LAST:CAPS"><code class="literal">Run Last</code></a></pre>
<p>
Emitted when the resolver notices that the system resolver
configuration has changed.
</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>resolver</code></em> :</span></p></td>
<td>a <a class="link" href="GResolver.html" title="GResolver"><span class="type">GResolver</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>user_data</code></em> :</span></p></td>
<td>user data set when the signal handler was connected.</td>
</tr>
</tbody>
</table></div>
</div>
</div>
</div>
<div class="footer">
<hr>
          Generated by GTK-Doc V1.19</div>
</body>
</html>