B2G/Bluetooth/WebBluetooth-v2/Discussion/2014-03-14: Difference between revisions

From MozillaWiki
Jump to navigation Jump to search
(Created page with " == Items == === BluetoothManager === * Access adapter in onadapterremoved ** onadapterremoved(address) -> onadapterremoved(adapter) before adapter is really removed? adapt...")
 
Line 24: Line 24:
** are all attributes available after state is "enabled"?
** are all attributes available after state is "enabled"?


* '''DOMRequest life cycle'''
* DOMRequest life cycle
** should gaia hold req reference until stop discovery? does DOMRequest live after onsuccess is fired?
** should gaia hold req reference until stop discovery?
*** YES. gaia should hold reference if req is still needed.
** does DOMRequest live after onsuccess is fired?
*** YES. the life cycle ends when both gaia and gecko release the req. (by schien)
** fire onsuccess before or after ondevicefound?


* Return BluetoothDevice in pairing event handlers
* Return BluetoothDevice in pairing event handlers

Revision as of 08:01, 19 March 2014


Items

BluetoothManager

  • Access adapter in onadapterremoved
    • onadapterremoved(address) -> onadapterremoved(adapter) before adapter is really removed? adapter's attributes are accessible with default values.
  • Remove adapter from adapters[] array or not?
    • gaia has to rebind handlers if adapter is removed from array.
  • Track default adapter added/removed - options
    • +ondefaultadapteradded/ondefaultadapterremoved
    • onadapteradded/removed(adapter, bool isDefault)
    • bool adapter.isDefault

BluetoothAdapter

  • adapter state
    • add "discovering" and "discoverable"?
    • add "pairing", "connecting", and "connected"?
      • outgoing vs incoming pairing/connection state transition
  • adapter attributes validity
    • are all attributes available after state is "enabled"?
  • DOMRequest life cycle
    • should gaia hold req reference until stop discovery?
      • YES. gaia should hold reference if req is still needed.
    • does DOMRequest live after onsuccess is fired?
      • YES. the life cycle ends when both gaia and gecko release the req. (by schien)
    • fire onsuccess before or after ondevicefound?
  • Return BluetoothDevice in pairing event handlers
    • carry correct address
    • what are the value of the device's attributes?
  • Move pairing event handlers into device?