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

Jump to navigation Jump to search
Line 9: Line 9:
  interface BluetoothGattCharacteristic
  interface BluetoothGattCharacteristic
  {
  {
  // Permission
  const unsigned short PERMISSION_READ              = 0x0001;
  const unsigned short PERMISSION_READ_ENCRYPTED    = 0x0002;
  const unsigned short PERMISSION_READ_ENC_MITM    = 0x0004;
  const unsigned short PERMISSION_WRITE            = 0x0010;
  const unsigned short PERMISSION_WRITE_ENCRYPTED  = 0x0020;
  const unsigned short PERMISSION_WRITE_ENC_MITM    = 0x0040;
  const unsigned short PERMISSION_WRITE_SIGNED      = 0x0080;
  const unsigned short PERMISSION_WRITE_SIGNED_MITM = 0x0100;
   // Property
   // Property
   const unsigned short PROPERTY_BROADCAST        = 0x0001;
   const unsigned short PROPERTY_BROADCAST        = 0x0001;
Line 39: Line 29:
   readonly attribute DOMString                            [[B2G/Bluetooth/WebBluetooth-v2/BluetoothGattCharacteristic#uuid|uuid]];
   readonly attribute DOMString                            [[B2G/Bluetooth/WebBluetooth-v2/BluetoothGattCharacteristic#uuid|uuid]];
   readonly attribute unsigned short                        [[B2G/Bluetooth/WebBluetooth-v2/BluetoothGattCharacteristic#instanceId|instanceId]];
   readonly attribute unsigned short                        [[B2G/Bluetooth/WebBluetooth-v2/BluetoothGattCharacteristic#instanceId|instanceId]];
  readonly attribute unsigned short                        [[B2G/Bluetooth/WebBluetooth-v2/BluetoothGattCharacteristic#permissions|permissions]];
   readonly attribute unsigned short                        [[B2G/Bluetooth/WebBluetooth-v2/BluetoothGattCharacteristic#properties_2|properties]];
   readonly attribute unsigned short                        [[B2G/Bluetooth/WebBluetooth-v2/BluetoothGattCharacteristic#properties_2|properties]];
             attribute unsigned short                        [[B2G/Bluetooth/WebBluetooth-v2/BluetoothGattCharacteristic#writeType|writeType]];
             attribute unsigned short                        [[B2G/Bluetooth/WebBluetooth-v2/BluetoothGattCharacteristic#writeType|writeType]];
   readonly attribute ArrayBuffer?                          [[B2G/Bluetooth/WebBluetooth-v2/BluetoothGattCharacteristic#value|value]];
   readonly attribute ArrayBuffer?                          [[B2G/Bluetooth/WebBluetooth-v2/BluetoothGattCharacteristic#value|value]];
   
   
   [NewObject, Throws]
   [NewObject, Throws] Promise<ArrayBuffer> [[B2G/Bluetooth/WebBluetooth-v2/BluetoothGattCharacteristic#readValue.28.29|readValue()]];
  Promise<ArrayBuffer> [[B2G/Bluetooth/WebBluetooth-v2/BluetoothGattCharacteristic#readValue.28.29|readValue()]];
   [NewObject, Throws] Promise<ArrayBuffer> [[B2G/Bluetooth/WebBluetooth-v2/BluetoothGattCharacteristic#writeValue.28ArrayBuffer value.29|writeValue(ArrayBuffer value)]];
   [NewObject, Throws]
   [NewObject, Throws] Promise<void> [[B2G/Bluetooth/WebBluetooth-v2/BluetoothGattCharacteristic#startNotification.28.29|startNotifications()]];
  Promise<ArrayBuffer> [[B2G/Bluetooth/WebBluetooth-v2/BluetoothGattCharacteristic#writeValue.28ArrayBuffer value.29|writeValue(ArrayBuffer value)]];
   [NewObject, Throws] Promise<void> [[B2G/Bluetooth/WebBluetooth-v2/BluetoothGattCharacteristic#stopNotification.28.29|stopNotifications()]];
   [NewObject, Throws]
  Promise<void> [[B2G/Bluetooth/WebBluetooth-v2/BluetoothGattCharacteristic#startNotification.28.29|startNotifications()]];
   [NewObject, Throws]
  Promise<void> [[B2G/Bluetooth/WebBluetooth-v2/BluetoothGattCharacteristic#stopNotification.28.29|stopNotifications()]];
  };
  };


Confirmed users
891

edits

Navigation menu