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 [use_movable_types=true] 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 |
11 // preserved when calling $ref:update. | 11 // preserved when calling $ref:update. |
12 dictionary SocketProperties { | 12 dictionary SocketProperties { |
13 // Flag indicating whether the socket is left open when the event page of | 13 // Flag indicating whether the socket is left open when the event page of |
14 // the application is unloaded (see <a | 14 // the application is unloaded (see <a |
15 // href="http://developer.chrome.com/apps/app_lifecycle.html">Manage App | 15 // href="http://developer.chrome.com/apps/app_lifecycle.html">Manage App |
16 // Lifecycle</a>). The default value is <code>false.</code> When the | 16 // Lifecycle</a>). The default value is <code>false.</code> When the |
17 // application is loaded, any sockets previously opened with persistent=true | 17 // application is loaded, any sockets previously opened with persistent=true |
(...skipping 289 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
307 static void onReceive(ReceiveInfo info); | 307 static void onReceive(ReceiveInfo info); |
308 | 308 |
309 // Event raised when a network error occured while the runtime was waiting | 309 // Event raised when a network error occured while the runtime was waiting |
310 // for data on the socket. Once this event is raised, the socket is set to | 310 // for data on the socket. Once this event is raised, the socket is set to |
311 // <code>paused</code> and no more <code>onReceive</code> events are raised | 311 // <code>paused</code> and no more <code>onReceive</code> events are raised |
312 // for this socket. | 312 // for this socket. |
313 // |info| : The event data. | 313 // |info| : The event data. |
314 static void onReceiveError(ReceiveErrorInfo info); | 314 static void onReceiveError(ReceiveErrorInfo info); |
315 }; | 315 }; |
316 }; | 316 }; |
OLD | NEW |