Closed Bug 930355 Opened 7 years ago Closed 6 years ago

Support wifi enable API

Categories

(Firefox OS Graveyard :: Wifi, defect)

ARM
Gonk (Firefox OS)
defect
Not set
normal

Tracking

(tracking-b2g:backlog)

RESOLVED FIXED
2.1 S2 (15aug)
tracking-b2g backlog

People

(Reporter: vchang, Assigned: chucklee)

References

Details

(Whiteboard: [p=2])

Attachments

(2 files, 8 obsolete files)

1.25 KB, patch
Details | Diff | Splinter Review
11.31 KB, patch
Details | Diff | Splinter Review
Currently, we use onenabled/ondisalbed DOMEventListener to notify gaia the wifi enable/disable status after issuing settings API to set "wifi.enabled". Instead of that, we would like to propose the setWifiEnable DOM API. It looks more straightforward when trying to turn on/off wifi in gaia. Moreover, we could move the control logic for wifi and wifi hotspot to gaia app. 

interface nsIDOMWifiManager : nsISupports
{
  nsIDOMDOMRequest setWifiEnable(bool enabled);
}
Blocks: 917097
Assignee: nobody → chulee
Attached patch WIP - 0001. IDL Change. (obsolete) — Splinter Review
Add |mozWifiManager.setWifiEnable()| for turning wifi on/off.
Attachment #829197 - Flags: feedback?(vchang)
Comment on attachment 829198 [details] [diff] [review]
WIP - 0002. API Implementation.

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

0. Dimi is going to move nsIWifi.idl to webidl. Maybe we should write this to webidl, too ? 
1. Who should handle initial wifi start, gaia or gecko ? 
2. Looks like we don't need handleWifiEnabled() function anymore. Maybe you would like to remove it ?
Attachment #829198 - Flags: feedback?(vchang) → feedback+
Attachment #829197 - Flags: feedback?(vchang) → feedback+
(In reply to Vincent Chang[:vchang] from comment #3)
> Comment on attachment 829198 [details] [diff] [review]
> WIP - 0002. API Implementation.
> 
> Review of attachment 829198 [details] [diff] [review]:
> -----------------------------------------------------------------
> 
> 0. Dimi is going to move nsIWifi.idl to webidl. Maybe we should write this
> to webidl, too ? 

If so, I think we might have to freeze API/interface change for Dimi to work on the transformation.
Just set it to block until it's become webidl.

> 1. Who should handle initial wifi start, gaia or gecko ? 
> 2. Looks like we don't need handleWifiEnabled() function anymore. Maybe you
> would like to remove it ?

As an API, the initialization is better handled by gaia. But in case gaia doesn't have such capability, handleWifiEnabled is preserved for now in case we need to handle wifi initialization in gecko.
Depends on: 886110
Attached patch 0001. IDL Change. (obsolete) — Splinter Review
Change API name.
Attachment #829197 - Attachment is obsolete: true
Attachment #8356485 - Flags: review?(vchang)
Attached patch 0002. API Implementation. (obsolete) — Splinter Review
1. Change API naming.
2. Use queue on wifi enable/disable command.
Attachment #829198 - Attachment is obsolete: true
Attachment #8356486 - Flags: review?(vchang)
Blocks: 947174
Comment on attachment 8356485 [details] [diff] [review]
0001. IDL Change.

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

Thanks for your patch. But as you may know that we are going to replace the idl to webidl for exposed DOM content. So please based on bug 886110 to develop this.
Attachment #8356485 - Flags: review?(vchang)
Attachment #8356486 - Flags: review?(vchang) → feedback+
blocking-b2g: --- → backlog
Attached patch 0002. Implement wifi enable API. (obsolete) — Splinter Review
Attachment #8459534 - Attachment is obsolete: true
Attachment #8466046 - Flags: review?(vchang)
Attachment #8466045 - Flags: review?(mrbkap) → review+
Comment on attachment 8466046 [details] [diff] [review]
0002. Implement wifi enable API.

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

Looks good. Thank you.
Attachment #8466046 - Flags: review?(vchang) → review+
Whiteboard: [p=2]
Target Milestone: --- → 2.1 S2 (15aug)
Add reviewer's name and TODOs.
Attachment #8466046 - Attachment is obsolete: true
Blocks: 1051660
Test case will be tracked by Bug 1051660
blocking-b2g: backlog → ---
You need to log in before you can comment on or make changes to this bug.