Method

FwupdPluginDeviceget_backend_parent_with_subsystem

Declaration [src]

FuDevice*
fu_device_get_backend_parent_with_subsystem (
  FuDevice* self,
  const gchar* subsystem,
  GError** error
)

Description [src]

Creates a device parent (of the correct type) using the current backend for a given device kind.

NOTE: The backend must implement FuBackendClass->get_device_parent for this method to work — for cases where the plugin has created both parent and child, and used fu_device_add_child(), using fu_device_get_parent() is probably more appropriate.

Available since:2.0.0

Parameters

subsystem const gchar*
 

An optional device subsystem, e.g. “usb:usb_device”

 The argument can be NULL.
 The data is owned by the caller of the function.
 The value is a NUL terminated UTF-8 string.
error GError **
  The return location for a GError*, or NULL.

Return value

Returns: FuDevice
 

A FuDevice or NULL if not found or unimplemented.

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