OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 // Bluetooth API. | 5 // Bluetooth API. |
6 | 6 |
7 namespace bluetooth { | 7 namespace bluetooth { |
8 dictionary AdapterState { | 8 dictionary AdapterState { |
9 // The address of the adapter, in the format 'XX:XX:XX:XX:XX:XX'. | 9 // The address of the adapter, in the format 'XX:XX:XX:XX:XX:XX'. |
10 DOMString address; | 10 DOMString address; |
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
75 DOMString name; | 75 DOMString name; |
76 | 76 |
77 // The UUID of the service. | 77 // The UUID of the service. |
78 DOMString? uuid; | 78 DOMString? uuid; |
79 }; | 79 }; |
80 | 80 |
81 dictionary Socket { | 81 dictionary Socket { |
82 // The remote Bluetooth device associated with this socket. | 82 // The remote Bluetooth device associated with this socket. |
83 Device device; | 83 Device device; |
84 | 84 |
85 // The remote Bluetooth service associated with this socket. | 85 // The remote Bluetooth profile associated with this socket. |
86 DOMString serviceUuid; | 86 Profile profile; |
87 | 87 |
88 // An identifier for this socket that should be used with the | 88 // An identifier for this socket that should be used with the |
89 // read/write/disconnect methods. | 89 // read/write/disconnect methods. |
90 long id; | 90 long id; |
91 }; | 91 }; |
92 | 92 |
93 dictionary OutOfBandPairingData { | 93 dictionary OutOfBandPairingData { |
94 // Simple Pairing Hash C. | 94 // Simple Pairing Hash C. |
95 // Always 16 octets long. | 95 // Always 16 octets long. |
96 ArrayBuffer hash; | 96 ArrayBuffer hash; |
(...skipping 180 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
277 interface Events { | 277 interface Events { |
278 // Fired when the state of the Bluetooth adapter changes. | 278 // Fired when the state of the Bluetooth adapter changes. |
279 // |state| : The new state of the adapter. | 279 // |state| : The new state of the adapter. |
280 static void onAdapterStateChanged(AdapterState state); | 280 static void onAdapterStateChanged(AdapterState state); |
281 | 281 |
282 // Fired when a connection has been made for a registered profile. | 282 // Fired when a connection has been made for a registered profile. |
283 // |socket| : The socket for the connection. | 283 // |socket| : The socket for the connection. |
284 static void onConnection(Socket socket); | 284 static void onConnection(Socket socket); |
285 }; | 285 }; |
286 }; | 286 }; |
OLD | NEW |