jni-android-sys 0.0.10

Autogenerated glue code for access Android JVM APIs from Rust
// 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())
            }
        }

        /// [sendVendorSpecificResultCode](https://developer.android.com/reference/android/bluetooth/BluetoothHeadset.html#sendVendorSpecificResultCode(android.bluetooth.BluetoothDevice,%20java.lang.String,%20java.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 sendVendorSpecificResultCode<'env>(&'env self, arg0: impl __jni_bindgen::std::convert::Into<__jni_bindgen::std::option::Option<&'env crate::android::bluetooth::BluetoothDevice>>, arg1: impl __jni_bindgen::std::convert::Into<__jni_bindgen::std::option::Option<&'env crate::java::lang::String>>, arg2: 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/BluetoothHeadset", java.flags == PUBLIC, .name == "sendVendorSpecificResultCode", .descriptor == "(Landroid/bluetooth/BluetoothDevice;Ljava/lang/String;Ljava/lang/String;)Z"
            unsafe {
                let __jni_args = [__jni_bindgen::AsJValue::as_jvalue(&arg0.into()), __jni_bindgen::AsJValue::as_jvalue(&arg1.into()), __jni_bindgen::AsJValue::as_jvalue(&arg2.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", "sendVendorSpecificResultCode\0", "(Landroid/bluetooth/BluetoothDevice;Ljava/lang/String;Ljava/lang/String;)Z\0");
                __jni_env.call_boolean_method_a(self.0.object, __jni_method, __jni_args.as_ptr())
            }
        }

        /// 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_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_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 [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 [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_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_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_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 [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 [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 [STATE_AUDIO_CONNECTED](https://developer.android.com/reference/android/bluetooth/BluetoothHeadset.html#STATE_AUDIO_CONNECTED)
        pub const STATE_AUDIO_CONNECTED : i32 = 12;

        /// 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_DISCONNECTED](https://developer.android.com/reference/android/bluetooth/BluetoothHeadset.html#STATE_AUDIO_DISCONNECTED)
        pub const STATE_AUDIO_DISCONNECTED : i32 = 10;

        /// public static final [VENDOR_RESULT_CODE_COMMAND_ANDROID](https://developer.android.com/reference/android/bluetooth/BluetoothHeadset.html#VENDOR_RESULT_CODE_COMMAND_ANDROID)
        pub const VENDOR_RESULT_CODE_COMMAND_ANDROID : &'static str = "+ANDROID";

        /// 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";
    }
}