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

Change Properties to GattCharacteristicProperties to avoid potential name collision.
(remove unnecessary Throws)
(Change Properties to GattCharacteristicProperties to avoid potential name collision.)
Line 5: Line 5:
* [[B2G/Bluetooth/WebBluetooth-v2/BluetoothGattCharacteristic#BluetoothGattCharacteristic|BluetoothGattCharacteristic]]
* [[B2G/Bluetooth/WebBluetooth-v2/BluetoothGattCharacteristic#BluetoothGattCharacteristic|BluetoothGattCharacteristic]]
* [[B2G/Bluetooth/WebBluetooth-v2/BluetoothGattCharacteristic#Permissions|Permissions]]
* [[B2G/Bluetooth/WebBluetooth-v2/BluetoothGattCharacteristic#Permissions|Permissions]]
* [[B2G/Bluetooth/WebBluetooth-v2/BluetoothGattCharacteristic#Properties|Properties]]
* [[B2G/Bluetooth/WebBluetooth-v2/BluetoothGattCharacteristic#GattCharacteristicProperties|GattCharacteristicProperties]]
* [[B2G/Bluetooth/WebBluetooth-v2/BluetoothGattCharacteristic#WriteType|WriteType]]
* [[B2G/Bluetooth/WebBluetooth-v2/BluetoothGattCharacteristic#WriteType|WriteType]]


Line 18: Line 18:
   readonly attribute unsigned short [[B2G/Bluetooth/WebBluetooth-v2/BluetoothGattCharacteristic#instanceId|instanceId]];
   readonly attribute unsigned short [[B2G/Bluetooth/WebBluetooth-v2/BluetoothGattCharacteristic#instanceId|instanceId]];
   readonly attribute ArrayBuffer? [[B2G/Bluetooth/WebBluetooth-v2/BluetoothGattCharacteristic#value|value]];
   readonly attribute ArrayBuffer? [[B2G/Bluetooth/WebBluetooth-v2/BluetoothGattCharacteristic#value|value]];
   [Cached, Constant] readonly attribute [[B2G/Bluetooth/WebBluetooth-v2/BluetoothGattCharacteristic#Permissions|Permissions]] [[B2G/Bluetooth/WebBluetooth-v2/BluetoothGattCharacteristic#properties_2|permissions]];
   [Cached, Constant] readonly attribute [[B2G/Bluetooth/WebBluetooth-v2/BluetoothGattCharacteristic#Permissions|Permissions]] [[B2G/Bluetooth/WebBluetooth-v2/BluetoothGattCharacteristic#permissions_2|permissions]];
   [Cached, Constant] readonly attribute [[B2G/Bluetooth/WebBluetooth-v2/BluetoothGattCharacteristic#Properties|Properties]] [[B2G/Bluetooth/WebBluetooth-v2/BluetoothGattCharacteristic#properties_2|properties]];
   [Cached, Constant] readonly attribute [[B2G/Bluetooth/WebBluetooth-v2/BluetoothGattCharacteristic#GattCharacteristicProperties|GattCharacteristicProperties]] [[B2G/Bluetooth/WebBluetooth-v2/BluetoothGattCharacteristic#properties_2|properties]];
   [Cached, Pure]              attribute [[B2G/Bluetooth/WebBluetooth-v2/BluetoothGattCharacteristic#WriteType|WriteType]] [[B2G/Bluetooth/WebBluetooth-v2/BluetoothGattCharacteristic#writeType|writeType]];
   [Cached, Pure]              attribute [[B2G/Bluetooth/WebBluetooth-v2/BluetoothGattCharacteristic#WriteType|WriteType]] [[B2G/Bluetooth/WebBluetooth-v2/BluetoothGattCharacteristic#writeType|writeType]];
   
   
   [NewObject] Promise<ArrayBuffer> [[B2G/Bluetooth/WebBluetooth-v2/BluetoothGattCharacteristic#readValue.28.29|readValue()]];
   [NewObject] Promise<ArrayBuffer> [[B2G/Bluetooth/WebBluetooth-v2/BluetoothGattCharacteristic#readValue.28.29|readValue()]];
   [NewObject] Promise<ArrayBuffer> [[B2G/Bluetooth/WebBluetooth-v2/BluetoothGattCharacteristic#writeValue.28ArrayBuffer value.29|writeValue(ArrayBuffer value)]];
   [NewObject] Promise<void> [[B2G/Bluetooth/WebBluetooth-v2/BluetoothGattCharacteristic#writeValue.28ArrayBuffer value.29|writeValue(ArrayBuffer value)]];
   [NewObject] Promise<void> [[B2G/Bluetooth/WebBluetooth-v2/BluetoothGattCharacteristic#startNotifications.28.29|startNotifications()]];
   [NewObject] Promise<void> [[B2G/Bluetooth/WebBluetooth-v2/BluetoothGattCharacteristic#startNotifications.28.29|startNotifications()]];
   [NewObject] Promise<void> [[B2G/Bluetooth/WebBluetooth-v2/BluetoothGattCharacteristic#stopNotifications.28.29|stopNotifications()]];
   [NewObject] Promise<void> [[B2G/Bluetooth/WebBluetooth-v2/BluetoothGattCharacteristic#stopNotifications.28.29|stopNotifications()]];
Line 42: Line 42:
  };
  };


=== Properties ===
=== GattCharacteristicProperties ===
  dictionary Properties
  dictionary GattCharacteristicProperties
  {
  {
   required boolean broadcast;
   required boolean broadcast;
Line 63: Line 63:
  };
  };


== Properties ==
== GattCharacteristicProperties ==
* [[B2G/Bluetooth/WebBluetooth-v2/BluetoothGattCharacteristic#service|BluetoothGattCharacteristic.service]]
* [[B2G/Bluetooth/WebBluetooth-v2/BluetoothGattCharacteristic#service|BluetoothGattCharacteristic.service]]
* [[B2G/Bluetooth/WebBluetooth-v2/BluetoothGattCharacteristic#descriptors|BluetoothGattCharacteristic.descriptors]]
* [[B2G/Bluetooth/WebBluetooth-v2/BluetoothGattCharacteristic#descriptors|BluetoothGattCharacteristic.descriptors]]
Line 69: Line 69:
* [[B2G/Bluetooth/WebBluetooth-v2/BluetoothGattCharacteristic#instanceId|BluetoothGattCharacteristic.instanceId]]
* [[B2G/Bluetooth/WebBluetooth-v2/BluetoothGattCharacteristic#instanceId|BluetoothGattCharacteristic.instanceId]]
* [[B2G/Bluetooth/WebBluetooth-v2/BluetoothGattCharacteristic#value|BluetoothGattCharacteristic.value]]
* [[B2G/Bluetooth/WebBluetooth-v2/BluetoothGattCharacteristic#value|BluetoothGattCharacteristic.value]]
* [[B2G/Bluetooth/WebBluetooth-v2/BluetoothGattCharacteristic#properties_2|BluetoothGattCharacteristic.permissions]]
* [[B2G/Bluetooth/WebBluetooth-v2/BluetoothGattCharacteristic#permissions_2|BluetoothGattCharacteristic.permissions]]
* [[B2G/Bluetooth/WebBluetooth-v2/BluetoothGattCharacteristic#properties_3|BluetoothGattCharacteristic.properties]]
* [[B2G/Bluetooth/WebBluetooth-v2/BluetoothGattCharacteristic#properties_3|BluetoothGattCharacteristic.properties]]
* [[B2G/Bluetooth/WebBluetooth-v2/BluetoothGattCharacteristic#writeType_2|BluetoothGattCharacteristic.writeType]]
* [[B2G/Bluetooth/WebBluetooth-v2/BluetoothGattCharacteristic#writeType_2|BluetoothGattCharacteristic.writeType]]
Line 145: Line 145:


; Value Type
; Value Type
: dictionary [[B2G/Bluetooth/WebBluetooth-v2/BluetoothGattCharacteristic#Properties|Properties]]
: dictionary [[B2G/Bluetooth/WebBluetooth-v2/BluetoothGattCharacteristic#GattCharacteristicProperties|GattCharacteristicProperties]]


; Default Value
; Default Value
Line 186: Line 186:


; Return
; Return
: A Promise to indicate whether the operation is resolved or rejected. The Promise is resolved along with the characteristic value after this write operation.
: A Promise to indicate whether the operation is resolved or rejected.


=== startNotifications() ===
=== startNotifications() ===
39

edits