Chromium Code Reviews| Index: chrome/common/extensions/api/bluetooth_low_energy.idl |
| diff --git a/chrome/common/extensions/api/bluetooth_low_energy.idl b/chrome/common/extensions/api/bluetooth_low_energy.idl |
| index b5e7665c067f70e5cc2ab99a49e1480212950e01..e07f05ccbe8a2e0b16a661d87b014ac4b74cc29a 100644 |
| --- a/chrome/common/extensions/api/bluetooth_low_energy.idl |
| +++ b/chrome/common/extensions/api/bluetooth_low_energy.idl |
| @@ -108,6 +108,23 @@ namespace bluetoothLowEnergy { |
| // These functions all report failures via chrome.runtime.lastError. |
| interface Functions { |
| + // Establishes a connection between the application and the device with the |
| + // given address. A device may be already connected and its GATT services |
| + // available without calling <code>connect</code>, however, an app that |
| + // wants to access GATT services of a device should call this function to |
| + // make sure that a connection to the device is maintained. If the device |
| + // is not connected, all GATT services of the device will be discovered |
| + // after a successful call to <code>connect</code>. |
| + // |deviceAddress| : The Bluetooth address of the remote device to which a |
| + // GATT connection should be opened. |
| + // |callback| : Called when the connect request has completed. |
| + static void connect(DOMString deviceAddress, ResultCallback callback); |
| + |
| + // Closes the app's connection to the device with the given address. Note |
| + // that this will not always destroy the physical link itself, since there |
| + // may be other apps with open connections. |
| + static void disconnect(DOMString deviceAddress, ResultCallback callback); |
|
keybuk
2014/06/19 17:23:49
Make the disconnect callback optional for consiste
armansito
2014/06/19 21:58:34
Done.
|
| + |
| // Get the GATT service with the given instance ID. |
| // |serviceId| : The instance ID of the requested GATT service. |
| // |callback| : Called with the requested Service object. |
| @@ -115,7 +132,7 @@ namespace bluetoothLowEnergy { |
| // Get all the GATT services that were discovered on the remote device with |
| // the given device address. |
| - // |deviceAddress| : The Bluetooth Address of the remote device whose GATT |
| + // |deviceAddress| : The Bluetooth address of the remote device whose GATT |
| // services should be returned. |
| // |callback| : Called with the list of requested Service objects. |
| static void getServices(DOMString deviceAddress, ServicesCallback callback); |