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

RESOLVED FIXED in mozilla14

Status

()

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

People

(Reporter: qdot, Assigned: qdot)

Tracking

Trunk
mozilla14
All
Gonk (Firefox OS)
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(3 attachments, 1 obsolete attachment)

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
Blocks: 710489, 727618
Created attachment 605146 [details] [diff] [review]
Patch 1: Change dom/system/b2g to dom/system/gonk

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
Created attachment 605160 [details] [diff] [review]
Patch 2: Change mozilla::dom::telephony to mozilla::dom::gonk for dom/system/gonk objects

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-
Created attachment 605958 [details] [diff] [review]
Patch 1: Change dom/system/b2g to dom/system/gonk

Redone with hg mv.
Attachment #605146 - Attachment is obsolete: true
Attachment #605958 - Flags: review?(philipp)
Created attachment 605960 [details] [diff] [review]
Patch 1: Change dom/system/b2g to dom/system/gonk
Attachment #605960 - 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+
http://hg.mozilla.org/integration/mozilla-inbound/rev/495ed7337159
http://hg.mozilla.org/integration/mozilla-inbound/rev/a03c71163d18
https://hg.mozilla.org/mozilla-central/rev/495ed7337159
https://hg.mozilla.org/mozilla-central/rev/a03c71163d18
Status: NEW → RESOLVED
Last Resolved: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla14
You need to log in before you can comment on or make changes to this bug.