Confirmed users
891
edits
No edit summary |
|||
| Line 5: | Line 5: | ||
interface BluetoothPairingEvent : Event | interface BluetoothPairingEvent : Event | ||
{ | { | ||
readonly attribute | readonly attribute BluetoothDevice device; | ||
readonly attribute unsigned long passkey; | |||
readonly attribute unsigned long? passkey; | |||
DOMRequest? setPasskey(DOMString aPasskey); | |||
DOMRequest? setPairingConfirmation(boolean aConfirm); | |||
}; | }; | ||
== Properties == | == Properties == | ||
* [https://wiki.mozilla.org/B2G/Bluetooth/WebBluetooth-v2/BluetoothPairingEvent# | * [https://wiki.mozilla.org/B2G/Bluetooth/WebBluetooth-v2/BluetoothPairingEvent#device BluetoothPairingEvent.device] | ||
* [https://wiki.mozilla.org/B2G/Bluetooth/WebBluetooth-v2/BluetoothPairingEvent#passkey BluetoothPairingEvent.passkey] | * [https://wiki.mozilla.org/B2G/Bluetooth/WebBluetooth-v2/BluetoothPairingEvent#passkey BluetoothPairingEvent.passkey] | ||
=== | === device === | ||
; Description | ; Description | ||
: The | : The remote pairing bluetooth device. | ||
; Value type | ; Value type | ||
: | : [https://wiki.mozilla.org/B2G/Bluetooth/WebBluetooth-v2/BluetoothDevice BluetoothDevice] | ||
=== passkey === | === passkey === | ||
; Description | ; Description | ||
: | : The passkey generated during the pairing process when both devices support secure simple pairing (SSP). The valid values of passkey are decimal 000000 - 999999. | ||
; Value type | ; Value type | ||
: unsigned long | : unsigned long | ||
; Default value | |||
: 0 | |||
== Methods == | |||
* [https://wiki.mozilla.org/B2G/Bluetooth/WebBluetooth-v2/BluetoothPairingEvent#setPasskey.28DOMString_aPasskey.29 BluetoothPairingEvent.setPasskey(DOMString aPasskey)] | |||
* [https://wiki.mozilla.org/B2G/Bluetooth/WebBluetooth-v2/BluetoothPairingEvent#setPairingConfirmation.28boolean_aConfirm.29 BluetoothPairingEvent.setPairingConfirmation(boolean aConfirm)] | |||
=== setPasskey(DOMString aPasskey) === | |||
; Description | |||
: The method replies the requested passkey when the device's adapter is pairing with a remote device. | |||
; Parameter | |||
: ''aPasskey'' | |||
:: A DOMString representing the passkey code set by user. | |||
; Return | |||
: A DOMRequest object to handle the success or error of the operation. In case of success, it means that the setPasskey operation has completed. | |||
=== setPairingConfirmation(boolean aConfirm) === | |||
; Description | |||
: The method replies the pairing confirmation when the device's adapter is pairing with a remote device. | |||
; Parameter | |||
: ''aConfirm'' | |||
:: A boolean indicating whether user confirms pairing with the remote device (true) or not (false). | |||
; Return | |||
: A DOMRequest object to handle the success or error of the operation. In case of success, it means that the setPairingConfirmation operation has completed. | |||