B2G/Bluetooth/WebBluetooth-v2/BluetoothAdapterEvent: Difference between revisions

From MozillaWiki
Jump to navigation Jump to search
No edit summary
Line 6: Line 6:
  {
  {
   readonly attribute boolean isDefault;
   readonly attribute boolean isDefault;
 
   readonly attribute BluetoothAdapter? adapter;
   readonly attribute BluetoothAdapter? adapter;
   readonly attribute DOMString? address;
   readonly attribute DOMString? address;
Line 12: Line 12:


== Properties ==
== Properties ==
* [https://wiki.mozilla.org/B2G/Bluetooth/WebBluetooth-v2/BluetoothAdapterEvent#isDefault BluetoothAdapterEvent.isDefault]
* [https://wiki.mozilla.org/B2G/Bluetooth/WebBluetooth-v2/BluetoothAdapterEvent#adapter BluetoothAdapterEvent.adapter]
* [https://wiki.mozilla.org/B2G/Bluetooth/WebBluetooth-v2/BluetoothAdapterEvent#adapter BluetoothAdapterEvent.adapter]
* [https://wiki.mozilla.org/B2G/Bluetooth/WebBluetooth-v2/BluetoothAdapterEvent#isDefault BluetoothAdapterEvent.isDefault]
* [https://wiki.mozilla.org/B2G/Bluetooth/WebBluetooth-v2/BluetoothAdapterEvent#address BluetoothAdapterEvent.address]
 
=== isDefault ===
; Description
: Whether the added/removed adapter is default adapter (true) or not (false).
 
; Value type
: boolean


=== adapter ===
=== adapter ===
Line 22: Line 30:
: [https://wiki.mozilla.org/B2G/Bluetooth/WebBluetooth-v2/BluetoothAdapter BluetoothAdapter]
: [https://wiki.mozilla.org/B2G/Bluetooth/WebBluetooth-v2/BluetoothAdapter BluetoothAdapter]


=== isDefault ===
; Default value
: Null pointer
 
=== address ===
; Description
; Description
: Whether the added adapter is default adapter (true) or not (false).
: The address of removed adapter.


; Value type
; Value type
: boolean
: DOMString
 
; Default value
: Empty string ("")

Revision as of 03:12, 21 March 2014

Overview

BluetoothAdapterEvent is carried as the argument of manager.onadapteradded event handler. Applications can get the added BluetoothAdapter object and knows whether the added adapter is default 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 ("")