// WARNING: This file was autogenerated by jni-bindgen. Any changes to this file may be lost!!!
#[cfg(any(feature = "all", feature = "android-hardware-Camera"))]
__jni_bindgen! {
/// public class [Camera](https://developer.android.com/reference/android/hardware/Camera.html)
///
/// Required feature: "android-hardware-Camera"
public class Camera ("android/hardware/Camera") extends crate::java::lang::Object {
/// [open](https://developer.android.com/reference/android/hardware/Camera.html#open())
///
/// Required features: "android-hardware-Camera"
#[cfg(any(feature = "all", all(feature = "android-hardware-Camera")))]
pub fn open<'env>(__jni_env: &'env __jni_bindgen::Env) -> __jni_bindgen::std::result::Result<__jni_bindgen::std::option::Option<__jni_bindgen::Local<'env, crate::android::hardware::Camera>>, __jni_bindgen::Local<'env, crate::java::lang::Throwable>> {
// class.path == "android/hardware/Camera", java.flags == PUBLIC | STATIC, .name == "open", .descriptor == "()Landroid/hardware/Camera;"
unsafe {
let __jni_args = [];
let (__jni_class, __jni_method) = __jni_env.require_class_static_method("android/hardware/Camera\0", "open\0", "()Landroid/hardware/Camera;\0");
__jni_env.call_static_object_method_a(__jni_class, __jni_method, __jni_args.as_ptr())
}
}
/// [release](https://developer.android.com/reference/android/hardware/Camera.html#release())
pub fn release<'env>(&'env self) -> __jni_bindgen::std::result::Result<(), __jni_bindgen::Local<'env, crate::java::lang::Throwable>> {
// class.path == "android/hardware/Camera", java.flags == PUBLIC | FINAL, .name == "release", .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/hardware/Camera\0", "release\0", "()V\0");
__jni_env.call_void_method_a(self.0.object, __jni_method, __jni_args.as_ptr())
}
}
/// [lock](https://developer.android.com/reference/android/hardware/Camera.html#lock())
pub fn lock<'env>(&'env self) -> __jni_bindgen::std::result::Result<(), __jni_bindgen::Local<'env, crate::java::lang::Throwable>> {
// class.path == "android/hardware/Camera", java.flags == PUBLIC | FINAL | NATIVE, .name == "lock", .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/hardware/Camera\0", "lock\0", "()V\0");
__jni_env.call_void_method_a(self.0.object, __jni_method, __jni_args.as_ptr())
}
}
/// [unlock](https://developer.android.com/reference/android/hardware/Camera.html#unlock())
pub fn unlock<'env>(&'env self) -> __jni_bindgen::std::result::Result<(), __jni_bindgen::Local<'env, crate::java::lang::Throwable>> {
// class.path == "android/hardware/Camera", java.flags == PUBLIC | FINAL | NATIVE, .name == "unlock", .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/hardware/Camera\0", "unlock\0", "()V\0");
__jni_env.call_void_method_a(self.0.object, __jni_method, __jni_args.as_ptr())
}
}
/// [setPreviewDisplay](https://developer.android.com/reference/android/hardware/Camera.html#setPreviewDisplay(android.view.SurfaceHolder))
///
/// Required features: "android-view-SurfaceHolder"
#[cfg(any(feature = "all", all(feature = "android-view-SurfaceHolder")))]
pub fn setPreviewDisplay<'env>(&'env self, arg0: impl __jni_bindgen::std::convert::Into<__jni_bindgen::std::option::Option<&'env crate::android::view::SurfaceHolder>>) -> __jni_bindgen::std::result::Result<(), __jni_bindgen::Local<'env, crate::java::lang::Throwable>> {
// class.path == "android/hardware/Camera", java.flags == PUBLIC | FINAL, .name == "setPreviewDisplay", .descriptor == "(Landroid/view/SurfaceHolder;)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/hardware/Camera\0", "setPreviewDisplay\0", "(Landroid/view/SurfaceHolder;)V\0");
__jni_env.call_void_method_a(self.0.object, __jni_method, __jni_args.as_ptr())
}
}
/// [startPreview](https://developer.android.com/reference/android/hardware/Camera.html#startPreview())
pub fn startPreview<'env>(&'env self) -> __jni_bindgen::std::result::Result<(), __jni_bindgen::Local<'env, crate::java::lang::Throwable>> {
// class.path == "android/hardware/Camera", java.flags == PUBLIC | FINAL | NATIVE, .name == "startPreview", .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/hardware/Camera\0", "startPreview\0", "()V\0");
__jni_env.call_void_method_a(self.0.object, __jni_method, __jni_args.as_ptr())
}
}
/// [stopPreview](https://developer.android.com/reference/android/hardware/Camera.html#stopPreview())
pub fn stopPreview<'env>(&'env self) -> __jni_bindgen::std::result::Result<(), __jni_bindgen::Local<'env, crate::java::lang::Throwable>> {
// class.path == "android/hardware/Camera", java.flags == PUBLIC | FINAL | NATIVE, .name == "stopPreview", .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/hardware/Camera\0", "stopPreview\0", "()V\0");
__jni_env.call_void_method_a(self.0.object, __jni_method, __jni_args.as_ptr())
}
}
/// [setPreviewCallback](https://developer.android.com/reference/android/hardware/Camera.html#setPreviewCallback(android.hardware.Camera.PreviewCallback))
///
/// Required features: "android-hardware-Camera_PreviewCallback"
#[cfg(any(feature = "all", all(feature = "android-hardware-Camera_PreviewCallback")))]
pub fn setPreviewCallback<'env>(&'env self, arg0: impl __jni_bindgen::std::convert::Into<__jni_bindgen::std::option::Option<&'env crate::android::hardware::Camera_PreviewCallback>>) -> __jni_bindgen::std::result::Result<(), __jni_bindgen::Local<'env, crate::java::lang::Throwable>> {
// class.path == "android/hardware/Camera", java.flags == PUBLIC | FINAL, .name == "setPreviewCallback", .descriptor == "(Landroid/hardware/Camera$PreviewCallback;)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/hardware/Camera\0", "setPreviewCallback\0", "(Landroid/hardware/Camera$PreviewCallback;)V\0");
__jni_env.call_void_method_a(self.0.object, __jni_method, __jni_args.as_ptr())
}
}
/// [setOneShotPreviewCallback](https://developer.android.com/reference/android/hardware/Camera.html#setOneShotPreviewCallback(android.hardware.Camera.PreviewCallback))
///
/// Required features: "android-hardware-Camera_PreviewCallback"
#[cfg(any(feature = "all", all(feature = "android-hardware-Camera_PreviewCallback")))]
pub fn setOneShotPreviewCallback<'env>(&'env self, arg0: impl __jni_bindgen::std::convert::Into<__jni_bindgen::std::option::Option<&'env crate::android::hardware::Camera_PreviewCallback>>) -> __jni_bindgen::std::result::Result<(), __jni_bindgen::Local<'env, crate::java::lang::Throwable>> {
// class.path == "android/hardware/Camera", java.flags == PUBLIC | FINAL, .name == "setOneShotPreviewCallback", .descriptor == "(Landroid/hardware/Camera$PreviewCallback;)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/hardware/Camera\0", "setOneShotPreviewCallback\0", "(Landroid/hardware/Camera$PreviewCallback;)V\0");
__jni_env.call_void_method_a(self.0.object, __jni_method, __jni_args.as_ptr())
}
}
/// [autoFocus](https://developer.android.com/reference/android/hardware/Camera.html#autoFocus(android.hardware.Camera.AutoFocusCallback))
///
/// Required features: "android-hardware-Camera_AutoFocusCallback"
#[cfg(any(feature = "all", all(feature = "android-hardware-Camera_AutoFocusCallback")))]
pub fn autoFocus<'env>(&'env self, arg0: impl __jni_bindgen::std::convert::Into<__jni_bindgen::std::option::Option<&'env crate::android::hardware::Camera_AutoFocusCallback>>) -> __jni_bindgen::std::result::Result<(), __jni_bindgen::Local<'env, crate::java::lang::Throwable>> {
// class.path == "android/hardware/Camera", java.flags == PUBLIC | FINAL, .name == "autoFocus", .descriptor == "(Landroid/hardware/Camera$AutoFocusCallback;)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/hardware/Camera\0", "autoFocus\0", "(Landroid/hardware/Camera$AutoFocusCallback;)V\0");
__jni_env.call_void_method_a(self.0.object, __jni_method, __jni_args.as_ptr())
}
}
/// [cancelAutoFocus](https://developer.android.com/reference/android/hardware/Camera.html#cancelAutoFocus())
pub fn cancelAutoFocus<'env>(&'env self) -> __jni_bindgen::std::result::Result<(), __jni_bindgen::Local<'env, crate::java::lang::Throwable>> {
// class.path == "android/hardware/Camera", java.flags == PUBLIC | FINAL, .name == "cancelAutoFocus", .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/hardware/Camera\0", "cancelAutoFocus\0", "()V\0");
__jni_env.call_void_method_a(self.0.object, __jni_method, __jni_args.as_ptr())
}
}
/// [takePicture](https://developer.android.com/reference/android/hardware/Camera.html#takePicture(android.hardware.Camera.ShutterCallback,%20android.hardware.Camera.PictureCallback,%20android.hardware.Camera.PictureCallback))
///
/// Required features: "android-hardware-Camera_PictureCallback", "android-hardware-Camera_ShutterCallback"
#[cfg(any(feature = "all", all(feature = "android-hardware-Camera_PictureCallback", feature = "android-hardware-Camera_ShutterCallback")))]
pub fn takePicture_ShutterCallback_PictureCallback_PictureCallback<'env>(&'env self, arg0: impl __jni_bindgen::std::convert::Into<__jni_bindgen::std::option::Option<&'env crate::android::hardware::Camera_ShutterCallback>>, arg1: impl __jni_bindgen::std::convert::Into<__jni_bindgen::std::option::Option<&'env crate::android::hardware::Camera_PictureCallback>>, arg2: impl __jni_bindgen::std::convert::Into<__jni_bindgen::std::option::Option<&'env crate::android::hardware::Camera_PictureCallback>>) -> __jni_bindgen::std::result::Result<(), __jni_bindgen::Local<'env, crate::java::lang::Throwable>> {
// class.path == "android/hardware/Camera", java.flags == PUBLIC | FINAL, .name == "takePicture", .descriptor == "(Landroid/hardware/Camera$ShutterCallback;Landroid/hardware/Camera$PictureCallback;Landroid/hardware/Camera$PictureCallback;)V"
unsafe {
let __jni_args = [__jni_bindgen::AsJValue::as_jvalue(&arg0.into()), __jni_bindgen::AsJValue::as_jvalue(&arg1.into()), __jni_bindgen::AsJValue::as_jvalue(&arg2.into())];
let __jni_env = __jni_bindgen::Env::from_ptr(self.0.env);
let (__jni_class, __jni_method) = __jni_env.require_class_method("android/hardware/Camera\0", "takePicture\0", "(Landroid/hardware/Camera$ShutterCallback;Landroid/hardware/Camera$PictureCallback;Landroid/hardware/Camera$PictureCallback;)V\0");
__jni_env.call_void_method_a(self.0.object, __jni_method, __jni_args.as_ptr())
}
}
/// [takePicture](https://developer.android.com/reference/android/hardware/Camera.html#takePicture(android.hardware.Camera.ShutterCallback,%20android.hardware.Camera.PictureCallback,%20android.hardware.Camera.PictureCallback,%20android.hardware.Camera.PictureCallback))
///
/// Required features: "android-hardware-Camera_PictureCallback", "android-hardware-Camera_ShutterCallback"
#[cfg(any(feature = "all", all(feature = "android-hardware-Camera_PictureCallback", feature = "android-hardware-Camera_ShutterCallback")))]
pub fn takePicture_ShutterCallback_PictureCallback_PictureCallback_PictureCallback<'env>(&'env self, arg0: impl __jni_bindgen::std::convert::Into<__jni_bindgen::std::option::Option<&'env crate::android::hardware::Camera_ShutterCallback>>, arg1: impl __jni_bindgen::std::convert::Into<__jni_bindgen::std::option::Option<&'env crate::android::hardware::Camera_PictureCallback>>, arg2: impl __jni_bindgen::std::convert::Into<__jni_bindgen::std::option::Option<&'env crate::android::hardware::Camera_PictureCallback>>, arg3: impl __jni_bindgen::std::convert::Into<__jni_bindgen::std::option::Option<&'env crate::android::hardware::Camera_PictureCallback>>) -> __jni_bindgen::std::result::Result<(), __jni_bindgen::Local<'env, crate::java::lang::Throwable>> {
// class.path == "android/hardware/Camera", java.flags == PUBLIC | FINAL, .name == "takePicture", .descriptor == "(Landroid/hardware/Camera$ShutterCallback;Landroid/hardware/Camera$PictureCallback;Landroid/hardware/Camera$PictureCallback;Landroid/hardware/Camera$PictureCallback;)V"
unsafe {
let __jni_args = [__jni_bindgen::AsJValue::as_jvalue(&arg0.into()), __jni_bindgen::AsJValue::as_jvalue(&arg1.into()), __jni_bindgen::AsJValue::as_jvalue(&arg2.into()), __jni_bindgen::AsJValue::as_jvalue(&arg3.into())];
let __jni_env = __jni_bindgen::Env::from_ptr(self.0.env);
let (__jni_class, __jni_method) = __jni_env.require_class_method("android/hardware/Camera\0", "takePicture\0", "(Landroid/hardware/Camera$ShutterCallback;Landroid/hardware/Camera$PictureCallback;Landroid/hardware/Camera$PictureCallback;Landroid/hardware/Camera$PictureCallback;)V\0");
__jni_env.call_void_method_a(self.0.object, __jni_method, __jni_args.as_ptr())
}
}
/// [setErrorCallback](https://developer.android.com/reference/android/hardware/Camera.html#setErrorCallback(android.hardware.Camera.ErrorCallback))
///
/// Required features: "android-hardware-Camera_ErrorCallback"
#[cfg(any(feature = "all", all(feature = "android-hardware-Camera_ErrorCallback")))]
pub fn setErrorCallback<'env>(&'env self, arg0: impl __jni_bindgen::std::convert::Into<__jni_bindgen::std::option::Option<&'env crate::android::hardware::Camera_ErrorCallback>>) -> __jni_bindgen::std::result::Result<(), __jni_bindgen::Local<'env, crate::java::lang::Throwable>> {
// class.path == "android/hardware/Camera", java.flags == PUBLIC | FINAL, .name == "setErrorCallback", .descriptor == "(Landroid/hardware/Camera$ErrorCallback;)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/hardware/Camera\0", "setErrorCallback\0", "(Landroid/hardware/Camera$ErrorCallback;)V\0");
__jni_env.call_void_method_a(self.0.object, __jni_method, __jni_args.as_ptr())
}
}
/// [setParameters](https://developer.android.com/reference/android/hardware/Camera.html#setParameters(android.hardware.Camera.Parameters))
///
/// Required features: "android-hardware-Camera_Parameters"
#[cfg(any(feature = "all", all(feature = "android-hardware-Camera_Parameters")))]
pub fn setParameters<'env>(&'env self, arg0: impl __jni_bindgen::std::convert::Into<__jni_bindgen::std::option::Option<&'env crate::android::hardware::Camera_Parameters>>) -> __jni_bindgen::std::result::Result<(), __jni_bindgen::Local<'env, crate::java::lang::Throwable>> {
// class.path == "android/hardware/Camera", java.flags == PUBLIC, .name == "setParameters", .descriptor == "(Landroid/hardware/Camera$Parameters;)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/hardware/Camera\0", "setParameters\0", "(Landroid/hardware/Camera$Parameters;)V\0");
__jni_env.call_void_method_a(self.0.object, __jni_method, __jni_args.as_ptr())
}
}
/// [getParameters](https://developer.android.com/reference/android/hardware/Camera.html#getParameters())
///
/// Required features: "android-hardware-Camera_Parameters"
#[cfg(any(feature = "all", all(feature = "android-hardware-Camera_Parameters")))]
pub fn getParameters<'env>(&'env self) -> __jni_bindgen::std::result::Result<__jni_bindgen::std::option::Option<__jni_bindgen::Local<'env, crate::android::hardware::Camera_Parameters>>, __jni_bindgen::Local<'env, crate::java::lang::Throwable>> {
// class.path == "android/hardware/Camera", java.flags == PUBLIC, .name == "getParameters", .descriptor == "()Landroid/hardware/Camera$Parameters;"
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/Camera\0", "getParameters\0", "()Landroid/hardware/Camera$Parameters;\0");
__jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr())
}
}
/// public static final [CAMERA_ERROR_UNKNOWN](https://developer.android.com/reference/android/hardware/Camera.html#CAMERA_ERROR_UNKNOWN)
pub const CAMERA_ERROR_UNKNOWN : i32 = 1;
/// public static final [CAMERA_ERROR_SERVER_DIED](https://developer.android.com/reference/android/hardware/Camera.html#CAMERA_ERROR_SERVER_DIED)
pub const CAMERA_ERROR_SERVER_DIED : i32 = 100;
}
}