Fwupd.build_user_agent
Description: Reference for Fwupd.build_user_agent

### Function

# Fwupdbuild_user_agent

#### Declaration [src]

    gchar*
    fwupd_build_user_agent (
      const gchar* package_name,
      const gchar* package_version
    )

#### Description [src]

Builds a user-agent to use for the download.

Supplying harmless details to the server means it knows more about each client. This allows the web service to respond in a different way, for instance sending a different metadata file for old versions of fwupd, or returning an error for Solaris machines.

Before freaking out about theoretical privacy implications, much more data than this is sent to each and every website you visit.

Rather that using this function you should use `fwupd_client_set_user_agent_for_package()` which uses the runtime version of the daemon rather than the build-time version.

Available since: | 1.0.3

#### Parameters

`package_name` | `const gchar*`
| Client program name, e.g. `gnome-software`
| The data is owned by the caller of the function.
| The value is a NUL terminated UTF-8 string.
`package_version` | `const gchar*`
| Client program version, e.g. `3.28.1`
| The data is owned by the caller of the function.
| The value is a NUL terminated UTF-8 string.

#### Return value

Returns: | `gchar*`
| A string, e.g. `foo/0.1 (Linux i386 4.14.5; en; Fedora 27) fwupd/1.0.3`
| 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.