Skip to main content

web_sys/features/
gen_BluetoothRemoteGattServer.rs

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 = "::js_sys::Object",
10        js_name = "BluetoothRemoteGATTServer",
11        typescript_type = "BluetoothRemoteGATTServer"
12    )]
13    #[derive(Debug, Clone, PartialEq, Eq)]
14    #[doc = "The `BluetoothRemoteGattServer` class."]
15    #[doc = ""]
16    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/BluetoothRemoteGATTServer)"]
17    #[doc = ""]
18    #[doc = "*This API requires the following crate features to be activated: `BluetoothRemoteGattServer`*"]
19    #[doc = ""]
20    #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
21    #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
22    pub type BluetoothRemoteGattServer;
23    #[cfg(web_sys_unstable_apis)]
24    #[cfg(feature = "BluetoothDevice")]
25    #[wasm_bindgen(
26        method,
27        getter,
28        js_class = "BluetoothRemoteGATTServer",
29        js_name = "device"
30    )]
31    #[doc = "Getter for the `device` field of this object."]
32    #[doc = ""]
33    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/BluetoothRemoteGATTServer/device)"]
34    #[doc = ""]
35    #[doc = "*This API requires the following crate features to be activated: `BluetoothDevice`, `BluetoothRemoteGattServer`*"]
36    #[doc = ""]
37    #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
38    #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
39    pub fn device(this: &BluetoothRemoteGattServer) -> BluetoothDevice;
40    #[cfg(web_sys_unstable_apis)]
41    #[wasm_bindgen(
42        method,
43        getter,
44        js_class = "BluetoothRemoteGATTServer",
45        js_name = "connected"
46    )]
47    #[doc = "Getter for the `connected` field of this object."]
48    #[doc = ""]
49    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/BluetoothRemoteGATTServer/connected)"]
50    #[doc = ""]
51    #[doc = "*This API requires the following crate features to be activated: `BluetoothRemoteGattServer`*"]
52    #[doc = ""]
53    #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
54    #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
55    pub fn connected(this: &BluetoothRemoteGattServer) -> bool;
56    #[cfg(web_sys_unstable_apis)]
57    #[wasm_bindgen(method, js_class = "BluetoothRemoteGATTServer")]
58    #[doc = "The `connect()` method."]
59    #[doc = ""]
60    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/BluetoothRemoteGATTServer/connect)"]
61    #[doc = ""]
62    #[doc = "*This API requires the following crate features to be activated: `BluetoothRemoteGattServer`*"]
63    #[doc = ""]
64    #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
65    #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
66    pub fn connect(
67        this: &BluetoothRemoteGattServer,
68    ) -> ::js_sys::Promise<BluetoothRemoteGattServer>;
69    #[cfg(web_sys_unstable_apis)]
70    #[wasm_bindgen(method, js_class = "BluetoothRemoteGATTServer")]
71    #[doc = "The `disconnect()` method."]
72    #[doc = ""]
73    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/BluetoothRemoteGATTServer/disconnect)"]
74    #[doc = ""]
75    #[doc = "*This API requires the following crate features to be activated: `BluetoothRemoteGattServer`*"]
76    #[doc = ""]
77    #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
78    #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
79    pub fn disconnect(this: &BluetoothRemoteGattServer);
80    #[cfg(web_sys_unstable_apis)]
81    #[cfg(feature = "BluetoothRemoteGattService")]
82    #[wasm_bindgen(
83        method,
84        js_class = "BluetoothRemoteGATTServer",
85        js_name = "getPrimaryService"
86    )]
87    #[doc = "The `getPrimaryService()` method."]
88    #[doc = ""]
89    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/BluetoothRemoteGATTServer/getPrimaryService)"]
90    #[doc = ""]
91    #[doc = "*This API requires the following crate features to be activated: `BluetoothRemoteGattServer`, `BluetoothRemoteGattService`*"]
92    #[doc = ""]
93    #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
94    #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
95    pub fn get_primary_service_with_str(
96        this: &BluetoothRemoteGattServer,
97        service: &str,
98    ) -> ::js_sys::Promise<BluetoothRemoteGattService>;
99    #[cfg(web_sys_unstable_apis)]
100    #[cfg(feature = "BluetoothRemoteGattService")]
101    #[wasm_bindgen(
102        method,
103        js_class = "BluetoothRemoteGATTServer",
104        js_name = "getPrimaryService"
105    )]
106    #[doc = "The `getPrimaryService()` method."]
107    #[doc = ""]
108    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/BluetoothRemoteGATTServer/getPrimaryService)"]
109    #[doc = ""]
110    #[doc = "*This API requires the following crate features to be activated: `BluetoothRemoteGattServer`, `BluetoothRemoteGattService`*"]
111    #[doc = ""]
112    #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
113    #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
114    pub fn get_primary_service_with_u32(
115        this: &BluetoothRemoteGattServer,
116        service: u32,
117    ) -> ::js_sys::Promise<BluetoothRemoteGattService>;
118    #[cfg(web_sys_unstable_apis)]
119    #[cfg(feature = "BluetoothRemoteGattService")]
120    #[wasm_bindgen(
121        method,
122        js_class = "BluetoothRemoteGATTServer",
123        js_name = "getPrimaryServices"
124    )]
125    #[doc = "The `getPrimaryServices()` method."]
126    #[doc = ""]
127    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/BluetoothRemoteGATTServer/getPrimaryServices)"]
128    #[doc = ""]
129    #[doc = "*This API requires the following crate features to be activated: `BluetoothRemoteGattServer`, `BluetoothRemoteGattService`*"]
130    #[doc = ""]
131    #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
132    #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
133    pub fn get_primary_services(
134        this: &BluetoothRemoteGattServer,
135    ) -> ::js_sys::Promise<::js_sys::Array<BluetoothRemoteGattService>>;
136    #[cfg(web_sys_unstable_apis)]
137    #[cfg(feature = "BluetoothRemoteGattService")]
138    #[wasm_bindgen(
139        method,
140        js_class = "BluetoothRemoteGATTServer",
141        js_name = "getPrimaryServices"
142    )]
143    #[doc = "The `getPrimaryServices()` method."]
144    #[doc = ""]
145    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/BluetoothRemoteGATTServer/getPrimaryServices)"]
146    #[doc = ""]
147    #[doc = "*This API requires the following crate features to be activated: `BluetoothRemoteGattServer`, `BluetoothRemoteGattService`*"]
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://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
151    pub fn get_primary_services_with_str(
152        this: &BluetoothRemoteGattServer,
153        service: &str,
154    ) -> ::js_sys::Promise<::js_sys::Array<BluetoothRemoteGattService>>;
155    #[cfg(web_sys_unstable_apis)]
156    #[cfg(feature = "BluetoothRemoteGattService")]
157    #[wasm_bindgen(
158        method,
159        js_class = "BluetoothRemoteGATTServer",
160        js_name = "getPrimaryServices"
161    )]
162    #[doc = "The `getPrimaryServices()` method."]
163    #[doc = ""]
164    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/BluetoothRemoteGATTServer/getPrimaryServices)"]
165    #[doc = ""]
166    #[doc = "*This API requires the following crate features to be activated: `BluetoothRemoteGattServer`, `BluetoothRemoteGattService`*"]
167    #[doc = ""]
168    #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
169    #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
170    pub fn get_primary_services_with_u32(
171        this: &BluetoothRemoteGattServer,
172        service: u32,
173    ) -> ::js_sys::Promise<::js_sys::Array<BluetoothRemoteGattService>>;
174}