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

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

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

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

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

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

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