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

« back to all changes in this revision

Viewing changes to docs/reference/html/libsoup-2.4-SoupURI.html

  • Committer: Bazaar Package Importer
  • Author(s): Sebastien Bacher
  • Date: 2010-04-28 15:26:36 UTC
  • mfrom: (1.3.12 upstream)
  • Revision ID: james.westby@ubuntu.com-20100428152636-fgpkrmoqac052vjy
Tags: 2.30.1-0ubuntu1
* New upstream version (lp: #571242):
  - Fix for https through proxies that close the connection when returning a 
    "407 Proxy Authentication Required" response, and add a 
    regression test for that case.
  - Fixed multiple forms/multipart-related interoperability problems reported 
    by Egon Andersen:
  - Don't quote the multipart boundary string if it's not needed, since 
    RFC 2616 recommends that you don't, and some servers don't handle quotes 
    there correctly. (Sigh.)
  - Don't put an extra blank line before the first multipart part, since it's 
    unnecessary and some servers don't handle a multipart preamble correctly.
  - Don't put Content-Transfer-Encoding headers in 
    the multipart/form-data parts, even though the HTML 4 spec says you must, 
    since no other browsers do, and some servers don't handle them correctly.
  - Changed SoupCookieJarSqlite to actually erase deleted
    cookies from the database.
  - Fixed SoupLogger to be more robust against getting passed bad data 
     by the session.
  - Fixed SoupAuthDomain to ignore paths when doing proxy auth
  - Fixed a g_warning when hovering over a javascript link in WebKit
* debian/libsoup2.4-1.symbols:
  - new version update
* debian/rules:
  - copied new Debian soname computation code to fix build issue 
  - updated shlib version

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
 
2
<html>
 
3
<head>
 
4
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
 
5
<title>SoupURI</title>
 
6
<meta name="generator" content="DocBook XSL Stylesheets V1.75.2">
 
7
<link rel="home" href="index.html" title="libsoup Reference Manual">
 
8
<link rel="up" href="ch02.html" title="Core API">
 
9
<link rel="prev" href="libsoup-2.4-soup-status.html" title="soup-status">
 
10
<link rel="next" href="libsoup-2.4-Soup-Miscellaneous-Utilities.html" title="Soup Miscellaneous Utilities">
 
11
<meta name="generator" content="GTK-Doc V1.14 (XML mode)">
 
12
<link rel="stylesheet" href="style.css" type="text/css">
 
13
</head>
 
14
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
 
15
<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2">
 
16
<tr valign="middle">
 
17
<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>
 
18
<td><a accesskey="u" href="ch02.html"><img src="up.png" width="24" height="24" border="0" alt="Up"></a></td>
 
19
<td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"></a></td>
 
20
<th width="100%" align="center">libsoup Reference Manual</th>
 
21
<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>
 
22
</tr>
 
23
<tr><td colspan="5" class="shortcuts">
 
24
<a href="#libsoup-2.4-SoupURI.synopsis" class="shortcut">Top</a>
 
25
                   | 
 
26
                  <a href="#libsoup-2.4-SoupURI.description" class="shortcut">Description</a>
 
27
</td></tr>
 
28
</table>
 
29
<div class="refentry" title="SoupURI">
 
30
<a name="libsoup-2.4-SoupURI"></a><div class="titlepage"></div>
 
31
<div class="refnamediv"><table width="100%"><tr>
 
32
<td valign="top">
 
33
<h2><span class="refentrytitle"><a name="libsoup-2.4-SoupURI.top_of_page"></a>SoupURI</span></h2>
 
34
<p>SoupURI — URIs</p>
 
35
</td>
 
36
<td valign="top" align="right"></td>
 
37
</tr></table></div>
 
38
<div class="refsynopsisdiv" title="Synopsis">
 
39
<a name="libsoup-2.4-SoupURI.synopsis"></a><h2>Synopsis</h2>
 
40
<pre class="synopsis">
 
41
#include &lt;libsoup/soup.h&gt;
 
42
 
 
43
                    <a class="link" href="libsoup-2.4-SoupURI.html#SoupURI" title="SoupURI">SoupURI</a>;
 
44
<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>,
 
45
                                                         <em class="parameter"><code>const <span class="type">char</span> *uri_string</code></em>);
 
46
<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>);
 
47
<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>,
 
48
                                                         <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>);
 
49
 
 
50
<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>);
 
51
<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>,
 
52
                                                         <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>);
 
53
<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>);
 
54
 
 
55
<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>,
 
56
                                                         <em class="parameter"><code>const <span class="type">char</span> *escape_extra</code></em>);
 
57
<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>);
 
58
<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>,
 
59
                                                         <em class="parameter"><code>const <span class="type">char</span> *unescape_extra</code></em>);
 
60
 
 
61
#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>
 
62
#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>
 
63
<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>);
 
64
#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)
 
65
 
 
66
<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>,
 
67
                                                         <em class="parameter"><code>const <span class="type">char</span> *scheme</code></em>);
 
68
<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>,
 
69
                                                         <em class="parameter"><code>const <span class="type">char</span> *user</code></em>);
 
70
<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>,
 
71
                                                         <em class="parameter"><code>const <span class="type">char</span> *password</code></em>);
 
72
<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>,
 
73
                                                         <em class="parameter"><code>const <span class="type">char</span> *host</code></em>);
 
74
<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>,
 
75
                                                         <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>);
 
76
<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>,
 
77
                                                         <em class="parameter"><code>const <span class="type">char</span> *path</code></em>);
 
78
<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>,
 
79
                                                         <em class="parameter"><code>const <span class="type">char</span> *query</code></em>);
 
80
<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>,
 
81
                                                         <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>);
 
82
<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>,
 
83
                                                         <em class="parameter"><code>const <span class="type">char</span> *first_field</code></em>,
 
84
                                                         <em class="parameter"><code>...</code></em>);
 
85
<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>,
 
86
                                                         <em class="parameter"><code>const <span class="type">char</span> *fragment</code></em>);
 
87
</pre>
 
88
</div>
 
89
<div class="refsect1" title="Description">
 
90
<a name="libsoup-2.4-SoupURI.description"></a><h2>Description</h2>
 
91
<p>
 
92
A <a class="link" href="libsoup-2.4-SoupURI.html#SoupURI" title="SoupURI"><span class="type">SoupURI</span></a> represents a (parsed) URI.
 
93
</p>
 
94
<p>
 
95
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
 
96
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
 
97
the server side, the path and query components are provided for you
 
98
in the server callback.
 
99
</p>
 
100
</div>
 
101
<div class="refsect1" title="Details">
 
102
<a name="libsoup-2.4-SoupURI.details"></a><h2>Details</h2>
 
103
<div class="refsect2" title="SoupURI">
 
104
<a name="SoupURI"></a><h3>SoupURI</h3>
 
105
<pre class="programlisting">typedef struct {
 
106
        const char *scheme;
 
107
 
 
108
        char       *user;
 
109
        char       *password;
 
110
 
 
111
        char       *host;
 
112
        guint       port;
 
113
 
 
114
        char       *path;
 
115
        char       *query;
 
116
 
 
117
        char       *fragment;
 
118
} SoupURI;
 
119
</pre>
 
120
<p>
 
121
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
 
122
(URI Generic Syntax), and can parse any valid URI. However, libsoup
 
123
only uses "http" and "https" URIs internally; You can use
 
124
<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
 
125
URI.
 
126
</p>
 
127
<p>
 
128
<em class="parameter"><code>scheme</code></em> will always be set in any URI. It is an interned string and
 
129
is always all lowercase. (If you parse a URI with a non-lowercase
 
130
scheme, it will be converted to lowercase.) The macros
 
131
<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
 
132
interned values for "http" and "https" and can be compared against
 
133
URI <em class="parameter"><code>scheme</code></em> values.
 
134
</p>
 
135
<p>
 
136
<em class="parameter"><code>user</code></em> and <em class="parameter"><code>password</code></em> are parsed as defined in the older URI specs
 
137
(ie, separated by a colon; RFC 3986 only talks about a single
 
138
"userinfo" field). Note that <em class="parameter"><code>password</code></em> is not included in the
 
139
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
 
140
fields; authentication is handled via <a class="link" href="SoupSession.html" title="SoupSession"><span class="type">SoupSession</span></a> signals.
 
141
</p>
 
142
<p>
 
143
<em class="parameter"><code>host</code></em> contains the hostname, and <em class="parameter"><code>port</code></em> the port specified in the
 
144
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>,
 
145
and if it doesn't specify a port, <em class="parameter"><code>port</code></em> may be 0. However, for
 
146
"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>
 
147
(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
 
148
<em class="parameter"><code>port</code></em> will always be non-0 (because libsoup knows the default value
 
149
to use when it is not specified in the URI).
 
150
</p>
 
151
<p>
 
152
<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
 
153
an empty string either; if the input URI has no path, the parsed
 
154
<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 "/".
 
155
</p>
 
156
<p>
 
157
<em class="parameter"><code>query</code></em> and <em class="parameter"><code>fragment</code></em> are optional for all URI types.
 
158
<code class="function">soup_form_decode_urlencoded()</code> may be useful for parsing <em class="parameter"><code>query</code></em>.
 
159
</p>
 
160
<p>
 
161
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
 
162
%-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
 
163
<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
 
164
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
 
165
that has exactly the same meaning as the original. (In theory,
 
166
<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
 
167
as well, but this would be more annoying than useful.)
 
168
</p>
 
169
<div class="variablelist"><table border="0">
 
170
<col align="left" valign="top">
 
171
<tbody>
 
172
<tr>
 
173
<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>
 
174
<td>the URI scheme (eg, "http")
 
175
</td>
 
176
</tr>
 
177
<tr>
 
178
<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>
 
179
<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>
 
180
</td>
 
181
</tr>
 
182
<tr>
 
183
<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>
 
184
<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>
 
185
</td>
 
186
</tr>
 
187
<tr>
 
188
<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>
 
189
<td>the hostname or IP address
 
190
</td>
 
191
</tr>
 
192
<tr>
 
193
<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>
 
194
<td>the port number on <em class="parameter"><code>host</code></em>
 
195
</td>
 
196
</tr>
 
197
<tr>
 
198
<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>
 
199
<td>the path on <em class="parameter"><code>host</code></em>
 
200
</td>
 
201
</tr>
 
202
<tr>
 
203
<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>
 
204
<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>
 
205
</td>
 
206
</tr>
 
207
<tr>
 
208
<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>
 
209
<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>
 
210
</td>
 
211
</tr>
 
212
</tbody>
 
213
</table></div>
 
214
</div>
 
215
<hr>
 
216
<div class="refsect2" title="soup_uri_new_with_base ()">
 
217
<a name="soup-uri-new-with-base"></a><h3>soup_uri_new_with_base ()</h3>
 
218
<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>,
 
219
                                                         <em class="parameter"><code>const <span class="type">char</span> *uri_string</code></em>);</pre>
 
220
<p>
 
221
Parses <em class="parameter"><code>uri_string</code></em> relative to <em class="parameter"><code>base</code></em>.
 
222
</p>
 
223
<div class="variablelist"><table border="0">
 
224
<col align="left" valign="top">
 
225
<tbody>
 
226
<tr>
 
227
<td><p><span class="term"><em class="parameter"><code>base</code></em> :</span></p></td>
 
228
<td>a base URI
 
229
</td>
 
230
</tr>
 
231
<tr>
 
232
<td><p><span class="term"><em class="parameter"><code>uri_string</code></em> :</span></p></td>
 
233
<td>the URI
 
234
</td>
 
235
</tr>
 
236
<tr>
 
237
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
 
238
<td> a parsed <a class="link" href="libsoup-2.4-SoupURI.html#SoupURI" title="SoupURI"><span class="type">SoupURI</span></a>.
 
239
</td>
 
240
</tr>
 
241
</tbody>
 
242
</table></div>
 
243
</div>
 
244
<hr>
 
245
<div class="refsect2" title="soup_uri_new ()">
 
246
<a name="soup-uri-new"></a><h3>soup_uri_new ()</h3>
 
247
<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>
 
248
<p>
 
249
Parses an absolute URI.
 
250
</p>
 
251
<p>
 
252
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
 
253
"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
 
254
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
 
255
those fields are required.)
 
256
</p>
 
257
<div class="variablelist"><table border="0">
 
258
<col align="left" valign="top">
 
259
<tbody>
 
260
<tr>
 
261
<td><p><span class="term"><em class="parameter"><code>uri_string</code></em> :</span></p></td>
 
262
<td>a URI
 
263
</td>
 
264
</tr>
 
265
<tr>
 
266
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
 
267
<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>.
 
268
</td>
 
269
</tr>
 
270
</tbody>
 
271
</table></div>
 
272
</div>
 
273
<hr>
 
274
<div class="refsect2" title="soup_uri_to_string ()">
 
275
<a name="soup-uri-to-string"></a><h3>soup_uri_to_string ()</h3>
 
276
<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>,
 
277
                                                         <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>
 
278
<p>
 
279
Returns a string representing <em class="parameter"><code>uri</code></em>.
 
280
</p>
 
281
<p>
 
282
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
 
283
together. That is, it constructs the string that would be needed in
 
284
the Request-Line of an HTTP request for <em class="parameter"><code>uri</code></em>.
 
285
</p>
 
286
<div class="variablelist"><table border="0">
 
287
<col align="left" valign="top">
 
288
<tbody>
 
289
<tr>
 
290
<td><p><span class="term"><em class="parameter"><code>uri</code></em> :</span></p></td>
 
291
<td>a <a class="link" href="libsoup-2.4-SoupURI.html#SoupURI" title="SoupURI"><span class="type">SoupURI</span></a>
 
292
</td>
 
293
</tr>
 
294
<tr>
 
295
<td><p><span class="term"><em class="parameter"><code>just_path_and_query</code></em> :</span></p></td>
 
296
<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
 
297
</td>
 
298
</tr>
 
299
<tr>
 
300
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
 
301
<td> a string representing <em class="parameter"><code>uri</code></em>, which the caller must free.
 
302
</td>
 
303
</tr>
 
304
</tbody>
 
305
</table></div>
 
306
</div>
 
307
<hr>
 
308
<div class="refsect2" title="soup_uri_copy ()">
 
309
<a name="soup-uri-copy"></a><h3>soup_uri_copy ()</h3>
 
310
<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>
 
311
<p>
 
312
Copies <em class="parameter"><code>uri</code></em>
 
313
</p>
 
314
<div class="variablelist"><table border="0">
 
315
<col align="left" valign="top">
 
316
<tbody>
 
317
<tr>
 
318
<td><p><span class="term"><em class="parameter"><code>uri</code></em> :</span></p></td>
 
319
<td>a <a class="link" href="libsoup-2.4-SoupURI.html#SoupURI" title="SoupURI"><span class="type">SoupURI</span></a>
 
320
</td>
 
321
</tr>
 
322
<tr>
 
323
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
 
324
<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>
 
325
</td>
 
326
</tr>
 
327
</tbody>
 
328
</table></div>
 
329
</div>
 
330
<hr>
 
331
<div class="refsect2" title="soup_uri_equal ()">
 
332
<a name="soup-uri-equal"></a><h3>soup_uri_equal ()</h3>
 
333
<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>,
 
334
                                                         <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>
 
335
<p>
 
336
Tests whether or not <em class="parameter"><code>uri1</code></em> and <em class="parameter"><code>uri2</code></em> are equal in all parts
 
337
</p>
 
338
<div class="variablelist"><table border="0">
 
339
<col align="left" valign="top">
 
340
<tbody>
 
341
<tr>
 
342
<td><p><span class="term"><em class="parameter"><code>uri1</code></em> :</span></p></td>
 
343
<td>a <a class="link" href="libsoup-2.4-SoupURI.html#SoupURI" title="SoupURI"><span class="type">SoupURI</span></a>
 
344
</td>
 
345
</tr>
 
346
<tr>
 
347
<td><p><span class="term"><em class="parameter"><code>uri2</code></em> :</span></p></td>
 
348
<td>another <a class="link" href="libsoup-2.4-SoupURI.html#SoupURI" title="SoupURI"><span class="type">SoupURI</span></a>
 
349
</td>
 
350
</tr>
 
351
<tr>
 
352
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
 
353
<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>
 
354
</td>
 
355
</tr>
 
356
</tbody>
 
357
</table></div>
 
358
</div>
 
359
<hr>
 
360
<div class="refsect2" title="soup_uri_free ()">
 
361
<a name="soup-uri-free"></a><h3>soup_uri_free ()</h3>
 
362
<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>
 
363
<p>
 
364
Frees <em class="parameter"><code>uri</code></em>.
 
365
</p>
 
366
<div class="variablelist"><table border="0">
 
367
<col align="left" valign="top">
 
368
<tbody><tr>
 
369
<td><p><span class="term"><em class="parameter"><code>uri</code></em> :</span></p></td>
 
370
<td>a <a class="link" href="libsoup-2.4-SoupURI.html#SoupURI" title="SoupURI"><span class="type">SoupURI</span></a>
 
371
</td>
 
372
</tr></tbody>
 
373
</table></div>
 
374
</div>
 
375
<hr>
 
376
<div class="refsect2" title="soup_uri_encode ()">
 
377
<a name="soup-uri-encode"></a><h3>soup_uri_encode ()</h3>
 
378
<pre class="programlisting"><span class="returnvalue">char</span> *              soup_uri_encode                     (<em class="parameter"><code>const <span class="type">char</span> *part</code></em>,
 
379
                                                         <em class="parameter"><code>const <span class="type">char</span> *escape_extra</code></em>);</pre>
 
380
<p>
 
381
This %-encodes the given URI part and returns the escaped
 
382
version in allocated memory, which the caller must free when it is
 
383
done.
 
384
</p>
 
385
<div class="variablelist"><table border="0">
 
386
<col align="left" valign="top">
 
387
<tbody>
 
388
<tr>
 
389
<td><p><span class="term"><em class="parameter"><code>part</code></em> :</span></p></td>
 
390
<td>a URI part
 
391
</td>
 
392
</tr>
 
393
<tr>
 
394
<td><p><span class="term"><em class="parameter"><code>escape_extra</code></em> :</span></p></td>
 
395
<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>)
 
396
</td>
 
397
</tr>
 
398
<tr>
 
399
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
 
400
<td> the encoded URI part
 
401
</td>
 
402
</tr>
 
403
</tbody>
 
404
</table></div>
 
405
</div>
 
406
<hr>
 
407
<div class="refsect2" title="soup_uri_decode ()">
 
408
<a name="soup-uri-decode"></a><h3>soup_uri_decode ()</h3>
 
409
<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>
 
410
<p>
 
411
Fully %-decodes <em class="parameter"><code>part</code></em>.
 
412
</p>
 
413
<div class="variablelist"><table border="0">
 
414
<col align="left" valign="top">
 
415
<tbody>
 
416
<tr>
 
417
<td><p><span class="term"><em class="parameter"><code>part</code></em> :</span></p></td>
 
418
<td>a URI part
 
419
</td>
 
420
</tr>
 
421
<tr>
 
422
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
 
423
<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
 
424
code was encountered.
 
425
</td>
 
426
</tr>
 
427
</tbody>
 
428
</table></div>
 
429
</div>
 
430
<hr>
 
431
<div class="refsect2" title="soup_uri_normalize ()">
 
432
<a name="soup-uri-normalize"></a><h3>soup_uri_normalize ()</h3>
 
433
<pre class="programlisting"><span class="returnvalue">char</span> *              soup_uri_normalize                  (<em class="parameter"><code>const <span class="type">char</span> *part</code></em>,
 
434
                                                         <em class="parameter"><code>const <span class="type">char</span> *unescape_extra</code></em>);</pre>
 
435
<p>
 
436
%-decodes any "unreserved" characters (or characters in
 
437
<em class="parameter"><code>unescape_extra</code></em>) in <em class="parameter"><code>part</code></em>.
 
438
</p>
 
439
<p>
 
440
"Unreserved" characters are those that are not allowed to be used
 
441
for punctuation according to the URI spec. For example, letters are
 
442
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
 
443
<code class="literal">http://example.com/foo/b%61r</code> into
 
444
<code class="literal">http://example.com/foo/bar</code>, which is guaranteed
 
445
to mean the same thing. However, "/" is "reserved", so
 
446
<code class="literal">http://example.com/foo%2Fbar</code> would not
 
447
be changed, because it might mean something different to the
 
448
server.
 
449
</p>
 
450
<div class="variablelist"><table border="0">
 
451
<col align="left" valign="top">
 
452
<tbody>
 
453
<tr>
 
454
<td><p><span class="term"><em class="parameter"><code>part</code></em> :</span></p></td>
 
455
<td>a URI part
 
456
</td>
 
457
</tr>
 
458
<tr>
 
459
<td><p><span class="term"><em class="parameter"><code>unescape_extra</code></em> :</span></p></td>
 
460
<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>)
 
461
</td>
 
462
</tr>
 
463
<tr>
 
464
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
 
465
<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
 
466
code was encountered.
 
467
</td>
 
468
</tr>
 
469
</tbody>
 
470
</table></div>
 
471
</div>
 
472
<hr>
 
473
<div class="refsect2" title="SOUP_URI_SCHEME_HTTP">
 
474
<a name="SOUP-URI-SCHEME-HTTP:CAPS"></a><h3>SOUP_URI_SCHEME_HTTP</h3>
 
475
<pre class="programlisting">#define SOUP_URI_SCHEME_HTTP  _SOUP_ATOMIC_INTERN_STRING (_SOUP_URI_SCHEME_HTTP, "http")
 
476
</pre>
 
477
<p>
 
478
"http" as an interned string. This can be compared directly against
 
479
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>
 
480
</p>
 
481
</div>
 
482
<hr>
 
483
<div class="refsect2" title="SOUP_URI_SCHEME_HTTPS">
 
484
<a name="SOUP-URI-SCHEME-HTTPS:CAPS"></a><h3>SOUP_URI_SCHEME_HTTPS</h3>
 
485
<pre class="programlisting">#define SOUP_URI_SCHEME_HTTPS _SOUP_ATOMIC_INTERN_STRING (_SOUP_URI_SCHEME_HTTPS, "https")
 
486
</pre>
 
487
<p>
 
488
"https" as an interned string. This can be compared directly
 
489
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>
 
490
</p>
 
491
</div>
 
492
<hr>
 
493
<div class="refsect2" title="soup_uri_uses_default_port ()">
 
494
<a name="soup-uri-uses-default-port"></a><h3>soup_uri_uses_default_port ()</h3>
 
495
<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>
 
496
<p>
 
497
Tests if <em class="parameter"><code>uri</code></em> uses the default port for its scheme. (Eg, 80 for
 
498
http.) (This only works for http and https; libsoup does not know
 
499
the default ports of other protocols.)
 
500
</p>
 
501
<div class="variablelist"><table border="0">
 
502
<col align="left" valign="top">
 
503
<tbody>
 
504
<tr>
 
505
<td><p><span class="term"><em class="parameter"><code>uri</code></em> :</span></p></td>
 
506
<td>a <a class="link" href="libsoup-2.4-SoupURI.html#SoupURI" title="SoupURI"><span class="type">SoupURI</span></a>
 
507
</td>
 
508
</tr>
 
509
<tr>
 
510
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
 
511
<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>
 
512
</td>
 
513
</tr>
 
514
</tbody>
 
515
</table></div>
 
516
</div>
 
517
<hr>
 
518
<div class="refsect2" title="SOUP_URI_VALID_FOR_HTTP()">
 
519
<a name="SOUP-URI-VALID-FOR-HTTP:CAPS"></a><h3>SOUP_URI_VALID_FOR_HTTP()</h3>
 
520
<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)
 
521
</pre>
 
522
<p>
 
523
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
 
524
it can be used to construct a <a class="link" href="SoupMessage.html" title="SoupMessage"><span class="type">SoupMessage</span></a>.
 
525
</p>
 
526
<div class="variablelist"><table border="0">
 
527
<col align="left" valign="top">
 
528
<tbody>
 
529
<tr>
 
530
<td><p><span class="term"><em class="parameter"><code>uri</code></em> :</span></p></td>
 
531
<td>a <a class="link" href="libsoup-2.4-SoupURI.html#SoupURI" title="SoupURI"><span class="type">SoupURI</span></a>
 
532
</td>
 
533
</tr>
 
534
<tr>
 
535
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
 
536
<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.
 
537
 
 
538
</td>
 
539
</tr>
 
540
</tbody>
 
541
</table></div>
 
542
<p class="since">Since 2.24</p>
 
543
</div>
 
544
<hr>
 
545
<div class="refsect2" title="soup_uri_set_scheme ()">
 
546
<a name="soup-uri-set-scheme"></a><h3>soup_uri_set_scheme ()</h3>
 
547
<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>,
 
548
                                                         <em class="parameter"><code>const <span class="type">char</span> *scheme</code></em>);</pre>
 
549
<p>
 
550
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
 
551
the default port for <em class="parameter"><code>scheme</code></em>, if known.
 
552
</p>
 
553
<div class="variablelist"><table border="0">
 
554
<col align="left" valign="top">
 
555
<tbody>
 
556
<tr>
 
557
<td><p><span class="term"><em class="parameter"><code>uri</code></em> :</span></p></td>
 
558
<td>a <a class="link" href="libsoup-2.4-SoupURI.html#SoupURI" title="SoupURI"><span class="type">SoupURI</span></a>
 
559
</td>
 
560
</tr>
 
561
<tr>
 
562
<td><p><span class="term"><em class="parameter"><code>scheme</code></em> :</span></p></td>
 
563
<td>the URI scheme
 
564
</td>
 
565
</tr>
 
566
</tbody>
 
567
</table></div>
 
568
</div>
 
569
<hr>
 
570
<div class="refsect2" title="soup_uri_set_user ()">
 
571
<a name="soup-uri-set-user"></a><h3>soup_uri_set_user ()</h3>
 
572
<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>,
 
573
                                                         <em class="parameter"><code>const <span class="type">char</span> *user</code></em>);</pre>
 
574
<p>
 
575
Sets <em class="parameter"><code>uri</code></em>'s user to <em class="parameter"><code>user</code></em>.
 
576
</p>
 
577
<div class="variablelist"><table border="0">
 
578
<col align="left" valign="top">
 
579
<tbody>
 
580
<tr>
 
581
<td><p><span class="term"><em class="parameter"><code>uri</code></em> :</span></p></td>
 
582
<td>a <a class="link" href="libsoup-2.4-SoupURI.html#SoupURI" title="SoupURI"><span class="type">SoupURI</span></a>
 
583
</td>
 
584
</tr>
 
585
<tr>
 
586
<td><p><span class="term"><em class="parameter"><code>user</code></em> :</span></p></td>
 
587
<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>
 
588
</td>
 
589
</tr>
 
590
</tbody>
 
591
</table></div>
 
592
</div>
 
593
<hr>
 
594
<div class="refsect2" title="soup_uri_set_password ()">
 
595
<a name="soup-uri-set-password"></a><h3>soup_uri_set_password ()</h3>
 
596
<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>,
 
597
                                                         <em class="parameter"><code>const <span class="type">char</span> *password</code></em>);</pre>
 
598
<p>
 
599
Sets <em class="parameter"><code>uri</code></em>'s password to <em class="parameter"><code>password</code></em>.
 
600
</p>
 
601
<div class="variablelist"><table border="0">
 
602
<col align="left" valign="top">
 
603
<tbody>
 
604
<tr>
 
605
<td><p><span class="term"><em class="parameter"><code>uri</code></em> :</span></p></td>
 
606
<td>a <a class="link" href="libsoup-2.4-SoupURI.html#SoupURI" title="SoupURI"><span class="type">SoupURI</span></a>
 
607
</td>
 
608
</tr>
 
609
<tr>
 
610
<td><p><span class="term"><em class="parameter"><code>password</code></em> :</span></p></td>
 
611
<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>
 
612
</td>
 
613
</tr>
 
614
</tbody>
 
615
</table></div>
 
616
</div>
 
617
<hr>
 
618
<div class="refsect2" title="soup_uri_set_host ()">
 
619
<a name="soup-uri-set-host"></a><h3>soup_uri_set_host ()</h3>
 
620
<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>,
 
621
                                                         <em class="parameter"><code>const <span class="type">char</span> *host</code></em>);</pre>
 
622
<p>
 
623
Sets <em class="parameter"><code>uri</code></em>'s host to <em class="parameter"><code>host</code></em>.
 
624
</p>
 
625
<p>
 
626
If <em class="parameter"><code>host</code></em> is an IPv6 IP address, it should not include the brackets
 
627
required by the URI syntax; they will be added automatically when
 
628
converting <em class="parameter"><code>uri</code></em> to a string.
 
629
</p>
 
630
<div class="variablelist"><table border="0">
 
631
<col align="left" valign="top">
 
632
<tbody>
 
633
<tr>
 
634
<td><p><span class="term"><em class="parameter"><code>uri</code></em> :</span></p></td>
 
635
<td>a <a class="link" href="libsoup-2.4-SoupURI.html#SoupURI" title="SoupURI"><span class="type">SoupURI</span></a>
 
636
</td>
 
637
</tr>
 
638
<tr>
 
639
<td><p><span class="term"><em class="parameter"><code>host</code></em> :</span></p></td>
 
640
<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>
 
641
</td>
 
642
</tr>
 
643
</tbody>
 
644
</table></div>
 
645
</div>
 
646
<hr>
 
647
<div class="refsect2" title="soup_uri_set_port ()">
 
648
<a name="soup-uri-set-port"></a><h3>soup_uri_set_port ()</h3>
 
649
<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>,
 
650
                                                         <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>
 
651
<p>
 
652
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
 
653
explicitly-specified port.
 
654
</p>
 
655
<div class="variablelist"><table border="0">
 
656
<col align="left" valign="top">
 
657
<tbody>
 
658
<tr>
 
659
<td><p><span class="term"><em class="parameter"><code>uri</code></em> :</span></p></td>
 
660
<td>a <a class="link" href="libsoup-2.4-SoupURI.html#SoupURI" title="SoupURI"><span class="type">SoupURI</span></a>
 
661
</td>
 
662
</tr>
 
663
<tr>
 
664
<td><p><span class="term"><em class="parameter"><code>port</code></em> :</span></p></td>
 
665
<td>the port, or 0
 
666
</td>
 
667
</tr>
 
668
</tbody>
 
669
</table></div>
 
670
</div>
 
671
<hr>
 
672
<div class="refsect2" title="soup_uri_set_path ()">
 
673
<a name="soup-uri-set-path"></a><h3>soup_uri_set_path ()</h3>
 
674
<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>,
 
675
                                                         <em class="parameter"><code>const <span class="type">char</span> *path</code></em>);</pre>
 
676
<p>
 
677
Sets <em class="parameter"><code>uri</code></em>'s path to <em class="parameter"><code>path</code></em>.
 
678
</p>
 
679
<div class="variablelist"><table border="0">
 
680
<col align="left" valign="top">
 
681
<tbody>
 
682
<tr>
 
683
<td><p><span class="term"><em class="parameter"><code>uri</code></em> :</span></p></td>
 
684
<td>a <a class="link" href="libsoup-2.4-SoupURI.html#SoupURI" title="SoupURI"><span class="type">SoupURI</span></a>
 
685
</td>
 
686
</tr>
 
687
<tr>
 
688
<td><p><span class="term"><em class="parameter"><code>path</code></em> :</span></p></td>
 
689
<td>the path
 
690
</td>
 
691
</tr>
 
692
</tbody>
 
693
</table></div>
 
694
</div>
 
695
<hr>
 
696
<div class="refsect2" title="soup_uri_set_query ()">
 
697
<a name="soup-uri-set-query"></a><h3>soup_uri_set_query ()</h3>
 
698
<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>,
 
699
                                                         <em class="parameter"><code>const <span class="type">char</span> *query</code></em>);</pre>
 
700
<p>
 
701
Sets <em class="parameter"><code>uri</code></em>'s query to <em class="parameter"><code>query</code></em>.
 
702
</p>
 
703
<div class="variablelist"><table border="0">
 
704
<col align="left" valign="top">
 
705
<tbody>
 
706
<tr>
 
707
<td><p><span class="term"><em class="parameter"><code>uri</code></em> :</span></p></td>
 
708
<td>a <a class="link" href="libsoup-2.4-SoupURI.html#SoupURI" title="SoupURI"><span class="type">SoupURI</span></a>
 
709
</td>
 
710
</tr>
 
711
<tr>
 
712
<td><p><span class="term"><em class="parameter"><code>query</code></em> :</span></p></td>
 
713
<td>the query
 
714
</td>
 
715
</tr>
 
716
</tbody>
 
717
</table></div>
 
718
</div>
 
719
<hr>
 
720
<div class="refsect2" title="soup_uri_set_query_from_form ()">
 
721
<a name="soup-uri-set-query-from-form"></a><h3>soup_uri_set_query_from_form ()</h3>
 
722
<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>,
 
723
                                                         <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>
 
724
<p>
 
725
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
 
726
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.
 
727
</p>
 
728
<div class="variablelist"><table border="0">
 
729
<col align="left" valign="top">
 
730
<tbody>
 
731
<tr>
 
732
<td><p><span class="term"><em class="parameter"><code>uri</code></em> :</span></p></td>
 
733
<td>a <a class="link" href="libsoup-2.4-SoupURI.html#SoupURI" title="SoupURI"><span class="type">SoupURI</span></a>
 
734
</td>
 
735
</tr>
 
736
<tr>
 
737
<td><p><span class="term"><em class="parameter"><code>form</code></em> :</span></p></td>
 
738
<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
 
739
</td>
 
740
</tr>
 
741
</tbody>
 
742
</table></div>
 
743
</div>
 
744
<hr>
 
745
<div class="refsect2" title="soup_uri_set_query_from_fields ()">
 
746
<a name="soup-uri-set-query-from-fields"></a><h3>soup_uri_set_query_from_fields ()</h3>
 
747
<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>,
 
748
                                                         <em class="parameter"><code>const <span class="type">char</span> *first_field</code></em>,
 
749
                                                         <em class="parameter"><code>...</code></em>);</pre>
 
750
<p>
 
751
Sets <em class="parameter"><code>uri</code></em>'s query to the result of encoding the given form fields
 
752
and values according to the * HTML form rules. See
 
753
<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.
 
754
</p>
 
755
<div class="variablelist"><table border="0">
 
756
<col align="left" valign="top">
 
757
<tbody>
 
758
<tr>
 
759
<td><p><span class="term"><em class="parameter"><code>uri</code></em> :</span></p></td>
 
760
<td>a <a class="link" href="libsoup-2.4-SoupURI.html#SoupURI" title="SoupURI"><span class="type">SoupURI</span></a>
 
761
</td>
 
762
</tr>
 
763
<tr>
 
764
<td><p><span class="term"><em class="parameter"><code>first_field</code></em> :</span></p></td>
 
765
<td>name of the first form field to encode into query
 
766
</td>
 
767
</tr>
 
768
<tr>
 
769
<td><p><span class="term"><em class="parameter"><code>...</code></em> :</span></p></td>
 
770
<td>value of <em class="parameter"><code>first_field</code></em>, followed by additional field names
 
771
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>.
 
772
</td>
 
773
</tr>
 
774
</tbody>
 
775
</table></div>
 
776
</div>
 
777
<hr>
 
778
<div class="refsect2" title="soup_uri_set_fragment ()">
 
779
<a name="soup-uri-set-fragment"></a><h3>soup_uri_set_fragment ()</h3>
 
780
<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>,
 
781
                                                         <em class="parameter"><code>const <span class="type">char</span> *fragment</code></em>);</pre>
 
782
<p>
 
783
Sets <em class="parameter"><code>uri</code></em>'s fragment to <em class="parameter"><code>fragment</code></em>.
 
784
</p>
 
785
<div class="variablelist"><table border="0">
 
786
<col align="left" valign="top">
 
787
<tbody>
 
788
<tr>
 
789
<td><p><span class="term"><em class="parameter"><code>uri</code></em> :</span></p></td>
 
790
<td>a <a class="link" href="libsoup-2.4-SoupURI.html#SoupURI" title="SoupURI"><span class="type">SoupURI</span></a>
 
791
</td>
 
792
</tr>
 
793
<tr>
 
794
<td><p><span class="term"><em class="parameter"><code>fragment</code></em> :</span></p></td>
 
795
<td>the fragment
 
796
</td>
 
797
</tr>
 
798
</tbody>
 
799
</table></div>
 
800
</div>
 
801
</div>
 
802
</div>
 
803
<div class="footer">
 
804
<hr>
 
805
          Generated by GTK-Doc V1.14</div>
 
806
</body>
 
807
</html>
 
 
b'\\ No newline at end of file'