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-wifi-p2p-WifiP2pDevice"))]
__jni_bindgen! {
    /// public class [WifiP2pDevice](https://developer.android.com/reference/android/net/wifi/p2p/WifiP2pDevice.html)
    ///
    /// Required feature: "android-net-wifi-p2p-WifiP2pDevice"
    public class WifiP2pDevice ("android/net/wifi/p2p/WifiP2pDevice") extends crate::java::lang::Object, implements crate::android::os::Parcelable {

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

        /// [WifiP2pDevice](https://developer.android.com/reference/android/net/wifi/p2p/WifiP2pDevice.html#WifiP2pDevice(android.net.wifi.p2p.WifiP2pDevice))
        ///
        /// Required features: "android-net-wifi-p2p-WifiP2pDevice"
        #[cfg(any(feature = "all", all(feature = "android-net-wifi-p2p-WifiP2pDevice")))]
        pub fn new_WifiP2pDevice<'env>(__jni_env: &'env __jni_bindgen::Env, arg0: impl __jni_bindgen::std::convert::Into<__jni_bindgen::std::option::Option<&'env crate::android::net::wifi::p2p::WifiP2pDevice>>) -> __jni_bindgen::std::result::Result<__jni_bindgen::Local<'env, crate::android::net::wifi::p2p::WifiP2pDevice>, __jni_bindgen::Local<'env, crate::java::lang::Throwable>> {
            // class.path == "android/net/wifi/p2p/WifiP2pDevice", java.flags == PUBLIC, .name == "<init>", .descriptor == "(Landroid/net/wifi/p2p/WifiP2pDevice;)V"
            unsafe {
                let __jni_args = [__jni_bindgen::AsJValue::as_jvalue(&arg0.into())];
                let (__jni_class, __jni_method) = __jni_env.require_class_method("android/net/wifi/p2p/WifiP2pDevice\0", "<init>\0", "(Landroid/net/wifi/p2p/WifiP2pDevice;)V\0");
                __jni_env.new_object_a(__jni_class, __jni_method, __jni_args.as_ptr())
            }
        }

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

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

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

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

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

        /// [equals](https://developer.android.com/reference/android/net/wifi/p2p/WifiP2pDevice.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/net/wifi/p2p/WifiP2pDevice", 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/net/wifi/p2p/WifiP2pDevice\0", "equals\0", "(Ljava/lang/Object;)Z\0");
                __jni_env.call_boolean_method_a(self.0.object, __jni_method, __jni_args.as_ptr())
            }
        }

        /// [toString](https://developer.android.com/reference/android/net/wifi/p2p/WifiP2pDevice.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/net/wifi/p2p/WifiP2pDevice", 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/net/wifi/p2p/WifiP2pDevice\0", "toString\0", "()Ljava/lang/String;\0");
                __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr())
            }
        }

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

        /// [writeToParcel](https://developer.android.com/reference/android/net/wifi/p2p/WifiP2pDevice.html#writeToParcel(android.os.Parcel,%20int))
        ///
        /// Required features: "android-os-Parcel"
        #[cfg(any(feature = "all", all(feature = "android-os-Parcel")))]
        pub fn writeToParcel<'env>(&'env self, arg0: impl __jni_bindgen::std::convert::Into<__jni_bindgen::std::option::Option<&'env crate::android::os::Parcel>>, arg1: i32) -> __jni_bindgen::std::result::Result<(), __jni_bindgen::Local<'env, crate::java::lang::Throwable>> {
            // class.path == "android/net/wifi/p2p/WifiP2pDevice", java.flags == PUBLIC, .name == "writeToParcel", .descriptor == "(Landroid/os/Parcel;I)V"
            unsafe {
                let __jni_args = [__jni_bindgen::AsJValue::as_jvalue(&arg0.into()), __jni_bindgen::AsJValue::as_jvalue(&arg1)];
                let __jni_env = __jni_bindgen::Env::from_ptr(self.0.env);
                let (__jni_class, __jni_method) = __jni_env.require_class_method("android/net/wifi/p2p/WifiP2pDevice\0", "writeToParcel\0", "(Landroid/os/Parcel;I)V\0");
                __jni_env.call_void_method_a(self.0.object, __jni_method, __jni_args.as_ptr())
            }
        }

        /// public static final [AVAILABLE](https://developer.android.com/reference/android/net/wifi/p2p/WifiP2pDevice.html#AVAILABLE)
        pub const AVAILABLE : i32 = 3;

        /// public static final [CONNECTED](https://developer.android.com/reference/android/net/wifi/p2p/WifiP2pDevice.html#CONNECTED)
        pub const CONNECTED : i32 = 0;

        /// **get** public static final [CREATOR](https://developer.android.com/reference/android/net/wifi/p2p/WifiP2pDevice.html#CREATOR)
        ///
        /// Required feature: "android-os-Parcelable_Creator"
        #[cfg(any(feature = "all", feature = "android-os-Parcelable_Creator"))]
        pub fn CREATOR<'env>(env: &'env __jni_bindgen::Env) -> __jni_bindgen::std::option::Option<__jni_bindgen::Local<'env, crate::android::os::Parcelable_Creator>> {
            unsafe {
                let (__jni_class, __jni_field) = env.require_class_static_field("android/net/wifi/p2p/WifiP2pDevice\0", "CREATOR\0", "Landroid/os/Parcelable$Creator;\0");
                env.get_static_object_field(__jni_class, __jni_field)
            }
        }

        /// public static final [FAILED](https://developer.android.com/reference/android/net/wifi/p2p/WifiP2pDevice.html#FAILED)
        pub const FAILED : i32 = 2;

        /// public static final [INVITED](https://developer.android.com/reference/android/net/wifi/p2p/WifiP2pDevice.html#INVITED)
        pub const INVITED : i32 = 1;

        /// public static final [UNAVAILABLE](https://developer.android.com/reference/android/net/wifi/p2p/WifiP2pDevice.html#UNAVAILABLE)
        pub const UNAVAILABLE : i32 = 4;

        /// **get** public [deviceAddress](https://developer.android.com/reference/android/net/wifi/p2p/WifiP2pDevice.html#deviceAddress)
        ///
        /// Required feature: "java-lang-String"
        #[cfg(any(feature = "all", feature = "java-lang-String"))]
        pub fn deviceAddress<'env>(&'env self) -> __jni_bindgen::std::option::Option<__jni_bindgen::Local<'env, crate::java::lang::String>> {
            unsafe {
                let env = __jni_bindgen::Env::from_ptr(self.0.env);
                let (__jni_class, __jni_field) = env.require_class_field("android/net/wifi/p2p/WifiP2pDevice\0", "deviceAddress\0", "Ljava/lang/String;\0");
                env.get_object_field(self.0.object, __jni_field)
            }
        }

        /// **set** public [deviceAddress](https://developer.android.com/reference/android/net/wifi/p2p/WifiP2pDevice.html#deviceAddress)
        ///
        /// Required feature: "java-lang-String"
        #[cfg(any(feature = "all", feature = "java-lang-String"))]
        pub fn set_deviceAddress<'env, 'obj>(&'env self, value: impl __jni_bindgen::std::convert::Into<__jni_bindgen::std::option::Option<&'obj crate::java::lang::String>>) {
            unsafe {
                let env = __jni_bindgen::Env::from_ptr(self.0.env);
                let (__jni_class, __jni_field) = env.require_class_field("android/net/wifi/p2p/WifiP2pDevice\0", "deviceAddress\0", "Ljava/lang/String;\0");
                env.set_object_field(self.0.object, __jni_field, value)
            }
        }

        /// **get** public [deviceName](https://developer.android.com/reference/android/net/wifi/p2p/WifiP2pDevice.html#deviceName)
        ///
        /// Required feature: "java-lang-String"
        #[cfg(any(feature = "all", feature = "java-lang-String"))]
        pub fn deviceName<'env>(&'env self) -> __jni_bindgen::std::option::Option<__jni_bindgen::Local<'env, crate::java::lang::String>> {
            unsafe {
                let env = __jni_bindgen::Env::from_ptr(self.0.env);
                let (__jni_class, __jni_field) = env.require_class_field("android/net/wifi/p2p/WifiP2pDevice\0", "deviceName\0", "Ljava/lang/String;\0");
                env.get_object_field(self.0.object, __jni_field)
            }
        }

        /// **set** public [deviceName](https://developer.android.com/reference/android/net/wifi/p2p/WifiP2pDevice.html#deviceName)
        ///
        /// Required feature: "java-lang-String"
        #[cfg(any(feature = "all", feature = "java-lang-String"))]
        pub fn set_deviceName<'env, 'obj>(&'env self, value: impl __jni_bindgen::std::convert::Into<__jni_bindgen::std::option::Option<&'obj crate::java::lang::String>>) {
            unsafe {
                let env = __jni_bindgen::Env::from_ptr(self.0.env);
                let (__jni_class, __jni_field) = env.require_class_field("android/net/wifi/p2p/WifiP2pDevice\0", "deviceName\0", "Ljava/lang/String;\0");
                env.set_object_field(self.0.object, __jni_field, value)
            }
        }

        /// **get** public [primaryDeviceType](https://developer.android.com/reference/android/net/wifi/p2p/WifiP2pDevice.html#primaryDeviceType)
        ///
        /// Required feature: "java-lang-String"
        #[cfg(any(feature = "all", feature = "java-lang-String"))]
        pub fn primaryDeviceType<'env>(&'env self) -> __jni_bindgen::std::option::Option<__jni_bindgen::Local<'env, crate::java::lang::String>> {
            unsafe {
                let env = __jni_bindgen::Env::from_ptr(self.0.env);
                let (__jni_class, __jni_field) = env.require_class_field("android/net/wifi/p2p/WifiP2pDevice\0", "primaryDeviceType\0", "Ljava/lang/String;\0");
                env.get_object_field(self.0.object, __jni_field)
            }
        }

        /// **set** public [primaryDeviceType](https://developer.android.com/reference/android/net/wifi/p2p/WifiP2pDevice.html#primaryDeviceType)
        ///
        /// Required feature: "java-lang-String"
        #[cfg(any(feature = "all", feature = "java-lang-String"))]
        pub fn set_primaryDeviceType<'env, 'obj>(&'env self, value: impl __jni_bindgen::std::convert::Into<__jni_bindgen::std::option::Option<&'obj crate::java::lang::String>>) {
            unsafe {
                let env = __jni_bindgen::Env::from_ptr(self.0.env);
                let (__jni_class, __jni_field) = env.require_class_field("android/net/wifi/p2p/WifiP2pDevice\0", "primaryDeviceType\0", "Ljava/lang/String;\0");
                env.set_object_field(self.0.object, __jni_field, value)
            }
        }

        /// **get** public [secondaryDeviceType](https://developer.android.com/reference/android/net/wifi/p2p/WifiP2pDevice.html#secondaryDeviceType)
        ///
        /// Required feature: "java-lang-String"
        #[cfg(any(feature = "all", feature = "java-lang-String"))]
        pub fn secondaryDeviceType<'env>(&'env self) -> __jni_bindgen::std::option::Option<__jni_bindgen::Local<'env, crate::java::lang::String>> {
            unsafe {
                let env = __jni_bindgen::Env::from_ptr(self.0.env);
                let (__jni_class, __jni_field) = env.require_class_field("android/net/wifi/p2p/WifiP2pDevice\0", "secondaryDeviceType\0", "Ljava/lang/String;\0");
                env.get_object_field(self.0.object, __jni_field)
            }
        }

        /// **set** public [secondaryDeviceType](https://developer.android.com/reference/android/net/wifi/p2p/WifiP2pDevice.html#secondaryDeviceType)
        ///
        /// Required feature: "java-lang-String"
        #[cfg(any(feature = "all", feature = "java-lang-String"))]
        pub fn set_secondaryDeviceType<'env, 'obj>(&'env self, value: impl __jni_bindgen::std::convert::Into<__jni_bindgen::std::option::Option<&'obj crate::java::lang::String>>) {
            unsafe {
                let env = __jni_bindgen::Env::from_ptr(self.0.env);
                let (__jni_class, __jni_field) = env.require_class_field("android/net/wifi/p2p/WifiP2pDevice\0", "secondaryDeviceType\0", "Ljava/lang/String;\0");
                env.set_object_field(self.0.object, __jni_field, value)
            }
        }

        /// **get** public [status](https://developer.android.com/reference/android/net/wifi/p2p/WifiP2pDevice.html#status)
        pub fn status<'env>(&'env self) -> i32 {
            unsafe {
                let env = __jni_bindgen::Env::from_ptr(self.0.env);
                let (__jni_class, __jni_field) = env.require_class_field("android/net/wifi/p2p/WifiP2pDevice\0", "status\0", "I\0");
                env.get_int_field(self.0.object, __jni_field)
            }
        }

        /// **set** public [status](https://developer.android.com/reference/android/net/wifi/p2p/WifiP2pDevice.html#status)
        pub fn set_status<'env>(&'env self, value: i32) {
            unsafe {
                let env = __jni_bindgen::Env::from_ptr(self.0.env);
                let (__jni_class, __jni_field) = env.require_class_field("android/net/wifi/p2p/WifiP2pDevice\0", "status\0", "I\0");
                env.set_int_field(self.0.object, __jni_field, value)
            }
        }
    }
}