Function

Plumautils_decode_uri

since: 1.0

Declaration [src]

gboolean
pluma_utils_decode_uri (
  const gchar* uri,
  gchar** scheme,
  gchar** user,
  gchar** host,
  gchar** port,
  gchar** path
)

Description [src]

Parse and break an uri apart in its individual components like the uri scheme, user info, port, host and path. The return value pointer can be NULL to ignore certain parts of the uri. If the function returns TRUE, then all return value pointers should be freed using g_free.

Available since: 1.0

Parameters

uri

Type: const gchar*

The uri to decode.

The data is owned by the caller of the function.
The value is a NUL terminated UTF-8 string.
scheme

Type: gchar**

Return value pointer for the uri’s scheme (e.g. http, sftp, …), 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.
user

Type: gchar**

Return value pointer for the uri user info, 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: gchar**

Return value pointer for the uri host, 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: gchar**

Return value pointer for the uri port, 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.
path

Type: gchar**

Return value pointer for the uri path, 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: gboolean

TRUE if the uri could be properly decoded, FALSE otherwise.