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

From MozillaWiki
Jump to navigation Jump to search
mNo edit summary
Line 1: Line 1:
== Overview ==
== Overview ==
'''BluetoothDeviceEvent''' is carried as the paramter of remote device paired/unpaired event handlers, including [https://wiki.mozilla.org/B2G/Bluetooth/WebBluetooth-v2/BluetoothAdapter#ondevicepaired adapter.ondevicepaired] and [https://wiki.mozilla.org/B2G/Bluetooth/WebBluetooth-v2/BluetoothAdapter#ondeviceunpaired adapter.ondeviceunpaired]. Applications can get the paired [https://wiki.mozilla.org/B2G/Bluetooth/WebBluetooth-v2/BluetoothDevice BluetoothDevice] object or the address of unpaired remote device.
'''BluetoothDeviceEvent''' is carried as the paramter of remote device paired/unpaired event handlers, including [[B2G/Bluetooth/WebBluetooth-v2/BluetoothAdapter#ondevicepaired|adapter.ondevicepaired]] and [[B2G/Bluetooth/WebBluetooth-v2/BluetoothAdapter#ondeviceunpaired|adapter.ondeviceunpaired]]. Applications can get the paired [[B2G/Bluetooth/WebBluetooth-v2/BluetoothDevice|BluetoothDevice]] object or the address of unpaired remote device.


== Interface ==
== Interface ==
  interface BluetoothDeviceEvent : Event
  interface BluetoothDeviceEvent : Event
  {
  {
   readonly attribute BluetoothDevice? [https://wiki.mozilla.org/B2G/Bluetooth/WebBluetooth-v2/BluetoothDeviceEvent#device device];
   readonly attribute BluetoothDevice? [[B2G/Bluetooth/WebBluetooth-v2/BluetoothDeviceEvent#device|device]];
   readonly attribute DOMString?      [https://wiki.mozilla.org/B2G/Bluetooth/WebBluetooth-v2/BluetoothDeviceEvent#address address];
   readonly attribute DOMString?      [[B2G/Bluetooth/WebBluetooth-v2/BluetoothDeviceEvent#address|address]];
  };
  };


== Properties ==
== Properties ==
* [https://wiki.mozilla.org/B2G/Bluetooth/WebBluetooth-v2/BluetoothDeviceEvent#device BluetoothAdapterEvent.device]
* [[B2G/Bluetooth/WebBluetooth-v2/BluetoothDeviceEvent#device|BluetoothAdapterEvent.device]]
* [https://wiki.mozilla.org/B2G/Bluetooth/WebBluetooth-v2/BluetoothDeviceEvent#address BluetoothAdapterEvent.address]
* [[B2G/Bluetooth/WebBluetooth-v2/BluetoothDeviceEvent#address|BluetoothAdapterEvent.address]]


=== device ===
=== device ===
Line 18: Line 18:


; Value type
; Value type
: [https://wiki.mozilla.org/B2G/Bluetooth/WebBluetooth-v2/BluetoothDevice BluetoothDevice]
: [[B2G/Bluetooth/WebBluetooth-v2/BluetoothDevice|BluetoothDevice]]


; Default Value
; Default Value

Revision as of 02:07, 3 April 2014

Overview

BluetoothDeviceEvent is carried as the paramter of remote device paired/unpaired event handlers, including adapter.ondevicepaired and adapter.ondeviceunpaired. Applications can get the paired BluetoothDevice object or the address of unpaired remote device.

Interface

interface BluetoothDeviceEvent : Event
{
  readonly attribute BluetoothDevice? device;
  readonly attribute DOMString?       address;
};

Properties

device

Description
The paired remote device.
Value type
BluetoothDevice
Default Value
Null pointer

address

Description
The address of unpaired remote device.
Value type
DOMString
Default Value
Empty string ("")