mirror of
https://github.com/servo/servo.git
synced 2025-08-04 21:20:23 +01:00
Implementation of the getPrimaryService(s), the getCharacteristic(s) and the getDescriptor(s) functions.
This commit is contained in:
parent
9825ea41b4
commit
b01c52c18f
9 changed files with 411 additions and 59 deletions
|
@ -8,9 +8,12 @@ pub enum BluetoothMethodMsg {
|
|||
RequestDevice(IpcSender<BluetoothObjectMsg>),
|
||||
GATTServerConnect(String, IpcSender<BluetoothObjectMsg>),
|
||||
GATTServerDisconnect(String, IpcSender<BluetoothObjectMsg>),
|
||||
GetPrimaryService(String, IpcSender<BluetoothObjectMsg>),
|
||||
GetCharacteristic(String, IpcSender<BluetoothObjectMsg>),
|
||||
GetDescriptor(String, IpcSender<BluetoothObjectMsg>),
|
||||
GetPrimaryService(String, String, IpcSender<BluetoothObjectMsg>),
|
||||
GetPrimaryServices(String, Option<String>, IpcSender<BluetoothObjectMsg>),
|
||||
GetCharacteristic(String, String, IpcSender<BluetoothObjectMsg>),
|
||||
GetCharacteristics(String, Option<String>, IpcSender<BluetoothObjectMsg>),
|
||||
GetDescriptor(String, String, IpcSender<BluetoothObjectMsg>),
|
||||
GetDescriptors(String, Option<String>, IpcSender<BluetoothObjectMsg>),
|
||||
ReadValue(String, IpcSender<BluetoothObjectMsg>),
|
||||
WriteValue(String, Vec<u8>, IpcSender<BluetoothObjectMsg>),
|
||||
Exit,
|
||||
|
@ -40,6 +43,9 @@ pub enum BluetoothObjectMsg {
|
|||
is_primary: bool,
|
||||
instance_id: String
|
||||
},
|
||||
BluetoothServices {
|
||||
services_vec: Vec<BluetoothObjectMsg>
|
||||
},
|
||||
BluetoothCharacteristic {
|
||||
// Characteristic
|
||||
uuid: String,
|
||||
|
@ -55,10 +61,16 @@ pub enum BluetoothObjectMsg {
|
|||
reliable_write: bool,
|
||||
writable_auxiliaries: bool
|
||||
},
|
||||
BluetoothCharacteristics {
|
||||
characteristics_vec: Vec<BluetoothObjectMsg>
|
||||
},
|
||||
BluetoothDescriptor {
|
||||
uuid: String,
|
||||
instance_id: String
|
||||
},
|
||||
BluetoothDescriptors {
|
||||
descriptors_vec: Vec<BluetoothObjectMsg>,
|
||||
},
|
||||
BluetoothReadValue {
|
||||
value: Vec<u8>
|
||||
},
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue