gecko-dev/dom/webidl/BluetoothDevice.webidl
Alexandre Lissy 6798f02654 Bug 1286530 - Clean AvailableIn, CheckAnyPermissions and CheckAllPermissions from WebIDL r=bz,fabrice
MozReview-Commit-ID: 6EQfBM09xUE

--HG--
rename : dom/contacts/tests/test_contacts_cache.xul => dom/contacts/tests/test_contacts_a_cache.xul
rename : dom/contacts/tests/test_contacts_shutdown.xul => dom/contacts/tests/test_contacts_a_shutdown.xul
rename : dom/contacts/tests/test_contacts_upgrade.xul => dom/contacts/tests/test_contacts_a_upgrade.xul
rename : dom/mobilemessage/tests/mochitest/mochitest.ini => dom/mobilemessage/tests/mochitest/chrome.ini
extra : rebase_source : 5f708f2a927fafff66626367ef07080785ba9f55
2016-04-21 15:48:59 +02:00

66 lines
1.9 KiB
Plaintext

/* -*- Mode: c++; c-basic-offset: 2; indent-tabs-mode: nil; tab-width: 40 -*- */
/* vim: set ts=2 et sw=2 tw=80: */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this file,
* You can obtain one at http://mozilla.org/MPL/2.0/. */
[ChromeOnly]
interface BluetoothDevice : EventTarget
{
readonly attribute DOMString address;
readonly attribute BluetoothClassOfDevice cod;
readonly attribute DOMString name;
readonly attribute boolean paired;
readonly attribute BluetoothDeviceType type;
/**
* Retrieve the BluetoothGatt interface to interact with remote BLE devices.
* This attribute is null if the device type is not dual or le.
*
* [B2G only GATT client API]
* gatt attribute is exposed only if "dom.bluetooth.webbluetooth.enabled"
* preference is false.
*/
[Func="mozilla::dom::bluetooth::BluetoothManager::B2GGattClientEnabled"]
readonly attribute BluetoothGatt? gatt;
[Cached, Pure]
readonly attribute sequence<DOMString> uuids;
// Fired when attribute(s) of BluetoothDevice changed
attribute EventHandler onattributechanged;
/**
* Fetch the up-to-date UUID list of each bluetooth service that the device
* provides and refresh the cache value of attribute uuids if it is updated.
*
* If the operation succeeds, the promise will be resolved with up-to-date
* UUID list which is identical to attribute uuids.
*/
[NewObject]
Promise<sequence<DOMString>> fetchUuids();
};
enum BluetoothDeviceType
{
"unknown",
"classic",
"le",
"dual"
};
/*
* Possible device attributes that attributechanged event reports.
* Note "address" and "type" are excluded since they never change once
* BluetoothDevice is created.
*/
enum BluetoothDeviceAttribute
{
"unknown",
"cod",
"name",
"paired",
"uuids"
};