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

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

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

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

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

        /// [vibrate](https://developer.android.com/reference/android/os/Vibrator.html#vibrate(long%5B%5D,%20int,%20android.media.AudioAttributes))
        ///
        /// Required features: "android-media-AudioAttributes"
        #[cfg(any(feature = "all", all(feature = "android-media-AudioAttributes")))]
        pub fn vibrate_long_array_int_AudioAttributes<'env>(&'env self, arg0: impl __jni_bindgen::std::convert::Into<__jni_bindgen::std::option::Option<&'env __jni_bindgen::LongArray>>, arg1: i32, arg2: impl __jni_bindgen::std::convert::Into<__jni_bindgen::std::option::Option<&'env crate::android::media::AudioAttributes>>) -> __jni_bindgen::std::result::Result<(), __jni_bindgen::Local<'env, crate::java::lang::Throwable>> {
            // class.path == "android/os/Vibrator", java.flags == PUBLIC, .name == "vibrate", .descriptor == "([JILandroid/media/AudioAttributes;)V"
            unsafe {
                let __jni_args = [__jni_bindgen::AsJValue::as_jvalue(&arg0.into()), __jni_bindgen::AsJValue::as_jvalue(&arg1), __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/os/Vibrator\0", "vibrate\0", "([JILandroid/media/AudioAttributes;)V\0");
                __jni_env.call_void_method_a(self.0.object, __jni_method, __jni_args.as_ptr())
            }
        }

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