The default bug view has changed. See this FAQ.

Implement wifi events in c++

RESOLVED FIXED in mozilla16

Status

()

Core
DOM: Device Interfaces
RESOLVED FIXED
5 years ago
5 years ago

People

(Reporter: gwagner, Assigned: gwagner)

Tracking

unspecified
mozilla16
x86
Mac OS X
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment, 2 obsolete attachments)

Comment hidden (empty)
(Assignee)

Updated

5 years ago
Assignee: nobody → anygregor
(Assignee)

Comment 1

5 years ago
This depends on 
ifdef MOZ_B2G_RIL
Lots and lots of ifdefs... Blake do you have an idea how to avoid them?
(Assignee)

Updated

5 years ago
Depends on: 764928
(Assignee)

Comment 2

5 years ago
Created attachment 633303 [details] [diff] [review]
v1
(Assignee)

Comment 3

5 years ago
Created attachment 633316 [details] [diff] [review]
patch
Attachment #633303 - Attachment is obsolete: true
Attachment #633316 - Flags: review?(bugs)

Comment 4

5 years ago
Comment on attachment 633316 [details] [diff] [review]
patch


>+NS_IMETHODIMP
>+nsDOMMozWifiStatusChangeEvent::InitMozWifiStatusChangeEvent(const nsAString& aType,
>+                                                            bool aCanBubble,
>+                                                            bool aCancelable,
>+                                                            nsIVariant *aNetwork,
Nit, nsIVariant* aNetwork

>diff -r 35c79f50d85f dom/interfaces/events/nsIWifiEvents.idl
>--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
>+++ b/dom/interfaces/events/nsIWifiEvents.idl	Thu Jun 14 16:47:14 2012 -0700
>@@ -0,0 +1,75 @@
>+/* This Source Code Form is subject to the terms of the Mozilla Public
>+ * License, v. 2.0. If a copy of the MPL was not distributed with this
>+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
>+
>+#include "nsISupports.idl"
>+#include "nsIDOMEventTarget.idl"
>+#include "nsIDOMEvent.idl"
>+
>+interface nsIVariant;
>+
>+[scriptable, builtinclass, uuid(5b8eaf12-08fb-4cba-b641-4d0b6aac3505)]
>+interface nsIDOMMozWifiStatusChangeEvent : nsIDOMEvent {
{ should be in the next line


I think the easiest way to handle b2g is to put dictionaries to separate .idl
Then the .idl which has the event interfaces would be built only with b2g,
since those interfaces end up to global scope.
Dictionaries can be built always, since they don't end up to global scope.



(I should write a script to automatically implement these kinds of simple events inheriting nsIDOMEvent)
Attachment #633316 - Flags: review?(bugs) → review-
(Assignee)

Comment 5

5 years ago
Created attachment 633601 [details] [diff] [review]
patch
Attachment #633316 - Attachment is obsolete: true
Attachment #633601 - Flags: review?(bugs)

Comment 6

5 years ago
Comment on attachment 633601 [details] [diff] [review]
patch


>+  mozilla::dom::MozWifiConnectionInfoEventInit d;
>+  nsresult rv = d.Init(aCx, aVal);
>+  NS_ENSURE_SUCCESS(rv, rv);
>+  return InitMozWifiConnectionInfoEvent(aType, d.bubbles, d.cancelable, d.network, d.signalStrength, d.relSignalStrength, d.linkSpeed);
Is this overlong line?

>+++ b/dom/interfaces/events/nsIWifiEvents.idl	Fri Jun 15 11:34:25 2012 -0700
Hmm, this should be now called something else.
nsIWifiEventInits.idl ?
Attachment #633601 - Flags: review?(bugs) → review+
(Assignee)

Comment 7

5 years ago
> (I should write a script to automatically implement these kinds of simple
> events inheriting nsIDOMEvent)

That would be great :) Thanks for the quick review!


https://hg.mozilla.org/integration/mozilla-inbound/rev/75739012a1a6
(Assignee)

Comment 8

5 years ago
Followup for B2G build
https://hg.mozilla.org/integration/mozilla-inbound/rev/a217eba61a59
https://hg.mozilla.org/mozilla-central/rev/75739012a1a6
https://hg.mozilla.org/mozilla-central/rev/a217eba61a59
Status: NEW → RESOLVED
Last Resolved: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla16
(Assignee)

Updated

5 years ago
Duplicate of this bug: 764479
@gwagner, |wifiManager.connectionInfoUpdate| is not getting called every 5 sec as documented on idl. Lastest m-c, this fix is included. Do you have any idea?

https://github.com/mozilla-b2g/gaia/issues/1778
also, |wifiManager.enabled| is always false, for no apparent reason. :(
Tim, can you file a new bug on that and CC me?
Blocks: 766497
Blocks: 766500
You need to log in before you can comment on or make changes to this bug.