Function
GLibVariantnew_from_bytes
since: 2.36
Declaration [src]
GVariant*
g_variant_new_from_bytes (
  const GVariantType* type,
  GBytes* bytes,
  gboolean trusted
)
Description [src]
Constructs a new serialized-mode GVariant instance.  This is the
inner interface for creation of new serialized values that gets
called from various functions in gvariant.c.
A reference is taken on bytes.
The data in bytes must be aligned appropriately for the type being loaded.
Otherwise this function will internally create a copy of the memory (since
GLib 2.60) or (in older versions) fail and exit the process.
Available since: 2.36
Parameters
- type
- 
            Type: GVariantTypeA GVariantType.The data is owned by the caller of the function. 
- bytes
- 
            Type: GBytesA GBytes.The data is owned by the caller of the function. 
- trusted
- 
            Type: gbooleanIf the contents of bytesare trusted.
Return value
Type: GVariant
A new GVariant with a floating reference.
| The data is owned by the called function. |