[b2g-bluetooth] Add events onconnected and ondisconnected in BluetoothDevice

RESOLVED FIXED in mozilla17

Status

()

defect
RESOLVED FIXED
7 years ago
7 years ago

People

(Reporter: gyeh, Assigned: gyeh)

Tracking

unspecified
mozilla17
ARM
Gonk (Firefox OS)
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment, 2 obsolete attachments)

Assignee

Description

7 years ago
As discussed in Bug778640, we'd like to create onConnected and onDisconnected events via event generator. The difference here is that, these events are implemented in BluetoothDevice rather than BluetoothApapter because only bluetooth device addresses are maintained in BluetoothAdapter. For Gaia side, we have to call getPairedDevices() first and an array of BluetoothDevices will be returned back, and then listen to onConnected and onDisconnected events.
Assignee

Updated

7 years ago
Summary: [b2g-bluetooth] Create deviceconnected event and devicedisconnected with event generator → [b2g-bluetooth] Add events onconnected and ondisconnected in BluetoothDevice
Assignee

Comment 1

7 years ago
For gaia side, getPairedDevices() first and then listen every device for event onconnected and event ondisconnected.
Attachment #653711 - Flags: review?(kyle)
Attachment #653711 - Flags: review?(kyle) → review+
Assignee

Comment 2

7 years ago
Attachment #653711 - Attachment is obsolete: true
Attachment #654050 - Flags: superreview?(mrbkap)
Comment on attachment 654050 [details] [diff] [review]
Final version: Add events onconnected and ondisconnected  in BluetoothDevice, r=qdot

Review of attachment 654050 [details] [diff] [review]:
-----------------------------------------------------------------

::: dom/bluetooth/nsIDOMBluetoothDevice.idl
@@ +16,5 @@
>    readonly attribute bool connected;
>    readonly attribute bool paired;
>    attribute nsIDOMEventListener onpropertychanged;
> +  attribute nsIDOMEventListener onconnected;
> +  attribute nsIDOMEventListener ondisconnected;

Need to bump the IID for this interface.
Attachment #654050 - Flags: superreview?(mrbkap) → superreview+
https://hg.mozilla.org/mozilla-central/rev/167fdd4db264
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla17
You need to log in before you can comment on or make changes to this bug.