B2G/Bluetooth/WebBluetooth-v2/BluetoothSocket

From MozillaWiki
< B2G‎ | Bluetooth‎ | WebBluetooth-v2
Revision as of 09:01, 20 January 2015 by Jamin Liu (talk | contribs) (Add webidl for BluetoothSocket)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search
  • Under Construction *

Overview

Interfaces

BluetoothSocket

[CheckPermissions="bluetoothSocket"]
interface BluetoothSocket: EventTarget
{
  readonly attribute BluetoothSocketState state;
  readonly attribute DOMString serviceUuid;
  readonly attribute DOMString address;
    attribute EventHandler onmessage;  // ArrayBuffer aData
    attribute EventHandler onclose;    // DOMString aErrorMsg
    attribute EventHandler onconnect;
  [NewObject, Throws] Promise<void> send(ArrayBuffer aData);
  [NewObject, Throws] Promise<void> close();
};

BluetoothSocketState

[CheckPermissions="bluetoothSocket"]
enum BluetoothSocketState
{
  "connecting",
  "open",
  "closing",
  "closed"
};

Properties

Event Handlers

Methods

See Also