mirror of
https://github.com/servo/servo.git
synced 2025-08-03 20:50:07 +01:00
Refactored a bluetooth* related files from codeStyle to code_style.
This commit is contained in:
parent
55ff161ed5
commit
5fa54177ca
5 changed files with 32 additions and 32 deletions
|
@ -19,9 +19,9 @@ pub struct BluetoothCharacteristicProperties {
|
|||
write: bool,
|
||||
notify: bool,
|
||||
indicate: bool,
|
||||
authenticatedSignedWrites: bool,
|
||||
reliableWrite: bool,
|
||||
writableAuxiliaries: bool,
|
||||
authenticated_signed_writes: bool,
|
||||
reliable_write: bool,
|
||||
writable_auxiliaries: bool,
|
||||
}
|
||||
|
||||
impl BluetoothCharacteristicProperties {
|
||||
|
@ -31,9 +31,9 @@ impl BluetoothCharacteristicProperties {
|
|||
write: bool,
|
||||
notify: bool,
|
||||
indicate: bool,
|
||||
authenticatedSignedWrites: bool,
|
||||
reliableWrite: bool,
|
||||
writableAuxiliaries: bool)
|
||||
authenticated_signed_writes: bool,
|
||||
reliable_write: bool,
|
||||
writable_auxiliaries: bool)
|
||||
-> BluetoothCharacteristicProperties {
|
||||
BluetoothCharacteristicProperties {
|
||||
reflector_: Reflector::new(),
|
||||
|
@ -43,9 +43,9 @@ impl BluetoothCharacteristicProperties {
|
|||
write: write,
|
||||
notify: notify,
|
||||
indicate: indicate,
|
||||
authenticatedSignedWrites: authenticatedSignedWrites,
|
||||
reliableWrite: reliableWrite,
|
||||
writableAuxiliaries: writableAuxiliaries,
|
||||
authenticated_signed_writes: authenticated_signed_writes,
|
||||
reliable_write: reliable_write,
|
||||
writable_auxiliaries: writable_auxiliaries,
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -107,16 +107,16 @@ impl BluetoothCharacteristicPropertiesMethods for BluetoothCharacteristicPropert
|
|||
|
||||
// https://webbluetoothcg.github.io/web-bluetooth/#dom-bluetoothcharacteristicproperties-authenticatedsignedwrites
|
||||
fn AuthenticatedSignedWrites(&self) -> bool {
|
||||
self.authenticatedSignedWrites
|
||||
self.authenticated_signed_writes
|
||||
}
|
||||
|
||||
// https://webbluetoothcg.github.io/web-bluetooth/#dom-bluetoothcharacteristicproperties-reliablewrite
|
||||
fn ReliableWrite(&self) -> bool {
|
||||
self.reliableWrite
|
||||
self.reliable_write
|
||||
}
|
||||
|
||||
// https://webbluetoothcg.github.io/web-bluetooth/#dom-bluetoothcharacteristicproperties-writableauxiliaries
|
||||
fn WritableAuxiliaries(&self) -> bool {
|
||||
self.writableAuxiliaries
|
||||
self.writable_auxiliaries
|
||||
}
|
||||
}
|
||||
|
|
|
@ -17,20 +17,20 @@ pub struct BluetoothDevice {
|
|||
reflector_: Reflector,
|
||||
id: DOMString,
|
||||
name: Option<DOMString>,
|
||||
adData: MutHeap<JS<BluetoothAdvertisingData>>,
|
||||
ad_data: MutHeap<JS<BluetoothAdvertisingData>>,
|
||||
gatt: MutNullableHeap<JS<BluetoothRemoteGATTServer>>,
|
||||
}
|
||||
|
||||
impl BluetoothDevice {
|
||||
pub fn new_inherited(id: DOMString,
|
||||
name: Option<DOMString>,
|
||||
adData: &BluetoothAdvertisingData)
|
||||
ad_data: &BluetoothAdvertisingData)
|
||||
-> BluetoothDevice {
|
||||
BluetoothDevice {
|
||||
reflector_: Reflector::new(),
|
||||
id: id,
|
||||
name: name,
|
||||
adData: MutHeap::new(adData),
|
||||
ad_data: MutHeap::new(ad_data),
|
||||
gatt: Default::default(),
|
||||
}
|
||||
}
|
||||
|
@ -61,7 +61,7 @@ impl BluetoothDeviceMethods for BluetoothDevice {
|
|||
|
||||
// https://webbluetoothcg.github.io/web-bluetooth/#dom-bluetoothdevice-addata
|
||||
fn AdData(&self) -> Root<BluetoothAdvertisingData> {
|
||||
self.adData.get()
|
||||
self.ad_data.get()
|
||||
}
|
||||
|
||||
// https://webbluetoothcg.github.io/web-bluetooth/#dom-bluetoothdevice-gatt
|
||||
|
|
|
@ -37,14 +37,14 @@ pub struct BluetoothRemoteGATTCharacteristic {
|
|||
uuid: DOMString,
|
||||
properties: MutHeap<JS<BluetoothCharacteristicProperties>>,
|
||||
value: DOMRefCell<Option<ByteString>>,
|
||||
instanceID: String,
|
||||
instance_id: String,
|
||||
}
|
||||
|
||||
impl BluetoothRemoteGATTCharacteristic {
|
||||
pub fn new_inherited(service: &BluetoothRemoteGATTService,
|
||||
uuid: DOMString,
|
||||
properties: &BluetoothCharacteristicProperties,
|
||||
instanceID: String)
|
||||
instance_id: String)
|
||||
-> BluetoothRemoteGATTCharacteristic {
|
||||
BluetoothRemoteGATTCharacteristic {
|
||||
reflector_: Reflector::new(),
|
||||
|
@ -52,7 +52,7 @@ impl BluetoothRemoteGATTCharacteristic {
|
|||
uuid: uuid,
|
||||
properties: MutHeap::new(properties),
|
||||
value: DOMRefCell::new(None),
|
||||
instanceID: instanceID,
|
||||
instance_id: instance_id,
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -77,7 +77,7 @@ impl BluetoothRemoteGATTCharacteristic {
|
|||
}
|
||||
|
||||
fn get_instance_id(&self) -> String {
|
||||
self.instanceID.clone()
|
||||
self.instance_id.clone()
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -28,20 +28,20 @@ pub struct BluetoothRemoteGATTDescriptor {
|
|||
characteristic: MutHeap<JS<BluetoothRemoteGATTCharacteristic>>,
|
||||
uuid: DOMString,
|
||||
value: DOMRefCell<Option<ByteString>>,
|
||||
instanceID: String,
|
||||
instance_id: String,
|
||||
}
|
||||
|
||||
impl BluetoothRemoteGATTDescriptor {
|
||||
pub fn new_inherited(characteristic: &BluetoothRemoteGATTCharacteristic,
|
||||
uuid: DOMString,
|
||||
instanceID: String)
|
||||
instance_id: String)
|
||||
-> BluetoothRemoteGATTDescriptor {
|
||||
BluetoothRemoteGATTDescriptor {
|
||||
reflector_: Reflector::new(),
|
||||
characteristic: MutHeap::new(characteristic),
|
||||
uuid: uuid,
|
||||
value: DOMRefCell::new(None),
|
||||
instanceID: instanceID,
|
||||
instance_id: instance_id,
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -64,7 +64,7 @@ impl BluetoothRemoteGATTDescriptor {
|
|||
}
|
||||
|
||||
fn get_instance_id(&self) -> String {
|
||||
self.instanceID.clone()
|
||||
self.instance_id.clone()
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -24,22 +24,22 @@ pub struct BluetoothRemoteGATTService {
|
|||
reflector_: Reflector,
|
||||
device: MutHeap<JS<BluetoothDevice>>,
|
||||
uuid: DOMString,
|
||||
isPrimary: bool,
|
||||
instanceID: String,
|
||||
is_primary: bool,
|
||||
instance_id: String,
|
||||
}
|
||||
|
||||
impl BluetoothRemoteGATTService {
|
||||
pub fn new_inherited(device: &BluetoothDevice,
|
||||
uuid: DOMString,
|
||||
isPrimary: bool,
|
||||
instanceID: String)
|
||||
is_primary: bool,
|
||||
instance_id: String)
|
||||
-> BluetoothRemoteGATTService {
|
||||
BluetoothRemoteGATTService {
|
||||
reflector_: Reflector::new(),
|
||||
device: MutHeap::new(device),
|
||||
uuid: uuid,
|
||||
isPrimary: isPrimary,
|
||||
instanceID: instanceID,
|
||||
is_primary: is_primary,
|
||||
instance_id: instance_id,
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -64,7 +64,7 @@ impl BluetoothRemoteGATTService {
|
|||
}
|
||||
|
||||
fn get_instance_id(&self) -> String {
|
||||
self.instanceID.clone()
|
||||
self.instance_id.clone()
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -76,7 +76,7 @@ impl BluetoothRemoteGATTServiceMethods for BluetoothRemoteGATTService {
|
|||
|
||||
// https://webbluetoothcg.github.io/web-bluetooth/#dom-bluetoothremotegattservice-isprimary
|
||||
fn IsPrimary(&self) -> bool {
|
||||
self.isPrimary
|
||||
self.is_primary
|
||||
}
|
||||
|
||||
// https://webbluetoothcg.github.io/web-bluetooth/#dom-bluetoothremotegattservice-uuid
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue