This MR is the first of at least three MRs adding support for the Bluetooth stack API in Wine:
1. The winebth.sys driver, which talks to BlueZ and implements several key IOCTLs for communicating with Bluetooth devices and radios. 2. A bthserv service, which is responsible for keeping track of the authentication agent, and relaying authentication requests and responses to and from the driver. 3. Userspace APIs (bluetoothapis.dll, bthprops.cpl, Windows.Devices.Bluetooth, etc).
winebth.sys is split into two "sub" drivers:
`winebth.sys`: The main entrypoint, loaded by winedevice. It listens for changes to Bluetooth devices and radios and authentication events on BlueZ, passing them on the bthenum. It also handles most IOCTL operations on Bluetooth radio PDOs.
`bthenum`: Responsible for creating nodes for discovered Bluetooth devices and associated services. It also tries to validate any IOCTLs relating to bluetooth devices before passing them to winebth.sys.
The unix code is split between dbus.c, unixlib.c and winebluetooth.c, where winebluetooth is a simple wrapper around unixlib for the sake of organization.
-- v10: dlls/winebth.sys: Implement IOCTL command IOCTL_BTH_DISCONNECT_DEVICE. dlls/winebth.sys: Add support for RequestAuthorization requests from BlueZ. dlls/winebth.sys: Add support for RequestPasskey requests from BlueZ. dlls/winebth.sys: Add support for DisplayPasskey requests from BlueZ. dlls/winebth.sys: Add support for AuthorizeService requests from BlueZ. dlls/winebth.sys: Add support for DisplayPinCode requests from BlueZ. dlls/winebth.sys: Add support for RequestPinCode requests from BlueZ. dlls/winebth.sys: Add support for RequestConfirmation requests from BlueZ. dlls/winebth.sys: Implement IOCTL_WINEBTH_SEND_AUTH_RESPONSE. dlls/winebth.sys: Add IOCTLs IOCTL_WINEBTH_START_AUTH_AGENT and IOCTL_WINEBTH_STOP_AUTH_AGENT. dlls/winebth.sys: Add support for BLUETOOTH_RADIO_IN_RANGE events (WM_DEVICECHANGE). dlls/winebth.sys: Implement IOCTL commands IOCTL_WINEBTH_RADIO_SET_FLAG and IOCTL_WINEBTH_RADIO_UNSET_FLAG. dlls/winebth.sys: Implement IOCTL commands IOCTL_WINEBTH_RADIO_START_DISCOVERY and IOCTL_WINEBTH_RADIO_STOP_DISCOVERY. dlls/winebth.sys: Implement IOCTL_BTH_GET_LOCAL_INFO for radio devices. dlls/winebth.sys: Create PDOs for Bluetooth services discovered on remote devices. dlls/winebth.sys: Implement IOCTL_BTH_GET_DEVICE_INFO. dlls/winebth.sys: Update device PDO properties on receiving PropertiesChanged for an org.bluez.Device1 object. dlls/winebth.sys: Set device PDO properties from the device's corresponding org.bluez.Device1 object properties. dlls/winebth.sys: Remove the corresponding device PDO on receiving InterfacesRemoved for an org.bluez.Device1 object. dlls/winebth.sys: Create PDOs for newly discovered org.bluez.Device1 objects. dlls/winebth.sys: Update radio PDO properties on receiving PropertiesChanged for an org.bluez.Adapter1 object. dlls/winebth.sys: Remove the corresponding radio PDO on receiving InterfacesRemoved for a org.bluez.Adapter1 object. dlls/winebth.sys: Create new radio PDOs on receiving InterfacesAdded for objects that implement org.bluez.Adapter1. dlls/winebth.sys: Set radio PDO properties from the device's corresponding org.bluez.Adapter1 object properties. dlls/winebth.sys: Register and enable BTHPORT_DEVICE and BLUETOOTH_RADIO interfaces for radio PDOs. dlls/winebth.sys: Derive a unique hardware ID for radio PDOs from their corresponding BlueZ object path. dlls/winebth.sys: Create radio PDOs from the list of org.bluez.Adapter1 objects on BlueZ. dlls/winebth.sys: Add a basic unixlib stub using DBus. dlls/winebth.sys: Add base winebth.sys driver.
This merge request has too many patches to be relayed via email. Please visit the URL below to see the contents of the merge request. https://gitlab.winehq.org/wine/wine/-/merge_requests/6621