44 lines
1.5 KiB
JavaScript
44 lines
1.5 KiB
JavaScript
/**
|
|
* NFC TNF (Type Name Format) Constants
|
|
* These determine how to interpret the type field.
|
|
*/
|
|
export var NfcTnf;
|
|
(function (NfcTnf) {
|
|
NfcTnf[NfcTnf["EMPTY"] = 0] = "EMPTY";
|
|
NfcTnf[NfcTnf["WELL_KNOWN"] = 1] = "WELL_KNOWN";
|
|
NfcTnf[NfcTnf["MIME_MEDIA"] = 2] = "MIME_MEDIA";
|
|
NfcTnf[NfcTnf["ABSOLUTE_URI"] = 3] = "ABSOLUTE_URI";
|
|
NfcTnf[NfcTnf["EXTERNAL_TYPE"] = 4] = "EXTERNAL_TYPE";
|
|
NfcTnf[NfcTnf["UNKNOWN"] = 5] = "UNKNOWN";
|
|
NfcTnf[NfcTnf["UNCHANGED"] = 6] = "UNCHANGED";
|
|
NfcTnf[NfcTnf["RESERVED"] = 7] = "RESERVED";
|
|
})(NfcTnf || (NfcTnf = {}));
|
|
/**
|
|
* NFC RTD (Record Type Definition) Constants
|
|
* These are standardized type names for common record types.
|
|
*/
|
|
export class NfcRtd {
|
|
}
|
|
NfcRtd.TEXT = "T";
|
|
NfcRtd.URI = "U";
|
|
NfcRtd.SMART_POSTER = "Sp";
|
|
NfcRtd.ALTERNATIVE_CARRIER = "ac";
|
|
NfcRtd.HANDOVER_CARRIER = "Hc";
|
|
NfcRtd.HANDOVER_REQUEST = "Hr";
|
|
NfcRtd.HANDOVER_SELECT = "Hs";
|
|
/**
|
|
* Error codes that might be returned by NFC operations
|
|
*/
|
|
export var NfcErrorType;
|
|
(function (NfcErrorType) {
|
|
NfcErrorType["NOT_SUPPORTED"] = "not_supported";
|
|
NfcErrorType["NOT_ENABLED"] = "not_enabled";
|
|
NfcErrorType["PERMISSION_DENIED"] = "permission_denied";
|
|
NfcErrorType["NO_TAG"] = "no_tag";
|
|
NfcErrorType["TAG_ERROR"] = "tag_error";
|
|
NfcErrorType["IO_ERROR"] = "io_error";
|
|
NfcErrorType["TIMEOUT"] = "timeout";
|
|
NfcErrorType["CANCELLED"] = "cancelled";
|
|
NfcErrorType["UNEXPECTED_ERROR"] = "unexpected_error";
|
|
})(NfcErrorType || (NfcErrorType = {}));
|