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

Line 58: Line 58:
  };
  };


: DOMString ''address''
: ''address''
:: Address of the connected/disconnected remote LE device.
:: Address of the connected/disconnected remote LE device.
: boolean ''connected''
: ''connected''
:: Whether the remote LE device is connected (true) or disconnected (false).
:: Whether the remote LE device is connected (true) or disconnected (false).


Line 69: Line 69:
; Argument
; Argument
  [CheckPermissions="bluetooth"]
  [CheckPermissions="bluetooth"]
  interface BluetoothGattAttributeReadEvent : Event
  interface BluetoothGattAttributeEvent : Event
  {
  {
   readonly attribute DOMString address;
   readonly attribute DOMString address;
Line 90: Line 90:
: A handler to trigger when a remote client has requested to write a local characteristic or descriptor.
: A handler to trigger when a remote client has requested to write a local characteristic or descriptor.


; Arguments in event
; Argument
: DOMString ''address''
[CheckPermissions="bluetooth"]
interface BluetoothGattAttributeEvent : Event
{
  readonly attribute DOMString address;
  readonly attribute short requestId;
  readonly attribute BluetoothGattCharacteristic? characteristic;
  readonly attribute BluetoothGattDescriptor? descriptor;
};
 
: ''address''
:: Address of the remote client.
:: Address of the remote client.
: short ''requestId''
: ''requestId''
:: Request id of the attribute write request.
:: Request id of the attribute write request.
: BluetoothGattCharacteristic ''characteristic?''
: ''characteristic''
:: The characteristic requested to write. Null if remote client requests to write a local descriptor.
:: The characteristic requested to write. Null if remote client requests to write a local descriptor.
: BluetoothGattDescriptor ''descriptor?''
: ''descriptor''
:: The descriptor requested to write. Null if remote client requests to write a local characteristic.
:: The descriptor requested to write. Null if remote client requests to write a local characteristic.


Line 104: Line 113:
: A handler to trigger when a remote client has requested to execute all pending write operations.
: A handler to trigger when a remote client has requested to execute all pending write operations.


; Arguments in event
; Argument
: DOMString ''address''
[CheckPermissions="bluetooth"]
interface BluetoothExecuteWriteEvent : Event
{
  readonly attribute DOMString address;
  readonly attribute short requestId;
  readonly attribute boolean execute;
};
 
: ''address''
:: Address of the remote client.
:: Address of the remote client.
: short ''requestId''
: ''requestId''
:: Request id of the attribute read request.
:: Request id of the attribute read request.
: boolean ''execute''
: ''execute''
:: Whether to execute all pending write operations (true) or not (false).
:: Whether to execute all pending write operations (true) or not (false).


Confirmed users
891

edits