diff options
Diffstat (limited to 'gusb/gusb-device.c')
-rw-r--r-- | gusb/gusb-device.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/gusb/gusb-device.c b/gusb/gusb-device.c index 3c0a125..90f1539 100644 --- a/gusb/gusb-device.c +++ b/gusb/gusb-device.c @@ -641,6 +641,23 @@ _g_usb_device_get_device(GUsbDevice *self) return priv->device; } +/** + * g_usb_device_is_emulated: + * @self: a #GUsbDevice instance + * + * Gets if the device is emulated. + * + * Return value: %TRUE if the device is emulated and not backed by a physical device. + * + * Since: 0.4.4 + **/ +gboolean +g_usb_device_is_emulated(GUsbDevice *self) +{ + GUsbDevicePrivate *priv = GET_PRIVATE(self); + return priv->device == NULL; +} + static gboolean g_usb_device_libusb_error_to_gerror(GUsbDevice *self, gint rc, GError **error) { |