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

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

Issue 2861533004: Implement chrome.bluetoothLowEnergy.resetAdvertising(). (Closed)
Patch Set: Implement chrome.bluetoothLowEnergy.resetAllAdvertisements(). Created 3 years, 5 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 452 matching lines...) Expand 10 before | Expand all | Expand 10 after
463 463
464 // Unregisters an advertisement and stops its advertising. If the 464 // Unregisters an advertisement and stops its advertising. If the
465 // advertisement fails to unregister the only way to stop advertising 465 // advertisement fails to unregister the only way to stop advertising
466 // might be to restart the device. 466 // might be to restart the device.
467 // |advertisementId|: Id of the advertisement to unregister. 467 // |advertisementId|: Id of the advertisement to unregister.
468 // |callback|: Called once the advertisement is unregistered and is no 468 // |callback|: Called once the advertisement is unregistered and is no
469 // longer being advertised. 469 // longer being advertised.
470 static void unregisterAdvertisement(long advertisementId, 470 static void unregisterAdvertisement(long advertisementId,
471 ResultCallback callback); 471 ResultCallback callback);
472 472
473 // Resets advertising on the current device. It will unregister and
474 // stop all existing advertisements.
475 // |callback|: Called once the advertisements are reset.
476 static void resetAdvertising(ResultCallback callback);
477
473 // Set's the interval betweeen two consecutive advertisements. Note: 478 // Set's the interval betweeen two consecutive advertisements. Note:
474 // This is a best effort. The actual interval may vary non-trivially 479 // This is a best effort. The actual interval may vary non-trivially
475 // from the requested intervals. On some hardware, there is a minimum 480 // from the requested intervals. On some hardware, there is a minimum
476 // interval of 100ms. The minimum and maximum values cannot exceed the 481 // interval of 100ms. The minimum and maximum values cannot exceed the
477 // the range allowed by the Bluetooth 4.2 specification. 482 // the range allowed by the Bluetooth 4.2 specification.
478 // |minInterval|: Minimum interval between advertisments (in 483 // |minInterval|: Minimum interval between advertisments (in
479 // milliseconds). This cannot be lower than 20ms (as per the spec). 484 // milliseconds). This cannot be lower than 20ms (as per the spec).
480 // |maxInterval|: Maximum interval between advertisments (in 485 // |maxInterval|: Maximum interval between advertisments (in
481 // milliseconds). This cannot be more than 10240ms (as per the spec). 486 // milliseconds). This cannot be more than 10240ms (as per the spec).
482 // |callback|: Called once the interval has been set. 487 // |callback|: Called once the interval has been set.
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
562 // this request for a long time may lead to a disconnection. 567 // this request for a long time may lead to a disconnection.
563 // This event is only available if the app has both the 568 // This event is only available if the app has both the
564 // bluetooth:low_energy and the bluetooth:peripheral permissions set to 569 // bluetooth:low_energy and the bluetooth:peripheral permissions set to
565 // true. The peripheral permission may not be available to all apps. 570 // true. The peripheral permission may not be available to all apps.
566 // |request|: Request data for this request. 571 // |request|: Request data for this request.
567 // |descriptor|: The GATT descriptor whose value is being written. 572 // |descriptor|: The GATT descriptor whose value is being written.
568 static void onDescriptorWriteRequest( 573 static void onDescriptorWriteRequest(
569 Request request, DOMString descriptorId); 574 Request request, DOMString descriptorId);
570 }; 575 };
571 }; 576 };
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698