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 = "java-nio-channels-ServerSocketChannel"))]
__jni_bindgen! {
    /// public class [ServerSocketChannel](https://developer.android.com/reference/java/nio/channels/ServerSocketChannel.html)
    ///
    /// Required feature: "java-nio-channels-ServerSocketChannel"
    public class ServerSocketChannel ("java/nio/channels/ServerSocketChannel") extends crate::java::nio::channels::spi::AbstractSelectableChannel, implements crate::java::nio::channels::NetworkChannel {

        /// [open](https://developer.android.com/reference/java/nio/channels/ServerSocketChannel.html#open())
        ///
        /// Required features: "java-nio-channels-ServerSocketChannel"
        #[cfg(any(feature = "all", all(feature = "java-nio-channels-ServerSocketChannel")))]
        pub fn open<'env>(__jni_env: &'env __jni_bindgen::Env) -> __jni_bindgen::std::result::Result<__jni_bindgen::std::option::Option<__jni_bindgen::Local<'env, crate::java::nio::channels::ServerSocketChannel>>, __jni_bindgen::Local<'env, crate::java::lang::Throwable>> {
            // class.path == "java/nio/channels/ServerSocketChannel", java.flags == PUBLIC | STATIC, .name == "open", .descriptor == "()Ljava/nio/channels/ServerSocketChannel;"
            unsafe {
                let __jni_args = [];
                let (__jni_class, __jni_method) = __jni_env.require_class_static_method("java/nio/channels/ServerSocketChannel\0", "open\0", "()Ljava/nio/channels/ServerSocketChannel;\0");
                __jni_env.call_static_object_method_a(__jni_class, __jni_method, __jni_args.as_ptr())
            }
        }

        /// [validOps](https://developer.android.com/reference/java/nio/channels/ServerSocketChannel.html#validOps())
        pub fn validOps<'env>(&'env self) -> __jni_bindgen::std::result::Result<i32, __jni_bindgen::Local<'env, crate::java::lang::Throwable>> {
            // class.path == "java/nio/channels/ServerSocketChannel", java.flags == PUBLIC | FINAL, .name == "validOps", .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("java/nio/channels/ServerSocketChannel\0", "validOps\0", "()I\0");
                __jni_env.call_int_method_a(self.0.object, __jni_method, __jni_args.as_ptr())
            }
        }

        /// [bind](https://developer.android.com/reference/java/nio/channels/ServerSocketChannel.html#bind(java.net.SocketAddress))
        ///
        /// Required features: "java-net-SocketAddress", "java-nio-channels-ServerSocketChannel"
        #[cfg(any(feature = "all", all(feature = "java-net-SocketAddress", feature = "java-nio-channels-ServerSocketChannel")))]
        pub fn bind_SocketAddress<'env>(&'env self, arg0: impl __jni_bindgen::std::convert::Into<__jni_bindgen::std::option::Option<&'env crate::java::net::SocketAddress>>) -> __jni_bindgen::std::result::Result<__jni_bindgen::std::option::Option<__jni_bindgen::Local<'env, crate::java::nio::channels::ServerSocketChannel>>, __jni_bindgen::Local<'env, crate::java::lang::Throwable>> {
            // class.path == "java/nio/channels/ServerSocketChannel", java.flags == PUBLIC | FINAL, .name == "bind", .descriptor == "(Ljava/net/SocketAddress;)Ljava/nio/channels/ServerSocketChannel;"
            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("java/nio/channels/ServerSocketChannel\0", "bind\0", "(Ljava/net/SocketAddress;)Ljava/nio/channels/ServerSocketChannel;\0");
                __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr())
            }
        }

        /// [bind](https://developer.android.com/reference/java/nio/channels/ServerSocketChannel.html#bind(java.net.SocketAddress,%20int))
        ///
        /// Required features: "java-net-SocketAddress", "java-nio-channels-ServerSocketChannel"
        #[cfg(any(feature = "all", all(feature = "java-net-SocketAddress", feature = "java-nio-channels-ServerSocketChannel")))]
        pub fn bind_SocketAddress_int<'env>(&'env self, arg0: impl __jni_bindgen::std::convert::Into<__jni_bindgen::std::option::Option<&'env crate::java::net::SocketAddress>>, arg1: i32) -> __jni_bindgen::std::result::Result<__jni_bindgen::std::option::Option<__jni_bindgen::Local<'env, crate::java::nio::channels::ServerSocketChannel>>, __jni_bindgen::Local<'env, crate::java::lang::Throwable>> {
            // class.path == "java/nio/channels/ServerSocketChannel", java.flags == PUBLIC | ABSTRACT, .name == "bind", .descriptor == "(Ljava/net/SocketAddress;I)Ljava/nio/channels/ServerSocketChannel;"
            unsafe {
                let __jni_args = [__jni_bindgen::AsJValue::as_jvalue(&arg0.into()), __jni_bindgen::AsJValue::as_jvalue(&arg1)];
                let __jni_env = __jni_bindgen::Env::from_ptr(self.0.env);
                let (__jni_class, __jni_method) = __jni_env.require_class_method("java/nio/channels/ServerSocketChannel\0", "bind\0", "(Ljava/net/SocketAddress;I)Ljava/nio/channels/ServerSocketChannel;\0");
                __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr())
            }
        }

        /// [setOption](https://developer.android.com/reference/java/nio/channels/ServerSocketChannel.html#setOption(java.net.SocketOption,%20java.lang.Object))
        ///
        /// Required features: "java-lang-Object", "java-net-SocketOption", "java-nio-channels-ServerSocketChannel"
        #[cfg(any(feature = "all", all(feature = "java-lang-Object", feature = "java-net-SocketOption", feature = "java-nio-channels-ServerSocketChannel")))]
        pub fn setOption_SocketOption_Object<'env>(&'env self, arg0: impl __jni_bindgen::std::convert::Into<__jni_bindgen::std::option::Option<&'env crate::java::net::SocketOption>>, arg1: impl __jni_bindgen::std::convert::Into<__jni_bindgen::std::option::Option<&'env crate::java::lang::Object>>) -> __jni_bindgen::std::result::Result<__jni_bindgen::std::option::Option<__jni_bindgen::Local<'env, crate::java::nio::channels::ServerSocketChannel>>, __jni_bindgen::Local<'env, crate::java::lang::Throwable>> {
            // class.path == "java/nio/channels/ServerSocketChannel", java.flags == PUBLIC | ABSTRACT, .name == "setOption", .descriptor == "(Ljava/net/SocketOption;Ljava/lang/Object;)Ljava/nio/channels/ServerSocketChannel;"
            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("java/nio/channels/ServerSocketChannel\0", "setOption\0", "(Ljava/net/SocketOption;Ljava/lang/Object;)Ljava/nio/channels/ServerSocketChannel;\0");
                __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr())
            }
        }

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

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