asc-utils: AppStream Compose Library Reference Manual

## asc-utils

asc-utils — Common utility functions for AppStream-Compose.

## Functions

gchar * | asc_build_component_global_id ()
gchar * | asc_filename_from_url ()

## Includes

    #include <appstream-compose.h>

## Description

## Functions

### asc_build_component_global_id ()

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

Builds a global component ID from a component-id and a (usually MD5) checksum 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 | an AppStream component ID. |
checksum | a MD5 hashsum as string generated from the component's combined metadata. |

### asc_filename_from_url ()

    gchar *
    asc_filename_from_url (const gchar *url);

Generate a filename from a web-URL that can be used to store the file on disk after download.

#### Parameters

url | The URL to extract a filename from. |