2014-05-20 23:12:24 -07:00
|
|
|
/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
|
|
|
/* 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/. */
|
|
|
|
|
2014-05-27 19:21:59 -07:00
|
|
|
[CheckPermissions="bluetooth"]
|
|
|
|
interface BluetoothManager: EventTarget
|
|
|
|
{
|
|
|
|
readonly attribute BluetoothAdapter? defaultAdapter;
|
2014-05-20 23:12:24 -07:00
|
|
|
|
2014-09-10 19:03:40 -07:00
|
|
|
// Fired when attribute(s) of BluetoothManager changed
|
2014-05-27 19:21:59 -07:00
|
|
|
attribute EventHandler onattributechanged;
|
2014-09-10 19:03:40 -07:00
|
|
|
|
|
|
|
// Fired when a new adapter is plugged in
|
2014-05-20 23:12:24 -07:00
|
|
|
attribute EventHandler onadapteradded;
|
2014-09-10 19:03:40 -07:00
|
|
|
|
|
|
|
// Fired when an existing adapter is unplugged
|
2014-05-27 19:21:59 -07:00
|
|
|
attribute EventHandler onadapterremoved;
|
2014-05-20 23:12:24 -07:00
|
|
|
|
2014-05-27 19:21:59 -07:00
|
|
|
sequence<BluetoothAdapter> getAdapters();
|
|
|
|
};
|
|
|
|
|
|
|
|
enum BluetoothManagerAttribute
|
|
|
|
{
|
|
|
|
"unknown",
|
|
|
|
"defaultAdapter"
|
2014-05-20 23:12:24 -07:00
|
|
|
};
|