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 = BluetoothDevice , typescript_type = "BluetoothDevice")]
9 #[derive(Debug, Clone, PartialEq, Eq)]
10 #[doc = "The `BluetoothDevice` class."]
11 #[doc = ""]
12 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/BluetoothDevice)"]
13 #[doc = ""]
14 #[doc = "*This API requires the following crate features to be activated: `BluetoothDevice`*"]
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 BluetoothDevice;
19 #[cfg(web_sys_unstable_apis)]
20 # [wasm_bindgen (structural , method , getter , js_class = "BluetoothDevice" , js_name = id)]
21 #[doc = "Getter for the `id` field of this object."]
22 #[doc = ""]
23 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/BluetoothDevice/id)"]
24 #[doc = ""]
25 #[doc = "*This API requires the following crate features to be activated: `BluetoothDevice`*"]
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 id(this: &BluetoothDevice) -> ::alloc::string::String;
30 #[cfg(web_sys_unstable_apis)]
31 # [wasm_bindgen (structural , method , getter , js_class = "BluetoothDevice" , js_name = name)]
32 #[doc = "Getter for the `name` field of this object."]
33 #[doc = ""]
34 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/BluetoothDevice/name)"]
35 #[doc = ""]
36 #[doc = "*This API requires the following crate features to be activated: `BluetoothDevice`*"]
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 name(this: &BluetoothDevice) -> Option<::alloc::string::String>;
41 #[cfg(web_sys_unstable_apis)]
42 #[cfg(feature = "BluetoothRemoteGattServer")]
43 # [wasm_bindgen (structural , method , getter , js_class = "BluetoothDevice" , js_name = gatt)]
44 #[doc = "Getter for the `gatt` field of this object."]
45 #[doc = ""]
46 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/BluetoothDevice/gatt)"]
47 #[doc = ""]
48 #[doc = "*This API requires the following crate features to be activated: `BluetoothDevice`, `BluetoothRemoteGattServer`*"]
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 gatt(this: &BluetoothDevice) -> Option<BluetoothRemoteGattServer>;
53 #[cfg(web_sys_unstable_apis)]
54 # [wasm_bindgen (structural , method , getter , js_class = "BluetoothDevice" , js_name = watchingAdvertisements)]
55 #[doc = "Getter for the `watchingAdvertisements` field of this object."]
56 #[doc = ""]
57 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/BluetoothDevice/watchingAdvertisements)"]
58 #[doc = ""]
59 #[doc = "*This API requires the following crate features to be activated: `BluetoothDevice`*"]
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 watching_advertisements(this: &BluetoothDevice) -> bool;
64 #[cfg(web_sys_unstable_apis)]
65 # [wasm_bindgen (structural , method , getter , js_class = "BluetoothDevice" , js_name = onadvertisementreceived)]
66 #[doc = "Getter for the `onadvertisementreceived` field of this object."]
67 #[doc = ""]
68 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/BluetoothDevice/onadvertisementreceived)"]
69 #[doc = ""]
70 #[doc = "*This API requires the following crate features to be activated: `BluetoothDevice`*"]
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 onadvertisementreceived(this: &BluetoothDevice) -> Option<::js_sys::Function>;
75 #[cfg(web_sys_unstable_apis)]
76 # [wasm_bindgen (structural , method , setter , js_class = "BluetoothDevice" , js_name = onadvertisementreceived)]
77 #[doc = "Setter for the `onadvertisementreceived` field of this object."]
78 #[doc = ""]
79 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/BluetoothDevice/onadvertisementreceived)"]
80 #[doc = ""]
81 #[doc = "*This API requires the following crate features to be activated: `BluetoothDevice`*"]
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 set_onadvertisementreceived(this: &BluetoothDevice, value: Option<&::js_sys::Function>);
86 #[cfg(web_sys_unstable_apis)]
87 # [wasm_bindgen (structural , method , getter , js_class = "BluetoothDevice" , js_name = ongattserverdisconnected)]
88 #[doc = "Getter for the `ongattserverdisconnected` field of this object."]
89 #[doc = ""]
90 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/BluetoothDevice/ongattserverdisconnected)"]
91 #[doc = ""]
92 #[doc = "*This API requires the following crate features to be activated: `BluetoothDevice`*"]
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 ongattserverdisconnected(this: &BluetoothDevice) -> Option<::js_sys::Function>;
97 #[cfg(web_sys_unstable_apis)]
98 # [wasm_bindgen (structural , method , setter , js_class = "BluetoothDevice" , js_name = ongattserverdisconnected)]
99 #[doc = "Setter for the `ongattserverdisconnected` field of this object."]
100 #[doc = ""]
101 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/BluetoothDevice/ongattserverdisconnected)"]
102 #[doc = ""]
103 #[doc = "*This API requires the following crate features to be activated: `BluetoothDevice`*"]
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 set_ongattserverdisconnected(this: &BluetoothDevice, value: Option<&::js_sys::Function>);
108 #[cfg(web_sys_unstable_apis)]
109 # [wasm_bindgen (structural , method , getter , js_class = "BluetoothDevice" , js_name = oncharacteristicvaluechanged)]
110 #[doc = "Getter for the `oncharacteristicvaluechanged` field of this object."]
111 #[doc = ""]
112 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/BluetoothDevice/oncharacteristicvaluechanged)"]
113 #[doc = ""]
114 #[doc = "*This API requires the following crate features to be activated: `BluetoothDevice`*"]
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 oncharacteristicvaluechanged(this: &BluetoothDevice) -> Option<::js_sys::Function>;
119 #[cfg(web_sys_unstable_apis)]
120 # [wasm_bindgen (structural , method , setter , js_class = "BluetoothDevice" , js_name = oncharacteristicvaluechanged)]
121 #[doc = "Setter for the `oncharacteristicvaluechanged` field of this object."]
122 #[doc = ""]
123 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/BluetoothDevice/oncharacteristicvaluechanged)"]
124 #[doc = ""]
125 #[doc = "*This API requires the following crate features to be activated: `BluetoothDevice`*"]
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 set_oncharacteristicvaluechanged(
130 this: &BluetoothDevice,
131 value: Option<&::js_sys::Function>,
132 );
133 #[cfg(web_sys_unstable_apis)]
134 # [wasm_bindgen (structural , method , getter , js_class = "BluetoothDevice" , js_name = onserviceadded)]
135 #[doc = "Getter for the `onserviceadded` field of this object."]
136 #[doc = ""]
137 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/BluetoothDevice/onserviceadded)"]
138 #[doc = ""]
139 #[doc = "*This API requires the following crate features to be activated: `BluetoothDevice`*"]
140 #[doc = ""]
141 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
142 #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
143 pub fn onserviceadded(this: &BluetoothDevice) -> Option<::js_sys::Function>;
144 #[cfg(web_sys_unstable_apis)]
145 # [wasm_bindgen (structural , method , setter , js_class = "BluetoothDevice" , js_name = onserviceadded)]
146 #[doc = "Setter for the `onserviceadded` field of this object."]
147 #[doc = ""]
148 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/BluetoothDevice/onserviceadded)"]
149 #[doc = ""]
150 #[doc = "*This API requires the following crate features to be activated: `BluetoothDevice`*"]
151 #[doc = ""]
152 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
153 #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
154 pub fn set_onserviceadded(this: &BluetoothDevice, value: Option<&::js_sys::Function>);
155 #[cfg(web_sys_unstable_apis)]
156 # [wasm_bindgen (structural , method , getter , js_class = "BluetoothDevice" , js_name = onservicechanged)]
157 #[doc = "Getter for the `onservicechanged` field of this object."]
158 #[doc = ""]
159 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/BluetoothDevice/onservicechanged)"]
160 #[doc = ""]
161 #[doc = "*This API requires the following crate features to be activated: `BluetoothDevice`*"]
162 #[doc = ""]
163 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
164 #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
165 pub fn onservicechanged(this: &BluetoothDevice) -> Option<::js_sys::Function>;
166 #[cfg(web_sys_unstable_apis)]
167 # [wasm_bindgen (structural , method , setter , js_class = "BluetoothDevice" , js_name = onservicechanged)]
168 #[doc = "Setter for the `onservicechanged` field of this object."]
169 #[doc = ""]
170 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/BluetoothDevice/onservicechanged)"]
171 #[doc = ""]
172 #[doc = "*This API requires the following crate features to be activated: `BluetoothDevice`*"]
173 #[doc = ""]
174 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
175 #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
176 pub fn set_onservicechanged(this: &BluetoothDevice, value: Option<&::js_sys::Function>);
177 #[cfg(web_sys_unstable_apis)]
178 # [wasm_bindgen (structural , method , getter , js_class = "BluetoothDevice" , js_name = onserviceremoved)]
179 #[doc = "Getter for the `onserviceremoved` field of this object."]
180 #[doc = ""]
181 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/BluetoothDevice/onserviceremoved)"]
182 #[doc = ""]
183 #[doc = "*This API requires the following crate features to be activated: `BluetoothDevice`*"]
184 #[doc = ""]
185 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
186 #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
187 pub fn onserviceremoved(this: &BluetoothDevice) -> Option<::js_sys::Function>;
188 #[cfg(web_sys_unstable_apis)]
189 # [wasm_bindgen (structural , method , setter , js_class = "BluetoothDevice" , js_name = onserviceremoved)]
190 #[doc = "Setter for the `onserviceremoved` field of this object."]
191 #[doc = ""]
192 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/BluetoothDevice/onserviceremoved)"]
193 #[doc = ""]
194 #[doc = "*This API requires the following crate features to be activated: `BluetoothDevice`*"]
195 #[doc = ""]
196 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
197 #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
198 pub fn set_onserviceremoved(this: &BluetoothDevice, value: Option<&::js_sys::Function>);
199 #[cfg(web_sys_unstable_apis)]
200 # [wasm_bindgen (method , structural , js_class = "BluetoothDevice" , js_name = watchAdvertisements)]
201 #[doc = "The `watchAdvertisements()` method."]
202 #[doc = ""]
203 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/BluetoothDevice/watchAdvertisements)"]
204 #[doc = ""]
205 #[doc = "*This API requires the following crate features to be activated: `BluetoothDevice`*"]
206 #[doc = ""]
207 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
208 #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
209 pub fn watch_advertisements(this: &BluetoothDevice) -> ::js_sys::Promise;
210 #[cfg(web_sys_unstable_apis)]
211 #[cfg(feature = "WatchAdvertisementsOptions")]
212 # [wasm_bindgen (method , structural , js_class = "BluetoothDevice" , js_name = watchAdvertisements)]
213 #[doc = "The `watchAdvertisements()` method."]
214 #[doc = ""]
215 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/BluetoothDevice/watchAdvertisements)"]
216 #[doc = ""]
217 #[doc = "*This API requires the following crate features to be activated: `BluetoothDevice`, `WatchAdvertisementsOptions`*"]
218 #[doc = ""]
219 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
220 #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
221 pub fn watch_advertisements_with_options(
222 this: &BluetoothDevice,
223 options: &WatchAdvertisementsOptions,
224 ) -> ::js_sys::Promise;
225}