B2G/Bluetooth/WebBluetooth-v2/BluetoothPairingRequestListeningHandle
From MozillaWiki
< B2G | Bluetooth | WebBluetooth-v2
Contents
Overview
BluetoothPairingListener wraps event handlers triggered for different pairing types. These event handlers are available in certified applications only to keep privileged applications from replying other applications' pairing requests.
Interface
[AvailableIn=CertifiedApps, CheckPermissions="bluetooth"] interface BluetoothPairingListener: EventTarget { attribute EventHandler ondisplaypassykeyreq; attribute EventHandler onenterpincodereq; attribute EventHandler onpairingconfirmationreq; attribute EventHandler onpairingconsentreq; }
Event Handler
- BluetoothPairingListener.ondisplaypasskeyreq
- BluetoothPairingListener.onenterpincodereq
- BluetoothPairingListener.onpairingconfirmationreq
- BluetoothPairingListener.onpairingconsentreq
ondisplaypasskeyreq
- Description
- A handler to trigger when a remote bluetooth device requests to display passkey on the screen during pairing process.
- Parameter
- aPairingEvent
- The event is a BluetoothPairingEvent with property address as the remote bluetooth device's address, and property handle that carries the passkey to display.
onenterpincodereq
- Description
- A handler to trigger when a remote bluetooth device requests user enter PIN code during pairing process.
- Parameter
- aPairingEvent
- The event is a BluetoothPairingEvent with property device as the remote bluetooth device, and property handle that carries method setPinCode to reply the PIN code entered by user.
onpairingconfirmationreq
- Description
- A handler to trigger when a remote bluetooth device requests user confirm passkey during pairing process. Applications may prompt passkey to user for confirmation, or confirm the passkey for user proactively.
- Parameter
- aPairingEvent
- The event is a BluetoothPairingEvent with property device as the remote bluetooth device, and property handle that carries the passkey to confirm and method setPairingConfirmation to reply user confirmation.
onpairingconsentreq
- Description
- A handler to trigger when a remote bluetooth device requests user confirm pairing during pairing process. Applications may prompt user for confirmation or confirm for user proactively.
- Parameter
- aPairingEvent
- The event is a BluetoothPairingEvent with property device as the remote bluetooth device.