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

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

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

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

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

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

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