Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(6)

Side by Side Diff: chrome/common/extensions/api/bluetooth_low_energy.idl

Issue 2353133005: Add the chrome.bluetoothLowEnergy.setAdvertisingInterval API. (Closed)
Patch Set: . Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 // The <code>chrome.bluetoothLowEnergy</code> API is used to communicate with 5 // The <code>chrome.bluetoothLowEnergy</code> API is used to communicate with
6 // Bluetooth Smart (Low Energy) devices using the 6 // Bluetooth Smart (Low Energy) devices using the
7 // <a href="https://developer.bluetooth.org/TechnologyOverview/Pages/GATT.aspx"> 7 // <a href="https://developer.bluetooth.org/TechnologyOverview/Pages/GATT.aspx">
8 // Generic Attribute Profile (GATT)</a>. 8 // Generic Attribute Profile (GATT)</a>.
9 namespace bluetoothLowEnergy { 9 namespace bluetoothLowEnergy {
10 // Values representing the possible properties of a characteristic. 10 // Values representing the possible properties of a characteristic.
(...skipping 446 matching lines...) Expand 10 before | Expand all | Expand 10 after
457 457
458 // Unregisters an advertisement and stops its advertising. If the 458 // Unregisters an advertisement and stops its advertising. If the
459 // advertisement fails to unregister the only way to stop advertising 459 // advertisement fails to unregister the only way to stop advertising
460 // might be to restart the device. 460 // might be to restart the device.
461 // |advertisementId|: Id of the advertisement to unregister. 461 // |advertisementId|: Id of the advertisement to unregister.
462 // |callback|: Called once the advertisement is unregistered and is no 462 // |callback|: Called once the advertisement is unregistered and is no
463 // longer being advertised. 463 // longer being advertised.
464 static void unregisterAdvertisement(long advertisementId, 464 static void unregisterAdvertisement(long advertisementId,
465 ResultCallback callback); 465 ResultCallback callback);
466 466
467 // Set's the interval betweeen two consecutive advertisements. Note:
468 // This is a best effort. The actual interval may vary non-trivially
469 // from the requested intervals. On some hardware, there is a minimum
470 // interval of 100ms. The minimum and maximum values cannot exceed the
471 // the range allowed by the Bluetooth 4.2 specification.
472 // |minInterval|: Minimum interval between advertisments (in
473 // milliseconds). This cannot be lower than 20ms (as per the spec).
474 // |maxInterval|: Maximum interval between advertisments (in
475 // milliseconds). This cannot be more than 10240ms (as per the spec).
476 // |callback|: Called once the interval has been set.
477 static void setAdvertisingInterval(long minInterval, long maxInterval,
478 ResultCallback callback);
479
467 // Sends a response for a characteristic or descriptor read/write 480 // Sends a response for a characteristic or descriptor read/write
468 // request. 481 // request.
469 // This function is only available if the app has both the 482 // This function is only available if the app has both the
470 // bluetooth:low_energy and the bluetooth:peripheral permissions set to 483 // bluetooth:low_energy and the bluetooth:peripheral permissions set to
471 // true. The peripheral permission may not be available to all apps. 484 // true. The peripheral permission may not be available to all apps.
472 // |response|: The response to the request. 485 // |response|: The response to the request.
473 static void sendRequestResponse(Response response); 486 static void sendRequestResponse(Response response);
474 }; 487 };
475 488
476 interface Events { 489 interface Events {
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
543 // this request for a long time may lead to a disconnection. 556 // this request for a long time may lead to a disconnection.
544 // This event is only available if the app has both the 557 // This event is only available if the app has both the
545 // bluetooth:low_energy and the bluetooth:peripheral permissions set to 558 // bluetooth:low_energy and the bluetooth:peripheral permissions set to
546 // true. The peripheral permission may not be available to all apps. 559 // true. The peripheral permission may not be available to all apps.
547 // |request|: Request data for this request. 560 // |request|: Request data for this request.
548 // |descriptor|: The GATT descriptor whose value is being written. 561 // |descriptor|: The GATT descriptor whose value is being written.
549 static void onDescriptorWriteRequest( 562 static void onDescriptorWriteRequest(
550 Request request, DOMString descriptorId); 563 Request request, DOMString descriptorId);
551 }; 564 };
552 }; 565 };
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698