Closed
Bug 927298
Opened 12 years ago
Closed 7 years ago
Support wifi hotspot status APIs
Categories
(Firefox OS Graveyard :: Wifi, defect)
Tracking
(tracking-b2g:backlog)
RESOLVED
WONTFIX
| tracking-b2g | backlog |
People
(Reporter: vchang, Unassigned)
References
Details
Attachments
(2 files, 3 obsolete files)
|
1.92 KB,
patch
|
Details | Diff | Splinter Review | |
|
4.04 KB,
patch
|
Details | Diff | Splinter Review |
Currently, we use settings to indicate the enabling or disabling status of wifi hotspot. We need at least below APIs to indicate the status of wifi hotspot to gaia.
interface nsIDOMWifiManager : nsISupports
{
attribute nsIDOMEventListener onwifitetheringenabled;
attribute nsIDOMEventListener onwifitetheringdisabled;
}
Updated•12 years ago
|
Assignee: nobody → kchang
Updated•12 years ago
|
Assignee: kchang → dlee
Comment 2•12 years ago
|
||
Updated•12 years ago
|
Attachment #829150 -
Attachment is obsolete: true
Comment 3•12 years ago
|
||
Updated•12 years ago
|
Attachment #829153 -
Flags: review?(vchang)
Updated•12 years ago
|
Attachment #829153 -
Attachment is obsolete: true
Attachment #829153 -
Flags: review?(vchang)
Updated•12 years ago
|
Status: NEW → ASSIGNED
Updated•11 years ago
|
blocking-b2g: --- → backlog
Comment 4•11 years ago
|
||
Comment 5•11 years ago
|
||
Attachment #8479686 -
Flags: review?(vchang)
Comment 6•11 years ago
|
||
Attachment #8477319 -
Attachment is obsolete: true
Attachment #8479687 -
Flags: review?(vchang)
Comment 7•11 years ago
|
||
Perfect! We finally can have an API to verify the tethering enable/disable result
in the test cases!
| Reporter | ||
Comment 8•11 years ago
|
||
Comment on attachment 8479687 [details] [diff] [review]
Part2. DOM and WifiWorker implementation
Review of attachment 8479687 [details] [diff] [review]:
-----------------------------------------------------------------
::: dom/tethering/TetheringManager.js
@@ +41,3 @@
> this.initDOMRequestHelper(aWindow, messages);
> +
> + cpmm.sendSyncMessage("WifiManager:getState");
Do we need this for Tethering?
::: dom/wifi/WifiWorker.js
@@ +3444,5 @@
> this.setWifiApEnabled(enabled, function() {
> if ((enabled && WifiManager.tetheringState == "COMPLETED") ||
> (!enabled && WifiManager.tetheringState == "UNINITIALIZED")) {
> self._sendMessage(message, true, msg.data, msg);
> + self._fireEvent("wifitetheringstateupdate", { state: enabled });
Do we still need the APIs? It seems that setTetheringEnabled() API has enough information to react tethering status.
Attachment #8479687 -
Flags: review?(vchang)
| Reporter | ||
Updated•11 years ago
|
Attachment #8479686 -
Flags: review?(vchang)
Comment 9•11 years ago
|
||
(In reply to Vincent Chang[:vchang] from comment #8)
> Comment on attachment 8479687 [details] [diff] [review]
> Part2. DOM and WifiWorker implementation
>
> Review of attachment 8479687 [details] [diff] [review]:
> -----------------------------------------------------------------
>
> ::: dom/tethering/TetheringManager.js
> @@ +41,3 @@
> > this.initDOMRequestHelper(aWindow, messages);
> > +
> > + cpmm.sendSyncMessage("WifiManager:getState");
>
> Do we need this for Tethering?
>
In WifiWorker's implementation, getState will register domManager so if there is any event fired from WifiWorker, DOM layer can receive the message. For this patch, the required message is wifitetheringstateupdate.
> ::: dom/wifi/WifiWorker.js
> @@ +3444,5 @@
> > this.setWifiApEnabled(enabled, function() {
> > if ((enabled && WifiManager.tetheringState == "COMPLETED") ||
> > (!enabled && WifiManager.tetheringState == "UNINITIALIZED")) {
> > self._sendMessage(message, true, msg.data, msg);
> > + self._fireEvent("wifitetheringstateupdate", { state: enabled });
>
> Do we still need the APIs? It seems that setTetheringEnabled() API has
> enough information to react tethering status.
If a webpage only interested in knowing tethering state change , he can listen to this event to know if any other webpage change the tethering status by using setTetheringEnabled API.
Comment 10•11 years ago
|
||
Hi Vincent,
Could you help check if comment 9 is reasonable. thanks
Flags: needinfo?(vchang)
| Reporter | ||
Comment 11•11 years ago
|
||
(In reply to Dimi Lee[:dimi][:dlee] from comment #9)
> (In reply to Vincent Chang[:vchang] from comment #8)
> > Comment on attachment 8479687 [details] [diff] [review]
> > Part2. DOM and WifiWorker implementation
> >
> > Review of attachment 8479687 [details] [diff] [review]:
> > -----------------------------------------------------------------
> >
> > ::: dom/tethering/TetheringManager.js
> > @@ +41,3 @@
> > > this.initDOMRequestHelper(aWindow, messages);
> > > +
> > > + cpmm.sendSyncMessage("WifiManager:getState");
> >
> > Do we need this for Tethering?
> >
> In WifiWorker's implementation, getState will register domManager so if
> there is any event fired from WifiWorker, DOM layer can receive the message.
> For this patch, the required message is wifitetheringstateupdate.
Yeah, you are right. So we should prevent _fireEvent() sending message to wrong dommanager?
> > ::: dom/wifi/WifiWorker.js
> > @@ +3444,5 @@
> > > this.setWifiApEnabled(enabled, function() {
> > > if ((enabled && WifiManager.tetheringState == "COMPLETED") ||
> > > (!enabled && WifiManager.tetheringState == "UNINITIALIZED")) {
> > > self._sendMessage(message, true, msg.data, msg);
> > > + self._fireEvent("wifitetheringstateupdate", { state: enabled });
> >
> > Do we still need the APIs? It seems that setTetheringEnabled() API has
> > enough information to react tethering status.
>
> If a webpage only interested in knowing tethering state change , he can
> listen to this event to know if any other webpage change the tethering
> status by using setTetheringEnabled API.
Make sense.
Flags: needinfo?(vchang)
| Assignee | ||
Updated•10 years ago
|
blocking-b2g: backlog → ---
tracking-b2g:
--- → backlog
Comment 12•10 years ago
|
||
Not actively working on this, if anyone is interested in this please feel free to take it.
Assignee: dlee → nobody
Status: ASSIGNED → NEW
Comment 13•7 years ago
|
||
Firefox OS is not being worked on
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → WONTFIX
You need to log in
before you can comment on or make changes to this bug.
Description
•