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

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

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

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

        /// [setNdefPushMessage](https://developer.android.com/reference/android/nfc/NfcAdapter.html#setNdefPushMessage(android.nfc.NdefMessage,%20android.app.Activity,%20android.app.Activity...))
        ///
        /// Required features: "android-app-Activity", "android-nfc-NdefMessage"
        #[cfg(any(feature = "all", all(feature = "android-app-Activity", feature = "android-nfc-NdefMessage")))]
        pub fn setNdefPushMessage<'env>(&'env self, arg0: impl __jni_bindgen::std::convert::Into<__jni_bindgen::std::option::Option<&'env crate::android::nfc::NdefMessage>>, arg1: impl __jni_bindgen::std::convert::Into<__jni_bindgen::std::option::Option<&'env crate::android::app::Activity>>, arg2: impl __jni_bindgen::std::convert::Into<__jni_bindgen::std::option::Option<&'env __jni_bindgen::ObjectArray<crate::android::app::Activity, crate::java::lang::Throwable>>>) -> __jni_bindgen::std::result::Result<(), __jni_bindgen::Local<'env, crate::java::lang::Throwable>> {
            // class.path == "android/nfc/NfcAdapter", java.flags == PUBLIC | VARARGS, .name == "setNdefPushMessage", .descriptor == "(Landroid/nfc/NdefMessage;Landroid/app/Activity;[Landroid/app/Activity;)V"
            unsafe {
                let __jni_args = [__jni_bindgen::AsJValue::as_jvalue(&arg0.into()), __jni_bindgen::AsJValue::as_jvalue(&arg1.into()), __jni_bindgen::AsJValue::as_jvalue(&arg2.into())];
                let __jni_env = __jni_bindgen::Env::from_ptr(self.0.env);
                let (__jni_class, __jni_method) = __jni_env.require_class_method("android/nfc/NfcAdapter\0", "setNdefPushMessage\0", "(Landroid/nfc/NdefMessage;Landroid/app/Activity;[Landroid/app/Activity;)V\0");
                __jni_env.call_void_method_a(self.0.object, __jni_method, __jni_args.as_ptr())
            }
        }

        /// [setNdefPushMessageCallback](https://developer.android.com/reference/android/nfc/NfcAdapter.html#setNdefPushMessageCallback(android.nfc.NfcAdapter.CreateNdefMessageCallback,%20android.app.Activity,%20android.app.Activity...))
        ///
        /// Required features: "android-app-Activity", "android-nfc-NfcAdapter_CreateNdefMessageCallback"
        #[cfg(any(feature = "all", all(feature = "android-app-Activity", feature = "android-nfc-NfcAdapter_CreateNdefMessageCallback")))]
        pub fn setNdefPushMessageCallback<'env>(&'env self, arg0: impl __jni_bindgen::std::convert::Into<__jni_bindgen::std::option::Option<&'env crate::android::nfc::NfcAdapter_CreateNdefMessageCallback>>, arg1: impl __jni_bindgen::std::convert::Into<__jni_bindgen::std::option::Option<&'env crate::android::app::Activity>>, arg2: impl __jni_bindgen::std::convert::Into<__jni_bindgen::std::option::Option<&'env __jni_bindgen::ObjectArray<crate::android::app::Activity, crate::java::lang::Throwable>>>) -> __jni_bindgen::std::result::Result<(), __jni_bindgen::Local<'env, crate::java::lang::Throwable>> {
            // class.path == "android/nfc/NfcAdapter", java.flags == PUBLIC | VARARGS, .name == "setNdefPushMessageCallback", .descriptor == "(Landroid/nfc/NfcAdapter$CreateNdefMessageCallback;Landroid/app/Activity;[Landroid/app/Activity;)V"
            unsafe {
                let __jni_args = [__jni_bindgen::AsJValue::as_jvalue(&arg0.into()), __jni_bindgen::AsJValue::as_jvalue(&arg1.into()), __jni_bindgen::AsJValue::as_jvalue(&arg2.into())];
                let __jni_env = __jni_bindgen::Env::from_ptr(self.0.env);
                let (__jni_class, __jni_method) = __jni_env.require_class_method("android/nfc/NfcAdapter\0", "setNdefPushMessageCallback\0", "(Landroid/nfc/NfcAdapter$CreateNdefMessageCallback;Landroid/app/Activity;[Landroid/app/Activity;)V\0");
                __jni_env.call_void_method_a(self.0.object, __jni_method, __jni_args.as_ptr())
            }
        }

        /// [setOnNdefPushCompleteCallback](https://developer.android.com/reference/android/nfc/NfcAdapter.html#setOnNdefPushCompleteCallback(android.nfc.NfcAdapter.OnNdefPushCompleteCallback,%20android.app.Activity,%20android.app.Activity...))
        ///
        /// Required features: "android-app-Activity", "android-nfc-NfcAdapter_OnNdefPushCompleteCallback"
        #[cfg(any(feature = "all", all(feature = "android-app-Activity", feature = "android-nfc-NfcAdapter_OnNdefPushCompleteCallback")))]
        pub fn setOnNdefPushCompleteCallback<'env>(&'env self, arg0: impl __jni_bindgen::std::convert::Into<__jni_bindgen::std::option::Option<&'env crate::android::nfc::NfcAdapter_OnNdefPushCompleteCallback>>, arg1: impl __jni_bindgen::std::convert::Into<__jni_bindgen::std::option::Option<&'env crate::android::app::Activity>>, arg2: impl __jni_bindgen::std::convert::Into<__jni_bindgen::std::option::Option<&'env __jni_bindgen::ObjectArray<crate::android::app::Activity, crate::java::lang::Throwable>>>) -> __jni_bindgen::std::result::Result<(), __jni_bindgen::Local<'env, crate::java::lang::Throwable>> {
            // class.path == "android/nfc/NfcAdapter", java.flags == PUBLIC | VARARGS, .name == "setOnNdefPushCompleteCallback", .descriptor == "(Landroid/nfc/NfcAdapter$OnNdefPushCompleteCallback;Landroid/app/Activity;[Landroid/app/Activity;)V"
            unsafe {
                let __jni_args = [__jni_bindgen::AsJValue::as_jvalue(&arg0.into()), __jni_bindgen::AsJValue::as_jvalue(&arg1.into()), __jni_bindgen::AsJValue::as_jvalue(&arg2.into())];
                let __jni_env = __jni_bindgen::Env::from_ptr(self.0.env);
                let (__jni_class, __jni_method) = __jni_env.require_class_method("android/nfc/NfcAdapter\0", "setOnNdefPushCompleteCallback\0", "(Landroid/nfc/NfcAdapter$OnNdefPushCompleteCallback;Landroid/app/Activity;[Landroid/app/Activity;)V\0");
                __jni_env.call_void_method_a(self.0.object, __jni_method, __jni_args.as_ptr())
            }
        }

        /// [enableForegroundDispatch](https://developer.android.com/reference/android/nfc/NfcAdapter.html#enableForegroundDispatch(android.app.Activity,%20android.app.PendingIntent,%20android.content.IntentFilter%5B%5D,%20java.lang.String%5B%5D%5B%5D))
        ///
        /// Required features: "android-app-Activity", "android-app-PendingIntent", "android-content-IntentFilter", "java-lang-String"
        #[cfg(any(feature = "all", all(feature = "android-app-Activity", feature = "android-app-PendingIntent", feature = "android-content-IntentFilter", feature = "java-lang-String")))]
        pub fn enableForegroundDispatch<'env>(&'env self, arg0: impl __jni_bindgen::std::convert::Into<__jni_bindgen::std::option::Option<&'env crate::android::app::Activity>>, arg1: impl __jni_bindgen::std::convert::Into<__jni_bindgen::std::option::Option<&'env crate::android::app::PendingIntent>>, arg2: impl __jni_bindgen::std::convert::Into<__jni_bindgen::std::option::Option<&'env __jni_bindgen::ObjectArray<crate::android::content::IntentFilter, crate::java::lang::Throwable>>>, arg3: impl __jni_bindgen::std::convert::Into<__jni_bindgen::std::option::Option<&'env __jni_bindgen::ObjectArray<__jni_bindgen::ObjectArray<crate::java::lang::String, crate::java::lang::Throwable>, crate::java::lang::Throwable>>>) -> __jni_bindgen::std::result::Result<(), __jni_bindgen::Local<'env, crate::java::lang::Throwable>> {
            // class.path == "android/nfc/NfcAdapter", java.flags == PUBLIC, .name == "enableForegroundDispatch", .descriptor == "(Landroid/app/Activity;Landroid/app/PendingIntent;[Landroid/content/IntentFilter;[[Ljava/lang/String;)V"
            unsafe {
                let __jni_args = [__jni_bindgen::AsJValue::as_jvalue(&arg0.into()), __jni_bindgen::AsJValue::as_jvalue(&arg1.into()), __jni_bindgen::AsJValue::as_jvalue(&arg2.into()), __jni_bindgen::AsJValue::as_jvalue(&arg3.into())];
                let __jni_env = __jni_bindgen::Env::from_ptr(self.0.env);
                let (__jni_class, __jni_method) = __jni_env.require_class_method("android/nfc/NfcAdapter\0", "enableForegroundDispatch\0", "(Landroid/app/Activity;Landroid/app/PendingIntent;[Landroid/content/IntentFilter;[[Ljava/lang/String;)V\0");
                __jni_env.call_void_method_a(self.0.object, __jni_method, __jni_args.as_ptr())
            }
        }

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

        /// [enableForegroundNdefPush](https://developer.android.com/reference/android/nfc/NfcAdapter.html#enableForegroundNdefPush(android.app.Activity,%20android.nfc.NdefMessage))
        ///
        /// Required features: "android-app-Activity", "android-nfc-NdefMessage"
        #[cfg(any(feature = "all", all(feature = "android-app-Activity", feature = "android-nfc-NdefMessage")))]
        #[deprecated] pub fn enableForegroundNdefPush<'env>(&'env self, arg0: impl __jni_bindgen::std::convert::Into<__jni_bindgen::std::option::Option<&'env crate::android::app::Activity>>, arg1: 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/NfcAdapter", java.flags == PUBLIC, .name == "enableForegroundNdefPush", .descriptor == "(Landroid/app/Activity;Landroid/nfc/NdefMessage;)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("android/nfc/NfcAdapter\0", "enableForegroundNdefPush\0", "(Landroid/app/Activity;Landroid/nfc/NdefMessage;)V\0");
                __jni_env.call_void_method_a(self.0.object, __jni_method, __jni_args.as_ptr())
            }
        }

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

        /// public static final [ACTION_NDEF_DISCOVERED](https://developer.android.com/reference/android/nfc/NfcAdapter.html#ACTION_NDEF_DISCOVERED)
        pub const ACTION_NDEF_DISCOVERED : &'static str = "android.nfc.action.NDEF_DISCOVERED";

        /// public static final [ACTION_TECH_DISCOVERED](https://developer.android.com/reference/android/nfc/NfcAdapter.html#ACTION_TECH_DISCOVERED)
        pub const ACTION_TECH_DISCOVERED : &'static str = "android.nfc.action.TECH_DISCOVERED";

        /// public static final [ACTION_TAG_DISCOVERED](https://developer.android.com/reference/android/nfc/NfcAdapter.html#ACTION_TAG_DISCOVERED)
        pub const ACTION_TAG_DISCOVERED : &'static str = "android.nfc.action.TAG_DISCOVERED";

        /// public static final [EXTRA_TAG](https://developer.android.com/reference/android/nfc/NfcAdapter.html#EXTRA_TAG)
        pub const EXTRA_TAG : &'static str = "android.nfc.extra.TAG";

        /// public static final [EXTRA_NDEF_MESSAGES](https://developer.android.com/reference/android/nfc/NfcAdapter.html#EXTRA_NDEF_MESSAGES)
        pub const EXTRA_NDEF_MESSAGES : &'static str = "android.nfc.extra.NDEF_MESSAGES";

        /// public static final [EXTRA_ID](https://developer.android.com/reference/android/nfc/NfcAdapter.html#EXTRA_ID)
        pub const EXTRA_ID : &'static str = "android.nfc.extra.ID";
    }
}