### Function

# AppStreamCompose build_component_global_id

#### Declaration [src]

    gchar*
    asc_build_component_global_id (
      const gchar* component_id,
      const gchar* checksum
    )

#### Description [src]

Builds a global component ID from a component-id and a checksum (usually Blake3) generated from the component data.

The global-id is used as a global, unique identifier for a component. (while the component-ID is local, e.g. for one source). Its primary usecase is to identify a media directory on the filesystem which is associated with this component.

#### Parameters

`component_id`

  Type: `const gchar*`

  An AppStream component ID.

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

`checksum`

  Type: `const gchar*`

  A checksum as string generated from the component’s combined metadata.

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

#### Return value

Type: `gchar*`

The new global ID. Free with %g_free.

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