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

Jump to navigation Jump to search
replace setPairingConfirmation by accept/reject
No edit summary
(replace setPairingConfirmation by accept/reject)
Line 21: Line 21:
   
   
   Promise<void> [[B2G/Bluetooth/WebBluetooth-v2/BluetoothPairingEvent#setPinCode.28DOMString_aPinCode.29|setPinCode(DOMString aPinCode)]];
   Promise<void> [[B2G/Bluetooth/WebBluetooth-v2/BluetoothPairingEvent#setPinCode.28DOMString_aPinCode.29|setPinCode(DOMString aPinCode)]];
   Promise<void> [[B2G/Bluetooth/WebBluetooth-v2/BluetoothPairingEvent#setPairingConfirmation.28boolean_aConfirm.29|setPairingConfirmation(boolean aConfirm)]];
   Promise<void> [[B2G/Bluetooth/WebBluetooth-v2/BluetoothPairingEvent#accept.28.29|accept()]];
  Promise<void> [[B2G/Bluetooth/WebBluetooth-v2/BluetoothPairingEvent#reject.28.29|reject()]];
  };
  };


Line 51: Line 52:
               !! colspan="2" style="background:#ffdead;" | Methods
               !! colspan="2" style="background:#ffdead;" | Methods
|-
|-
! passkey !! setPinCode !! setPairingConfirmation
! passkey !! setPinCode !! accept !! reject
|-
|-
! ondisplaypasskeyreq
! ondisplaypasskeyreq
| V || ||
| V || || V || V ||
|-
|-
! onenterpincodereq
! onenterpincodereq
|  || V ||
|| V || || V ||
|-
|-
! onpairingconfirmationreq
! onpairingconfirmationreq
| V ||  || V
| V ||  || V || V ||
|-
|-
! onpairingconsentreq
! onpairingconsentreq
|  ||  ||
|  ||  || V || V ||
|}
|}


Line 80: Line 81:
== Methods ==
== Methods ==
* [[B2G/Bluetooth/WebBluetooth-v2/BluetoothPairingEvent#setPinCode.28DOMString_aPinCode.29|BluetoothPairingHandle.setPinCode(DOMString aPinCode)]]
* [[B2G/Bluetooth/WebBluetooth-v2/BluetoothPairingEvent#setPinCode.28DOMString_aPinCode.29|BluetoothPairingHandle.setPinCode(DOMString aPinCode)]]
* [[B2G/Bluetooth/WebBluetooth-v2/BluetoothPairingEvent#setPairingConfirmation.28boolean_aConfirm.29|BluetoothPairingHandle.setPairingConfirmation(boolean aConfirm)]]
* [[B2G/Bluetooth/WebBluetooth-v2/BluetoothPairingEvent#accept.28.29|BluetoothPairingHandle.accept()]]
* [[B2G/Bluetooth/WebBluetooth-v2/BluetoothPairingEvent#reject.28.29|BluetoothPairingHandle.reject()]]


=== setPinCode(DOMString aPinCode) ===
=== setPinCode(DOMString aPinCode) ===
Line 93: Line 95:
: A Promise to indicate whether the operation is resolved or rejected. If setPinCode is invalid for current pairing request, the Promise would be rejected.
: A Promise to indicate whether the operation is resolved or rejected. If setPinCode is invalid for current pairing request, the Promise would be rejected.


=== setPairingConfirmation(boolean aConfirm) ===
=== accept() ===
; Description
; Description
: The method replies user's pairing confirmation when the local bluetooth adapter is pairing with the remote device.
: The method replies that user confirms to pair the local bluetooth adapter with the remote device.


; Parameter
; Return
: ''aConfirm''
: A Promise to indicate whether the operation is resolved or rejected. If accept is invalid for current pairing request, the Promise would be rejected.
:: A boolean indicating whether user confirms pairing with the remote device (true) or not (false).
 
=== reject() ===
; Description
: The method replies that user rejects to pair the local bluetooth adapter with the remote device.


; Return
; Return
: A Promise to indicate whether the operation is resolved or rejected. If setPairingConfirmation is invalid for current pairing request, the Promise would be rejected.
: A Promise to indicate whether the operation is resolved or rejected.
120

edits

Navigation menu