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

From MozillaWiki
Jump to navigation Jump to search
mNo edit summary
Line 1: Line 1:
== Overview ==
== Overview ==
'''BluetoothAttributeEvent''' is carried as the parameter of attribute chagned event handlers, including [https://wiki.mozilla.org/B2G/Bluetooth/WebBluetooth-v2/BluetoothAdapter#onattributechanged adapter.onattributechanged] and [https://wiki.mozilla.org/B2G/Bluetooth/WebBluetooth-v2/BluetoothDevice#onattributechanged device.onattributechanged]. Applications can get information about the changed attribute and its updated value.
'''BluetoothAttributeEvent''' is carried as the parameter of attribute chagned event handlers, including [[B2G/Bluetooth/WebBluetooth-v2/BluetoothAdapter#onattributechanged|adapter.onattributechanged]] and [[B2G/Bluetooth/WebBluetooth-v2/BluetoothDevice#onattributechanged|device.onattributechanged]]. Applications can get information about the changed attribute and its updated value.


== Interface ==
== Interface ==
  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 [[B2G/Bluetooth/WebBluetooth-v2/BluetoothAttributeEvent#attr|attr]];
   readonly attribute any            [https://wiki.mozilla.org/B2G/Bluetooth/WebBluetooth-v2/BluetoothAttributeEvent#value value];
   readonly attribute any            [[B2G/Bluetooth/WebBluetooth-v2/BluetoothAttributeEvent#value|value]];
  };
  };


== Properties ==
== Properties ==
* [https://wiki.mozilla.org/B2G/Bluetooth/WebBluetooth-v2/BluetoothAttributeEvent#attr BluetoothAttributeEvent.attr]
* [[B2G/Bluetooth/WebBluetooth-v2/BluetoothAttributeEvent#attr|BluetoothAttributeEvent.attr]]
* [https://wiki.mozilla.org/B2G/Bluetooth/WebBluetooth-v2/BluetoothAttributeEvent#value BluetoothAttributeEvent.value]
* [[B2G/Bluetooth/WebBluetooth-v2/BluetoothAttributeEvent#value|BluetoothAttributeEvent.value]]


=== attr ===
=== attr ===
; Description
; Description
: The changed attribute's enumeration value. The enumeration is either [https://wiki.mozilla.org/B2G/Bluetooth/WebBluetooth-v2/BluetoothAdapter#BluetoothAdapterAttribute BluetoothAdapterAttribute] or [https://wiki.mozilla.org/B2G/Bluetooth/WebBluetooth-v2/BluetoothDevice#BluetoothDeviceAttribute BluetoothDeviceAttribute].
: The changed attribute's enumeration value. The enumeration is either [[B2G/Bluetooth/WebBluetooth-v2/BluetoothAdapter#BluetoothAdapterAttribute|BluetoothAdapterAttribute]] or [[B2G/Bluetooth/WebBluetooth-v2/BluetoothDevice#BluetoothDeviceAttribute|BluetoothDeviceAttribute]].


; Value type
; Value type
Line 22: Line 22:
=== value ===
=== value ===
; Description
; Description
: The updated value of the changed attribute. Its type depends on [https://wiki.mozilla.org/B2G/Bluetooth/WebBluetooth-v2/BluetoothAttributeEvent#attribute attr]'s type.
: The updated value of the changed attribute. Its type depends on [[B2G/Bluetooth/WebBluetooth-v2/BluetoothAttributeEvent#attribute|attr]]'s type.


; Value type
; Value type
: any
: any

Revision as of 02:09, 3 April 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