Closed Bug 725002 Opened 13 years ago Closed 13 years ago

RIL: Merge Phone and RIL objects

Categories

(Core :: DOM: Device Interfaces, defect)

ARM
Gonk (Firefox OS)
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla14

People

(Reporter: philikon, Assigned: philikon)

References

Details

Attachments

(7 files)

This was a neat idea, but already too much abstraction than what we needed. It's making stuff like the 3G and SMS implementations where we need to keep track of the round trip data pretty awkward at this point.
I have a pretty clear understanding of what needs to be done here. I think it'll be way easier if I just do this myself rather than explain what needs to be done and go back and forth in review.
Assignee: nobody → philipp
Whiteboard: [good first bug][lang=js][mentor=philikon]
Alright, this is one of those now-or-never moments, since we're going to have refactor the RIL worker a bit to accommodate the newer protocol (bug 728886). Patch onslaught forthcoming. Hold on to your butts...
This converts most of the RIL methods to simply take an 'options' object where the parameters are attributes, rather than individual positional parameters. This is to prepare these methods directly being called via a post message from the main thread, rather than having the 'Phone' object doing the parameter "demarshalling" first.
Attachment #606066 - Flags: review?(kyle)
Removing a bunch of no-ops from the Phone object that we never filled in. If we feel the need to add handlers for these requests at a later time, we always can.
Attachment #606068 - Flags: review?(kyle)
This is the first step in actually eliminating Phone as a separate object, by moving all radio, card, and registration state handling directly to the RIL object.
Attachment #606070 - Flags: review?(kyle)
aaaaand done.
Attachment #606074 - Flags: review?(kyle)
Comment on attachment 606066 [details] [diff] [review] Part 1 (v1): Convert RIL methods to take 'options' object Review of attachment 606066 [details] [diff] [review]: ----------------------------------------------------------------- Looks good, although is there a better way to set up the comments for this? The param readings might be a little confusing now (not sure if this turns into autogenerated documentation somewhere, just looks doxygeny)
Attachment #606066 - Flags: review?(kyle) → review+
Attachment #606068 - Flags: review?(kyle) → review+
Attachment #606070 - Flags: review?(kyle) → review+
Attachment #606071 - Flags: review?(kyle) → review+
Attachment #606072 - Flags: review?(kyle) → review+
Attachment #606073 - Flags: review?(kyle) → review+
Comment on attachment 606074 [details] [diff] [review] Part 7 (v1): Kill off the Phone object entirely Review of attachment 606074 [details] [diff] [review]: ----------------------------------------------------------------- Awesome, things look so much cleaner now. :D
Attachment #606074 - Flags: review?(kyle) → review+
(In reply to Kyle Machulis [:kmachulis] [:qdot] from comment #10) > Looks good, although is there a better way to set up the comments for this? > The param readings might be a little confusing now (not sure if this turns > into autogenerated documentation somewhere, just looks doxygeny) It doesn't officially turn into autogenerated documentation AFAIK, but people could easily do it. We should definitely find a way to distinguish when a method takes positional parameters rather than an `options` object with attributes. Let's leave this for a later time.
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: