Method

GLibUriParamsIternext

since: 2.66

Declaration

gboolean
g_uri_params_iter_next (
  GUriParamsIter* iter,
  gchar** attribute,
  gchar** value,
  GError** error
)

Description

Advances iter and retrieves the next attribute/value. FALSE is returned if an error has occurred (in which case error is set), or if the end of the iteration is reached (in which case attribute and value are set to NULL and the iterator becomes invalid). If TRUE is returned, g_uri_params_iter_next() may be called again to receive another attribute/value pair.

Note that the same attribute may be returned multiple times, since URIs allow repeated attributes.

Available since: 2.66

Parameters

attribute

Type: gchar**

On return, contains the attribute, or NULL.

The argument will be set by the function.
The argument can be set to NULL by the method.
The argument can be NULL.
The instance takes ownership of the data, and is responsible for freeing it.
The value is a NUL terminated UTF-8 string.
value

Type: gchar**

On return, contains the value, or NULL.

The argument will be set by the function.
The argument can be set to NULL by the method.
The argument can be NULL.
The instance takes ownership of the data, and is responsible for freeing it.
The value is a NUL terminated UTF-8 string.
error

Type: GError **

The return location for a recoverable error.

The argument can be NULL.
If the return location is not NULL, then you must initialize it to a NULL GError*.
The argument will left initialized to NULL by the method if there are no errors.
In case of error, the argument will be set to a newly allocated GError; the caller will take ownership of the data, and be responsible for freeing it.

Return value

Type: gboolean

FALSE if the end of the parameters has been reached or an error was encountered. TRUE otherwise.