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

        /// [TokenWatcher](https://developer.android.com/reference/android/os/TokenWatcher.html#TokenWatcher(android.os.Handler,%20java.lang.String))
        ///
        /// Required features: "android-os-Handler", "java-lang-String"
        #[cfg(any(feature = "all", all(feature = "android-os-Handler", feature = "java-lang-String")))]
        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::os::Handler>>, arg1: impl __jni_bindgen::std::convert::Into<__jni_bindgen::std::option::Option<&'env crate::java::lang::String>>) -> __jni_bindgen::std::result::Result<__jni_bindgen::Local<'env, crate::android::os::TokenWatcher>, __jni_bindgen::Local<'env, crate::java::lang::Throwable>> {
            // class.path == "android/os/TokenWatcher", java.flags == PUBLIC, .name == "<init>", .descriptor == "(Landroid/os/Handler;Ljava/lang/String;)V"
            unsafe {
                let __jni_args = [__jni_bindgen::AsJValue::as_jvalue(&arg0.into()), __jni_bindgen::AsJValue::as_jvalue(&arg1.into())];
                let (__jni_class, __jni_method) = __jni_env.require_class_method("android/os/TokenWatcher\0", "<init>\0", "(Landroid/os/Handler;Ljava/lang/String;)V\0");
                __jni_env.new_object_a(__jni_class, __jni_method, __jni_args.as_ptr())
            }
        }

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

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

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

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

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

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

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