Panel.SessionItem.get_metadata_value

### Method

# Panel SessionItemget_metadata_value

#### Declaration [src]

    GVariant*
    panel_session_item_get_metadata_value (
      PanelSessionItem* self,
      const char* key,
      const GVariantType* expected_type
    )

#### Description [src]

Retrieves the metadata value for `key`.

If `expected_type` is non-`NULL`, any non-`NULL` value returned from this function will match `expected_type`.

#### Parameters

`key`

  Type: `const char*`

  The metadata key.

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

`expected_type`

  Type: `GVariantType`

  A `GVariantType` or `NULL`.

  The argument can be `NULL`.
  The data is owned by the caller of the method.

#### Return value

Type: `GVariant`

A non-floating `GVariant` which should be released with g_variant_unref(); otherwise `NULL`.

The caller of the method takes ownership of the returned data, and is responsible for freeing it.
The return value can be `NULL`.