Closed Bug 1146270 Opened 10 years ago Closed 10 years ago

Move HCI Event Origin into NfcOptions.webidl

Categories

(Firefox OS Graveyard :: NFC, defect)

ARM
Gonk (Firefox OS)
defect
Not set
normal

Tracking

(firefox40 fixed)

RESOLVED FIXED
2.2 S10 (17apr)
Tracking Status
firefox40 --- fixed

People

(Reporter: allstars.chh, Assigned: allstars.chh)

References

Details

(Whiteboard: [p=2])

Attachments

(1 file, 1 obsolete file)

Move the definition of the origins of HCI Transaction Event into NfcOptions.webidl.
Attached patch Patch. (obsolete) (deleted) — Splinter Review
Attachment #8582293 - Flags: review?(dlee)
Comment on attachment 8582293 [details] [diff] [review] Patch. Review of attachment 8582293 [details] [diff] [review]: ----------------------------------------------------------------- ::: dom/nfc/gonk/NfcService.cpp @@ +185,5 @@ > > // HCI Event Transaction parameters. > if (mEvent.mOriginType != -1) { > + HCIEventOrigin origin = static_cast<HCIEventOrigin>(mEvent.mOriginType); > + MOZ_ASSERT(origin < HCIEventOrigin::EndGuard_); I found when i build a release build, following error message occurs: error: unused variable 'origin'
Attachment #8582293 - Flags: review?(dlee)
Attached patch Patch v2. (deleted) — Splinter Review
Attachment #8582293 - Attachment is obsolete: true
Attachment #8582950 - Flags: review?(dlee)
Attachment #8582950 - Flags: review?(dlee) → review+
Comment on attachment 8582950 [details] [diff] [review] Patch v2. r? to smaug for the WebIDL change in NfcOptions.webidl
Attachment #8582950 - Flags: review?(bugs)
Comment on attachment 8582950 [details] [diff] [review] Patch v2. So why not change NfcEventOptions's origin to be type HCIEventOrigin?
Comment on attachment 8582950 [details] [diff] [review] Patch v2. If that is not possible for some reason, please re-ask review for this.
Attachment #8582950 - Flags: review?(bugs) → review-
(In reply to Olli Pettay [:smaug] from comment #5) > Comment on attachment 8582950 [details] [diff] [review] > Patch v2. > > So why not change NfcEventOptions's origin to be type HCIEventOrigin? Hi Smaug Sorry for my late reply. The 'origin' in NfcEventOptions will have the index for the type of HCIEventOrigin, for example it will be "SIM1", "SIM2". Gecko will receive the type of the origin (for example, 0 for "SIM", 1 for "eSE"), and the index number (1, 2, ... etc) from NFC daemon, and I took advantage of the binding code to use the enumeration for "SIM", "eSE" and "ASSD". Thanks
Comment on attachment 8582950 [details] [diff] [review] Patch v2. r? again for comment 7.
Attachment #8582950 - Flags: review- → review?(bugs)
Still don't understand. You do event.mOrigin.Value().AssignASCII(HCIEventOriginValues::strings[mEvent.mOriginType].value); where event is NfcEventOptions. So you always assign a value which is from HCIEventOrigin. Why not just assign the enum value?
Flags: needinfo?(allstars.chh)
Attachment #8582950 - Flags: review?(bugs) → review-
Hi Smaug (In reply to Olli Pettay [:smaug] (review queue is getting too long. New requests after Easter, please) from comment #9) > Still don't understand. > You do > event.mOrigin.Value().AssignASCII(HCIEventOriginValues::strings[mEvent. > mOriginType].value); Then the next line is to add the index of the origin. event.mOrigin.Value().AppendInt(mEvent.mOriginIndex, 16 /* radix */); > where event is NfcEventOptions. event.mOrigin is type of DOMString, it could be "SIM1", "SIM2", ... depend on the implementation. But the HCIEventOrigin is just "SIM", "eSE", .. etc, without the index.
Flags: needinfo?(allstars.chh)
Comment on attachment 8582950 [details] [diff] [review] Patch v2. oh, I see. Origin get rather odd value. but doesn't change the current behavior, so fine.
Attachment #8582950 - Flags: review- → review+
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: