| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 // Use the <code>chrome.bluetoothSocket</code> API to send and receive data | 5 // Use the <code>chrome.bluetoothSocket</code> API to send and receive data |
| 6 // to Bluetooth devices using RFCOMM and L2CAP connections. | 6 // to Bluetooth devices using RFCOMM and L2CAP connections. |
| 7 namespace bluetoothSocket { | 7 namespace bluetoothSocket { |
| 8 // The socket properties specified in the $ref:create or $ref:update | 8 // The socket properties specified in the $ref:create or $ref:update |
| 9 // function. Each property is optional. If a property value is not specified, | 9 // function. Each property is optional. If a property value is not specified, |
| 10 // a default value is used when calling $ref:create, or the existing value is | 10 // a default value is used when calling $ref:create, or the existing value is |
| (...skipping 28 matching lines...) Expand all Loading... |
| 39 | 39 |
| 40 // Callback from the <code>update</code> method. | 40 // Callback from the <code>update</code> method. |
| 41 callback UpdateCallback = void (); | 41 callback UpdateCallback = void (); |
| 42 | 42 |
| 43 // Callback from the <code>setPaused</code> method. | 43 // Callback from the <code>setPaused</code> method. |
| 44 callback SetPausedCallback = void (); | 44 callback SetPausedCallback = void (); |
| 45 | 45 |
| 46 // Callback from the <code>listenUsingRfcomm</code>, | 46 // Callback from the <code>listenUsingRfcomm</code>, |
| 47 // <code>listenUsingInsecureRfcomm</code> and | 47 // <code>listenUsingInsecureRfcomm</code> and |
| 48 // <code>listenUsingL2cap</code> methods. | 48 // <code>listenUsingL2cap</code> methods. |
| 49 // |result| : The result code returned from the underlying network call. | 49 callback ListenCallback = void (); |
| 50 // A negative value indicates an error. | |
| 51 callback ListenCallback = void (long result); | |
| 52 | 50 |
| 53 // Callback from the <code>connect</code> method. | 51 // Callback from the <code>connect</code> method. |
| 54 callback ConnectCallback = void (); | 52 callback ConnectCallback = void (); |
| 55 | 53 |
| 56 // Callback from the <code>disconnect</code> method. | 54 // Callback from the <code>disconnect</code> method. |
| 57 callback DisconnectCallback = void (); | 55 callback DisconnectCallback = void (); |
| 58 | 56 |
| 59 // Callback from the <code>close</code> method. | 57 // Callback from the <code>close</code> method. |
| 60 callback CloseCallback = void (); | 58 callback CloseCallback = void (); |
| 61 | 59 |
| (...skipping 253 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 315 static void onReceive(ReceiveInfo info); | 313 static void onReceive(ReceiveInfo info); |
| 316 | 314 |
| 317 // Event raised when a network error occured while the runtime was waiting | 315 // Event raised when a network error occured while the runtime was waiting |
| 318 // for data on the socket. Once this event is raised, the socket is set to | 316 // for data on the socket. Once this event is raised, the socket is set to |
| 319 // <code>paused</code> and no more <code>onReceive</code> events are raised | 317 // <code>paused</code> and no more <code>onReceive</code> events are raised |
| 320 // for this socket. | 318 // for this socket. |
| 321 // |info| : The event data. | 319 // |info| : The event data. |
| 322 static void onReceiveError(ReceiveErrorInfo info); | 320 static void onReceiveError(ReceiveErrorInfo info); |
| 323 }; | 321 }; |
| 324 }; | 322 }; |
| OLD | NEW |