Skip to content

Instantly share code, notes, and snippets.

View zakorgy's full-sized avatar

Gyula Zakor zakorgy

  • Morgan Stanley, Budapest
  • Szeged, Hungary
View GitHub Profile
no method named `IsPrimary` found for type `&dom::bluetoothgattservice::BluetoothGATTService` in the current scope
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
use dom::bindings::reflector::Reflector;
#[dom_struct]
pub struct BluetoothGATTService {
reflector_: Reflector,
}
/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
// https://webbluetoothcg.github.io/web-bluetooth/#bluetoothgattservice
interface BluetoothGATTService {
readonly attribute BluetoothDevice device;
//readonly attribute UUID uuid;
diff --git a/components/script/dom/bluetoothdevice.rs b/components/script/dom/bluetoothdevice.rs
index 732b206..49a314f 100644
--- a/components/script/dom/bluetoothdevice.rs
+++ b/components/script/dom/bluetoothdevice.rs
@@ -6,12 +6,15 @@ use dom::bluetoothadvertisingdata::BluetoothAdvertisingData;
use dom::bindings::codegen::Bindings::BluetoothDeviceBinding;
use dom::bindings::codegen::Bindings::BluetoothDeviceBinding::{BluetoothDeviceMethods, VendorIDSource};
use dom::bindings::global::GlobalRef;
+use dom::bluetoothgattremoteserver::BluetoothGATTRemoteServer;
use dom::bindings::js::{JS, Root};
diff --git a/components/script/dom/bluetoothadvertisingdata.rs b/components/script/dom/bluetoothadvertisingdata.rs
index 1896e46..5634a62 100644
--- a/components/script/dom/bluetoothadvertisingdata.rs
+++ b/components/script/dom/bluetoothadvertisingdata.rs
@@ -40,14 +40,17 @@ impl BluetoothAdvertisingData {
}
impl BluetoothAdvertisingDataMethods for BluetoothAdvertisingData {
+ // https://webbluetoothcg.github.io/web-bluetooth/#dom-bluetoothadvertisingdata-appearance
fn GetAppearance(&self) -> Option<u16> {
diff --git a/components/script/dom/bluetoothadvertisingdata.rs b/components/script/dom/bluetoothadvertisingdata.rs
index 1896e46..5634a62 100644
--- a/components/script/dom/bluetoothadvertisingdata.rs
+++ b/components/script/dom/bluetoothadvertisingdata.rs
@@ -40,14 +40,17 @@ impl BluetoothAdvertisingData {
}
impl BluetoothAdvertisingDataMethods for BluetoothAdvertisingData {
+ // https://webbluetoothcg.github.io/web-bluetooth/#dom-bluetoothadvertisingdata-appearance
fn GetAppearance(&self) -> Option<u16> {
pub struct BluetoothDevice {
reflector_: Reflector,
id: DOMString,
name: DOMString,
adData: JS<BluetoothAdvertisingData>,
deviceClass: u32,
vendorIDSource: VendorIDSource,
vendorID: u32,
productID: u32,
productVersion: u32,
pub struct BluetoothGATTRemoteServer {
reflector_: Reflector,
device: JS<BluetoothDevice>,
connected: bool,
}
impl BluetoothGATTRemoteServer {
pub fn new_inherited(device: &BluetoothDevice, connected: bool) -> BluetoothGATTRemoteServer {
BluetoothGATTRemoteServer {
reflector_: Reflector::new(),
#[dom_struct]
pub struct BluetoothDevice {
reflector_: Reflector,
id: DOMString,
name: DOMString,
adData: JS<BluetoothAdvertisingData>,
deviceClass: u32,
vendorIDSource: VendorIDSource,
vendorID: u32,
productID: u32,
#[dom_struct]
pub struct BluetoothDevice {
reflector_: Reflector,
id: DOMString,
name: DOMString,
adData: JS<BluetoothAdvertisingData>,
deviceClass: u32,
vendorIDSource: VendorIDSource,
vendorID: u32,
productID: u32,