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-BluetoothHealth"))]
__jni_bindgen! {
    /// public final class [BluetoothHealth](https://developer.android.com/reference/android/bluetooth/BluetoothHealth.html)
    ///
    /// Required feature: "android-bluetooth-BluetoothHealth"
    public final class BluetoothHealth ("android/bluetooth/BluetoothHealth") extends crate::java::lang::Object, implements crate::android::bluetooth::BluetoothProfile {

        /// [registerSinkAppConfiguration](https://developer.android.com/reference/android/bluetooth/BluetoothHealth.html#registerSinkAppConfiguration(java.lang.String,%20int,%20android.bluetooth.BluetoothHealthCallback))
        ///
        /// Required features: "android-bluetooth-BluetoothHealthCallback", "java-lang-String"
        #[cfg(any(feature = "all", all(feature = "android-bluetooth-BluetoothHealthCallback", feature = "java-lang-String")))]
        pub fn registerSinkAppConfiguration<'env>(&'env self, arg0: impl __jni_bindgen::std::convert::Into<__jni_bindgen::std::option::Option<&'env crate::java::lang::String>>, arg1: i32, arg2: impl __jni_bindgen::std::convert::Into<__jni_bindgen::std::option::Option<&'env crate::android::bluetooth::BluetoothHealthCallback>>) -> __jni_bindgen::std::result::Result<bool, __jni_bindgen::Local<'env, crate::java::lang::Throwable>> {
            // class.path == "android/bluetooth/BluetoothHealth", java.flags == PUBLIC, .name == "registerSinkAppConfiguration", .descriptor == "(Ljava/lang/String;ILandroid/bluetooth/BluetoothHealthCallback;)Z"
            unsafe {
                let __jni_args = [__jni_bindgen::AsJValue::as_jvalue(&arg0.into()), __jni_bindgen::AsJValue::as_jvalue(&arg1), __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/BluetoothHealth\0", "registerSinkAppConfiguration\0", "(Ljava/lang/String;ILandroid/bluetooth/BluetoothHealthCallback;)Z\0");
                __jni_env.call_boolean_method_a(self.0.object, __jni_method, __jni_args.as_ptr())
            }
        }

        /// [unregisterAppConfiguration](https://developer.android.com/reference/android/bluetooth/BluetoothHealth.html#unregisterAppConfiguration(android.bluetooth.BluetoothHealthAppConfiguration))
        ///
        /// Required features: "android-bluetooth-BluetoothHealthAppConfiguration"
        #[cfg(any(feature = "all", all(feature = "android-bluetooth-BluetoothHealthAppConfiguration")))]
        pub fn unregisterAppConfiguration<'env>(&'env self, arg0: impl __jni_bindgen::std::convert::Into<__jni_bindgen::std::option::Option<&'env crate::android::bluetooth::BluetoothHealthAppConfiguration>>) -> __jni_bindgen::std::result::Result<bool, __jni_bindgen::Local<'env, crate::java::lang::Throwable>> {
            // class.path == "android/bluetooth/BluetoothHealth", java.flags == PUBLIC, .name == "unregisterAppConfiguration", .descriptor == "(Landroid/bluetooth/BluetoothHealthAppConfiguration;)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/BluetoothHealth\0", "unregisterAppConfiguration\0", "(Landroid/bluetooth/BluetoothHealthAppConfiguration;)Z\0");
                __jni_env.call_boolean_method_a(self.0.object, __jni_method, __jni_args.as_ptr())
            }
        }

        /// [connectChannelToSource](https://developer.android.com/reference/android/bluetooth/BluetoothHealth.html#connectChannelToSource(android.bluetooth.BluetoothDevice,%20android.bluetooth.BluetoothHealthAppConfiguration))
        ///
        /// Required features: "android-bluetooth-BluetoothDevice", "android-bluetooth-BluetoothHealthAppConfiguration"
        #[cfg(any(feature = "all", all(feature = "android-bluetooth-BluetoothDevice", feature = "android-bluetooth-BluetoothHealthAppConfiguration")))]
        pub fn connectChannelToSource<'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::android::bluetooth::BluetoothHealthAppConfiguration>>) -> __jni_bindgen::std::result::Result<bool, __jni_bindgen::Local<'env, crate::java::lang::Throwable>> {
            // class.path == "android/bluetooth/BluetoothHealth", java.flags == PUBLIC, .name == "connectChannelToSource", .descriptor == "(Landroid/bluetooth/BluetoothDevice;Landroid/bluetooth/BluetoothHealthAppConfiguration;)Z"
            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/BluetoothHealth\0", "connectChannelToSource\0", "(Landroid/bluetooth/BluetoothDevice;Landroid/bluetooth/BluetoothHealthAppConfiguration;)Z\0");
                __jni_env.call_boolean_method_a(self.0.object, __jni_method, __jni_args.as_ptr())
            }
        }

        /// [disconnectChannel](https://developer.android.com/reference/android/bluetooth/BluetoothHealth.html#disconnectChannel(android.bluetooth.BluetoothDevice,%20android.bluetooth.BluetoothHealthAppConfiguration,%20int))
        ///
        /// Required features: "android-bluetooth-BluetoothDevice", "android-bluetooth-BluetoothHealthAppConfiguration"
        #[cfg(any(feature = "all", all(feature = "android-bluetooth-BluetoothDevice", feature = "android-bluetooth-BluetoothHealthAppConfiguration")))]
        pub fn disconnectChannel<'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::android::bluetooth::BluetoothHealthAppConfiguration>>, arg2: i32) -> __jni_bindgen::std::result::Result<bool, __jni_bindgen::Local<'env, crate::java::lang::Throwable>> {
            // class.path == "android/bluetooth/BluetoothHealth", java.flags == PUBLIC, .name == "disconnectChannel", .descriptor == "(Landroid/bluetooth/BluetoothDevice;Landroid/bluetooth/BluetoothHealthAppConfiguration;I)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)];
                let __jni_env = __jni_bindgen::Env::from_ptr(self.0.env);
                let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/BluetoothHealth\0", "disconnectChannel\0", "(Landroid/bluetooth/BluetoothDevice;Landroid/bluetooth/BluetoothHealthAppConfiguration;I)Z\0");
                __jni_env.call_boolean_method_a(self.0.object, __jni_method, __jni_args.as_ptr())
            }
        }

        /// [getMainChannelFd](https://developer.android.com/reference/android/bluetooth/BluetoothHealth.html#getMainChannelFd(android.bluetooth.BluetoothDevice,%20android.bluetooth.BluetoothHealthAppConfiguration))
        ///
        /// Required features: "android-bluetooth-BluetoothDevice", "android-bluetooth-BluetoothHealthAppConfiguration", "android-os-ParcelFileDescriptor"
        #[cfg(any(feature = "all", all(feature = "android-bluetooth-BluetoothDevice", feature = "android-bluetooth-BluetoothHealthAppConfiguration", feature = "android-os-ParcelFileDescriptor")))]
        pub fn getMainChannelFd<'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::android::bluetooth::BluetoothHealthAppConfiguration>>) -> __jni_bindgen::std::result::Result<__jni_bindgen::std::option::Option<__jni_bindgen::Local<'env, crate::android::os::ParcelFileDescriptor>>, __jni_bindgen::Local<'env, crate::java::lang::Throwable>> {
            // class.path == "android/bluetooth/BluetoothHealth", java.flags == PUBLIC, .name == "getMainChannelFd", .descriptor == "(Landroid/bluetooth/BluetoothDevice;Landroid/bluetooth/BluetoothHealthAppConfiguration;)Landroid/os/ParcelFileDescriptor;"
            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/BluetoothHealth\0", "getMainChannelFd\0", "(Landroid/bluetooth/BluetoothDevice;Landroid/bluetooth/BluetoothHealthAppConfiguration;)Landroid/os/ParcelFileDescriptor;\0");
                __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr())
            }
        }

        /// [getConnectionState](https://developer.android.com/reference/android/bluetooth/BluetoothHealth.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/BluetoothHealth", 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/BluetoothHealth\0", "getConnectionState\0", "(Landroid/bluetooth/BluetoothDevice;)I\0");
                __jni_env.call_int_method_a(self.0.object, __jni_method, __jni_args.as_ptr())
            }
        }

        /// [getConnectedDevices](https://developer.android.com/reference/android/bluetooth/BluetoothHealth.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/BluetoothHealth", 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/BluetoothHealth\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/BluetoothHealth.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/BluetoothHealth", 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/BluetoothHealth\0", "getDevicesMatchingConnectionStates\0", "([I)Ljava/util/List;\0");
                __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr())
            }
        }

        /// public static final [APP_CONFIG_REGISTRATION_FAILURE](https://developer.android.com/reference/android/bluetooth/BluetoothHealth.html#APP_CONFIG_REGISTRATION_FAILURE)
        pub const APP_CONFIG_REGISTRATION_FAILURE : i32 = 1;

        /// public static final [APP_CONFIG_REGISTRATION_SUCCESS](https://developer.android.com/reference/android/bluetooth/BluetoothHealth.html#APP_CONFIG_REGISTRATION_SUCCESS)
        pub const APP_CONFIG_REGISTRATION_SUCCESS : i32 = 0;

        /// public static final [APP_CONFIG_UNREGISTRATION_FAILURE](https://developer.android.com/reference/android/bluetooth/BluetoothHealth.html#APP_CONFIG_UNREGISTRATION_FAILURE)
        pub const APP_CONFIG_UNREGISTRATION_FAILURE : i32 = 3;

        /// public static final [APP_CONFIG_UNREGISTRATION_SUCCESS](https://developer.android.com/reference/android/bluetooth/BluetoothHealth.html#APP_CONFIG_UNREGISTRATION_SUCCESS)
        pub const APP_CONFIG_UNREGISTRATION_SUCCESS : i32 = 2;

        /// public static final [CHANNEL_TYPE_RELIABLE](https://developer.android.com/reference/android/bluetooth/BluetoothHealth.html#CHANNEL_TYPE_RELIABLE)
        pub const CHANNEL_TYPE_RELIABLE : i32 = 10;

        /// public static final [CHANNEL_TYPE_STREAMING](https://developer.android.com/reference/android/bluetooth/BluetoothHealth.html#CHANNEL_TYPE_STREAMING)
        pub const CHANNEL_TYPE_STREAMING : i32 = 11;

        /// public static final [SINK_ROLE](https://developer.android.com/reference/android/bluetooth/BluetoothHealth.html#SINK_ROLE)
        pub const SINK_ROLE : i32 = 2;

        /// public static final [SOURCE_ROLE](https://developer.android.com/reference/android/bluetooth/BluetoothHealth.html#SOURCE_ROLE)
        pub const SOURCE_ROLE : i32 = 1;

        /// public static final [STATE_CHANNEL_CONNECTED](https://developer.android.com/reference/android/bluetooth/BluetoothHealth.html#STATE_CHANNEL_CONNECTED)
        pub const STATE_CHANNEL_CONNECTED : i32 = 2;

        /// public static final [STATE_CHANNEL_CONNECTING](https://developer.android.com/reference/android/bluetooth/BluetoothHealth.html#STATE_CHANNEL_CONNECTING)
        pub const STATE_CHANNEL_CONNECTING : i32 = 1;

        /// public static final [STATE_CHANNEL_DISCONNECTED](https://developer.android.com/reference/android/bluetooth/BluetoothHealth.html#STATE_CHANNEL_DISCONNECTED)
        pub const STATE_CHANNEL_DISCONNECTED : i32 = 0;

        /// public static final [STATE_CHANNEL_DISCONNECTING](https://developer.android.com/reference/android/bluetooth/BluetoothHealth.html#STATE_CHANNEL_DISCONNECTING)
        pub const STATE_CHANNEL_DISCONNECTING : i32 = 3;
    }
}