usb-redir: isolate usage of libusb and usbredirhost
As a step toward possibility to present emulated USB devices
to the guest, we remove the knowledge about libusb and
usbredirhost (which depends on libusb) from all the modules
and concentrate it in one (usb backend) which presents
abstract USB objects and internal API to all other modules.
Internal API presents following types of objects:
* SpiceUsbBackend: supports enumeration of local USB devices
(Windows), hot plug/unplug callbacks (Linux) and events
handling. It wraps libusb_context
* SpiceUsbBackendDevice: represent local USB device, provides
access to cached properties of the device, wraps libusb_device
* SpiceUsbBackendChannel: accumulates redirection functionality,
wraps usbredirhost
Signed-off-by: Yuri Benditovich <yuri.benditovich@daynix.com>
Showing
- src/Makefile.am 2 additions, 0 deletionssrc/Makefile.am
- src/channel-usbredir-priv.h 4 additions, 5 deletionssrc/channel-usbredir-priv.h
- src/channel-usbredir.c 47 additions, 168 deletionssrc/channel-usbredir.c
- src/meson.build 2 additions, 0 deletionssrc/meson.build
- src/usb-backend.c 622 additions, 0 deletionssrc/usb-backend.c
- src/usb-backend.h 110 additions, 0 deletionssrc/usb-backend.h
- src/usb-device-manager-priv.h 0 additions, 1 deletionsrc/usb-device-manager-priv.h
- src/usb-device-manager.c 107 additions, 229 deletionssrc/usb-device-manager.c
- src/win-usb-dev.c 32 additions, 71 deletionssrc/win-usb-dev.c
- src/win-usb-dev.h 3 additions, 2 deletionssrc/win-usb-dev.h
Loading
Please register or sign in to comment