mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-14 13:55:43 +00:00
Bug 1061512 - [NFC] nfcd should notify gecko about NDEF information. r=allstars.chh
This commit is contained in:
parent
4284af883d
commit
cb5322cb10
@ -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
|
||||
|
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user