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

        /// [getName](https://developer.android.com/reference/javax/crypto/ExemptionMechanism.html#getName())
        ///
        /// Required features: "java-lang-String"
        #[cfg(any(feature = "all", all(feature = "java-lang-String")))]
        pub fn getName<'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 == "javax/crypto/ExemptionMechanism", java.flags == PUBLIC | FINAL, .name == "getName", .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("javax/crypto/ExemptionMechanism\0", "getName\0", "()Ljava/lang/String;\0");
                __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr())
            }
        }

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

        /// [getInstance](https://developer.android.com/reference/javax/crypto/ExemptionMechanism.html#getInstance(java.lang.String,%20java.lang.String))
        ///
        /// Required features: "java-lang-String", "javax-crypto-ExemptionMechanism"
        #[cfg(any(feature = "all", all(feature = "java-lang-String", feature = "javax-crypto-ExemptionMechanism")))]
        pub fn getInstance_String_String<'env>(__jni_env: &'env __jni_bindgen::Env, arg0: impl __jni_bindgen::std::convert::Into<__jni_bindgen::std::option::Option<&'env crate::java::lang::String>>, arg1: impl __jni_bindgen::std::convert::Into<__jni_bindgen::std::option::Option<&'env crate::java::lang::String>>) -> __jni_bindgen::std::result::Result<__jni_bindgen::std::option::Option<__jni_bindgen::Local<'env, crate::javax::crypto::ExemptionMechanism>>, __jni_bindgen::Local<'env, crate::java::lang::Throwable>> {
            // class.path == "javax/crypto/ExemptionMechanism", java.flags == PUBLIC | STATIC | FINAL, .name == "getInstance", .descriptor == "(Ljava/lang/String;Ljava/lang/String;)Ljavax/crypto/ExemptionMechanism;"
            unsafe {
                let __jni_args = [__jni_bindgen::AsJValue::as_jvalue(&arg0.into()), __jni_bindgen::AsJValue::as_jvalue(&arg1.into())];
                let (__jni_class, __jni_method) = __jni_env.require_class_static_method("javax/crypto/ExemptionMechanism\0", "getInstance\0", "(Ljava/lang/String;Ljava/lang/String;)Ljavax/crypto/ExemptionMechanism;\0");
                __jni_env.call_static_object_method_a(__jni_class, __jni_method, __jni_args.as_ptr())
            }
        }

        /// [getInstance](https://developer.android.com/reference/javax/crypto/ExemptionMechanism.html#getInstance(java.lang.String,%20java.security.Provider))
        ///
        /// Required features: "java-lang-String", "java-security-Provider", "javax-crypto-ExemptionMechanism"
        #[cfg(any(feature = "all", all(feature = "java-lang-String", feature = "java-security-Provider", feature = "javax-crypto-ExemptionMechanism")))]
        pub fn getInstance_String_Provider<'env>(__jni_env: &'env __jni_bindgen::Env, arg0: impl __jni_bindgen::std::convert::Into<__jni_bindgen::std::option::Option<&'env crate::java::lang::String>>, arg1: impl __jni_bindgen::std::convert::Into<__jni_bindgen::std::option::Option<&'env crate::java::security::Provider>>) -> __jni_bindgen::std::result::Result<__jni_bindgen::std::option::Option<__jni_bindgen::Local<'env, crate::javax::crypto::ExemptionMechanism>>, __jni_bindgen::Local<'env, crate::java::lang::Throwable>> {
            // class.path == "javax/crypto/ExemptionMechanism", java.flags == PUBLIC | STATIC | FINAL, .name == "getInstance", .descriptor == "(Ljava/lang/String;Ljava/security/Provider;)Ljavax/crypto/ExemptionMechanism;"
            unsafe {
                let __jni_args = [__jni_bindgen::AsJValue::as_jvalue(&arg0.into()), __jni_bindgen::AsJValue::as_jvalue(&arg1.into())];
                let (__jni_class, __jni_method) = __jni_env.require_class_static_method("javax/crypto/ExemptionMechanism\0", "getInstance\0", "(Ljava/lang/String;Ljava/security/Provider;)Ljavax/crypto/ExemptionMechanism;\0");
                __jni_env.call_static_object_method_a(__jni_class, __jni_method, __jni_args.as_ptr())
            }
        }

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

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

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

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

        /// [init](https://developer.android.com/reference/javax/crypto/ExemptionMechanism.html#init(java.security.Key,%20java.security.spec.AlgorithmParameterSpec))
        ///
        /// Required features: "java-security-Key", "java-security-spec-AlgorithmParameterSpec"
        #[cfg(any(feature = "all", all(feature = "java-security-Key", feature = "java-security-spec-AlgorithmParameterSpec")))]
        pub fn init_Key_AlgorithmParameterSpec<'env>(&'env self, arg0: impl __jni_bindgen::std::convert::Into<__jni_bindgen::std::option::Option<&'env crate::java::security::Key>>, arg1: impl __jni_bindgen::std::convert::Into<__jni_bindgen::std::option::Option<&'env crate::java::security::spec::AlgorithmParameterSpec>>) -> __jni_bindgen::std::result::Result<(), __jni_bindgen::Local<'env, crate::java::lang::Throwable>> {
            // class.path == "javax/crypto/ExemptionMechanism", java.flags == PUBLIC | FINAL, .name == "init", .descriptor == "(Ljava/security/Key;Ljava/security/spec/AlgorithmParameterSpec;)V"
            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("javax/crypto/ExemptionMechanism\0", "init\0", "(Ljava/security/Key;Ljava/security/spec/AlgorithmParameterSpec;)V\0");
                __jni_env.call_void_method_a(self.0.object, __jni_method, __jni_args.as_ptr())
            }
        }

        /// [init](https://developer.android.com/reference/javax/crypto/ExemptionMechanism.html#init(java.security.Key,%20java.security.AlgorithmParameters))
        ///
        /// Required features: "java-security-AlgorithmParameters", "java-security-Key"
        #[cfg(any(feature = "all", all(feature = "java-security-AlgorithmParameters", feature = "java-security-Key")))]
        pub fn init_Key_AlgorithmParameters<'env>(&'env self, arg0: impl __jni_bindgen::std::convert::Into<__jni_bindgen::std::option::Option<&'env crate::java::security::Key>>, arg1: impl __jni_bindgen::std::convert::Into<__jni_bindgen::std::option::Option<&'env crate::java::security::AlgorithmParameters>>) -> __jni_bindgen::std::result::Result<(), __jni_bindgen::Local<'env, crate::java::lang::Throwable>> {
            // class.path == "javax/crypto/ExemptionMechanism", java.flags == PUBLIC | FINAL, .name == "init", .descriptor == "(Ljava/security/Key;Ljava/security/AlgorithmParameters;)V"
            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("javax/crypto/ExemptionMechanism\0", "init\0", "(Ljava/security/Key;Ljava/security/AlgorithmParameters;)V\0");
                __jni_env.call_void_method_a(self.0.object, __jni_method, __jni_args.as_ptr())
            }
        }

        /// [genExemptionBlob](https://developer.android.com/reference/javax/crypto/ExemptionMechanism.html#genExemptionBlob())
        pub fn genExemptionBlob<'env>(&'env self) -> __jni_bindgen::std::result::Result<__jni_bindgen::std::option::Option<__jni_bindgen::Local<'env, __jni_bindgen::ByteArray>>, __jni_bindgen::Local<'env, crate::java::lang::Throwable>> {
            // class.path == "javax/crypto/ExemptionMechanism", java.flags == PUBLIC | FINAL, .name == "genExemptionBlob", .descriptor == "()[B"
            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("javax/crypto/ExemptionMechanism\0", "genExemptionBlob\0", "()[B\0");
                __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr())
            }
        }

        /// [genExemptionBlob](https://developer.android.com/reference/javax/crypto/ExemptionMechanism.html#genExemptionBlob(byte%5B%5D))
        pub fn genExemptionBlob_byte_array<'env>(&'env self, arg0: impl __jni_bindgen::std::convert::Into<__jni_bindgen::std::option::Option<&'env __jni_bindgen::ByteArray>>) -> __jni_bindgen::std::result::Result<i32, __jni_bindgen::Local<'env, crate::java::lang::Throwable>> {
            // class.path == "javax/crypto/ExemptionMechanism", java.flags == PUBLIC | FINAL, .name == "genExemptionBlob", .descriptor == "([B)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("javax/crypto/ExemptionMechanism\0", "genExemptionBlob\0", "([B)I\0");
                __jni_env.call_int_method_a(self.0.object, __jni_method, __jni_args.as_ptr())
            }
        }

        /// [genExemptionBlob](https://developer.android.com/reference/javax/crypto/ExemptionMechanism.html#genExemptionBlob(byte%5B%5D,%20int))
        pub fn genExemptionBlob_byte_array_int<'env>(&'env self, arg0: impl __jni_bindgen::std::convert::Into<__jni_bindgen::std::option::Option<&'env __jni_bindgen::ByteArray>>, arg1: i32) -> __jni_bindgen::std::result::Result<i32, __jni_bindgen::Local<'env, crate::java::lang::Throwable>> {
            // class.path == "javax/crypto/ExemptionMechanism", java.flags == PUBLIC | FINAL, .name == "genExemptionBlob", .descriptor == "([BI)I"
            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("javax/crypto/ExemptionMechanism\0", "genExemptionBlob\0", "([BI)I\0");
                __jni_env.call_int_method_a(self.0.object, __jni_method, __jni_args.as_ptr())
            }
        }
    }
}