GvariantSourceGVariant - GLib's variant type for structured data serialization
GVariant is a variant data type used for:
Type Codes:
}
: dictionary entry
Signed 16-bit integer - stored as OCaml int
Opaque GVariant type - backed by GVariant* with g_variant_unref finalizer
Get the type string of the variant (e.g., "i" for int32, "s" for string)
Create a maybe type variant. of_maybe ty None creates a null variant, of_maybe ty (Some v) wraps the value.
Unwrap a maybe type variant. Returns None for null, Some v for wrapped value.
sv pattern)These functions look up values in asv (string->variant) dictionaries. They return None if the key is not found or if the value is not of the expected type.
For dictionaries with different value types, use get_child_value with the appropriate index.
Lookup a string value in a dictionary. Returns None if the key is not found or the value is not a string.
Lookup an int32 value in a dictionary. Returns None if the key is not found or the value is not an int32.
Lookup a boolean value in a dictionary. Returns None if the key is not found or the value is not a boolean.
Lookup a byte (uint8) value in a dictionary. Returns None if the key is not found or the value is not a byte.
Lookup an int16 value in a dictionary. Returns None if the key is not found or the value is not an int16.
Lookup a uint16 value in a dictionary. Returns None if the key is not found or the value is not a uint16.
Lookup a uint32 value in a dictionary. Returns None if the key is not found or the value is not a uint32.
Lookup an int64 value in a dictionary. Returns None if the key is not found or the value is not an int64.
Lookup a uint64 value in a dictionary. Returns None if the key is not found or the value is not a uint64.
Lookup a double value in a dictionary. Returns None if the key is not found or the value is not a double.
Lookup an object path value in a dictionary. Returns None if the key is not found or the value is not an object path.
Lookup a signature value in a dictionary. Returns None if the key is not found or the value is not a signature.
Lookup a handle (file descriptor) value in a dictionary. Returns None if the key is not found or the value is not a handle.
Get the nth child value. The returned value is a new reference and must be unreferenced by the caller (handled by GC).
Print the variant in GVariant text format. First arg is the variant, second is whether to annotate types.