B2G/Bluetooth/WebBluetooth-v2/BluetoothAdapterEvent: Difference between revisions
< B2G | Bluetooth | WebBluetooth-v2
Jump to navigation
Jump to search
mNo edit summary |
|||
| Line 1: | Line 1: | ||
== Overview == | == Overview == | ||
'''BluetoothAdapterEvent''' is carried as the parameter of [ | '''BluetoothAdapterEvent''' is carried as the parameter of [[B2G/Bluetooth/WebBluetooth-v2/BluetoothManager#onadapteradded|manager.onadapteradded]] and [[B2G/Bluetooth/WebBluetooth-v2/BluetoothManager#onadapterremoved|manager.onadapterremoved]] event handlers. Applications can know whether the added/removed adapter is default adapter, and get the added [[B2G/Bluetooth/WebBluetooth-v2/BluetoothAdapter|BluetoothAdapter]] object or the address of removed adapter. | ||
== Interface == | == Interface == | ||
interface BluetoothAdapterEvent : Event | interface BluetoothAdapterEvent : Event | ||
{ | { | ||
readonly attribute boolean [ | readonly attribute boolean [[B2G/Bluetooth/WebBluetooth-v2/BluetoothAdapterEvent#isDefault|isDefault]]; | ||
readonly attribute BluetoothAdapter? [ | readonly attribute BluetoothAdapter? [[B2G/Bluetooth/WebBluetooth-v2/BluetoothAdapterEvent#adapter|adapter]]; | ||
readonly attribute DOMString? [ | readonly attribute DOMString? [[B2G/Bluetooth/WebBluetooth-v2/BluetoothAdapterEvent#address|address]]; | ||
}; | }; | ||
== Properties == | == Properties == | ||
* [ | * [[B2G/Bluetooth/WebBluetooth-v2/BluetoothAdapterEvent#isDefault|BluetoothAdapterEvent.isDefault]] | ||
* [ | * [[B2G/Bluetooth/WebBluetooth-v2/BluetoothAdapterEvent#adapter|BluetoothAdapterEvent.adapter]] | ||
* [ | * [[B2G/Bluetooth/WebBluetooth-v2/BluetoothAdapterEvent#address|BluetoothAdapterEvent.address]] | ||
=== isDefault === | === isDefault === | ||
| Line 27: | Line 27: | ||
; Value type | ; Value type | ||
: [ | : [[B2G/Bluetooth/WebBluetooth-v2/BluetoothAdapter|BluetoothAdapter]] | ||
; Default value | ; Default value | ||
Revision as of 02:11, 3 April 2014
Overview
BluetoothAdapterEvent is carried as the parameter of manager.onadapteradded and manager.onadapterremoved event handlers. Applications can know whether the added/removed adapter is default adapter, and get the added BluetoothAdapter object or the address of removed adapter.
Interface
interface BluetoothAdapterEvent : Event
{
readonly attribute boolean isDefault;
readonly attribute BluetoothAdapter? adapter;
readonly attribute DOMString? address;
};
Properties
isDefault
- Description
- Whether the added/removed adapter is default adapter (true) or not (false).
- Value type
- boolean
adapter
- Description
- The added adapter.
- Value type
- BluetoothAdapter
- Default value
- Null pointer
address
- Description
- The address of removed adapter.
- Value type
- DOMString
- Default value
- Empty string ("")