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

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

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

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

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

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

        /// **get** public final [tv_nsec](https://developer.android.com/reference/android/system/StructTimespec.html#tv_nsec)
        pub fn tv_nsec<'env>(&'env self) -> i64 {
            unsafe {
                let env = __jni_bindgen::Env::from_ptr(self.0.env);
                let (__jni_class, __jni_field) = env.require_class_field("android/system/StructTimespec\0", "tv_nsec\0", "J\0");
                env.get_long_field(self.0.object, __jni_field)
            }
        }

        /// **get** public final [tv_sec](https://developer.android.com/reference/android/system/StructTimespec.html#tv_sec)
        pub fn tv_sec<'env>(&'env self) -> i64 {
            unsafe {
                let env = __jni_bindgen::Env::from_ptr(self.0.env);
                let (__jni_class, __jni_field) = env.require_class_field("android/system/StructTimespec\0", "tv_sec\0", "J\0");
                env.get_long_field(self.0.object, __jni_field)
            }
        }
    }
}