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

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

        /// [accept](https://developer.android.com/reference/android/bluetooth/BluetoothServerSocket.html#accept(int))
        ///
        /// Required features: "android-bluetooth-BluetoothSocket"
        #[cfg(any(feature = "all", all(feature = "android-bluetooth-BluetoothSocket")))]
        pub fn accept_int<'env>(&'env self, arg0: i32) -> __jni_bindgen::std::result::Result<__jni_bindgen::std::option::Option<__jni_bindgen::Local<'env, crate::android::bluetooth::BluetoothSocket>>, __jni_bindgen::Local<'env, crate::java::lang::Throwable>> {
            // class.path == "android/bluetooth/BluetoothServerSocket", java.flags == PUBLIC, .name == "accept", .descriptor == "(I)Landroid/bluetooth/BluetoothSocket;"
            unsafe {
                let __jni_args = [__jni_bindgen::AsJValue::as_jvalue(&arg0)];
                let __jni_env = __jni_bindgen::Env::from_ptr(self.0.env);
                let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/BluetoothServerSocket\0", "accept\0", "(I)Landroid/bluetooth/BluetoothSocket;\0");
                __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr())
            }
        }

        /// [close](https://developer.android.com/reference/android/bluetooth/BluetoothServerSocket.html#close())
        pub fn close<'env>(&'env self) -> __jni_bindgen::std::result::Result<(), __jni_bindgen::Local<'env, crate::java::lang::Throwable>> {
            // class.path == "android/bluetooth/BluetoothServerSocket", java.flags == PUBLIC, .name == "close", .descriptor == "()V"
            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/BluetoothServerSocket\0", "close\0", "()V\0");
                __jni_env.call_void_method_a(self.0.object, __jni_method, __jni_args.as_ptr())
            }
        }
    }
}