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
// WARNING: This file was autogenerated by jni-bindgen. Any changes to this file may be lost!!!
#[cfg(any(feature = "all", feature = "android-bluetooth-BluetoothHeadset"))]
__jni_bindgen! {
/// public final class [BluetoothHeadset](https://developer.android.com/reference/android/bluetooth/BluetoothHeadset.html)
///
/// Required feature: "android-bluetooth-BluetoothHeadset"
public final class BluetoothHeadset ("android/bluetooth/BluetoothHeadset") extends crate::java::lang::Object, implements crate::android::bluetooth::BluetoothProfile {
/// [getConnectedDevices](https://developer.android.com/reference/android/bluetooth/BluetoothHeadset.html#getConnectedDevices())
///
/// Required features: "java-util-List"
#[cfg(any(feature = "all", all(feature = "java-util-List")))]
pub fn getConnectedDevices<'env>(&'env self) -> __jni_bindgen::std::result::Result<__jni_bindgen::std::option::Option<__jni_bindgen::Local<'env, crate::java::util::List>>, __jni_bindgen::Local<'env, crate::java::lang::Throwable>> {
// class.path == "android/bluetooth/BluetoothHeadset", java.flags == PUBLIC, .name == "getConnectedDevices", .descriptor == "()Ljava/util/List;"
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/BluetoothHeadset\0", "getConnectedDevices\0", "()Ljava/util/List;\0");
__jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr())
}
}
/// [getDevicesMatchingConnectionStates](https://developer.android.com/reference/android/bluetooth/BluetoothHeadset.html#getDevicesMatchingConnectionStates(int%5B%5D))
///
/// Required features: "java-util-List"
#[cfg(any(feature = "all", all(feature = "java-util-List")))]
pub fn getDevicesMatchingConnectionStates<'env>(&'env self, arg0: impl __jni_bindgen::std::convert::Into<__jni_bindgen::std::option::Option<&'env __jni_bindgen::IntArray>>) -> __jni_bindgen::std::result::Result<__jni_bindgen::std::option::Option<__jni_bindgen::Local<'env, crate::java::util::List>>, __jni_bindgen::Local<'env, crate::java::lang::Throwable>> {
// class.path == "android/bluetooth/BluetoothHeadset", java.flags == PUBLIC, .name == "getDevicesMatchingConnectionStates", .descriptor == "([I)Ljava/util/List;"
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/BluetoothHeadset\0", "getDevicesMatchingConnectionStates\0", "([I)Ljava/util/List;\0");
__jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr())
}
}
/// [getConnectionState](https://developer.android.com/reference/android/bluetooth/BluetoothHeadset.html#getConnectionState(android.bluetooth.BluetoothDevice))
///
/// Required features: "android-bluetooth-BluetoothDevice"
#[cfg(any(feature = "all", all(feature = "android-bluetooth-BluetoothDevice")))]
pub fn getConnectionState<'env>(&'env self, arg0: impl __jni_bindgen::std::convert::Into<__jni_bindgen::std::option::Option<&'env crate::android::bluetooth::BluetoothDevice>>) -> __jni_bindgen::std::result::Result<i32, __jni_bindgen::Local<'env, crate::java::lang::Throwable>> {
// class.path == "android/bluetooth/BluetoothHeadset", java.flags == PUBLIC, .name == "getConnectionState", .descriptor == "(Landroid/bluetooth/BluetoothDevice;)I"
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/BluetoothHeadset\0", "getConnectionState\0", "(Landroid/bluetooth/BluetoothDevice;)I\0");
__jni_env.call_int_method_a(self.0.object, __jni_method, __jni_args.as_ptr())
}
}
/// [startVoiceRecognition](https://developer.android.com/reference/android/bluetooth/BluetoothHeadset.html#startVoiceRecognition(android.bluetooth.BluetoothDevice))
///
/// Required features: "android-bluetooth-BluetoothDevice"
#[cfg(any(feature = "all", all(feature = "android-bluetooth-BluetoothDevice")))]
pub fn startVoiceRecognition<'env>(&'env self, arg0: impl __jni_bindgen::std::convert::Into<__jni_bindgen::std::option::Option<&'env crate::android::bluetooth::BluetoothDevice>>) -> __jni_bindgen::std::result::Result<bool, __jni_bindgen::Local<'env, crate::java::lang::Throwable>> {
// class.path == "android/bluetooth/BluetoothHeadset", java.flags == PUBLIC, .name == "startVoiceRecognition", .descriptor == "(Landroid/bluetooth/BluetoothDevice;)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/BluetoothHeadset\0", "startVoiceRecognition\0", "(Landroid/bluetooth/BluetoothDevice;)Z\0");
__jni_env.call_boolean_method_a(self.0.object, __jni_method, __jni_args.as_ptr())
}
}
/// [stopVoiceRecognition](https://developer.android.com/reference/android/bluetooth/BluetoothHeadset.html#stopVoiceRecognition(android.bluetooth.BluetoothDevice))
///
/// Required features: "android-bluetooth-BluetoothDevice"
#[cfg(any(feature = "all", all(feature = "android-bluetooth-BluetoothDevice")))]
pub fn stopVoiceRecognition<'env>(&'env self, arg0: impl __jni_bindgen::std::convert::Into<__jni_bindgen::std::option::Option<&'env crate::android::bluetooth::BluetoothDevice>>) -> __jni_bindgen::std::result::Result<bool, __jni_bindgen::Local<'env, crate::java::lang::Throwable>> {
// class.path == "android/bluetooth/BluetoothHeadset", java.flags == PUBLIC, .name == "stopVoiceRecognition", .descriptor == "(Landroid/bluetooth/BluetoothDevice;)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/BluetoothHeadset\0", "stopVoiceRecognition\0", "(Landroid/bluetooth/BluetoothDevice;)Z\0");
__jni_env.call_boolean_method_a(self.0.object, __jni_method, __jni_args.as_ptr())
}
}
/// [isAudioConnected](https://developer.android.com/reference/android/bluetooth/BluetoothHeadset.html#isAudioConnected(android.bluetooth.BluetoothDevice))
///
/// Required features: "android-bluetooth-BluetoothDevice"
#[cfg(any(feature = "all", all(feature = "android-bluetooth-BluetoothDevice")))]
pub fn isAudioConnected<'env>(&'env self, arg0: impl __jni_bindgen::std::convert::Into<__jni_bindgen::std::option::Option<&'env crate::android::bluetooth::BluetoothDevice>>) -> __jni_bindgen::std::result::Result<bool, __jni_bindgen::Local<'env, crate::java::lang::Throwable>> {
// class.path == "android/bluetooth/BluetoothHeadset", java.flags == PUBLIC, .name == "isAudioConnected", .descriptor == "(Landroid/bluetooth/BluetoothDevice;)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/BluetoothHeadset\0", "isAudioConnected\0", "(Landroid/bluetooth/BluetoothDevice;)Z\0");
__jni_env.call_boolean_method_a(self.0.object, __jni_method, __jni_args.as_ptr())
}
}
/// public static final [ACTION_CONNECTION_STATE_CHANGED](https://developer.android.com/reference/android/bluetooth/BluetoothHeadset.html#ACTION_CONNECTION_STATE_CHANGED)
pub const ACTION_CONNECTION_STATE_CHANGED : &'static str = "android.bluetooth.headset.profile.action.CONNECTION_STATE_CHANGED";
/// public static final [ACTION_AUDIO_STATE_CHANGED](https://developer.android.com/reference/android/bluetooth/BluetoothHeadset.html#ACTION_AUDIO_STATE_CHANGED)
pub const ACTION_AUDIO_STATE_CHANGED : &'static str = "android.bluetooth.headset.profile.action.AUDIO_STATE_CHANGED";
/// public static final [ACTION_VENDOR_SPECIFIC_HEADSET_EVENT](https://developer.android.com/reference/android/bluetooth/BluetoothHeadset.html#ACTION_VENDOR_SPECIFIC_HEADSET_EVENT)
pub const ACTION_VENDOR_SPECIFIC_HEADSET_EVENT : &'static str = "android.bluetooth.headset.action.VENDOR_SPECIFIC_HEADSET_EVENT";
/// public static final [EXTRA_VENDOR_SPECIFIC_HEADSET_EVENT_CMD](https://developer.android.com/reference/android/bluetooth/BluetoothHeadset.html#EXTRA_VENDOR_SPECIFIC_HEADSET_EVENT_CMD)
pub const EXTRA_VENDOR_SPECIFIC_HEADSET_EVENT_CMD : &'static str = "android.bluetooth.headset.extra.VENDOR_SPECIFIC_HEADSET_EVENT_CMD";
/// public static final [EXTRA_VENDOR_SPECIFIC_HEADSET_EVENT_CMD_TYPE](https://developer.android.com/reference/android/bluetooth/BluetoothHeadset.html#EXTRA_VENDOR_SPECIFIC_HEADSET_EVENT_CMD_TYPE)
pub const EXTRA_VENDOR_SPECIFIC_HEADSET_EVENT_CMD_TYPE : &'static str = "android.bluetooth.headset.extra.VENDOR_SPECIFIC_HEADSET_EVENT_CMD_TYPE";
/// public static final [AT_CMD_TYPE_READ](https://developer.android.com/reference/android/bluetooth/BluetoothHeadset.html#AT_CMD_TYPE_READ)
pub const AT_CMD_TYPE_READ : i32 = 0;
/// public static final [AT_CMD_TYPE_TEST](https://developer.android.com/reference/android/bluetooth/BluetoothHeadset.html#AT_CMD_TYPE_TEST)
pub const AT_CMD_TYPE_TEST : i32 = 1;
/// public static final [AT_CMD_TYPE_SET](https://developer.android.com/reference/android/bluetooth/BluetoothHeadset.html#AT_CMD_TYPE_SET)
pub const AT_CMD_TYPE_SET : i32 = 2;
/// public static final [AT_CMD_TYPE_BASIC](https://developer.android.com/reference/android/bluetooth/BluetoothHeadset.html#AT_CMD_TYPE_BASIC)
pub const AT_CMD_TYPE_BASIC : i32 = 3;
/// public static final [AT_CMD_TYPE_ACTION](https://developer.android.com/reference/android/bluetooth/BluetoothHeadset.html#AT_CMD_TYPE_ACTION)
pub const AT_CMD_TYPE_ACTION : i32 = 4;
/// public static final [EXTRA_VENDOR_SPECIFIC_HEADSET_EVENT_ARGS](https://developer.android.com/reference/android/bluetooth/BluetoothHeadset.html#EXTRA_VENDOR_SPECIFIC_HEADSET_EVENT_ARGS)
pub const EXTRA_VENDOR_SPECIFIC_HEADSET_EVENT_ARGS : &'static str = "android.bluetooth.headset.extra.VENDOR_SPECIFIC_HEADSET_EVENT_ARGS";
/// public static final [VENDOR_SPECIFIC_HEADSET_EVENT_COMPANY_ID_CATEGORY](https://developer.android.com/reference/android/bluetooth/BluetoothHeadset.html#VENDOR_SPECIFIC_HEADSET_EVENT_COMPANY_ID_CATEGORY)
pub const VENDOR_SPECIFIC_HEADSET_EVENT_COMPANY_ID_CATEGORY : &'static str = "android.bluetooth.headset.intent.category.companyid";
/// public static final [STATE_AUDIO_DISCONNECTED](https://developer.android.com/reference/android/bluetooth/BluetoothHeadset.html#STATE_AUDIO_DISCONNECTED)
pub const STATE_AUDIO_DISCONNECTED : i32 = 10;
/// public static final [STATE_AUDIO_CONNECTING](https://developer.android.com/reference/android/bluetooth/BluetoothHeadset.html#STATE_AUDIO_CONNECTING)
pub const STATE_AUDIO_CONNECTING : i32 = 11;
/// public static final [STATE_AUDIO_CONNECTED](https://developer.android.com/reference/android/bluetooth/BluetoothHeadset.html#STATE_AUDIO_CONNECTED)
pub const STATE_AUDIO_CONNECTED : i32 = 12;
}
}