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

From MozillaWiki
Jump to navigation Jump to search
Line 5: Line 5:
  interface BluetoothAttributeEvent : Event
  interface BluetoothAttributeEvent : Event
  {
  {
   readonly attribute unsigned short https://wiki.mozilla.org/B2G/Bluetooth/WebBluetooth-v2/BluetoothAttributeEvent#attr attr];
   readonly attribute unsigned short [https://wiki.mozilla.org/B2G/Bluetooth/WebBluetooth-v2/BluetoothAttributeEvent#attr attr];
   readonly attribute any            https://wiki.mozilla.org/B2G/Bluetooth/WebBluetooth-v2/BluetoothAttributeEvent#value value];
   readonly attribute any            [https://wiki.mozilla.org/B2G/Bluetooth/WebBluetooth-v2/BluetoothAttributeEvent#value value];
  };
  };



Revision as of 03:26, 24 March 2014

Overview

BluetoothAttributeEvent is carried as the parameter of attribute chagned event handlers, including adapter.onattributechanged and device.onattributechanged. Applications can get information about the changed attribute and its updated value.

Interface

interface BluetoothAttributeEvent : Event
{
  readonly attribute unsigned short attr;
  readonly attribute any            value;
};

Properties

attr

Description
The changed attribute's enumeration value. The enumeration is either BluetoothAdapterAttribute or BluetoothDeviceAttribute.
Value type
unsigned short

value

Description
The updated value of the changed attribute. Its type depends on attr's type.
Value type
any