B2G Wifi: trigger `onstatuschange' callbacks when the wifi status changes

RESOLVED FIXED in mozilla14

Status

()

defect
RESOLVED FIXED
7 years ago
7 years ago

People

(Reporter: kaze, Assigned: mrbkap)

Tracking

Trunk
mozilla14
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

following bug 740079

To get along with the synchronous `status' property, it would be nice to support `onstatuschange' callbacks. There are a few use cases where this would be easier than a set of onconnect / onconnecting / ondisconnect / etc. event listeners and it would be more XHR-like.
Blocks: b2g-wifi
Posted patch Patch v1Splinter Review
This should be pretty straightforward. The one thing I wondered about was whether it was worth it to change the internal (IPC) notifications to follow the DOM API. I decided against it since not all of the notifications did exactly the same thing (in particular, disconnect is handled a little differently). Any opinions on that would be welcome.
Assignee: nobody → mrbkap
Status: NEW → ASSIGNED
Attachment #614702 - Flags: review?(jones.chris.g)
Attachment #614702 - Flags: feedback?(kaze)
>+     *   - disconnected: Fires when we either fail to connect to an access
>+     *                   point (transition: onassociate -> ondisconnect) or
>+     *                   when we were connected to a network but have
>+     *                   disconnected for any reason (transition: onconnect ->
>+     *                   ondisconnect).

nit:
  transition: associated -> disconnected
  transition: connected -> disconnected
Here’s a preliminary front-end:
https://github.com/andreasgal/gaia/pull/1226
Attachment #614702 - Flags: review?(jones.chris.g) → review+
Attachment #614702 - Flags: feedback?(kaze) → feedback+
https://hg.mozilla.org/mozilla-central/rev/1d3aea7115d3
Status: ASSIGNED → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.