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

Jump to navigation Jump to search
m
no edit summary
mNo edit summary
Line 1: Line 1:
== Overview ==
== Overview ==
'''BluetoothPairingEvent''' is carried as the argument of pairing related event handlers, including [https://wiki.mozilla.org/B2G/Bluetooth/WebBluetooth-v2/BluetoothAdapter#ondisplaypasskeyreq adapter.ondisplaypasskeyreq], [https://wiki.mozilla.org/B2G/Bluetooth/WebBluetooth-v2/BluetoothAdapter#onenterpasskeyreq adapter.onenterpasskeyreq], [https://wiki.mozilla.org/B2G/Bluetooth/WebBluetooth-v2/BluetoothAdapter#onpairingconfirmationreq adapter.onpairingconfirmationreq], and [https://wiki.mozilla.org/B2G/Bluetooth/WebBluetooth-v2/BluetoothAdapter#onpairingconsentreq adapter.onpairingconsentreq]. Applications can get the pairing [https://wiki.mozilla.org/B2G/Bluetooth/WebBluetooth-v2/BluetoothDevice BluetoothDevice] object, and the passkey to display on local UI ([https://wiki.mozilla.org/B2G/Bluetooth/WebBluetooth-v2/BluetoothAdapter#ondisplaypasskeyreq adapter.ondisplaypasskeyreq]) or to confirm ([https://wiki.mozilla.org/B2G/Bluetooth/WebBluetooth-v2/BluetoothAdapter#onpairingconfirmationreq adapter.onpairingconfirmationreq]). Applications can also reply the passkey entered by user ([https://wiki.mozilla.org/B2G/Bluetooth/WebBluetooth-v2/BluetoothAdapter#onenterpasskeyreq adapter.onenterpasskeyreq]) or reply user confirmation on passkey ([https://wiki.mozilla.org/B2G/Bluetooth/WebBluetooth-v2/BluetoothAdapter#onpairingconfirmationreq adapter.onpairingconfirmationreq]).
'''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 [https://wiki.mozilla.org/B2G/Bluetooth/WebBluetooth-v2/BluetoothPairingEvent#device device];
   readonly attribute BluetoothDevice [[B2G/Bluetooth/WebBluetooth-v2/BluetoothPairingEvent#device|device]];
   
   
   readonly attribute unsigned long?  [https://wiki.mozilla.org/B2G/Bluetooth/WebBluetooth-v2/BluetoothPairingEvent#passkey passkey];
   readonly attribute unsigned long?  [[B2G/Bluetooth/WebBluetooth-v2/BluetoothPairingEvent#passkey|passkey]];
   
   
   DOMRequest? [https://wiki.mozilla.org/B2G/Bluetooth/WebBluetooth-v2/BluetoothPairingEvent#setPasskey.28DOMString_aPasskey.29 setPasskey(DOMString aPasskey)];
   DOMRequest? [[B2G/Bluetooth/WebBluetooth-v2/BluetoothPairingEvent#setPasskey.28DOMString_aPasskey.29|setPasskey(DOMString aPasskey)]];
   DOMRequest? [https://wiki.mozilla.org/B2G/Bluetooth/WebBluetooth-v2/BluetoothPairingEvent#setPairingConfirmation.28boolean_aConfirm.29 setPairingConfirmation(boolean aConfirm)];
   DOMRequest? [[B2G/Bluetooth/WebBluetooth-v2/BluetoothPairingEvent#setPairingConfirmation.28boolean_aConfirm.29|setPairingConfirmation(boolean aConfirm)]];
  };
  };


== Properties ==
== Properties ==
* [https://wiki.mozilla.org/B2G/Bluetooth/WebBluetooth-v2/BluetoothPairingEvent#device BluetoothPairingEvent.device]
* [[B2G/Bluetooth/WebBluetooth-v2/BluetoothPairingEvent#device|BluetoothPairingEvent.device]]
* [https://wiki.mozilla.org/B2G/Bluetooth/WebBluetooth-v2/BluetoothPairingEvent#passkey BluetoothPairingEvent.passkey]
* [[B2G/Bluetooth/WebBluetooth-v2/BluetoothPairingEvent#passkey|BluetoothPairingEvent.passkey]]


=== device ===
=== device ===
Line 22: Line 22:


; Value type
; Value type
: [https://wiki.mozilla.org/B2G/Bluetooth/WebBluetooth-v2/BluetoothDevice BluetoothDevice]
: [[B2G/Bluetooth/WebBluetooth-v2/BluetoothDevice|BluetoothDevice]]


=== passkey ===
=== passkey ===
Line 35: Line 35:


== Methods ==
== Methods ==
* [https://wiki.mozilla.org/B2G/Bluetooth/WebBluetooth-v2/BluetoothPairingEvent#setPasskey.28DOMString_aPasskey.29 BluetoothPairingEvent.setPasskey(DOMString aPasskey)]
* [[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)]
* [[B2G/Bluetooth/WebBluetooth-v2/BluetoothPairingEvent#setPairingConfirmation.28boolean_aConfirm.29|BluetoothPairingEvent.setPairingConfirmation(boolean aConfirm)]]


=== setPasskey(DOMString aPasskey) ===
=== setPasskey(DOMString aPasskey) ===
Confirmed users
185

edits

Navigation menu