1 /* -*- Mode: c++; c-basic-offset: 2; indent-tabs-mode: nil; tab-width: 40 -*- */
2 /* vim: set ts=2 et sw=2 tw=80: */
3 /* This Source Code Form is subject to the terms of the Mozilla Public
4 * License, v. 2.0. If a copy of the MPL was not distributed with this file,
5 * You can obtain one at http://mozilla.org/MPL/2.0/. */
8 * Set of attributes that might be changed and reported by attributechanged
10 * Address is not included since it should not be changed once BluetoothDevice
13 enum BluetoothDeviceAttribute
22 [CheckPermissions="bluetooth"]
23 interface BluetoothDevice : EventTarget
25 readonly attribute DOMString address;
26 readonly attribute BluetoothClassOfDevice cod;
27 readonly attribute DOMString name;
28 readonly attribute boolean paired;
31 readonly attribute sequence<DOMString> uuids;
33 attribute EventHandler onattributechanged;
36 * Fetch the up-to-date UUID list of each bluetooth service that the device
37 * provides and refresh the cache value of attribute uuids if it is updated.
39 * If the operation succeeds, the promise will be resolved with up-to-date
40 * UUID list which is identical to attribute uuids.
43 Promise<sequence<DOMString>> fetchUuids();