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

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

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

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

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

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

        /// public static final [RESULT_FAILURE](https://developer.android.com/reference/android/app/job/JobScheduler.html#RESULT_FAILURE)
        pub const RESULT_FAILURE : i32 = 0;

        /// public static final [RESULT_SUCCESS](https://developer.android.com/reference/android/app/job/JobScheduler.html#RESULT_SUCCESS)
        pub const RESULT_SUCCESS : i32 = 1;
    }
}