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

        /// [JobServiceEngine](https://developer.android.com/reference/android/app/job/JobServiceEngine.html#JobServiceEngine(android.app.Service))
        ///
        /// Required features: "android-app-Service"
        #[cfg(any(feature = "all", all(feature = "android-app-Service")))]
        pub fn new<'env>(__jni_env: &'env __jni_bindgen::Env, arg0: impl __jni_bindgen::std::convert::Into<__jni_bindgen::std::option::Option<&'env crate::android::app::Service>>) -> __jni_bindgen::std::result::Result<__jni_bindgen::Local<'env, crate::android::app::job::JobServiceEngine>, __jni_bindgen::Local<'env, crate::java::lang::Throwable>> {
            // class.path == "android/app/job/JobServiceEngine", java.flags == PUBLIC, .name == "<init>", .descriptor == "(Landroid/app/Service;)V"
            unsafe {
                let __jni_args = [__jni_bindgen::AsJValue::as_jvalue(&arg0.into())];
                let (__jni_class, __jni_method) = __jni_env.require_class_method("android/app/job/JobServiceEngine\0", "<init>\0", "(Landroid/app/Service;)V\0");
                __jni_env.new_object_a(__jni_class, __jni_method, __jni_args.as_ptr())
            }
        }

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

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

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

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