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

        /// [get](https://developer.android.com/reference/android/nfc/tech/Ndef.html#get(android.nfc.Tag))
        ///
        /// Required features: "android-nfc-Tag", "android-nfc-tech-Ndef"
        #[cfg(any(feature = "all", all(feature = "android-nfc-Tag", feature = "android-nfc-tech-Ndef")))]
        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::Ndef>>, __jni_bindgen::Local<'env, crate::java::lang::Throwable>> {
            // class.path == "android/nfc/tech/Ndef", java.flags == PUBLIC | STATIC, .name == "get", .descriptor == "(Landroid/nfc/Tag;)Landroid/nfc/tech/Ndef;"
            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/Ndef\0", "get\0", "(Landroid/nfc/Tag;)Landroid/nfc/tech/Ndef;\0");
                __jni_env.call_static_object_method_a(__jni_class, __jni_method, __jni_args.as_ptr())
            }
        }

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

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

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

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

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

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

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

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

        /// public static final [MIFARE_CLASSIC](https://developer.android.com/reference/android/nfc/tech/Ndef.html#MIFARE_CLASSIC)
        pub const MIFARE_CLASSIC : &'static str = "com.nxp.ndef.mifareclassic";

        /// public static final [NFC_FORUM_TYPE_1](https://developer.android.com/reference/android/nfc/tech/Ndef.html#NFC_FORUM_TYPE_1)
        pub const NFC_FORUM_TYPE_1 : &'static str = "org.nfcforum.ndef.type1";

        /// public static final [NFC_FORUM_TYPE_2](https://developer.android.com/reference/android/nfc/tech/Ndef.html#NFC_FORUM_TYPE_2)
        pub const NFC_FORUM_TYPE_2 : &'static str = "org.nfcforum.ndef.type2";

        /// public static final [NFC_FORUM_TYPE_3](https://developer.android.com/reference/android/nfc/tech/Ndef.html#NFC_FORUM_TYPE_3)
        pub const NFC_FORUM_TYPE_3 : &'static str = "org.nfcforum.ndef.type3";

        /// public static final [NFC_FORUM_TYPE_4](https://developer.android.com/reference/android/nfc/tech/Ndef.html#NFC_FORUM_TYPE_4)
        pub const NFC_FORUM_TYPE_4 : &'static str = "org.nfcforum.ndef.type4";
    }
}