DXR is a code search and navigation tool aimed at making sense of large projects. It supports full-text and regex searches as well as structural queries.

Mercurial (dcc6d7a0dc00)

VCS Links

Line Code
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60
/* -*- 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/. */

[CheckAnyPermissions="bluetooth"]
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.
   */
  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"
};