mirror of
https://github.com/servo/servo.git
synced 2025-06-06 16:45:39 +00:00
Bluetooth Permission API integration
This commit is contained in:
parent
f3ddee5dbc
commit
5287cd3bea
17 changed files with 550 additions and 45 deletions
|
@ -103,16 +103,16 @@ impl BluetoothRemoteGATTServerMethods for BluetoothRemoteGATTServer {
|
|||
#[allow(unrooted_must_root)]
|
||||
// https://webbluetoothcg.github.io/web-bluetooth/#dom-bluetoothremotegattserver-getprimaryservice
|
||||
fn GetPrimaryService(&self, service: BluetoothServiceUUID) -> Rc<Promise> {
|
||||
// TODO: Step 1: Implement the Permission API and the allowedServices BluetoothDevice internal slot.
|
||||
// Step 1. is in get_gatt_children
|
||||
// Step 2.
|
||||
get_gatt_children(self, true, BluetoothUUID::service, Some(service), String::from(self.Device().Id()),
|
||||
self.Device().Gatt().Connected(), GATTType::PrimaryService)
|
||||
self.Device().get_gatt().Connected(), GATTType::PrimaryService)
|
||||
}
|
||||
|
||||
#[allow(unrooted_must_root)]
|
||||
// https://webbluetoothcg.github.io/web-bluetooth/#dom-bluetoothremotegattserver-getprimaryservices
|
||||
fn GetPrimaryServices(&self, service: Option<BluetoothServiceUUID>) -> Rc<Promise> {
|
||||
// TODO: Step 1: Implement the Permission API and the allowedServices BluetoothDevice internal slot.
|
||||
// Step 1. is in get_gatt_children
|
||||
// Step 2.
|
||||
get_gatt_children(self, false, BluetoothUUID::service, service, String::from(self.Device().Id()),
|
||||
self.Connected(), GATTType::PrimaryService)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue