Parses uri_string
according to flags
. If the result is not a
valid absolute URI, it will be discarded, and an error returned.
a string representing an absolute URI
flags describing how to parse uri_string
Gets uri'
s authentication parameters. Depending on the URI scheme,
ide_uri_parse_params() may be useful for further parsing this
information.
Gets uri'
s fragment, which may contain %-encoding,
depending on the flags with which uri
was parsed.
Gets uri'
s host. If uri
contained an IPv6 address literal, this
value will not include the brackets that are required by the URI
syntax.
Gets uri'
s password. If uri
was not parsed with
%IDE_URI_PARSE_PASSWORD, this will always be %NULL.
Gets uri'
s path, which may contain %-encoding, depending
on the flags with which uri
was parsed.
Gets uri'
s port.
Gets uri'
s query, which may contain %-encoding, depending
on the flags with which uri
was parsed.
For queries consisting of a series of "name=value" parameters, ide_uri_parse_params() may be useful.
Gets uri'
s scheme.
Gets uri'
s user. If uri
was parsed with %IDE_URI_PARSE_PASSWORD or
%IDE_URI_PARSE_AUTH_PARAMS, this is the string that appears before the
password and parameters in the userinfo. If not, then the entire
userinfo is considered the user.
Parses uri_string
according to flags
and, if it is a relative
URI, merges it with base_uri
. If the result is not a valid
absolute URI, it will be discarded, and an error returned.
a string representing a relative or absolute URI
flags describing how to parse uri_string
Sets uri'
s authentication parameters to auth_params
.
the authentication parameters, or %NULL
Sets uri'
s fragment to fragment,
which is assumed to have been
%-encoded by the caller. See ide_uri_set_path() for more
details.
the (%-encoded) fragment
Sets uri'
s host to host
.
If host
is an IPv6 IP address, it should not include the brackets
required by the URI syntax; they will be added automatically when
converting uri
to a string.
the hostname or IP address, or %NULL
Sets uri'
s password to password
.
the password, or %NULL
Sets uri'
s path to path,
which is assumed to have been
appropriately %-encoded. In particular, this means that if
you want to include a literal percent sign the path, you must write
it as "%25". That being said, if path
contains an
unencoded '?' or '#' character, it will get encoded, since
otherwise converting uri
to a string and then back to a #IdeUri
again would give a different result.
the (%-encoded) path
Sets uri'
s port to port
. If port
is 0, it will not be output
when calling ide_uri_to_string().
the port, or %0
Sets uri'
s query to query,
which is assumed to have been
%-encoded by the caller. See ide_uri_set_path() for more
details.
the (%-encoded) query
Sets uri'
s scheme to scheme
.
the URI scheme
Sets uri'
s user to user
. See ide_uri_get_user() for a description
of how this interacts with various parsing flags.
the username, or %NULL
Returns a string representing uri
.
flags describing how to convert uri
Decrements the reference count of uri
by 1. If the reference count
reaches zero, the structure will be freed.
Parses uri_string
according to flags
. If the result is not a
valid absolute URI, it will be discarded, and an error returned.
a string representing an absolute URI
flags describing how to parse uri_string
Utility function for parsing "network" URIs. This extracts just the
scheme, host, and port from uri_string
. All three out parameters
are mandatory.
a string containing a network URI
flags for parsing uri_string
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.
The params
string is assumed to still be %-encoded, but
the returned values will be fully decoded. (Thus it is possible
that the returned values may contain '=' or separator,
if the
value was encoded in the input.) Invalid %-encoding is
treated as with the non-%IDE_URI_PARSE_STRICT rules for ide_uri_new().
(However, if params
is the path or query string from a #IdeUri that
was parsed with %IDE_URI_PARSE_STRICT, then you already know that it
does not contain any invalid encoding.)
a string containing "attribute=value" parameters
the length of params,
or -1 if it is NUL-terminated
the separator character between parameters. (usually ';', but sometimes '&')
whether to match parameter names case-insensitively
Parses uri_string
more-or-less according to the generic grammar of
RFC 3986 ("more" if strict
is %TRUE, "less" if %FALSE), and
outputs the pieces into the provided variables. This is a low-level
method that does not do any pre- or post-processing of uri_string,
and is "garbage in, garbage out"; it just splits uri_string
into
pieces at the appropriate punctuation characters (consuming
delimiters as appropriate), and returns the pieces. Components that
are not present in uri_string
will be set to %NULL (but note that
the path is always present, though it may be an empty string).
a string containing a relative or absolute URI
whether to parse uri_string
strictly
FIXME