Bug 1061512 - [NFC] nfcd should notify gecko about NDEF information. r=allstars.chh

This commit is contained in:
dlee 2014-09-23 18:53:41 +08:00
parent 4284af883d
commit cb5322cb10
2 changed files with 19 additions and 1 deletions

View File

@ -8,7 +8,7 @@
namespace mozilla {
#define NFCD_MAJOR_VERSION 1
#define NFCD_MINOR_VERSION 8
#define NFCD_MINOR_VERSION 9
enum NfcRequest {
ConfigReq = 0,
@ -83,6 +83,15 @@ enum SecureElementOrigin {
OriginEndGuard = 3
};
enum NdefType {
UNKNOWN = -1,
TYPE1_TAG = 0,
TYPE2_TAG = 1,
TYPE3_TAG = 2,
TYPE4_TAG = 3,
MIFARE_CLASSIC_TAG = 4
};
} // namespace mozilla
#endif // NfcGonkMessage_h

View File

@ -293,6 +293,15 @@ NfcMessageHandler::TechDiscoveredNotification(const Parcel& aParcel, EventOption
if (ndefMsgCount != 0) {
ReadNDEFMessage(aParcel, aOptions);
}
int32_t ndefInfo = aParcel.readInt32();
if (ndefInfo) {
NdefType type = static_cast<NdefType>(aParcel.readInt32());
int32_t maxSupportLength = aParcel.readInt32();
int32_t isReadOnly = aParcel.readInt32();
int32_t isFormatable = aParcel.readInt32();
}
return true;
}