guri: new URI parsing and generating functions

Add a set of new URI parsing and generating functions, including a new
parsed-URI type GUri. Move all the code from gurifuncs.c into guri.c,
reimplementing some of those functions (and
g_string_append_uri_encoded()) in terms of the new code.

Fixes:
https://gitlab.gnome.org/GNOME/glib/issues/110

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
This commit is contained in:
Dan Winship
2019-01-17 10:38:20 +04:00
committed by Marc-André Lureau
parent 167b950122
commit d83d68d64c
16 changed files with 3715 additions and 443 deletions

View File

@@ -81,7 +81,7 @@
<xi:include href="xml/timers.xml" />
<xi:include href="xml/spawn.xml" />
<xi:include href="xml/fileutils.xml" />
<xi:include href="xml/gurifuncs.xml" />
<xi:include href="xml/guri.xml" />
<xi:include href="xml/ghostutils.xml" />
<xi:include href="xml/shell.xml" />
<xi:include href="xml/option.xml" />

View File

@@ -3335,19 +3335,63 @@ g_base64_decode_inplace
<SECTION>
<TITLE>URI Functions</TITLE>
<FILE>gurifuncs</FILE>
<FILE>guri</FILE>
GUri
g_uri_ref
g_uri_unref
<SUBSECTION>
GUriFlags
g_uri_split
g_uri_split_with_user
g_uri_split_network
g_uri_is_valid
g_uri_join
g_uri_join_with_user
g_uri_parse
g_uri_parse_relative
g_uri_resolve_relative
g_uri_build
g_uri_build_with_user
g_uri_peek_scheme
g_uri_parse_scheme
<SUBSECTION>
GUriHideFlags
g_uri_to_string
g_uri_to_string_partial
<SUBSECTION>
g_uri_get_scheme
g_uri_get_userinfo
g_uri_get_user
g_uri_get_password
g_uri_get_auth_params
g_uri_get_host
g_uri_get_port
g_uri_get_path
g_uri_get_query
g_uri_get_fragment
g_uri_get_flags
<SUBSECTION>
g_uri_parse_params
<SUBSECTION>
G_URI_RESERVED_CHARS_ALLOWED_IN_PATH
G_URI_RESERVED_CHARS_ALLOWED_IN_PATH_ELEMENT
G_URI_RESERVED_CHARS_ALLOWED_IN_USERINFO
G_URI_RESERVED_CHARS_GENERIC_DELIMITERS
G_URI_RESERVED_CHARS_SUBCOMPONENT_DELIMITERS
g_uri_parse_scheme
g_uri_escape_string
g_uri_unescape_string
g_uri_escape_bytes
g_uri_unescape_bytes
g_uri_unescape_segment
<SUBSECTION>
g_uri_list_extract_uris
g_filename_from_uri
g_filename_to_uri
<SUBSECTION>
G_URI_ERROR
GUriError
<SUBSECTION Private>
g_uri_error_quark
</SECTION>
<SECTION>