Closed
Bug 764682
Opened 12 years ago
Closed 12 years ago
Implement wifi events in c++
Categories
(Core :: DOM: Device Interfaces, defect)
Tracking
()
RESOLVED
FIXED
mozilla16
People
(Reporter: gwagner, Assigned: gwagner)
References
Details
Attachments
(1 file, 2 obsolete files)
(deleted),
patch
|
smaug
:
review+
|
Details | Diff | Splinter Review |
No description provided.
Assignee | ||
Updated•12 years ago
|
Assignee: nobody → anygregor
Assignee | ||
Comment 1•12 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 | ||
Comment 2•12 years ago
|
||
Assignee | ||
Comment 3•12 years ago
|
||
Attachment #633303 -
Attachment is obsolete: true
Attachment #633316 -
Flags: review?(bugs)
Comment 4•12 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•12 years ago
|
||
Attachment #633316 -
Attachment is obsolete: true
Attachment #633601 -
Flags: review?(bugs)
Comment 6•12 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•12 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•12 years ago
|
||
Followup for B2G build
https://hg.mozilla.org/integration/mozilla-inbound/rev/a217eba61a59
Comment 9•12 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/75739012a1a6
https://hg.mozilla.org/mozilla-central/rev/a217eba61a59
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla16
Comment 11•12 years ago
|
||
@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
Comment 12•12 years ago
|
||
also, |wifiManager.enabled| is always false, for no apparent reason. :(
Comment 13•12 years ago
|
||
Tim, can you file a new bug on that and CC me?
You need to log in
before you can comment on or make changes to this bug.
Description
•