Refactor Response/Notification sent from nfcd

RESOLVED FIXED in Firefox 39

Status

RESOLVED FIXED
4 years ago
4 years ago

People

(Reporter: allstars.chh, Unassigned)

Tracking

unspecified
2.2 S12 (15may)
ARM
Gonk (Firefox OS)
Dependency tree / graph

Firefox Tracking Flags

(firefox39 fixed)

Details

(Whiteboard: [p=1])

Attachments

(2 attachments, 1 obsolete attachment)

I'd like to start refactoring the messages send from nfcd.
The problems for current message format are:

1. General Response is used to represent the response of WriteNDEF, makeReadOnly and Format requests. The problem is gecko needs to keep track of the last requests to know how to process this 'General Response' to Web application.

2. The type of the message is represented in 4 octets, and response code starts from 1000, and notification starts from 2000. I'd like to make it easier to make them both start from 0, and use the MSB to differentiate this message is response or notification.
(Assignee)

Updated

4 years ago
Attachment #8569732 - Flags: review?(dlee)
Created attachment 8569738 [details] [review]
nfcd Pull Request
Attachment #8569738 - Flags: review?(dlee)
Comment on attachment 8569732 [details] [diff] [review]
Patch.

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

::: dom/nfc/gonk/NfcMessageHandler.cpp
@@ +125,5 @@
>    return result;
>  }
>  
>  bool
> +NfcMessageHandler::GeneralResponse(const int32_t response, const Parcel& aParcel, EventOptions& aOptions)

aResponse?
Attachment #8569732 - Flags: review?(dlee) → review+

Updated

4 years ago
Attachment #8569738 - Flags: review?(dlee) → review+
Created attachment 8569817 [details] [diff] [review]
Patch v2.

aResponse
Attachment #8569732 - Attachment is obsolete: true
Attachment #8569817 - Flags: review+
https://treeherder.mozilla.org/#/jobs?repo=b2g-inbound&revision=1aa34c6cc6d4
Whiteboard: [p=1]
Target Milestone: --- → 2.2 S12 (15may)
https://hg.mozilla.org/mozilla-central/rev/1aa34c6cc6d4
Status: NEW → RESOLVED
Last Resolved: 4 years ago
status-firefox39: --- → fixed
Resolution: --- → FIXED
(Assignee)

Updated

4 years ago
Blocks: 1154237
You need to log in before you can comment on or make changes to this bug.