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-hardware-camera2-CameraAccessException"))]
__jni_bindgen! {
    /// public class [CameraAccessException](https://developer.android.com/reference/android/hardware/camera2/CameraAccessException.html)
    ///
    /// Required feature: "android-hardware-camera2-CameraAccessException"
    public class CameraAccessException ("android/hardware/camera2/CameraAccessException") extends crate::android::util::AndroidException {

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

        /// [CameraAccessException](https://developer.android.com/reference/android/hardware/camera2/CameraAccessException.html#CameraAccessException(int,%20java.lang.String))
        ///
        /// Required features: "java-lang-String"
        #[cfg(any(feature = "all", all(feature = "java-lang-String")))]
        pub fn new_int_String<'env>(__jni_env: &'env __jni_bindgen::Env, arg0: i32, 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::hardware::camera2::CameraAccessException>, __jni_bindgen::Local<'env, crate::java::lang::Throwable>> {
            // class.path == "android/hardware/camera2/CameraAccessException", java.flags == PUBLIC, .name == "<init>", .descriptor == "(ILjava/lang/String;)V"
            unsafe {
                let __jni_args = [__jni_bindgen::AsJValue::as_jvalue(&arg0), __jni_bindgen::AsJValue::as_jvalue(&arg1.into())];
                let (__jni_class, __jni_method) = __jni_env.require_class_method("android/hardware/camera2/CameraAccessException\0", "<init>\0", "(ILjava/lang/String;)V\0");
                __jni_env.new_object_a(__jni_class, __jni_method, __jni_args.as_ptr())
            }
        }

        /// [CameraAccessException](https://developer.android.com/reference/android/hardware/camera2/CameraAccessException.html#CameraAccessException(int,%20java.lang.String,%20java.lang.Throwable))
        ///
        /// Required features: "java-lang-String", "java-lang-Throwable"
        #[cfg(any(feature = "all", all(feature = "java-lang-String", feature = "java-lang-Throwable")))]
        pub fn new_int_String_Throwable<'env>(__jni_env: &'env __jni_bindgen::Env, arg0: i32, arg1: impl __jni_bindgen::std::convert::Into<__jni_bindgen::std::option::Option<&'env crate::java::lang::String>>, arg2: impl __jni_bindgen::std::convert::Into<__jni_bindgen::std::option::Option<&'env crate::java::lang::Throwable>>) -> __jni_bindgen::std::result::Result<__jni_bindgen::Local<'env, crate::android::hardware::camera2::CameraAccessException>, __jni_bindgen::Local<'env, crate::java::lang::Throwable>> {
            // class.path == "android/hardware/camera2/CameraAccessException", java.flags == PUBLIC, .name == "<init>", .descriptor == "(ILjava/lang/String;Ljava/lang/Throwable;)V"
            unsafe {
                let __jni_args = [__jni_bindgen::AsJValue::as_jvalue(&arg0), __jni_bindgen::AsJValue::as_jvalue(&arg1.into()), __jni_bindgen::AsJValue::as_jvalue(&arg2.into())];
                let (__jni_class, __jni_method) = __jni_env.require_class_method("android/hardware/camera2/CameraAccessException\0", "<init>\0", "(ILjava/lang/String;Ljava/lang/Throwable;)V\0");
                __jni_env.new_object_a(__jni_class, __jni_method, __jni_args.as_ptr())
            }
        }

        /// [CameraAccessException](https://developer.android.com/reference/android/hardware/camera2/CameraAccessException.html#CameraAccessException(int,%20java.lang.Throwable))
        ///
        /// Required features: "java-lang-Throwable"
        #[cfg(any(feature = "all", all(feature = "java-lang-Throwable")))]
        pub fn new_int_Throwable<'env>(__jni_env: &'env __jni_bindgen::Env, arg0: i32, arg1: impl __jni_bindgen::std::convert::Into<__jni_bindgen::std::option::Option<&'env crate::java::lang::Throwable>>) -> __jni_bindgen::std::result::Result<__jni_bindgen::Local<'env, crate::android::hardware::camera2::CameraAccessException>, __jni_bindgen::Local<'env, crate::java::lang::Throwable>> {
            // class.path == "android/hardware/camera2/CameraAccessException", java.flags == PUBLIC, .name == "<init>", .descriptor == "(ILjava/lang/Throwable;)V"
            unsafe {
                let __jni_args = [__jni_bindgen::AsJValue::as_jvalue(&arg0), __jni_bindgen::AsJValue::as_jvalue(&arg1.into())];
                let (__jni_class, __jni_method) = __jni_env.require_class_method("android/hardware/camera2/CameraAccessException\0", "<init>\0", "(ILjava/lang/Throwable;)V\0");
                __jni_env.new_object_a(__jni_class, __jni_method, __jni_args.as_ptr())
            }
        }

        /// [getReason](https://developer.android.com/reference/android/hardware/camera2/CameraAccessException.html#getReason())
        pub fn getReason<'env>(&'env self) -> __jni_bindgen::std::result::Result<i32, __jni_bindgen::Local<'env, crate::java::lang::Throwable>> {
            // class.path == "android/hardware/camera2/CameraAccessException", java.flags == PUBLIC | FINAL, .name == "getReason", .descriptor == "()I"
            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/hardware/camera2/CameraAccessException\0", "getReason\0", "()I\0");
                __jni_env.call_int_method_a(self.0.object, __jni_method, __jni_args.as_ptr())
            }
        }

        /// public static final [CAMERA_DISABLED](https://developer.android.com/reference/android/hardware/camera2/CameraAccessException.html#CAMERA_DISABLED)
        pub const CAMERA_DISABLED : i32 = 1;

        /// public static final [CAMERA_DISCONNECTED](https://developer.android.com/reference/android/hardware/camera2/CameraAccessException.html#CAMERA_DISCONNECTED)
        pub const CAMERA_DISCONNECTED : i32 = 2;

        /// public static final [CAMERA_ERROR](https://developer.android.com/reference/android/hardware/camera2/CameraAccessException.html#CAMERA_ERROR)
        pub const CAMERA_ERROR : i32 = 3;
    }
}