Method

GLibVariantget

Declaration

void
g_variant_get (
  GVariant* value,
  const gchar* format_string,
  ...
)

Description

Deconstructs a GVariant instance.

Think of this function as an analogue to scanf().

The arguments that are expected by this function are entirely determined by format_string. format_string also restricts the permissible types of value. It is an error to give a value with an incompatible type. See the section on [GVariant format strings][gvariant-format-strings]. Please note that the syntax of the format string is very likely to be extended in the future.

format_string determines the C types that are used for unpacking the values and also determines if the values are copied or borrowed, see the section on [GVariant format strings][gvariant-format-strings-pointers].

Available since:2.24
This method is not directly available to language bindings.

Parameters

format_string

Type: const gchar*

A GVariant format string.

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

Type: 

Arguments, as per format_string.