Function
GLibUribuild_with_user
since: 2.66
Declaration [src]
GUri*
g_uri_build_with_user (
GUriFlags flags,
const gchar* scheme,
const gchar* user,
const gchar* password,
const gchar* auth_params,
const gchar* host,
gint port,
const gchar* path,
const gchar* query,
const gchar* fragment
)
Description [src]
Creates a new GUri
from the given components according to flags
(G_URI_FLAGS_HAS_PASSWORD
is added unconditionally). The flags
must be
coherent with the passed values, in particular use %
-encoded values with
G_URI_FLAGS_ENCODED
.
In contrast to g_uri_build(), this allows specifying the components
of the ‘userinfo’ field separately. Note that user
must be non-NULL
if either password
or auth_params
is non-NULL
.
Available since: 2.66
Parameters
flags
-
Type:
GUriFlags
Flags describing how to build the
GUri
. scheme
-
Type:
const gchar*
The URI scheme.
The data is owned by the caller of the function. The value is a NUL terminated UTF-8 string. user
-
Type:
const gchar*
The user component of the userinfo, or
NULL
.The argument can be NULL
.The data is owned by the caller of the function. The value is a NUL terminated UTF-8 string. password
-
Type:
const gchar*
The password component of the userinfo, or
NULL
.The argument can be NULL
.The data is owned by the caller of the function. The value is a NUL terminated UTF-8 string. auth_params
-
Type:
const gchar*
The auth params of the userinfo, or
NULL
.The argument can be NULL
.The data is owned by the caller of the function. The value is a NUL terminated UTF-8 string. host
-
Type:
const gchar*
The host component, or
NULL
.The argument can be NULL
.The data is owned by the caller of the function. The value is a NUL terminated UTF-8 string. port
-
Type:
gint
The port, or
-1
. path
-
Type:
const gchar*
The path component.
The data is owned by the caller of the function. The value is a NUL terminated UTF-8 string. query
-
Type:
const gchar*
The query component, or
NULL
.The argument can be NULL
.The data is owned by the caller of the function. The value is a NUL terminated UTF-8 string. fragment
-
Type:
const gchar*
The fragment, or
NULL
.The argument can be NULL
.The data is owned by the caller of the function. The value is a NUL terminated UTF-8 string.
Return value
Type: GUri
A new GUri
.
The caller of the function takes ownership of the data, and is responsible for freeing it. |