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-net-http-HttpResponseCache"))]
__jni_bindgen! {
    /// public final class [HttpResponseCache](https://developer.android.com/reference/android/net/http/HttpResponseCache.html)
    ///
    /// Required feature: "android-net-http-HttpResponseCache"
    public final class HttpResponseCache ("android/net/http/HttpResponseCache") extends crate::java::net::ResponseCache, implements crate::java::io::Closeable {

        /// [getInstalled](https://developer.android.com/reference/android/net/http/HttpResponseCache.html#getInstalled())
        ///
        /// Required features: "android-net-http-HttpResponseCache"
        #[cfg(any(feature = "all", all(feature = "android-net-http-HttpResponseCache")))]
        pub fn getInstalled<'env>(__jni_env: &'env __jni_bindgen::Env) -> __jni_bindgen::std::result::Result<__jni_bindgen::std::option::Option<__jni_bindgen::Local<'env, crate::android::net::http::HttpResponseCache>>, __jni_bindgen::Local<'env, crate::java::lang::Throwable>> {
            // class.path == "android/net/http/HttpResponseCache", java.flags == PUBLIC | STATIC, .name == "getInstalled", .descriptor == "()Landroid/net/http/HttpResponseCache;"
            unsafe {
                let __jni_args = [];
                let (__jni_class, __jni_method) = __jni_env.require_class_static_method("android/net/http/HttpResponseCache\0", "getInstalled\0", "()Landroid/net/http/HttpResponseCache;\0");
                __jni_env.call_static_object_method_a(__jni_class, __jni_method, __jni_args.as_ptr())
            }
        }

        /// [install](https://developer.android.com/reference/android/net/http/HttpResponseCache.html#install(java.io.File,%20long))
        ///
        /// Required features: "android-net-http-HttpResponseCache", "java-io-File"
        #[cfg(any(feature = "all", all(feature = "android-net-http-HttpResponseCache", feature = "java-io-File")))]
        pub fn install<'env>(__jni_env: &'env __jni_bindgen::Env, arg0: impl __jni_bindgen::std::convert::Into<__jni_bindgen::std::option::Option<&'env crate::java::io::File>>, arg1: i64) -> __jni_bindgen::std::result::Result<__jni_bindgen::std::option::Option<__jni_bindgen::Local<'env, crate::android::net::http::HttpResponseCache>>, __jni_bindgen::Local<'env, crate::java::lang::Throwable>> {
            // class.path == "android/net/http/HttpResponseCache", java.flags == PUBLIC | STATIC | SYNCRONIZED, .name == "install", .descriptor == "(Ljava/io/File;J)Landroid/net/http/HttpResponseCache;"
            unsafe {
                let __jni_args = [__jni_bindgen::AsJValue::as_jvalue(&arg0.into()), __jni_bindgen::AsJValue::as_jvalue(&arg1)];
                let (__jni_class, __jni_method) = __jni_env.require_class_static_method("android/net/http/HttpResponseCache\0", "install\0", "(Ljava/io/File;J)Landroid/net/http/HttpResponseCache;\0");
                __jni_env.call_static_object_method_a(__jni_class, __jni_method, __jni_args.as_ptr())
            }
        }

        /// [get](https://developer.android.com/reference/android/net/http/HttpResponseCache.html#get(java.net.URI,%20java.lang.String,%20java.util.Map))
        ///
        /// Required features: "java-lang-String", "java-net-CacheResponse", "java-net-URI", "java-util-Map"
        #[cfg(any(feature = "all", all(feature = "java-lang-String", feature = "java-net-CacheResponse", feature = "java-net-URI", feature = "java-util-Map")))]
        pub fn get<'env>(&'env self, arg0: impl __jni_bindgen::std::convert::Into<__jni_bindgen::std::option::Option<&'env crate::java::net::URI>>, arg1: impl __jni_bindgen::std::convert::Into<__jni_bindgen::std::option::Option<&'env crate::java::lang::String>>, arg2: impl __jni_bindgen::std::convert::Into<__jni_bindgen::std::option::Option<&'env crate::java::util::Map>>) -> __jni_bindgen::std::result::Result<__jni_bindgen::std::option::Option<__jni_bindgen::Local<'env, crate::java::net::CacheResponse>>, __jni_bindgen::Local<'env, crate::java::lang::Throwable>> {
            // class.path == "android/net/http/HttpResponseCache", java.flags == PUBLIC, .name == "get", .descriptor == "(Ljava/net/URI;Ljava/lang/String;Ljava/util/Map;)Ljava/net/CacheResponse;"
            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())];
                let __jni_env = __jni_bindgen::Env::from_ptr(self.0.env);
                let (__jni_class, __jni_method) = __jni_env.require_class_method("android/net/http/HttpResponseCache\0", "get\0", "(Ljava/net/URI;Ljava/lang/String;Ljava/util/Map;)Ljava/net/CacheResponse;\0");
                __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr())
            }
        }

        /// [put](https://developer.android.com/reference/android/net/http/HttpResponseCache.html#put(java.net.URI,%20java.net.URLConnection))
        ///
        /// Required features: "java-net-CacheRequest", "java-net-URI", "java-net-URLConnection"
        #[cfg(any(feature = "all", all(feature = "java-net-CacheRequest", feature = "java-net-URI", feature = "java-net-URLConnection")))]
        pub fn put<'env>(&'env self, arg0: impl __jni_bindgen::std::convert::Into<__jni_bindgen::std::option::Option<&'env crate::java::net::URI>>, arg1: impl __jni_bindgen::std::convert::Into<__jni_bindgen::std::option::Option<&'env crate::java::net::URLConnection>>) -> __jni_bindgen::std::result::Result<__jni_bindgen::std::option::Option<__jni_bindgen::Local<'env, crate::java::net::CacheRequest>>, __jni_bindgen::Local<'env, crate::java::lang::Throwable>> {
            // class.path == "android/net/http/HttpResponseCache", java.flags == PUBLIC, .name == "put", .descriptor == "(Ljava/net/URI;Ljava/net/URLConnection;)Ljava/net/CacheRequest;"
            unsafe {
                let __jni_args = [__jni_bindgen::AsJValue::as_jvalue(&arg0.into()), __jni_bindgen::AsJValue::as_jvalue(&arg1.into())];
                let __jni_env = __jni_bindgen::Env::from_ptr(self.0.env);
                let (__jni_class, __jni_method) = __jni_env.require_class_method("android/net/http/HttpResponseCache\0", "put\0", "(Ljava/net/URI;Ljava/net/URLConnection;)Ljava/net/CacheRequest;\0");
                __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr())
            }
        }

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

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

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

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

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

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

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

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