Method

FwupdClientbuild_report_devices

Declaration [src]

gchar*
fwupd_client_build_report_devices (
  FwupdClient* self,
  GPtrArray* devices,
  GHashTable* metadata,
  GError** error
)

Description [src]

Builds a JSON report for the list of devices.

This function should be called before asking the interactive user if they want to upload a report — as this function filters devices and may return an error if there is nothing to do.

You must have called fwupd_client_connect_async() on self before using this method.

Available since:1.9.20

Parameters

devices An array of FwupdDevice
 

Devices.

 The data is owned by the caller of the function.
metadata GHashTable*
 

Attributes.

 The data is owned by the caller of the function.
error GError **
  The return location for a GError*, or NULL.

Return value

Returns: gchar*
 

A string, or NULL if the ID is not present.

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