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

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

        /// [getBarcode](https://developer.android.com/reference/android/nfc/tech/NfcBarcode.html#getBarcode())
        pub fn getBarcode<'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 == "android/nfc/tech/NfcBarcode", java.flags == PUBLIC, .name == "getBarcode", .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("android/nfc/tech/NfcBarcode\0", "getBarcode\0", "()[B\0");
                __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr())
            }
        }

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

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

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

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

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

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