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

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

        /// [getCallingPid](https://developer.android.com/reference/android/os/Binder.html#getCallingPid())
        pub fn getCallingPid<'env>(__jni_env: &'env __jni_bindgen::Env) -> __jni_bindgen::std::result::Result<i32, __jni_bindgen::Local<'env, crate::java::lang::Throwable>> {
            // class.path == "android/os/Binder", java.flags == PUBLIC | STATIC | FINAL | NATIVE, .name == "getCallingPid", .descriptor == "()I"
            unsafe {
                let __jni_args = [];
                let (__jni_class, __jni_method) = __jni_env.require_class_static_method("android/os/Binder\0", "getCallingPid\0", "()I\0");
                __jni_env.call_static_int_method_a(__jni_class, __jni_method, __jni_args.as_ptr())
            }
        }

        /// [getCallingUid](https://developer.android.com/reference/android/os/Binder.html#getCallingUid())
        pub fn getCallingUid<'env>(__jni_env: &'env __jni_bindgen::Env) -> __jni_bindgen::std::result::Result<i32, __jni_bindgen::Local<'env, crate::java::lang::Throwable>> {
            // class.path == "android/os/Binder", java.flags == PUBLIC | STATIC | FINAL | NATIVE, .name == "getCallingUid", .descriptor == "()I"
            unsafe {
                let __jni_args = [];
                let (__jni_class, __jni_method) = __jni_env.require_class_static_method("android/os/Binder\0", "getCallingUid\0", "()I\0");
                __jni_env.call_static_int_method_a(__jni_class, __jni_method, __jni_args.as_ptr())
            }
        }

        /// [clearCallingIdentity](https://developer.android.com/reference/android/os/Binder.html#clearCallingIdentity())
        pub fn clearCallingIdentity<'env>(__jni_env: &'env __jni_bindgen::Env) -> __jni_bindgen::std::result::Result<i64, __jni_bindgen::Local<'env, crate::java::lang::Throwable>> {
            // class.path == "android/os/Binder", java.flags == PUBLIC | STATIC | FINAL | NATIVE, .name == "clearCallingIdentity", .descriptor == "()J"
            unsafe {
                let __jni_args = [];
                let (__jni_class, __jni_method) = __jni_env.require_class_static_method("android/os/Binder\0", "clearCallingIdentity\0", "()J\0");
                __jni_env.call_static_long_method_a(__jni_class, __jni_method, __jni_args.as_ptr())
            }
        }

        /// [restoreCallingIdentity](https://developer.android.com/reference/android/os/Binder.html#restoreCallingIdentity(long))
        pub fn restoreCallingIdentity<'env>(__jni_env: &'env __jni_bindgen::Env, arg0: i64) -> __jni_bindgen::std::result::Result<(), __jni_bindgen::Local<'env, crate::java::lang::Throwable>> {
            // class.path == "android/os/Binder", java.flags == PUBLIC | STATIC | FINAL | NATIVE, .name == "restoreCallingIdentity", .descriptor == "(J)V"
            unsafe {
                let __jni_args = [__jni_bindgen::AsJValue::as_jvalue(&arg0)];
                let (__jni_class, __jni_method) = __jni_env.require_class_static_method("android/os/Binder\0", "restoreCallingIdentity\0", "(J)V\0");
                __jni_env.call_static_void_method_a(__jni_class, __jni_method, __jni_args.as_ptr())
            }
        }

        /// [flushPendingCommands](https://developer.android.com/reference/android/os/Binder.html#flushPendingCommands())
        pub fn flushPendingCommands<'env>(__jni_env: &'env __jni_bindgen::Env) -> __jni_bindgen::std::result::Result<(), __jni_bindgen::Local<'env, crate::java::lang::Throwable>> {
            // class.path == "android/os/Binder", java.flags == PUBLIC | STATIC | FINAL | NATIVE, .name == "flushPendingCommands", .descriptor == "()V"
            unsafe {
                let __jni_args = [];
                let (__jni_class, __jni_method) = __jni_env.require_class_static_method("android/os/Binder\0", "flushPendingCommands\0", "()V\0");
                __jni_env.call_static_void_method_a(__jni_class, __jni_method, __jni_args.as_ptr())
            }
        }

        /// [joinThreadPool](https://developer.android.com/reference/android/os/Binder.html#joinThreadPool())
        pub fn joinThreadPool<'env>(__jni_env: &'env __jni_bindgen::Env) -> __jni_bindgen::std::result::Result<(), __jni_bindgen::Local<'env, crate::java::lang::Throwable>> {
            // class.path == "android/os/Binder", java.flags == PUBLIC | STATIC | FINAL | NATIVE, .name == "joinThreadPool", .descriptor == "()V"
            unsafe {
                let __jni_args = [];
                let (__jni_class, __jni_method) = __jni_env.require_class_static_method("android/os/Binder\0", "joinThreadPool\0", "()V\0");
                __jni_env.call_static_void_method_a(__jni_class, __jni_method, __jni_args.as_ptr())
            }
        }

        /// [attachInterface](https://developer.android.com/reference/android/os/Binder.html#attachInterface(android.os.IInterface,%20java.lang.String))
        ///
        /// Required features: "android-os-IInterface", "java-lang-String"
        #[cfg(any(feature = "all", all(feature = "android-os-IInterface", feature = "java-lang-String")))]
        pub fn attachInterface<'env>(&'env self, arg0: impl __jni_bindgen::std::convert::Into<__jni_bindgen::std::option::Option<&'env crate::android::os::IInterface>>, 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/Binder", java.flags == PUBLIC, .name == "attachInterface", .descriptor == "(Landroid/os/IInterface;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/Binder\0", "attachInterface\0", "(Landroid/os/IInterface;Ljava/lang/String;)V\0");
                __jni_env.call_void_method_a(self.0.object, __jni_method, __jni_args.as_ptr())
            }
        }

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

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

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

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

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

        /// [transact](https://developer.android.com/reference/android/os/Binder.html#transact(int,%20android.os.Parcel,%20android.os.Parcel,%20int))
        ///
        /// Required features: "android-os-Parcel"
        #[cfg(any(feature = "all", all(feature = "android-os-Parcel")))]
        pub fn transact<'env>(&'env self, arg0: i32, arg1: impl __jni_bindgen::std::convert::Into<__jni_bindgen::std::option::Option<&'env crate::android::os::Parcel>>, arg2: impl __jni_bindgen::std::convert::Into<__jni_bindgen::std::option::Option<&'env crate::android::os::Parcel>>, arg3: i32) -> __jni_bindgen::std::result::Result<bool, __jni_bindgen::Local<'env, crate::java::lang::Throwable>> {
            // class.path == "android/os/Binder", java.flags == PUBLIC | FINAL, .name == "transact", .descriptor == "(ILandroid/os/Parcel;Landroid/os/Parcel;I)Z"
            unsafe {
                let __jni_args = [__jni_bindgen::AsJValue::as_jvalue(&arg0), __jni_bindgen::AsJValue::as_jvalue(&arg1.into()), __jni_bindgen::AsJValue::as_jvalue(&arg2.into()), __jni_bindgen::AsJValue::as_jvalue(&arg3)];
                let __jni_env = __jni_bindgen::Env::from_ptr(self.0.env);
                let (__jni_class, __jni_method) = __jni_env.require_class_method("android/os/Binder\0", "transact\0", "(ILandroid/os/Parcel;Landroid/os/Parcel;I)Z\0");
                __jni_env.call_boolean_method_a(self.0.object, __jni_method, __jni_args.as_ptr())
            }
        }

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

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