mirror of
https://github.com/servo/servo.git
synced 2025-06-06 16:45:39 +00:00
Integrate the devices
respository (#30974)
Despite the name of this dependency, it only handles bluetooth. Because it's a separate repository. Integrating it, allows changes here to be tested more consistently. In addition, it's likely that new bluetooth libraries will allow removing the majority of the platform-specific code in this directory. This is based on the version of this dependency from: https://github.com/servo/devices/pull/34
This commit is contained in:
parent
fddc4a430f
commit
6a804cd775
23 changed files with 3880 additions and 27 deletions
|
@ -8,12 +8,12 @@ use std::collections::{HashMap, HashSet};
|
|||
use std::error::Error;
|
||||
use std::string::String;
|
||||
|
||||
use device::bluetooth::{
|
||||
use uuid::Uuid;
|
||||
|
||||
use crate::bluetooth::{
|
||||
BluetoothAdapter, BluetoothDevice, BluetoothGATTCharacteristic, BluetoothGATTDescriptor,
|
||||
BluetoothGATTService,
|
||||
};
|
||||
use uuid::Uuid;
|
||||
|
||||
use crate::BluetoothManager;
|
||||
|
||||
thread_local!(pub static CACHED_IDS: RefCell<HashSet<Uuid>> = RefCell::new(HashSet::new()));
|
||||
|
@ -152,7 +152,7 @@ fn create_device(
|
|||
name: String,
|
||||
address: String,
|
||||
) -> Result<BluetoothDevice, Box<dyn Error>> {
|
||||
let device = BluetoothDevice::create_mock_device(adapter.clone(), generate_id().to_string())?;
|
||||
let device = adapter.create_mock_device(generate_id().to_string())?;
|
||||
device.set_name(Some(name))?;
|
||||
device.set_address(address)?;
|
||||
device.set_connectable(true)?;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue