1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
// WARNING: This file was autogenerated by jni-bindgen. Any changes to this file may be lost!!!
#[cfg(any(feature = "all", feature = "android-bluetooth-BluetoothAdapter"))]
__jni_bindgen! {
/// public final class [BluetoothAdapter](https://developer.android.com/reference/android/bluetooth/BluetoothAdapter.html)
///
/// Required feature: "android-bluetooth-BluetoothAdapter"
public final class BluetoothAdapter ("android/bluetooth/BluetoothAdapter") extends crate::java::lang::Object {
/// [getDefaultAdapter](https://developer.android.com/reference/android/bluetooth/BluetoothAdapter.html#getDefaultAdapter())
///
/// Required features: "android-bluetooth-BluetoothAdapter"
#[cfg(any(feature = "all", all(feature = "android-bluetooth-BluetoothAdapter")))]
pub fn getDefaultAdapter<'env>(__jni_env: &'env __jni_bindgen::Env) -> __jni_bindgen::std::result::Result<__jni_bindgen::std::option::Option<__jni_bindgen::Local<'env, crate::android::bluetooth::BluetoothAdapter>>, __jni_bindgen::Local<'env, crate::java::lang::Throwable>> {
// class.path == "android/bluetooth/BluetoothAdapter", java.flags == PUBLIC | STATIC | SYNCRONIZED, .name == "getDefaultAdapter", .descriptor == "()Landroid/bluetooth/BluetoothAdapter;"
unsafe {
let __jni_args = [];
let (__jni_class, __jni_method) = __jni_env.require_class_static_method("android/bluetooth/BluetoothAdapter\0", "getDefaultAdapter\0", "()Landroid/bluetooth/BluetoothAdapter;\0");
__jni_env.call_static_object_method_a(__jni_class, __jni_method, __jni_args.as_ptr())
}
}
/// [getRemoteDevice](https://developer.android.com/reference/android/bluetooth/BluetoothAdapter.html#getRemoteDevice(java.lang.String))
///
/// Required features: "android-bluetooth-BluetoothDevice", "java-lang-String"
#[cfg(any(feature = "all", all(feature = "android-bluetooth-BluetoothDevice", feature = "java-lang-String")))]
pub fn getRemoteDevice<'env>(&'env self, arg0: impl __jni_bindgen::std::convert::Into<__jni_bindgen::std::option::Option<&'env crate::java::lang::String>>) -> __jni_bindgen::std::result::Result<__jni_bindgen::std::option::Option<__jni_bindgen::Local<'env, crate::android::bluetooth::BluetoothDevice>>, __jni_bindgen::Local<'env, crate::java::lang::Throwable>> {
// class.path == "android/bluetooth/BluetoothAdapter", java.flags == PUBLIC, .name == "getRemoteDevice", .descriptor == "(Ljava/lang/String;)Landroid/bluetooth/BluetoothDevice;"
unsafe {
let __jni_args = [__jni_bindgen::AsJValue::as_jvalue(&arg0.into())];
let __jni_env = __jni_bindgen::Env::from_ptr(self.0.env);
let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/BluetoothAdapter\0", "getRemoteDevice\0", "(Ljava/lang/String;)Landroid/bluetooth/BluetoothDevice;\0");
__jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr())
}
}
/// [isEnabled](https://developer.android.com/reference/android/bluetooth/BluetoothAdapter.html#isEnabled())
pub fn isEnabled<'env>(&'env self) -> __jni_bindgen::std::result::Result<bool, __jni_bindgen::Local<'env, crate::java::lang::Throwable>> {
// class.path == "android/bluetooth/BluetoothAdapter", java.flags == PUBLIC, .name == "isEnabled", .descriptor == "()Z"
unsafe {
let __jni_args = [];
let __jni_env = __jni_bindgen::Env::from_ptr(self.0.env);
let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/BluetoothAdapter\0", "isEnabled\0", "()Z\0");
__jni_env.call_boolean_method_a(self.0.object, __jni_method, __jni_args.as_ptr())
}
}
/// [getState](https://developer.android.com/reference/android/bluetooth/BluetoothAdapter.html#getState())
pub fn getState<'env>(&'env self) -> __jni_bindgen::std::result::Result<i32, __jni_bindgen::Local<'env, crate::java::lang::Throwable>> {
// class.path == "android/bluetooth/BluetoothAdapter", java.flags == PUBLIC, .name == "getState", .descriptor == "()I"
unsafe {
let __jni_args = [];
let __jni_env = __jni_bindgen::Env::from_ptr(self.0.env);
let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/BluetoothAdapter\0", "getState\0", "()I\0");
__jni_env.call_int_method_a(self.0.object, __jni_method, __jni_args.as_ptr())
}
}
/// [enable](https://developer.android.com/reference/android/bluetooth/BluetoothAdapter.html#enable())
pub fn enable<'env>(&'env self) -> __jni_bindgen::std::result::Result<bool, __jni_bindgen::Local<'env, crate::java::lang::Throwable>> {
// class.path == "android/bluetooth/BluetoothAdapter", java.flags == PUBLIC, .name == "enable", .descriptor == "()Z"
unsafe {
let __jni_args = [];
let __jni_env = __jni_bindgen::Env::from_ptr(self.0.env);
let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/BluetoothAdapter\0", "enable\0", "()Z\0");
__jni_env.call_boolean_method_a(self.0.object, __jni_method, __jni_args.as_ptr())
}
}
/// [disable](https://developer.android.com/reference/android/bluetooth/BluetoothAdapter.html#disable())
pub fn disable<'env>(&'env self) -> __jni_bindgen::std::result::Result<bool, __jni_bindgen::Local<'env, crate::java::lang::Throwable>> {
// class.path == "android/bluetooth/BluetoothAdapter", java.flags == PUBLIC, .name == "disable", .descriptor == "()Z"
unsafe {
let __jni_args = [];
let __jni_env = __jni_bindgen::Env::from_ptr(self.0.env);
let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/BluetoothAdapter\0", "disable\0", "()Z\0");
__jni_env.call_boolean_method_a(self.0.object, __jni_method, __jni_args.as_ptr())
}
}
/// [getAddress](https://developer.android.com/reference/android/bluetooth/BluetoothAdapter.html#getAddress())
///
/// Required features: "java-lang-String"
#[cfg(any(feature = "all", all(feature = "java-lang-String")))]
pub fn getAddress<'env>(&'env self) -> __jni_bindgen::std::result::Result<__jni_bindgen::std::option::Option<__jni_bindgen::Local<'env, crate::java::lang::String>>, __jni_bindgen::Local<'env, crate::java::lang::Throwable>> {
// class.path == "android/bluetooth/BluetoothAdapter", java.flags == PUBLIC, .name == "getAddress", .descriptor == "()Ljava/lang/String;"
unsafe {
let __jni_args = [];
let __jni_env = __jni_bindgen::Env::from_ptr(self.0.env);
let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/BluetoothAdapter\0", "getAddress\0", "()Ljava/lang/String;\0");
__jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr())
}
}
/// [getName](https://developer.android.com/reference/android/bluetooth/BluetoothAdapter.html#getName())
///
/// Required features: "java-lang-String"
#[cfg(any(feature = "all", all(feature = "java-lang-String")))]
pub fn getName<'env>(&'env self) -> __jni_bindgen::std::result::Result<__jni_bindgen::std::option::Option<__jni_bindgen::Local<'env, crate::java::lang::String>>, __jni_bindgen::Local<'env, crate::java::lang::Throwable>> {
// class.path == "android/bluetooth/BluetoothAdapter", java.flags == PUBLIC, .name == "getName", .descriptor == "()Ljava/lang/String;"
unsafe {
let __jni_args = [];
let __jni_env = __jni_bindgen::Env::from_ptr(self.0.env);
let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/BluetoothAdapter\0", "getName\0", "()Ljava/lang/String;\0");
__jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr())
}
}
/// [setName](https://developer.android.com/reference/android/bluetooth/BluetoothAdapter.html#setName(java.lang.String))
///
/// Required features: "java-lang-String"
#[cfg(any(feature = "all", all(feature = "java-lang-String")))]
pub fn setName<'env>(&'env self, arg0: impl __jni_bindgen::std::convert::Into<__jni_bindgen::std::option::Option<&'env crate::java::lang::String>>) -> __jni_bindgen::std::result::Result<bool, __jni_bindgen::Local<'env, crate::java::lang::Throwable>> {
// class.path == "android/bluetooth/BluetoothAdapter", java.flags == PUBLIC, .name == "setName", .descriptor == "(Ljava/lang/String;)Z"
unsafe {
let __jni_args = [__jni_bindgen::AsJValue::as_jvalue(&arg0.into())];
let __jni_env = __jni_bindgen::Env::from_ptr(self.0.env);
let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/BluetoothAdapter\0", "setName\0", "(Ljava/lang/String;)Z\0");
__jni_env.call_boolean_method_a(self.0.object, __jni_method, __jni_args.as_ptr())
}
}
/// [getScanMode](https://developer.android.com/reference/android/bluetooth/BluetoothAdapter.html#getScanMode())
pub fn getScanMode<'env>(&'env self) -> __jni_bindgen::std::result::Result<i32, __jni_bindgen::Local<'env, crate::java::lang::Throwable>> {
// class.path == "android/bluetooth/BluetoothAdapter", java.flags == PUBLIC, .name == "getScanMode", .descriptor == "()I"
unsafe {
let __jni_args = [];
let __jni_env = __jni_bindgen::Env::from_ptr(self.0.env);
let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/BluetoothAdapter\0", "getScanMode\0", "()I\0");
__jni_env.call_int_method_a(self.0.object, __jni_method, __jni_args.as_ptr())
}
}
/// [startDiscovery](https://developer.android.com/reference/android/bluetooth/BluetoothAdapter.html#startDiscovery())
pub fn startDiscovery<'env>(&'env self) -> __jni_bindgen::std::result::Result<bool, __jni_bindgen::Local<'env, crate::java::lang::Throwable>> {
// class.path == "android/bluetooth/BluetoothAdapter", java.flags == PUBLIC, .name == "startDiscovery", .descriptor == "()Z"
unsafe {
let __jni_args = [];
let __jni_env = __jni_bindgen::Env::from_ptr(self.0.env);
let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/BluetoothAdapter\0", "startDiscovery\0", "()Z\0");
__jni_env.call_boolean_method_a(self.0.object, __jni_method, __jni_args.as_ptr())
}
}
/// [cancelDiscovery](https://developer.android.com/reference/android/bluetooth/BluetoothAdapter.html#cancelDiscovery())
pub fn cancelDiscovery<'env>(&'env self) -> __jni_bindgen::std::result::Result<bool, __jni_bindgen::Local<'env, crate::java::lang::Throwable>> {
// class.path == "android/bluetooth/BluetoothAdapter", java.flags == PUBLIC, .name == "cancelDiscovery", .descriptor == "()Z"
unsafe {
let __jni_args = [];
let __jni_env = __jni_bindgen::Env::from_ptr(self.0.env);
let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/BluetoothAdapter\0", "cancelDiscovery\0", "()Z\0");
__jni_env.call_boolean_method_a(self.0.object, __jni_method, __jni_args.as_ptr())
}
}
/// [isDiscovering](https://developer.android.com/reference/android/bluetooth/BluetoothAdapter.html#isDiscovering())
pub fn isDiscovering<'env>(&'env self) -> __jni_bindgen::std::result::Result<bool, __jni_bindgen::Local<'env, crate::java::lang::Throwable>> {
// class.path == "android/bluetooth/BluetoothAdapter", java.flags == PUBLIC, .name == "isDiscovering", .descriptor == "()Z"
unsafe {
let __jni_args = [];
let __jni_env = __jni_bindgen::Env::from_ptr(self.0.env);
let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/BluetoothAdapter\0", "isDiscovering\0", "()Z\0");
__jni_env.call_boolean_method_a(self.0.object, __jni_method, __jni_args.as_ptr())
}
}
/// [getBondedDevices](https://developer.android.com/reference/android/bluetooth/BluetoothAdapter.html#getBondedDevices())
///
/// Required features: "java-util-Set"
#[cfg(any(feature = "all", all(feature = "java-util-Set")))]
pub fn getBondedDevices<'env>(&'env self) -> __jni_bindgen::std::result::Result<__jni_bindgen::std::option::Option<__jni_bindgen::Local<'env, crate::java::util::Set>>, __jni_bindgen::Local<'env, crate::java::lang::Throwable>> {
// class.path == "android/bluetooth/BluetoothAdapter", java.flags == PUBLIC, .name == "getBondedDevices", .descriptor == "()Ljava/util/Set;"
unsafe {
let __jni_args = [];
let __jni_env = __jni_bindgen::Env::from_ptr(self.0.env);
let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/BluetoothAdapter\0", "getBondedDevices\0", "()Ljava/util/Set;\0");
__jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr())
}
}
/// [listenUsingRfcommWithServiceRecord](https://developer.android.com/reference/android/bluetooth/BluetoothAdapter.html#listenUsingRfcommWithServiceRecord(java.lang.String,%20java.util.UUID))
///
/// Required features: "android-bluetooth-BluetoothServerSocket", "java-lang-String", "java-util-UUID"
#[cfg(any(feature = "all", all(feature = "android-bluetooth-BluetoothServerSocket", feature = "java-lang-String", feature = "java-util-UUID")))]
pub fn listenUsingRfcommWithServiceRecord<'env>(&'env self, arg0: impl __jni_bindgen::std::convert::Into<__jni_bindgen::std::option::Option<&'env crate::java::lang::String>>, arg1: impl __jni_bindgen::std::convert::Into<__jni_bindgen::std::option::Option<&'env crate::java::util::UUID>>) -> __jni_bindgen::std::result::Result<__jni_bindgen::std::option::Option<__jni_bindgen::Local<'env, crate::android::bluetooth::BluetoothServerSocket>>, __jni_bindgen::Local<'env, crate::java::lang::Throwable>> {
// class.path == "android/bluetooth/BluetoothAdapter", java.flags == PUBLIC, .name == "listenUsingRfcommWithServiceRecord", .descriptor == "(Ljava/lang/String;Ljava/util/UUID;)Landroid/bluetooth/BluetoothServerSocket;"
unsafe {
let __jni_args = [__jni_bindgen::AsJValue::as_jvalue(&arg0.into()), __jni_bindgen::AsJValue::as_jvalue(&arg1.into())];
let __jni_env = __jni_bindgen::Env::from_ptr(self.0.env);
let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/BluetoothAdapter\0", "listenUsingRfcommWithServiceRecord\0", "(Ljava/lang/String;Ljava/util/UUID;)Landroid/bluetooth/BluetoothServerSocket;\0");
__jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr())
}
}
/// [checkBluetoothAddress](https://developer.android.com/reference/android/bluetooth/BluetoothAdapter.html#checkBluetoothAddress(java.lang.String))
///
/// Required features: "java-lang-String"
#[cfg(any(feature = "all", all(feature = "java-lang-String")))]
pub fn checkBluetoothAddress<'env>(__jni_env: &'env __jni_bindgen::Env, arg0: impl __jni_bindgen::std::convert::Into<__jni_bindgen::std::option::Option<&'env crate::java::lang::String>>) -> __jni_bindgen::std::result::Result<bool, __jni_bindgen::Local<'env, crate::java::lang::Throwable>> {
// class.path == "android/bluetooth/BluetoothAdapter", java.flags == PUBLIC | STATIC, .name == "checkBluetoothAddress", .descriptor == "(Ljava/lang/String;)Z"
unsafe {
let __jni_args = [__jni_bindgen::AsJValue::as_jvalue(&arg0.into())];
let (__jni_class, __jni_method) = __jni_env.require_class_static_method("android/bluetooth/BluetoothAdapter\0", "checkBluetoothAddress\0", "(Ljava/lang/String;)Z\0");
__jni_env.call_static_boolean_method_a(__jni_class, __jni_method, __jni_args.as_ptr())
}
}
/// public static final [ERROR](https://developer.android.com/reference/android/bluetooth/BluetoothAdapter.html#ERROR)
pub const ERROR : i32 = -2147483648;
/// public static final [ACTION_STATE_CHANGED](https://developer.android.com/reference/android/bluetooth/BluetoothAdapter.html#ACTION_STATE_CHANGED)
pub const ACTION_STATE_CHANGED : &'static str = "android.bluetooth.adapter.action.STATE_CHANGED";
/// public static final [EXTRA_STATE](https://developer.android.com/reference/android/bluetooth/BluetoothAdapter.html#EXTRA_STATE)
pub const EXTRA_STATE : &'static str = "android.bluetooth.adapter.extra.STATE";
/// public static final [EXTRA_PREVIOUS_STATE](https://developer.android.com/reference/android/bluetooth/BluetoothAdapter.html#EXTRA_PREVIOUS_STATE)
pub const EXTRA_PREVIOUS_STATE : &'static str = "android.bluetooth.adapter.extra.PREVIOUS_STATE";
/// public static final [STATE_OFF](https://developer.android.com/reference/android/bluetooth/BluetoothAdapter.html#STATE_OFF)
pub const STATE_OFF : i32 = 10;
/// public static final [STATE_TURNING_ON](https://developer.android.com/reference/android/bluetooth/BluetoothAdapter.html#STATE_TURNING_ON)
pub const STATE_TURNING_ON : i32 = 11;
/// public static final [STATE_ON](https://developer.android.com/reference/android/bluetooth/BluetoothAdapter.html#STATE_ON)
pub const STATE_ON : i32 = 12;
/// public static final [STATE_TURNING_OFF](https://developer.android.com/reference/android/bluetooth/BluetoothAdapter.html#STATE_TURNING_OFF)
pub const STATE_TURNING_OFF : i32 = 13;
/// public static final [ACTION_REQUEST_DISCOVERABLE](https://developer.android.com/reference/android/bluetooth/BluetoothAdapter.html#ACTION_REQUEST_DISCOVERABLE)
pub const ACTION_REQUEST_DISCOVERABLE : &'static str = "android.bluetooth.adapter.action.REQUEST_DISCOVERABLE";
/// public static final [EXTRA_DISCOVERABLE_DURATION](https://developer.android.com/reference/android/bluetooth/BluetoothAdapter.html#EXTRA_DISCOVERABLE_DURATION)
pub const EXTRA_DISCOVERABLE_DURATION : &'static str = "android.bluetooth.adapter.extra.DISCOVERABLE_DURATION";
/// public static final [ACTION_REQUEST_ENABLE](https://developer.android.com/reference/android/bluetooth/BluetoothAdapter.html#ACTION_REQUEST_ENABLE)
pub const ACTION_REQUEST_ENABLE : &'static str = "android.bluetooth.adapter.action.REQUEST_ENABLE";
/// public static final [ACTION_SCAN_MODE_CHANGED](https://developer.android.com/reference/android/bluetooth/BluetoothAdapter.html#ACTION_SCAN_MODE_CHANGED)
pub const ACTION_SCAN_MODE_CHANGED : &'static str = "android.bluetooth.adapter.action.SCAN_MODE_CHANGED";
/// public static final [EXTRA_SCAN_MODE](https://developer.android.com/reference/android/bluetooth/BluetoothAdapter.html#EXTRA_SCAN_MODE)
pub const EXTRA_SCAN_MODE : &'static str = "android.bluetooth.adapter.extra.SCAN_MODE";
/// public static final [EXTRA_PREVIOUS_SCAN_MODE](https://developer.android.com/reference/android/bluetooth/BluetoothAdapter.html#EXTRA_PREVIOUS_SCAN_MODE)
pub const EXTRA_PREVIOUS_SCAN_MODE : &'static str = "android.bluetooth.adapter.extra.PREVIOUS_SCAN_MODE";
/// public static final [SCAN_MODE_NONE](https://developer.android.com/reference/android/bluetooth/BluetoothAdapter.html#SCAN_MODE_NONE)
pub const SCAN_MODE_NONE : i32 = 20;
/// public static final [SCAN_MODE_CONNECTABLE](https://developer.android.com/reference/android/bluetooth/BluetoothAdapter.html#SCAN_MODE_CONNECTABLE)
pub const SCAN_MODE_CONNECTABLE : i32 = 21;
/// public static final [SCAN_MODE_CONNECTABLE_DISCOVERABLE](https://developer.android.com/reference/android/bluetooth/BluetoothAdapter.html#SCAN_MODE_CONNECTABLE_DISCOVERABLE)
pub const SCAN_MODE_CONNECTABLE_DISCOVERABLE : i32 = 23;
/// public static final [ACTION_DISCOVERY_STARTED](https://developer.android.com/reference/android/bluetooth/BluetoothAdapter.html#ACTION_DISCOVERY_STARTED)
pub const ACTION_DISCOVERY_STARTED : &'static str = "android.bluetooth.adapter.action.DISCOVERY_STARTED";
/// public static final [ACTION_DISCOVERY_FINISHED](https://developer.android.com/reference/android/bluetooth/BluetoothAdapter.html#ACTION_DISCOVERY_FINISHED)
pub const ACTION_DISCOVERY_FINISHED : &'static str = "android.bluetooth.adapter.action.DISCOVERY_FINISHED";
/// public static final [ACTION_LOCAL_NAME_CHANGED](https://developer.android.com/reference/android/bluetooth/BluetoothAdapter.html#ACTION_LOCAL_NAME_CHANGED)
pub const ACTION_LOCAL_NAME_CHANGED : &'static str = "android.bluetooth.adapter.action.LOCAL_NAME_CHANGED";
/// public static final [EXTRA_LOCAL_NAME](https://developer.android.com/reference/android/bluetooth/BluetoothAdapter.html#EXTRA_LOCAL_NAME)
pub const EXTRA_LOCAL_NAME : &'static str = "android.bluetooth.adapter.extra.LOCAL_NAME";
}
}