### Function

# AppStreamCompose CheckMetadataEarlyFn

#### Declaration

    void
    (* AscCheckMetadataEarlyFn) (
      AscResult* cres,
      const AscUnit* unit,
      gpointer user_data
    )

#### Description [src]

Function which is called after all metainfo and related data (e.g. desktop-entry files) has been loaded, but before any expensive operations such as screenshot downloads or font searches are performed.

This function can be useful to filter out unwanted components early in the process and avoid unneeded downloads and other data processing. By the time this function is called, the component’s global ID should be finalized and should not change any longer.

Please note that this function may be called from any thread, and thread safety needs to be taked care off by the callee.

#### Parameters

`cres`

  Type: `AscResult`

  A pointer to generated `AscResult`.

  The data is owned by the caller of the function.

`unit`

  Type: `AscUnit`

  The unit we are currently processing.

  The data is owned by the caller of the function.

`user_data`

  Type: `gpointer`

  Additional data.

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