|
| 1 | +#![allow(unused_imports)] |
| 2 | +use super::*; |
| 3 | +use wasm_bindgen::prelude::*; |
| 4 | +#[wasm_bindgen] |
| 5 | +extern "C" { |
| 6 | + # [wasm_bindgen (extends = EventTarget , extends = :: js_sys :: Object , js_name = Bluetooth , typescript_type = "Bluetooth")] |
| 7 | + #[derive(Debug, Clone, PartialEq, Eq)] |
| 8 | + #[doc = "The `Bluetooth` class."] |
| 9 | + #[doc = ""] |
| 10 | + #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Bluetooth)"] |
| 11 | + #[doc = ""] |
| 12 | + #[doc = "*This API requires the following crate features to be activated: `Bluetooth`*"] |
| 13 | + pub type Bluetooth; |
| 14 | + # [wasm_bindgen (structural , method , getter , js_class = "Bluetooth" , js_name = onavailabilitychanged)] |
| 15 | + #[doc = "Getter for the `onavailabilitychanged` field of this object."] |
| 16 | + #[doc = ""] |
| 17 | + #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Bluetooth/onavailabilitychanged)"] |
| 18 | + #[doc = ""] |
| 19 | + #[doc = "*This API requires the following crate features to be activated: `Bluetooth`*"] |
| 20 | + pub fn onavailabilitychanged(this: &Bluetooth) -> Option<::js_sys::Function>; |
| 21 | + # [wasm_bindgen (structural , method , setter , js_class = "Bluetooth" , js_name = onavailabilitychanged)] |
| 22 | + #[doc = "Setter for the `onavailabilitychanged` field of this object."] |
| 23 | + #[doc = ""] |
| 24 | + #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Bluetooth/onavailabilitychanged)"] |
| 25 | + #[doc = ""] |
| 26 | + #[doc = "*This API requires the following crate features to be activated: `Bluetooth`*"] |
| 27 | + pub fn set_onavailabilitychanged(this: &Bluetooth, value: Option<&::js_sys::Function>); |
| 28 | + #[cfg(feature = "BluetoothDevice")] |
| 29 | + # [wasm_bindgen (structural , method , getter , js_class = "Bluetooth" , js_name = referringDevice)] |
| 30 | + #[doc = "Getter for the `referringDevice` field of this object."] |
| 31 | + #[doc = ""] |
| 32 | + #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Bluetooth/referringDevice)"] |
| 33 | + #[doc = ""] |
| 34 | + #[doc = "*This API requires the following crate features to be activated: `Bluetooth`, `BluetoothDevice`*"] |
| 35 | + pub fn referring_device(this: &Bluetooth) -> Option<BluetoothDevice>; |
| 36 | + # [wasm_bindgen (structural , method , getter , js_class = "Bluetooth" , js_name = onadvertisementreceived)] |
| 37 | + #[doc = "Getter for the `onadvertisementreceived` field of this object."] |
| 38 | + #[doc = ""] |
| 39 | + #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Bluetooth/onadvertisementreceived)"] |
| 40 | + #[doc = ""] |
| 41 | + #[doc = "*This API requires the following crate features to be activated: `Bluetooth`*"] |
| 42 | + pub fn onadvertisementreceived(this: &Bluetooth) -> Option<::js_sys::Function>; |
| 43 | + # [wasm_bindgen (structural , method , setter , js_class = "Bluetooth" , js_name = onadvertisementreceived)] |
| 44 | + #[doc = "Setter for the `onadvertisementreceived` field of this object."] |
| 45 | + #[doc = ""] |
| 46 | + #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Bluetooth/onadvertisementreceived)"] |
| 47 | + #[doc = ""] |
| 48 | + #[doc = "*This API requires the following crate features to be activated: `Bluetooth`*"] |
| 49 | + pub fn set_onadvertisementreceived(this: &Bluetooth, value: Option<&::js_sys::Function>); |
| 50 | + # [wasm_bindgen (structural , method , getter , js_class = "Bluetooth" , js_name = ongattserverdisconnected)] |
| 51 | + #[doc = "Getter for the `ongattserverdisconnected` field of this object."] |
| 52 | + #[doc = ""] |
| 53 | + #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Bluetooth/ongattserverdisconnected)"] |
| 54 | + #[doc = ""] |
| 55 | + #[doc = "*This API requires the following crate features to be activated: `Bluetooth`*"] |
| 56 | + pub fn ongattserverdisconnected(this: &Bluetooth) -> Option<::js_sys::Function>; |
| 57 | + # [wasm_bindgen (structural , method , setter , js_class = "Bluetooth" , js_name = ongattserverdisconnected)] |
| 58 | + #[doc = "Setter for the `ongattserverdisconnected` field of this object."] |
| 59 | + #[doc = ""] |
| 60 | + #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Bluetooth/ongattserverdisconnected)"] |
| 61 | + #[doc = ""] |
| 62 | + #[doc = "*This API requires the following crate features to be activated: `Bluetooth`*"] |
| 63 | + pub fn set_ongattserverdisconnected(this: &Bluetooth, value: Option<&::js_sys::Function>); |
| 64 | + # [wasm_bindgen (structural , method , getter , js_class = "Bluetooth" , js_name = oncharacteristicvaluechanged)] |
| 65 | + #[doc = "Getter for the `oncharacteristicvaluechanged` field of this object."] |
| 66 | + #[doc = ""] |
| 67 | + #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Bluetooth/oncharacteristicvaluechanged)"] |
| 68 | + #[doc = ""] |
| 69 | + #[doc = "*This API requires the following crate features to be activated: `Bluetooth`*"] |
| 70 | + pub fn oncharacteristicvaluechanged(this: &Bluetooth) -> Option<::js_sys::Function>; |
| 71 | + # [wasm_bindgen (structural , method , setter , js_class = "Bluetooth" , js_name = oncharacteristicvaluechanged)] |
| 72 | + #[doc = "Setter for the `oncharacteristicvaluechanged` field of this object."] |
| 73 | + #[doc = ""] |
| 74 | + #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Bluetooth/oncharacteristicvaluechanged)"] |
| 75 | + #[doc = ""] |
| 76 | + #[doc = "*This API requires the following crate features to be activated: `Bluetooth`*"] |
| 77 | + pub fn set_oncharacteristicvaluechanged(this: &Bluetooth, value: Option<&::js_sys::Function>); |
| 78 | + # [wasm_bindgen (structural , method , getter , js_class = "Bluetooth" , js_name = onserviceadded)] |
| 79 | + #[doc = "Getter for the `onserviceadded` field of this object."] |
| 80 | + #[doc = ""] |
| 81 | + #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Bluetooth/onserviceadded)"] |
| 82 | + #[doc = ""] |
| 83 | + #[doc = "*This API requires the following crate features to be activated: `Bluetooth`*"] |
| 84 | + pub fn onserviceadded(this: &Bluetooth) -> Option<::js_sys::Function>; |
| 85 | + # [wasm_bindgen (structural , method , setter , js_class = "Bluetooth" , js_name = onserviceadded)] |
| 86 | + #[doc = "Setter for the `onserviceadded` field of this object."] |
| 87 | + #[doc = ""] |
| 88 | + #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Bluetooth/onserviceadded)"] |
| 89 | + #[doc = ""] |
| 90 | + #[doc = "*This API requires the following crate features to be activated: `Bluetooth`*"] |
| 91 | + pub fn set_onserviceadded(this: &Bluetooth, value: Option<&::js_sys::Function>); |
| 92 | + # [wasm_bindgen (structural , method , getter , js_class = "Bluetooth" , js_name = onservicechanged)] |
| 93 | + #[doc = "Getter for the `onservicechanged` field of this object."] |
| 94 | + #[doc = ""] |
| 95 | + #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Bluetooth/onservicechanged)"] |
| 96 | + #[doc = ""] |
| 97 | + #[doc = "*This API requires the following crate features to be activated: `Bluetooth`*"] |
| 98 | + pub fn onservicechanged(this: &Bluetooth) -> Option<::js_sys::Function>; |
| 99 | + # [wasm_bindgen (structural , method , setter , js_class = "Bluetooth" , js_name = onservicechanged)] |
| 100 | + #[doc = "Setter for the `onservicechanged` field of this object."] |
| 101 | + #[doc = ""] |
| 102 | + #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Bluetooth/onservicechanged)"] |
| 103 | + #[doc = ""] |
| 104 | + #[doc = "*This API requires the following crate features to be activated: `Bluetooth`*"] |
| 105 | + pub fn set_onservicechanged(this: &Bluetooth, value: Option<&::js_sys::Function>); |
| 106 | + # [wasm_bindgen (structural , method , getter , js_class = "Bluetooth" , js_name = onserviceremoved)] |
| 107 | + #[doc = "Getter for the `onserviceremoved` field of this object."] |
| 108 | + #[doc = ""] |
| 109 | + #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Bluetooth/onserviceremoved)"] |
| 110 | + #[doc = ""] |
| 111 | + #[doc = "*This API requires the following crate features to be activated: `Bluetooth`*"] |
| 112 | + pub fn onserviceremoved(this: &Bluetooth) -> Option<::js_sys::Function>; |
| 113 | + # [wasm_bindgen (structural , method , setter , js_class = "Bluetooth" , js_name = onserviceremoved)] |
| 114 | + #[doc = "Setter for the `onserviceremoved` field of this object."] |
| 115 | + #[doc = ""] |
| 116 | + #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Bluetooth/onserviceremoved)"] |
| 117 | + #[doc = ""] |
| 118 | + #[doc = "*This API requires the following crate features to be activated: `Bluetooth`*"] |
| 119 | + pub fn set_onserviceremoved(this: &Bluetooth, value: Option<&::js_sys::Function>); |
| 120 | + # [wasm_bindgen (method , structural , js_class = "Bluetooth" , js_name = getAvailability)] |
| 121 | + #[doc = "The `getAvailability()` method."] |
| 122 | + #[doc = ""] |
| 123 | + #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Bluetooth/getAvailability)"] |
| 124 | + #[doc = ""] |
| 125 | + #[doc = "*This API requires the following crate features to be activated: `Bluetooth`*"] |
| 126 | + pub fn get_availability(this: &Bluetooth) -> ::js_sys::Promise; |
| 127 | + # [wasm_bindgen (method , structural , js_class = "Bluetooth" , js_name = getDevices)] |
| 128 | + #[doc = "The `getDevices()` method."] |
| 129 | + #[doc = ""] |
| 130 | + #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Bluetooth/getDevices)"] |
| 131 | + #[doc = ""] |
| 132 | + #[doc = "*This API requires the following crate features to be activated: `Bluetooth`*"] |
| 133 | + pub fn get_devices(this: &Bluetooth) -> ::js_sys::Promise; |
| 134 | + # [wasm_bindgen (method , structural , js_class = "Bluetooth" , js_name = requestDevice)] |
| 135 | + #[doc = "The `requestDevice()` method."] |
| 136 | + #[doc = ""] |
| 137 | + #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Bluetooth/requestDevice)"] |
| 138 | + #[doc = ""] |
| 139 | + #[doc = "*This API requires the following crate features to be activated: `Bluetooth`*"] |
| 140 | + pub fn request_device(this: &Bluetooth) -> ::js_sys::Promise; |
| 141 | + #[cfg(feature = "RequestDeviceOptions")] |
| 142 | + # [wasm_bindgen (method , structural , js_class = "Bluetooth" , js_name = requestDevice)] |
| 143 | + #[doc = "The `requestDevice()` method."] |
| 144 | + #[doc = ""] |
| 145 | + #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Bluetooth/requestDevice)"] |
| 146 | + #[doc = ""] |
| 147 | + #[doc = "*This API requires the following crate features to be activated: `Bluetooth`, `RequestDeviceOptions`*"] |
| 148 | + pub fn request_device_with_options( |
| 149 | + this: &Bluetooth, |
| 150 | + options: &RequestDeviceOptions, |
| 151 | + ) -> ::js_sys::Promise; |
| 152 | +} |
0 commit comments