Hey, One additional high-level comment, after these patches, we have in the public API an opaque SpiceUsbDevice, which is // this is the structure behind SpiceUsbDevice typedef struct _SpiceUsbDeviceInfo { guint8 busnum; guint8 devaddr; guint16 vid; guint16 pid; gboolean isochronous; #ifdef G_OS_WIN32 guint8 state; #else SpiceUsbBackendDevice *bdev; #endif gint ref; } SpiceUsbDeviceInfo; SpiceUsbBackendDevice is struct _SpiceUsbBackendDevice { union { void *libusb_device; void *msc; } d; uint32_t isLibUsb : 1; uint32_t configured : 1; int refCount; void *mutex; SpiceUsbBackendChannel *attached_to; UsbDeviceInformation device_info; }; And UsbDeviceInformation is typedef struct UsbDeviceInformation { uint16_t bus; uint16_t address; uint16_t vid; uint16_t pid; uint8_t class; uint8_t subclass; uint8_t protocol; uint8_t isochronous; uint8_t max_luns; } UsbDeviceInformation; This is really redundant, from experimenting a bit, it seems the SpiceUsbBackendDevice + UsbDeviceInformation you add in this patch could instead be SpiceUsbDevice. In short, I'd move SpiceUsbDeviceInfo definition from usb-device-manager.c to a new usb-device.c (aka usb-device-backend.c), and then add the new API introduced in your patch on top of that, using SpiceUsbDevice everywhere rather than adding SpiceUsbBackend. Christophe
Attachment:
signature.asc
Description: PGP signature
_______________________________________________ Spice-devel mailing list Spice-devel@xxxxxxxxxxxxxxxxxxxxx https://lists.freedesktop.org/mailman/listinfo/spice-devel