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

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

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

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

        /// [getDescription](https://developer.android.com/reference/android/mtp/MtpStorageInfo.html#getDescription())
        ///
        /// Required features: "java-lang-String"
        #[cfg(any(feature = "all", all(feature = "java-lang-String")))]
        pub fn getDescription<'env>(&'env self) -> __jni_bindgen::std::result::Result<__jni_bindgen::std::option::Option<__jni_bindgen::Local<'env, crate::java::lang::String>>, __jni_bindgen::Local<'env, crate::java::lang::Throwable>> {
            // class.path == "android/mtp/MtpStorageInfo", java.flags == PUBLIC, .name == "getDescription", .descriptor == "()Ljava/lang/String;"
            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/mtp/MtpStorageInfo\0", "getDescription\0", "()Ljava/lang/String;\0");
                __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr())
            }
        }

        /// [getVolumeIdentifier](https://developer.android.com/reference/android/mtp/MtpStorageInfo.html#getVolumeIdentifier())
        ///
        /// Required features: "java-lang-String"
        #[cfg(any(feature = "all", all(feature = "java-lang-String")))]
        pub fn getVolumeIdentifier<'env>(&'env self) -> __jni_bindgen::std::result::Result<__jni_bindgen::std::option::Option<__jni_bindgen::Local<'env, crate::java::lang::String>>, __jni_bindgen::Local<'env, crate::java::lang::Throwable>> {
            // class.path == "android/mtp/MtpStorageInfo", java.flags == PUBLIC, .name == "getVolumeIdentifier", .descriptor == "()Ljava/lang/String;"
            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/mtp/MtpStorageInfo\0", "getVolumeIdentifier\0", "()Ljava/lang/String;\0");
                __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr())
            }
        }
    }
}