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

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

        /// [openSession](https://developer.android.com/reference/android/content/pm/PackageInstaller.html#openSession(int))
        ///
        /// Required features: "android-content-pm-PackageInstaller_Session"
        #[cfg(any(feature = "all", all(feature = "android-content-pm-PackageInstaller_Session")))]
        pub fn openSession<'env>(&'env self, arg0: i32) -> __jni_bindgen::std::result::Result<__jni_bindgen::std::option::Option<__jni_bindgen::Local<'env, crate::android::content::pm::PackageInstaller_Session>>, __jni_bindgen::Local<'env, crate::java::lang::Throwable>> {
            // class.path == "android/content/pm/PackageInstaller", java.flags == PUBLIC, .name == "openSession", .descriptor == "(I)Landroid/content/pm/PackageInstaller$Session;"
            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/content/pm/PackageInstaller\0", "openSession\0", "(I)Landroid/content/pm/PackageInstaller$Session;\0");
                __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr())
            }
        }

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

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

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

        /// [getSessionInfo](https://developer.android.com/reference/android/content/pm/PackageInstaller.html#getSessionInfo(int))
        ///
        /// Required features: "android-content-pm-PackageInstaller_SessionInfo"
        #[cfg(any(feature = "all", all(feature = "android-content-pm-PackageInstaller_SessionInfo")))]
        pub fn getSessionInfo<'env>(&'env self, arg0: i32) -> __jni_bindgen::std::result::Result<__jni_bindgen::std::option::Option<__jni_bindgen::Local<'env, crate::android::content::pm::PackageInstaller_SessionInfo>>, __jni_bindgen::Local<'env, crate::java::lang::Throwable>> {
            // class.path == "android/content/pm/PackageInstaller", java.flags == PUBLIC, .name == "getSessionInfo", .descriptor == "(I)Landroid/content/pm/PackageInstaller$SessionInfo;"
            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/content/pm/PackageInstaller\0", "getSessionInfo\0", "(I)Landroid/content/pm/PackageInstaller$SessionInfo;\0");
                __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr())
            }
        }

        /// [getAllSessions](https://developer.android.com/reference/android/content/pm/PackageInstaller.html#getAllSessions())
        ///
        /// Required features: "java-util-List"
        #[cfg(any(feature = "all", all(feature = "java-util-List")))]
        pub fn getAllSessions<'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/content/pm/PackageInstaller", java.flags == PUBLIC, .name == "getAllSessions", .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/content/pm/PackageInstaller\0", "getAllSessions\0", "()Ljava/util/List;\0");
                __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr())
            }
        }

        /// [getMySessions](https://developer.android.com/reference/android/content/pm/PackageInstaller.html#getMySessions())
        ///
        /// Required features: "java-util-List"
        #[cfg(any(feature = "all", all(feature = "java-util-List")))]
        pub fn getMySessions<'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/content/pm/PackageInstaller", java.flags == PUBLIC, .name == "getMySessions", .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/content/pm/PackageInstaller\0", "getMySessions\0", "()Ljava/util/List;\0");
                __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr())
            }
        }

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

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

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

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

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

        /// public static final [ACTION_SESSION_COMMITTED](https://developer.android.com/reference/android/content/pm/PackageInstaller.html#ACTION_SESSION_COMMITTED)
        pub const ACTION_SESSION_COMMITTED : &'static str = "android.content.pm.action.SESSION_COMMITTED";

        /// public static final [ACTION_SESSION_DETAILS](https://developer.android.com/reference/android/content/pm/PackageInstaller.html#ACTION_SESSION_DETAILS)
        pub const ACTION_SESSION_DETAILS : &'static str = "android.content.pm.action.SESSION_DETAILS";

        /// public static final [EXTRA_OTHER_PACKAGE_NAME](https://developer.android.com/reference/android/content/pm/PackageInstaller.html#EXTRA_OTHER_PACKAGE_NAME)
        pub const EXTRA_OTHER_PACKAGE_NAME : &'static str = "android.content.pm.extra.OTHER_PACKAGE_NAME";

        /// public static final [EXTRA_PACKAGE_NAME](https://developer.android.com/reference/android/content/pm/PackageInstaller.html#EXTRA_PACKAGE_NAME)
        pub const EXTRA_PACKAGE_NAME : &'static str = "android.content.pm.extra.PACKAGE_NAME";

        /// public static final [EXTRA_SESSION](https://developer.android.com/reference/android/content/pm/PackageInstaller.html#EXTRA_SESSION)
        pub const EXTRA_SESSION : &'static str = "android.content.pm.extra.SESSION";

        /// public static final [EXTRA_SESSION_ID](https://developer.android.com/reference/android/content/pm/PackageInstaller.html#EXTRA_SESSION_ID)
        pub const EXTRA_SESSION_ID : &'static str = "android.content.pm.extra.SESSION_ID";

        /// public static final [EXTRA_STATUS](https://developer.android.com/reference/android/content/pm/PackageInstaller.html#EXTRA_STATUS)
        pub const EXTRA_STATUS : &'static str = "android.content.pm.extra.STATUS";

        /// public static final [EXTRA_STATUS_MESSAGE](https://developer.android.com/reference/android/content/pm/PackageInstaller.html#EXTRA_STATUS_MESSAGE)
        pub const EXTRA_STATUS_MESSAGE : &'static str = "android.content.pm.extra.STATUS_MESSAGE";

        /// public static final [EXTRA_STORAGE_PATH](https://developer.android.com/reference/android/content/pm/PackageInstaller.html#EXTRA_STORAGE_PATH)
        pub const EXTRA_STORAGE_PATH : &'static str = "android.content.pm.extra.STORAGE_PATH";

        /// public static final [STATUS_FAILURE](https://developer.android.com/reference/android/content/pm/PackageInstaller.html#STATUS_FAILURE)
        pub const STATUS_FAILURE : i32 = 1;

        /// public static final [STATUS_FAILURE_ABORTED](https://developer.android.com/reference/android/content/pm/PackageInstaller.html#STATUS_FAILURE_ABORTED)
        pub const STATUS_FAILURE_ABORTED : i32 = 3;

        /// public static final [STATUS_FAILURE_BLOCKED](https://developer.android.com/reference/android/content/pm/PackageInstaller.html#STATUS_FAILURE_BLOCKED)
        pub const STATUS_FAILURE_BLOCKED : i32 = 2;

        /// public static final [STATUS_FAILURE_CONFLICT](https://developer.android.com/reference/android/content/pm/PackageInstaller.html#STATUS_FAILURE_CONFLICT)
        pub const STATUS_FAILURE_CONFLICT : i32 = 5;

        /// public static final [STATUS_FAILURE_INCOMPATIBLE](https://developer.android.com/reference/android/content/pm/PackageInstaller.html#STATUS_FAILURE_INCOMPATIBLE)
        pub const STATUS_FAILURE_INCOMPATIBLE : i32 = 7;

        /// public static final [STATUS_FAILURE_INVALID](https://developer.android.com/reference/android/content/pm/PackageInstaller.html#STATUS_FAILURE_INVALID)
        pub const STATUS_FAILURE_INVALID : i32 = 4;

        /// public static final [STATUS_FAILURE_STORAGE](https://developer.android.com/reference/android/content/pm/PackageInstaller.html#STATUS_FAILURE_STORAGE)
        pub const STATUS_FAILURE_STORAGE : i32 = 6;

        /// public static final [STATUS_PENDING_USER_ACTION](https://developer.android.com/reference/android/content/pm/PackageInstaller.html#STATUS_PENDING_USER_ACTION)
        pub const STATUS_PENDING_USER_ACTION : i32 = -1;

        /// public static final [STATUS_SUCCESS](https://developer.android.com/reference/android/content/pm/PackageInstaller.html#STATUS_SUCCESS)
        pub const STATUS_SUCCESS : i32 = 0;
    }
}