Closed Bug 735017 Opened 12 years ago Closed 12 years ago

Clean up namespaces and naming for gonk dom objects in gonk specific code

Categories

(Core :: DOM: Device Interfaces, defect)

All
Gonk (Firefox OS)
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla14

People

(Reporter: qdot, Assigned: qdot)

References

Details

Attachments

(3 files, 1 obsolete file)

Due to the fact that telephony was the first radio work we did, everything involving radios (phone, wifi, soon to be bt/nfc) is actually under the mozilla::dom::telephony namespace. We should rename these to be more general, and set up defines per radio type plus an overall MOZ_GONK_RADIOS (true whenever any of MOZ_GONK_BLUETOOTH/MOZ_GONK_WIFI/MOZ_GONK_RIL/MOZ_GONK_NFC are defined) to make configuration in builds easier.
Assignee: nobody → kyle
First patch to rename dom/system/b2g to dom/system/gonk
Attachment #605146 - Flags: review?(philipp)
Summary: Clean up namespaces and naming for radios in gonk specific code → Clean up namespaces and naming for gonk dom objects in gonk specific code
Change namespaces to be more general. Also changed the title, since this may not be just radios at some point, but rather mobile devices we need to support otherwise (non-host-side USB for instance)
Attachment #605160 - Flags: review?(philipp)
Comment on attachment 605160 [details] [diff] [review]
Patch 2: Change mozilla::dom::telephony to mozilla::dom::gonk for dom/system/gonk objects

This is ok with me, but I don't know our C++ namespacing conventions well enough. Paging Dr Turner.
Attachment #605160 - Flags: review?(philipp)
Attachment #605160 - Flags: review?(bent.mozilla)
Attachment #605160 - Flags: feedback+
Comment on attachment 605160 [details] [diff] [review]
Patch 2: Change mozilla::dom::telephony to mozilla::dom::gonk for dom/system/gonk objects

Chatted with jonas about this a bit, we don't like that everything is somehow under dom::telephony, and we think that is the real problem. We'd prefer telelphony stuff to live in dom::telephony, sms stuff to be in dom::sms, wifi in dom::wifi, etc. Moving everything to dom::gonk is not all that useful in our opinion (though SystemWorkerManager could probably go there).
Attachment #605160 - Flags: review?(bent.mozilla) → review-
I think you're misreading the bug. The only parts I changed to be mozilla::dom::gonk are the SystemWorker and AudioManager references, which are most definitely gonk only, and were under telephony before which didn't make sense. Everything else will stay in their own namespaces.
Comment on attachment 605160 [details] [diff] [review]
Patch 2: Change mozilla::dom::telephony to mozilla::dom::gonk for dom/system/gonk objects

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

Ah! Right. Sorry about that!
Attachment #605160 - Flags: review- → review+
Comment on attachment 605146 [details] [diff] [review]
Patch 1: Change dom/system/b2g to dom/system/gonk

This is good stuff, but the patch should use `hg mv` to rename the files.
Attachment #605146 - Flags: review?(philipp) → review-
Redone with hg mv.
Attachment #605146 - Attachment is obsolete: true
Attachment #605958 - Flags: review?(philipp)
Comment on attachment 605960 [details] [diff] [review]
Patch 1: Change dom/system/b2g to dom/system/gonk

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

Ignore. Accidental add.
Attachment #605960 - Flags: review?(philipp)
Comment on attachment 605958 [details] [diff] [review]
Patch 1: Change dom/system/b2g to dom/system/gonk

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

r=me with the following things addressed:

::: dom/src/geolocation/Makefile.in
@@ +84,1 @@
>                     $(NULL)

While you're in there you can also get rid of the $(NULL) and backslash. Not needed for a single line.

::: dom/system/b2g/Makefile.in
@@ +12,5 @@
>  include $(DEPTH)/config/autoconf.mk
>  
>  MODULE           = dom
> +LIBRARY_NAME     = domsystemgonk_s
> +XPIDL_MODULE     = dom_system_gonk

Changing the XPIDL module name means you also have to update the package manifests in b2g/installer/ and browser/installer/
Attachment #605958 - Flags: review?(philipp) → review+
https://hg.mozilla.org/mozilla-central/rev/495ed7337159
https://hg.mozilla.org/mozilla-central/rev/a03c71163d18
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla14
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: