2012-02-20 19:15:19 +04:00
|
|
|
/* -*- Mode: c++; c-basic-offset: 2; indent-tabs-mode: nil; tab-width: 40 -*- */
|
|
|
|
/* vim: set ts=2 et sw=2 tw=40: */
|
|
|
|
/* 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/. */
|
|
|
|
|
2012-02-23 19:55:48 +04:00
|
|
|
#include "nsIDOMEventTarget.idl"
|
2012-02-20 19:15:19 +04:00
|
|
|
|
2012-07-18 07:41:54 +04:00
|
|
|
interface nsIDOMDOMRequest;
|
|
|
|
interface nsIDOMBluetoothDevice;
|
|
|
|
|
|
|
|
[scriptable, builtinclass, uuid(48df7f05-2bbc-4ac8-aa88-9fecd4c24028)]
|
2012-02-23 19:55:48 +04:00
|
|
|
interface nsIDOMBluetoothAdapter : nsIDOMEventTarget
|
2012-02-20 19:15:19 +04:00
|
|
|
{
|
2012-07-18 07:41:54 +04:00
|
|
|
readonly attribute DOMString address;
|
|
|
|
[binaryname(AdapterClass)] readonly attribute unsigned long class;
|
|
|
|
readonly attribute bool enabled;
|
|
|
|
readonly attribute bool discovering;
|
|
|
|
|
|
|
|
[implicit_jscontext]
|
|
|
|
readonly attribute jsval devices;
|
|
|
|
|
|
|
|
readonly attribute DOMString name;
|
|
|
|
readonly attribute bool discoverable;
|
|
|
|
// Unit: sec
|
|
|
|
readonly attribute unsigned long discoverableTimeout;
|
|
|
|
|
|
|
|
nsIDOMDOMRequest startDiscovery();
|
|
|
|
nsIDOMDOMRequest stopDiscovery();
|
|
|
|
// Fired when discoverying and any device is discovered.
|
|
|
|
attribute nsIDOMEventListener ondevicefound;
|
|
|
|
// Fired when any device is out of discoverable range.
|
|
|
|
attribute nsIDOMEventListener ondevicedisappeared;
|
|
|
|
// Fired when a property of the adapter is changed
|
|
|
|
attribute nsIDOMEventListener onpropertychanged;
|
2012-02-20 19:15:19 +04:00
|
|
|
};
|