1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
// @generated by `just generate-methods` from protocol/*.json.
// Do not edit by hand; edit xtask/ and regenerate.
//! This domain allows configuring virtual Bluetooth devices to test the
//! web-bluetooth API.
//!
//! Method names for the `BluetoothEmulation` domain, for use with
//! [`CdpClient::call`](crate::CdpClient::call).
//!
//! This domain is experimental and may change without notice.
/// Enable the BluetoothEmulation domain.
///
/// Parameters:
/// - `state`: CentralState
/// - `leSupported`: boolean
pub const ENABLE: &str = "BluetoothEmulation.enable";
/// Set the state of the simulated central.
///
/// Parameters:
/// - `state`: CentralState
pub const SET_SIMULATED_CENTRAL_STATE: &str = "BluetoothEmulation.setSimulatedCentralState";
/// Disable the BluetoothEmulation domain.
pub const DISABLE: &str = "BluetoothEmulation.disable";
/// Simulates a peripheral with |address|, |name| and |knownServiceUuids| that
/// has already been connected to the system.
///
/// Parameters:
/// - `address`: string
/// - `name`: string
/// - `manufacturerData`: array
/// - `knownServiceUuids`: array
pub const SIMULATE_PRECONNECTED_PERIPHERAL: &str =
"BluetoothEmulation.simulatePreconnectedPeripheral";
/// Simulates an advertisement packet described in |entry| being received by
/// the central.
///
/// Parameters:
/// - `entry`: ScanEntry
pub const SIMULATE_ADVERTISEMENT: &str = "BluetoothEmulation.simulateAdvertisement";
/// Simulates the response code from the peripheral with |address| for a GATT
/// operation of |type|. The |code| value follows the HCI Error Codes from
/// Bluetooth Core Specification Vol 2 Part D 1.3 List Of Error Codes.
///
/// Parameters:
/// - `address`: string
/// - `type`: GATTOperationType
/// - `code`: integer
pub const SIMULATE_GATT_OPERATION_RESPONSE: &str =
"BluetoothEmulation.simulateGATTOperationResponse";
/// Simulates the response from the characteristic with |characteristicId| for
/// a characteristic operation of |type|. The |code| value follows the Error
/// Codes from Bluetooth Core Specification Vol 3 Part F 3.4.1.1 Error
/// Response. The |data| is expected to exist when simulating a successful
/// read operation response.
///
/// Parameters:
/// - `characteristicId`: string
/// - `type`: CharacteristicOperationType
/// - `code`: integer
/// - `data`: string (optional)
pub const SIMULATE_CHARACTERISTIC_OPERATION_RESPONSE: &str =
"BluetoothEmulation.simulateCharacteristicOperationResponse";
/// Simulates the response from the descriptor with |descriptorId| for a
/// descriptor operation of |type|. The |code| value follows the Error Codes
/// from Bluetooth Core Specification Vol 3 Part F 3.4.1.1 Error Response. The
/// |data| is expected to exist when simulating a successful read operation
/// response.
///
/// Parameters:
/// - `descriptorId`: string
/// - `type`: DescriptorOperationType
/// - `code`: integer
/// - `data`: string (optional)
pub const SIMULATE_DESCRIPTOR_OPERATION_RESPONSE: &str =
"BluetoothEmulation.simulateDescriptorOperationResponse";
/// Adds a service with |serviceUuid| to the peripheral with |address|.
///
/// Parameters:
/// - `address`: string
/// - `serviceUuid`: string
///
/// Returns: `serviceId`
pub const ADD_SERVICE: &str = "BluetoothEmulation.addService";
/// Removes the service respresented by |serviceId| from the simulated
/// central.
///
/// Parameters:
/// - `serviceId`: string
pub const REMOVE_SERVICE: &str = "BluetoothEmulation.removeService";
/// Adds a characteristic with |characteristicUuid| and |properties| to the
/// service represented by |serviceId|.
///
/// Parameters:
/// - `serviceId`: string
/// - `characteristicUuid`: string
/// - `properties`: CharacteristicProperties
///
/// Returns: `characteristicId`
pub const ADD_CHARACTERISTIC: &str = "BluetoothEmulation.addCharacteristic";
/// Removes the characteristic respresented by |characteristicId| from the
/// simulated central.
///
/// Parameters:
/// - `characteristicId`: string
pub const REMOVE_CHARACTERISTIC: &str = "BluetoothEmulation.removeCharacteristic";
/// Adds a descriptor with |descriptorUuid| to the characteristic respresented
/// by |characteristicId|.
///
/// Parameters:
/// - `characteristicId`: string
/// - `descriptorUuid`: string
///
/// Returns: `descriptorId`
pub const ADD_DESCRIPTOR: &str = "BluetoothEmulation.addDescriptor";
/// Removes the descriptor with |descriptorId| from the simulated central.
///
/// Parameters:
/// - `descriptorId`: string
pub const REMOVE_DESCRIPTOR: &str = "BluetoothEmulation.removeDescriptor";
/// Simulates a GATT disconnection from the peripheral with |address|.
///
/// Parameters:
/// - `address`: string
pub const SIMULATE_GATT_DISCONNECTION: &str = "BluetoothEmulation.simulateGATTDisconnection";