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

Line 8: Line 8:
  [CheckPermissions="bluetooth"]
  [CheckPermissions="bluetooth"]
  interface BluetoothGattCharacteristic
  interface BluetoothGattCharacteristic
  {
  {  
  // Property
  const unsigned short PROPERTY_BROADCAST        = 0x0001;
  const unsigned short PROPERTY_READ              = 0x0002;
  const unsigned short PROPERTY_WRITE_NO_RESPONSE = 0x0004;
  const unsigned short PROPERTY_WRITE            = 0x0008;
  const unsigned short PROPERTY_NOTIFY            = 0x0010;
  const unsigned short PROPERTY_INDICATE          = 0x0020;
  const unsigned short PROPERTY_SIGNED_WRITE      = 0x0040;
  const unsigned short PROPERTY_EXTENDED_PROPS    = 0x0080;
   // Write Type
   // Write Type
   const unsigned short WRITE_TYPE_NO_RESPONSE    = 0x0001;
   const unsigned short WRITE_TYPE_NO_RESPONSE    = 0x0001;
Line 29: Line 19:
   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#properties_2|properties]];
   readonly attribute CharacteristicProperties              [[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]];
Line 38: Line 28:
   [NewObject, Throws] Promise<void> [[B2G/Bluetooth/WebBluetooth-v2/BluetoothGattCharacteristic#stopNotification.28.29|stopNotifications()]];
   [NewObject, Throws] Promise<void> [[B2G/Bluetooth/WebBluetooth-v2/BluetoothGattCharacteristic#stopNotification.28.29|stopNotifications()]];
  };
  };
=== CharacteristicProperties ===
dictionary CharacteristicProperties
{
  required boolean broadcast;
  required boolean read;
  required boolean writeNoResponse;
  required boolean write;
  required boolean notify;
  required boolean indicate;
  required boolean signedWrite;
  required boolean extendedProps;
};
=== CharacteristicWriteType ===
dictionary CharacteristicWriteType
{
  required boolean noResponse;
  required boolean default;
  required boolean signed;
};


== Properties ==
== Properties ==
Confirmed users
891

edits