Method

FwupdClientget_device_by_id

Declaration [src]

FwupdDevice*
fwupd_client_get_device_by_id (
  FwupdClient* self,
  const gchar* device_id,
  GCancellable* cancellable,
  GError** error
)

Description [src]

Gets a device by its device ID.

Available since:0.9.3

Parameters

device_id const gchar*
 

The device ID, e.g. usb:00:01:03:03

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

Optional GCancellable.

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

Return value

Returns: FwupdDevice
 

A device or NULL.

 The caller of the method takes ownership of the data, and is responsible for freeing it.