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

        /// [ScanCallback](https://developer.android.com/reference/android/bluetooth/le/ScanCallback.html#ScanCallback())
        pub fn new<'env>(__jni_env: &'env __jni_bindgen::Env) -> __jni_bindgen::std::result::Result<__jni_bindgen::Local<'env, crate::android::bluetooth::le::ScanCallback>, __jni_bindgen::Local<'env, crate::java::lang::Throwable>> {
            // class.path == "android/bluetooth/le/ScanCallback", java.flags == PUBLIC, .name == "<init>", .descriptor == "()V"
            unsafe {
                let __jni_args = [];
                let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/le/ScanCallback\0", "<init>\0", "()V\0");
                __jni_env.new_object_a(__jni_class, __jni_method, __jni_args.as_ptr())
            }
        }

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

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

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

        /// public static final [SCAN_FAILED_ALREADY_STARTED](https://developer.android.com/reference/android/bluetooth/le/ScanCallback.html#SCAN_FAILED_ALREADY_STARTED)
        pub const SCAN_FAILED_ALREADY_STARTED : i32 = 1;

        /// public static final [SCAN_FAILED_APPLICATION_REGISTRATION_FAILED](https://developer.android.com/reference/android/bluetooth/le/ScanCallback.html#SCAN_FAILED_APPLICATION_REGISTRATION_FAILED)
        pub const SCAN_FAILED_APPLICATION_REGISTRATION_FAILED : i32 = 2;

        /// public static final [SCAN_FAILED_FEATURE_UNSUPPORTED](https://developer.android.com/reference/android/bluetooth/le/ScanCallback.html#SCAN_FAILED_FEATURE_UNSUPPORTED)
        pub const SCAN_FAILED_FEATURE_UNSUPPORTED : i32 = 4;

        /// public static final [SCAN_FAILED_INTERNAL_ERROR](https://developer.android.com/reference/android/bluetooth/le/ScanCallback.html#SCAN_FAILED_INTERNAL_ERROR)
        pub const SCAN_FAILED_INTERNAL_ERROR : i32 = 3;
    }
}