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

        /// [ServerSocket](https://developer.android.com/reference/java/net/ServerSocket.html#ServerSocket())
        pub fn new<'env>(__jni_env: &'env __jni_bindgen::Env) -> __jni_bindgen::std::result::Result<__jni_bindgen::Local<'env, crate::java::net::ServerSocket>, __jni_bindgen::Local<'env, crate::java::lang::Throwable>> {
            // class.path == "java/net/ServerSocket", java.flags == PUBLIC, .name == "<init>", .descriptor == "()V"
            unsafe {
                let __jni_args = [];
                let (__jni_class, __jni_method) = __jni_env.require_class_method("java/net/ServerSocket\0", "<init>\0", "()V\0");
                __jni_env.new_object_a(__jni_class, __jni_method, __jni_args.as_ptr())
            }
        }

        /// [ServerSocket](https://developer.android.com/reference/java/net/ServerSocket.html#ServerSocket(int))
        pub fn new_int<'env>(__jni_env: &'env __jni_bindgen::Env, arg0: i32) -> __jni_bindgen::std::result::Result<__jni_bindgen::Local<'env, crate::java::net::ServerSocket>, __jni_bindgen::Local<'env, crate::java::lang::Throwable>> {
            // class.path == "java/net/ServerSocket", java.flags == PUBLIC, .name == "<init>", .descriptor == "(I)V"
            unsafe {
                let __jni_args = [__jni_bindgen::AsJValue::as_jvalue(&arg0)];
                let (__jni_class, __jni_method) = __jni_env.require_class_method("java/net/ServerSocket\0", "<init>\0", "(I)V\0");
                __jni_env.new_object_a(__jni_class, __jni_method, __jni_args.as_ptr())
            }
        }

        /// [ServerSocket](https://developer.android.com/reference/java/net/ServerSocket.html#ServerSocket(int,%20int))
        pub fn new_int_int<'env>(__jni_env: &'env __jni_bindgen::Env, arg0: i32, arg1: i32) -> __jni_bindgen::std::result::Result<__jni_bindgen::Local<'env, crate::java::net::ServerSocket>, __jni_bindgen::Local<'env, crate::java::lang::Throwable>> {
            // class.path == "java/net/ServerSocket", java.flags == PUBLIC, .name == "<init>", .descriptor == "(II)V"
            unsafe {
                let __jni_args = [__jni_bindgen::AsJValue::as_jvalue(&arg0), __jni_bindgen::AsJValue::as_jvalue(&arg1)];
                let (__jni_class, __jni_method) = __jni_env.require_class_method("java/net/ServerSocket\0", "<init>\0", "(II)V\0");
                __jni_env.new_object_a(__jni_class, __jni_method, __jni_args.as_ptr())
            }
        }

        /// [ServerSocket](https://developer.android.com/reference/java/net/ServerSocket.html#ServerSocket(int,%20int,%20java.net.InetAddress))
        ///
        /// Required features: "java-net-InetAddress"
        #[cfg(any(feature = "all", all(feature = "java-net-InetAddress")))]
        pub fn new_int_int_InetAddress<'env>(__jni_env: &'env __jni_bindgen::Env, arg0: i32, arg1: i32, arg2: impl __jni_bindgen::std::convert::Into<__jni_bindgen::std::option::Option<&'env crate::java::net::InetAddress>>) -> __jni_bindgen::std::result::Result<__jni_bindgen::Local<'env, crate::java::net::ServerSocket>, __jni_bindgen::Local<'env, crate::java::lang::Throwable>> {
            // class.path == "java/net/ServerSocket", java.flags == PUBLIC, .name == "<init>", .descriptor == "(IILjava/net/InetAddress;)V"
            unsafe {
                let __jni_args = [__jni_bindgen::AsJValue::as_jvalue(&arg0), __jni_bindgen::AsJValue::as_jvalue(&arg1), __jni_bindgen::AsJValue::as_jvalue(&arg2.into())];
                let (__jni_class, __jni_method) = __jni_env.require_class_method("java/net/ServerSocket\0", "<init>\0", "(IILjava/net/InetAddress;)V\0");
                __jni_env.new_object_a(__jni_class, __jni_method, __jni_args.as_ptr())
            }
        }

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

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

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

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

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

        /// [setSocketFactory](https://developer.android.com/reference/java/net/ServerSocket.html#setSocketFactory(java.net.SocketImplFactory))
        ///
        /// Required features: "java-net-SocketImplFactory"
        #[cfg(any(feature = "all", all(feature = "java-net-SocketImplFactory")))]
        pub fn setSocketFactory<'env>(__jni_env: &'env __jni_bindgen::Env, arg0: impl __jni_bindgen::std::convert::Into<__jni_bindgen::std::option::Option<&'env crate::java::net::SocketImplFactory>>) -> __jni_bindgen::std::result::Result<(), __jni_bindgen::Local<'env, crate::java::lang::Throwable>> {
            // class.path == "java/net/ServerSocket", java.flags == PUBLIC | STATIC | SYNCRONIZED, .name == "setSocketFactory", .descriptor == "(Ljava/net/SocketImplFactory;)V"
            unsafe {
                let __jni_args = [__jni_bindgen::AsJValue::as_jvalue(&arg0.into())];
                let (__jni_class, __jni_method) = __jni_env.require_class_static_method("java/net/ServerSocket\0", "setSocketFactory\0", "(Ljava/net/SocketImplFactory;)V\0");
                __jni_env.call_static_void_method_a(__jni_class, __jni_method, __jni_args.as_ptr())
            }
        }

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

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

        /// [bind](https://developer.android.com/reference/java/net/ServerSocket.html#bind(java.net.SocketAddress))
        ///
        /// Required features: "java-net-SocketAddress"
        #[cfg(any(feature = "all", all(feature = "java-net-SocketAddress")))]
        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::Local<'env, crate::java::lang::Throwable>> {
            // class.path == "java/net/ServerSocket", java.flags == PUBLIC, .name == "bind", .descriptor == "(Ljava/net/SocketAddress;)V"
            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/net/ServerSocket\0", "bind\0", "(Ljava/net/SocketAddress;)V\0");
                __jni_env.call_void_method_a(self.0.object, __jni_method, __jni_args.as_ptr())
            }
        }

        /// [bind](https://developer.android.com/reference/java/net/ServerSocket.html#bind(java.net.SocketAddress,%20int))
        ///
        /// Required features: "java-net-SocketAddress"
        #[cfg(any(feature = "all", all(feature = "java-net-SocketAddress")))]
        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::Local<'env, crate::java::lang::Throwable>> {
            // class.path == "java/net/ServerSocket", java.flags == PUBLIC, .name == "bind", .descriptor == "(Ljava/net/SocketAddress;I)V"
            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/net/ServerSocket\0", "bind\0", "(Ljava/net/SocketAddress;I)V\0");
                __jni_env.call_void_method_a(self.0.object, __jni_method, __jni_args.as_ptr())
            }
        }

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

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

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

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

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

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

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

        /// [getChannel](https://developer.android.com/reference/java/net/ServerSocket.html#getChannel())
        ///
        /// Required features: "java-nio-channels-ServerSocketChannel"
        #[cfg(any(feature = "all", all(feature = "java-nio-channels-ServerSocketChannel")))]
        pub fn getChannel<'env>(&'env self) -> __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/net/ServerSocket", java.flags == PUBLIC, .name == "getChannel", .descriptor == "()Ljava/nio/channels/ServerSocketChannel;"
            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/net/ServerSocket\0", "getChannel\0", "()Ljava/nio/channels/ServerSocketChannel;\0");
                __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr())
            }
        }

        /// [setPerformancePreferences](https://developer.android.com/reference/java/net/ServerSocket.html#setPerformancePreferences(int,%20int,%20int))
        pub fn setPerformancePreferences<'env>(&'env self, arg0: i32, arg1: i32, arg2: i32) -> __jni_bindgen::std::result::Result<(), __jni_bindgen::Local<'env, crate::java::lang::Throwable>> {
            // class.path == "java/net/ServerSocket", java.flags == PUBLIC, .name == "setPerformancePreferences", .descriptor == "(III)V"
            unsafe {
                let __jni_args = [__jni_bindgen::AsJValue::as_jvalue(&arg0), __jni_bindgen::AsJValue::as_jvalue(&arg1), __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("java/net/ServerSocket\0", "setPerformancePreferences\0", "(III)V\0");
                __jni_env.call_void_method_a(self.0.object, __jni_method, __jni_args.as_ptr())
            }
        }
    }
}