2014-05-21 10:12:24 +04: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/. */
|
|
|
|
|
2015-07-14 05:25:26 +03:00
|
|
|
[CheckAnyPermissions="bluetooth"]
|
2014-05-28 06:21:59 +04:00
|
|
|
interface BluetoothManager: EventTarget
|
|
|
|
{
|
|
|
|
readonly attribute BluetoothAdapter? defaultAdapter;
|
2014-05-21 10:12:24 +04:00
|
|
|
|
2014-09-11 06:03:40 +04:00
|
|
|
// Fired when attribute(s) of BluetoothManager changed
|
2014-05-28 06:21:59 +04:00
|
|
|
attribute EventHandler onattributechanged;
|
2014-09-11 06:03:40 +04:00
|
|
|
|
|
|
|
// Fired when a new adapter is plugged in
|
2014-05-21 10:12:24 +04:00
|
|
|
attribute EventHandler onadapteradded;
|
2014-09-11 06:03:40 +04:00
|
|
|
|
|
|
|
// Fired when an existing adapter is unplugged
|
2014-05-28 06:21:59 +04:00
|
|
|
attribute EventHandler onadapterremoved;
|
2014-05-21 10:12:24 +04:00
|
|
|
|
2014-05-28 06:21:59 +04:00
|
|
|
sequence<BluetoothAdapter> getAdapters();
|
|
|
|
};
|
|
|
|
|
|
|
|
enum BluetoothManagerAttribute
|
|
|
|
{
|
|
|
|
"unknown",
|
|
|
|
"defaultAdapter"
|
2014-05-21 10:12:24 +04:00
|
|
|
};
|