### Function

# Gio content_type_get_mime_type

since: 2.0

#### Declaration

    gchar*
    g_content_type_get_mime_type (
      const gchar* type
    )

#### Description

Gets the mime type for the content type, if one is registered.

Available since: 2.0

#### Parameters

`type`

  Type: `const gchar*`

  A content type string.

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

#### Return value

Type: `gchar*`

The registered mime type for the given `type`, or `NULL` if unknown; free with g_free().

The caller of the function takes ownership of the data, and is responsible for freeing it.
The return value can be `NULL`.
The value is a NUL terminated UTF-8 string.