mirror of
https://git.proxmox.com/git/fwupd
synced 2025-08-07 19:26:15 +00:00
trivial: Add fu_usb_device_is_open() for future use
This commit is contained in:
parent
bde01d5240
commit
c7ad7fb746
@ -118,6 +118,24 @@ fu_usb_device_class_init (FuUsbDeviceClass *klass)
|
|||||||
g_object_class_install_property (object_class, PROP_USB_DEVICE, pspec);
|
g_object_class_install_property (object_class, PROP_USB_DEVICE, pspec);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* fu_usb_device_is_open:
|
||||||
|
* @device: A #FuUsbDevice
|
||||||
|
*
|
||||||
|
* Finds out if a USB device is currently open.
|
||||||
|
*
|
||||||
|
* Returns: %TRUE if the device is open.
|
||||||
|
*
|
||||||
|
* Since: 1.0.3
|
||||||
|
**/
|
||||||
|
gboolean
|
||||||
|
fu_usb_device_is_open (FuUsbDevice *device)
|
||||||
|
{
|
||||||
|
FuUsbDevicePrivate *priv = GET_PRIVATE (device);
|
||||||
|
g_return_val_if_fail (FU_IS_USB_DEVICE (device), FALSE);
|
||||||
|
return priv->usb_device_locker != NULL;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* fu_usb_device_open:
|
* fu_usb_device_open:
|
||||||
* @device: A #FuUsbDevice
|
* @device: A #FuUsbDevice
|
||||||
|
@ -54,6 +54,7 @@ gboolean fu_usb_device_close (FuUsbDevice *device,
|
|||||||
GError **error);
|
GError **error);
|
||||||
gboolean fu_usb_device_probe (FuUsbDevice *device,
|
gboolean fu_usb_device_probe (FuUsbDevice *device,
|
||||||
GError **error);
|
GError **error);
|
||||||
|
gboolean fu_usb_device_is_open (FuUsbDevice *device);
|
||||||
|
|
||||||
G_END_DECLS
|
G_END_DECLS
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user