Closed
Bug 1009347
Opened 11 years ago
Closed 11 years ago
Create dom/bluetooth2 folder for API refinement implementation
Categories
(Firefox OS Graveyard :: Bluetooth, defect)
Tracking
(Not tracked)
RESOLVED
FIXED
2.0 S2 (23may)
People
(Reporter: ben.tian, Assigned: yrliou)
References
Details
(Whiteboard: [webbt-api])
Attachments
(6 files, 7 obsolete files)
(deleted),
patch
|
shawnjohnjr
:
feedback+
|
Details | Diff | Splinter Review |
(deleted),
patch
|
Details | Diff | Splinter Review | |
(deleted),
patch
|
Details | Diff | Splinter Review | |
(deleted),
patch
|
Details | Diff | Splinter Review | |
(deleted),
patch
|
bzbarsky
:
review+
|
Details | Diff | Splinter Review |
(deleted),
patch
|
Details | Diff | Splinter Review |
1) Create dom/bluetooth2 folder for API refinement and copy dom/bluetooth to dom/bluetooth2.
2) Modify dom/webidl/Bluetooth*.webidl and moz.build to build dom/bluetooth2 folder based on additional build flag.
Jocelyn, please help on this bug. Thanks.
Assignee | ||
Comment 1•11 years ago
|
||
Assignee | ||
Comment 2•11 years ago
|
||
Assignee | ||
Updated•11 years ago
|
Attachment #8421516 -
Attachment is patch: true
Attachment #8421516 -
Attachment mime type: message/rfc822 → text/plain
Assignee | ||
Comment 3•11 years ago
|
||
Assignee | ||
Comment 4•11 years ago
|
||
Assignee | ||
Updated•11 years ago
|
Attachment #8421517 -
Attachment description: Bug 1009347 Patch3: Using dom/bluetooth2 based on bluetooth API version build flagnewapi3 → Bug 1009347 Patch3: Using dom/bluetooth2 based on bluetooth API version build flag
Assignee | ||
Comment 5•11 years ago
|
||
Assignee | ||
Updated•11 years ago
|
Attachment #8421515 -
Flags: feedback?(btian)
Assignee | ||
Updated•11 years ago
|
Attachment #8421516 -
Flags: feedback?(btian)
Assignee | ||
Updated•11 years ago
|
Attachment #8421517 -
Flags: feedback?(btian)
Assignee | ||
Updated•11 years ago
|
Attachment #8421518 -
Flags: feedback?(btian)
Assignee | ||
Comment 6•11 years ago
|
||
Comment on attachment 8421522 [details] [diff] [review]
(local patch) Bug 1009347 Patch5: Set BT API version to V2
Hi Shuang,
May I ask that is this patch looks ok to you?
Or there's a more suitable point to insert this build flag?
Please let me know if you have any feedback.
Thanks,
Jocelyn
Attachment #8421522 -
Flags: feedback?(shuang)
Reporter | ||
Comment 7•11 years ago
|
||
Comment on attachment 8421515 [details] [diff] [review]
Bug 1009347 Patch1: Make copy of dom/bluetooth for API refinement
Review of attachment 8421515 [details] [diff] [review]:
-----------------------------------------------------------------
LGTM.
Attachment #8421515 -
Flags: review?(echou)
Attachment #8421515 -
Flags: feedback?(btian)
Attachment #8421515 -
Flags: feedback+
Reporter | ||
Comment 8•11 years ago
|
||
Comment on attachment 8421516 [details] [diff] [review]
Bug 1009347 Patch2: Using new bluetooth webidls based on bluetooth API version build flag
Review of attachment 8421516 [details] [diff] [review]:
-----------------------------------------------------------------
LGTM.
Attachment #8421516 -
Flags: review?(echou)
Attachment #8421516 -
Flags: feedback?(btian)
Attachment #8421516 -
Flags: feedback+
Reporter | ||
Comment 9•11 years ago
|
||
Comment on attachment 8421517 [details] [diff] [review]
Bug 1009347 Patch3: Using dom/bluetooth2 based on bluetooth API version build flag
Review of attachment 8421517 [details] [diff] [review]:
-----------------------------------------------------------------
LGTM.
Attachment #8421517 -
Flags: review?(echou)
Attachment #8421517 -
Flags: feedback?(btian)
Attachment #8421517 -
Flags: feedback+
Reporter | ||
Comment 10•11 years ago
|
||
Comment on attachment 8421518 [details] [diff] [review]
Bug 1009347 Patch4: Change binding headers in bluetooth2 for using new webidls
Review of attachment 8421518 [details] [diff] [review]:
-----------------------------------------------------------------
LGTM.
Attachment #8421518 -
Flags: review?(echou)
Attachment #8421518 -
Flags: feedback?(btian)
Attachment #8421518 -
Flags: feedback+
Reporter | ||
Comment 11•11 years ago
|
||
Comment on attachment 8421516 [details] [diff] [review]
Bug 1009347 Patch2: Using new bluetooth webidls based on bluetooth API version build flag
Marcos, can you help review our webidl patches for WebBluetooth API refinement?
This bug is to create another folder dom/bluetooth2 for the new API and build it according to additional build flag MOZ_B2G_BT_API_V2 (by default OFF).
Two patches for review:
- Patch2 is to create webidl files for the new API and build them according to build flag, and
- Patch3 is to build dom/bluetooth2 when the build flag is set.
Let us know for any question. Thanks.
Attachment #8421516 -
Flags: review?(echou) → review?(marcos)
Reporter | ||
Updated•11 years ago
|
Attachment #8421517 -
Flags: review?(echou) → review?(marcos)
Attachment #8421522 -
Flags: feedback?(shuang) → feedback+
(In reply to jocelyn [:jocelyn] from comment #6)
> Comment on attachment 8421522 [details] [diff] [review]
> (local patch) Bug 1009347 Patch5: Set BT API version to V2
>
> Hi Shuang,
>
> May I ask that is this patch looks ok to you?
> Or there's a more suitable point to insert this build flag?
> Please let me know if you have any feedback.
Add API flag is a little unusual, please add explanation when requesting review to mwu or glandium. For now, I think it's ok to use it.
Comment 13•11 years ago
|
||
Comment on attachment 8421516 [details] [diff] [review]
Bug 1009347 Patch2: Using new bluetooth webidls based on bluetooth API version build flag
Review of attachment 8421516 [details] [diff] [review]:
-----------------------------------------------------------------
::: dom/webidl/BluetoothAdapter2.webidl
@@ +27,5 @@
> + // current track length (ms)
> + long long duration = -1;
> + // playing time (ms)
> + long long position = -1;
> + // one of 'STOPPED'/'PLAYING'/'PAUSED'/'FWD_SEEK'/'REV_SEEK'/'ERROR'
You should create an enum for the playStatus, maybe call it PlayState. Make sure the states are in lower-case.
{
PlayState playState;
}
enum PlayState { "stopped", "playing", ...};
@@ +46,5 @@
> +
> + // array of type DOMString[]
> + [GetterThrows]
> + readonly attribute any uuids;
> +
I guess there is some reason why you can't use the types in the comments above.
@@ +65,5 @@
> + // Fired when remote devices query current media play status
> + attribute EventHandler onrequestmediaplaystatus;
> +
> + [NewObject, Throws]
> + DOMRequest setName(DOMString name);
Just wondering, but given that we now have Promises, can't we start deprecating the use of DOMRequest?
@@ +81,5 @@
> + DOMRequest unpair(DOMString deviceAddress);
> + [NewObject, Throws]
> + DOMRequest getPairedDevices();
> + [NewObject, Throws]
> + DOMRequest getConnectedDevices(unsigned short serviceUuid);
Aren't UUIDs strings? Applies globally for other serviceUuids.
::: dom/webidl/BluetoothDevice2.webidl
@@ +3,5 @@
> +/* 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/. */
> +
> +interface BluetoothDevice : EventTarget {
It's a bit strange that this implements EventTarget but doesn't have any EventHandler attributes? I would have expected some "attribute EventHandler onfoo;" listed in the IDL.
@@ +17,5 @@
> + readonly attribute any uuids;
> +
> + // array of type DOMString[]
> + [Throws]
> + readonly attribute any services;
It's not clear what kind of services will be returned? Is it a bunch of IDs or actual service names?
::: dom/webidl/BluetoothManager2.webidl
@@ +4,5 @@
> + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
> +
> +interface BluetoothManager : EventTarget {
> + [Throws]
> + readonly attribute boolean enabled;
Seems a bit mean to throw when checking an attribute.
@@ +13,5 @@
> +
> + [Throws]
> + boolean isConnected(unsigned short aProfile);
> + [NewObject, Throws]
> + DOMRequest? getDefaultAdapter();
Why does this return null? I think this should always return a DOMRequest that results in an error if there is no default adapter.
Reporter | ||
Comment 14•11 years ago
|
||
Sorry Marcos I didn't say it clear.
This patch only creates a copy of existing bluetooth API webidl files (BluetoothManager.webidl, BluetoothAdapter.webidl, BluetoothDevice.idl). What we want to do is fork them first in this bug and start the refinement [1] based on them. We'd like to request for your review as this patch modifies files under dom/webidl/ and dom/ folders. Please let us know for any suggestion. Thanks.
[1] https://wiki.mozilla.org/B2G/Bluetooth/WebBluetooth-v2
(In reply to Marcos Caceres [:marcosc] from comment #13)
> Comment on attachment 8421516 [details] [diff] [review]
> Bug 1009347 Patch2: Using new bluetooth webidls based on bluetooth API
> version build flag
>
> Review of attachment 8421516 [details] [diff] [review]:
> -----------------------------------------------------------------
>
> ::: dom/webidl/BluetoothAdapter2.webidl
> @@ +27,5 @@
> > + // current track length (ms)
> > + long long duration = -1;
> > + // playing time (ms)
> > + long long position = -1;
> > + // one of 'STOPPED'/'PLAYING'/'PAUSED'/'FWD_SEEK'/'REV_SEEK'/'ERROR'
>
> You should create an enum for the playStatus, maybe call it PlayState. Make
> sure the states are in lower-case.
>
> {
> PlayState playState;
> }
>
> enum PlayState { "stopped", "playing", ...};
>
> @@ +46,5 @@
> > +
> > + // array of type DOMString[]
> > + [GetterThrows]
> > + readonly attribute any uuids;
> > +
>
> I guess there is some reason why you can't use the types in the comments
> above.
>
> @@ +65,5 @@
> > + // Fired when remote devices query current media play status
> > + attribute EventHandler onrequestmediaplaystatus;
> > +
> > + [NewObject, Throws]
> > + DOMRequest setName(DOMString name);
>
> Just wondering, but given that we now have Promises, can't we start
> deprecating the use of DOMRequest?
>
> @@ +81,5 @@
> > + DOMRequest unpair(DOMString deviceAddress);
> > + [NewObject, Throws]
> > + DOMRequest getPairedDevices();
> > + [NewObject, Throws]
> > + DOMRequest getConnectedDevices(unsigned short serviceUuid);
>
> Aren't UUIDs strings? Applies globally for other serviceUuids.
>
> ::: dom/webidl/BluetoothDevice2.webidl
> @@ +3,5 @@
> > +/* 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/. */
> > +
> > +interface BluetoothDevice : EventTarget {
>
> It's a bit strange that this implements EventTarget but doesn't have any
> EventHandler attributes? I would have expected some "attribute EventHandler
> onfoo;" listed in the IDL.
>
> @@ +17,5 @@
> > + readonly attribute any uuids;
> > +
> > + // array of type DOMString[]
> > + [Throws]
> > + readonly attribute any services;
>
> It's not clear what kind of services will be returned? Is it a bunch of IDs
> or actual service names?
>
> ::: dom/webidl/BluetoothManager2.webidl
> @@ +4,5 @@
> > + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
> > +
> > +interface BluetoothManager : EventTarget {
> > + [Throws]
> > + readonly attribute boolean enabled;
>
> Seems a bit mean to throw when checking an attribute.
>
> @@ +13,5 @@
> > +
> > + [Throws]
> > + boolean isConnected(unsigned short aProfile);
> > + [NewObject, Throws]
> > + DOMRequest? getDefaultAdapter();
>
> Why does this return null? I think this should always return a DOMRequest
> that results in an error if there is no default adapter.
Flags: needinfo?(marcos)
Reporter | ||
Updated•11 years ago
|
Flags: needinfo?(marcos)
Comment 15•11 years ago
|
||
Comment on attachment 8421516 [details] [diff] [review]
Bug 1009347 Patch2: Using new bluetooth webidls based on bluetooth API version build flag
Review of attachment 8421516 [details] [diff] [review]:
-----------------------------------------------------------------
Sorry for the misunderstanding, I guess then LGTM.
Attachment #8421516 -
Flags: review?(marcos) → review+
Comment 16•11 years ago
|
||
Comment on attachment 8421517 [details] [diff] [review]
Bug 1009347 Patch3: Using dom/bluetooth2 based on bluetooth API version build flag
Review of attachment 8421517 [details] [diff] [review]:
-----------------------------------------------------------------
LGTM
Attachment #8421517 -
Flags: review?(marcos) → review+
Assignee | ||
Comment 17•11 years ago
|
||
We need to change other moz.build files which import bluetooth headers
Assignee | ||
Comment 18•11 years ago
|
||
Accidentally include webidl changes in patch6 , remove it
Attachment #8423699 -
Attachment is obsolete: true
Comment 19•11 years ago
|
||
Comment on attachment 8421515 [details] [diff] [review]
Bug 1009347 Patch1: Make copy of dom/bluetooth for API refinement
Review of attachment 8421515 [details] [diff] [review]:
-----------------------------------------------------------------
r+ since this is just a copy of dom/bluetooth. Please ensure there won't be any build failure happening, and next time please write a short summary of the patch to explain what the patch is going to change.
Attachment #8421515 -
Flags: review?(echou) → review+
Updated•11 years ago
|
Attachment #8421518 -
Flags: review?(echou) → review+
Assignee | ||
Comment 20•11 years ago
|
||
Do "hg cp dom/bluetooth dom/bluetooth2" for making a development environment for new bluetooth API.
Attachment #8421515 -
Attachment is obsolete: true
Assignee | ||
Comment 21•11 years ago
|
||
1. hg cp BluetoothManager, BluetoothDevice, BluetoothAdapter webidls for new api
2. conditionally adding webidls based on MOZ_B2G_BT_API_V2 flag
Attachment #8421516 -
Attachment is obsolete: true
Assignee | ||
Updated•11 years ago
|
Attachment #8424653 -
Attachment description: [Final] Bug 1009347 Patch2: Using new bluetooth webidls based on bluetooth API version build flag → [Final] Bug 1009347 Patch2: Using new bluetooth webidls based on bluetooth API version build flag, f=btian, r=echou
Assignee | ||
Updated•11 years ago
|
Attachment #8424653 -
Attachment is patch: true
Attachment #8424653 -
Attachment mime type: message/rfc822 → text/plain
Assignee | ||
Updated•11 years ago
|
Attachment #8424653 -
Attachment description: [Final] Bug 1009347 Patch2: Using new bluetooth webidls based on bluetooth API version build flag, f=btian, r=echou → [Final] Bug 1009347 Patch2: Using new bluetooth webidls based on bluetooth API version build flag, f=btian, r=mcaceres
Assignee | ||
Comment 22•11 years ago
|
||
Switching dom/bluetooth and dom/bluetooth2 based on MOZ_B2G_BT_API_V2
Attachment #8421517 -
Attachment is obsolete: true
Assignee | ||
Comment 23•11 years ago
|
||
Change included binding header files for BT manager, adapter, and device
(ex: BluetoothAdapterBinding.h -> BluetoothAdapter2Binding.h)
Attachment #8421518 -
Attachment is obsolete: true
Assignee | ||
Comment 24•11 years ago
|
||
Assignee | ||
Comment 25•11 years ago
|
||
update commit log for reviewer name
Attachment #8424653 -
Attachment is obsolete: true
Assignee | ||
Comment 26•11 years ago
|
||
update reviewer name in the commit log
Attachment #8424654 -
Attachment is obsolete: true
Assignee | ||
Updated•11 years ago
|
Keywords: checkin-needed
Assignee | ||
Comment 27•11 years ago
|
||
Cancel the checkin request for running more build options on try server
Keywords: checkin-needed
Assignee | ||
Comment 28•11 years ago
|
||
Assignee | ||
Updated•11 years ago
|
Keywords: checkin-needed
Reporter | ||
Comment 29•11 years ago
|
||
Clean 'checkin-needed' as patch 2 requires DOM peer review.
Keywords: checkin-needed
Reporter | ||
Comment 30•11 years ago
|
||
Comment on attachment 8424683 [details] [diff] [review]
[Final] Bug 1009347 Patch2: Using new bluetooth webidls based on bluetooth API version build flag, f=btian, r=marcosc, r=bz
Boris, can you review our WEBIDL change for WebBluetooth API refinement?
This patch creates a copy of existing bluetooth webidl files for us to work based on them. The whole bug intends to create another folder dom/bluetooth2 for the new API and build it according to additional build flag MOZ_B2G_BT_API_V2 (by default OFF).
Attachment #8424683 -
Flags: review?(bzbarsky)
Comment 31•11 years ago
|
||
Comment on attachment 8424683 [details] [diff] [review]
[Final] Bug 1009347 Patch2: Using new bluetooth webidls based on bluetooth API version build flag, f=btian, r=marcosc, r=bz
r=me
Attachment #8424683 -
Flags: review?(bzbarsky) → review+
Assignee | ||
Updated•11 years ago
|
Attachment #8424683 -
Attachment description: [Final] Bug 1009347 Patch2: Using new bluetooth webidls based on bluetooth API version build flag, f=btian, r=marcosc → [Final] Bug 1009347 Patch2: Using new bluetooth webidls based on bluetooth API version build flag, f=btian, r=marcosc, r=bz
Assignee | ||
Updated•11 years ago
|
Keywords: checkin-needed
Reporter | ||
Comment 32•11 years ago
|
||
Reporter | ||
Updated•11 years ago
|
Keywords: checkin-needed
Comment 33•11 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/7e5b760b4fdf
https://hg.mozilla.org/mozilla-central/rev/71df0f6dface
https://hg.mozilla.org/mozilla-central/rev/1d21153bfe47
https://hg.mozilla.org/mozilla-central/rev/1887733a9549
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Updated•11 years ago
|
Target Milestone: --- → 2.0 S2 (23may)
You need to log in
before you can comment on or make changes to this bug.
Description
•