michael@0: /* This Source Code Form is subject to the terms of the Mozilla Public michael@0: * License, v. 2.0. If a copy of the MPL was not distributed with this michael@0: * file, You can obtain one at http://mozilla.org/MPL/2.0/. michael@0: * michael@0: * Part of this idl is from: michael@0: * http://w3c.github.io/nfc/proposals/common/nfc.html#nfctag-interface michael@0: * michael@0: * Copyright © 2013 Deutsche Telekom, Inc. michael@0: */ michael@0: michael@0: enum NFCTechType { michael@0: "NFC_A", michael@0: "NFC_B", michael@0: "NFC_ISO_DEP", michael@0: "NFC_F", michael@0: "NFC_V", michael@0: "NDEF", michael@0: "NDEF_FORMATABLE", michael@0: "MIFARE_CLASSIC", michael@0: "MIFARE_ULTRALIGHT", michael@0: "NFC_BARCODE", michael@0: "P2P", michael@0: "UNKNOWN_TECH" michael@0: }; michael@0: michael@0: [JSImplementation="@mozilla.org/nfc/NFCTag;1"] michael@0: interface MozNFCTag { michael@0: DOMRequest getDetailsNDEF(); michael@0: DOMRequest readNDEF(); michael@0: DOMRequest writeNDEF(sequence records); michael@0: DOMRequest makeReadOnlyNDEF(); michael@0: michael@0: DOMRequest connect(NFCTechType techType); michael@0: DOMRequest close(); michael@0: }; michael@0: michael@0: // Mozilla Only michael@0: partial interface MozNFCTag { michael@0: [ChromeOnly] michael@0: attribute DOMString session; michael@0: [ChromeOnly] michael@0: void setSessionToken(DOMString sessionToken); michael@0: };