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

From MozillaWiki
Jump to navigation Jump to search
No edit summary
Line 5: Line 5:
  interface BluetoothAttributeEvent : Event
  interface BluetoothAttributeEvent : Event
  {
  {
   readonly attribute short attr;
   readonly attribute unsigned short attr;
   readonly attribute any   value;
   readonly attribute any           value;
  };
  };


Line 18: Line 18:


; Value type
; Value type
: short
: unsigned short
 
; Default value
: -1


=== value ===
=== value ===
Line 29: Line 26:
; Value type
; Value type
: any
: any
; Default value
: null

Revision as of 08:05, 6 March 2014

Overview

BluetoothAttributeEvent is carried as the argument of attribute chagned event handlers, such as 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