Created
January 29, 2016 08:34
-
-
Save zakorgy/873c5921dfade2281a43 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
pub struct BluetoothDevice { | |
reflector_: Reflector, | |
id: DOMString, | |
name: DOMString, | |
adData: JS<BluetoothAdvertisingData>, | |
deviceClass: u32, | |
vendorIDSource: VendorIDSource, | |
vendorID: u32, | |
productID: u32, | |
productVersion: u32, | |
gattServer: JS<BluetoothGATTRemoteServer>, | |
//TODO:uuids: Vec<u32>, | |
} | |
impl BluetoothDevice { | |
pub fn new_inherited(id: DOMString, | |
name: DOMString, | |
adData: &BluetoothAdvertisingData, | |
deviceClass: u32, | |
vendorIDSource: VendorIDSource, | |
vendorID: u32, | |
productID: u32, | |
productVersion: u32, | |
gattServer: &BluetoothGATTRemoteServer) | |
-> BluetoothDevice { | |
BluetoothDevice { | |
reflector_: Reflector::new(), | |
id: id, | |
name: name, | |
adData: JS::from_ref(adData), | |
deviceClass: deviceClass, | |
vendorIDSource: vendorIDSource, | |
vendorID: vendorID, | |
productID: productID, | |
productVersion: productVersion, | |
gattServer: JS::from_ref(gattServer), | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment