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(
9 extends = "EventTarget",
10 extends = "::js_sys::Object",
11 js_name = "BluetoothRemoteGATTService",
12 typescript_type = "BluetoothRemoteGATTService"
13 )]
14 #[derive(Debug, Clone, PartialEq, Eq)]
15 #[doc = "The `BluetoothRemoteGattService` class."]
16 #[doc = ""]
17 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/BluetoothRemoteGATTService)"]
18 #[doc = ""]
19 #[doc = "*This API requires the following crate features to be activated: `BluetoothRemoteGattService`*"]
20 #[doc = ""]
21 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
22 #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
23 pub type BluetoothRemoteGattService;
24 #[cfg(web_sys_unstable_apis)]
25 #[cfg(feature = "BluetoothDevice")]
26 #[wasm_bindgen(
27 method,
28 getter,
29 js_class = "BluetoothRemoteGATTService",
30 js_name = "device"
31 )]
32 #[doc = "Getter for the `device` field of this object."]
33 #[doc = ""]
34 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/BluetoothRemoteGATTService/device)"]
35 #[doc = ""]
36 #[doc = "*This API requires the following crate features to be activated: `BluetoothDevice`, `BluetoothRemoteGattService`*"]
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://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
40 pub fn device(this: &BluetoothRemoteGattService) -> BluetoothDevice;
41 #[cfg(web_sys_unstable_apis)]
42 #[wasm_bindgen(
43 method,
44 getter,
45 js_class = "BluetoothRemoteGATTService",
46 js_name = "uuid"
47 )]
48 #[doc = "Getter for the `uuid` field of this object."]
49 #[doc = ""]
50 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/BluetoothRemoteGATTService/uuid)"]
51 #[doc = ""]
52 #[doc = "*This API requires the following crate features to be activated: `BluetoothRemoteGattService`*"]
53 #[doc = ""]
54 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
55 #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
56 pub fn uuid(this: &BluetoothRemoteGattService) -> ::alloc::string::String;
57 #[cfg(web_sys_unstable_apis)]
58 #[wasm_bindgen(
59 method,
60 getter,
61 js_class = "BluetoothRemoteGATTService",
62 js_name = "isPrimary"
63 )]
64 #[doc = "Getter for the `isPrimary` field of this object."]
65 #[doc = ""]
66 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/BluetoothRemoteGATTService/isPrimary)"]
67 #[doc = ""]
68 #[doc = "*This API requires the following crate features to be activated: `BluetoothRemoteGattService`*"]
69 #[doc = ""]
70 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
71 #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
72 pub fn is_primary(this: &BluetoothRemoteGattService) -> bool;
73 #[cfg(web_sys_unstable_apis)]
74 #[wasm_bindgen(
75 method,
76 getter,
77 js_class = "BluetoothRemoteGATTService",
78 js_name = "oncharacteristicvaluechanged"
79 )]
80 #[doc = "Getter for the `oncharacteristicvaluechanged` field of this object."]
81 #[doc = ""]
82 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/BluetoothRemoteGATTService/oncharacteristicvaluechanged)"]
83 #[doc = ""]
84 #[doc = "*This API requires the following crate features to be activated: `BluetoothRemoteGattService`*"]
85 #[doc = ""]
86 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
87 #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
88 pub fn oncharacteristicvaluechanged(
89 this: &BluetoothRemoteGattService,
90 ) -> Option<::js_sys::Function>;
91 #[cfg(web_sys_unstable_apis)]
92 #[wasm_bindgen(
93 method,
94 setter,
95 js_class = "BluetoothRemoteGATTService",
96 js_name = "oncharacteristicvaluechanged"
97 )]
98 #[doc = "Setter for the `oncharacteristicvaluechanged` field of this object."]
99 #[doc = ""]
100 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/BluetoothRemoteGATTService/oncharacteristicvaluechanged)"]
101 #[doc = ""]
102 #[doc = "*This API requires the following crate features to be activated: `BluetoothRemoteGattService`*"]
103 #[doc = ""]
104 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
105 #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
106 pub fn set_oncharacteristicvaluechanged(
107 this: &BluetoothRemoteGattService,
108 value: Option<&::js_sys::Function>,
109 );
110 #[cfg(web_sys_unstable_apis)]
111 #[wasm_bindgen(
112 method,
113 getter,
114 js_class = "BluetoothRemoteGATTService",
115 js_name = "onserviceadded"
116 )]
117 #[doc = "Getter for the `onserviceadded` field of this object."]
118 #[doc = ""]
119 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/BluetoothRemoteGATTService/onserviceadded)"]
120 #[doc = ""]
121 #[doc = "*This API requires the following crate features to be activated: `BluetoothRemoteGattService`*"]
122 #[doc = ""]
123 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
124 #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
125 pub fn onserviceadded(this: &BluetoothRemoteGattService) -> Option<::js_sys::Function>;
126 #[cfg(web_sys_unstable_apis)]
127 #[wasm_bindgen(
128 method,
129 setter,
130 js_class = "BluetoothRemoteGATTService",
131 js_name = "onserviceadded"
132 )]
133 #[doc = "Setter for the `onserviceadded` field of this object."]
134 #[doc = ""]
135 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/BluetoothRemoteGATTService/onserviceadded)"]
136 #[doc = ""]
137 #[doc = "*This API requires the following crate features to be activated: `BluetoothRemoteGattService`*"]
138 #[doc = ""]
139 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
140 #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
141 pub fn set_onserviceadded(
142 this: &BluetoothRemoteGattService,
143 value: Option<&::js_sys::Function>,
144 );
145 #[cfg(web_sys_unstable_apis)]
146 #[wasm_bindgen(
147 method,
148 getter,
149 js_class = "BluetoothRemoteGATTService",
150 js_name = "onservicechanged"
151 )]
152 #[doc = "Getter for the `onservicechanged` field of this object."]
153 #[doc = ""]
154 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/BluetoothRemoteGATTService/onservicechanged)"]
155 #[doc = ""]
156 #[doc = "*This API requires the following crate features to be activated: `BluetoothRemoteGattService`*"]
157 #[doc = ""]
158 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
159 #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
160 pub fn onservicechanged(this: &BluetoothRemoteGattService) -> Option<::js_sys::Function>;
161 #[cfg(web_sys_unstable_apis)]
162 #[wasm_bindgen(
163 method,
164 setter,
165 js_class = "BluetoothRemoteGATTService",
166 js_name = "onservicechanged"
167 )]
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/BluetoothRemoteGATTService/onservicechanged)"]
171 #[doc = ""]
172 #[doc = "*This API requires the following crate features to be activated: `BluetoothRemoteGattService`*"]
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://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
176 pub fn set_onservicechanged(
177 this: &BluetoothRemoteGattService,
178 value: Option<&::js_sys::Function>,
179 );
180 #[cfg(web_sys_unstable_apis)]
181 #[wasm_bindgen(
182 method,
183 getter,
184 js_class = "BluetoothRemoteGATTService",
185 js_name = "onserviceremoved"
186 )]
187 #[doc = "Getter for the `onserviceremoved` field of this object."]
188 #[doc = ""]
189 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/BluetoothRemoteGATTService/onserviceremoved)"]
190 #[doc = ""]
191 #[doc = "*This API requires the following crate features to be activated: `BluetoothRemoteGattService`*"]
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://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
195 pub fn onserviceremoved(this: &BluetoothRemoteGattService) -> Option<::js_sys::Function>;
196 #[cfg(web_sys_unstable_apis)]
197 #[wasm_bindgen(
198 method,
199 setter,
200 js_class = "BluetoothRemoteGATTService",
201 js_name = "onserviceremoved"
202 )]
203 #[doc = "Setter for the `onserviceremoved` field of this object."]
204 #[doc = ""]
205 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/BluetoothRemoteGATTService/onserviceremoved)"]
206 #[doc = ""]
207 #[doc = "*This API requires the following crate features to be activated: `BluetoothRemoteGattService`*"]
208 #[doc = ""]
209 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
210 #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
211 pub fn set_onserviceremoved(
212 this: &BluetoothRemoteGattService,
213 value: Option<&::js_sys::Function>,
214 );
215 #[cfg(web_sys_unstable_apis)]
216 #[cfg(feature = "BluetoothRemoteGattCharacteristic")]
217 #[wasm_bindgen(
218 method,
219 js_class = "BluetoothRemoteGATTService",
220 js_name = "getCharacteristic"
221 )]
222 #[doc = "The `getCharacteristic()` method."]
223 #[doc = ""]
224 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/BluetoothRemoteGATTService/getCharacteristic)"]
225 #[doc = ""]
226 #[doc = "*This API requires the following crate features to be activated: `BluetoothRemoteGattCharacteristic`, `BluetoothRemoteGattService`*"]
227 #[doc = ""]
228 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
229 #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
230 pub fn get_characteristic_with_str(
231 this: &BluetoothRemoteGattService,
232 characteristic: &str,
233 ) -> ::js_sys::Promise<BluetoothRemoteGattCharacteristic>;
234 #[cfg(web_sys_unstable_apis)]
235 #[cfg(feature = "BluetoothRemoteGattCharacteristic")]
236 #[wasm_bindgen(
237 method,
238 js_class = "BluetoothRemoteGATTService",
239 js_name = "getCharacteristic"
240 )]
241 #[doc = "The `getCharacteristic()` method."]
242 #[doc = ""]
243 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/BluetoothRemoteGATTService/getCharacteristic)"]
244 #[doc = ""]
245 #[doc = "*This API requires the following crate features to be activated: `BluetoothRemoteGattCharacteristic`, `BluetoothRemoteGattService`*"]
246 #[doc = ""]
247 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
248 #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
249 pub fn get_characteristic_with_u32(
250 this: &BluetoothRemoteGattService,
251 characteristic: u32,
252 ) -> ::js_sys::Promise<BluetoothRemoteGattCharacteristic>;
253 #[cfg(web_sys_unstable_apis)]
254 #[cfg(feature = "BluetoothRemoteGattCharacteristic")]
255 #[wasm_bindgen(
256 method,
257 js_class = "BluetoothRemoteGATTService",
258 js_name = "getCharacteristics"
259 )]
260 #[doc = "The `getCharacteristics()` method."]
261 #[doc = ""]
262 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/BluetoothRemoteGATTService/getCharacteristics)"]
263 #[doc = ""]
264 #[doc = "*This API requires the following crate features to be activated: `BluetoothRemoteGattCharacteristic`, `BluetoothRemoteGattService`*"]
265 #[doc = ""]
266 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
267 #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
268 pub fn get_characteristics(
269 this: &BluetoothRemoteGattService,
270 ) -> ::js_sys::Promise<::js_sys::Array<BluetoothRemoteGattCharacteristic>>;
271 #[cfg(web_sys_unstable_apis)]
272 #[cfg(feature = "BluetoothRemoteGattCharacteristic")]
273 #[wasm_bindgen(
274 method,
275 js_class = "BluetoothRemoteGATTService",
276 js_name = "getCharacteristics"
277 )]
278 #[doc = "The `getCharacteristics()` method."]
279 #[doc = ""]
280 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/BluetoothRemoteGATTService/getCharacteristics)"]
281 #[doc = ""]
282 #[doc = "*This API requires the following crate features to be activated: `BluetoothRemoteGattCharacteristic`, `BluetoothRemoteGattService`*"]
283 #[doc = ""]
284 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
285 #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
286 pub fn get_characteristics_with_str(
287 this: &BluetoothRemoteGattService,
288 characteristic: &str,
289 ) -> ::js_sys::Promise<::js_sys::Array<BluetoothRemoteGattCharacteristic>>;
290 #[cfg(web_sys_unstable_apis)]
291 #[cfg(feature = "BluetoothRemoteGattCharacteristic")]
292 #[wasm_bindgen(
293 method,
294 js_class = "BluetoothRemoteGATTService",
295 js_name = "getCharacteristics"
296 )]
297 #[doc = "The `getCharacteristics()` method."]
298 #[doc = ""]
299 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/BluetoothRemoteGATTService/getCharacteristics)"]
300 #[doc = ""]
301 #[doc = "*This API requires the following crate features to be activated: `BluetoothRemoteGattCharacteristic`, `BluetoothRemoteGattService`*"]
302 #[doc = ""]
303 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
304 #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
305 pub fn get_characteristics_with_u32(
306 this: &BluetoothRemoteGattService,
307 characteristic: u32,
308 ) -> ::js_sys::Promise<::js_sys::Array<BluetoothRemoteGattCharacteristic>>;
309 #[cfg(web_sys_unstable_apis)]
310 #[wasm_bindgen(
311 method,
312 js_class = "BluetoothRemoteGATTService",
313 js_name = "getIncludedService"
314 )]
315 #[doc = "The `getIncludedService()` method."]
316 #[doc = ""]
317 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/BluetoothRemoteGATTService/getIncludedService)"]
318 #[doc = ""]
319 #[doc = "*This API requires the following crate features to be activated: `BluetoothRemoteGattService`*"]
320 #[doc = ""]
321 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
322 #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
323 pub fn get_included_service_with_str(
324 this: &BluetoothRemoteGattService,
325 service: &str,
326 ) -> ::js_sys::Promise<BluetoothRemoteGattService>;
327 #[cfg(web_sys_unstable_apis)]
328 #[wasm_bindgen(
329 method,
330 js_class = "BluetoothRemoteGATTService",
331 js_name = "getIncludedService"
332 )]
333 #[doc = "The `getIncludedService()` method."]
334 #[doc = ""]
335 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/BluetoothRemoteGATTService/getIncludedService)"]
336 #[doc = ""]
337 #[doc = "*This API requires the following crate features to be activated: `BluetoothRemoteGattService`*"]
338 #[doc = ""]
339 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
340 #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
341 pub fn get_included_service_with_u32(
342 this: &BluetoothRemoteGattService,
343 service: u32,
344 ) -> ::js_sys::Promise<BluetoothRemoteGattService>;
345 #[cfg(web_sys_unstable_apis)]
346 #[wasm_bindgen(
347 method,
348 js_class = "BluetoothRemoteGATTService",
349 js_name = "getIncludedServices"
350 )]
351 #[doc = "The `getIncludedServices()` method."]
352 #[doc = ""]
353 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/BluetoothRemoteGATTService/getIncludedServices)"]
354 #[doc = ""]
355 #[doc = "*This API requires the following crate features to be activated: `BluetoothRemoteGattService`*"]
356 #[doc = ""]
357 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
358 #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
359 pub fn get_included_services(
360 this: &BluetoothRemoteGattService,
361 ) -> ::js_sys::Promise<::js_sys::Array<BluetoothRemoteGattService>>;
362 #[cfg(web_sys_unstable_apis)]
363 #[wasm_bindgen(
364 method,
365 js_class = "BluetoothRemoteGATTService",
366 js_name = "getIncludedServices"
367 )]
368 #[doc = "The `getIncludedServices()` method."]
369 #[doc = ""]
370 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/BluetoothRemoteGATTService/getIncludedServices)"]
371 #[doc = ""]
372 #[doc = "*This API requires the following crate features to be activated: `BluetoothRemoteGattService`*"]
373 #[doc = ""]
374 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
375 #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
376 pub fn get_included_services_with_str(
377 this: &BluetoothRemoteGattService,
378 service: &str,
379 ) -> ::js_sys::Promise<::js_sys::Array<BluetoothRemoteGattService>>;
380 #[cfg(web_sys_unstable_apis)]
381 #[wasm_bindgen(
382 method,
383 js_class = "BluetoothRemoteGATTService",
384 js_name = "getIncludedServices"
385 )]
386 #[doc = "The `getIncludedServices()` method."]
387 #[doc = ""]
388 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/BluetoothRemoteGATTService/getIncludedServices)"]
389 #[doc = ""]
390 #[doc = "*This API requires the following crate features to be activated: `BluetoothRemoteGattService`*"]
391 #[doc = ""]
392 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
393 #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
394 pub fn get_included_services_with_u32(
395 this: &BluetoothRemoteGattService,
396 service: u32,
397 ) -> ::js_sys::Promise<::js_sys::Array<BluetoothRemoteGattService>>;
398}