Thu, 22 Jan 2015 13:21:57 +0100
Incorporate requested changes from Mozilla in review:
https://bugzilla.mozilla.org/show_bug.cgi?id=1123480#c6
michael@0 | 1 | /* This Source Code Form is subject to the terms of the Mozilla Public |
michael@0 | 2 | * License, v. 2.0. If a copy of the MPL was not distributed with this |
michael@0 | 3 | * file, You can obtain one at http://mozilla.org/MPL/2.0/. |
michael@0 | 4 | * |
michael@0 | 5 | * Part of this idl is from: |
michael@0 | 6 | * http://w3c.github.io/nfc/proposals/common/nfc.html#nfctag-interface |
michael@0 | 7 | * |
michael@0 | 8 | * Copyright © 2013 Deutsche Telekom, Inc. |
michael@0 | 9 | */ |
michael@0 | 10 | |
michael@0 | 11 | enum NFCTechType { |
michael@0 | 12 | "NFC_A", |
michael@0 | 13 | "NFC_B", |
michael@0 | 14 | "NFC_ISO_DEP", |
michael@0 | 15 | "NFC_F", |
michael@0 | 16 | "NFC_V", |
michael@0 | 17 | "NDEF", |
michael@0 | 18 | "NDEF_FORMATABLE", |
michael@0 | 19 | "MIFARE_CLASSIC", |
michael@0 | 20 | "MIFARE_ULTRALIGHT", |
michael@0 | 21 | "NFC_BARCODE", |
michael@0 | 22 | "P2P", |
michael@0 | 23 | "UNKNOWN_TECH" |
michael@0 | 24 | }; |
michael@0 | 25 | |
michael@0 | 26 | [JSImplementation="@mozilla.org/nfc/NFCTag;1"] |
michael@0 | 27 | interface MozNFCTag { |
michael@0 | 28 | DOMRequest getDetailsNDEF(); |
michael@0 | 29 | DOMRequest readNDEF(); |
michael@0 | 30 | DOMRequest writeNDEF(sequence<MozNDEFRecord> records); |
michael@0 | 31 | DOMRequest makeReadOnlyNDEF(); |
michael@0 | 32 | |
michael@0 | 33 | DOMRequest connect(NFCTechType techType); |
michael@0 | 34 | DOMRequest close(); |
michael@0 | 35 | }; |
michael@0 | 36 | |
michael@0 | 37 | // Mozilla Only |
michael@0 | 38 | partial interface MozNFCTag { |
michael@0 | 39 | [ChromeOnly] |
michael@0 | 40 | attribute DOMString session; |
michael@0 | 41 | [ChromeOnly] |
michael@0 | 42 | void setSessionToken(DOMString sessionToken); |
michael@0 | 43 | }; |