Confirmed users
185
edits
mNo edit summary |
|||
| Line 1: | Line 1: | ||
== Overview == | == Overview == | ||
'''BluetoothPairingEvent''' is carried as the argument of pairing related event handlers, including [ | '''BluetoothPairingEvent''' is carried as the argument of pairing related event handlers, including [[B2G/Bluetooth/WebBluetooth-v2/BluetoothAdapter#ondisplaypasskeyreq|adapter.ondisplaypasskeyreq]], [[B2G/Bluetooth/WebBluetooth-v2/BluetoothAdapter#onenterpasskeyreq|adapter.onenterpasskeyreq]], [[B2G/Bluetooth/WebBluetooth-v2/BluetoothAdapter#onpairingconfirmationreq|adapter.onpairingconfirmationreq]], and [[B2G/Bluetooth/WebBluetooth-v2/BluetoothAdapter#onpairingconsentreq|adapter.onpairingconsentreq]]. Applications can get the pairing [[B2G/Bluetooth/WebBluetooth-v2/BluetoothDevice|BluetoothDevice]] object, and the passkey to display on local UI ([[B2G/Bluetooth/WebBluetooth-v2/BluetoothAdapter#ondisplaypasskeyreq|adapter.ondisplaypasskeyreq]]) or to confirm ([[B2G/Bluetooth/WebBluetooth-v2/BluetoothAdapter#onpairingconfirmationreq|adapter.onpairingconfirmationreq]]). Applications can also reply the passkey entered by user ([[B2G/Bluetooth/WebBluetooth-v2/BluetoothAdapter#onenterpasskeyreq|adapter.onenterpasskeyreq]]) or reply user confirmation on passkey ([[B2G/Bluetooth/WebBluetooth-v2/BluetoothAdapter#onpairingconfirmationreq|adapter.onpairingconfirmationreq]]). | ||
== Interface == | == Interface == | ||
interface BluetoothPairingEvent : Event | interface BluetoothPairingEvent : Event | ||
{ | { | ||
readonly attribute BluetoothDevice [ | readonly attribute BluetoothDevice [[B2G/Bluetooth/WebBluetooth-v2/BluetoothPairingEvent#device|device]]; | ||
readonly attribute unsigned long? [ | readonly attribute unsigned long? [[B2G/Bluetooth/WebBluetooth-v2/BluetoothPairingEvent#passkey|passkey]]; | ||
DOMRequest? [ | DOMRequest? [[B2G/Bluetooth/WebBluetooth-v2/BluetoothPairingEvent#setPasskey.28DOMString_aPasskey.29|setPasskey(DOMString aPasskey)]]; | ||
DOMRequest? [ | DOMRequest? [[B2G/Bluetooth/WebBluetooth-v2/BluetoothPairingEvent#setPairingConfirmation.28boolean_aConfirm.29|setPairingConfirmation(boolean aConfirm)]]; | ||
}; | }; | ||
== Properties == | == Properties == | ||
* [ | * [[B2G/Bluetooth/WebBluetooth-v2/BluetoothPairingEvent#device|BluetoothPairingEvent.device]] | ||
* [ | * [[B2G/Bluetooth/WebBluetooth-v2/BluetoothPairingEvent#passkey|BluetoothPairingEvent.passkey]] | ||
=== device === | === device === | ||
| Line 22: | Line 22: | ||
; Value type | ; Value type | ||
: [ | : [[B2G/Bluetooth/WebBluetooth-v2/BluetoothDevice|BluetoothDevice]] | ||
=== passkey === | === passkey === | ||
| Line 35: | Line 35: | ||
== Methods == | == Methods == | ||
* [ | * [[B2G/Bluetooth/WebBluetooth-v2/BluetoothPairingEvent#setPasskey.28DOMString_aPasskey.29|BluetoothPairingEvent.setPasskey(DOMString aPasskey)]] | ||
* [ | * [[B2G/Bluetooth/WebBluetooth-v2/BluetoothPairingEvent#setPairingConfirmation.28boolean_aConfirm.29|BluetoothPairingEvent.setPairingConfirmation(boolean aConfirm)]] | ||
=== setPasskey(DOMString aPasskey) === | === setPasskey(DOMString aPasskey) === | ||