### Virtual Method

# Fwupd Codec to_variant

#### Declaration [src]

    GVariant*
    to_variant (
      FwupdCodec* self,
      FwupdCodecFlags flags
    )

#### Description [src]

Converts an object that implements `FwupdCodec` to a `GVariant`.

Available since: | 2.0.0

#### Parameters

`flags` | `FwupdCodecFlags`
| A `FwupdCodecFlags`, e.g. `FWUPD_CODEC_FLAG_TRUSTED`.

#### Return value

Returns: | `GVariant`
| A `GVariant`.
| The caller of the function takes ownership of the data, and is responsible for freeing it.