HEX
Server: nginx/1.16.1
System: Linux ecs-04358622 4.19.90-2107.6.0.0100.oe1.bclinux.x86_64 #1 SMP Wed Dec 1 19:59:44 CST 2021 x86_64
User: nginx (994)
PHP: 8.0.0
Disabled: NONE
Upload Files
File: //usr/share/gtk-doc/html/glib/glib-URI-Functions.html
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>URI Functions: GLib Reference Manual</title>
<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot">
<link rel="home" href="index.html" title="GLib Reference Manual">
<link rel="up" href="glib-utilities.html" title="GLib Utilities">
<link rel="prev" href="glib-File-Utilities.html" title="File Utilities">
<link rel="next" href="glib-Hostname-Utilities.html" title="Hostname Utilities">
<meta name="generator" content="GTK-Doc V1.33.1 (XML mode)">
<link rel="stylesheet" href="style.css" type="text/css">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="5"><tr valign="middle">
<td width="100%" align="left" class="shortcuts">
<a href="#" class="shortcut">Top</a><span id="nav_description">  <span class="dim">|</span> 
                  <a href="#glib-URI-Functions.description" class="shortcut">Description</a></span>
</td>
<td><a accesskey="h" href="index.html"><img src="home.png" width="16" height="16" border="0" alt="Home"></a></td>
<td><a accesskey="u" href="glib-utilities.html"><img src="up.png" width="16" height="16" border="0" alt="Up"></a></td>
<td><a accesskey="p" href="glib-File-Utilities.html"><img src="left.png" width="16" height="16" border="0" alt="Prev"></a></td>
<td><a accesskey="n" href="glib-Hostname-Utilities.html"><img src="right.png" width="16" height="16" border="0" alt="Next"></a></td>
</tr></table>
<div class="refentry">
<a name="glib-URI-Functions"></a><div class="titlepage"></div>
<div class="refnamediv"><table width="100%"><tr>
<td valign="top">
<h2><span class="refentrytitle"><a name="glib-URI-Functions.top_of_page"></a>URI Functions</span></h2>
<p>URI Functions — URI-handling utilities</p>
</td>
<td class="gallery_image" valign="top" align="right"></td>
</tr></table></div>
<div class="refsect1">
<a name="glib-URI-Functions.functions"></a><h2>Functions</h2>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="functions_proto_type">
<col class="functions_proto_name">
</colgroup>
<tbody>
<tr>
<td class="function_type">
<a class="link" href="glib-URI-Functions.html#GUri" title="GUri"><span class="returnvalue">GUri</span></a> *
</td>
<td class="function_name">
<a class="link" href="glib-URI-Functions.html#g-uri-ref" title="g_uri_ref ()">g_uri_ref</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">void</span>
</td>
<td class="function_name">
<a class="link" href="glib-URI-Functions.html#g-uri-unref" title="g_uri_unref ()">g_uri_unref</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a class="link" href="glib-Basic-Types.html#gboolean" title="gboolean"><span class="returnvalue">gboolean</span></a>
</td>
<td class="function_name">
<a class="link" href="glib-URI-Functions.html#g-uri-split" title="g_uri_split ()">g_uri_split</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a class="link" href="glib-Basic-Types.html#gboolean" title="gboolean"><span class="returnvalue">gboolean</span></a>
</td>
<td class="function_name">
<a class="link" href="glib-URI-Functions.html#g-uri-split-with-user" title="g_uri_split_with_user ()">g_uri_split_with_user</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a class="link" href="glib-Basic-Types.html#gboolean" title="gboolean"><span class="returnvalue">gboolean</span></a>
</td>
<td class="function_name">
<a class="link" href="glib-URI-Functions.html#g-uri-split-network" title="g_uri_split_network ()">g_uri_split_network</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a class="link" href="glib-Basic-Types.html#gboolean" title="gboolean"><span class="returnvalue">gboolean</span></a>
</td>
<td class="function_name">
<a class="link" href="glib-URI-Functions.html#g-uri-is-valid" title="g_uri_is_valid ()">g_uri_is_valid</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="returnvalue">gchar</span></a> *
</td>
<td class="function_name">
<a class="link" href="glib-URI-Functions.html#g-uri-join" title="g_uri_join ()">g_uri_join</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="returnvalue">gchar</span></a> *
</td>
<td class="function_name">
<a class="link" href="glib-URI-Functions.html#g-uri-join-with-user" title="g_uri_join_with_user ()">g_uri_join_with_user</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a class="link" href="glib-URI-Functions.html#GUri" title="GUri"><span class="returnvalue">GUri</span></a> *
</td>
<td class="function_name">
<a class="link" href="glib-URI-Functions.html#g-uri-parse" title="g_uri_parse ()">g_uri_parse</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a class="link" href="glib-URI-Functions.html#GUri" title="GUri"><span class="returnvalue">GUri</span></a> *
</td>
<td class="function_name">
<a class="link" href="glib-URI-Functions.html#g-uri-parse-relative" title="g_uri_parse_relative ()">g_uri_parse_relative</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="returnvalue">gchar</span></a> *
</td>
<td class="function_name">
<a class="link" href="glib-URI-Functions.html#g-uri-resolve-relative" title="g_uri_resolve_relative ()">g_uri_resolve_relative</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a class="link" href="glib-URI-Functions.html#GUri" title="GUri"><span class="returnvalue">GUri</span></a> *
</td>
<td class="function_name">
<a class="link" href="glib-URI-Functions.html#g-uri-build" title="g_uri_build ()">g_uri_build</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a class="link" href="glib-URI-Functions.html#GUri" title="GUri"><span class="returnvalue">GUri</span></a> *
</td>
<td class="function_name">
<a class="link" href="glib-URI-Functions.html#g-uri-build-with-user" title="g_uri_build_with_user ()">g_uri_build_with_user</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">const <span class="returnvalue">char</span> *
</td>
<td class="function_name">
<a class="link" href="glib-URI-Functions.html#g-uri-peek-scheme" title="g_uri_peek_scheme ()">g_uri_peek_scheme</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">char</span> *
</td>
<td class="function_name">
<a class="link" href="glib-URI-Functions.html#g-uri-parse-scheme" title="g_uri_parse_scheme ()">g_uri_parse_scheme</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">char</span> *
</td>
<td class="function_name">
<a class="link" href="glib-URI-Functions.html#g-uri-to-string" title="g_uri_to_string ()">g_uri_to_string</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">char</span> *
</td>
<td class="function_name">
<a class="link" href="glib-URI-Functions.html#g-uri-to-string-partial" title="g_uri_to_string_partial ()">g_uri_to_string_partial</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="returnvalue">gchar</span></a> *
</td>
<td class="function_name">
<a class="link" href="glib-URI-Functions.html#g-uri-get-scheme" title="g_uri_get_scheme ()">g_uri_get_scheme</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="returnvalue">gchar</span></a> *
</td>
<td class="function_name">
<a class="link" href="glib-URI-Functions.html#g-uri-get-userinfo" title="g_uri_get_userinfo ()">g_uri_get_userinfo</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="returnvalue">gchar</span></a> *
</td>
<td class="function_name">
<a class="link" href="glib-URI-Functions.html#g-uri-get-user" title="g_uri_get_user ()">g_uri_get_user</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="returnvalue">gchar</span></a> *
</td>
<td class="function_name">
<a class="link" href="glib-URI-Functions.html#g-uri-get-password" title="g_uri_get_password ()">g_uri_get_password</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="returnvalue">gchar</span></a> *
</td>
<td class="function_name">
<a class="link" href="glib-URI-Functions.html#g-uri-get-auth-params" title="g_uri_get_auth_params ()">g_uri_get_auth_params</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="returnvalue">gchar</span></a> *
</td>
<td class="function_name">
<a class="link" href="glib-URI-Functions.html#g-uri-get-host" title="g_uri_get_host ()">g_uri_get_host</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a class="link" href="glib-Basic-Types.html#gint" title="gint"><span class="returnvalue">gint</span></a>
</td>
<td class="function_name">
<a class="link" href="glib-URI-Functions.html#g-uri-get-port" title="g_uri_get_port ()">g_uri_get_port</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="returnvalue">gchar</span></a> *
</td>
<td class="function_name">
<a class="link" href="glib-URI-Functions.html#g-uri-get-path" title="g_uri_get_path ()">g_uri_get_path</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="returnvalue">gchar</span></a> *
</td>
<td class="function_name">
<a class="link" href="glib-URI-Functions.html#g-uri-get-query" title="g_uri_get_query ()">g_uri_get_query</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="returnvalue">gchar</span></a> *
</td>
<td class="function_name">
<a class="link" href="glib-URI-Functions.html#g-uri-get-fragment" title="g_uri_get_fragment ()">g_uri_get_fragment</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a class="link" href="glib-URI-Functions.html#GUriFlags" title="enum GUriFlags"><span class="returnvalue">GUriFlags</span></a>
</td>
<td class="function_name">
<a class="link" href="glib-URI-Functions.html#g-uri-get-flags" title="g_uri_get_flags ()">g_uri_get_flags</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">void</span>
</td>
<td class="function_name">
<a class="link" href="glib-URI-Functions.html#g-uri-params-iter-init" title="g_uri_params_iter_init ()">g_uri_params_iter_init</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a class="link" href="glib-Basic-Types.html#gboolean" title="gboolean"><span class="returnvalue">gboolean</span></a>
</td>
<td class="function_name">
<a class="link" href="glib-URI-Functions.html#g-uri-params-iter-next" title="g_uri_params_iter_next ()">g_uri_params_iter_next</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a class="link" href="glib-Hash-Tables.html#GHashTable" title="GHashTable"><span class="returnvalue">GHashTable</span></a> *
</td>
<td class="function_name">
<a class="link" href="glib-URI-Functions.html#g-uri-parse-params" title="g_uri_parse_params ()">g_uri_parse_params</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">char</span> *
</td>
<td class="function_name">
<a class="link" href="glib-URI-Functions.html#g-uri-escape-string" title="g_uri_escape_string ()">g_uri_escape_string</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">char</span> *
</td>
<td class="function_name">
<a class="link" href="glib-URI-Functions.html#g-uri-unescape-string" title="g_uri_unescape_string ()">g_uri_unescape_string</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">char</span> *
</td>
<td class="function_name">
<a class="link" href="glib-URI-Functions.html#g-uri-escape-bytes" title="g_uri_escape_bytes ()">g_uri_escape_bytes</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a class="link" href="glib-Byte-Arrays.html#GBytes" title="GBytes"><span class="returnvalue">GBytes</span></a> *
</td>
<td class="function_name">
<a class="link" href="glib-URI-Functions.html#g-uri-unescape-bytes" title="g_uri_unescape_bytes ()">g_uri_unescape_bytes</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">char</span> *
</td>
<td class="function_name">
<a class="link" href="glib-URI-Functions.html#g-uri-unescape-segment" title="g_uri_unescape_segment ()">g_uri_unescape_segment</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="returnvalue">gchar</span></a> **
</td>
<td class="function_name">
<a class="link" href="glib-URI-Functions.html#g-uri-list-extract-uris" title="g_uri_list_extract_uris ()">g_uri_list_extract_uris</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="returnvalue">gchar</span></a> *
</td>
<td class="function_name">
<a class="link" href="glib-URI-Functions.html#g-filename-from-uri" title="g_filename_from_uri ()">g_filename_from_uri</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="returnvalue">gchar</span></a> *
</td>
<td class="function_name">
<a class="link" href="glib-URI-Functions.html#g-filename-to-uri" title="g_filename_to_uri ()">g_filename_to_uri</a> <span class="c_punctuation">()</span>
</td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect1">
<a name="glib-URI-Functions.other"></a><h2>Types and Values</h2>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="other_proto_type">
<col class="other_proto_name">
</colgroup>
<tbody>
<tr>
<td class="datatype_keyword"> </td>
<td class="function_name"><a class="link" href="glib-URI-Functions.html#GUri" title="GUri">GUri</a></td>
</tr>
<tr>
<td class="datatype_keyword">enum</td>
<td class="function_name"><a class="link" href="glib-URI-Functions.html#GUriFlags" title="enum GUriFlags">GUriFlags</a></td>
</tr>
<tr>
<td class="datatype_keyword">enum</td>
<td class="function_name"><a class="link" href="glib-URI-Functions.html#GUriHideFlags" title="enum GUriHideFlags">GUriHideFlags</a></td>
</tr>
<tr>
<td class="datatype_keyword">struct</td>
<td class="function_name"><a class="link" href="glib-URI-Functions.html#GUriParamsIter" title="struct GUriParamsIter">GUriParamsIter</a></td>
</tr>
<tr>
<td class="datatype_keyword">enum</td>
<td class="function_name"><a class="link" href="glib-URI-Functions.html#GUriParamsFlags" title="enum GUriParamsFlags">GUriParamsFlags</a></td>
</tr>
<tr>
<td class="define_keyword">#define</td>
<td class="function_name"><a class="link" href="glib-URI-Functions.html#G-URI-RESERVED-CHARS-ALLOWED-IN-PATH:CAPS" title="G_URI_RESERVED_CHARS_ALLOWED_IN_PATH">G_URI_RESERVED_CHARS_ALLOWED_IN_PATH</a></td>
</tr>
<tr>
<td class="define_keyword">#define</td>
<td class="function_name"><a class="link" href="glib-URI-Functions.html#G-URI-RESERVED-CHARS-ALLOWED-IN-PATH-ELEMENT:CAPS" title="G_URI_RESERVED_CHARS_ALLOWED_IN_PATH_ELEMENT">G_URI_RESERVED_CHARS_ALLOWED_IN_PATH_ELEMENT</a></td>
</tr>
<tr>
<td class="define_keyword">#define</td>
<td class="function_name"><a class="link" href="glib-URI-Functions.html#G-URI-RESERVED-CHARS-ALLOWED-IN-USERINFO:CAPS" title="G_URI_RESERVED_CHARS_ALLOWED_IN_USERINFO">G_URI_RESERVED_CHARS_ALLOWED_IN_USERINFO</a></td>
</tr>
<tr>
<td class="define_keyword">#define</td>
<td class="function_name"><a class="link" href="glib-URI-Functions.html#G-URI-RESERVED-CHARS-GENERIC-DELIMITERS:CAPS" title="G_URI_RESERVED_CHARS_GENERIC_DELIMITERS">G_URI_RESERVED_CHARS_GENERIC_DELIMITERS</a></td>
</tr>
<tr>
<td class="define_keyword">#define</td>
<td class="function_name"><a class="link" href="glib-URI-Functions.html#G-URI-RESERVED-CHARS-SUBCOMPONENT-DELIMITERS:CAPS" title="G_URI_RESERVED_CHARS_SUBCOMPONENT_DELIMITERS">G_URI_RESERVED_CHARS_SUBCOMPONENT_DELIMITERS</a></td>
</tr>
<tr>
<td class="define_keyword">#define</td>
<td class="function_name"><a class="link" href="glib-URI-Functions.html#G-URI-ERROR:CAPS" title="G_URI_ERROR">G_URI_ERROR</a></td>
</tr>
<tr>
<td class="datatype_keyword">enum</td>
<td class="function_name"><a class="link" href="glib-URI-Functions.html#GUriError" title="enum GUriError">GUriError</a></td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect1">
<a name="glib-URI-Functions.includes"></a><h2>Includes</h2>
<pre class="synopsis">#include &lt;glib.h&gt;
</pre>
</div>
<div class="refsect1">
<a name="glib-URI-Functions.description"></a><h2>Description</h2>
<p>The <a class="link" href="glib-URI-Functions.html#GUri" title="GUri"><span class="type">GUri</span></a> type and related functions can be used to parse URIs into
their components, and build valid URIs from individual components.</p>
<p>Note that <a class="link" href="glib-URI-Functions.html#GUri" title="GUri"><span class="type">GUri</span></a> scope is to help manipulate URIs in various applications,
following <a class="ulink" href="https://tools.ietf.org/html/rfc3986" target="_top">RFC 3986</a>. In particular,
it doesn't intend to cover web browser needs, and doesn't implement the
<a class="ulink" href="https://url.spec.whatwg.org/" target="_top">WHATWG URL</a> standard. No APIs are provided to
help prevent
<a class="ulink" href="https://en.wikipedia.org/wiki/IDN_homograph_attack" target="_top">homograph attacks</a>, so
<a class="link" href="glib-URI-Functions.html#GUri" title="GUri"><span class="type">GUri</span></a> is not suitable for formatting URIs for display to the user for making
security-sensitive decisions.</p>
<div class="refsect3">
<a name="relative-absolute-uris"></a><h4>Relative and absolute URIs</h4>
<p>As defined in <a class="ulink" href="https://tools.ietf.org/html/rfc3986#section-4" target="_top">RFC 3986</a>, the
hierarchical nature of URIs means that they can either be ‘relative
references’ (sometimes referred to as ‘relative URIs’) or ‘URIs’ (for
clarity, ‘URIs’ are referred to in this documentation as
‘absolute URIs’ — although
<a class="ulink" href="https://tools.ietf.org/html/rfc3986#section-4.3" target="_top">in constrast to RFC 3986</a>,
fragment identifiers are always allowed).</p>
<p>Relative references have one or more components of the URI missing. In
particular, they have no scheme. Any other component, such as hostname,
query, etc. may be missing, apart from a path, which has to be specified (but
may be empty). The path may be relative, starting with <code class="literal">./</code> rather than <code class="literal">/</code>.</p>
<p>For example, a valid relative reference is <code class="literal">./path?query</code>,
<code class="literal">/?query#fragment</code> or <code class="literal">//example.com</code>.</p>
<p>Absolute URIs have a scheme specified. Any other components of the URI which
are missing are specified as explicitly unset in the URI, rather than being
resolved relative to a base URI using <a class="link" href="glib-URI-Functions.html#g-uri-parse-relative" title="g_uri_parse_relative ()"><code class="function">g_uri_parse_relative()</code></a>.</p>
<p>For example, a valid absolute URI is <code class="literal">file:///home/bob</code> or
<code class="literal">https://search.com?query=string</code>.</p>
<p>A <a class="link" href="glib-URI-Functions.html#GUri" title="GUri"><span class="type">GUri</span></a> instance is always an absolute URI. A string may be an absolute URI
or a relative reference; see the documentation for individual functions as to
what forms they accept.</p>
</div>
<div class="refsect3">
<a name="id-1.5.19.6.5"></a><h4>Parsing URIs</h4>
<p>The most minimalist APIs for parsing URIs are <a class="link" href="glib-URI-Functions.html#g-uri-split" title="g_uri_split ()"><code class="function">g_uri_split()</code></a> and
<a class="link" href="glib-URI-Functions.html#g-uri-split-with-user" title="g_uri_split_with_user ()"><code class="function">g_uri_split_with_user()</code></a>. These split a URI into its component
parts, and return the parts; the difference between the two is that
<a class="link" href="glib-URI-Functions.html#g-uri-split" title="g_uri_split ()"><code class="function">g_uri_split()</code></a> treats the ‘userinfo’ component of the URI as a
single element, while <a class="link" href="glib-URI-Functions.html#g-uri-split-with-user" title="g_uri_split_with_user ()"><code class="function">g_uri_split_with_user()</code></a> can (depending on the
<a class="link" href="glib-URI-Functions.html#GUriFlags" title="enum GUriFlags"><span class="type">GUriFlags</span></a> you pass) treat it as containing a username, password,
and authentication parameters. Alternatively, <a class="link" href="glib-URI-Functions.html#g-uri-split-network" title="g_uri_split_network ()"><code class="function">g_uri_split_network()</code></a>
can be used when you are only interested in the components that are
needed to initiate a network connection to the service (scheme,
host, and port).</p>
<p>g_uri_parse() is similar to <a class="link" href="glib-URI-Functions.html#g-uri-split" title="g_uri_split ()"><code class="function">g_uri_split()</code></a>, but instead of returning
individual strings, it returns a <a class="link" href="glib-URI-Functions.html#GUri" title="GUri"><span class="type">GUri</span></a> structure (and it requires
that the URI be an absolute URI).</p>
<p>g_uri_resolve_relative() and <a class="link" href="glib-URI-Functions.html#g-uri-parse-relative" title="g_uri_parse_relative ()"><code class="function">g_uri_parse_relative()</code></a> allow you to
resolve a relative URI relative to a base URI.
<a class="link" href="glib-URI-Functions.html#g-uri-resolve-relative" title="g_uri_resolve_relative ()"><code class="function">g_uri_resolve_relative()</code></a> takes two strings and returns a string,
and <a class="link" href="glib-URI-Functions.html#g-uri-parse-relative" title="g_uri_parse_relative ()"><code class="function">g_uri_parse_relative()</code></a> takes a <a class="link" href="glib-URI-Functions.html#GUri" title="GUri"><span class="type">GUri</span></a> and a string and returns a
<a class="link" href="glib-URI-Functions.html#GUri" title="GUri"><span class="type">GUri</span></a>.</p>
<p>All of the parsing functions take a <a class="link" href="glib-URI-Functions.html#GUriFlags" title="enum GUriFlags"><span class="type">GUriFlags</span></a> argument describing
exactly how to parse the URI; see the documentation for that type
for more details on the specific flags that you can pass. If you
need to choose different flags based on the type of URI, you can
use <a class="link" href="glib-URI-Functions.html#g-uri-peek-scheme" title="g_uri_peek_scheme ()"><code class="function">g_uri_peek_scheme()</code></a> on the URI string to check the scheme
first, and use that to decide what flags to parse it with.</p>
<p>For example, you might want to use <a class="link" href="glib-URI-Functions.html#G-URI-PARAMS-WWW-FORM:CAPS"><code class="literal">G_URI_PARAMS_WWW_FORM</code></a> when parsing the
params for a web URI, so compare the result of <a class="link" href="glib-URI-Functions.html#g-uri-peek-scheme" title="g_uri_peek_scheme ()"><code class="function">g_uri_peek_scheme()</code></a> against
<code class="literal">http</code> and <code class="literal">https</code>.</p>
</div>
<div class="refsect3">
<a name="id-1.5.19.6.6"></a><h4>Building URIs</h4>
<p>g_uri_join() and <a class="link" href="glib-URI-Functions.html#g-uri-join-with-user" title="g_uri_join_with_user ()"><code class="function">g_uri_join_with_user()</code></a> can be used to construct
valid URI strings from a set of component strings. They are the
inverse of <a class="link" href="glib-URI-Functions.html#g-uri-split" title="g_uri_split ()"><code class="function">g_uri_split()</code></a> and <a class="link" href="glib-URI-Functions.html#g-uri-split-with-user" title="g_uri_split_with_user ()"><code class="function">g_uri_split_with_user()</code></a>.</p>
<p>Similarly, <a class="link" href="glib-URI-Functions.html#g-uri-build" title="g_uri_build ()"><code class="function">g_uri_build()</code></a> and <a class="link" href="glib-URI-Functions.html#g-uri-build-with-user" title="g_uri_build_with_user ()"><code class="function">g_uri_build_with_user()</code></a> can be used to
construct a <a class="link" href="glib-URI-Functions.html#GUri" title="GUri"><span class="type">GUri</span></a> from a set of component strings.</p>
<p>As with the parsing functions, the building functions take a
<a class="link" href="glib-URI-Functions.html#GUriFlags" title="enum GUriFlags"><span class="type">GUriFlags</span></a> argument. In particular, it is important to keep in mind
whether the URI components you are using are already <code class="literal">%</code>-encoded. If so,
you must pass the <a class="link" href="glib-URI-Functions.html#G-URI-FLAGS-ENCODED:CAPS"><code class="literal">G_URI_FLAGS_ENCODED</code></a> flag.</p>
</div>
<div class="refsect3">
<a name="id-1.5.19.6.7"></a><h4>
<code class="literal">file://</code> URIs</h4>
<p>Note that Windows and Unix both define special rules for parsing
<code class="literal">file://</code> URIs (involving non-UTF-8 character sets on Unix, and the
interpretation of path separators on Windows). <a class="link" href="glib-URI-Functions.html#GUri" title="GUri"><span class="type">GUri</span></a> does not
implement these rules. Use <a class="link" href="glib-URI-Functions.html#g-filename-from-uri" title="g_filename_from_uri ()"><code class="function">g_filename_from_uri()</code></a> and
<a class="link" href="glib-URI-Functions.html#g-filename-to-uri" title="g_filename_to_uri ()"><code class="function">g_filename_to_uri()</code></a> if you want to properly convert between
<code class="literal">file://</code> URIs and local filenames.</p>
</div>
<div class="refsect3">
<a name="id-1.5.19.6.8"></a><h4>URI Equality</h4>
<p>Note that there is no <code class="literal"><code class="function">g_uri_equal()</code></code> function, because comparing
URIs usefully requires scheme-specific knowledge that <a class="link" href="glib-URI-Functions.html#GUri" title="GUri"><span class="type">GUri</span></a> does
not have. For example, <code class="literal">http://example.com/</code> and
<code class="literal">http://EXAMPLE.COM:80</code> have exactly the same meaning according
to the HTTP specification, and <code class="literal">data:,foo</code> and
<code class="literal">data:;base64,Zm9v</code> resolve to the same thing according to the
<code class="literal">data:</code> URI specification.</p>
</div>
</div>
<div class="refsect1">
<a name="glib-URI-Functions.functions_details"></a><h2>Functions</h2>
<div class="refsect2">
<a name="g-uri-ref"></a><h3>g_uri_ref ()</h3>
<pre class="programlisting"><a class="link" href="glib-URI-Functions.html#GUri" title="GUri"><span class="returnvalue">GUri</span></a> *
g_uri_ref (<em class="parameter"><code><a class="link" href="glib-URI-Functions.html#GUri" title="GUri"><span class="type">GUri</span></a> *uri</code></em>);</pre>
<p>Increments the reference count of <em class="parameter"><code>uri</code></em>
 by one.</p>
<p><span class="annotation">[<acronym title="Exposed in C code, not necessarily available in other languages."><span class="acronym">skip</span></acronym>]</span></p>
<div class="refsect3">
<a name="g-uri-ref.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>uri</p></td>
<td class="parameter_description"><p>a <a class="link" href="glib-URI-Functions.html#GUri" title="GUri"><span class="type">GUri</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="g-uri-ref.returns"></a><h4>Returns</h4>
<p> <em class="parameter"><code>uri</code></em>
</p>
</div>
<p class="since">Since: <a class="link" href="api-index-2-66.html#api-index-2.66">2.66</a></p>
</div>
<hr>
<div class="refsect2">
<a name="g-uri-unref"></a><h3>g_uri_unref ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
g_uri_unref (<em class="parameter"><code><a class="link" href="glib-URI-Functions.html#GUri" title="GUri"><span class="type">GUri</span></a> *uri</code></em>);</pre>
<p>Atomically decrements the reference count of <em class="parameter"><code>uri</code></em>
 by one.</p>
<p>When the reference count reaches zero, the resources allocated by
<em class="parameter"><code>uri</code></em>
 are freed</p>
<p><span class="annotation">[<acronym title="Exposed in C code, not necessarily available in other languages."><span class="acronym">skip</span></acronym>]</span></p>
<div class="refsect3">
<a name="g-uri-unref.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>uri</p></td>
<td class="parameter_description"><p>a <a class="link" href="glib-URI-Functions.html#GUri" title="GUri"><span class="type">GUri</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<p class="since">Since: <a class="link" href="api-index-2-66.html#api-index-2.66">2.66</a></p>
</div>
<hr>
<div class="refsect2">
<a name="g-uri-split"></a><h3>g_uri_split ()</h3>
<pre class="programlisting"><a class="link" href="glib-Basic-Types.html#gboolean" title="gboolean"><span class="returnvalue">gboolean</span></a>
g_uri_split (<em class="parameter"><code>const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="type">gchar</span></a> *uri_ref</code></em>,
             <em class="parameter"><code><a class="link" href="glib-URI-Functions.html#GUriFlags" title="enum GUriFlags"><span class="type">GUriFlags</span></a> flags</code></em>,
             <em class="parameter"><code><a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="type">gchar</span></a> **scheme</code></em>,
             <em class="parameter"><code><a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="type">gchar</span></a> **userinfo</code></em>,
             <em class="parameter"><code><a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="type">gchar</span></a> **host</code></em>,
             <em class="parameter"><code><a class="link" href="glib-Basic-Types.html#gint" title="gint"><span class="type">gint</span></a> *port</code></em>,
             <em class="parameter"><code><a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="type">gchar</span></a> **path</code></em>,
             <em class="parameter"><code><a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="type">gchar</span></a> **query</code></em>,
             <em class="parameter"><code><a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="type">gchar</span></a> **fragment</code></em>,
             <em class="parameter"><code><a class="link" href="glib-Error-Reporting.html#GError" title="struct GError"><span class="type">GError</span></a> **error</code></em>);</pre>
<p>Parses <em class="parameter"><code>uri_ref</code></em>
 (which can be an
<a class="link" href="glib-URI-Functions.html#relative-absolute-uris" title="Relative and absolute URIs">absolute or relative URI</a>) according to <em class="parameter"><code>flags</code></em>
, and
returns the pieces. Any component that doesn't appear in <em class="parameter"><code>uri_ref</code></em>
 will be
returned as <a class="link" href="glib-Standard-Macros.html#NULL:CAPS" title="NULL"><code class="literal">NULL</code></a> (but note that all URIs always have a path component,
though it may be the empty string).</p>
<p>If <em class="parameter"><code>flags</code></em>
 contains <a class="link" href="glib-URI-Functions.html#G-URI-FLAGS-ENCODED:CAPS"><code class="literal">G_URI_FLAGS_ENCODED</code></a>, then <code class="literal">%</code>-encoded characters in
<em class="parameter"><code>uri_ref</code></em>
 will remain encoded in the output strings. (If not,
then all such characters will be decoded.) Note that decoding will
only work if the URI components are ASCII or UTF-8, so you will
need to use <a class="link" href="glib-URI-Functions.html#G-URI-FLAGS-ENCODED:CAPS"><code class="literal">G_URI_FLAGS_ENCODED</code></a> if they are not.</p>
<p>Note that the <a class="link" href="glib-URI-Functions.html#G-URI-FLAGS-HAS-PASSWORD:CAPS"><code class="literal">G_URI_FLAGS_HAS_PASSWORD</code></a> and
<a class="link" href="glib-URI-Functions.html#G-URI-FLAGS-HAS-AUTH-PARAMS:CAPS"><code class="literal">G_URI_FLAGS_HAS_AUTH_PARAMS</code></a> <em class="parameter"><code>flags</code></em>
 are ignored by <a class="link" href="glib-URI-Functions.html#g-uri-split" title="g_uri_split ()"><code class="function">g_uri_split()</code></a>,
since it always returns only the full userinfo; use
<a class="link" href="glib-URI-Functions.html#g-uri-split-with-user" title="g_uri_split_with_user ()"><code class="function">g_uri_split_with_user()</code></a> if you want it split up.</p>
<div class="refsect3">
<a name="g-uri-split.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>uri_ref</p></td>
<td class="parameter_description"><p>a string containing a relative or absolute URI</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>flags</p></td>
<td class="parameter_description"><p>flags for parsing <em class="parameter"><code>uri_ref</code></em>
</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>scheme</p></td>
<td class="parameter_description"><p>on return, contains
the scheme (converted to lowercase), or <a class="link" href="glib-Standard-Macros.html#NULL:CAPS" title="NULL"><code class="literal">NULL</code></a>. </p></td>
<td class="parameter_annotations"><span class="annotation">[<acronym title="Parameter for returning results. Default is transfer full."><span class="acronym">out</span></acronym>][<acronym title="NULL may be passed as the value in, out, in-out; or as a return value."><span class="acronym">nullable</span></acronym>][<acronym title="NULL may be passed instead of a pointer to a location."><span class="acronym">optional</span></acronym>][<acronym title="The caller owns the data, and is responsible for free it."><span class="acronym">transfer full</span></acronym>]</span></td>
</tr>
<tr>
<td class="parameter_name"><p>userinfo</p></td>
<td class="parameter_description"><p>on return, contains
the userinfo, or <a class="link" href="glib-Standard-Macros.html#NULL:CAPS" title="NULL"><code class="literal">NULL</code></a>. </p></td>
<td class="parameter_annotations"><span class="annotation">[<acronym title="Parameter for returning results. Default is transfer full."><span class="acronym">out</span></acronym>][<acronym title="NULL may be passed as the value in, out, in-out; or as a return value."><span class="acronym">nullable</span></acronym>][<acronym title="NULL may be passed instead of a pointer to a location."><span class="acronym">optional</span></acronym>][<acronym title="The caller owns the data, and is responsible for free it."><span class="acronym">transfer full</span></acronym>]</span></td>
</tr>
<tr>
<td class="parameter_name"><p>host</p></td>
<td class="parameter_description"><p>on return, contains the
host, or <a class="link" href="glib-Standard-Macros.html#NULL:CAPS" title="NULL"><code class="literal">NULL</code></a>. </p></td>
<td class="parameter_annotations"><span class="annotation">[<acronym title="Parameter for returning results. Default is transfer full."><span class="acronym">out</span></acronym>][<acronym title="NULL may be passed as the value in, out, in-out; or as a return value."><span class="acronym">nullable</span></acronym>][<acronym title="NULL may be passed instead of a pointer to a location."><span class="acronym">optional</span></acronym>][<acronym title="The caller owns the data, and is responsible for free it."><span class="acronym">transfer full</span></acronym>]</span></td>
</tr>
<tr>
<td class="parameter_name"><p>port</p></td>
<td class="parameter_description"><p>on return, contains the
port, or <code class="literal">-1</code>. </p></td>
<td class="parameter_annotations"><span class="annotation">[<acronym title="Parameter for returning results. Default is transfer full."><span class="acronym">out</span></acronym>][<acronym title="NULL may be passed instead of a pointer to a location."><span class="acronym">optional</span></acronym>][<acronym title="The caller owns the data, and is responsible for free it."><span class="acronym">transfer full</span></acronym>]</span></td>
</tr>
<tr>
<td class="parameter_name"><p>path</p></td>
<td class="parameter_description"><p>on return, contains the
path. </p></td>
<td class="parameter_annotations"><span class="annotation">[<acronym title="Parameter for returning results. Default is transfer full."><span class="acronym">out</span></acronym>][<acronym title="NULL must not be passed as the value in, out, in-out; or as a return value."><span class="acronym">not nullable</span></acronym>][<acronym title="NULL may be passed instead of a pointer to a location."><span class="acronym">optional</span></acronym>][<acronym title="The caller owns the data, and is responsible for free it."><span class="acronym">transfer full</span></acronym>]</span></td>
</tr>
<tr>
<td class="parameter_name"><p>query</p></td>
<td class="parameter_description"><p>on return, contains the
query, or <a class="link" href="glib-Standard-Macros.html#NULL:CAPS" title="NULL"><code class="literal">NULL</code></a>. </p></td>
<td class="parameter_annotations"><span class="annotation">[<acronym title="Parameter for returning results. Default is transfer full."><span class="acronym">out</span></acronym>][<acronym title="NULL may be passed as the value in, out, in-out; or as a return value."><span class="acronym">nullable</span></acronym>][<acronym title="NULL may be passed instead of a pointer to a location."><span class="acronym">optional</span></acronym>][<acronym title="The caller owns the data, and is responsible for free it."><span class="acronym">transfer full</span></acronym>]</span></td>
</tr>
<tr>
<td class="parameter_name"><p>fragment</p></td>
<td class="parameter_description"><p>on return, contains
the fragment, or <a class="link" href="glib-Standard-Macros.html#NULL:CAPS" title="NULL"><code class="literal">NULL</code></a>. </p></td>
<td class="parameter_annotations"><span class="annotation">[<acronym title="Parameter for returning results. Default is transfer full."><span class="acronym">out</span></acronym>][<acronym title="NULL may be passed as the value in, out, in-out; or as a return value."><span class="acronym">nullable</span></acronym>][<acronym title="NULL may be passed instead of a pointer to a location."><span class="acronym">optional</span></acronym>][<acronym title="The caller owns the data, and is responsible for free it."><span class="acronym">transfer full</span></acronym>]</span></td>
</tr>
<tr>
<td class="parameter_name"><p>error</p></td>
<td class="parameter_description"><p><a class="link" href="glib-Error-Reporting.html#GError" title="struct GError"><span class="type">GError</span></a> for error reporting, or <a class="link" href="glib-Standard-Macros.html#NULL:CAPS" title="NULL"><code class="literal">NULL</code></a> to ignore.</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="g-uri-split.returns"></a><h4>Returns</h4>
<p><a class="link" href="glib-Standard-Macros.html#TRUE:CAPS" title="TRUE"><code class="literal">TRUE</code></a> if <em class="parameter"><code>uri_ref</code></em>
parsed successfully, <a class="link" href="glib-Standard-Macros.html#FALSE:CAPS" title="FALSE"><code class="literal">FALSE</code></a>
on error. </p>
<p><span class="annotation">[<acronym title="Exposed in C code, not necessarily available in other languages."><span class="acronym">skip</span></acronym>]</span></p>
</div>
<p class="since">Since: <a class="link" href="api-index-2-66.html#api-index-2.66">2.66</a></p>
</div>
<hr>
<div class="refsect2">
<a name="g-uri-split-with-user"></a><h3>g_uri_split_with_user ()</h3>
<pre class="programlisting"><a class="link" href="glib-Basic-Types.html#gboolean" title="gboolean"><span class="returnvalue">gboolean</span></a>
g_uri_split_with_user (<em class="parameter"><code>const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="type">gchar</span></a> *uri_ref</code></em>,
                       <em class="parameter"><code><a class="link" href="glib-URI-Functions.html#GUriFlags" title="enum GUriFlags"><span class="type">GUriFlags</span></a> flags</code></em>,
                       <em class="parameter"><code><a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="type">gchar</span></a> **scheme</code></em>,
                       <em class="parameter"><code><a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="type">gchar</span></a> **user</code></em>,
                       <em class="parameter"><code><a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="type">gchar</span></a> **password</code></em>,
                       <em class="parameter"><code><a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="type">gchar</span></a> **auth_params</code></em>,
                       <em class="parameter"><code><a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="type">gchar</span></a> **host</code></em>,
                       <em class="parameter"><code><a class="link" href="glib-Basic-Types.html#gint" title="gint"><span class="type">gint</span></a> *port</code></em>,
                       <em class="parameter"><code><a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="type">gchar</span></a> **path</code></em>,
                       <em class="parameter"><code><a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="type">gchar</span></a> **query</code></em>,
                       <em class="parameter"><code><a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="type">gchar</span></a> **fragment</code></em>,
                       <em class="parameter"><code><a class="link" href="glib-Error-Reporting.html#GError" title="struct GError"><span class="type">GError</span></a> **error</code></em>);</pre>
<p>Parses <em class="parameter"><code>uri_ref</code></em>
 (which can be an
<a class="link" href="glib-URI-Functions.html#relative-absolute-uris" title="Relative and absolute URIs">absolute or relative URI</a>) according to <em class="parameter"><code>flags</code></em>
, and
returns the pieces. Any component that doesn't appear in <em class="parameter"><code>uri_ref</code></em>
 will be
returned as <a class="link" href="glib-Standard-Macros.html#NULL:CAPS" title="NULL"><code class="literal">NULL</code></a> (but note that all URIs always have a path component,
though it may be the empty string).</p>
<p>See <a class="link" href="glib-URI-Functions.html#g-uri-split" title="g_uri_split ()"><code class="function">g_uri_split()</code></a>, and the definition of <a class="link" href="glib-URI-Functions.html#GUriFlags" title="enum GUriFlags"><span class="type">GUriFlags</span></a>, for more
information on the effect of <em class="parameter"><code>flags</code></em>
. Note that <em class="parameter"><code>password</code></em>
 will only
be parsed out if <em class="parameter"><code>flags</code></em>
 contains <a class="link" href="glib-URI-Functions.html#G-URI-FLAGS-HAS-PASSWORD:CAPS"><code class="literal">G_URI_FLAGS_HAS_PASSWORD</code></a>, and
<em class="parameter"><code>auth_params</code></em>
 will only be parsed out if <em class="parameter"><code>flags</code></em>
 contains
<a class="link" href="glib-URI-Functions.html#G-URI-FLAGS-HAS-AUTH-PARAMS:CAPS"><code class="literal">G_URI_FLAGS_HAS_AUTH_PARAMS</code></a>.</p>
<div class="refsect3">
<a name="g-uri-split-with-user.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>uri_ref</p></td>
<td class="parameter_description"><p>a string containing a relative or absolute URI</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>flags</p></td>
<td class="parameter_description"><p>flags for parsing <em class="parameter"><code>uri_ref</code></em>
</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>scheme</p></td>
<td class="parameter_description"><p>on return, contains
the scheme (converted to lowercase), or <a class="link" href="glib-Standard-Macros.html#NULL:CAPS" title="NULL"><code class="literal">NULL</code></a>. </p></td>
<td class="parameter_annotations"><span class="annotation">[<acronym title="Parameter for returning results. Default is transfer full."><span class="acronym">out</span></acronym>][<acronym title="NULL may be passed as the value in, out, in-out; or as a return value."><span class="acronym">nullable</span></acronym>][<acronym title="NULL may be passed instead of a pointer to a location."><span class="acronym">optional</span></acronym>][<acronym title="The caller owns the data, and is responsible for free it."><span class="acronym">transfer full</span></acronym>]</span></td>
</tr>
<tr>
<td class="parameter_name"><p>user</p></td>
<td class="parameter_description"><p>on return, contains
the user, or <a class="link" href="glib-Standard-Macros.html#NULL:CAPS" title="NULL"><code class="literal">NULL</code></a>. </p></td>
<td class="parameter_annotations"><span class="annotation">[<acronym title="Parameter for returning results. Default is transfer full."><span class="acronym">out</span></acronym>][<acronym title="NULL may be passed as the value in, out, in-out; or as a return value."><span class="acronym">nullable</span></acronym>][<acronym title="NULL may be passed instead of a pointer to a location."><span class="acronym">optional</span></acronym>][<acronym title="The caller owns the data, and is responsible for free it."><span class="acronym">transfer full</span></acronym>]</span></td>
</tr>
<tr>
<td class="parameter_name"><p>password</p></td>
<td class="parameter_description"><p>on return, contains
the password, or <a class="link" href="glib-Standard-Macros.html#NULL:CAPS" title="NULL"><code class="literal">NULL</code></a>. </p></td>
<td class="parameter_annotations"><span class="annotation">[<acronym title="Parameter for returning results. Default is transfer full."><span class="acronym">out</span></acronym>][<acronym title="NULL may be passed as the value in, out, in-out; or as a return value."><span class="acronym">nullable</span></acronym>][<acronym title="NULL may be passed instead of a pointer to a location."><span class="acronym">optional</span></acronym>][<acronym title="The caller owns the data, and is responsible for free it."><span class="acronym">transfer full</span></acronym>]</span></td>
</tr>
<tr>
<td class="parameter_name"><p>auth_params</p></td>
<td class="parameter_description"><p>on return, contains
the auth_params, or <a class="link" href="glib-Standard-Macros.html#NULL:CAPS" title="NULL"><code class="literal">NULL</code></a>. </p></td>
<td class="parameter_annotations"><span class="annotation">[<acronym title="Parameter for returning results. Default is transfer full."><span class="acronym">out</span></acronym>][<acronym title="NULL may be passed as the value in, out, in-out; or as a return value."><span class="acronym">nullable</span></acronym>][<acronym title="NULL may be passed instead of a pointer to a location."><span class="acronym">optional</span></acronym>][<acronym title="The caller owns the data, and is responsible for free it."><span class="acronym">transfer full</span></acronym>]</span></td>
</tr>
<tr>
<td class="parameter_name"><p>host</p></td>
<td class="parameter_description"><p>on return, contains the
host, or <a class="link" href="glib-Standard-Macros.html#NULL:CAPS" title="NULL"><code class="literal">NULL</code></a>. </p></td>
<td class="parameter_annotations"><span class="annotation">[<acronym title="Parameter for returning results. Default is transfer full."><span class="acronym">out</span></acronym>][<acronym title="NULL may be passed as the value in, out, in-out; or as a return value."><span class="acronym">nullable</span></acronym>][<acronym title="NULL may be passed instead of a pointer to a location."><span class="acronym">optional</span></acronym>][<acronym title="The caller owns the data, and is responsible for free it."><span class="acronym">transfer full</span></acronym>]</span></td>
</tr>
<tr>
<td class="parameter_name"><p>port</p></td>
<td class="parameter_description"><p>on return, contains the
port, or <code class="literal">-1</code>. </p></td>
<td class="parameter_annotations"><span class="annotation">[<acronym title="Parameter for returning results. Default is transfer full."><span class="acronym">out</span></acronym>][<acronym title="NULL may be passed instead of a pointer to a location."><span class="acronym">optional</span></acronym>][<acronym title="The caller owns the data, and is responsible for free it."><span class="acronym">transfer full</span></acronym>]</span></td>
</tr>
<tr>
<td class="parameter_name"><p>path</p></td>
<td class="parameter_description"><p>on return, contains the
path. </p></td>
<td class="parameter_annotations"><span class="annotation">[<acronym title="Parameter for returning results. Default is transfer full."><span class="acronym">out</span></acronym>][<acronym title="NULL must not be passed as the value in, out, in-out; or as a return value."><span class="acronym">not nullable</span></acronym>][<acronym title="NULL may be passed instead of a pointer to a location."><span class="acronym">optional</span></acronym>][<acronym title="The caller owns the data, and is responsible for free it."><span class="acronym">transfer full</span></acronym>]</span></td>
</tr>
<tr>
<td class="parameter_name"><p>query</p></td>
<td class="parameter_description"><p>on return, contains the
query, or <a class="link" href="glib-Standard-Macros.html#NULL:CAPS" title="NULL"><code class="literal">NULL</code></a>. </p></td>
<td class="parameter_annotations"><span class="annotation">[<acronym title="Parameter for returning results. Default is transfer full."><span class="acronym">out</span></acronym>][<acronym title="NULL may be passed as the value in, out, in-out; or as a return value."><span class="acronym">nullable</span></acronym>][<acronym title="NULL may be passed instead of a pointer to a location."><span class="acronym">optional</span></acronym>][<acronym title="The caller owns the data, and is responsible for free it."><span class="acronym">transfer full</span></acronym>]</span></td>
</tr>
<tr>
<td class="parameter_name"><p>fragment</p></td>
<td class="parameter_description"><p>on return, contains
the fragment, or <a class="link" href="glib-Standard-Macros.html#NULL:CAPS" title="NULL"><code class="literal">NULL</code></a>. </p></td>
<td class="parameter_annotations"><span class="annotation">[<acronym title="Parameter for returning results. Default is transfer full."><span class="acronym">out</span></acronym>][<acronym title="NULL may be passed as the value in, out, in-out; or as a return value."><span class="acronym">nullable</span></acronym>][<acronym title="NULL may be passed instead of a pointer to a location."><span class="acronym">optional</span></acronym>][<acronym title="The caller owns the data, and is responsible for free it."><span class="acronym">transfer full</span></acronym>]</span></td>
</tr>
<tr>
<td class="parameter_name"><p>error</p></td>
<td class="parameter_description"><p><a class="link" href="glib-Error-Reporting.html#GError" title="struct GError"><span class="type">GError</span></a> for error reporting, or <a class="link" href="glib-Standard-Macros.html#NULL:CAPS" title="NULL"><code class="literal">NULL</code></a> to ignore.</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="g-uri-split-with-user.returns"></a><h4>Returns</h4>
<p><a class="link" href="glib-Standard-Macros.html#TRUE:CAPS" title="TRUE"><code class="literal">TRUE</code></a> if <em class="parameter"><code>uri_ref</code></em>
parsed successfully, <a class="link" href="glib-Standard-Macros.html#FALSE:CAPS" title="FALSE"><code class="literal">FALSE</code></a>
on error. </p>
<p><span class="annotation">[<acronym title="Exposed in C code, not necessarily available in other languages."><span class="acronym">skip</span></acronym>]</span></p>
</div>
<p class="since">Since: <a class="link" href="api-index-2-66.html#api-index-2.66">2.66</a></p>
</div>
<hr>
<div class="refsect2">
<a name="g-uri-split-network"></a><h3>g_uri_split_network ()</h3>
<pre class="programlisting"><a class="link" href="glib-Basic-Types.html#gboolean" title="gboolean"><span class="returnvalue">gboolean</span></a>
g_uri_split_network (<em class="parameter"><code>const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="type">gchar</span></a> *uri_string</code></em>,
                     <em class="parameter"><code><a class="link" href="glib-URI-Functions.html#GUriFlags" title="enum GUriFlags"><span class="type">GUriFlags</span></a> flags</code></em>,
                     <em class="parameter"><code><a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="type">gchar</span></a> **scheme</code></em>,
                     <em class="parameter"><code><a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="type">gchar</span></a> **host</code></em>,
                     <em class="parameter"><code><a class="link" href="glib-Basic-Types.html#gint" title="gint"><span class="type">gint</span></a> *port</code></em>,
                     <em class="parameter"><code><a class="link" href="glib-Error-Reporting.html#GError" title="struct GError"><span class="type">GError</span></a> **error</code></em>);</pre>
<p>Parses <em class="parameter"><code>uri_string</code></em>
 (which must be an <a class="link" href="glib-URI-Functions.html#relative-absolute-uris" title="Relative and absolute URIs">absolute URI</a>)
according to <em class="parameter"><code>flags</code></em>
, and returns the pieces relevant to connecting to a host.
See the documentation for <a class="link" href="glib-URI-Functions.html#g-uri-split" title="g_uri_split ()"><code class="function">g_uri_split()</code></a> for more details; this is
mostly a wrapper around that function with simpler arguments.
However, it will return an error if <em class="parameter"><code>uri_string</code></em>
 is a relative URI,
or does not contain a hostname component.</p>
<div class="refsect3">
<a name="g-uri-split-network.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>uri_string</p></td>
<td class="parameter_description"><p>a string containing an absolute URI</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>flags</p></td>
<td class="parameter_description"><p>flags for parsing <em class="parameter"><code>uri_string</code></em>
</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>scheme</p></td>
<td class="parameter_description"><p>on return, contains
the scheme (converted to lowercase), or <a class="link" href="glib-Standard-Macros.html#NULL:CAPS" title="NULL"><code class="literal">NULL</code></a>. </p></td>
<td class="parameter_annotations"><span class="annotation">[<acronym title="Parameter for returning results. Default is transfer full."><span class="acronym">out</span></acronym>][<acronym title="NULL may be passed as the value in, out, in-out; or as a return value."><span class="acronym">nullable</span></acronym>][<acronym title="NULL may be passed instead of a pointer to a location."><span class="acronym">optional</span></acronym>][<acronym title="The caller owns the data, and is responsible for free it."><span class="acronym">transfer full</span></acronym>]</span></td>
</tr>
<tr>
<td class="parameter_name"><p>host</p></td>
<td class="parameter_description"><p>on return, contains the
host, or <a class="link" href="glib-Standard-Macros.html#NULL:CAPS" title="NULL"><code class="literal">NULL</code></a>. </p></td>
<td class="parameter_annotations"><span class="annotation">[<acronym title="Parameter for returning results. Default is transfer full."><span class="acronym">out</span></acronym>][<acronym title="NULL may be passed as the value in, out, in-out; or as a return value."><span class="acronym">nullable</span></acronym>][<acronym title="NULL may be passed instead of a pointer to a location."><span class="acronym">optional</span></acronym>][<acronym title="The caller owns the data, and is responsible for free it."><span class="acronym">transfer full</span></acronym>]</span></td>
</tr>
<tr>
<td class="parameter_name"><p>port</p></td>
<td class="parameter_description"><p>on return, contains the
port, or <code class="literal">-1</code>. </p></td>
<td class="parameter_annotations"><span class="annotation">[<acronym title="Parameter for returning results. Default is transfer full."><span class="acronym">out</span></acronym>][<acronym title="NULL may be passed instead of a pointer to a location."><span class="acronym">optional</span></acronym>][<acronym title="The caller owns the data, and is responsible for free it."><span class="acronym">transfer full</span></acronym>]</span></td>
</tr>
<tr>
<td class="parameter_name"><p>error</p></td>
<td class="parameter_description"><p><a class="link" href="glib-Error-Reporting.html#GError" title="struct GError"><span class="type">GError</span></a> for error reporting, or <a class="link" href="glib-Standard-Macros.html#NULL:CAPS" title="NULL"><code class="literal">NULL</code></a> to ignore.</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="g-uri-split-network.returns"></a><h4>Returns</h4>
<p><a class="link" href="glib-Standard-Macros.html#TRUE:CAPS" title="TRUE"><code class="literal">TRUE</code></a> if <em class="parameter"><code>uri_string</code></em>
parsed successfully,
<a class="link" href="glib-Standard-Macros.html#FALSE:CAPS" title="FALSE"><code class="literal">FALSE</code></a> on error. </p>
<p><span class="annotation">[<acronym title="Exposed in C code, not necessarily available in other languages."><span class="acronym">skip</span></acronym>]</span></p>
</div>
<p class="since">Since: <a class="link" href="api-index-2-66.html#api-index-2.66">2.66</a></p>
</div>
<hr>
<div class="refsect2">
<a name="g-uri-is-valid"></a><h3>g_uri_is_valid ()</h3>
<pre class="programlisting"><a class="link" href="glib-Basic-Types.html#gboolean" title="gboolean"><span class="returnvalue">gboolean</span></a>
g_uri_is_valid (<em class="parameter"><code>const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="type">gchar</span></a> *uri_string</code></em>,
                <em class="parameter"><code><a class="link" href="glib-URI-Functions.html#GUriFlags" title="enum GUriFlags"><span class="type">GUriFlags</span></a> flags</code></em>,
                <em class="parameter"><code><a class="link" href="glib-Error-Reporting.html#GError" title="struct GError"><span class="type">GError</span></a> **error</code></em>);</pre>
<p>Parses <em class="parameter"><code>uri_string</code></em>
 according to <em class="parameter"><code>flags</code></em>
, to determine whether it is a valid
<a class="link" href="glib-URI-Functions.html#relative-absolute-uris" title="Relative and absolute URIs">absolute URI</a>, i.e. it does not need to be resolved
relative to another URI using <a class="link" href="glib-URI-Functions.html#g-uri-parse-relative" title="g_uri_parse_relative ()"><code class="function">g_uri_parse_relative()</code></a>.</p>
<p>If it’s not a valid URI, an error is returned explaining how it’s invalid.</p>
<p>See <a class="link" href="glib-URI-Functions.html#g-uri-split" title="g_uri_split ()"><code class="function">g_uri_split()</code></a>, and the definition of <a class="link" href="glib-URI-Functions.html#GUriFlags" title="enum GUriFlags"><span class="type">GUriFlags</span></a>, for more
information on the effect of <em class="parameter"><code>flags</code></em>
.</p>
<div class="refsect3">
<a name="g-uri-is-valid.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>uri_string</p></td>
<td class="parameter_description"><p>a string containing an absolute URI</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>flags</p></td>
<td class="parameter_description"><p>flags for parsing <em class="parameter"><code>uri_string</code></em>
</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>error</p></td>
<td class="parameter_description"><p><a class="link" href="glib-Error-Reporting.html#GError" title="struct GError"><span class="type">GError</span></a> for error reporting, or <a class="link" href="glib-Standard-Macros.html#NULL:CAPS" title="NULL"><code class="literal">NULL</code></a> to ignore.</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="g-uri-is-valid.returns"></a><h4>Returns</h4>
<p> <a class="link" href="glib-Standard-Macros.html#TRUE:CAPS" title="TRUE"><code class="literal">TRUE</code></a> if <em class="parameter"><code>uri_string</code></em>
is a valid absolute URI, <a class="link" href="glib-Standard-Macros.html#FALSE:CAPS" title="FALSE"><code class="literal">FALSE</code></a> on error.</p>
</div>
<p class="since">Since: <a class="link" href="api-index-2-66.html#api-index-2.66">2.66</a></p>
</div>
<hr>
<div class="refsect2">
<a name="g-uri-join"></a><h3>g_uri_join ()</h3>
<pre class="programlisting"><a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="returnvalue">gchar</span></a> *
g_uri_join (<em class="parameter"><code><a class="link" href="glib-URI-Functions.html#GUriFlags" title="enum GUriFlags"><span class="type">GUriFlags</span></a> flags</code></em>,
            <em class="parameter"><code>const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="type">gchar</span></a> *scheme</code></em>,
            <em class="parameter"><code>const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="type">gchar</span></a> *userinfo</code></em>,
            <em class="parameter"><code>const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="type">gchar</span></a> *host</code></em>,
            <em class="parameter"><code><a class="link" href="glib-Basic-Types.html#gint" title="gint"><span class="type">gint</span></a> port</code></em>,
            <em class="parameter"><code>const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="type">gchar</span></a> *path</code></em>,
            <em class="parameter"><code>const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="type">gchar</span></a> *query</code></em>,
            <em class="parameter"><code>const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="type">gchar</span></a> *fragment</code></em>);</pre>
<p>Joins the given components together according to <em class="parameter"><code>flags</code></em>
 to create
an absolute URI string. <em class="parameter"><code>path</code></em>
 may not be <a class="link" href="glib-Standard-Macros.html#NULL:CAPS" title="NULL"><code class="literal">NULL</code></a> (though it may be the empty
string).</p>
<p>When <em class="parameter"><code>host</code></em>
 is present, <em class="parameter"><code>path</code></em>
 must either be empty or begin with a slash (<code class="literal">/</code>)
character. When <em class="parameter"><code>host</code></em>
 is not present, <em class="parameter"><code>path</code></em>
 cannot begin with two slash
   characters (<code class="literal">//</code>). See
<a class="ulink" href="https://tools.ietf.org/html/rfc3986#section-3" target="_top">RFC 3986, section 3</a>.</p>
<p>See also <a class="link" href="glib-URI-Functions.html#g-uri-join-with-user" title="g_uri_join_with_user ()"><code class="function">g_uri_join_with_user()</code></a>, which allows specifying the
components of the ‘userinfo’ separately.</p>
<p><a class="link" href="glib-URI-Functions.html#G-URI-FLAGS-HAS-PASSWORD:CAPS"><code class="literal">G_URI_FLAGS_HAS_PASSWORD</code></a> and <a class="link" href="glib-URI-Functions.html#G-URI-FLAGS-HAS-AUTH-PARAMS:CAPS"><code class="literal">G_URI_FLAGS_HAS_AUTH_PARAMS</code></a> are ignored if set
in <em class="parameter"><code>flags</code></em>
.</p>
<div class="refsect3">
<a name="g-uri-join.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>flags</p></td>
<td class="parameter_description"><p>flags describing how to build the URI string</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>scheme</p></td>
<td class="parameter_description"><p>the URI scheme, or <a class="link" href="glib-Standard-Macros.html#NULL:CAPS" title="NULL"><code class="literal">NULL</code></a>. </p></td>
<td class="parameter_annotations"><span class="annotation">[<acronym title="NULL may be passed as the value in, out, in-out; or as a return value."><span class="acronym">nullable</span></acronym>]</span></td>
</tr>
<tr>
<td class="parameter_name"><p>userinfo</p></td>
<td class="parameter_description"><p>the userinfo component, or <a class="link" href="glib-Standard-Macros.html#NULL:CAPS" title="NULL"><code class="literal">NULL</code></a>. </p></td>
<td class="parameter_annotations"><span class="annotation">[<acronym title="NULL may be passed as the value in, out, in-out; or as a return value."><span class="acronym">nullable</span></acronym>]</span></td>
</tr>
<tr>
<td class="parameter_name"><p>host</p></td>
<td class="parameter_description"><p>the host component, or <a class="link" href="glib-Standard-Macros.html#NULL:CAPS" title="NULL"><code class="literal">NULL</code></a>. </p></td>
<td class="parameter_annotations"><span class="annotation">[<acronym title="NULL may be passed as the value in, out, in-out; or as a return value."><span class="acronym">nullable</span></acronym>]</span></td>
</tr>
<tr>
<td class="parameter_name"><p>port</p></td>
<td class="parameter_description"><p>the port, or <code class="literal">-1</code></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>path</p></td>
<td class="parameter_description"><p>the path component. </p></td>
<td class="parameter_annotations"><span class="annotation">[<acronym title="NULL must not be passed as the value in, out, in-out; or as a return value."><span class="acronym">not nullable</span></acronym>]</span></td>
</tr>
<tr>
<td class="parameter_name"><p>query</p></td>
<td class="parameter_description"><p>the query component, or <a class="link" href="glib-Standard-Macros.html#NULL:CAPS" title="NULL"><code class="literal">NULL</code></a>. </p></td>
<td class="parameter_annotations"><span class="annotation">[<acronym title="NULL may be passed as the value in, out, in-out; or as a return value."><span class="acronym">nullable</span></acronym>]</span></td>
</tr>
<tr>
<td class="parameter_name"><p>fragment</p></td>
<td class="parameter_description"><p>the fragment, or <a class="link" href="glib-Standard-Macros.html#NULL:CAPS" title="NULL"><code class="literal">NULL</code></a>. </p></td>
<td class="parameter_annotations"><span class="annotation">[<acronym title="NULL may be passed as the value in, out, in-out; or as a return value."><span class="acronym">nullable</span></acronym>]</span></td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="g-uri-join.returns"></a><h4>Returns</h4>
<p>an absolute URI string. </p>
<p><span class="annotation">[<acronym title="NULL must not be passed as the value in, out, in-out; or as a return value."><span class="acronym">not nullable</span></acronym>][<acronym title="The caller owns the data, and is responsible for free it."><span class="acronym">transfer full</span></acronym>]</span></p>
</div>
<p class="since">Since: <a class="link" href="api-index-2-66.html#api-index-2.66">2.66</a></p>
</div>
<hr>
<div class="refsect2">
<a name="g-uri-join-with-user"></a><h3>g_uri_join_with_user ()</h3>
<pre class="programlisting"><a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="returnvalue">gchar</span></a> *
g_uri_join_with_user (<em class="parameter"><code><a class="link" href="glib-URI-Functions.html#GUriFlags" title="enum GUriFlags"><span class="type">GUriFlags</span></a> flags</code></em>,
                      <em class="parameter"><code>const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="type">gchar</span></a> *scheme</code></em>,
                      <em class="parameter"><code>const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="type">gchar</span></a> *user</code></em>,
                      <em class="parameter"><code>const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="type">gchar</span></a> *password</code></em>,
                      <em class="parameter"><code>const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="type">gchar</span></a> *auth_params</code></em>,
                      <em class="parameter"><code>const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="type">gchar</span></a> *host</code></em>,
                      <em class="parameter"><code><a class="link" href="glib-Basic-Types.html#gint" title="gint"><span class="type">gint</span></a> port</code></em>,
                      <em class="parameter"><code>const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="type">gchar</span></a> *path</code></em>,
                      <em class="parameter"><code>const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="type">gchar</span></a> *query</code></em>,
                      <em class="parameter"><code>const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="type">gchar</span></a> *fragment</code></em>);</pre>
<p>Joins the given components together according to <em class="parameter"><code>flags</code></em>
 to create
an absolute URI string. <em class="parameter"><code>path</code></em>
 may not be <a class="link" href="glib-Standard-Macros.html#NULL:CAPS" title="NULL"><code class="literal">NULL</code></a> (though it may be the empty
string).</p>
<p>In contrast to <a class="link" href="glib-URI-Functions.html#g-uri-join" title="g_uri_join ()"><code class="function">g_uri_join()</code></a>, this allows specifying the components
of the ‘userinfo’ separately. It otherwise behaves the same.</p>
<p><a class="link" href="glib-URI-Functions.html#G-URI-FLAGS-HAS-PASSWORD:CAPS"><code class="literal">G_URI_FLAGS_HAS_PASSWORD</code></a> and <a class="link" href="glib-URI-Functions.html#G-URI-FLAGS-HAS-AUTH-PARAMS:CAPS"><code class="literal">G_URI_FLAGS_HAS_AUTH_PARAMS</code></a> are ignored if set
in <em class="parameter"><code>flags</code></em>
.</p>
<div class="refsect3">
<a name="g-uri-join-with-user.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>flags</p></td>
<td class="parameter_description"><p>flags describing how to build the URI string</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>scheme</p></td>
<td class="parameter_description"><p>the URI scheme, or <a class="link" href="glib-Standard-Macros.html#NULL:CAPS" title="NULL"><code class="literal">NULL</code></a>. </p></td>
<td class="parameter_annotations"><span class="annotation">[<acronym title="NULL may be passed as the value in, out, in-out; or as a return value."><span class="acronym">nullable</span></acronym>]</span></td>
</tr>
<tr>
<td class="parameter_name"><p>user</p></td>
<td class="parameter_description"><p>the user component of the userinfo, or <a class="link" href="glib-Standard-Macros.html#NULL:CAPS" title="NULL"><code class="literal">NULL</code></a>. </p></td>
<td class="parameter_annotations"><span class="annotation">[<acronym title="NULL may be passed as the value in, out, in-out; or as a return value."><span class="acronym">nullable</span></acronym>]</span></td>
</tr>
<tr>
<td class="parameter_name"><p>password</p></td>
<td class="parameter_description"><p>the password component of the userinfo, or
<a class="link" href="glib-Standard-Macros.html#NULL:CAPS" title="NULL"><code class="literal">NULL</code></a>. </p></td>
<td class="parameter_annotations"><span class="annotation">[<acronym title="NULL may be passed as the value in, out, in-out; or as a return value."><span class="acronym">nullable</span></acronym>]</span></td>
</tr>
<tr>
<td class="parameter_name"><p>auth_params</p></td>
<td class="parameter_description"><p>the auth params of the userinfo, or
<a class="link" href="glib-Standard-Macros.html#NULL:CAPS" title="NULL"><code class="literal">NULL</code></a>. </p></td>
<td class="parameter_annotations"><span class="annotation">[<acronym title="NULL may be passed as the value in, out, in-out; or as a return value."><span class="acronym">nullable</span></acronym>]</span></td>
</tr>
<tr>
<td class="parameter_name"><p>host</p></td>
<td class="parameter_description"><p>the host component, or <a class="link" href="glib-Standard-Macros.html#NULL:CAPS" title="NULL"><code class="literal">NULL</code></a>. </p></td>
<td class="parameter_annotations"><span class="annotation">[<acronym title="NULL may be passed as the value in, out, in-out; or as a return value."><span class="acronym">nullable</span></acronym>]</span></td>
</tr>
<tr>
<td class="parameter_name"><p>port</p></td>
<td class="parameter_description"><p>the port, or <code class="literal">-1</code></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>path</p></td>
<td class="parameter_description"><p>the path component. </p></td>
<td class="parameter_annotations"><span class="annotation">[<acronym title="NULL must not be passed as the value in, out, in-out; or as a return value."><span class="acronym">not nullable</span></acronym>]</span></td>
</tr>
<tr>
<td class="parameter_name"><p>query</p></td>
<td class="parameter_description"><p>the query component, or <a class="link" href="glib-Standard-Macros.html#NULL:CAPS" title="NULL"><code class="literal">NULL</code></a>. </p></td>
<td class="parameter_annotations"><span class="annotation">[<acronym title="NULL may be passed as the value in, out, in-out; or as a return value."><span class="acronym">nullable</span></acronym>]</span></td>
</tr>
<tr>
<td class="parameter_name"><p>fragment</p></td>
<td class="parameter_description"><p>the fragment, or <a class="link" href="glib-Standard-Macros.html#NULL:CAPS" title="NULL"><code class="literal">NULL</code></a>. </p></td>
<td class="parameter_annotations"><span class="annotation">[<acronym title="NULL may be passed as the value in, out, in-out; or as a return value."><span class="acronym">nullable</span></acronym>]</span></td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="g-uri-join-with-user.returns"></a><h4>Returns</h4>
<p>an absolute URI string. </p>
<p><span class="annotation">[<acronym title="NULL must not be passed as the value in, out, in-out; or as a return value."><span class="acronym">not nullable</span></acronym>][<acronym title="The caller owns the data, and is responsible for free it."><span class="acronym">transfer full</span></acronym>]</span></p>
</div>
<p class="since">Since: <a class="link" href="api-index-2-66.html#api-index-2.66">2.66</a></p>
</div>
<hr>
<div class="refsect2">
<a name="g-uri-parse"></a><h3>g_uri_parse ()</h3>
<pre class="programlisting"><a class="link" href="glib-URI-Functions.html#GUri" title="GUri"><span class="returnvalue">GUri</span></a> *
g_uri_parse (<em class="parameter"><code>const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="type">gchar</span></a> *uri_string</code></em>,
             <em class="parameter"><code><a class="link" href="glib-URI-Functions.html#GUriFlags" title="enum GUriFlags"><span class="type">GUriFlags</span></a> flags</code></em>,
             <em class="parameter"><code><a class="link" href="glib-Error-Reporting.html#GError" title="struct GError"><span class="type">GError</span></a> **error</code></em>);</pre>
<p>Parses <em class="parameter"><code>uri_string</code></em>
 according to <em class="parameter"><code>flags</code></em>
. If the result is not a
valid <a class="link" href="glib-URI-Functions.html#relative-absolute-uris" title="Relative and absolute URIs">absolute URI</a>, it will be discarded, and an
error returned.</p>
<div class="refsect3">
<a name="g-uri-parse.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>uri_string</p></td>
<td class="parameter_description"><p>a string representing an absolute URI</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>flags</p></td>
<td class="parameter_description"><p>flags describing how to parse <em class="parameter"><code>uri_string</code></em>
</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>error</p></td>
<td class="parameter_description"><p><a class="link" href="glib-Error-Reporting.html#GError" title="struct GError"><span class="type">GError</span></a> for error reporting, or <a class="link" href="glib-Standard-Macros.html#NULL:CAPS" title="NULL"><code class="literal">NULL</code></a> to ignore.</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="g-uri-parse.returns"></a><h4>Returns</h4>
<p>a new <a class="link" href="glib-URI-Functions.html#GUri" title="GUri"><span class="type">GUri</span></a>, or NULL on error. </p>
<p><span class="annotation">[<acronym title="The caller owns the data, and is responsible for free it."><span class="acronym">transfer full</span></acronym>]</span></p>
</div>
<p class="since">Since: <a class="link" href="api-index-2-66.html#api-index-2.66">2.66</a></p>
</div>
<hr>
<div class="refsect2">
<a name="g-uri-parse-relative"></a><h3>g_uri_parse_relative ()</h3>
<pre class="programlisting"><a class="link" href="glib-URI-Functions.html#GUri" title="GUri"><span class="returnvalue">GUri</span></a> *
g_uri_parse_relative (<em class="parameter"><code><a class="link" href="glib-URI-Functions.html#GUri" title="GUri"><span class="type">GUri</span></a> *base_uri</code></em>,
                      <em class="parameter"><code>const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="type">gchar</span></a> *uri_ref</code></em>,
                      <em class="parameter"><code><a class="link" href="glib-URI-Functions.html#GUriFlags" title="enum GUriFlags"><span class="type">GUriFlags</span></a> flags</code></em>,
                      <em class="parameter"><code><a class="link" href="glib-Error-Reporting.html#GError" title="struct GError"><span class="type">GError</span></a> **error</code></em>);</pre>
<p>Parses <em class="parameter"><code>uri_ref</code></em>
 according to <em class="parameter"><code>flags</code></em>
 and, if it is a
<a class="link" href="glib-URI-Functions.html#relative-absolute-uris" title="Relative and absolute URIs">relative URI</a>, resolves it relative to <em class="parameter"><code>base_uri</code></em>
.
If the result is not a valid absolute URI, it will be discarded, and an error
returned.</p>
<div class="refsect3">
<a name="g-uri-parse-relative.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>base_uri</p></td>
<td class="parameter_description"><p>a base absolute URI. </p></td>
<td class="parameter_annotations"><span class="annotation">[<acronym title="NULL may be passed as the value in, out, in-out; or as a return value."><span class="acronym">nullable</span></acronym>][<acronym title="The data is owned by the callee, which is responsible of freeing it."><span class="acronym">transfer none</span></acronym>]</span></td>
</tr>
<tr>
<td class="parameter_name"><p>uri_ref</p></td>
<td class="parameter_description"><p>a string representing a relative or absolute URI</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>flags</p></td>
<td class="parameter_description"><p>flags describing how to parse <em class="parameter"><code>uri_ref</code></em>
</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>error</p></td>
<td class="parameter_description"><p><a class="link" href="glib-Error-Reporting.html#GError" title="struct GError"><span class="type">GError</span></a> for error reporting, or <a class="link" href="glib-Standard-Macros.html#NULL:CAPS" title="NULL"><code class="literal">NULL</code></a> to ignore.</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="g-uri-parse-relative.returns"></a><h4>Returns</h4>
<p>a new <a class="link" href="glib-URI-Functions.html#GUri" title="GUri"><span class="type">GUri</span></a>, or NULL on error. </p>
<p><span class="annotation">[<acronym title="The caller owns the data, and is responsible for free it."><span class="acronym">transfer full</span></acronym>]</span></p>
</div>
<p class="since">Since: <a class="link" href="api-index-2-66.html#api-index-2.66">2.66</a></p>
</div>
<hr>
<div class="refsect2">
<a name="g-uri-resolve-relative"></a><h3>g_uri_resolve_relative ()</h3>
<pre class="programlisting"><a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="returnvalue">gchar</span></a> *
g_uri_resolve_relative (<em class="parameter"><code>const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="type">gchar</span></a> *base_uri_string</code></em>,
                        <em class="parameter"><code>const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="type">gchar</span></a> *uri_ref</code></em>,
                        <em class="parameter"><code><a class="link" href="glib-URI-Functions.html#GUriFlags" title="enum GUriFlags"><span class="type">GUriFlags</span></a> flags</code></em>,
                        <em class="parameter"><code><a class="link" href="glib-Error-Reporting.html#GError" title="struct GError"><span class="type">GError</span></a> **error</code></em>);</pre>
<p>Parses <em class="parameter"><code>uri_ref</code></em>
 according to <em class="parameter"><code>flags</code></em>
 and, if it is a
<a class="link" href="glib-URI-Functions.html#relative-absolute-uris" title="Relative and absolute URIs">relative URI</a>, resolves it relative to
<em class="parameter"><code>base_uri_string</code></em>
. If the result is not a valid absolute URI, it will be
discarded, and an error returned.</p>
<p>(If <em class="parameter"><code>base_uri_string</code></em>
 is <a class="link" href="glib-Standard-Macros.html#NULL:CAPS" title="NULL"><code class="literal">NULL</code></a>, this just returns <em class="parameter"><code>uri_ref</code></em>
, or
<a class="link" href="glib-Standard-Macros.html#NULL:CAPS" title="NULL"><code class="literal">NULL</code></a> if <em class="parameter"><code>uri_ref</code></em>
 is invalid or not absolute.)</p>
<div class="refsect3">
<a name="g-uri-resolve-relative.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>base_uri_string</p></td>
<td class="parameter_description"><p>a string representing a base URI. </p></td>
<td class="parameter_annotations"><span class="annotation">[<acronym title="NULL may be passed as the value in, out, in-out; or as a return value."><span class="acronym">nullable</span></acronym>]</span></td>
</tr>
<tr>
<td class="parameter_name"><p>uri_ref</p></td>
<td class="parameter_description"><p>a string representing a relative or absolute URI</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>flags</p></td>
<td class="parameter_description"><p>flags describing how to parse <em class="parameter"><code>uri_ref</code></em>
</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>error</p></td>
<td class="parameter_description"><p><a class="link" href="glib-Error-Reporting.html#GError" title="struct GError"><span class="type">GError</span></a> for error reporting, or <a class="link" href="glib-Standard-Macros.html#NULL:CAPS" title="NULL"><code class="literal">NULL</code></a> to ignore.</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="g-uri-resolve-relative.returns"></a><h4>Returns</h4>
<p>the resolved URI string,
or NULL on error. </p>
<p><span class="annotation">[<acronym title="The caller owns the data, and is responsible for free it."><span class="acronym">transfer full</span></acronym>]</span></p>
</div>
<p class="since">Since: <a class="link" href="api-index-2-66.html#api-index-2.66">2.66</a></p>
</div>
<hr>
<div class="refsect2">
<a name="g-uri-build"></a><h3>g_uri_build ()</h3>
<pre class="programlisting"><a class="link" href="glib-URI-Functions.html#GUri" title="GUri"><span class="returnvalue">GUri</span></a> *
g_uri_build (<em class="parameter"><code><a class="link" href="glib-URI-Functions.html#GUriFlags" title="enum GUriFlags"><span class="type">GUriFlags</span></a> flags</code></em>,
             <em class="parameter"><code>const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="type">gchar</span></a> *scheme</code></em>,
             <em class="parameter"><code>const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="type">gchar</span></a> *userinfo</code></em>,
             <em class="parameter"><code>const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="type">gchar</span></a> *host</code></em>,
             <em class="parameter"><code><a class="link" href="glib-Basic-Types.html#gint" title="gint"><span class="type">gint</span></a> port</code></em>,
             <em class="parameter"><code>const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="type">gchar</span></a> *path</code></em>,
             <em class="parameter"><code>const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="type">gchar</span></a> *query</code></em>,
             <em class="parameter"><code>const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="type">gchar</span></a> *fragment</code></em>);</pre>
<p>Creates a new <a class="link" href="glib-URI-Functions.html#GUri" title="GUri"><span class="type">GUri</span></a> from the given components according to <em class="parameter"><code>flags</code></em>
.</p>
<p>See also <a class="link" href="glib-URI-Functions.html#g-uri-build-with-user" title="g_uri_build_with_user ()"><code class="function">g_uri_build_with_user()</code></a>, which allows specifying the
components of the "userinfo" separately.</p>
<div class="refsect3">
<a name="g-uri-build.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>flags</p></td>
<td class="parameter_description"><p>flags describing how to build the <a class="link" href="glib-URI-Functions.html#GUri" title="GUri"><span class="type">GUri</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>scheme</p></td>
<td class="parameter_description"><p>the URI scheme. </p></td>
<td class="parameter_annotations"><span class="annotation">[<acronym title="NULL must not be passed as the value in, out, in-out; or as a return value."><span class="acronym">not nullable</span></acronym>]</span></td>
</tr>
<tr>
<td class="parameter_name"><p>userinfo</p></td>
<td class="parameter_description"><p>the userinfo component, or <a class="link" href="glib-Standard-Macros.html#NULL:CAPS" title="NULL"><code class="literal">NULL</code></a>. </p></td>
<td class="parameter_annotations"><span class="annotation">[<acronym title="NULL may be passed as the value in, out, in-out; or as a return value."><span class="acronym">nullable</span></acronym>]</span></td>
</tr>
<tr>
<td class="parameter_name"><p>host</p></td>
<td class="parameter_description"><p>the host component, or <a class="link" href="glib-Standard-Macros.html#NULL:CAPS" title="NULL"><code class="literal">NULL</code></a>. </p></td>
<td class="parameter_annotations"><span class="annotation">[<acronym title="NULL may be passed as the value in, out, in-out; or as a return value."><span class="acronym">nullable</span></acronym>]</span></td>
</tr>
<tr>
<td class="parameter_name"><p>port</p></td>
<td class="parameter_description"><p>the port, or <code class="literal">-1</code></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>path</p></td>
<td class="parameter_description"><p>the path component. </p></td>
<td class="parameter_annotations"><span class="annotation">[<acronym title="NULL must not be passed as the value in, out, in-out; or as a return value."><span class="acronym">not nullable</span></acronym>]</span></td>
</tr>
<tr>
<td class="parameter_name"><p>query</p></td>
<td class="parameter_description"><p>the query component, or <a class="link" href="glib-Standard-Macros.html#NULL:CAPS" title="NULL"><code class="literal">NULL</code></a>. </p></td>
<td class="parameter_annotations"><span class="annotation">[<acronym title="NULL may be passed as the value in, out, in-out; or as a return value."><span class="acronym">nullable</span></acronym>]</span></td>
</tr>
<tr>
<td class="parameter_name"><p>fragment</p></td>
<td class="parameter_description"><p>the fragment, or <a class="link" href="glib-Standard-Macros.html#NULL:CAPS" title="NULL"><code class="literal">NULL</code></a>. </p></td>
<td class="parameter_annotations"><span class="annotation">[<acronym title="NULL may be passed as the value in, out, in-out; or as a return value."><span class="acronym">nullable</span></acronym>]</span></td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="g-uri-build.returns"></a><h4>Returns</h4>
<p>a new <a class="link" href="glib-URI-Functions.html#GUri" title="GUri"><span class="type">GUri</span></a>. </p>
<p><span class="annotation">[<acronym title="NULL must not be passed as the value in, out, in-out; or as a return value."><span class="acronym">not nullable</span></acronym>][<acronym title="The caller owns the data, and is responsible for free it."><span class="acronym">transfer full</span></acronym>]</span></p>
</div>
<p class="since">Since: <a class="link" href="api-index-2-66.html#api-index-2.66">2.66</a></p>
</div>
<hr>
<div class="refsect2">
<a name="g-uri-build-with-user"></a><h3>g_uri_build_with_user ()</h3>
<pre class="programlisting"><a class="link" href="glib-URI-Functions.html#GUri" title="GUri"><span class="returnvalue">GUri</span></a> *
g_uri_build_with_user (<em class="parameter"><code><a class="link" href="glib-URI-Functions.html#GUriFlags" title="enum GUriFlags"><span class="type">GUriFlags</span></a> flags</code></em>,
                       <em class="parameter"><code>const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="type">gchar</span></a> *scheme</code></em>,
                       <em class="parameter"><code>const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="type">gchar</span></a> *user</code></em>,
                       <em class="parameter"><code>const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="type">gchar</span></a> *password</code></em>,
                       <em class="parameter"><code>const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="type">gchar</span></a> *auth_params</code></em>,
                       <em class="parameter"><code>const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="type">gchar</span></a> *host</code></em>,
                       <em class="parameter"><code><a class="link" href="glib-Basic-Types.html#gint" title="gint"><span class="type">gint</span></a> port</code></em>,
                       <em class="parameter"><code>const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="type">gchar</span></a> *path</code></em>,
                       <em class="parameter"><code>const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="type">gchar</span></a> *query</code></em>,
                       <em class="parameter"><code>const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="type">gchar</span></a> *fragment</code></em>);</pre>
<p>Creates a new <a class="link" href="glib-URI-Functions.html#GUri" title="GUri"><span class="type">GUri</span></a> from the given components according to <em class="parameter"><code>flags</code></em>

(<a class="link" href="glib-URI-Functions.html#G-URI-FLAGS-HAS-PASSWORD:CAPS"><code class="literal">G_URI_FLAGS_HAS_PASSWORD</code></a> is added unconditionally). The <em class="parameter"><code>flags</code></em>
 must be
coherent with the passed values, in particular use <code class="literal">%</code>-encoded values with
<a class="link" href="glib-URI-Functions.html#G-URI-FLAGS-ENCODED:CAPS"><code class="literal">G_URI_FLAGS_ENCODED</code></a>.</p>
<p>In contrast to <a class="link" href="glib-URI-Functions.html#g-uri-build" title="g_uri_build ()"><code class="function">g_uri_build()</code></a>, this allows specifying the components
of the ‘userinfo’ field separately. Note that <em class="parameter"><code>user</code></em>
 must be non-<a class="link" href="glib-Standard-Macros.html#NULL:CAPS" title="NULL"><code class="literal">NULL</code></a>
if either <em class="parameter"><code>password</code></em>
 or <em class="parameter"><code>auth_params</code></em>
 is non-<a class="link" href="glib-Standard-Macros.html#NULL:CAPS" title="NULL"><code class="literal">NULL</code></a>.</p>
<div class="refsect3">
<a name="g-uri-build-with-user.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>flags</p></td>
<td class="parameter_description"><p>flags describing how to build the <a class="link" href="glib-URI-Functions.html#GUri" title="GUri"><span class="type">GUri</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>scheme</p></td>
<td class="parameter_description"><p>the URI scheme. </p></td>
<td class="parameter_annotations"><span class="annotation">[<acronym title="NULL must not be passed as the value in, out, in-out; or as a return value."><span class="acronym">not nullable</span></acronym>]</span></td>
</tr>
<tr>
<td class="parameter_name"><p>user</p></td>
<td class="parameter_description"><p>the user component of the userinfo, or <a class="link" href="glib-Standard-Macros.html#NULL:CAPS" title="NULL"><code class="literal">NULL</code></a>. </p></td>
<td class="parameter_annotations"><span class="annotation">[<acronym title="NULL may be passed as the value in, out, in-out; or as a return value."><span class="acronym">nullable</span></acronym>]</span></td>
</tr>
<tr>
<td class="parameter_name"><p>password</p></td>
<td class="parameter_description"><p>the password component of the userinfo, or <a class="link" href="glib-Standard-Macros.html#NULL:CAPS" title="NULL"><code class="literal">NULL</code></a>. </p></td>
<td class="parameter_annotations"><span class="annotation">[<acronym title="NULL may be passed as the value in, out, in-out; or as a return value."><span class="acronym">nullable</span></acronym>]</span></td>
</tr>
<tr>
<td class="parameter_name"><p>auth_params</p></td>
<td class="parameter_description"><p>the auth params of the userinfo, or <a class="link" href="glib-Standard-Macros.html#NULL:CAPS" title="NULL"><code class="literal">NULL</code></a>. </p></td>
<td class="parameter_annotations"><span class="annotation">[<acronym title="NULL may be passed as the value in, out, in-out; or as a return value."><span class="acronym">nullable</span></acronym>]</span></td>
</tr>
<tr>
<td class="parameter_name"><p>host</p></td>
<td class="parameter_description"><p>the host component, or <a class="link" href="glib-Standard-Macros.html#NULL:CAPS" title="NULL"><code class="literal">NULL</code></a>. </p></td>
<td class="parameter_annotations"><span class="annotation">[<acronym title="NULL may be passed as the value in, out, in-out; or as a return value."><span class="acronym">nullable</span></acronym>]</span></td>
</tr>
<tr>
<td class="parameter_name"><p>port</p></td>
<td class="parameter_description"><p>the port, or <code class="literal">-1</code></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>path</p></td>
<td class="parameter_description"><p>the path component. </p></td>
<td class="parameter_annotations"><span class="annotation">[<acronym title="NULL must not be passed as the value in, out, in-out; or as a return value."><span class="acronym">not nullable</span></acronym>]</span></td>
</tr>
<tr>
<td class="parameter_name"><p>query</p></td>
<td class="parameter_description"><p>the query component, or <a class="link" href="glib-Standard-Macros.html#NULL:CAPS" title="NULL"><code class="literal">NULL</code></a>. </p></td>
<td class="parameter_annotations"><span class="annotation">[<acronym title="NULL may be passed as the value in, out, in-out; or as a return value."><span class="acronym">nullable</span></acronym>]</span></td>
</tr>
<tr>
<td class="parameter_name"><p>fragment</p></td>
<td class="parameter_description"><p>the fragment, or <a class="link" href="glib-Standard-Macros.html#NULL:CAPS" title="NULL"><code class="literal">NULL</code></a>. </p></td>
<td class="parameter_annotations"><span class="annotation">[<acronym title="NULL may be passed as the value in, out, in-out; or as a return value."><span class="acronym">nullable</span></acronym>]</span></td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="g-uri-build-with-user.returns"></a><h4>Returns</h4>
<p>a new <a class="link" href="glib-URI-Functions.html#GUri" title="GUri"><span class="type">GUri</span></a>. </p>
<p><span class="annotation">[<acronym title="NULL must not be passed as the value in, out, in-out; or as a return value."><span class="acronym">not nullable</span></acronym>][<acronym title="The caller owns the data, and is responsible for free it."><span class="acronym">transfer full</span></acronym>]</span></p>
</div>
<p class="since">Since: <a class="link" href="api-index-2-66.html#api-index-2.66">2.66</a></p>
</div>
<hr>
<div class="refsect2">
<a name="g-uri-peek-scheme"></a><h3>g_uri_peek_scheme ()</h3>
<pre class="programlisting">const <span class="returnvalue">char</span> *
g_uri_peek_scheme (<em class="parameter"><code>const <span class="type">char</span> *uri</code></em>);</pre>
<p>Gets the scheme portion of a URI string.
<a class="ulink" href="https://tools.ietf.org/html/rfc3986#section-3" target="_top">RFC 3986</a> decodes the scheme
as:</p>
<div class="informalexample">
  <table class="listing_frame" border="0" cellpadding="0" cellspacing="0">
    <tbody>
      <tr>
        <td class="listing_lines" align="right"><pre>1</pre></td>
        <td class="listing_code"><pre class="programlisting"><span class="n">URI</span> <span class="o">=</span> <span class="n">scheme</span> <span class="s">&quot;:&quot;</span> <span class="n">hier</span><span class="o">-</span><span class="n">part</span> <span class="p">[</span> <span class="s">&quot;?&quot;</span> <span class="n">query</span> <span class="p">]</span> <span class="p">[</span> <span class="s">&quot;#&quot;</span> <span class="n">fragment</span> <span class="p">]</span></pre></td>
      </tr>
    </tbody>
  </table>
</div>

<p>
Common schemes include <code class="literal">file</code>, <code class="literal">https</code>, <code class="literal">svn+ssh</code>, etc.</p>
<p>Unlike <a class="link" href="glib-URI-Functions.html#g-uri-parse-scheme" title="g_uri_parse_scheme ()"><code class="function">g_uri_parse_scheme()</code></a>, the returned scheme is normalized to
all-lowercase and does not need to be freed.</p>
<div class="refsect3">
<a name="g-uri-peek-scheme.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>uri</p></td>
<td class="parameter_description"><p>a valid URI.</p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="g-uri-peek-scheme.returns"></a><h4>Returns</h4>
<p>The ‘scheme’ component of the URI, or
<a class="link" href="glib-Standard-Macros.html#NULL:CAPS" title="NULL"><code class="literal">NULL</code></a> on error. The returned string is normalized to all-lowercase, and
interned via <a class="link" href="glib-Quarks.html#g-intern-string" title="g_intern_string ()"><code class="function">g_intern_string()</code></a>, so it does not need to be freed. </p>
<p><span class="annotation">[<acronym title="The data is owned by the callee, which is responsible of freeing it."><span class="acronym">transfer none</span></acronym>][<acronym title="NULL may be passed as the value in, out, in-out; or as a return value."><span class="acronym">nullable</span></acronym>]</span></p>
</div>
<p class="since">Since: <a class="link" href="api-index-2-66.html#api-index-2.66">2.66</a></p>
</div>
<hr>
<div class="refsect2">
<a name="g-uri-parse-scheme"></a><h3>g_uri_parse_scheme ()</h3>
<pre class="programlisting"><span class="returnvalue">char</span> *
g_uri_parse_scheme (<em class="parameter"><code>const <span class="type">char</span> *uri</code></em>);</pre>
<p>Gets the scheme portion of a URI string.
<a class="ulink" href="https://tools.ietf.org/html/rfc3986#section-3" target="_top">RFC 3986</a> decodes the scheme
as:</p>
<div class="informalexample">
  <table class="listing_frame" border="0" cellpadding="0" cellspacing="0">
    <tbody>
      <tr>
        <td class="listing_lines" align="right"><pre>1</pre></td>
        <td class="listing_code"><pre class="programlisting"><span class="n">URI</span> <span class="o">=</span> <span class="n">scheme</span> <span class="s">&quot;:&quot;</span> <span class="n">hier</span><span class="o">-</span><span class="n">part</span> <span class="p">[</span> <span class="s">&quot;?&quot;</span> <span class="n">query</span> <span class="p">]</span> <span class="p">[</span> <span class="s">&quot;#&quot;</span> <span class="n">fragment</span> <span class="p">]</span></pre></td>
      </tr>
    </tbody>
  </table>
</div>

<p>
Common schemes include <code class="literal">file</code>, <code class="literal">https</code>, <code class="literal">svn+ssh</code>, etc.</p>
<div class="refsect3">
<a name="g-uri-parse-scheme.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>uri</p></td>
<td class="parameter_description"><p>a valid URI.</p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="g-uri-parse-scheme.returns"></a><h4>Returns</h4>
<p>The ‘scheme’ component of the URI, or
<a class="link" href="glib-Standard-Macros.html#NULL:CAPS" title="NULL"><code class="literal">NULL</code></a> on error. The returned string should be freed when no longer needed. </p>
<p><span class="annotation">[<acronym title="The caller owns the data, and is responsible for free it."><span class="acronym">transfer full</span></acronym>][<acronym title="NULL may be passed as the value in, out, in-out; or as a return value."><span class="acronym">nullable</span></acronym>]</span></p>
</div>
<p class="since">Since: <a class="link" href="api-index-2-16.html#api-index-2.16">2.16</a></p>
</div>
<hr>
<div class="refsect2">
<a name="g-uri-to-string"></a><h3>g_uri_to_string ()</h3>
<pre class="programlisting"><span class="returnvalue">char</span> *
g_uri_to_string (<em class="parameter"><code><a class="link" href="glib-URI-Functions.html#GUri" title="GUri"><span class="type">GUri</span></a> *uri</code></em>);</pre>
<p>Returns a string representing <em class="parameter"><code>uri</code></em>
.</p>
<p>This is not guaranteed to return a string which is identical to the
string that <em class="parameter"><code>uri</code></em>
 was parsed from. However, if the source URI was
syntactically correct (according to RFC 3986), and it was parsed
with <a class="link" href="glib-URI-Functions.html#G-URI-FLAGS-ENCODED:CAPS"><code class="literal">G_URI_FLAGS_ENCODED</code></a>, then <a class="link" href="glib-URI-Functions.html#g-uri-to-string" title="g_uri_to_string ()"><code class="function">g_uri_to_string()</code></a> is guaranteed to return
a string which is at least semantically equivalent to the source
URI (according to RFC 3986).</p>
<p>If <em class="parameter"><code>uri</code></em>
 might contain sensitive details, such as authentication parameters,
or private data in its query string, and the returned string is going to be
logged, then consider using <a class="link" href="glib-URI-Functions.html#g-uri-to-string-partial" title="g_uri_to_string_partial ()"><code class="function">g_uri_to_string_partial()</code></a> to redact parts.</p>
<div class="refsect3">
<a name="g-uri-to-string.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>uri</p></td>
<td class="parameter_description"><p>a <a class="link" href="glib-URI-Functions.html#GUri" title="GUri"><span class="type">GUri</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="g-uri-to-string.returns"></a><h4>Returns</h4>
<p>a string representing <em class="parameter"><code>uri</code></em>
,
which the caller must free. </p>
<p><span class="annotation">[<acronym title="NULL must not be passed as the value in, out, in-out; or as a return value."><span class="acronym">not nullable</span></acronym>][<acronym title="The caller owns the data, and is responsible for free it."><span class="acronym">transfer full</span></acronym>]</span></p>
</div>
<p class="since">Since: <a class="link" href="api-index-2-66.html#api-index-2.66">2.66</a></p>
</div>
<hr>
<div class="refsect2">
<a name="g-uri-to-string-partial"></a><h3>g_uri_to_string_partial ()</h3>
<pre class="programlisting"><span class="returnvalue">char</span> *
g_uri_to_string_partial (<em class="parameter"><code><a class="link" href="glib-URI-Functions.html#GUri" title="GUri"><span class="type">GUri</span></a> *uri</code></em>,
                         <em class="parameter"><code><a class="link" href="glib-URI-Functions.html#GUriHideFlags" title="enum GUriHideFlags"><span class="type">GUriHideFlags</span></a> flags</code></em>);</pre>
<p>Returns a string representing <em class="parameter"><code>uri</code></em>
, subject to the options in
<em class="parameter"><code>flags</code></em>
. See <a class="link" href="glib-URI-Functions.html#g-uri-to-string" title="g_uri_to_string ()"><code class="function">g_uri_to_string()</code></a> and <a class="link" href="glib-URI-Functions.html#GUriHideFlags" title="enum GUriHideFlags"><span class="type">GUriHideFlags</span></a> for more details.</p>
<div class="refsect3">
<a name="g-uri-to-string-partial.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>uri</p></td>
<td class="parameter_description"><p>a <a class="link" href="glib-URI-Functions.html#GUri" title="GUri"><span class="type">GUri</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>flags</p></td>
<td class="parameter_description"><p>flags describing what parts of <em class="parameter"><code>uri</code></em>
to hide</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="g-uri-to-string-partial.returns"></a><h4>Returns</h4>
<p>a string representing
<em class="parameter"><code>uri</code></em>
, which the caller must free. </p>
<p><span class="annotation">[<acronym title="NULL must not be passed as the value in, out, in-out; or as a return value."><span class="acronym">not nullable</span></acronym>][<acronym title="The caller owns the data, and is responsible for free it."><span class="acronym">transfer full</span></acronym>]</span></p>
</div>
<p class="since">Since: <a class="link" href="api-index-2-66.html#api-index-2.66">2.66</a></p>
</div>
<hr>
<div class="refsect2">
<a name="g-uri-get-scheme"></a><h3>g_uri_get_scheme ()</h3>
<pre class="programlisting">const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="returnvalue">gchar</span></a> *
g_uri_get_scheme (<em class="parameter"><code><a class="link" href="glib-URI-Functions.html#GUri" title="GUri"><span class="type">GUri</span></a> *uri</code></em>);</pre>
<p>Gets <em class="parameter"><code>uri</code></em>
's scheme. Note that this will always be all-lowercase,
regardless of the string or strings that <em class="parameter"><code>uri</code></em>
 was created from.</p>
<div class="refsect3">
<a name="g-uri-get-scheme.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>uri</p></td>
<td class="parameter_description"><p>a <a class="link" href="glib-URI-Functions.html#GUri" title="GUri"><span class="type">GUri</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="g-uri-get-scheme.returns"></a><h4>Returns</h4>
<p><em class="parameter"><code>uri</code></em>
's scheme. </p>
<p><span class="annotation">[<acronym title="NULL must not be passed as the value in, out, in-out; or as a return value."><span class="acronym">not nullable</span></acronym>]</span></p>
</div>
<p class="since">Since: <a class="link" href="api-index-2-66.html#api-index-2.66">2.66</a></p>
</div>
<hr>
<div class="refsect2">
<a name="g-uri-get-userinfo"></a><h3>g_uri_get_userinfo ()</h3>
<pre class="programlisting">const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="returnvalue">gchar</span></a> *
g_uri_get_userinfo (<em class="parameter"><code><a class="link" href="glib-URI-Functions.html#GUri" title="GUri"><span class="type">GUri</span></a> *uri</code></em>);</pre>
<p>Gets <em class="parameter"><code>uri</code></em>
's userinfo, which may contain <code class="literal">%</code>-encoding, depending on
the flags with which <em class="parameter"><code>uri</code></em>
 was created.</p>
<div class="refsect3">
<a name="g-uri-get-userinfo.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>uri</p></td>
<td class="parameter_description"><p>a <a class="link" href="glib-URI-Functions.html#GUri" title="GUri"><span class="type">GUri</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="g-uri-get-userinfo.returns"></a><h4>Returns</h4>
<p><em class="parameter"><code>uri</code></em>
's userinfo. </p>
<p><span class="annotation">[<acronym title="NULL may be passed as the value in, out, in-out; or as a return value."><span class="acronym">nullable</span></acronym>]</span></p>
</div>
<p class="since">Since: <a class="link" href="api-index-2-66.html#api-index-2.66">2.66</a></p>
</div>
<hr>
<div class="refsect2">
<a name="g-uri-get-user"></a><h3>g_uri_get_user ()</h3>
<pre class="programlisting">const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="returnvalue">gchar</span></a> *
g_uri_get_user (<em class="parameter"><code><a class="link" href="glib-URI-Functions.html#GUri" title="GUri"><span class="type">GUri</span></a> *uri</code></em>);</pre>
<p>Gets the ‘username’ component of <em class="parameter"><code>uri</code></em>
's userinfo, which may contain
<code class="literal">%</code>-encoding, depending on the flags with which <em class="parameter"><code>uri</code></em>
 was created.
If <em class="parameter"><code>uri</code></em>
 was not created with <a class="link" href="glib-URI-Functions.html#G-URI-FLAGS-HAS-PASSWORD:CAPS"><code class="literal">G_URI_FLAGS_HAS_PASSWORD</code></a> or
<a class="link" href="glib-URI-Functions.html#G-URI-FLAGS-HAS-AUTH-PARAMS:CAPS"><code class="literal">G_URI_FLAGS_HAS_AUTH_PARAMS</code></a>, this is the same as <a class="link" href="glib-URI-Functions.html#g-uri-get-userinfo" title="g_uri_get_userinfo ()"><code class="function">g_uri_get_userinfo()</code></a>.</p>
<div class="refsect3">
<a name="g-uri-get-user.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>uri</p></td>
<td class="parameter_description"><p>a <a class="link" href="glib-URI-Functions.html#GUri" title="GUri"><span class="type">GUri</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="g-uri-get-user.returns"></a><h4>Returns</h4>
<p><em class="parameter"><code>uri</code></em>
's user. </p>
<p><span class="annotation">[<acronym title="NULL may be passed as the value in, out, in-out; or as a return value."><span class="acronym">nullable</span></acronym>]</span></p>
</div>
<p class="since">Since: <a class="link" href="api-index-2-66.html#api-index-2.66">2.66</a></p>
</div>
<hr>
<div class="refsect2">
<a name="g-uri-get-password"></a><h3>g_uri_get_password ()</h3>
<pre class="programlisting">const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="returnvalue">gchar</span></a> *
g_uri_get_password (<em class="parameter"><code><a class="link" href="glib-URI-Functions.html#GUri" title="GUri"><span class="type">GUri</span></a> *uri</code></em>);</pre>
<p>Gets <em class="parameter"><code>uri</code></em>
's password, which may contain <code class="literal">%</code>-encoding, depending on
the flags with which <em class="parameter"><code>uri</code></em>
 was created. (If <em class="parameter"><code>uri</code></em>
 was not created
with <a class="link" href="glib-URI-Functions.html#G-URI-FLAGS-HAS-PASSWORD:CAPS"><code class="literal">G_URI_FLAGS_HAS_PASSWORD</code></a> then this will be <a class="link" href="glib-Standard-Macros.html#NULL:CAPS" title="NULL"><code class="literal">NULL</code></a>.)</p>
<div class="refsect3">
<a name="g-uri-get-password.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>uri</p></td>
<td class="parameter_description"><p>a <a class="link" href="glib-URI-Functions.html#GUri" title="GUri"><span class="type">GUri</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="g-uri-get-password.returns"></a><h4>Returns</h4>
<p><em class="parameter"><code>uri</code></em>
's password. </p>
<p><span class="annotation">[<acronym title="NULL may be passed as the value in, out, in-out; or as a return value."><span class="acronym">nullable</span></acronym>]</span></p>
</div>
<p class="since">Since: <a class="link" href="api-index-2-66.html#api-index-2.66">2.66</a></p>
</div>
<hr>
<div class="refsect2">
<a name="g-uri-get-auth-params"></a><h3>g_uri_get_auth_params ()</h3>
<pre class="programlisting">const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="returnvalue">gchar</span></a> *
g_uri_get_auth_params (<em class="parameter"><code><a class="link" href="glib-URI-Functions.html#GUri" title="GUri"><span class="type">GUri</span></a> *uri</code></em>);</pre>
<p>Gets <em class="parameter"><code>uri</code></em>
's authentication parameters, which may contain
<code class="literal">%</code>-encoding, depending on the flags with which <em class="parameter"><code>uri</code></em>
 was created.
(If <em class="parameter"><code>uri</code></em>
 was not created with <a class="link" href="glib-URI-Functions.html#G-URI-FLAGS-HAS-AUTH-PARAMS:CAPS"><code class="literal">G_URI_FLAGS_HAS_AUTH_PARAMS</code></a> then this will
be <a class="link" href="glib-Standard-Macros.html#NULL:CAPS" title="NULL"><code class="literal">NULL</code></a>.)</p>
<p>Depending on the URI scheme, <a class="link" href="glib-URI-Functions.html#g-uri-parse-params" title="g_uri_parse_params ()"><code class="function">g_uri_parse_params()</code></a> may be useful for
further parsing this information.</p>
<div class="refsect3">
<a name="g-uri-get-auth-params.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>uri</p></td>
<td class="parameter_description"><p>a <a class="link" href="glib-URI-Functions.html#GUri" title="GUri"><span class="type">GUri</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="g-uri-get-auth-params.returns"></a><h4>Returns</h4>
<p><em class="parameter"><code>uri</code></em>
's authentication parameters. </p>
<p><span class="annotation">[<acronym title="NULL may be passed as the value in, out, in-out; or as a return value."><span class="acronym">nullable</span></acronym>]</span></p>
</div>
<p class="since">Since: <a class="link" href="api-index-2-66.html#api-index-2.66">2.66</a></p>
</div>
<hr>
<div class="refsect2">
<a name="g-uri-get-host"></a><h3>g_uri_get_host ()</h3>
<pre class="programlisting">const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="returnvalue">gchar</span></a> *
g_uri_get_host (<em class="parameter"><code><a class="link" href="glib-URI-Functions.html#GUri" title="GUri"><span class="type">GUri</span></a> *uri</code></em>);</pre>
<p>Gets <em class="parameter"><code>uri</code></em>
's host. This will never have <code class="literal">%</code>-encoded characters,
unless it is non-UTF-8 (which can only be the case if <em class="parameter"><code>uri</code></em>
 was
created with <a class="link" href="glib-URI-Functions.html#G-URI-FLAGS-NON-DNS:CAPS"><code class="literal">G_URI_FLAGS_NON_DNS</code></a>).</p>
<p>If <em class="parameter"><code>uri</code></em>
 contained an IPv6 address literal, this value will be just
that address, without the brackets around it that are necessary in
the string form of the URI. Note that in this case there may also
be a scope ID attached to the address. Eg, `fe80::1234%`<code class="literal">em1</code> (or
`fe80::1234%`<code class="literal">25em1</code> if the string is still encoded).</p>
<div class="refsect3">
<a name="g-uri-get-host.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>uri</p></td>
<td class="parameter_description"><p>a <a class="link" href="glib-URI-Functions.html#GUri" title="GUri"><span class="type">GUri</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="g-uri-get-host.returns"></a><h4>Returns</h4>
<p><em class="parameter"><code>uri</code></em>
's host. </p>
<p><span class="annotation">[<acronym title="NULL must not be passed as the value in, out, in-out; or as a return value."><span class="acronym">not nullable</span></acronym>]</span></p>
</div>
<p class="since">Since: <a class="link" href="api-index-2-66.html#api-index-2.66">2.66</a></p>
</div>
<hr>
<div class="refsect2">
<a name="g-uri-get-port"></a><h3>g_uri_get_port ()</h3>
<pre class="programlisting"><a class="link" href="glib-Basic-Types.html#gint" title="gint"><span class="returnvalue">gint</span></a>
g_uri_get_port (<em class="parameter"><code><a class="link" href="glib-URI-Functions.html#GUri" title="GUri"><span class="type">GUri</span></a> *uri</code></em>);</pre>
<p>Gets <em class="parameter"><code>uri</code></em>
's port.</p>
<div class="refsect3">
<a name="g-uri-get-port.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>uri</p></td>
<td class="parameter_description"><p>a <a class="link" href="glib-URI-Functions.html#GUri" title="GUri"><span class="type">GUri</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="g-uri-get-port.returns"></a><h4>Returns</h4>
<p> <em class="parameter"><code>uri</code></em>
's port, or <code class="literal">-1</code> if no port was specified.</p>
</div>
<p class="since">Since: <a class="link" href="api-index-2-66.html#api-index-2.66">2.66</a></p>
</div>
<hr>
<div class="refsect2">
<a name="g-uri-get-path"></a><h3>g_uri_get_path ()</h3>
<pre class="programlisting">const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="returnvalue">gchar</span></a> *
g_uri_get_path (<em class="parameter"><code><a class="link" href="glib-URI-Functions.html#GUri" title="GUri"><span class="type">GUri</span></a> *uri</code></em>);</pre>
<p>Gets <em class="parameter"><code>uri</code></em>
's path, which may contain <code class="literal">%</code>-encoding, depending on the
flags with which <em class="parameter"><code>uri</code></em>
 was created.</p>
<div class="refsect3">
<a name="g-uri-get-path.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>uri</p></td>
<td class="parameter_description"><p>a <a class="link" href="glib-URI-Functions.html#GUri" title="GUri"><span class="type">GUri</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="g-uri-get-path.returns"></a><h4>Returns</h4>
<p><em class="parameter"><code>uri</code></em>
's path. </p>
<p><span class="annotation">[<acronym title="NULL must not be passed as the value in, out, in-out; or as a return value."><span class="acronym">not nullable</span></acronym>]</span></p>
</div>
<p class="since">Since: <a class="link" href="api-index-2-66.html#api-index-2.66">2.66</a></p>
</div>
<hr>
<div class="refsect2">
<a name="g-uri-get-query"></a><h3>g_uri_get_query ()</h3>
<pre class="programlisting">const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="returnvalue">gchar</span></a> *
g_uri_get_query (<em class="parameter"><code><a class="link" href="glib-URI-Functions.html#GUri" title="GUri"><span class="type">GUri</span></a> *uri</code></em>);</pre>
<p>Gets <em class="parameter"><code>uri</code></em>
's query, which may contain <code class="literal">%</code>-encoding, depending on the
flags with which <em class="parameter"><code>uri</code></em>
 was created.</p>
<p>For queries consisting of a series of <code class="literal">name=value</code> parameters,
<a class="link" href="glib-URI-Functions.html#GUriParamsIter" title="struct GUriParamsIter"><span class="type">GUriParamsIter</span></a> or <a class="link" href="glib-URI-Functions.html#g-uri-parse-params" title="g_uri_parse_params ()"><code class="function">g_uri_parse_params()</code></a> may be useful.</p>
<div class="refsect3">
<a name="g-uri-get-query.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>uri</p></td>
<td class="parameter_description"><p>a <a class="link" href="glib-URI-Functions.html#GUri" title="GUri"><span class="type">GUri</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="g-uri-get-query.returns"></a><h4>Returns</h4>
<p><em class="parameter"><code>uri</code></em>
's query. </p>
<p><span class="annotation">[<acronym title="NULL may be passed as the value in, out, in-out; or as a return value."><span class="acronym">nullable</span></acronym>]</span></p>
</div>
<p class="since">Since: <a class="link" href="api-index-2-66.html#api-index-2.66">2.66</a></p>
</div>
<hr>
<div class="refsect2">
<a name="g-uri-get-fragment"></a><h3>g_uri_get_fragment ()</h3>
<pre class="programlisting">const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="returnvalue">gchar</span></a> *
g_uri_get_fragment (<em class="parameter"><code><a class="link" href="glib-URI-Functions.html#GUri" title="GUri"><span class="type">GUri</span></a> *uri</code></em>);</pre>
<p>Gets <em class="parameter"><code>uri</code></em>
's fragment, which may contain <code class="literal">%</code>-encoding, depending on
the flags with which <em class="parameter"><code>uri</code></em>
 was created.</p>
<div class="refsect3">
<a name="g-uri-get-fragment.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>uri</p></td>
<td class="parameter_description"><p>a <a class="link" href="glib-URI-Functions.html#GUri" title="GUri"><span class="type">GUri</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="g-uri-get-fragment.returns"></a><h4>Returns</h4>
<p><em class="parameter"><code>uri</code></em>
's fragment. </p>
<p><span class="annotation">[<acronym title="NULL may be passed as the value in, out, in-out; or as a return value."><span class="acronym">nullable</span></acronym>]</span></p>
</div>
<p class="since">Since: <a class="link" href="api-index-2-66.html#api-index-2.66">2.66</a></p>
</div>
<hr>
<div class="refsect2">
<a name="g-uri-get-flags"></a><h3>g_uri_get_flags ()</h3>
<pre class="programlisting"><a class="link" href="glib-URI-Functions.html#GUriFlags" title="enum GUriFlags"><span class="returnvalue">GUriFlags</span></a>
g_uri_get_flags (<em class="parameter"><code><a class="link" href="glib-URI-Functions.html#GUri" title="GUri"><span class="type">GUri</span></a> *uri</code></em>);</pre>
<p>Gets <em class="parameter"><code>uri</code></em>
's flags set upon construction.</p>
<div class="refsect3">
<a name="g-uri-get-flags.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>uri</p></td>
<td class="parameter_description"><p>a <a class="link" href="glib-URI-Functions.html#GUri" title="GUri"><span class="type">GUri</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="g-uri-get-flags.returns"></a><h4>Returns</h4>
<p> <em class="parameter"><code>uri</code></em>
's flags.</p>
</div>
<p class="since">Since: <a class="link" href="api-index-2-66.html#api-index-2.66">2.66</a></p>
</div>
<hr>
<div class="refsect2">
<a name="g-uri-params-iter-init"></a><h3>g_uri_params_iter_init ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
g_uri_params_iter_init (<em class="parameter"><code><a class="link" href="glib-URI-Functions.html#GUriParamsIter" title="struct GUriParamsIter"><span class="type">GUriParamsIter</span></a> *iter</code></em>,
                        <em class="parameter"><code>const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="type">gchar</span></a> *params</code></em>,
                        <em class="parameter"><code><a class="link" href="glib-Basic-Types.html#gssize" title="gssize"><span class="type">gssize</span></a> length</code></em>,
                        <em class="parameter"><code>const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="type">gchar</span></a> *separators</code></em>,
                        <em class="parameter"><code><a class="link" href="glib-URI-Functions.html#GUriParamsFlags" title="enum GUriParamsFlags"><span class="type">GUriParamsFlags</span></a> flags</code></em>);</pre>
<p>Initializes an attribute/value pair iterator.</p>
<p>The iterator keeps pointers to the <em class="parameter"><code>params</code></em>
 and <em class="parameter"><code>separators</code></em>
 arguments, those
variables must thus outlive the iterator and not be modified during the
iteration.</p>
<p>If <a class="link" href="glib-URI-Functions.html#G-URI-PARAMS-WWW-FORM:CAPS"><code class="literal">G_URI_PARAMS_WWW_FORM</code></a> is passed in <em class="parameter"><code>flags</code></em>
, <code class="literal">+</code> characters in the param
string will be replaced with spaces in the output. For example, <code class="literal">foo=bar+baz</code>
will give attribute <code class="literal">foo</code> with value <code class="literal">bar baz</code>. This is commonly used on the
web (the <code class="literal">https</code> and <code class="literal">http</code> schemes only), but is deprecated in favour of
the equivalent of encoding spaces as <code class="literal">%20</code>.</p>
<p>Unlike with <a class="link" href="glib-URI-Functions.html#g-uri-parse-params" title="g_uri_parse_params ()"><code class="function">g_uri_parse_params()</code></a>, <a class="link" href="glib-URI-Functions.html#G-URI-PARAMS-CASE-INSENSITIVE:CAPS"><code class="literal">G_URI_PARAMS_CASE_INSENSITIVE</code></a> has no
effect if passed to <em class="parameter"><code>flags</code></em>
 for <a class="link" href="glib-URI-Functions.html#g-uri-params-iter-init" title="g_uri_params_iter_init ()"><code class="function">g_uri_params_iter_init()</code></a>. The caller is
responsible for doing their own case-insensitive comparisons.</p>
<div class="informalexample">
  <table class="listing_frame" border="0" cellpadding="0" cellspacing="0">
    <tbody>
      <tr>
        <td class="listing_lines" align="right"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15</pre></td>
        <td class="listing_code"><pre class="programlisting"><span class="n">GUriParamsIter</span> <span class="n">iter</span><span class="p">;</span>
<span class="n">GError</span> <span class="o">*</span><span class="n">error</span> <span class="o">=</span> <span class="nb">NULL</span><span class="p">;</span>
<span class="n">gchar</span> <span class="o">*</span><span class="n">unowned_attr</span><span class="p">,</span> <span class="o">*</span><span class="n">unowned_value</span><span class="p">;</span>

<span class="n">g_uri_params_iter_init</span> <span class="p">(</span><span class="o">&amp;</span><span class="n">iter</span><span class="p">,</span> <span class="s">&quot;foo=bar&amp;baz=bar&amp;Foo=frob&amp;baz=bar2&quot;</span><span class="p">,</span> <span class="o">-</span><span class="mi">1</span><span class="p">,</span> <span class="s">&quot;&amp;&quot;</span><span class="p">,</span> <span class="n">G_URI_PARAMS_NONE</span><span class="p">);</span>
<span class="k">while</span> <span class="p">(</span><span class="n">g_uri_params_iter_next</span> <span class="p">(</span><span class="o">&amp;</span><span class="n">iter</span><span class="p">,</span> <span class="o">&amp;</span><span class="n">unowned_attr</span><span class="p">,</span> <span class="o">&amp;</span><span class="n">unowned_value</span><span class="p">,</span> <span class="o">&amp;</span><span class="n">error</span><span class="p">))</span>
  <span class="p">{</span>
    <span class="n">g_autofree</span> <span class="n">gchar</span> <span class="o">*</span><span class="n">attr</span> <span class="o">=</span> <span class="n">g_steal_pointer</span> <span class="p">(</span><span class="o">&amp;</span><span class="n">unowned_attr</span><span class="p">);</span>
    <span class="n">g_autofree</span> <span class="n">gchar</span> <span class="o">*</span><span class="n">value</span> <span class="o">=</span> <span class="n">g_steal_pointer</span> <span class="p">(</span><span class="o">&amp;</span><span class="n">unowned_value</span><span class="p">);</span>
    <span class="c1">// do something with attr and value; this code will be called 4 times</span>
    <span class="c1">// for the params string in this example: once with attr=foo and value=bar,</span>
    <span class="c1">// then with baz/bar, then Foo/frob, then baz/bar2.</span>
  <span class="p">}</span>
<span class="k">if</span> <span class="p">(</span><span class="n">error</span><span class="p">)</span>
  <span class="c1">// handle parsing error</span></pre></td>
      </tr>
    </tbody>
  </table>
</div>

<p></p>
<div class="refsect3">
<a name="g-uri-params-iter-init.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>iter</p></td>
<td class="parameter_description"><p>an uninitialized <a class="link" href="glib-URI-Functions.html#GUriParamsIter" title="struct GUriParamsIter"><span class="type">GUriParamsIter</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>params</p></td>
<td class="parameter_description"><p>a <code class="literal">%</code>-encoded string containing <code class="literal">attribute=value</code>
parameters</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>length</p></td>
<td class="parameter_description"><p>the length of <em class="parameter"><code>params</code></em>
, or <code class="literal">-1</code> if it is nul-terminated</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>separators</p></td>
<td class="parameter_description"><p>the separator byte character set between parameters. (usually
<code class="literal">&amp;amp;</code>, but sometimes <code class="literal">;</code> or both <code class="literal">&amp;amp;;</code>). Note that this function works on
bytes not characters, so it can't be used to delimit UTF-8 strings for
anything but ASCII characters. You may pass an empty set, in which case
no splitting will occur.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>flags</p></td>
<td class="parameter_description"><p>flags to modify the way the parameters are handled.</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<p class="since">Since: <a class="link" href="api-index-2-66.html#api-index-2.66">2.66</a></p>
</div>
<hr>
<div class="refsect2">
<a name="g-uri-params-iter-next"></a><h3>g_uri_params_iter_next ()</h3>
<pre class="programlisting"><a class="link" href="glib-Basic-Types.html#gboolean" title="gboolean"><span class="returnvalue">gboolean</span></a>
g_uri_params_iter_next (<em class="parameter"><code><a class="link" href="glib-URI-Functions.html#GUriParamsIter" title="struct GUriParamsIter"><span class="type">GUriParamsIter</span></a> *iter</code></em>,
                        <em class="parameter"><code><a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="type">gchar</span></a> **attribute</code></em>,
                        <em class="parameter"><code><a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="type">gchar</span></a> **value</code></em>,
                        <em class="parameter"><code><a class="link" href="glib-Error-Reporting.html#GError" title="struct GError"><span class="type">GError</span></a> **error</code></em>);</pre>
<p>Advances <em class="parameter"><code>iter</code></em>
 and retrieves the next attribute/value. <a class="link" href="glib-Standard-Macros.html#FALSE:CAPS" title="FALSE"><code class="literal">FALSE</code></a> is returned if
an error has occurred (in which case <em class="parameter"><code>error</code></em>
 is set), or if the end of the
iteration is reached (in which case <em class="parameter"><code>attribute</code></em>
 and <em class="parameter"><code>value</code></em>
 are set to <a class="link" href="glib-Standard-Macros.html#NULL:CAPS" title="NULL"><code class="literal">NULL</code></a>
and the iterator becomes invalid). If <a class="link" href="glib-Standard-Macros.html#TRUE:CAPS" title="TRUE"><code class="literal">TRUE</code></a> is returned,
<a class="link" href="glib-URI-Functions.html#g-uri-params-iter-next" title="g_uri_params_iter_next ()"><code class="function">g_uri_params_iter_next()</code></a> may be called again to receive another
attribute/value pair.</p>
<p>Note that the same <em class="parameter"><code>attribute</code></em>
 may be returned multiple times, since URIs
allow repeated attributes.</p>
<div class="refsect3">
<a name="g-uri-params-iter-next.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>iter</p></td>
<td class="parameter_description"><p>an initialized <a class="link" href="glib-URI-Functions.html#GUriParamsIter" title="struct GUriParamsIter"><span class="type">GUriParamsIter</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>attribute</p></td>
<td class="parameter_description"><p>on return, contains
the attribute, or <a class="link" href="glib-Standard-Macros.html#NULL:CAPS" title="NULL"><code class="literal">NULL</code></a>. </p></td>
<td class="parameter_annotations"><span class="annotation">[<acronym title="Parameter for returning results. Default is transfer full."><span class="acronym">out</span></acronym>][<acronym title="NULL may be passed as the value in, out, in-out; or as a return value."><span class="acronym">nullable</span></acronym>][<acronym title="NULL may be passed instead of a pointer to a location."><span class="acronym">optional</span></acronym>][<acronym title="The caller owns the data, and is responsible for free it."><span class="acronym">transfer full</span></acronym>]</span></td>
</tr>
<tr>
<td class="parameter_name"><p>value</p></td>
<td class="parameter_description"><p>on return, contains
the value, or <a class="link" href="glib-Standard-Macros.html#NULL:CAPS" title="NULL"><code class="literal">NULL</code></a>. </p></td>
<td class="parameter_annotations"><span class="annotation">[<acronym title="Parameter for returning results. Default is transfer full."><span class="acronym">out</span></acronym>][<acronym title="NULL may be passed as the value in, out, in-out; or as a return value."><span class="acronym">nullable</span></acronym>][<acronym title="NULL may be passed instead of a pointer to a location."><span class="acronym">optional</span></acronym>][<acronym title="The caller owns the data, and is responsible for free it."><span class="acronym">transfer full</span></acronym>]</span></td>
</tr>
<tr>
<td class="parameter_name"><p>error</p></td>
<td class="parameter_description"><p><a class="link" href="glib-Error-Reporting.html#GError" title="struct GError"><span class="type">GError</span></a> for error reporting, or <a class="link" href="glib-Standard-Macros.html#NULL:CAPS" title="NULL"><code class="literal">NULL</code></a> to ignore.</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="g-uri-params-iter-next.returns"></a><h4>Returns</h4>
<p> <a class="link" href="glib-Standard-Macros.html#FALSE:CAPS" title="FALSE"><code class="literal">FALSE</code></a> if the end of the parameters has been reached or an error was
encountered. <a class="link" href="glib-Standard-Macros.html#TRUE:CAPS" title="TRUE"><code class="literal">TRUE</code></a> otherwise.</p>
</div>
<p class="since">Since: <a class="link" href="api-index-2-66.html#api-index-2.66">2.66</a></p>
</div>
<hr>
<div class="refsect2">
<a name="g-uri-parse-params"></a><h3>g_uri_parse_params ()</h3>
<pre class="programlisting"><a class="link" href="glib-Hash-Tables.html#GHashTable" title="GHashTable"><span class="returnvalue">GHashTable</span></a> *
g_uri_parse_params (<em class="parameter"><code>const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="type">gchar</span></a> *params</code></em>,
                    <em class="parameter"><code><a class="link" href="glib-Basic-Types.html#gssize" title="gssize"><span class="type">gssize</span></a> length</code></em>,
                    <em class="parameter"><code>const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="type">gchar</span></a> *separators</code></em>,
                    <em class="parameter"><code><a class="link" href="glib-URI-Functions.html#GUriParamsFlags" title="enum GUriParamsFlags"><span class="type">GUriParamsFlags</span></a> flags</code></em>,
                    <em class="parameter"><code><a class="link" href="glib-Error-Reporting.html#GError" title="struct GError"><span class="type">GError</span></a> **error</code></em>);</pre>
<p>Many URI schemes include one or more attribute/value pairs as part of the URI
value. This method can be used to parse them into a hash table. When an
attribute has multiple occurrences, the last value is the final returned
value. If you need to handle repeated attributes differently, use
<a class="link" href="glib-URI-Functions.html#GUriParamsIter" title="struct GUriParamsIter"><span class="type">GUriParamsIter</span></a>.</p>
<p>The <em class="parameter"><code>params</code></em>
 string is assumed to still be <code class="literal">%</code>-encoded, but the returned
values will be fully decoded. (Thus it is possible that the returned values
may contain <code class="literal">=</code> or <em class="parameter"><code>separators</code></em>
, if the value was encoded in the input.)
Invalid <code class="literal">%</code>-encoding is treated as with the <a class="link" href="glib-URI-Functions.html#G-URI-FLAGS-PARSE-RELAXED:CAPS"><code class="literal">G_URI_FLAGS_PARSE_RELAXED</code></a>
rules for <a class="link" href="glib-URI-Functions.html#g-uri-parse" title="g_uri_parse ()"><code class="function">g_uri_parse()</code></a>. (However, if <em class="parameter"><code>params</code></em>
 is the path or query string
from a <a class="link" href="glib-URI-Functions.html#GUri" title="GUri"><span class="type">GUri</span></a> that was parsed without <a class="link" href="glib-URI-Functions.html#G-URI-FLAGS-PARSE-RELAXED:CAPS"><code class="literal">G_URI_FLAGS_PARSE_RELAXED</code></a> and
<a class="link" href="glib-URI-Functions.html#G-URI-FLAGS-ENCODED:CAPS"><code class="literal">G_URI_FLAGS_ENCODED</code></a>, then you already know that it does not contain any
invalid encoding.)</p>
<p><a class="link" href="glib-URI-Functions.html#G-URI-PARAMS-WWW-FORM:CAPS"><code class="literal">G_URI_PARAMS_WWW_FORM</code></a> is handled as documented for <a class="link" href="glib-URI-Functions.html#g-uri-params-iter-init" title="g_uri_params_iter_init ()"><code class="function">g_uri_params_iter_init()</code></a>.</p>
<p>If <a class="link" href="glib-URI-Functions.html#G-URI-PARAMS-CASE-INSENSITIVE:CAPS"><code class="literal">G_URI_PARAMS_CASE_INSENSITIVE</code></a> is passed to <em class="parameter"><code>flags</code></em>
, attributes will be
compared case-insensitively, so a params string <code class="literal">attr=123&amp;amp;Attr=456</code> will only
return a single attribute–value pair, <code class="literal">Attr=456</code>. Case will be preserved in
the returned attributes.</p>
<p>If <em class="parameter"><code>params</code></em>
 cannot be parsed (for example, it contains two <em class="parameter"><code>separators</code></em>

characters in a row), then <em class="parameter"><code>error</code></em>
 is set and <a class="link" href="glib-Standard-Macros.html#NULL:CAPS" title="NULL"><code class="literal">NULL</code></a> is returned.</p>
<div class="refsect3">
<a name="g-uri-parse-params.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>params</p></td>
<td class="parameter_description"><p>a <code class="literal">%</code>-encoded string containing <code class="literal">attribute=value</code>
parameters</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>length</p></td>
<td class="parameter_description"><p>the length of <em class="parameter"><code>params</code></em>
, or <code class="literal">-1</code> if it is nul-terminated</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>separators</p></td>
<td class="parameter_description"><p>the separator byte character set between parameters. (usually
<code class="literal">&amp;amp;</code>, but sometimes <code class="literal">;</code> or both <code class="literal">&amp;amp;;</code>). Note that this function works on
bytes not characters, so it can't be used to delimit UTF-8 strings for
anything but ASCII characters. You may pass an empty set, in which case
no splitting will occur.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>flags</p></td>
<td class="parameter_description"><p>flags to modify the way the parameters are handled.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>error</p></td>
<td class="parameter_description"><p><a class="link" href="glib-Error-Reporting.html#GError" title="struct GError"><span class="type">GError</span></a> for error reporting, or <a class="link" href="glib-Standard-Macros.html#NULL:CAPS" title="NULL"><code class="literal">NULL</code></a> to ignore.</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="g-uri-parse-params.returns"></a><h4>Returns</h4>
<p>A hash table of attribute/value pairs, with both names and values
fully-decoded; or <a class="link" href="glib-Standard-Macros.html#NULL:CAPS" title="NULL"><code class="literal">NULL</code></a> on error. </p>
<p><span class="annotation">[<acronym title="The caller owns the data, and is responsible for free it."><span class="acronym">transfer full</span></acronym>][<acronym title="Generics and defining elements of containers and arrays."><span class="acronym">element-type</span></acronym> utf8 utf8]</span></p>
</div>
<p class="since">Since: <a class="link" href="api-index-2-66.html#api-index-2.66">2.66</a></p>
</div>
<hr>
<div class="refsect2">
<a name="g-uri-escape-string"></a><h3>g_uri_escape_string ()</h3>
<pre class="programlisting"><span class="returnvalue">char</span> *
g_uri_escape_string (<em class="parameter"><code>const <span class="type">char</span> *unescaped</code></em>,
                     <em class="parameter"><code>const <span class="type">char</span> *reserved_chars_allowed</code></em>,
                     <em class="parameter"><code><a class="link" href="glib-Basic-Types.html#gboolean" title="gboolean"><span class="type">gboolean</span></a> allow_utf8</code></em>);</pre>
<p>Escapes a string for use in a URI.</p>
<p>Normally all characters that are not "unreserved" (i.e. ASCII
alphanumerical characters plus dash, dot, underscore and tilde) are
escaped. But if you specify characters in <em class="parameter"><code>reserved_chars_allowed</code></em>

they are not escaped. This is useful for the "reserved" characters
in the URI specification, since those are allowed unescaped in some
portions of a URI.</p>
<div class="refsect3">
<a name="g-uri-escape-string.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>unescaped</p></td>
<td class="parameter_description"><p>the unescaped input string.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>reserved_chars_allowed</p></td>
<td class="parameter_description"><p>a string of reserved
characters that are allowed to be used, or <a class="link" href="glib-Standard-Macros.html#NULL:CAPS" title="NULL"><code class="literal">NULL</code></a>. </p></td>
<td class="parameter_annotations"><span class="annotation">[<acronym title="NULL may be passed as the value in, out, in-out; or as a return value."><span class="acronym">nullable</span></acronym>]</span></td>
</tr>
<tr>
<td class="parameter_name"><p>allow_utf8</p></td>
<td class="parameter_description"><p><a class="link" href="glib-Standard-Macros.html#TRUE:CAPS" title="TRUE"><code class="literal">TRUE</code></a> if the result can include UTF-8 characters.</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="g-uri-escape-string.returns"></a><h4>Returns</h4>
<p>an escaped version of <em class="parameter"><code>unescaped</code></em>
. The
returned string should be freed when no longer needed. </p>
<p><span class="annotation">[<acronym title="NULL must not be passed as the value in, out, in-out; or as a return value."><span class="acronym">not nullable</span></acronym>]</span></p>
</div>
<p class="since">Since: <a class="link" href="api-index-2-16.html#api-index-2.16">2.16</a></p>
</div>
<hr>
<div class="refsect2">
<a name="g-uri-unescape-string"></a><h3>g_uri_unescape_string ()</h3>
<pre class="programlisting"><span class="returnvalue">char</span> *
g_uri_unescape_string (<em class="parameter"><code>const <span class="type">char</span> *escaped_string</code></em>,
                       <em class="parameter"><code>const <span class="type">char</span> *illegal_characters</code></em>);</pre>
<p>Unescapes a whole escaped string.</p>
<p>If any of the characters in <em class="parameter"><code>illegal_characters</code></em>
 or the NUL
character appears as an escaped character in <em class="parameter"><code>escaped_string</code></em>
, then
that is an error and <a class="link" href="glib-Standard-Macros.html#NULL:CAPS" title="NULL"><code class="literal">NULL</code></a> will be returned. This is useful if you
want to avoid for instance having a slash being expanded in an
escaped path element, which might confuse pathname handling.</p>
<div class="refsect3">
<a name="g-uri-unescape-string.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>escaped_string</p></td>
<td class="parameter_description"><p>an escaped string to be unescaped.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>illegal_characters</p></td>
<td class="parameter_description"><p>a string of illegal characters
not to be allowed, or <a class="link" href="glib-Standard-Macros.html#NULL:CAPS" title="NULL"><code class="literal">NULL</code></a>. </p></td>
<td class="parameter_annotations"><span class="annotation">[<acronym title="NULL may be passed as the value in, out, in-out; or as a return value."><span class="acronym">nullable</span></acronym>]</span></td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="g-uri-unescape-string.returns"></a><h4>Returns</h4>
<p>an unescaped version of <em class="parameter"><code>escaped_string</code></em>
.
The returned string should be freed when no longer needed. </p>
<p><span class="annotation">[<acronym title="NULL may be passed as the value in, out, in-out; or as a return value."><span class="acronym">nullable</span></acronym>]</span></p>
</div>
<p class="since">Since: <a class="link" href="api-index-2-16.html#api-index-2.16">2.16</a></p>
</div>
<hr>
<div class="refsect2">
<a name="g-uri-escape-bytes"></a><h3>g_uri_escape_bytes ()</h3>
<pre class="programlisting"><span class="returnvalue">char</span> *
g_uri_escape_bytes (<em class="parameter"><code>const <a class="link" href="glib-Basic-Types.html#guint8" title="guint8"><span class="type">guint8</span></a> *unescaped</code></em>,
                    <em class="parameter"><code><a class="link" href="glib-Basic-Types.html#gsize" title="gsize"><span class="type">gsize</span></a> length</code></em>,
                    <em class="parameter"><code>const <span class="type">char</span> *reserved_chars_allowed</code></em>);</pre>
<p>Escapes arbitrary data for use in a URI.</p>
<p>Normally all characters that are not ‘unreserved’ (i.e. ASCII
alphanumerical characters plus dash, dot, underscore and tilde) are
escaped. But if you specify characters in <em class="parameter"><code>reserved_chars_allowed</code></em>

they are not escaped. This is useful for the ‘reserved’ characters
in the URI specification, since those are allowed unescaped in some
portions of a URI.</p>
<p>Though technically incorrect, this will also allow escaping nul
bytes as `%`<code class="literal">00</code>.</p>
<div class="refsect3">
<a name="g-uri-escape-bytes.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>unescaped</p></td>
<td class="parameter_description"><p>the unescaped input data. </p></td>
<td class="parameter_annotations"><span class="annotation">[<acronym title="Parameter points to an array of items."><span class="acronym">array</span></acronym> length=length]</span></td>
</tr>
<tr>
<td class="parameter_name"><p>length</p></td>
<td class="parameter_description"><p>the length of <em class="parameter"><code>unescaped</code></em>
</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>reserved_chars_allowed</p></td>
<td class="parameter_description"><p>a string of reserved
characters that are allowed to be used, or <a class="link" href="glib-Standard-Macros.html#NULL:CAPS" title="NULL"><code class="literal">NULL</code></a>. </p></td>
<td class="parameter_annotations"><span class="annotation">[<acronym title="NULL may be passed as the value in, out, in-out; or as a return value."><span class="acronym">nullable</span></acronym>]</span></td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="g-uri-escape-bytes.returns"></a><h4>Returns</h4>
<p>an escaped version of <em class="parameter"><code>unescaped</code></em>
.
The returned string should be freed when no longer needed. </p>
<p><span class="annotation">[<acronym title="NULL must not be passed as the value in, out, in-out; or as a return value."><span class="acronym">not nullable</span></acronym>][<acronym title="The caller owns the data, and is responsible for free it."><span class="acronym">transfer full</span></acronym>]</span></p>
</div>
<p class="since">Since: <a class="link" href="api-index-2-66.html#api-index-2.66">2.66</a></p>
</div>
<hr>
<div class="refsect2">
<a name="g-uri-unescape-bytes"></a><h3>g_uri_unescape_bytes ()</h3>
<pre class="programlisting"><a class="link" href="glib-Byte-Arrays.html#GBytes" title="GBytes"><span class="returnvalue">GBytes</span></a> *
g_uri_unescape_bytes (<em class="parameter"><code>const <span class="type">char</span> *escaped_string</code></em>,
                      <em class="parameter"><code><a class="link" href="glib-Basic-Types.html#gssize" title="gssize"><span class="type">gssize</span></a> length</code></em>,
                      <em class="parameter"><code>const <span class="type">char</span> *illegal_characters</code></em>,
                      <em class="parameter"><code><a class="link" href="glib-Error-Reporting.html#GError" title="struct GError"><span class="type">GError</span></a> **error</code></em>);</pre>
<p>Unescapes a segment of an escaped string as binary data.</p>
<p>Note that in contrast to <a class="link" href="glib-URI-Functions.html#g-uri-unescape-string" title="g_uri_unescape_string ()"><code class="function">g_uri_unescape_string()</code></a>, this does allow
nul bytes to appear in the output.</p>
<p>If any of the characters in <em class="parameter"><code>illegal_characters</code></em>
 appears as an escaped
character in <em class="parameter"><code>escaped_string</code></em>
, then that is an error and <a class="link" href="glib-Standard-Macros.html#NULL:CAPS" title="NULL"><code class="literal">NULL</code></a> will be
returned. This is useful if you want to avoid for instance having a slash
being expanded in an escaped path element, which might confuse pathname
handling.</p>
<div class="refsect3">
<a name="g-uri-unescape-bytes.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>escaped_string</p></td>
<td class="parameter_description"><p>A URI-escaped string</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>length</p></td>
<td class="parameter_description"><p>the length (in bytes) of <em class="parameter"><code>escaped_string</code></em>
to escape, or <code class="literal">-1</code> if it
is nul-terminated.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>illegal_characters</p></td>
<td class="parameter_description"><p>a string of illegal characters
not to be allowed, or <a class="link" href="glib-Standard-Macros.html#NULL:CAPS" title="NULL"><code class="literal">NULL</code></a>. </p></td>
<td class="parameter_annotations"><span class="annotation">[<acronym title="NULL may be passed as the value in, out, in-out; or as a return value."><span class="acronym">nullable</span></acronym>]</span></td>
</tr>
<tr>
<td class="parameter_name"><p>error</p></td>
<td class="parameter_description"><p><a class="link" href="glib-Error-Reporting.html#GError" title="struct GError"><span class="type">GError</span></a> for error reporting, or <a class="link" href="glib-Standard-Macros.html#NULL:CAPS" title="NULL"><code class="literal">NULL</code></a> to ignore.</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="g-uri-unescape-bytes.returns"></a><h4>Returns</h4>
<p>an unescaped version of <em class="parameter"><code>escaped_string</code></em>
or <a class="link" href="glib-Standard-Macros.html#NULL:CAPS" title="NULL"><code class="literal">NULL</code></a> on error (if decoding failed, using <a class="link" href="glib-URI-Functions.html#G-URI-ERROR-FAILED:CAPS"><code class="literal">G_URI_ERROR_FAILED</code></a> error
code). The returned <a class="link" href="glib-Byte-Arrays.html#GBytes" title="GBytes"><span class="type">GBytes</span></a> should be unreffed when no longer needed. </p>
<p><span class="annotation">[<acronym title="The caller owns the data, and is responsible for free it."><span class="acronym">transfer full</span></acronym>]</span></p>
</div>
<p class="since">Since: <a class="link" href="api-index-2-66.html#api-index-2.66">2.66</a></p>
</div>
<hr>
<div class="refsect2">
<a name="g-uri-unescape-segment"></a><h3>g_uri_unescape_segment ()</h3>
<pre class="programlisting"><span class="returnvalue">char</span> *
g_uri_unescape_segment (<em class="parameter"><code>const <span class="type">char</span> *escaped_string</code></em>,
                        <em class="parameter"><code>const <span class="type">char</span> *escaped_string_end</code></em>,
                        <em class="parameter"><code>const <span class="type">char</span> *illegal_characters</code></em>);</pre>
<p>Unescapes a segment of an escaped string.</p>
<p>If any of the characters in <em class="parameter"><code>illegal_characters</code></em>
 or the NUL
character appears as an escaped character in <em class="parameter"><code>escaped_string</code></em>
, then
that is an error and <a class="link" href="glib-Standard-Macros.html#NULL:CAPS" title="NULL"><code class="literal">NULL</code></a> will be returned. This is useful if you
want to avoid for instance having a slash being expanded in an
escaped path element, which might confuse pathname handling.</p>
<p>Note: <code class="literal">NUL</code> byte is not accepted in the output, in contrast to
<a class="link" href="glib-URI-Functions.html#g-uri-unescape-bytes" title="g_uri_unescape_bytes ()"><code class="function">g_uri_unescape_bytes()</code></a>.</p>
<div class="refsect3">
<a name="g-uri-unescape-segment.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>escaped_string</p></td>
<td class="parameter_description"><p>A string, may be <a class="link" href="glib-Standard-Macros.html#NULL:CAPS" title="NULL"><code class="literal">NULL</code></a>. </p></td>
<td class="parameter_annotations"><span class="annotation">[<acronym title="NULL may be passed as the value in, out, in-out; or as a return value."><span class="acronym">nullable</span></acronym>]</span></td>
</tr>
<tr>
<td class="parameter_name"><p>escaped_string_end</p></td>
<td class="parameter_description"><p>Pointer to end of <em class="parameter"><code>escaped_string</code></em>
,
may be <a class="link" href="glib-Standard-Macros.html#NULL:CAPS" title="NULL"><code class="literal">NULL</code></a>. </p></td>
<td class="parameter_annotations"><span class="annotation">[<acronym title="NULL may be passed as the value in, out, in-out; or as a return value."><span class="acronym">nullable</span></acronym>]</span></td>
</tr>
<tr>
<td class="parameter_name"><p>illegal_characters</p></td>
<td class="parameter_description"><p>An optional string of illegal
characters not to be allowed, may be <a class="link" href="glib-Standard-Macros.html#NULL:CAPS" title="NULL"><code class="literal">NULL</code></a>. </p></td>
<td class="parameter_annotations"><span class="annotation">[<acronym title="NULL may be passed as the value in, out, in-out; or as a return value."><span class="acronym">nullable</span></acronym>]</span></td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="g-uri-unescape-segment.returns"></a><h4>Returns</h4>
<p>an unescaped version of <em class="parameter"><code>escaped_string</code></em>
,
or <a class="link" href="glib-Standard-Macros.html#NULL:CAPS" title="NULL"><code class="literal">NULL</code></a> on error. The returned string should be freed when no longer
needed.  As a special case if <a class="link" href="glib-Standard-Macros.html#NULL:CAPS" title="NULL"><code class="literal">NULL</code></a> is given for <em class="parameter"><code>escaped_string</code></em>
, this
function will return <a class="link" href="glib-Standard-Macros.html#NULL:CAPS" title="NULL"><code class="literal">NULL</code></a>. </p>
<p><span class="annotation">[<acronym title="NULL may be passed as the value in, out, in-out; or as a return value."><span class="acronym">nullable</span></acronym>]</span></p>
</div>
<p class="since">Since: <a class="link" href="api-index-2-16.html#api-index-2.16">2.16</a></p>
</div>
<hr>
<div class="refsect2">
<a name="g-uri-list-extract-uris"></a><h3>g_uri_list_extract_uris ()</h3>
<pre class="programlisting"><a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="returnvalue">gchar</span></a> **
g_uri_list_extract_uris (<em class="parameter"><code>const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="type">gchar</span></a> *uri_list</code></em>);</pre>
<p>Splits an URI list conforming to the text/uri-list
mime type defined in RFC 2483 into individual URIs,
discarding any comments. The URIs are not validated.</p>
<div class="refsect3">
<a name="g-uri-list-extract-uris.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>uri_list</p></td>
<td class="parameter_description"><p>an URI list </p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="g-uri-list-extract-uris.returns"></a><h4>Returns</h4>
<p>a newly allocated <a class="link" href="glib-Standard-Macros.html#NULL:CAPS" title="NULL"><code class="literal">NULL</code></a>-terminated list
of strings holding the individual URIs. The array should be freed
with <a class="link" href="glib-String-Utility-Functions.html#g-strfreev" title="g_strfreev ()"><code class="function">g_strfreev()</code></a>. </p>
<p><span class="annotation">[<acronym title="The caller owns the data, and is responsible for free it."><span class="acronym">transfer full</span></acronym>]</span></p>
</div>
<p class="since">Since: <a class="link" href="api-index-2-6.html#api-index-2.6">2.6</a></p>
</div>
<hr>
<div class="refsect2">
<a name="g-filename-from-uri"></a><h3>g_filename_from_uri ()</h3>
<pre class="programlisting"><a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="returnvalue">gchar</span></a> *
g_filename_from_uri (<em class="parameter"><code>const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="type">gchar</span></a> *uri</code></em>,
                     <em class="parameter"><code><a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="type">gchar</span></a> **hostname</code></em>,
                     <em class="parameter"><code><a class="link" href="glib-Error-Reporting.html#GError" title="struct GError"><span class="type">GError</span></a> **error</code></em>);</pre>
<p>Converts an escaped ASCII-encoded URI to a local filename in the
encoding used for filenames.</p>
<div class="refsect3">
<a name="g-filename-from-uri.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>uri</p></td>
<td class="parameter_description"><p>a uri describing a filename (escaped, encoded in ASCII).</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>hostname</p></td>
<td class="parameter_description"><p>Location to store hostname for the URI.
If there is no hostname in the URI, <a class="link" href="glib-Standard-Macros.html#NULL:CAPS" title="NULL"><code class="literal">NULL</code></a> will be
stored in this location. </p></td>
<td class="parameter_annotations"><span class="annotation">[<acronym title="Parameter for returning results. Default is transfer full."><span class="acronym">out</span></acronym>][<acronym title="NULL may be passed instead of a pointer to a location."><span class="acronym">optional</span></acronym>][<acronym title="NULL may be passed as the value in, out, in-out; or as a return value."><span class="acronym">nullable</span></acronym>]</span></td>
</tr>
<tr>
<td class="parameter_name"><p>error</p></td>
<td class="parameter_description"><p>location to store the error occurring, or <a class="link" href="glib-Standard-Macros.html#NULL:CAPS" title="NULL"><code class="literal">NULL</code></a> to ignore
errors. Any of the errors in <a class="link" href="glib-Character-Set-Conversion.html#GConvertError" title="enum GConvertError"><span class="type">GConvertError</span></a> may occur.</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="g-filename-from-uri.returns"></a><h4>Returns</h4>
<p>a newly-allocated string holding
the resulting filename, or <a class="link" href="glib-Standard-Macros.html#NULL:CAPS" title="NULL"><code class="literal">NULL</code></a> on an error. </p>
<p><span class="annotation">[<acronym title="Override the parsed C type with given type."><span class="acronym">type</span></acronym> filename]</span></p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="g-filename-to-uri"></a><h3>g_filename_to_uri ()</h3>
<pre class="programlisting"><a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="returnvalue">gchar</span></a> *
g_filename_to_uri (<em class="parameter"><code>const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="type">gchar</span></a> *filename</code></em>,
                   <em class="parameter"><code>const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="type">gchar</span></a> *hostname</code></em>,
                   <em class="parameter"><code><a class="link" href="glib-Error-Reporting.html#GError" title="struct GError"><span class="type">GError</span></a> **error</code></em>);</pre>
<p>Converts an absolute filename to an escaped ASCII-encoded URI, with the path
component following Section 3.3. of RFC 2396.</p>
<div class="refsect3">
<a name="g-filename-to-uri.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>filename</p></td>
<td class="parameter_description"><p>an absolute filename specified in the GLib file
name encoding, which is the on-disk file name bytes on Unix, and UTF-8
on Windows. </p></td>
<td class="parameter_annotations"><span class="annotation">[<acronym title="Override the parsed C type with given type."><span class="acronym">type</span></acronym> filename]</span></td>
</tr>
<tr>
<td class="parameter_name"><p>hostname</p></td>
<td class="parameter_description"><p>A UTF-8 encoded hostname, or <a class="link" href="glib-Standard-Macros.html#NULL:CAPS" title="NULL"><code class="literal">NULL</code></a> for none. </p></td>
<td class="parameter_annotations"><span class="annotation">[<acronym title="NULL may be passed as the value in, out, in-out; or as a return value."><span class="acronym">nullable</span></acronym>]</span></td>
</tr>
<tr>
<td class="parameter_name"><p>error</p></td>
<td class="parameter_description"><p>location to store the error occurring, or <a class="link" href="glib-Standard-Macros.html#NULL:CAPS" title="NULL"><code class="literal">NULL</code></a> to ignore
errors. Any of the errors in <a class="link" href="glib-Character-Set-Conversion.html#GConvertError" title="enum GConvertError"><span class="type">GConvertError</span></a> may occur.</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="g-filename-to-uri.returns"></a><h4>Returns</h4>
<p> a newly-allocated string holding the resulting
URI, or <a class="link" href="glib-Standard-Macros.html#NULL:CAPS" title="NULL"><code class="literal">NULL</code></a> on an error.</p>
</div>
</div>
</div>
<div class="refsect1">
<a name="glib-URI-Functions.other_details"></a><h2>Types and Values</h2>
<div class="refsect2">
<a name="GUri"></a><h3>GUri</h3>
<pre class="programlisting">typedef struct _GUri GUri;</pre>
<p>A parsed absolute URI.</p>
<p>Since <a class="link" href="glib-URI-Functions.html#GUri" title="GUri"><span class="type">GUri</span></a> only represents absolute URIs, all <a href="glib-URI-Functions.html#GUri"><span class="type">GUris</span></a> will have a
URI scheme, so <a class="link" href="glib-URI-Functions.html#g-uri-get-scheme" title="g_uri_get_scheme ()"><code class="function">g_uri_get_scheme()</code></a> will always return a non-<a class="link" href="glib-Standard-Macros.html#NULL:CAPS" title="NULL"><code class="literal">NULL</code></a>
answer. Likewise, by definition, all URIs have a path component, so
<a class="link" href="glib-URI-Functions.html#g-uri-get-path" title="g_uri_get_path ()"><code class="function">g_uri_get_path()</code></a> will always return a non-<a class="link" href="glib-Standard-Macros.html#NULL:CAPS" title="NULL"><code class="literal">NULL</code></a> string (which may be empty).</p>
<p>If the URI string has an
<a class="ulink" href="https://tools.ietf.org/html/rfc3986#section-3" target="_top">‘authority’ component</a> (that
is, if the scheme is followed by <code class="literal">://</code> rather than just <code class="literal">:</code>), then the
<a class="link" href="glib-URI-Functions.html#GUri" title="GUri"><span class="type">GUri</span></a> will contain a hostname, and possibly a port and ‘userinfo’.
Additionally, depending on how the <a class="link" href="glib-URI-Functions.html#GUri" title="GUri"><span class="type">GUri</span></a> was constructed/parsed (for example,
using the <a class="link" href="glib-URI-Functions.html#G-URI-FLAGS-HAS-PASSWORD:CAPS"><code class="literal">G_URI_FLAGS_HAS_PASSWORD</code></a> and <a class="link" href="glib-URI-Functions.html#G-URI-FLAGS-HAS-AUTH-PARAMS:CAPS"><code class="literal">G_URI_FLAGS_HAS_AUTH_PARAMS</code></a> flags),
the userinfo may be split out into a username, password, and
additional authorization-related parameters.</p>
<p>Normally, the components of a <a class="link" href="glib-URI-Functions.html#GUri" title="GUri"><span class="type">GUri</span></a> will have all <code class="literal">%</code>-encoded
characters decoded. However, if you construct/parse a <a class="link" href="glib-URI-Functions.html#GUri" title="GUri"><span class="type">GUri</span></a> with
<a class="link" href="glib-URI-Functions.html#G-URI-FLAGS-ENCODED:CAPS"><code class="literal">G_URI_FLAGS_ENCODED</code></a>, then the <code class="literal">%</code>-encoding will be preserved instead in
the userinfo, path, and query fields (and in the host field if also
created with <a class="link" href="glib-URI-Functions.html#G-URI-FLAGS-NON-DNS:CAPS"><code class="literal">G_URI_FLAGS_NON_DNS</code></a>). In particular, this is necessary if
the URI may contain binary data or non-UTF-8 text, or if decoding
the components might change the interpretation of the URI.</p>
<p>For example, with the encoded flag:</p>
<div class="informalexample">
  <table class="listing_frame" border="0" cellpadding="0" cellspacing="0">
    <tbody>
      <tr>
        <td class="listing_lines" align="right"><pre>1
2</pre></td>
        <td class="listing_code"><pre class="programlisting"><span class="n">g_autoptr</span><span class="p">(</span><span class="n">GUri</span><span class="p">)</span> <span class="n">uri</span> <span class="o">=</span> <span class="n">g_uri_parse</span> <span class="p">(</span><span class="s">&quot;http://host/path?query=http%3A%2F%2Fhost%2Fpath%3Fparam%3Dvalue&quot;</span><span class="p">,</span> <span class="n">G_URI_FLAGS_ENCODED</span><span class="p">,</span> <span class="o">&amp;</span><span class="n">err</span><span class="p">);</span>
<span class="n">g_assert_cmpstr</span> <span class="p">(</span><span class="n">g_uri_get_query</span> <span class="p">(</span><span class="n">uri</span><span class="p">),</span> <span class="o">==</span><span class="p">,</span> <span class="s">&quot;query=http%3A%2F%2Fhost%2Fpath%3Fparam%3Dvalue&quot;</span><span class="p">);</span></pre></td>
      </tr>
    </tbody>
  </table>
</div>

<p></p>
<p>While the default <code class="literal">%</code>-decoding behaviour would give:</p>
<div class="informalexample">
  <table class="listing_frame" border="0" cellpadding="0" cellspacing="0">
    <tbody>
      <tr>
        <td class="listing_lines" align="right"><pre>1
2</pre></td>
        <td class="listing_code"><pre class="programlisting"><span class="n">g_autoptr</span><span class="p">(</span><span class="n">GUri</span><span class="p">)</span> <span class="n">uri</span> <span class="o">=</span> <span class="n">g_uri_parse</span> <span class="p">(</span><span class="s">&quot;http://host/path?query=http%3A%2F%2Fhost%2Fpath%3Fparam%3Dvalue&quot;</span><span class="p">,</span> <span class="n">G_URI_FLAGS_NONE</span><span class="p">,</span> <span class="o">&amp;</span><span class="n">err</span><span class="p">);</span>
<span class="n">g_assert_cmpstr</span> <span class="p">(</span><span class="n">g_uri_get_query</span> <span class="p">(</span><span class="n">uri</span><span class="p">),</span> <span class="o">==</span><span class="p">,</span> <span class="s">&quot;query=http://host/path?param=value&quot;</span><span class="p">);</span></pre></td>
      </tr>
    </tbody>
  </table>
</div>

<p></p>
<p>During decoding, if an invalid UTF-8 string is encountered, parsing will fail
with an error indicating the bad string location:</p>
<div class="informalexample">
  <table class="listing_frame" border="0" cellpadding="0" cellspacing="0">
    <tbody>
      <tr>
        <td class="listing_lines" align="right"><pre>1
2</pre></td>
        <td class="listing_code"><pre class="programlisting"><span class="n">g_autoptr</span><span class="p">(</span><span class="n">GUri</span><span class="p">)</span> <span class="n">uri</span> <span class="o">=</span> <span class="n">g_uri_parse</span> <span class="p">(</span><span class="s">&quot;http://host/path?query=http%3A%2F%2Fhost%2Fpath%3Fbad%3D%00alue&quot;</span><span class="p">,</span> <span class="n">G_URI_FLAGS_NONE</span><span class="p">,</span> <span class="o">&amp;</span><span class="n">err</span><span class="p">);</span>
<span class="n">g_assert_error</span> <span class="p">(</span><span class="n">err</span><span class="p">,</span> <span class="n">G_URI_ERROR</span><span class="p">,</span> <span class="n">G_URI_ERROR_BAD_QUERY</span><span class="p">);</span></pre></td>
      </tr>
    </tbody>
  </table>
</div>

<p></p>
<p>You should pass <a class="link" href="glib-URI-Functions.html#G-URI-FLAGS-ENCODED:CAPS"><code class="literal">G_URI_FLAGS_ENCODED</code></a> or <a class="link" href="glib-URI-Functions.html#G-URI-FLAGS-ENCODED-QUERY:CAPS"><code class="literal">G_URI_FLAGS_ENCODED_QUERY</code></a> if you
need to handle that case manually. In particular, if the query string
contains <code class="literal">=</code> characters that are <code class="literal">%</code>-encoded, you should let
<a class="link" href="glib-URI-Functions.html#g-uri-parse-params" title="g_uri_parse_params ()"><code class="function">g_uri_parse_params()</code></a> do the decoding once of the query.</p>
<p><a class="link" href="glib-URI-Functions.html#GUri" title="GUri"><span class="type">GUri</span></a> is immutable once constructed, and can safely be accessed from
multiple threads. Its reference counting is atomic.</p>
<p class="since">Since: <a class="link" href="api-index-2-66.html#api-index-2.66">2.66</a></p>
</div>
<hr>
<div class="refsect2">
<a name="GUriFlags"></a><h3>enum GUriFlags</h3>
<p>Flags that describe a URI.</p>
<p>When parsing a URI, if you need to choose different flags based on
the type of URI, you can use <a class="link" href="glib-URI-Functions.html#g-uri-peek-scheme" title="g_uri_peek_scheme ()"><code class="function">g_uri_peek_scheme()</code></a> on the URI string
to check the scheme first, and use that to decide what flags to
parse it with.</p>
<div class="refsect3">
<a name="GUriFlags.members"></a><h4>Members</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="300px" class="enum_members_name">
<col class="enum_members_description">
<col width="200px" class="enum_members_annotations">
</colgroup>
<tbody>
<tr>
<td class="enum_member_name"><p><a name="G-URI-FLAGS-NONE:CAPS"></a>G_URI_FLAGS_NONE</p></td>
<td class="enum_member_description">
<p>No flags set.</p>
</td>
<td class="enum_member_annotations"> </td>
</tr>
<tr>
<td class="enum_member_name"><p><a name="G-URI-FLAGS-PARSE-RELAXED:CAPS"></a>G_URI_FLAGS_PARSE_RELAXED</p></td>
<td class="enum_member_description">
<p>Parse the URI more relaxedly than the
<a class="ulink" href="https://tools.ietf.org/html/rfc3986" target="_top">RFC 3986</a> grammar specifies,
fixing up or ignoring common mistakes in URIs coming from external
sources. This is also needed for some obscure URI schemes where <code class="literal">;</code>
separates the host from the path. Don’t use this flag unless you need to.</p>
</td>
<td class="enum_member_annotations"> </td>
</tr>
<tr>
<td class="enum_member_name"><p><a name="G-URI-FLAGS-HAS-PASSWORD:CAPS"></a>G_URI_FLAGS_HAS_PASSWORD</p></td>
<td class="enum_member_description">
<p>The userinfo field may contain a password,
which will be separated from the username by <code class="literal">:</code>.</p>
</td>
<td class="enum_member_annotations"> </td>
</tr>
<tr>
<td class="enum_member_name"><p><a name="G-URI-FLAGS-HAS-AUTH-PARAMS:CAPS"></a>G_URI_FLAGS_HAS_AUTH_PARAMS</p></td>
<td class="enum_member_description">
<p>The userinfo may contain additional
authentication-related parameters, which will be separated from
the username and/or password by <code class="literal">;</code>.</p>
</td>
<td class="enum_member_annotations"> </td>
</tr>
<tr>
<td class="enum_member_name"><p><a name="G-URI-FLAGS-ENCODED:CAPS"></a>G_URI_FLAGS_ENCODED</p></td>
<td class="enum_member_description">
<p>When parsing a URI, this indicates that <code class="literal">%</code>-encoded
characters in the userinfo, path, query, and fragment fields
should not be decoded. (And likewise the host field if
<a class="link" href="glib-URI-Functions.html#G-URI-FLAGS-NON-DNS:CAPS"><code class="literal">G_URI_FLAGS_NON_DNS</code></a> is also set.) When building a URI, it indicates
that you have already <code class="literal">%</code>-encoded the components, and so <a class="link" href="glib-URI-Functions.html#GUri" title="GUri"><span class="type">GUri</span></a>
should not do any encoding itself.</p>
</td>
<td class="enum_member_annotations"> </td>
</tr>
<tr>
<td class="enum_member_name"><p><a name="G-URI-FLAGS-NON-DNS:CAPS"></a>G_URI_FLAGS_NON_DNS</p></td>
<td class="enum_member_description">
<p>The host component should not be assumed to be a
DNS hostname or IP address (for example, for <code class="literal">smb</code> URIs with NetBIOS
hostnames).</p>
</td>
<td class="enum_member_annotations"> </td>
</tr>
<tr>
<td class="enum_member_name"><p><a name="G-URI-FLAGS-ENCODED-QUERY:CAPS"></a>G_URI_FLAGS_ENCODED_QUERY</p></td>
<td class="enum_member_description">
<p>Same as <a class="link" href="glib-URI-Functions.html#G-URI-FLAGS-ENCODED:CAPS"><code class="literal">G_URI_FLAGS_ENCODED</code></a>, for the query
field only.</p>
</td>
<td class="enum_member_annotations"> </td>
</tr>
<tr>
<td class="enum_member_name"><p><a name="G-URI-FLAGS-ENCODED-PATH:CAPS"></a>G_URI_FLAGS_ENCODED_PATH</p></td>
<td class="enum_member_description">
<p>Same as <a class="link" href="glib-URI-Functions.html#G-URI-FLAGS-ENCODED:CAPS"><code class="literal">G_URI_FLAGS_ENCODED</code></a>, for the path only.</p>
</td>
<td class="enum_member_annotations"> </td>
</tr>
<tr>
<td class="enum_member_name"><p><a name="G-URI-FLAGS-ENCODED-FRAGMENT:CAPS"></a>G_URI_FLAGS_ENCODED_FRAGMENT</p></td>
<td class="enum_member_description">
<p>Same as <a class="link" href="glib-URI-Functions.html#G-URI-FLAGS-ENCODED:CAPS"><code class="literal">G_URI_FLAGS_ENCODED</code></a>, for the
fragment only.</p>
</td>
<td class="enum_member_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<p class="since">Since: <a class="link" href="api-index-2-66.html#api-index-2.66">2.66</a></p>
</div>
<hr>
<div class="refsect2">
<a name="GUriHideFlags"></a><h3>enum GUriHideFlags</h3>
<p>Flags describing what parts of the URI to hide in
<a class="link" href="glib-URI-Functions.html#g-uri-to-string-partial" title="g_uri_to_string_partial ()"><code class="function">g_uri_to_string_partial()</code></a>. Note that <a class="link" href="glib-URI-Functions.html#G-URI-HIDE-PASSWORD:CAPS"><code class="literal">G_URI_HIDE_PASSWORD</code></a> and
<a class="link" href="glib-URI-Functions.html#G-URI-HIDE-AUTH-PARAMS:CAPS"><code class="literal">G_URI_HIDE_AUTH_PARAMS</code></a> will only work if the <a class="link" href="glib-URI-Functions.html#GUri" title="GUri"><span class="type">GUri</span></a> was parsed with
the corresponding flags.</p>
<div class="refsect3">
<a name="GUriHideFlags.members"></a><h4>Members</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="300px" class="enum_members_name">
<col class="enum_members_description">
<col width="200px" class="enum_members_annotations">
</colgroup>
<tbody>
<tr>
<td class="enum_member_name"><p><a name="G-URI-HIDE-NONE:CAPS"></a>G_URI_HIDE_NONE</p></td>
<td class="enum_member_description">
<p>No flags set.</p>
</td>
<td class="enum_member_annotations"> </td>
</tr>
<tr>
<td class="enum_member_name"><p><a name="G-URI-HIDE-USERINFO:CAPS"></a>G_URI_HIDE_USERINFO</p></td>
<td class="enum_member_description">
<p>Hide the userinfo.</p>
</td>
<td class="enum_member_annotations"> </td>
</tr>
<tr>
<td class="enum_member_name"><p><a name="G-URI-HIDE-PASSWORD:CAPS"></a>G_URI_HIDE_PASSWORD</p></td>
<td class="enum_member_description">
<p>Hide the password.</p>
</td>
<td class="enum_member_annotations"> </td>
</tr>
<tr>
<td class="enum_member_name"><p><a name="G-URI-HIDE-AUTH-PARAMS:CAPS"></a>G_URI_HIDE_AUTH_PARAMS</p></td>
<td class="enum_member_description">
<p>Hide the auth_params.</p>
</td>
<td class="enum_member_annotations"> </td>
</tr>
<tr>
<td class="enum_member_name"><p><a name="G-URI-HIDE-QUERY:CAPS"></a>G_URI_HIDE_QUERY</p></td>
<td class="enum_member_description">
<p>Hide the query.</p>
</td>
<td class="enum_member_annotations"> </td>
</tr>
<tr>
<td class="enum_member_name"><p><a name="G-URI-HIDE-FRAGMENT:CAPS"></a>G_URI_HIDE_FRAGMENT</p></td>
<td class="enum_member_description">
<p>Hide the fragment.</p>
</td>
<td class="enum_member_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<p class="since">Since: <a class="link" href="api-index-2-66.html#api-index-2.66">2.66</a></p>
</div>
<hr>
<div class="refsect2">
<a name="GUriParamsIter"></a><h3>struct GUriParamsIter</h3>
<pre class="programlisting">struct GUriParamsIter {
};
</pre>
<p>Many URI schemes include one or more attribute/value pairs as part of the URI
value. For example <code class="literal">scheme://server/path?query=string&amp;amp;is=there</code> has two
attributes – <code class="literal">query=string</code> and <code class="literal">is=there</code> – in its query part.</p>
<p>A <a class="link" href="glib-URI-Functions.html#GUriParamsIter" title="struct GUriParamsIter"><span class="type">GUriParamsIter</span></a> structure represents an iterator that can be used to
iterate over the attribute/value pairs of a URI query string. <a class="link" href="glib-URI-Functions.html#GUriParamsIter" title="struct GUriParamsIter"><span class="type">GUriParamsIter</span></a>
structures are typically allocated on the stack and then initialized with
<a class="link" href="glib-URI-Functions.html#g-uri-params-iter-init" title="g_uri_params_iter_init ()"><code class="function">g_uri_params_iter_init()</code></a>. See the documentation for <a class="link" href="glib-URI-Functions.html#g-uri-params-iter-init" title="g_uri_params_iter_init ()"><code class="function">g_uri_params_iter_init()</code></a>
for a usage example.</p>
<p class="since">Since: <a class="link" href="api-index-2-66.html#api-index-2.66">2.66</a></p>
</div>
<hr>
<div class="refsect2">
<a name="GUriParamsFlags"></a><h3>enum GUriParamsFlags</h3>
<p>Flags modifying the way parameters are handled by <a class="link" href="glib-URI-Functions.html#g-uri-parse-params" title="g_uri_parse_params ()"><code class="function">g_uri_parse_params()</code></a> and
<a class="link" href="glib-URI-Functions.html#GUriParamsIter" title="struct GUriParamsIter"><span class="type">GUriParamsIter</span></a>.</p>
<div class="refsect3">
<a name="GUriParamsFlags.members"></a><h4>Members</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="300px" class="enum_members_name">
<col class="enum_members_description">
<col width="200px" class="enum_members_annotations">
</colgroup>
<tbody>
<tr>
<td class="enum_member_name"><p><a name="G-URI-PARAMS-NONE:CAPS"></a>G_URI_PARAMS_NONE</p></td>
<td class="enum_member_description">
<p>No flags set.</p>
</td>
<td class="enum_member_annotations"> </td>
</tr>
<tr>
<td class="enum_member_name"><p><a name="G-URI-PARAMS-CASE-INSENSITIVE:CAPS"></a>G_URI_PARAMS_CASE_INSENSITIVE</p></td>
<td class="enum_member_description">
<p>Parameter names are case insensitive.</p>
</td>
<td class="enum_member_annotations"> </td>
</tr>
<tr>
<td class="enum_member_name"><p><a name="G-URI-PARAMS-WWW-FORM:CAPS"></a>G_URI_PARAMS_WWW_FORM</p></td>
<td class="enum_member_description">
<p>Replace <code class="literal">+</code> with space character. Only useful for
URLs on the web, using the <code class="literal">https</code> or <code class="literal">http</code> schemas.</p>
</td>
<td class="enum_member_annotations"> </td>
</tr>
<tr>
<td class="enum_member_name"><p><a name="G-URI-PARAMS-PARSE-RELAXED:CAPS"></a>G_URI_PARAMS_PARSE_RELAXED</p></td>
<td class="enum_member_description">
<p>See <a class="link" href="glib-URI-Functions.html#G-URI-FLAGS-PARSE-RELAXED:CAPS"><code class="literal">G_URI_FLAGS_PARSE_RELAXED</code></a>.</p>
</td>
<td class="enum_member_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<p class="since">Since: <a class="link" href="api-index-2-66.html#api-index-2.66">2.66</a></p>
</div>
<hr>
<div class="refsect2">
<a name="G-URI-RESERVED-CHARS-ALLOWED-IN-PATH:CAPS"></a><h3>G_URI_RESERVED_CHARS_ALLOWED_IN_PATH</h3>
<pre class="programlisting">#define G_URI_RESERVED_CHARS_ALLOWED_IN_PATH G_URI_RESERVED_CHARS_ALLOWED_IN_PATH_ELEMENT "/"
</pre>
<p>Allowed characters in a path. Includes <code class="literal">!$&amp;amp;'()*+,;=:@/</code>.</p>
<p class="since">Since: <a class="link" href="api-index-2-16.html#api-index-2.16">2.16</a></p>
</div>
<hr>
<div class="refsect2">
<a name="G-URI-RESERVED-CHARS-ALLOWED-IN-PATH-ELEMENT:CAPS"></a><h3>G_URI_RESERVED_CHARS_ALLOWED_IN_PATH_ELEMENT</h3>
<pre class="programlisting">#define G_URI_RESERVED_CHARS_ALLOWED_IN_PATH_ELEMENT G_URI_RESERVED_CHARS_SUBCOMPONENT_DELIMITERS ":@"
</pre>
<p>Allowed characters in path elements. Includes <code class="literal">!$&amp;amp;'()*+,;=:@</code>.</p>
<p class="since">Since: <a class="link" href="api-index-2-16.html#api-index-2.16">2.16</a></p>
</div>
<hr>
<div class="refsect2">
<a name="G-URI-RESERVED-CHARS-ALLOWED-IN-USERINFO:CAPS"></a><h3>G_URI_RESERVED_CHARS_ALLOWED_IN_USERINFO</h3>
<pre class="programlisting">#define G_URI_RESERVED_CHARS_ALLOWED_IN_USERINFO G_URI_RESERVED_CHARS_SUBCOMPONENT_DELIMITERS ":"
</pre>
<p>Allowed characters in userinfo as defined in
<a class="ulink" href="https://tools.ietf.org/html/rfc3986" target="_top">RFC 3986</a>. Includes <code class="literal">!$&amp;amp;'()*+,;=:</code>.</p>
<p class="since">Since: <a class="link" href="api-index-2-16.html#api-index-2.16">2.16</a></p>
</div>
<hr>
<div class="refsect2">
<a name="G-URI-RESERVED-CHARS-GENERIC-DELIMITERS:CAPS"></a><h3>G_URI_RESERVED_CHARS_GENERIC_DELIMITERS</h3>
<pre class="programlisting">#define G_URI_RESERVED_CHARS_GENERIC_DELIMITERS ":/?#[]@"
</pre>
<p>Generic delimiters characters as defined in
<a class="ulink" href="https://tools.ietf.org/html/rfc3986" target="_top">RFC 3986</a>. Includes <code class="literal">:/?#[]@</code>.</p>
<p class="since">Since: <a class="link" href="api-index-2-16.html#api-index-2.16">2.16</a></p>
</div>
<hr>
<div class="refsect2">
<a name="G-URI-RESERVED-CHARS-SUBCOMPONENT-DELIMITERS:CAPS"></a><h3>G_URI_RESERVED_CHARS_SUBCOMPONENT_DELIMITERS</h3>
<pre class="programlisting">#define G_URI_RESERVED_CHARS_SUBCOMPONENT_DELIMITERS "!$&amp;'()*+,;="
</pre>
<p>Subcomponent delimiter characters as defined in
<a class="ulink" href="https://tools.ietf.org/html/rfc3986" target="_top">RFC 3986</a>. Includes <code class="literal">!$&amp;amp;'()*+,;=</code>.</p>
<p class="since">Since: <a class="link" href="api-index-2-16.html#api-index-2.16">2.16</a></p>
</div>
<hr>
<div class="refsect2">
<a name="G-URI-ERROR:CAPS"></a><h3>G_URI_ERROR</h3>
<pre class="programlisting">#define G_URI_ERROR (g_uri_error_quark ()) GLIB_AVAILABLE_MACRO_IN_2_66
</pre>
<p>Error domain for URI methods. Errors in this domain will be from
the <a class="link" href="glib-URI-Functions.html#GUriError" title="enum GUriError"><span class="type">GUriError</span></a> enumeration. See <a class="link" href="glib-Error-Reporting.html#GError" title="struct GError"><span class="type">GError</span></a> for information on error
domains.</p>
<p class="since">Since: <a class="link" href="api-index-2-66.html#api-index-2.66">2.66</a></p>
</div>
<hr>
<div class="refsect2">
<a name="GUriError"></a><h3>enum GUriError</h3>
<p>Error codes returned by <a class="link" href="glib-URI-Functions.html#GUri" title="GUri"><span class="type">GUri</span></a> methods.</p>
<div class="refsect3">
<a name="GUriError.members"></a><h4>Members</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="300px" class="enum_members_name">
<col class="enum_members_description">
<col width="200px" class="enum_members_annotations">
</colgroup>
<tbody>
<tr>
<td class="enum_member_name"><p><a name="G-URI-ERROR-FAILED:CAPS"></a>G_URI_ERROR_FAILED</p></td>
<td class="enum_member_description">
<p>Generic error if no more specific error is available.
See the error message for details.</p>
</td>
<td class="enum_member_annotations"> </td>
</tr>
<tr>
<td class="enum_member_name"><p><a name="G-URI-ERROR-BAD-SCHEME:CAPS"></a>G_URI_ERROR_BAD_SCHEME</p></td>
<td class="enum_member_description">
<p>The scheme of a URI could not be parsed.</p>
</td>
<td class="enum_member_annotations"> </td>
</tr>
<tr>
<td class="enum_member_name"><p><a name="G-URI-ERROR-BAD-USER:CAPS"></a>G_URI_ERROR_BAD_USER</p></td>
<td class="enum_member_description">
<p>The user/userinfo of a URI could not be parsed.</p>
</td>
<td class="enum_member_annotations"> </td>
</tr>
<tr>
<td class="enum_member_name"><p><a name="G-URI-ERROR-BAD-PASSWORD:CAPS"></a>G_URI_ERROR_BAD_PASSWORD</p></td>
<td class="enum_member_description">
<p>The password of a URI could not be parsed.</p>
</td>
<td class="enum_member_annotations"> </td>
</tr>
<tr>
<td class="enum_member_name"><p><a name="G-URI-ERROR-BAD-AUTH-PARAMS:CAPS"></a>G_URI_ERROR_BAD_AUTH_PARAMS</p></td>
<td class="enum_member_description">
<p>The authentication parameters of a URI could not be parsed.</p>
</td>
<td class="enum_member_annotations"> </td>
</tr>
<tr>
<td class="enum_member_name"><p><a name="G-URI-ERROR-BAD-HOST:CAPS"></a>G_URI_ERROR_BAD_HOST</p></td>
<td class="enum_member_description">
<p>The host of a URI could not be parsed.</p>
</td>
<td class="enum_member_annotations"> </td>
</tr>
<tr>
<td class="enum_member_name"><p><a name="G-URI-ERROR-BAD-PORT:CAPS"></a>G_URI_ERROR_BAD_PORT</p></td>
<td class="enum_member_description">
<p>The port of a URI could not be parsed.</p>
</td>
<td class="enum_member_annotations"> </td>
</tr>
<tr>
<td class="enum_member_name"><p><a name="G-URI-ERROR-BAD-PATH:CAPS"></a>G_URI_ERROR_BAD_PATH</p></td>
<td class="enum_member_description">
<p>The path of a URI could not be parsed.</p>
</td>
<td class="enum_member_annotations"> </td>
</tr>
<tr>
<td class="enum_member_name"><p><a name="G-URI-ERROR-BAD-QUERY:CAPS"></a>G_URI_ERROR_BAD_QUERY</p></td>
<td class="enum_member_description">
<p>The query of a URI could not be parsed.</p>
</td>
<td class="enum_member_annotations"> </td>
</tr>
<tr>
<td class="enum_member_name"><p><a name="G-URI-ERROR-BAD-FRAGMENT:CAPS"></a>G_URI_ERROR_BAD_FRAGMENT</p></td>
<td class="enum_member_description">
<p>The fragment of a URI could not be parsed.</p>
</td>
<td class="enum_member_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<p class="since">Since: <a class="link" href="api-index-2-66.html#api-index-2.66">2.66</a></p>
</div>
</div>
</div>
<div class="footer">
<hr>Generated by GTK-Doc V1.33.1</div>
</body>
</html>