B2G/Bluetooth/WebBluetooth-v2/BluetoothPairingListener: Difference between revisions
< B2G | Bluetooth | WebBluetooth-v2
Jump to navigation
Jump to search
(Created page with "== Overview == '''BluetoothPairingListener''' wraps event handlers triggered for different pairing types. These event handlers are available in certified applications only to ...") |
(Replace device with deviceName) |
||
(One intermediate revision by one other user not shown) | |||
Line 5: | Line 5: | ||
[AvailableIn=CertifiedApps, CheckPermissions="bluetooth"] | [AvailableIn=CertifiedApps, CheckPermissions="bluetooth"] | ||
interface BluetoothPairingListener: EventTarget { | interface BluetoothPairingListener: EventTarget { | ||
attribute EventHandler [[B2G/Bluetooth/WebBluetooth-v2/BluetoothPairingListener#ondisplaypasskeyreq| | attribute EventHandler [[B2G/Bluetooth/WebBluetooth-v2/BluetoothPairingListener#ondisplaypasskeyreq|ondisplaypasskeyreq]]; | ||
attribute EventHandler [[B2G/Bluetooth/WebBluetooth-v2/BluetoothPairingListener#onenterpincodereq|onenterpincodereq]]; | attribute EventHandler [[B2G/Bluetooth/WebBluetooth-v2/BluetoothPairingListener#onenterpincodereq|onenterpincodereq]]; | ||
attribute EventHandler [[B2G/Bluetooth/WebBluetooth-v2/BluetoothPairingListener#onpairingconfirmationreq|onpairingconfirmationreq]]; | attribute EventHandler [[B2G/Bluetooth/WebBluetooth-v2/BluetoothPairingListener#onpairingconfirmationreq|onpairingconfirmationreq]]; | ||
Line 23: | Line 23: | ||
; Parameter | ; Parameter | ||
: ''aPairingEvent'' | : ''aPairingEvent'' | ||
:: The event is a [[B2G/Bluetooth/WebBluetooth-v2/BluetoothPairingEvent#BluetoothPairingEvent|BluetoothPairingEvent]] with property [[B2G/Bluetooth/WebBluetooth-v2/BluetoothPairingEvent# | :: The event is a [[B2G/Bluetooth/WebBluetooth-v2/BluetoothPairingEvent#BluetoothPairingEvent|BluetoothPairingEvent]] with property [[B2G/Bluetooth/WebBluetooth-v2/BluetoothPairingEvent#deviceName|deviceName]] as the remote bluetooth device's name, and property [[B2G/Bluetooth/WebBluetooth-v2/BluetoothPairingEvent#handle|handle]] that carries the passkey to display. | ||
=== onenterpincodereq === | === onenterpincodereq === | ||
Line 31: | Line 31: | ||
; Parameter | ; Parameter | ||
: ''aPairingEvent'' | : ''aPairingEvent'' | ||
:: The event is a [[B2G/Bluetooth/WebBluetooth-v2/BluetoothPairingEvent#BluetoothPairingEvent|BluetoothPairingEvent]] with property [[B2G/Bluetooth/WebBluetooth-v2/BluetoothPairingEvent# | :: The event is a [[B2G/Bluetooth/WebBluetooth-v2/BluetoothPairingEvent#BluetoothPairingEvent|BluetoothPairingEvent]] with property [[B2G/Bluetooth/WebBluetooth-v2/BluetoothPairingEvent#deviceName|deviceName]] as the remote bluetooth device's name, and property [[B2G/Bluetooth/WebBluetooth-v2/BluetoothPairingEvent#handle|handle]] that carries method [[B2G/Bluetooth/WebBluetooth-v2/BluetoothPairingEvent#setPinCode.28DOMString_aPinCode.29|setPinCode]] to reply the PIN code entered by user. | ||
=== onpairingconfirmationreq === | === onpairingconfirmationreq === | ||
Line 39: | Line 39: | ||
; Parameter | ; Parameter | ||
: ''aPairingEvent'' | : ''aPairingEvent'' | ||
:: The event is a [[B2G/Bluetooth/WebBluetooth-v2/BluetoothPairingEvent#BluetoothPairingEvent|BluetoothPairingEvent]] with property [[B2G/Bluetooth/WebBluetooth-v2/BluetoothPairingEvent# | :: The event is a [[B2G/Bluetooth/WebBluetooth-v2/BluetoothPairingEvent#BluetoothPairingEvent|BluetoothPairingEvent]] with property [[B2G/Bluetooth/WebBluetooth-v2/BluetoothPairingEvent#deviceName|deviceName]] as the remote bluetooth device's name, and property [[B2G/Bluetooth/WebBluetooth-v2/BluetoothPairingEvent#handle|handle]] that carries the passkey to confirm and method [[B2G/Bluetooth/WebBluetooth-v2/BluetoothPairingEvent#setPairingConfirmation.28boolean_aConfirm.29|setPairingConfirmation]] to reply user confirmation. | ||
=== onpairingconsentreq === | === onpairingconsentreq === | ||
Line 47: | Line 47: | ||
; Parameter | ; Parameter | ||
: ''aPairingEvent'' | : ''aPairingEvent'' | ||
:: The event is a [[B2G/Bluetooth/WebBluetooth-v2/BluetoothPairingEvent#BluetoothPairingEvent|BluetoothPairingEvent]] with property [[B2G/Bluetooth/WebBluetooth-v2/BluetoothPairingEvent# | :: The event is a [[B2G/Bluetooth/WebBluetooth-v2/BluetoothPairingEvent#BluetoothPairingEvent|BluetoothPairingEvent]] with property [[B2G/Bluetooth/WebBluetooth-v2/BluetoothPairingEvent#deviceName|deviceName]] as the remote bluetooth device's name. |
Latest revision as of 08:06, 25 February 2015
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 ondisplaypasskeyreq; 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 deviceName as the remote bluetooth device's name, 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 deviceName as the remote bluetooth device's name, 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 deviceName as the remote bluetooth device's name, 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 deviceName as the remote bluetooth device's name.