### Method

# Fwupd Codec to_variant

since: 2.0.0

#### Declaration [src]

    GVariant*
    fwupd_codec_to_variant (
      FwupdCodec* self,
      FwupdCodecFlags flags
    )

#### Description [src]

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

Available since: 2.0.0

#### Parameters

`flags`

  Type: `FwupdCodecFlags`

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

#### Return value

Type: `GVariant`

A `GVariant`.

The caller of the method takes ownership of the data, and is responsible for freeing it.