1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
// WARNING:  This file was autogenerated by jni-bindgen.  Any changes to this file may be lost!!!


__jni_bindgen! {
    /// public final class [BluetoothSocket](https://developer.android.com/reference/android/bluetooth/BluetoothSocket.html)
    ///
    /// Required feature: android-bluetooth-BluetoothSocket
    #[cfg(any(feature = "all", feature = "android-bluetooth-BluetoothSocket"))]
    public final class BluetoothSocket extends crate::java::lang::Object, implements crate::java::io::Closeable {

        // // Not emitting: Non-public method
        // /// <init>
        // ///
        // /// Required features: "android-bluetooth-BluetoothSocket"
        // #[cfg(any(feature = "all", all(feature = "android-bluetooth-BluetoothSocket")))]
        // fn new<'env>(__jni_env: &'env __jni_bindgen::Env, arg0: impl __jni_bindgen::std::convert::Into<__jni_bindgen::std::option::Option<&'env crate::android::bluetooth::BluetoothSocket>>) -> __jni_bindgen::Result<__jni_bindgen::Local<'env, crate::android::bluetooth::BluetoothSocket>> {
        //     // class.path == "android/bluetooth/BluetoothSocket", java.flags == (empty), .name == "<init>", .descriptor == "(Landroid/bluetooth/BluetoothSocket;)V"
        //     unsafe {
        //         let __jni_args = [__jni_bindgen::AsJValue::as_jvalue(&arg0.into())];
        //         let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/BluetoothSocket\0", "<init>\0", "(Landroid/bluetooth/BluetoothSocket;)V\0");
        //         __jni_env.new_object_a(__jni_class, __jni_method, __jni_args.as_ptr())
        //     }
        // }

        // // Not emitting: Non-public method
        // /// [finalize](https://developer.android.com/reference/android/bluetooth/BluetoothSocket.html#finalize())
        // fn finalize<'env>(&'env self) -> __jni_bindgen::Result<()> {
        //     // class.path == "android/bluetooth/BluetoothSocket", java.flags == PROTECTED, .name == "finalize", .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/bluetooth/BluetoothSocket\0", "finalize\0", "()V\0");
        //         __jni_env.call_void_method_a(self.0.object, __jni_method, __jni_args.as_ptr())
        //     }
        // }

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

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

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

        /// [isConnected](https://developer.android.com/reference/android/bluetooth/BluetoothSocket.html#isConnected())
        pub fn is_connected<'env>(&'env self) -> __jni_bindgen::Result<bool> {
            // class.path == "android/bluetooth/BluetoothSocket", java.flags == PUBLIC, .name == "isConnected", .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/bluetooth/BluetoothSocket\0", "isConnected\0", "()Z\0");
                __jni_env.call_boolean_method_a(self.0.object, __jni_method, __jni_args.as_ptr())
            }
        }

        /// [connect](https://developer.android.com/reference/android/bluetooth/BluetoothSocket.html#connect())
        pub fn connect<'env>(&'env self) -> __jni_bindgen::Result<()> {
            // class.path == "android/bluetooth/BluetoothSocket", java.flags == PUBLIC, .name == "connect", .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/bluetooth/BluetoothSocket\0", "connect\0", "()V\0");
                __jni_env.call_void_method_a(self.0.object, __jni_method, __jni_args.as_ptr())
            }
        }

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

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

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

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

        /// public static final [TYPE_L2CAP](https://developer.android.com/reference/android/bluetooth/BluetoothSocket.html#TYPE_L2CAP)
        pub const TYPE_L2CAP : i32 = 3;

        /// public static final [TYPE_RFCOMM](https://developer.android.com/reference/android/bluetooth/BluetoothSocket.html#TYPE_RFCOMM)
        pub const TYPE_RFCOMM : i32 = 1;

        /// public static final [TYPE_SCO](https://developer.android.com/reference/android/bluetooth/BluetoothSocket.html#TYPE_SCO)
        pub const TYPE_SCO : i32 = 2;
    }
}