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

Rename Permissions as GattPermissions.
(add a value parameter into addDescriptor)
(Rename Permissions as GattPermissions.)
Line 4: Line 4:
== Interfaces ==
== Interfaces ==
* [[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#GattPermissions|GattPermissions]]
* [[B2G/Bluetooth/WebBluetooth-v2/BluetoothGattCharacteristic#GattCharacteristicProperties|GattCharacteristicProperties]]
* [[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#permissions_2|permissions]];
   [Cached, Constant] readonly attribute [[B2G/Bluetooth/WebBluetooth-v2/BluetoothGattCharacteristic#GattPermissions|GattPermissions]] [[B2G/Bluetooth/WebBluetooth-v2/BluetoothGattCharacteristic#permissions_2|permissions]];
   [Cached, Constant] readonly attribute [[B2G/Bluetooth/WebBluetooth-v2/BluetoothGattCharacteristic#GattCharacteristicProperties|GattCharacteristicProperties]] [[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]];
Line 26: Line 26:
   [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()]];
   [NewObject] Promise<[[B2G/Bluetooth/WebBluetooth-v2/BluetoothGattDescriptor#BluetoothGattDescriptor|BluetoothGattDescriptor]]> [[B2G/Bluetooth/WebBluetooth-v2/BluetoothGattCharacteristic#addDescriptor.28DOMString_uuid.2C_Permissions_permissions.2C_ArrayBuffer_value.29|addDescriptor(DOMString uuid, Permissions permissions, ArrayBuffer value)]];
   [NewObject] Promise<[[B2G/Bluetooth/WebBluetooth-v2/BluetoothGattDescriptor#BluetoothGattDescriptor|BluetoothGattDescriptor]]> [[B2G/Bluetooth/WebBluetooth-v2/BluetoothGattCharacteristic#addDescriptor.28DOMString_uuid.2C_GattPermissions_permissions.2C_ArrayBuffer_value.29|addDescriptor(DOMString uuid, GattPermissions permissions, ArrayBuffer value)]];
  };
  };


=== Permissions ===
=== GattPermissions ===
  dictionary Permissions
  dictionary GattPermissions
  {
  {
   boolean read = false;
   boolean read = false;
Line 134: Line 134:


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


; Default Value
; Default Value
Line 166: Line 166:
* [[B2G/Bluetooth/WebBluetooth-v2/BluetoothGattCharacteristic#startNotifications.28.29|BluetoothGattCharacteristic.startNotifications()]]
* [[B2G/Bluetooth/WebBluetooth-v2/BluetoothGattCharacteristic#startNotifications.28.29|BluetoothGattCharacteristic.startNotifications()]]
* [[B2G/Bluetooth/WebBluetooth-v2/BluetoothGattCharacteristic#stopNotifications.28.29|BluetoothGattCharacteristic.stopNotifications()]]
* [[B2G/Bluetooth/WebBluetooth-v2/BluetoothGattCharacteristic#stopNotifications.28.29|BluetoothGattCharacteristic.stopNotifications()]]
* [[B2G/Bluetooth/WebBluetooth-v2/BluetoothGattCharacteristic#addDescriptor.28DOMString_uuid.2C_Permissions_permissions.2C_ArrayBuffer_value.29|addDescriptor(DOMString uuid, Permissions permissions, ArrayBuffer value)]]
* [[B2G/Bluetooth/WebBluetooth-v2/BluetoothGattCharacteristic#addDescriptor.28DOMString_uuid.2C_GattPermissions_permissions.2C_ArrayBuffer_value.29|addDescriptor(DOMString uuid, GattPermissions permissions, ArrayBuffer value)]]


=== readValue() ===
=== readValue() ===
Line 204: Line 204:
: A Promise to indicate whether the operation is resolved or rejected. The Promise is rejected if there is no Client Characteristic Configuration descriptor (CCCD) for this characteristic.
: A Promise to indicate whether the operation is resolved or rejected. The Promise is rejected if there is no Client Characteristic Configuration descriptor (CCCD) for this characteristic.


=== addDescriptor(DOMString uuid, Permissions permissions, ArrayBuffer value) ===
=== addDescriptor(DOMString uuid, GattPermissions permissions, ArrayBuffer value) ===


; Description
; Description
Line 213: Line 213:
:: UUID of the descriptor to add.
:: UUID of the descriptor to add.
: ''permissions''
: ''permissions''
:: [[B2G/Bluetooth/WebBluetooth-v2/BluetoothGattCharacteristic#Permissions|Permissions]] of the descriptor to add.
:: [[B2G/Bluetooth/WebBluetooth-v2/BluetoothGattCharacteristic#GattPermissions|GattPermissions]] of the descriptor to add.
: ''value''
: ''value''
:: The initial value of this descriptor.
:: The initial value of this descriptor.
39

edits