1#![allow(unused_imports)]
2#![allow(clippy::all)]
3use super::*;
4use wasm_bindgen::prelude::*;
5#[cfg(web_sys_unstable_apis)]
6#[wasm_bindgen]
7extern "C" {
8 # [wasm_bindgen (extends = EventTarget , extends = :: js_sys :: Object , js_name = Bluetooth , typescript_type = "Bluetooth")]
9 #[derive(Debug, Clone, PartialEq, Eq)]
10 #[doc = "The `Bluetooth` class."]
11 #[doc = ""]
12 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Bluetooth)"]
13 #[doc = ""]
14 #[doc = "*This API requires the following crate features to be activated: `Bluetooth`*"]
15 #[doc = ""]
16 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
17 #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
18 pub type Bluetooth;
19 #[cfg(web_sys_unstable_apis)]
20 # [wasm_bindgen (structural , method , getter , js_class = "Bluetooth" , js_name = onavailabilitychanged)]
21 #[doc = "Getter for the `onavailabilitychanged` field of this object."]
22 #[doc = ""]
23 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Bluetooth/onavailabilitychanged)"]
24 #[doc = ""]
25 #[doc = "*This API requires the following crate features to be activated: `Bluetooth`*"]
26 #[doc = ""]
27 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
28 #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
29 pub fn onavailabilitychanged(this: &Bluetooth) -> Option<::js_sys::Function>;
30 #[cfg(web_sys_unstable_apis)]
31 # [wasm_bindgen (structural , method , setter , js_class = "Bluetooth" , js_name = onavailabilitychanged)]
32 #[doc = "Setter for the `onavailabilitychanged` field of this object."]
33 #[doc = ""]
34 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Bluetooth/onavailabilitychanged)"]
35 #[doc = ""]
36 #[doc = "*This API requires the following crate features to be activated: `Bluetooth`*"]
37 #[doc = ""]
38 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
39 #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
40 pub fn set_onavailabilitychanged(this: &Bluetooth, value: Option<&::js_sys::Function>);
41 #[cfg(web_sys_unstable_apis)]
42 #[cfg(feature = "BluetoothDevice")]
43 # [wasm_bindgen (structural , method , getter , js_class = "Bluetooth" , js_name = referringDevice)]
44 #[doc = "Getter for the `referringDevice` field of this object."]
45 #[doc = ""]
46 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Bluetooth/referringDevice)"]
47 #[doc = ""]
48 #[doc = "*This API requires the following crate features to be activated: `Bluetooth`, `BluetoothDevice`*"]
49 #[doc = ""]
50 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
51 #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
52 pub fn referring_device(this: &Bluetooth) -> Option<BluetoothDevice>;
53 #[cfg(web_sys_unstable_apis)]
54 # [wasm_bindgen (structural , method , getter , js_class = "Bluetooth" , js_name = onadvertisementreceived)]
55 #[doc = "Getter for the `onadvertisementreceived` field of this object."]
56 #[doc = ""]
57 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Bluetooth/onadvertisementreceived)"]
58 #[doc = ""]
59 #[doc = "*This API requires the following crate features to be activated: `Bluetooth`*"]
60 #[doc = ""]
61 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
62 #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
63 pub fn onadvertisementreceived(this: &Bluetooth) -> Option<::js_sys::Function>;
64 #[cfg(web_sys_unstable_apis)]
65 # [wasm_bindgen (structural , method , setter , js_class = "Bluetooth" , js_name = onadvertisementreceived)]
66 #[doc = "Setter for the `onadvertisementreceived` field of this object."]
67 #[doc = ""]
68 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Bluetooth/onadvertisementreceived)"]
69 #[doc = ""]
70 #[doc = "*This API requires the following crate features to be activated: `Bluetooth`*"]
71 #[doc = ""]
72 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
73 #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
74 pub fn set_onadvertisementreceived(this: &Bluetooth, value: Option<&::js_sys::Function>);
75 #[cfg(web_sys_unstable_apis)]
76 # [wasm_bindgen (structural , method , getter , js_class = "Bluetooth" , js_name = ongattserverdisconnected)]
77 #[doc = "Getter for the `ongattserverdisconnected` field of this object."]
78 #[doc = ""]
79 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Bluetooth/ongattserverdisconnected)"]
80 #[doc = ""]
81 #[doc = "*This API requires the following crate features to be activated: `Bluetooth`*"]
82 #[doc = ""]
83 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
84 #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
85 pub fn ongattserverdisconnected(this: &Bluetooth) -> Option<::js_sys::Function>;
86 #[cfg(web_sys_unstable_apis)]
87 # [wasm_bindgen (structural , method , setter , js_class = "Bluetooth" , js_name = ongattserverdisconnected)]
88 #[doc = "Setter for the `ongattserverdisconnected` field of this object."]
89 #[doc = ""]
90 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Bluetooth/ongattserverdisconnected)"]
91 #[doc = ""]
92 #[doc = "*This API requires the following crate features to be activated: `Bluetooth`*"]
93 #[doc = ""]
94 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
95 #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
96 pub fn set_ongattserverdisconnected(this: &Bluetooth, value: Option<&::js_sys::Function>);
97 #[cfg(web_sys_unstable_apis)]
98 # [wasm_bindgen (structural , method , getter , js_class = "Bluetooth" , js_name = oncharacteristicvaluechanged)]
99 #[doc = "Getter for the `oncharacteristicvaluechanged` field of this object."]
100 #[doc = ""]
101 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Bluetooth/oncharacteristicvaluechanged)"]
102 #[doc = ""]
103 #[doc = "*This API requires the following crate features to be activated: `Bluetooth`*"]
104 #[doc = ""]
105 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
106 #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
107 pub fn oncharacteristicvaluechanged(this: &Bluetooth) -> Option<::js_sys::Function>;
108 #[cfg(web_sys_unstable_apis)]
109 # [wasm_bindgen (structural , method , setter , js_class = "Bluetooth" , js_name = oncharacteristicvaluechanged)]
110 #[doc = "Setter for the `oncharacteristicvaluechanged` field of this object."]
111 #[doc = ""]
112 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Bluetooth/oncharacteristicvaluechanged)"]
113 #[doc = ""]
114 #[doc = "*This API requires the following crate features to be activated: `Bluetooth`*"]
115 #[doc = ""]
116 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
117 #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
118 pub fn set_oncharacteristicvaluechanged(this: &Bluetooth, value: Option<&::js_sys::Function>);
119 #[cfg(web_sys_unstable_apis)]
120 # [wasm_bindgen (structural , method , getter , js_class = "Bluetooth" , js_name = onserviceadded)]
121 #[doc = "Getter for the `onserviceadded` field of this object."]
122 #[doc = ""]
123 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Bluetooth/onserviceadded)"]
124 #[doc = ""]
125 #[doc = "*This API requires the following crate features to be activated: `Bluetooth`*"]
126 #[doc = ""]
127 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
128 #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
129 pub fn onserviceadded(this: &Bluetooth) -> Option<::js_sys::Function>;
130 #[cfg(web_sys_unstable_apis)]
131 # [wasm_bindgen (structural , method , setter , js_class = "Bluetooth" , js_name = onserviceadded)]
132 #[doc = "Setter for the `onserviceadded` field of this object."]
133 #[doc = ""]
134 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Bluetooth/onserviceadded)"]
135 #[doc = ""]
136 #[doc = "*This API requires the following crate features to be activated: `Bluetooth`*"]
137 #[doc = ""]
138 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
139 #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
140 pub fn set_onserviceadded(this: &Bluetooth, value: Option<&::js_sys::Function>);
141 #[cfg(web_sys_unstable_apis)]
142 # [wasm_bindgen (structural , method , getter , js_class = "Bluetooth" , js_name = onservicechanged)]
143 #[doc = "Getter for the `onservicechanged` field of this object."]
144 #[doc = ""]
145 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Bluetooth/onservicechanged)"]
146 #[doc = ""]
147 #[doc = "*This API requires the following crate features to be activated: `Bluetooth`*"]
148 #[doc = ""]
149 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
150 #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
151 pub fn onservicechanged(this: &Bluetooth) -> Option<::js_sys::Function>;
152 #[cfg(web_sys_unstable_apis)]
153 # [wasm_bindgen (structural , method , setter , js_class = "Bluetooth" , js_name = onservicechanged)]
154 #[doc = "Setter for the `onservicechanged` field of this object."]
155 #[doc = ""]
156 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Bluetooth/onservicechanged)"]
157 #[doc = ""]
158 #[doc = "*This API requires the following crate features to be activated: `Bluetooth`*"]
159 #[doc = ""]
160 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
161 #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
162 pub fn set_onservicechanged(this: &Bluetooth, value: Option<&::js_sys::Function>);
163 #[cfg(web_sys_unstable_apis)]
164 # [wasm_bindgen (structural , method , getter , js_class = "Bluetooth" , js_name = onserviceremoved)]
165 #[doc = "Getter for the `onserviceremoved` field of this object."]
166 #[doc = ""]
167 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Bluetooth/onserviceremoved)"]
168 #[doc = ""]
169 #[doc = "*This API requires the following crate features to be activated: `Bluetooth`*"]
170 #[doc = ""]
171 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
172 #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
173 pub fn onserviceremoved(this: &Bluetooth) -> Option<::js_sys::Function>;
174 #[cfg(web_sys_unstable_apis)]
175 # [wasm_bindgen (structural , method , setter , js_class = "Bluetooth" , js_name = onserviceremoved)]
176 #[doc = "Setter for the `onserviceremoved` field of this object."]
177 #[doc = ""]
178 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Bluetooth/onserviceremoved)"]
179 #[doc = ""]
180 #[doc = "*This API requires the following crate features to be activated: `Bluetooth`*"]
181 #[doc = ""]
182 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
183 #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
184 pub fn set_onserviceremoved(this: &Bluetooth, value: Option<&::js_sys::Function>);
185 #[cfg(web_sys_unstable_apis)]
186 # [wasm_bindgen (method , structural , js_class = "Bluetooth" , js_name = getAvailability)]
187 #[doc = "The `getAvailability()` method."]
188 #[doc = ""]
189 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Bluetooth/getAvailability)"]
190 #[doc = ""]
191 #[doc = "*This API requires the following crate features to be activated: `Bluetooth`*"]
192 #[doc = ""]
193 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
194 #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
195 pub fn get_availability(this: &Bluetooth) -> ::js_sys::Promise;
196 #[cfg(web_sys_unstable_apis)]
197 # [wasm_bindgen (method , structural , js_class = "Bluetooth" , js_name = getDevices)]
198 #[doc = "The `getDevices()` method."]
199 #[doc = ""]
200 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Bluetooth/getDevices)"]
201 #[doc = ""]
202 #[doc = "*This API requires the following crate features to be activated: `Bluetooth`*"]
203 #[doc = ""]
204 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
205 #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
206 pub fn get_devices(this: &Bluetooth) -> ::js_sys::Promise;
207 #[cfg(web_sys_unstable_apis)]
208 #[cfg(feature = "RequestDeviceOptions")]
209 # [wasm_bindgen (method , structural , js_class = "Bluetooth" , js_name = requestDevice)]
210 #[doc = "The `requestDevice()` method."]
211 #[doc = ""]
212 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Bluetooth/requestDevice)"]
213 #[doc = ""]
214 #[doc = "*This API requires the following crate features to be activated: `Bluetooth`, `RequestDeviceOptions`*"]
215 #[doc = ""]
216 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
217 #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
218 pub fn request_device(this: &Bluetooth, options: &RequestDeviceOptions) -> ::js_sys::Promise;
219}