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-nfc-tech-MifareClassic"))]
__jni_bindgen! {
    /// public final class [MifareClassic](https://developer.android.com/reference/android/nfc/tech/MifareClassic.html)
    ///
    /// Required feature: "android-nfc-tech-MifareClassic"
    public final class MifareClassic ("android/nfc/tech/MifareClassic") extends crate::android::nfc::tech::BasicTagTechnology {

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

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

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

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

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

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

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

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

        /// [authenticateSectorWithKeyA](https://developer.android.com/reference/android/nfc/tech/MifareClassic.html#authenticateSectorWithKeyA(int,%20byte%5B%5D))
        pub fn authenticateSectorWithKeyA<'env>(&'env self, arg0: i32, arg1: impl __jni_bindgen::std::convert::Into<__jni_bindgen::std::option::Option<&'env __jni_bindgen::ByteArray>>) -> __jni_bindgen::std::result::Result<bool, __jni_bindgen::Local<'env, crate::java::lang::Throwable>> {
            // class.path == "android/nfc/tech/MifareClassic", java.flags == PUBLIC, .name == "authenticateSectorWithKeyA", .descriptor == "(I[B)Z"
            unsafe {
                let __jni_args = [__jni_bindgen::AsJValue::as_jvalue(&arg0), __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("android/nfc/tech/MifareClassic\0", "authenticateSectorWithKeyA\0", "(I[B)Z\0");
                __jni_env.call_boolean_method_a(self.0.object, __jni_method, __jni_args.as_ptr())
            }
        }

        /// [authenticateSectorWithKeyB](https://developer.android.com/reference/android/nfc/tech/MifareClassic.html#authenticateSectorWithKeyB(int,%20byte%5B%5D))
        pub fn authenticateSectorWithKeyB<'env>(&'env self, arg0: i32, arg1: impl __jni_bindgen::std::convert::Into<__jni_bindgen::std::option::Option<&'env __jni_bindgen::ByteArray>>) -> __jni_bindgen::std::result::Result<bool, __jni_bindgen::Local<'env, crate::java::lang::Throwable>> {
            // class.path == "android/nfc/tech/MifareClassic", java.flags == PUBLIC, .name == "authenticateSectorWithKeyB", .descriptor == "(I[B)Z"
            unsafe {
                let __jni_args = [__jni_bindgen::AsJValue::as_jvalue(&arg0), __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("android/nfc/tech/MifareClassic\0", "authenticateSectorWithKeyB\0", "(I[B)Z\0");
                __jni_env.call_boolean_method_a(self.0.object, __jni_method, __jni_args.as_ptr())
            }
        }

        /// [readBlock](https://developer.android.com/reference/android/nfc/tech/MifareClassic.html#readBlock(int))
        pub fn readBlock<'env>(&'env self, arg0: i32) -> __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 == "android/nfc/tech/MifareClassic", java.flags == PUBLIC, .name == "readBlock", .descriptor == "(I)[B"
            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/nfc/tech/MifareClassic\0", "readBlock\0", "(I)[B\0");
                __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr())
            }
        }

        /// [writeBlock](https://developer.android.com/reference/android/nfc/tech/MifareClassic.html#writeBlock(int,%20byte%5B%5D))
        pub fn writeBlock<'env>(&'env self, arg0: i32, arg1: impl __jni_bindgen::std::convert::Into<__jni_bindgen::std::option::Option<&'env __jni_bindgen::ByteArray>>) -> __jni_bindgen::std::result::Result<(), __jni_bindgen::Local<'env, crate::java::lang::Throwable>> {
            // class.path == "android/nfc/tech/MifareClassic", java.flags == PUBLIC, .name == "writeBlock", .descriptor == "(I[B)V"
            unsafe {
                let __jni_args = [__jni_bindgen::AsJValue::as_jvalue(&arg0), __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("android/nfc/tech/MifareClassic\0", "writeBlock\0", "(I[B)V\0");
                __jni_env.call_void_method_a(self.0.object, __jni_method, __jni_args.as_ptr())
            }
        }

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

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

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

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

        /// [transceive](https://developer.android.com/reference/android/nfc/tech/MifareClassic.html#transceive(byte%5B%5D))
        pub fn transceive<'env>(&'env self, arg0: impl __jni_bindgen::std::convert::Into<__jni_bindgen::std::option::Option<&'env __jni_bindgen::ByteArray>>) -> __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 == "android/nfc/tech/MifareClassic", java.flags == PUBLIC, .name == "transceive", .descriptor == "([B)[B"
            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("android/nfc/tech/MifareClassic\0", "transceive\0", "([B)[B\0");
                __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr())
            }
        }

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

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

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

        /// public static final [BLOCK_SIZE](https://developer.android.com/reference/android/nfc/tech/MifareClassic.html#BLOCK_SIZE)
        pub const BLOCK_SIZE : i32 = 16;

        /// **get** public static final [KEY_DEFAULT](https://developer.android.com/reference/android/nfc/tech/MifareClassic.html#KEY_DEFAULT)
        pub fn KEY_DEFAULT<'env>(env: &'env __jni_bindgen::Env) -> __jni_bindgen::std::option::Option<__jni_bindgen::Local<'env, __jni_bindgen::ByteArray>> {
            unsafe {
                let (__jni_class, __jni_field) = env.require_class_static_field("android/nfc/tech/MifareClassic\0", "KEY_DEFAULT\0", "[B\0");
                env.get_static_object_field(__jni_class, __jni_field)
            }
        }

        /// **get** public static final [KEY_MIFARE_APPLICATION_DIRECTORY](https://developer.android.com/reference/android/nfc/tech/MifareClassic.html#KEY_MIFARE_APPLICATION_DIRECTORY)
        pub fn KEY_MIFARE_APPLICATION_DIRECTORY<'env>(env: &'env __jni_bindgen::Env) -> __jni_bindgen::std::option::Option<__jni_bindgen::Local<'env, __jni_bindgen::ByteArray>> {
            unsafe {
                let (__jni_class, __jni_field) = env.require_class_static_field("android/nfc/tech/MifareClassic\0", "KEY_MIFARE_APPLICATION_DIRECTORY\0", "[B\0");
                env.get_static_object_field(__jni_class, __jni_field)
            }
        }

        /// **get** public static final [KEY_NFC_FORUM](https://developer.android.com/reference/android/nfc/tech/MifareClassic.html#KEY_NFC_FORUM)
        pub fn KEY_NFC_FORUM<'env>(env: &'env __jni_bindgen::Env) -> __jni_bindgen::std::option::Option<__jni_bindgen::Local<'env, __jni_bindgen::ByteArray>> {
            unsafe {
                let (__jni_class, __jni_field) = env.require_class_static_field("android/nfc/tech/MifareClassic\0", "KEY_NFC_FORUM\0", "[B\0");
                env.get_static_object_field(__jni_class, __jni_field)
            }
        }

        /// public static final [SIZE_1K](https://developer.android.com/reference/android/nfc/tech/MifareClassic.html#SIZE_1K)
        pub const SIZE_1K : i32 = 1024;

        /// public static final [SIZE_2K](https://developer.android.com/reference/android/nfc/tech/MifareClassic.html#SIZE_2K)
        pub const SIZE_2K : i32 = 2048;

        /// public static final [SIZE_4K](https://developer.android.com/reference/android/nfc/tech/MifareClassic.html#SIZE_4K)
        pub const SIZE_4K : i32 = 4096;

        /// public static final [SIZE_MINI](https://developer.android.com/reference/android/nfc/tech/MifareClassic.html#SIZE_MINI)
        pub const SIZE_MINI : i32 = 320;

        /// public static final [TYPE_CLASSIC](https://developer.android.com/reference/android/nfc/tech/MifareClassic.html#TYPE_CLASSIC)
        pub const TYPE_CLASSIC : i32 = 0;

        /// public static final [TYPE_PLUS](https://developer.android.com/reference/android/nfc/tech/MifareClassic.html#TYPE_PLUS)
        pub const TYPE_PLUS : i32 = 1;

        /// public static final [TYPE_PRO](https://developer.android.com/reference/android/nfc/tech/MifareClassic.html#TYPE_PRO)
        pub const TYPE_PRO : i32 = 2;

        /// public static final [TYPE_UNKNOWN](https://developer.android.com/reference/android/nfc/tech/MifareClassic.html#TYPE_UNKNOWN)
        pub const TYPE_UNKNOWN : i32 = -1;
    }
}