~ubuntu-branches/ubuntu/lucid/libsoup2.4/lucid-proposed

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
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>SoupURI</title>
<meta name="generator" content="DocBook XSL Stylesheets V1.75.2">
<link rel="home" href="index.html" title="libsoup Reference Manual">
<link rel="up" href="ch02.html" title="Core API">
<link rel="prev" href="libsoup-2.4-soup-status.html" title="soup-status">
<link rel="next" href="libsoup-2.4-Soup-Miscellaneous-Utilities.html" title="Soup Miscellaneous Utilities">
<meta name="generator" content="GTK-Doc V1.14 (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="libsoup-2.4-soup-status.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">libsoup Reference Manual</th>
<td><a accesskey="n" href="libsoup-2.4-Soup-Miscellaneous-Utilities.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td>
</tr>
<tr><td colspan="5" class="shortcuts">
<a href="#libsoup-2.4-SoupURI.synopsis" class="shortcut">Top</a>
                   | 
                  <a href="#libsoup-2.4-SoupURI.description" class="shortcut">Description</a>
</td></tr>
</table>
<div class="refentry" title="SoupURI">
<a name="libsoup-2.4-SoupURI"></a><div class="titlepage"></div>
<div class="refnamediv"><table width="100%"><tr>
<td valign="top">
<h2><span class="refentrytitle"><a name="libsoup-2.4-SoupURI.top_of_page"></a>SoupURI</span></h2>
<p>SoupURI — URIs</p>
</td>
<td valign="top" align="right"></td>
</tr></table></div>
<div class="refsynopsisdiv" title="Synopsis">
<a name="libsoup-2.4-SoupURI.synopsis"></a><h2>Synopsis</h2>
<pre class="synopsis">
#include &lt;libsoup/soup.h&gt;

                    <a class="link" href="libsoup-2.4-SoupURI.html#SoupURI" title="SoupURI">SoupURI</a>;
<a class="link" href="libsoup-2.4-SoupURI.html#SoupURI" title="SoupURI"><span class="returnvalue">SoupURI</span></a> *           <a class="link" href="libsoup-2.4-SoupURI.html#soup-uri-new-with-base" title="soup_uri_new_with_base ()">soup_uri_new_with_base</a>              (<em class="parameter"><code><a class="link" href="libsoup-2.4-SoupURI.html#SoupURI" title="SoupURI"><span class="type">SoupURI</span></a> *base</code></em>,
                                                         <em class="parameter"><code>const <span class="type">char</span> *uri_string</code></em>);
<a class="link" href="libsoup-2.4-SoupURI.html#SoupURI" title="SoupURI"><span class="returnvalue">SoupURI</span></a> *           <a class="link" href="libsoup-2.4-SoupURI.html#soup-uri-new" title="soup_uri_new ()">soup_uri_new</a>                        (<em class="parameter"><code>const <span class="type">char</span> *uri_string</code></em>);
<span class="returnvalue">char</span> *              <a class="link" href="libsoup-2.4-SoupURI.html#soup-uri-to-string" title="soup_uri_to_string ()">soup_uri_to_string</a>                  (<em class="parameter"><code><a class="link" href="libsoup-2.4-SoupURI.html#SoupURI" title="SoupURI"><span class="type">SoupURI</span></a> *uri</code></em>,
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> just_path_and_query</code></em>);

<a class="link" href="libsoup-2.4-SoupURI.html#SoupURI" title="SoupURI"><span class="returnvalue">SoupURI</span></a> *           <a class="link" href="libsoup-2.4-SoupURI.html#soup-uri-copy" title="soup_uri_copy ()">soup_uri_copy</a>                       (<em class="parameter"><code><a class="link" href="libsoup-2.4-SoupURI.html#SoupURI" title="SoupURI"><span class="type">SoupURI</span></a> *uri</code></em>);
<a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>            <a class="link" href="libsoup-2.4-SoupURI.html#soup-uri-equal" title="soup_uri_equal ()">soup_uri_equal</a>                      (<em class="parameter"><code><a class="link" href="libsoup-2.4-SoupURI.html#SoupURI" title="SoupURI"><span class="type">SoupURI</span></a> *uri1</code></em>,
                                                         <em class="parameter"><code><a class="link" href="libsoup-2.4-SoupURI.html#SoupURI" title="SoupURI"><span class="type">SoupURI</span></a> *uri2</code></em>);
<span class="returnvalue">void</span>                <a class="link" href="libsoup-2.4-SoupURI.html#soup-uri-free" title="soup_uri_free ()">soup_uri_free</a>                       (<em class="parameter"><code><a class="link" href="libsoup-2.4-SoupURI.html#SoupURI" title="SoupURI"><span class="type">SoupURI</span></a> *uri</code></em>);

<span class="returnvalue">char</span> *              <a class="link" href="libsoup-2.4-SoupURI.html#soup-uri-encode" title="soup_uri_encode ()">soup_uri_encode</a>                     (<em class="parameter"><code>const <span class="type">char</span> *part</code></em>,
                                                         <em class="parameter"><code>const <span class="type">char</span> *escape_extra</code></em>);
<span class="returnvalue">char</span> *              <a class="link" href="libsoup-2.4-SoupURI.html#soup-uri-decode" title="soup_uri_decode ()">soup_uri_decode</a>                     (<em class="parameter"><code>const <span class="type">char</span> *part</code></em>);
<span class="returnvalue">char</span> *              <a class="link" href="libsoup-2.4-SoupURI.html#soup-uri-normalize" title="soup_uri_normalize ()">soup_uri_normalize</a>                  (<em class="parameter"><code>const <span class="type">char</span> *part</code></em>,
                                                         <em class="parameter"><code>const <span class="type">char</span> *unescape_extra</code></em>);

#define             <a class="link" href="libsoup-2.4-SoupURI.html#SOUP-URI-SCHEME-HTTP:CAPS" title="SOUP_URI_SCHEME_HTTP">SOUP_URI_SCHEME_HTTP</a>
#define             <a class="link" href="libsoup-2.4-SoupURI.html#SOUP-URI-SCHEME-HTTPS:CAPS" title="SOUP_URI_SCHEME_HTTPS">SOUP_URI_SCHEME_HTTPS</a>
<a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>            <a class="link" href="libsoup-2.4-SoupURI.html#soup-uri-uses-default-port" title="soup_uri_uses_default_port ()">soup_uri_uses_default_port</a>          (<em class="parameter"><code><a class="link" href="libsoup-2.4-SoupURI.html#SoupURI" title="SoupURI"><span class="type">SoupURI</span></a> *uri</code></em>);
#define             <a class="link" href="libsoup-2.4-SoupURI.html#SOUP-URI-VALID-FOR-HTTP:CAPS" title="SOUP_URI_VALID_FOR_HTTP()">SOUP_URI_VALID_FOR_HTTP</a>             (uri)

<span class="returnvalue">void</span>                <a class="link" href="libsoup-2.4-SoupURI.html#soup-uri-set-scheme" title="soup_uri_set_scheme ()">soup_uri_set_scheme</a>                 (<em class="parameter"><code><a class="link" href="libsoup-2.4-SoupURI.html#SoupURI" title="SoupURI"><span class="type">SoupURI</span></a> *uri</code></em>,
                                                         <em class="parameter"><code>const <span class="type">char</span> *scheme</code></em>);
<span class="returnvalue">void</span>                <a class="link" href="libsoup-2.4-SoupURI.html#soup-uri-set-user" title="soup_uri_set_user ()">soup_uri_set_user</a>                   (<em class="parameter"><code><a class="link" href="libsoup-2.4-SoupURI.html#SoupURI" title="SoupURI"><span class="type">SoupURI</span></a> *uri</code></em>,
                                                         <em class="parameter"><code>const <span class="type">char</span> *user</code></em>);
<span class="returnvalue">void</span>                <a class="link" href="libsoup-2.4-SoupURI.html#soup-uri-set-password" title="soup_uri_set_password ()">soup_uri_set_password</a>               (<em class="parameter"><code><a class="link" href="libsoup-2.4-SoupURI.html#SoupURI" title="SoupURI"><span class="type">SoupURI</span></a> *uri</code></em>,
                                                         <em class="parameter"><code>const <span class="type">char</span> *password</code></em>);
<span class="returnvalue">void</span>                <a class="link" href="libsoup-2.4-SoupURI.html#soup-uri-set-host" title="soup_uri_set_host ()">soup_uri_set_host</a>                   (<em class="parameter"><code><a class="link" href="libsoup-2.4-SoupURI.html#SoupURI" title="SoupURI"><span class="type">SoupURI</span></a> *uri</code></em>,
                                                         <em class="parameter"><code>const <span class="type">char</span> *host</code></em>);
<span class="returnvalue">void</span>                <a class="link" href="libsoup-2.4-SoupURI.html#soup-uri-set-port" title="soup_uri_set_port ()">soup_uri_set_port</a>                   (<em class="parameter"><code><a class="link" href="libsoup-2.4-SoupURI.html#SoupURI" title="SoupURI"><span class="type">SoupURI</span></a> *uri</code></em>,
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint"><span class="type">guint</span></a> port</code></em>);
<span class="returnvalue">void</span>                <a class="link" href="libsoup-2.4-SoupURI.html#soup-uri-set-path" title="soup_uri_set_path ()">soup_uri_set_path</a>                   (<em class="parameter"><code><a class="link" href="libsoup-2.4-SoupURI.html#SoupURI" title="SoupURI"><span class="type">SoupURI</span></a> *uri</code></em>,
                                                         <em class="parameter"><code>const <span class="type">char</span> *path</code></em>);
<span class="returnvalue">void</span>                <a class="link" href="libsoup-2.4-SoupURI.html#soup-uri-set-query" title="soup_uri_set_query ()">soup_uri_set_query</a>                  (<em class="parameter"><code><a class="link" href="libsoup-2.4-SoupURI.html#SoupURI" title="SoupURI"><span class="type">SoupURI</span></a> *uri</code></em>,
                                                         <em class="parameter"><code>const <span class="type">char</span> *query</code></em>);
<span class="returnvalue">void</span>                <a class="link" href="libsoup-2.4-SoupURI.html#soup-uri-set-query-from-form" title="soup_uri_set_query_from_form ()">soup_uri_set_query_from_form</a>        (<em class="parameter"><code><a class="link" href="libsoup-2.4-SoupURI.html#SoupURI" title="SoupURI"><span class="type">SoupURI</span></a> *uri</code></em>,
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Hash-Tables.html#GHashTable"><span class="type">GHashTable</span></a> *form</code></em>);
<span class="returnvalue">void</span>                <a class="link" href="libsoup-2.4-SoupURI.html#soup-uri-set-query-from-fields" title="soup_uri_set_query_from_fields ()">soup_uri_set_query_from_fields</a>      (<em class="parameter"><code><a class="link" href="libsoup-2.4-SoupURI.html#SoupURI" title="SoupURI"><span class="type">SoupURI</span></a> *uri</code></em>,
                                                         <em class="parameter"><code>const <span class="type">char</span> *first_field</code></em>,
                                                         <em class="parameter"><code>...</code></em>);
<span class="returnvalue">void</span>                <a class="link" href="libsoup-2.4-SoupURI.html#soup-uri-set-fragment" title="soup_uri_set_fragment ()">soup_uri_set_fragment</a>               (<em class="parameter"><code><a class="link" href="libsoup-2.4-SoupURI.html#SoupURI" title="SoupURI"><span class="type">SoupURI</span></a> *uri</code></em>,
                                                         <em class="parameter"><code>const <span class="type">char</span> *fragment</code></em>);
</pre>
</div>
<div class="refsect1" title="Description">
<a name="libsoup-2.4-SoupURI.description"></a><h2>Description</h2>
<p>
A <a class="link" href="libsoup-2.4-SoupURI.html#SoupURI" title="SoupURI"><span class="type">SoupURI</span></a> represents a (parsed) URI.
</p>
<p>
Many applications will not need to use <a class="link" href="libsoup-2.4-SoupURI.html#SoupURI" title="SoupURI"><span class="type">SoupURI</span></a> directly at all; on
the client side, <a class="link" href="SoupMessage.html#soup-message-new" title="soup_message_new ()"><code class="function">soup_message_new()</code></a> takes a stringified URI, and on
the server side, the path and query components are provided for you
in the server callback.
</p>
</div>
<div class="refsect1" title="Details">
<a name="libsoup-2.4-SoupURI.details"></a><h2>Details</h2>
<div class="refsect2" title="SoupURI">
<a name="SoupURI"></a><h3>SoupURI</h3>
<pre class="programlisting">typedef struct {
	const char *scheme;

	char       *user;
	char       *password;

	char       *host;
	guint       port;

	char       *path;
	char       *query;

	char       *fragment;
} SoupURI;
</pre>
<p>
A <a class="link" href="libsoup-2.4-SoupURI.html#SoupURI" title="SoupURI"><span class="type">SoupURI</span></a> represents a (parsed) URI. <a class="link" href="libsoup-2.4-SoupURI.html#SoupURI" title="SoupURI"><span class="type">SoupURI</span></a> supports RFC 3986
(URI Generic Syntax), and can parse any valid URI. However, libsoup
only uses "http" and "https" URIs internally; You can use
<a class="link" href="libsoup-2.4-SoupURI.html#SOUP-URI-VALID-FOR-HTTP:CAPS" title="SOUP_URI_VALID_FOR_HTTP()"><code class="function">SOUP_URI_VALID_FOR_HTTP()</code></a> to test if a <a class="link" href="libsoup-2.4-SoupURI.html#SoupURI" title="SoupURI"><span class="type">SoupURI</span></a> is a valid HTTP
URI.
</p>
<p>
<em class="parameter"><code>scheme</code></em> will always be set in any URI. It is an interned string and
is always all lowercase. (If you parse a URI with a non-lowercase
scheme, it will be converted to lowercase.) The macros
<a class="link" href="libsoup-2.4-SoupURI.html#SOUP-URI-SCHEME-HTTP:CAPS" title="SOUP_URI_SCHEME_HTTP"><code class="literal">SOUP_URI_SCHEME_HTTP</code></a> and <a class="link" href="libsoup-2.4-SoupURI.html#SOUP-URI-SCHEME-HTTPS:CAPS" title="SOUP_URI_SCHEME_HTTPS"><code class="literal">SOUP_URI_SCHEME_HTTPS</code></a> provide the
interned values for "http" and "https" and can be compared against
URI <em class="parameter"><code>scheme</code></em> values.
</p>
<p>
<em class="parameter"><code>user</code></em> and <em class="parameter"><code>password</code></em> are parsed as defined in the older URI specs
(ie, separated by a colon; RFC 3986 only talks about a single
"userinfo" field). Note that <em class="parameter"><code>password</code></em> is not included in the
output of <a class="link" href="libsoup-2.4-SoupURI.html#soup-uri-to-string" title="soup_uri_to_string ()"><code class="function">soup_uri_to_string()</code></a>. libsoup does not normally use these
fields; authentication is handled via <a class="link" href="SoupSession.html" title="SoupSession"><span class="type">SoupSession</span></a> signals.
</p>
<p>
<em class="parameter"><code>host</code></em> contains the hostname, and <em class="parameter"><code>port</code></em> the port specified in the
URI. If the URI doesn't contain a hostname, <em class="parameter"><code>host</code></em> will be <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>,
and if it doesn't specify a port, <em class="parameter"><code>port</code></em> may be 0. However, for
"http" and "https" URIs, <em class="parameter"><code>host</code></em> is guaranteed to be non-<a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>
(trying to parse an http URI with no <em class="parameter"><code>host</code></em> will return <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>), and
<em class="parameter"><code>port</code></em> will always be non-0 (because libsoup knows the default value
to use when it is not specified in the URI).
</p>
<p>
<em class="parameter"><code>path</code></em> is always non-<a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>. For http/https URIs, <em class="parameter"><code>path</code></em> will never be
an empty string either; if the input URI has no path, the parsed
<a class="link" href="libsoup-2.4-SoupURI.html#SoupURI" title="SoupURI"><span class="type">SoupURI</span></a> will have a <em class="parameter"><code>path</code></em> of "/".
</p>
<p>
<em class="parameter"><code>query</code></em> and <em class="parameter"><code>fragment</code></em> are optional for all URI types.
<code class="function">soup_form_decode_urlencoded()</code> may be useful for parsing <em class="parameter"><code>query</code></em>.
</p>
<p>
Note that <em class="parameter"><code>path</code></em>, <em class="parameter"><code>query</code></em>, and <em class="parameter"><code>fragment</code></em> may contain
%-encoded characters. <a class="link" href="libsoup-2.4-SoupURI.html#soup-uri-new" title="soup_uri_new ()"><code class="function">soup_uri_new()</code></a> calls
<a class="link" href="libsoup-2.4-SoupURI.html#soup-uri-normalize" title="soup_uri_normalize ()"><code class="function">soup_uri_normalize()</code></a> on them, but not <a class="link" href="libsoup-2.4-SoupURI.html#soup-uri-decode" title="soup_uri_decode ()"><code class="function">soup_uri_decode()</code></a>. This is
necessary to ensure that <a class="link" href="libsoup-2.4-SoupURI.html#soup-uri-to-string" title="soup_uri_to_string ()"><code class="function">soup_uri_to_string()</code></a> will generate a URI
that has exactly the same meaning as the original. (In theory,
<a class="link" href="libsoup-2.4-SoupURI.html#SoupURI" title="SoupURI"><span class="type">SoupURI</span></a> should leave <em class="parameter"><code>user</code></em>, <em class="parameter"><code>password</code></em>, and <em class="parameter"><code>host</code></em> partially-encoded
as well, but this would be more annoying than useful.)
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term">const <span class="type">char</span> *<em class="structfield"><code><a name="SoupURI.scheme"></a>scheme</code></em>;</span></p></td>
<td>the URI scheme (eg, "http")
</td>
</tr>
<tr>
<td><p><span class="term"><span class="type">char</span> *<em class="structfield"><code><a name="SoupURI.user"></a>user</code></em>;</span></p></td>
<td>a username, 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="type">char</span> *<em class="structfield"><code><a name="SoupURI.password"></a>password</code></em>;</span></p></td>
<td>a password, 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="type">char</span> *<em class="structfield"><code><a name="SoupURI.host"></a>host</code></em>;</span></p></td>
<td>the hostname or IP address
</td>
</tr>
<tr>
<td><p><span class="term"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint"><span class="type">guint</span></a> <em class="structfield"><code><a name="SoupURI.port"></a>port</code></em>;</span></p></td>
<td>the port number on <em class="parameter"><code>host</code></em>
</td>
</tr>
<tr>
<td><p><span class="term"><span class="type">char</span> *<em class="structfield"><code><a name="SoupURI.path"></a>path</code></em>;</span></p></td>
<td>the path on <em class="parameter"><code>host</code></em>
</td>
</tr>
<tr>
<td><p><span class="term"><span class="type">char</span> *<em class="structfield"><code><a name="SoupURI.query"></a>query</code></em>;</span></p></td>
<td>a query for <em class="parameter"><code>path</code></em>, 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="type">char</span> *<em class="structfield"><code><a name="SoupURI.fragment"></a>fragment</code></em>;</span></p></td>
<td>a fragment identifier within <em class="parameter"><code>path</code></em>, or <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" title="soup_uri_new_with_base ()">
<a name="soup-uri-new-with-base"></a><h3>soup_uri_new_with_base ()</h3>
<pre class="programlisting"><a class="link" href="libsoup-2.4-SoupURI.html#SoupURI" title="SoupURI"><span class="returnvalue">SoupURI</span></a> *           soup_uri_new_with_base              (<em class="parameter"><code><a class="link" href="libsoup-2.4-SoupURI.html#SoupURI" title="SoupURI"><span class="type">SoupURI</span></a> *base</code></em>,
                                                         <em class="parameter"><code>const <span class="type">char</span> *uri_string</code></em>);</pre>
<p>
Parses <em class="parameter"><code>uri_string</code></em> relative to <em class="parameter"><code>base</code></em>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>base</code></em> :</span></p></td>
<td>a base URI
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>uri_string</code></em> :</span></p></td>
<td>the URI
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td> a parsed <a class="link" href="libsoup-2.4-SoupURI.html#SoupURI" title="SoupURI"><span class="type">SoupURI</span></a>.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" title="soup_uri_new ()">
<a name="soup-uri-new"></a><h3>soup_uri_new ()</h3>
<pre class="programlisting"><a class="link" href="libsoup-2.4-SoupURI.html#SoupURI" title="SoupURI"><span class="returnvalue">SoupURI</span></a> *           soup_uri_new                        (<em class="parameter"><code>const <span class="type">char</span> *uri_string</code></em>);</pre>
<p>
Parses an absolute URI.
</p>
<p>
You can also pass <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> for <em class="parameter"><code>uri_string</code></em> if you want to get back an
"empty" <a class="link" href="libsoup-2.4-SoupURI.html#SoupURI" title="SoupURI"><span class="type">SoupURI</span></a> that you can fill in by hand. (You will need to
call at least <a class="link" href="libsoup-2.4-SoupURI.html#soup-uri-set-scheme" title="soup_uri_set_scheme ()"><code class="function">soup_uri_set_scheme()</code></a> and <a class="link" href="libsoup-2.4-SoupURI.html#soup-uri-set-path" title="soup_uri_set_path ()"><code class="function">soup_uri_set_path()</code></a>, since
those fields are required.)
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>uri_string</code></em> :</span></p></td>
<td>a URI
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td> a <a class="link" href="libsoup-2.4-SoupURI.html#SoupURI" title="SoupURI"><span class="type">SoupURI</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>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" title="soup_uri_to_string ()">
<a name="soup-uri-to-string"></a><h3>soup_uri_to_string ()</h3>
<pre class="programlisting"><span class="returnvalue">char</span> *              soup_uri_to_string                  (<em class="parameter"><code><a class="link" href="libsoup-2.4-SoupURI.html#SoupURI" title="SoupURI"><span class="type">SoupURI</span></a> *uri</code></em>,
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> just_path_and_query</code></em>);</pre>
<p>
Returns a string representing <em class="parameter"><code>uri</code></em>.
</p>
<p>
If <em class="parameter"><code>just_path_and_query</code></em> is <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a>, this concatenates the path and query
together. That is, it constructs the string that would be needed in
the Request-Line of an HTTP request for <em class="parameter"><code>uri</code></em>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>uri</code></em> :</span></p></td>
<td>a <a class="link" href="libsoup-2.4-SoupURI.html#SoupURI" title="SoupURI"><span class="type">SoupURI</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>just_path_and_query</code></em> :</span></p></td>
<td>if <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a>, output just the path and query portions
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td> a string representing <em class="parameter"><code>uri</code></em>, which the caller must free.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" title="soup_uri_copy ()">
<a name="soup-uri-copy"></a><h3>soup_uri_copy ()</h3>
<pre class="programlisting"><a class="link" href="libsoup-2.4-SoupURI.html#SoupURI" title="SoupURI"><span class="returnvalue">SoupURI</span></a> *           soup_uri_copy                       (<em class="parameter"><code><a class="link" href="libsoup-2.4-SoupURI.html#SoupURI" title="SoupURI"><span class="type">SoupURI</span></a> *uri</code></em>);</pre>
<p>
Copies <em class="parameter"><code>uri</code></em>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>uri</code></em> :</span></p></td>
<td>a <a class="link" href="libsoup-2.4-SoupURI.html#SoupURI" title="SoupURI"><span class="type">SoupURI</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td> a copy of <em class="parameter"><code>uri</code></em>, which must be freed with <a class="link" href="libsoup-2.4-SoupURI.html#soup-uri-free" title="soup_uri_free ()"><code class="function">soup_uri_free()</code></a>
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" title="soup_uri_equal ()">
<a name="soup-uri-equal"></a><h3>soup_uri_equal ()</h3>
<pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>            soup_uri_equal                      (<em class="parameter"><code><a class="link" href="libsoup-2.4-SoupURI.html#SoupURI" title="SoupURI"><span class="type">SoupURI</span></a> *uri1</code></em>,
                                                         <em class="parameter"><code><a class="link" href="libsoup-2.4-SoupURI.html#SoupURI" title="SoupURI"><span class="type">SoupURI</span></a> *uri2</code></em>);</pre>
<p>
Tests whether or not <em class="parameter"><code>uri1</code></em> and <em class="parameter"><code>uri2</code></em> are equal in all parts
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>uri1</code></em> :</span></p></td>
<td>a <a class="link" href="libsoup-2.4-SoupURI.html#SoupURI" title="SoupURI"><span class="type">SoupURI</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>uri2</code></em> :</span></p></td>
<td>another <a class="link" href="libsoup-2.4-SoupURI.html#SoupURI" title="SoupURI"><span class="type">SoupURI</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td> <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> or <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a>
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" title="soup_uri_free ()">
<a name="soup-uri-free"></a><h3>soup_uri_free ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                soup_uri_free                       (<em class="parameter"><code><a class="link" href="libsoup-2.4-SoupURI.html#SoupURI" title="SoupURI"><span class="type">SoupURI</span></a> *uri</code></em>);</pre>
<p>
Frees <em class="parameter"><code>uri</code></em>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody><tr>
<td><p><span class="term"><em class="parameter"><code>uri</code></em> :</span></p></td>
<td>a <a class="link" href="libsoup-2.4-SoupURI.html#SoupURI" title="SoupURI"><span class="type">SoupURI</span></a>
</td>
</tr></tbody>
</table></div>
</div>
<hr>
<div class="refsect2" title="soup_uri_encode ()">
<a name="soup-uri-encode"></a><h3>soup_uri_encode ()</h3>
<pre class="programlisting"><span class="returnvalue">char</span> *              soup_uri_encode                     (<em class="parameter"><code>const <span class="type">char</span> *part</code></em>,
                                                         <em class="parameter"><code>const <span class="type">char</span> *escape_extra</code></em>);</pre>
<p>
This %-encodes the given URI part and returns the escaped
version in allocated memory, which the caller must free when it is
done.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>part</code></em> :</span></p></td>
<td>a URI part
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>escape_extra</code></em> :</span></p></td>
<td>additional reserved characters to escape (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> the encoded URI part
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" title="soup_uri_decode ()">
<a name="soup-uri-decode"></a><h3>soup_uri_decode ()</h3>
<pre class="programlisting"><span class="returnvalue">char</span> *              soup_uri_decode                     (<em class="parameter"><code>const <span class="type">char</span> *part</code></em>);</pre>
<p>
Fully %-decodes <em class="parameter"><code>part</code></em>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>part</code></em> :</span></p></td>
<td>a URI part
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td> the decoded URI part, or <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> if an invalid percent
code was encountered.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" title="soup_uri_normalize ()">
<a name="soup-uri-normalize"></a><h3>soup_uri_normalize ()</h3>
<pre class="programlisting"><span class="returnvalue">char</span> *              soup_uri_normalize                  (<em class="parameter"><code>const <span class="type">char</span> *part</code></em>,
                                                         <em class="parameter"><code>const <span class="type">char</span> *unescape_extra</code></em>);</pre>
<p>
%-decodes any "unreserved" characters (or characters in
<em class="parameter"><code>unescape_extra</code></em>) in <em class="parameter"><code>part</code></em>.
</p>
<p>
"Unreserved" characters are those that are not allowed to be used
for punctuation according to the URI spec. For example, letters are
unreserved, so <a class="link" href="libsoup-2.4-SoupURI.html#soup-uri-normalize" title="soup_uri_normalize ()"><code class="function">soup_uri_normalize()</code></a> will turn
<code class="literal">http://example.com/foo/b%61r</code> into
<code class="literal">http://example.com/foo/bar</code>, which is guaranteed
to mean the same thing. However, "/" is "reserved", so
<code class="literal">http://example.com/foo%2Fbar</code> would not
be changed, because it might mean something different to the
server.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>part</code></em> :</span></p></td>
<td>a URI part
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>unescape_extra</code></em> :</span></p></td>
<td>reserved characters to unescape (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> the normalized URI part, or <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> if an invalid percent
code was encountered.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" title="SOUP_URI_SCHEME_HTTP">
<a name="SOUP-URI-SCHEME-HTTP:CAPS"></a><h3>SOUP_URI_SCHEME_HTTP</h3>
<pre class="programlisting">#define SOUP_URI_SCHEME_HTTP  _SOUP_ATOMIC_INTERN_STRING (_SOUP_URI_SCHEME_HTTP, "http")
</pre>
<p>
"http" as an interned string. This can be compared directly against
the value of a <a class="link" href="libsoup-2.4-SoupURI.html#SoupURI" title="SoupURI"><span class="type">SoupURI</span></a>'s <em class="structfield"><code>scheme</code></em>
</p>
</div>
<hr>
<div class="refsect2" title="SOUP_URI_SCHEME_HTTPS">
<a name="SOUP-URI-SCHEME-HTTPS:CAPS"></a><h3>SOUP_URI_SCHEME_HTTPS</h3>
<pre class="programlisting">#define SOUP_URI_SCHEME_HTTPS _SOUP_ATOMIC_INTERN_STRING (_SOUP_URI_SCHEME_HTTPS, "https")
</pre>
<p>
"https" as an interned string. This can be compared directly
against the value of a <a class="link" href="libsoup-2.4-SoupURI.html#SoupURI" title="SoupURI"><span class="type">SoupURI</span></a>'s <em class="structfield"><code>scheme</code></em>
</p>
</div>
<hr>
<div class="refsect2" title="soup_uri_uses_default_port ()">
<a name="soup-uri-uses-default-port"></a><h3>soup_uri_uses_default_port ()</h3>
<pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>            soup_uri_uses_default_port          (<em class="parameter"><code><a class="link" href="libsoup-2.4-SoupURI.html#SoupURI" title="SoupURI"><span class="type">SoupURI</span></a> *uri</code></em>);</pre>
<p>
Tests if <em class="parameter"><code>uri</code></em> uses the default port for its scheme. (Eg, 80 for
http.) (This only works for http and https; libsoup does not know
the default ports of other protocols.)
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>uri</code></em> :</span></p></td>
<td>a <a class="link" href="libsoup-2.4-SoupURI.html#SoupURI" title="SoupURI"><span class="type">SoupURI</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td> <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> or <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a>
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" title="SOUP_URI_VALID_FOR_HTTP()">
<a name="SOUP-URI-VALID-FOR-HTTP:CAPS"></a><h3>SOUP_URI_VALID_FOR_HTTP()</h3>
<pre class="programlisting">#define   SOUP_URI_VALID_FOR_HTTP(uri) ((uri) &amp;&amp; ((uri)-&gt;scheme == SOUP_URI_SCHEME_HTTP || (uri)-&gt;scheme == SOUP_URI_SCHEME_HTTPS) &amp;&amp; (uri)-&gt;host &amp;&amp; (uri)-&gt;path)
</pre>
<p>
Tests if <em class="parameter"><code>uri</code></em> is a valid <a class="link" href="libsoup-2.4-SoupURI.html#SoupURI" title="SoupURI"><span class="type">SoupURI</span></a> for HTTP communication; that is, if
it can be used to construct a <a class="link" href="SoupMessage.html" title="SoupMessage"><span class="type">SoupMessage</span></a>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>uri</code></em> :</span></p></td>
<td>a <a class="link" href="libsoup-2.4-SoupURI.html#SoupURI" title="SoupURI"><span class="type">SoupURI</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td> <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if <em class="parameter"><code>uri</code></em> is a valid "http" or "https" URI.

</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 2.24</p>
</div>
<hr>
<div class="refsect2" title="soup_uri_set_scheme ()">
<a name="soup-uri-set-scheme"></a><h3>soup_uri_set_scheme ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                soup_uri_set_scheme                 (<em class="parameter"><code><a class="link" href="libsoup-2.4-SoupURI.html#SoupURI" title="SoupURI"><span class="type">SoupURI</span></a> *uri</code></em>,
                                                         <em class="parameter"><code>const <span class="type">char</span> *scheme</code></em>);</pre>
<p>
Sets <em class="parameter"><code>uri</code></em>'s scheme to <em class="parameter"><code>scheme</code></em>. This will also set <em class="parameter"><code>uri</code></em>'s port to
the default port for <em class="parameter"><code>scheme</code></em>, if known.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>uri</code></em> :</span></p></td>
<td>a <a class="link" href="libsoup-2.4-SoupURI.html#SoupURI" title="SoupURI"><span class="type">SoupURI</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>scheme</code></em> :</span></p></td>
<td>the URI scheme
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" title="soup_uri_set_user ()">
<a name="soup-uri-set-user"></a><h3>soup_uri_set_user ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                soup_uri_set_user                   (<em class="parameter"><code><a class="link" href="libsoup-2.4-SoupURI.html#SoupURI" title="SoupURI"><span class="type">SoupURI</span></a> *uri</code></em>,
                                                         <em class="parameter"><code>const <span class="type">char</span> *user</code></em>);</pre>
<p>
Sets <em class="parameter"><code>uri</code></em>'s user to <em class="parameter"><code>user</code></em>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>uri</code></em> :</span></p></td>
<td>a <a class="link" href="libsoup-2.4-SoupURI.html#SoupURI" title="SoupURI"><span class="type">SoupURI</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>user</code></em> :</span></p></td>
<td>the username, or <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" title="soup_uri_set_password ()">
<a name="soup-uri-set-password"></a><h3>soup_uri_set_password ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                soup_uri_set_password               (<em class="parameter"><code><a class="link" href="libsoup-2.4-SoupURI.html#SoupURI" title="SoupURI"><span class="type">SoupURI</span></a> *uri</code></em>,
                                                         <em class="parameter"><code>const <span class="type">char</span> *password</code></em>);</pre>
<p>
Sets <em class="parameter"><code>uri</code></em>'s password to <em class="parameter"><code>password</code></em>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>uri</code></em> :</span></p></td>
<td>a <a class="link" href="libsoup-2.4-SoupURI.html#SoupURI" title="SoupURI"><span class="type">SoupURI</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>password</code></em> :</span></p></td>
<td>the password, or <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" title="soup_uri_set_host ()">
<a name="soup-uri-set-host"></a><h3>soup_uri_set_host ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                soup_uri_set_host                   (<em class="parameter"><code><a class="link" href="libsoup-2.4-SoupURI.html#SoupURI" title="SoupURI"><span class="type">SoupURI</span></a> *uri</code></em>,
                                                         <em class="parameter"><code>const <span class="type">char</span> *host</code></em>);</pre>
<p>
Sets <em class="parameter"><code>uri</code></em>'s host to <em class="parameter"><code>host</code></em>.
</p>
<p>
If <em class="parameter"><code>host</code></em> is an IPv6 IP address, it should not include the brackets
required by the URI syntax; they will be added automatically when
converting <em class="parameter"><code>uri</code></em> to a string.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>uri</code></em> :</span></p></td>
<td>a <a class="link" href="libsoup-2.4-SoupURI.html#SoupURI" title="SoupURI"><span class="type">SoupURI</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>host</code></em> :</span></p></td>
<td>the hostname or IP address, or <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" title="soup_uri_set_port ()">
<a name="soup-uri-set-port"></a><h3>soup_uri_set_port ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                soup_uri_set_port                   (<em class="parameter"><code><a class="link" href="libsoup-2.4-SoupURI.html#SoupURI" title="SoupURI"><span class="type">SoupURI</span></a> *uri</code></em>,
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint"><span class="type">guint</span></a> port</code></em>);</pre>
<p>
Sets <em class="parameter"><code>uri</code></em>'s port to <em class="parameter"><code>port</code></em>. If <em class="parameter"><code>port</code></em> is 0, <em class="parameter"><code>uri</code></em> will not have an
explicitly-specified port.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>uri</code></em> :</span></p></td>
<td>a <a class="link" href="libsoup-2.4-SoupURI.html#SoupURI" title="SoupURI"><span class="type">SoupURI</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>port</code></em> :</span></p></td>
<td>the port, or 0
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" title="soup_uri_set_path ()">
<a name="soup-uri-set-path"></a><h3>soup_uri_set_path ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                soup_uri_set_path                   (<em class="parameter"><code><a class="link" href="libsoup-2.4-SoupURI.html#SoupURI" title="SoupURI"><span class="type">SoupURI</span></a> *uri</code></em>,
                                                         <em class="parameter"><code>const <span class="type">char</span> *path</code></em>);</pre>
<p>
Sets <em class="parameter"><code>uri</code></em>'s path to <em class="parameter"><code>path</code></em>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>uri</code></em> :</span></p></td>
<td>a <a class="link" href="libsoup-2.4-SoupURI.html#SoupURI" title="SoupURI"><span class="type">SoupURI</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>path</code></em> :</span></p></td>
<td>the path
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" title="soup_uri_set_query ()">
<a name="soup-uri-set-query"></a><h3>soup_uri_set_query ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                soup_uri_set_query                  (<em class="parameter"><code><a class="link" href="libsoup-2.4-SoupURI.html#SoupURI" title="SoupURI"><span class="type">SoupURI</span></a> *uri</code></em>,
                                                         <em class="parameter"><code>const <span class="type">char</span> *query</code></em>);</pre>
<p>
Sets <em class="parameter"><code>uri</code></em>'s query to <em class="parameter"><code>query</code></em>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>uri</code></em> :</span></p></td>
<td>a <a class="link" href="libsoup-2.4-SoupURI.html#SoupURI" title="SoupURI"><span class="type">SoupURI</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>query</code></em> :</span></p></td>
<td>the query
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" title="soup_uri_set_query_from_form ()">
<a name="soup-uri-set-query-from-form"></a><h3>soup_uri_set_query_from_form ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                soup_uri_set_query_from_form        (<em class="parameter"><code><a class="link" href="libsoup-2.4-SoupURI.html#SoupURI" title="SoupURI"><span class="type">SoupURI</span></a> *uri</code></em>,
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Hash-Tables.html#GHashTable"><span class="type">GHashTable</span></a> *form</code></em>);</pre>
<p>
Sets <em class="parameter"><code>uri</code></em>'s query to the result of encoding <em class="parameter"><code>form</code></em> according to the
HTML form rules. See <a class="link" href="libsoup-2.4-HTML-Form-Support.html#soup-form-encode-hash" title="soup_form_encode_hash ()"><code class="function">soup_form_encode_hash()</code></a> for more information.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>uri</code></em> :</span></p></td>
<td>a <a class="link" href="libsoup-2.4-SoupURI.html#SoupURI" title="SoupURI"><span class="type">SoupURI</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>form</code></em> :</span></p></td>
<td>a <a href="http://library.gnome.org/devel/glib/unstable/glib-Hash-Tables.html#GHashTable"><span class="type">GHashTable</span></a> containing HTML form information
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" title="soup_uri_set_query_from_fields ()">
<a name="soup-uri-set-query-from-fields"></a><h3>soup_uri_set_query_from_fields ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                soup_uri_set_query_from_fields      (<em class="parameter"><code><a class="link" href="libsoup-2.4-SoupURI.html#SoupURI" title="SoupURI"><span class="type">SoupURI</span></a> *uri</code></em>,
                                                         <em class="parameter"><code>const <span class="type">char</span> *first_field</code></em>,
                                                         <em class="parameter"><code>...</code></em>);</pre>
<p>
Sets <em class="parameter"><code>uri</code></em>'s query to the result of encoding the given form fields
and values according to the * HTML form rules. See
<a class="link" href="libsoup-2.4-HTML-Form-Support.html#soup-form-encode" title="soup_form_encode ()"><code class="function">soup_form_encode()</code></a> for more information.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>uri</code></em> :</span></p></td>
<td>a <a class="link" href="libsoup-2.4-SoupURI.html#SoupURI" title="SoupURI"><span class="type">SoupURI</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>first_field</code></em> :</span></p></td>
<td>name of the first form field to encode into query
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>...</code></em> :</span></p></td>
<td>value of <em class="parameter"><code>first_field</code></em>, followed by additional field names
and values, terminated by <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" title="soup_uri_set_fragment ()">
<a name="soup-uri-set-fragment"></a><h3>soup_uri_set_fragment ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                soup_uri_set_fragment               (<em class="parameter"><code><a class="link" href="libsoup-2.4-SoupURI.html#SoupURI" title="SoupURI"><span class="type">SoupURI</span></a> *uri</code></em>,
                                                         <em class="parameter"><code>const <span class="type">char</span> *fragment</code></em>);</pre>
<p>
Sets <em class="parameter"><code>uri</code></em>'s fragment to <em class="parameter"><code>fragment</code></em>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>uri</code></em> :</span></p></td>
<td>a <a class="link" href="libsoup-2.4-SoupURI.html#SoupURI" title="SoupURI"><span class="type">SoupURI</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>fragment</code></em> :</span></p></td>
<td>the fragment
</td>
</tr>
</tbody>
</table></div>
</div>
</div>
</div>
<div class="footer">
<hr>
          Generated by GTK-Doc V1.14</div>
</body>
</html>