// WARNING: This file was autogenerated by jni-bindgen. Any changes to this file may be lost!!!
#[cfg(any(feature = "all", feature = "android-media-AsyncPlayer"))]
__jni_bindgen! {
/// public class [AsyncPlayer](https://developer.android.com/reference/android/media/AsyncPlayer.html)
///
/// Required feature: "android-media-AsyncPlayer"
public class AsyncPlayer ("android/media/AsyncPlayer") extends crate::java::lang::Object {
/// [AsyncPlayer](https://developer.android.com/reference/android/media/AsyncPlayer.html#AsyncPlayer(java.lang.String))
///
/// Required features: "java-lang-String"
#[cfg(any(feature = "all", all(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::java::lang::String>>) -> __jni_bindgen::std::result::Result<__jni_bindgen::Local<'env, crate::android::media::AsyncPlayer>, __jni_bindgen::Local<'env, crate::java::lang::Throwable>> {
// class.path == "android/media/AsyncPlayer", java.flags == PUBLIC, .name == "<init>", .descriptor == "(Ljava/lang/String;)V"
unsafe {
let __jni_args = [__jni_bindgen::AsJValue::as_jvalue(&arg0.into())];
let (__jni_class, __jni_method) = __jni_env.require_class_method("android/media/AsyncPlayer\0", "<init>\0", "(Ljava/lang/String;)V\0");
__jni_env.new_object_a(__jni_class, __jni_method, __jni_args.as_ptr())
}
}
/// [play](https://developer.android.com/reference/android/media/AsyncPlayer.html#play(android.content.Context,%20android.net.Uri,%20boolean,%20int))
///
/// Required features: "android-content-Context", "android-net-Uri"
#[cfg(any(feature = "all", all(feature = "android-content-Context", feature = "android-net-Uri")))]
#[deprecated] pub fn play_Context_Uri_boolean_int<'env>(&'env self, arg0: impl __jni_bindgen::std::convert::Into<__jni_bindgen::std::option::Option<&'env crate::android::content::Context>>, arg1: impl __jni_bindgen::std::convert::Into<__jni_bindgen::std::option::Option<&'env crate::android::net::Uri>>, arg2: bool, arg3: i32) -> __jni_bindgen::std::result::Result<(), __jni_bindgen::Local<'env, crate::java::lang::Throwable>> {
// class.path == "android/media/AsyncPlayer", java.flags == PUBLIC, .name == "play", .descriptor == "(Landroid/content/Context;Landroid/net/Uri;ZI)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), __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/media/AsyncPlayer\0", "play\0", "(Landroid/content/Context;Landroid/net/Uri;ZI)V\0");
__jni_env.call_void_method_a(self.0.object, __jni_method, __jni_args.as_ptr())
}
}
/// [play](https://developer.android.com/reference/android/media/AsyncPlayer.html#play(android.content.Context,%20android.net.Uri,%20boolean,%20android.media.AudioAttributes))
///
/// Required features: "android-content-Context", "android-media-AudioAttributes", "android-net-Uri"
#[cfg(any(feature = "all", all(feature = "android-content-Context", feature = "android-media-AudioAttributes", feature = "android-net-Uri")))]
pub fn play_Context_Uri_boolean_AudioAttributes<'env>(&'env self, arg0: impl __jni_bindgen::std::convert::Into<__jni_bindgen::std::option::Option<&'env crate::android::content::Context>>, arg1: impl __jni_bindgen::std::convert::Into<__jni_bindgen::std::option::Option<&'env crate::android::net::Uri>>, arg2: bool, arg3: impl __jni_bindgen::std::convert::Into<__jni_bindgen::std::option::Option<&'env crate::android::media::AudioAttributes>>) -> __jni_bindgen::std::result::Result<(), __jni_bindgen::Local<'env, crate::java::lang::Throwable>> {
// class.path == "android/media/AsyncPlayer", java.flags == PUBLIC, .name == "play", .descriptor == "(Landroid/content/Context;Landroid/net/Uri;ZLandroid/media/AudioAttributes;)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), __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/media/AsyncPlayer\0", "play\0", "(Landroid/content/Context;Landroid/net/Uri;ZLandroid/media/AudioAttributes;)V\0");
__jni_env.call_void_method_a(self.0.object, __jni_method, __jni_args.as_ptr())
}
}
/// [stop](https://developer.android.com/reference/android/media/AsyncPlayer.html#stop())
pub fn stop<'env>(&'env self) -> __jni_bindgen::std::result::Result<(), __jni_bindgen::Local<'env, crate::java::lang::Throwable>> {
// class.path == "android/media/AsyncPlayer", java.flags == PUBLIC, .name == "stop", .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/media/AsyncPlayer\0", "stop\0", "()V\0");
__jni_env.call_void_method_a(self.0.object, __jni_method, __jni_args.as_ptr())
}
}
}
}