1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
// WARNING:  This file was autogenerated by jni-bindgen.  Any changes to this file may be lost!!!


#[cfg(any(feature = "all", feature = "android-app-job-JobService"))]
__jni_bindgen! {
    /// public class [JobService](https://developer.android.com/reference/android/app/job/JobService.html)
    ///
    /// Required feature: android-app-job-JobService
    public class JobService ("android/app/job/JobService") extends crate::android::app::Service {

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

        /// [onBind](https://developer.android.com/reference/android/app/job/JobService.html#onBind(android.content.Intent))
        ///
        /// Required features: "android-content-Intent", "android-os-IBinder"
        #[cfg(any(feature = "all", all(feature = "android-content-Intent", feature = "android-os-IBinder")))]
        pub fn onBind<'env>(&'env self, arg0: impl __jni_bindgen::std::convert::Into<__jni_bindgen::std::option::Option<&'env crate::android::content::Intent>>) -> __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/JobService", java.flags == PUBLIC | FINAL, .name == "onBind", .descriptor == "(Landroid/content/Intent;)Landroid/os/IBinder;"
            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/JobService\0", "onBind\0", "(Landroid/content/Intent;)Landroid/os/IBinder;\0");
                __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr())
            }
        }

        /// [jobFinished](https://developer.android.com/reference/android/app/job/JobService.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/JobService", java.flags == PUBLIC | FINAL, .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/JobService\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())
            }
        }

        /// [onStartJob](https://developer.android.com/reference/android/app/job/JobService.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/JobService", 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/JobService\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/JobService.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/JobService", 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/JobService\0", "onStopJob\0", "(Landroid/app/job/JobParameters;)Z\0");
                __jni_env.call_boolean_method_a(self.0.object, __jni_method, __jni_args.as_ptr())
            }
        }

        /// public static final [PERMISSION_BIND](https://developer.android.com/reference/android/app/job/JobService.html#PERMISSION_BIND)
        pub const PERMISSION_BIND : &'static str = "android.permission.BIND_JOB_SERVICE";
    }
}