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

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

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

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

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