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

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

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

        /// [onLayout](https://developer.android.com/reference/android/print/PrintDocumentAdapter.html#onLayout(android.print.PrintAttributes,%20android.print.PrintAttributes,%20android.os.CancellationSignal,%20android.print.PrintDocumentAdapter.LayoutResultCallback,%20android.os.Bundle))
        ///
        /// Required features: "android-os-Bundle", "android-os-CancellationSignal", "android-print-PrintAttributes", "android-print-PrintDocumentAdapter_LayoutResultCallback"
        #[cfg(any(feature = "all", all(feature = "android-os-Bundle", feature = "android-os-CancellationSignal", feature = "android-print-PrintAttributes", feature = "android-print-PrintDocumentAdapter_LayoutResultCallback")))]
        pub fn onLayout<'env>(&'env self, arg0: impl __jni_bindgen::std::convert::Into<__jni_bindgen::std::option::Option<&'env crate::android::print::PrintAttributes>>, arg1: impl __jni_bindgen::std::convert::Into<__jni_bindgen::std::option::Option<&'env crate::android::print::PrintAttributes>>, arg2: impl __jni_bindgen::std::convert::Into<__jni_bindgen::std::option::Option<&'env crate::android::os::CancellationSignal>>, arg3: impl __jni_bindgen::std::convert::Into<__jni_bindgen::std::option::Option<&'env crate::android::print::PrintDocumentAdapter_LayoutResultCallback>>, arg4: impl __jni_bindgen::std::convert::Into<__jni_bindgen::std::option::Option<&'env crate::android::os::Bundle>>) -> __jni_bindgen::std::result::Result<(), __jni_bindgen::Local<'env, crate::java::lang::Throwable>> {
            // class.path == "android/print/PrintDocumentAdapter", java.flags == PUBLIC | ABSTRACT, .name == "onLayout", .descriptor == "(Landroid/print/PrintAttributes;Landroid/print/PrintAttributes;Landroid/os/CancellationSignal;Landroid/print/PrintDocumentAdapter$LayoutResultCallback;Landroid/os/Bundle;)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()), __jni_bindgen::AsJValue::as_jvalue(&arg4.into())];
                let __jni_env = __jni_bindgen::Env::from_ptr(self.0.env);
                let (__jni_class, __jni_method) = __jni_env.require_class_method("android/print/PrintDocumentAdapter\0", "onLayout\0", "(Landroid/print/PrintAttributes;Landroid/print/PrintAttributes;Landroid/os/CancellationSignal;Landroid/print/PrintDocumentAdapter$LayoutResultCallback;Landroid/os/Bundle;)V\0");
                __jni_env.call_void_method_a(self.0.object, __jni_method, __jni_args.as_ptr())
            }
        }

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

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

        /// public static final [EXTRA_PRINT_PREVIEW](https://developer.android.com/reference/android/print/PrintDocumentAdapter.html#EXTRA_PRINT_PREVIEW)
        pub const EXTRA_PRINT_PREVIEW : &'static str = "EXTRA_PRINT_PREVIEW";
    }
}