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

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

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

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

        /// [toString](https://developer.android.com/reference/android/net/IpSecManager.UdpEncapsulationSocket.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 == "android/net/IpSecManager$UdpEncapsulationSocket", 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("android/net/IpSecManager$UdpEncapsulationSocket\0", "toString\0", "()Ljava/lang/String;\0");
                __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr())
            }
        }
    }
}