diff --git a/api/@ohos.nfc.cardEmulation.d.ts b/api/@ohos.nfc.cardEmulation.d.ts index 7731d7ec91d10398d866bba77a605941a2557b2b..ca3e2d5264743e06d859b88bcfeb559fef65fb14 100644 --- a/api/@ohos.nfc.cardEmulation.d.ts +++ b/api/@ohos.nfc.cardEmulation.d.ts @@ -35,7 +35,8 @@ import type { AbilityInfo } from './bundleManager/AbilityInfo'; * @namespace cardEmulation * @syscap SystemCapability.Communication.NFC.CardEmulation * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare namespace cardEmulation { /** @@ -89,7 +90,8 @@ declare namespace cardEmulation { * @enum { string } * @syscap SystemCapability.Communication.NFC.CardEmulation * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ enum CardType { /** @@ -103,7 +105,8 @@ declare namespace cardEmulation { * * @syscap SystemCapability.Communication.NFC.CardEmulation * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ PAYMENT = 'payment', @@ -118,7 +121,8 @@ declare namespace cardEmulation { * * @syscap SystemCapability.Communication.NFC.CardEmulation * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ OTHER = 'other' } @@ -155,7 +159,8 @@ declare namespace cardEmulation { * @throws { BusinessError } 801 - Capability not supported. * @syscap SystemCapability.Communication.NFC.CardEmulation * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ function hasHceCapability(): boolean; @@ -190,7 +195,8 @@ declare namespace cardEmulation { * @throws { BusinessError } 801 - Capability not supported. * @syscap SystemCapability.Communication.NFC.CardEmulation * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ function isDefaultService(elementName: ElementName, type: CardType): boolean; @@ -204,7 +210,8 @@ declare namespace cardEmulation { * @throws { BusinessError } 801 - Capability not supported. * @syscap SystemCapability.Communication.NFC.CardEmulation * @systemapi Hide this for inner system use. - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ function getPaymentServices(): AbilityInfo[]; @@ -223,7 +230,8 @@ declare namespace cardEmulation { * * @syscap SystemCapability.Communication.NFC.CardEmulation * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ export class HceService { /** @@ -270,7 +278,8 @@ declare namespace cardEmulation { * @throws { BusinessError } 3100301 - Card emulation running state is abnormal in service. * @syscap SystemCapability.Communication.NFC.CardEmulation * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ start(elementName: ElementName, aidList: string[]): void; @@ -315,7 +324,8 @@ declare namespace cardEmulation { * @throws { BusinessError } 3100301 - Card emulation running state is abnormal in service. * @syscap SystemCapability.Communication.NFC.CardEmulation * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ stop(elementName: ElementName): void; @@ -333,29 +343,31 @@ declare namespace cardEmulation { * * @permission ohos.permission.NFC_CARD_EMULATION * @param { 'hceCmd' } type The type to register. - * @param { AsyncCallback } callback Callback used to listen to HCE data that local device received. + * @param { AsyncCallback } callback Callback used to listen to HCE data that local device received. * @throws { BusinessError } 201 - Permission denied. * @throws { BusinessError } 401 - Invalid parameter. * @throws { BusinessError } 801 - Capability not supported. * @syscap SystemCapability.Communication.NFC.CardEmulation * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ - on(type: 'hceCmd', callback: AsyncCallback): void; + on(type: 'hceCmd', callback: AsyncCallback): void; /** * Unsubscribe the event to receive the APDU data. * * @permission ohos.permission.NFC_CARD_EMULATION * @param { 'hceCmd' } type - The type to unregister event. - * @param { AsyncCallback } callback - The callback used to listen for the event. + * @param { AsyncCallback } callback - The callback used to listen for the event. * @throws { BusinessError } 201 - Permission denied. * @throws { BusinessError } 801 - Capability not supported. * @syscap SystemCapability.Communication.NFC.CardEmulation * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ - off(type: 'hceCmd', callback?: AsyncCallback): void; + off(type: 'hceCmd', callback?: AsyncCallback): void; /** * Sends a response APDU to the remote device. @@ -390,7 +402,7 @@ declare namespace cardEmulation { * Sends a response APDU to the remote device. * * @permission ohos.permission.NFC_CARD_EMULATION - * @param { number[] } response Indicates the response to send, which is a byte array. + * @param { int[] } response Indicates the response to send, which is a byte array. * @returns { Promise } The void * @throws { BusinessError } 201 - Permission denied. * @throws { BusinessError } 401 - The parameter check failed. Possible causes: @@ -401,9 +413,10 @@ declare namespace cardEmulation { * @throws { BusinessError } 3100301 - Card emulation running state is abnormal in service. * @syscap SystemCapability.Communication.NFC.CardEmulation * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ - transmit(response: number[]): Promise; + transmit(response: int[]): Promise; /** * Sends a response APDU to the remote device. @@ -425,7 +438,7 @@ declare namespace cardEmulation { * Sends a response APDU to the remote device. * * @permission ohos.permission.NFC_CARD_EMULATION - * @param { number[] } response Indicates the response to send, which is a byte array. + * @param { int[] } response Indicates the response to send, which is a byte array. * @param { AsyncCallback } callback The callback * @throws { BusinessError } 201 - Permission denied. * @throws { BusinessError } 401 - The parameter check failed. Possible causes: @@ -436,9 +449,10 @@ declare namespace cardEmulation { * @throws { BusinessError } 3100301 - Card emulation running state is abnormal in service. * @syscap SystemCapability.Communication.NFC.CardEmulation * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ - transmit(response: number[], callback: AsyncCallback): void; + transmit(response: int[], callback: AsyncCallback): void; } } export default cardEmulation; diff --git a/api/@ohos.nfc.controller.d.ts b/api/@ohos.nfc.controller.d.ts index 63aa9d95448cf681bc66adb63f4ea29072d2fb01..d8695c5e681c5c3e7e4b7d6985dbefab2768438b 100644 --- a/api/@ohos.nfc.controller.d.ts +++ b/api/@ohos.nfc.controller.d.ts @@ -33,7 +33,8 @@ import { Callback } from './@ohos.base'; * @namespace nfcController * @syscap SystemCapability.Communication.NFC.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare namespace nfcController { /** @@ -46,10 +47,11 @@ declare namespace nfcController { /** * NFC changed states. * - * @enum { number } + * @enum { int } * @syscap SystemCapability.Communication.NFC.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ enum NfcState { /** @@ -63,7 +65,8 @@ declare namespace nfcController { * * @syscap SystemCapability.Communication.NFC.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ STATE_OFF = 1, @@ -78,7 +81,8 @@ declare namespace nfcController { * * @syscap SystemCapability.Communication.NFC.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ STATE_TURNING_ON = 2, @@ -93,7 +97,8 @@ declare namespace nfcController { * * @syscap SystemCapability.Communication.NFC.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ STATE_ON = 3, @@ -108,7 +113,8 @@ declare namespace nfcController { * * @syscap SystemCapability.Communication.NFC.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ STATE_TURNING_OFF = 4 } @@ -139,7 +145,8 @@ declare namespace nfcController { * @param { Callback } callback Callback used to listen to the nfc state changed event. * @syscap SystemCapability.Communication.NFC.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ function on(type: 'nfcStateChange', callback: Callback): void; @@ -158,7 +165,8 @@ declare namespace nfcController { * @param { Callback } callback Callback used to listen to the nfc state changed event. * @syscap SystemCapability.Communication.NFC.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ function off(type: 'nfcStateChange', callback?: Callback): void; @@ -183,7 +191,8 @@ declare namespace nfcController { * @throws { BusinessError } 801 - Capability not supported. * @throws { BusinessError } 3100101 - The NFC state is abnormal in the service. * @syscap SystemCapability.Communication.NFC.Core - * @since 9 + * @since arkts {'1.1':'9','1.2':'20'} + * @arkts 1.1&1.2 */ function enableNfc(): void; @@ -208,7 +217,8 @@ declare namespace nfcController { * @throws { BusinessError } 801 - Capability not supported. * @throws { BusinessError } 3100101 - The NFC state is abnormal in the service. * @syscap SystemCapability.Communication.NFC.Core - * @since 9 + * @since arkts {'1.1':'9','1.2':'20'} + * @arkts 1.1&1.2 */ function disableNfc(): void; @@ -225,7 +235,8 @@ declare namespace nfcController { * @returns { boolean } Returns {@code true} if NFC is enabled; returns {@code false} otherwise. * @syscap SystemCapability.Communication.NFC.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ function isNfcOpen(): boolean; @@ -250,7 +261,8 @@ declare namespace nfcController { * @returns { NfcState } Returns the NFC status. * @syscap SystemCapability.Communication.NFC.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ function getNfcState(): NfcState; } diff --git a/api/@ohos.nfc.tag.d.ts b/api/@ohos.nfc.tag.d.ts index da104445a27553fd597146f35835b930d0358d21..3399b2b1d570708667d431fe4f0cd5ab7db44bbd 100644 --- a/api/@ohos.nfc.tag.d.ts +++ b/api/@ohos.nfc.tag.d.ts @@ -29,7 +29,9 @@ import { } from './tag/nfctech'; import { NdefMessage as _NdefMessage } from './tag/nfctech'; import { TagSession as _TagSession } from './tag/tagSession'; +/*** if arkts 1.1 */ import type { PacMap } from './ability/dataAbilityHelper'; +/*** endif */ import type rpc from './@ohos.rpc'; import type { AsyncCallback } from './@ohos.base'; import Want from './@ohos.app.ability.Want'; @@ -48,7 +50,8 @@ import type { ElementName } from './bundleManager/ElementName'; * @namespace tag * @syscap SystemCapability.Communication.NFC.Tag * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare namespace tag { /** @@ -64,7 +67,8 @@ declare namespace tag { * @constant * @syscap SystemCapability.Communication.NFC.Tag * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ const NFC_A = 1; @@ -81,7 +85,8 @@ declare namespace tag { * @constant * @syscap SystemCapability.Communication.NFC.Tag * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ const NFC_B = 2; @@ -98,7 +103,8 @@ declare namespace tag { * @constant * @syscap SystemCapability.Communication.NFC.Tag * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ const ISO_DEP = 3; @@ -115,7 +121,8 @@ declare namespace tag { * @constant * @syscap SystemCapability.Communication.NFC.Tag * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ const NFC_F = 4; @@ -132,7 +139,8 @@ declare namespace tag { * @constant * @syscap SystemCapability.Communication.NFC.Tag * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ const NFC_V = 5; @@ -149,7 +157,8 @@ declare namespace tag { * @constant * @syscap SystemCapability.Communication.NFC.Tag * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ const NDEF = 6; @@ -166,7 +175,8 @@ declare namespace tag { * @constant * @syscap SystemCapability.Communication.NFC.Tag * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ const NDEF_FORMATABLE = 7; @@ -183,7 +193,8 @@ declare namespace tag { * @constant * @syscap SystemCapability.Communication.NFC.Tag * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ const MIFARE_CLASSIC = 8; @@ -200,7 +211,8 @@ declare namespace tag { * @constant * @syscap SystemCapability.Communication.NFC.Tag * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ const MIFARE_ULTRALIGHT = 9; @@ -210,7 +222,8 @@ declare namespace tag { * @constant * @syscap SystemCapability.Communication.NFC.Tag * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ const NFC_BARCODE = 10; @@ -224,10 +237,11 @@ declare namespace tag { /** * TNF types definitions, see NFCForum-TS-NDEF_1.0. * - * @enum { number } + * @enum { int } * @syscap SystemCapability.Communication.NFC.Tag * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ enum TnfType { /** @@ -241,7 +255,8 @@ declare namespace tag { * * @syscap SystemCapability.Communication.NFC.Tag * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ TNF_EMPTY = 0x0, @@ -256,7 +271,8 @@ declare namespace tag { * * @syscap SystemCapability.Communication.NFC.Tag * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ TNF_WELL_KNOWN = 0x1, @@ -271,7 +287,8 @@ declare namespace tag { * * @syscap SystemCapability.Communication.NFC.Tag * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ TNF_MEDIA = 0x2, @@ -286,7 +303,8 @@ declare namespace tag { * * @syscap SystemCapability.Communication.NFC.Tag * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ TNF_ABSOLUTE_URI = 0x3, @@ -301,7 +319,8 @@ declare namespace tag { * * @syscap SystemCapability.Communication.NFC.Tag * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ TNF_EXT_APP = 0x4, @@ -316,7 +335,8 @@ declare namespace tag { * * @syscap SystemCapability.Communication.NFC.Tag * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ TNF_UNKNOWN = 0x5, @@ -331,7 +351,8 @@ declare namespace tag { * * @syscap SystemCapability.Communication.NFC.Tag * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ TNF_UNCHANGED = 0x6 } @@ -346,10 +367,11 @@ declare namespace tag { /** * NfcForum Type definition. The NDEF tag may use one of them. * - * @enum { number } + * @enum { int } * @syscap SystemCapability.Communication.NFC.Tag * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ enum NfcForumType { /** @@ -363,7 +385,8 @@ declare namespace tag { * * @syscap SystemCapability.Communication.NFC.Tag * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ NFC_FORUM_TYPE_1 = 1, @@ -378,7 +401,8 @@ declare namespace tag { * * @syscap SystemCapability.Communication.NFC.Tag * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ NFC_FORUM_TYPE_2 = 2, @@ -393,7 +417,8 @@ declare namespace tag { * * @syscap SystemCapability.Communication.NFC.Tag * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ NFC_FORUM_TYPE_3 = 3, @@ -408,7 +433,8 @@ declare namespace tag { * * @syscap SystemCapability.Communication.NFC.Tag * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ NFC_FORUM_TYPE_4 = 4, @@ -423,7 +449,8 @@ declare namespace tag { * * @syscap SystemCapability.Communication.NFC.Tag * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ MIFARE_CLASSIC = 101 } @@ -441,9 +468,10 @@ declare namespace tag { * @constant * @syscap SystemCapability.Communication.NFC.Tag * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ - const RTD_TEXT: number[]; + const RTD_TEXT: int[]; /** * RTD type URI, see NFC Record Type Definition (RTD) Specification. @@ -458,9 +486,10 @@ declare namespace tag { * @constant * @syscap SystemCapability.Communication.NFC.Tag * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ - const RTD_URI: number[]; + const RTD_URI: int[]; /** * MifareClassic Type definition @@ -472,10 +501,11 @@ declare namespace tag { /** * MifareClassic Type definition * - * @enum { number } + * @enum { int } * @syscap SystemCapability.Communication.NFC.Tag * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ enum MifareClassicType { /** @@ -489,7 +519,8 @@ declare namespace tag { * * @syscap SystemCapability.Communication.NFC.Tag * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ TYPE_UNKNOWN = 0, @@ -504,7 +535,8 @@ declare namespace tag { * * @syscap SystemCapability.Communication.NFC.Tag * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ TYPE_CLASSIC = 1, @@ -519,7 +551,8 @@ declare namespace tag { * * @syscap SystemCapability.Communication.NFC.Tag * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ TYPE_PLUS = 2, @@ -534,7 +567,8 @@ declare namespace tag { * * @syscap SystemCapability.Communication.NFC.Tag * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ TYPE_PRO = 3 } @@ -549,10 +583,11 @@ declare namespace tag { /** * MifareClassic Tag size. * - * @enum { number } + * @enum { int } * @syscap SystemCapability.Communication.NFC.Tag * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ enum MifareClassicSize { /** @@ -566,7 +601,8 @@ declare namespace tag { * * @syscap SystemCapability.Communication.NFC.Tag * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ MC_SIZE_MINI = 320, @@ -581,7 +617,8 @@ declare namespace tag { * * @syscap SystemCapability.Communication.NFC.Tag * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ MC_SIZE_1K = 1024, @@ -596,7 +633,8 @@ declare namespace tag { * * @syscap SystemCapability.Communication.NFC.Tag * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ MC_SIZE_2K = 2048, @@ -611,7 +649,8 @@ declare namespace tag { * * @syscap SystemCapability.Communication.NFC.Tag * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ MC_SIZE_4K = 4096 } @@ -626,10 +665,11 @@ declare namespace tag { /** * MifareUltralight Type definition * - * @enum { number } + * @enum { int } * @syscap SystemCapability.Communication.NFC.Tag * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ enum MifareUltralightType { /** @@ -643,7 +683,8 @@ declare namespace tag { * * @syscap SystemCapability.Communication.NFC.Tag * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ TYPE_UNKNOWN = 0, @@ -658,7 +699,8 @@ declare namespace tag { * * @syscap SystemCapability.Communication.NFC.Tag * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ TYPE_ULTRALIGHT = 1, @@ -673,7 +715,8 @@ declare namespace tag { * * @syscap SystemCapability.Communication.NFC.Tag * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ TYPE_ULTRALIGHT_C = 2 } @@ -723,7 +766,8 @@ declare namespace tag { * @throws { BusinessError } 3100201 - The tag running state is abnormal in the service. * @syscap SystemCapability.Communication.NFC.Tag * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ function getNfcA(tagInfo: TagInfo): NfcATag; @@ -772,7 +816,8 @@ declare namespace tag { * @throws { BusinessError } 3100201 - The tag running state is abnormal in the service. * @syscap SystemCapability.Communication.NFC.Tag * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ function getNfcB(tagInfo: TagInfo): NfcBTag; @@ -821,7 +866,8 @@ declare namespace tag { * @throws { BusinessError } 3100201 - The tag running state is abnormal in the service. * @syscap SystemCapability.Communication.NFC.Tag * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ function getNfcF(tagInfo: TagInfo): NfcFTag; @@ -870,7 +916,8 @@ declare namespace tag { * @throws { BusinessError } 3100201 - The tag running state is abnormal in the service. * @syscap SystemCapability.Communication.NFC.Tag * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ function getNfcV(tagInfo: TagInfo): NfcVTag; @@ -905,7 +952,8 @@ declare namespace tag { * @throws { BusinessError } 3100201 - The tag running state is abnormal in the service. * @syscap SystemCapability.Communication.NFC.Tag * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ function getIsoDep(tagInfo: TagInfo): IsoDepTag; @@ -940,7 +988,8 @@ declare namespace tag { * @throws { BusinessError } 3100201 - The tag running state is abnormal in the service. * @syscap SystemCapability.Communication.NFC.Tag * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ function getNdef(tagInfo: TagInfo): NdefTag; @@ -975,7 +1024,8 @@ declare namespace tag { * @throws { BusinessError } 3100201 - The tag running state is abnormal in the service. * @syscap SystemCapability.Communication.NFC.Tag * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ function getMifareClassic(tagInfo: TagInfo): MifareClassicTag; @@ -1010,7 +1060,8 @@ declare namespace tag { * @throws { BusinessError } 3100201 - The tag running state is abnormal in the service. * @syscap SystemCapability.Communication.NFC.Tag * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ function getMifareUltralight(tagInfo: TagInfo): MifareUltralightTag; @@ -1045,7 +1096,8 @@ declare namespace tag { * @throws { BusinessError } 3100201 - The tag running state is abnormal in the service. * @syscap SystemCapability.Communication.NFC.Tag * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ function getNdefFormatable(tagInfo: TagInfo): NdefFormatableTag; @@ -1064,7 +1116,8 @@ declare namespace tag { * @throws { BusinessError } 3100201 - The tag running state is abnormal in the service. * @syscap SystemCapability.Communication.NFC.Tag * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ function getBarcodeTag(tagInfo: TagInfo): BarcodeTag; @@ -1093,7 +1146,8 @@ declare namespace tag { * @throws { BusinessError } 801 - Capability not supported. * @syscap SystemCapability.Communication.NFC.Tag * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ function getTagInfo(want: Want): TagInfo; @@ -1118,7 +1172,7 @@ declare namespace tag { * * @permission ohos.permission.NFC_TAG * @param { ElementName } elementName - The element name of application, must include the bundleName and abilityName. - * @param { number[] } discTech - The technologies list to set for discovering. From {@link NFC_A} to {@link MIFARE_ULTRALIGHT}. + * @param { int[] } discTech - The technologies list to set for discovering. From {@link NFC_A} to {@link MIFARE_ULTRALIGHT}. * @param { AsyncCallback } callback - The callback to dispatched the TagInfo object for application. * @throws { BusinessError } 201 - Permission denied. * @throws { BusinessError } 401 - The parameter check failed. Possible causes: @@ -1130,11 +1184,12 @@ declare namespace tag { * @throws { BusinessError } 3100202 - The element state is invalid. * @syscap SystemCapability.Communication.NFC.Tag * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ function registerForegroundDispatch( elementName: ElementName, - discTech: number[], + discTech: int[], callback: AsyncCallback ): void; @@ -1166,7 +1221,8 @@ declare namespace tag { * @throws { BusinessError } 3100201 - The tag running state is abnormal in the service. * @syscap SystemCapability.Communication.NFC.Tag * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ function unregisterForegroundDispatch(elementName: ElementName): void; @@ -1194,7 +1250,7 @@ declare namespace tag { * @permission ohos.permission.NFC_TAG * @param { 'readerMode' } type - The callback type to be registered. * @param { ElementName } elementName - The element name of application, must include the bundleName and abilityName. - * @param { number[] } discTech - The technologies list to set for discovering. From {@link NFC_A} to {@link MIFARE_ULTRALIGHT}. + * @param { int[] } discTech - The technologies list to set for discovering. From {@link NFC_A} to {@link MIFARE_ULTRALIGHT}. * @param { AsyncCallback } callback - The callback to dispatched the TagInfo object for application. * @throws { BusinessError } 201 - Permission denied. * @throws { BusinessError } 401 - The parameter check failed. Possible causes: @@ -1206,9 +1262,10 @@ declare namespace tag { * @throws { BusinessError } 3100202 - The element state is invalid. * @syscap SystemCapability.Communication.NFC.Tag * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ - function on(type: 'readerMode', elementName: ElementName, discTech: number[], callback: AsyncCallback): void; + function on(type: 'readerMode', elementName: ElementName, discTech: int[], callback: AsyncCallback): void; /** * Disable foreground reader mode settings explicitly. @@ -1244,7 +1301,8 @@ declare namespace tag { * @throws { BusinessError } 3100203 - The off() API can be called only when the on() has been called. * @syscap SystemCapability.Communication.NFC.Tag * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ function off(type: 'readerMode', elementName: ElementName, callback?: AsyncCallback): void; @@ -1265,7 +1323,8 @@ declare namespace tag { * @typedef TagInfo * @syscap SystemCapability.Communication.NFC.Tag * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ export interface TagInfo { /** @@ -1279,12 +1338,13 @@ declare namespace tag { * The uid of this tag, it. * * @permission ohos.permission.NFC_TAG - * @type { number[] } + * @type { int[] } * @syscap SystemCapability.Communication.NFC.Tag * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ - uid: number[]; + uid: int[]; /** * The supported technology list of this tag. @@ -1297,12 +1357,13 @@ declare namespace tag { * The supported technology list of this tag. * * @permission ohos.permission.NFC_TAG - * @type { number[] } + * @type { int[] } * @syscap SystemCapability.Communication.NFC.Tag * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ - technology: number[]; + technology: int[]; /** * The extra data for each technology of this tag. @@ -1319,12 +1380,13 @@ declare namespace tag { * The the RF discovery id of this tag. * * @permission ohos.permission.NFC_TAG - * @type { number } + * @type { int } * @syscap SystemCapability.Communication.NFC.Tag * @systemapi hide for inner use. - * @since 9 + * @since arkts {'1.1':'9','1.2':'20'} + * @arkts 1.1&1.2 */ - tagRfDiscId: number; + tagRfDiscId: int; /** * The extra data for the technology of this tag. @@ -1333,7 +1395,8 @@ declare namespace tag { * @type { rpc.RemoteObject } * @syscap SystemCapability.Communication.NFC.Tag * @systemapi hide for inner use. - * @since 9 + * @since arkts {'1.1':'9','1.2':'20'} + * @arkts 1.1&1.2 */ remoteTagService: rpc.RemoteObject; @@ -1362,7 +1425,8 @@ declare namespace tag { * @typedef NdefRecord * @syscap SystemCapability.Communication.NFC.Tag * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ export interface NdefRecord { /** @@ -1374,12 +1438,13 @@ declare namespace tag { /** * tnf of NdefRecord * - * @type { number } + * @type { int } * @syscap SystemCapability.Communication.NFC.Tag * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ - tnf: number; + tnf: int; /** * RTD type of NdefRecord @@ -1391,12 +1456,13 @@ declare namespace tag { /** * RTD type of NdefRecord * - * @type { number[] } + * @type { int[] } * @syscap SystemCapability.Communication.NFC.Tag * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ - rtdType: number[]; + rtdType: int[]; /** * id of NdefRecord @@ -1407,12 +1473,13 @@ declare namespace tag { /** * id of NdefRecord * - * @type { number[] } + * @type { int[] } * @syscap SystemCapability.Communication.NFC.Tag * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ - id: number[]; + id: int[]; /** * payload of NdefRecord @@ -1423,12 +1490,13 @@ declare namespace tag { /** * payload of NdefRecord * - * @type { number[] } + * @type { int[] } * @syscap SystemCapability.Communication.NFC.Tag * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ - payload: number[]; + payload: int[]; } /** @@ -1444,7 +1512,8 @@ declare namespace tag { * @namespace ndef * @syscap SystemCapability.Communication.NFC.Tag * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ namespace ndef { /** @@ -1470,7 +1539,8 @@ declare namespace tag { *
3. Parameter verification failed. * @syscap SystemCapability.Communication.NFC.Tag * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ function makeUriRecord(uri: string): NdefRecord; @@ -1499,7 +1569,8 @@ declare namespace tag { *
3. Parameter verification failed. * @syscap SystemCapability.Communication.NFC.Tag * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ function makeTextRecord(text: string, locale: string): NdefRecord; @@ -1514,7 +1585,8 @@ declare namespace tag { *
3. Parameter verification failed. * @syscap SystemCapability.Communication.NFC.Tag * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ function makeApplicationRecord(bundleName: string): NdefRecord; @@ -1535,7 +1607,7 @@ declare namespace tag { * Creates an NDEF record with mime data. * * @param { string } mimeType type of mime data for new an NDEF record. - * @param { number[] } mimeData mime data for new an NDEF record. + * @param { int[] } mimeData mime data for new an NDEF record. * @returns { NdefRecord } The instance of NdefRecord. * @throws { BusinessError } 401 - The parameter check failed. Possible causes: *
1. Mandatory parameters are left unspecified. @@ -1543,9 +1615,10 @@ declare namespace tag { *
3. Parameter verification failed. * @syscap SystemCapability.Communication.NFC.Tag * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ - function makeMimeRecord(mimeType: string, mimeData: number[]): NdefRecord; + function makeMimeRecord(mimeType: string, mimeData: int[]): NdefRecord; /** * Creates an NDEF record with external data. @@ -1566,7 +1639,7 @@ declare namespace tag { * * @param { string } domainName - Domain name of issuing organization for the external data. * @param { string } type - Domain specific type of data for the external data. - * @param { number[] } externalData - Data payload of an NDEF record. + * @param { int[] } externalData - Data payload of an NDEF record. * @returns { NdefRecord } The instance of NdefRecord. * @throws { BusinessError } 401 - The parameter check failed. Possible causes: *
1. Mandatory parameters are left unspecified. @@ -1574,9 +1647,10 @@ declare namespace tag { *
3. Parameter verification failed. * @syscap SystemCapability.Communication.NFC.Tag * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ - function makeExternalRecord(domainName: string, type: string, externalData: number[]): NdefRecord; + function makeExternalRecord(domainName: string, type: string, externalData: int[]): NdefRecord; /** * Creates an NDEF message with raw bytes. * @@ -1592,7 +1666,7 @@ declare namespace tag { /** * Creates an NDEF message with raw bytes. * - * @param { number[] } data - The raw bytes to parse NDEF message. + * @param { int[] } data - The raw bytes to parse NDEF message. * @returns { NdefMessage } The instance of NdefMessage. * @throws { BusinessError } 401 - The parameter check failed. Possible causes: *
1. Mandatory parameters are left unspecified. @@ -1600,9 +1674,10 @@ declare namespace tag { *
3. Parameter verification failed. * @syscap SystemCapability.Communication.NFC.Tag * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ - function createNdefMessage(data: number[]): NdefMessage; + function createNdefMessage(data: int[]): NdefMessage; /** * Creates an NDEF message with record list. @@ -1627,7 +1702,8 @@ declare namespace tag { *
3. Parameter verification failed. * @syscap SystemCapability.Communication.NFC.Tag * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ function createNdefMessage(ndefRecords: NdefRecord[]): NdefMessage; @@ -1644,16 +1720,17 @@ declare namespace tag { * Parses an NDEF message into raw bytes. * * @param { NdefMessage } ndefMessage - An NDEF message to parse. - * @returns { number[] } Returns the raw bytes of an NDEF message. + * @returns { int[] } Returns the raw bytes of an NDEF message. * @throws { BusinessError } 401 - The parameter check failed. Possible causes: *
1. Mandatory parameters are left unspecified. *
2. Incorrect parameters types. *
3. Parameter verification failed. * @syscap SystemCapability.Communication.NFC.Tag * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ - function messageToBytes(ndefMessage: NdefMessage): number[]; + function messageToBytes(ndefMessage: NdefMessage): int[]; } /** @@ -1668,7 +1745,8 @@ declare namespace tag { * @typedef { _NfcATag } * @syscap SystemCapability.Communication.NFC.Tag * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ export type NfcATag = _NfcATag; @@ -1684,7 +1762,8 @@ declare namespace tag { * @typedef { _NfcBTag } * @syscap SystemCapability.Communication.NFC.Tag * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ export type NfcBTag = _NfcBTag; @@ -1700,7 +1779,8 @@ declare namespace tag { * @typedef { _NfcFTag } * @syscap SystemCapability.Communication.NFC.Tag * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ export type NfcFTag = _NfcFTag; @@ -1716,7 +1796,8 @@ declare namespace tag { * @typedef { _NfcVTag } * @syscap SystemCapability.Communication.NFC.Tag * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ export type NfcVTag = _NfcVTag; @@ -1732,7 +1813,8 @@ declare namespace tag { * @typedef { _IsoDepTag } * @syscap SystemCapability.Communication.NFC.Tag * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ export type IsoDepTag = _IsoDepTag; @@ -1748,7 +1830,8 @@ declare namespace tag { * @typedef { _NdefTag } * @syscap SystemCapability.Communication.NFC.Tag * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ export type NdefTag = _NdefTag; @@ -1764,7 +1847,8 @@ declare namespace tag { * @typedef { _MifareClassicTag } * @syscap SystemCapability.Communication.NFC.Tag * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ export type MifareClassicTag = _MifareClassicTag; @@ -1780,7 +1864,8 @@ declare namespace tag { * @typedef { _MifareUltralightTag } * @syscap SystemCapability.Communication.NFC.Tag * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ export type MifareUltralightTag = _MifareUltralightTag; @@ -1796,7 +1881,8 @@ declare namespace tag { * @typedef { _NdefFormatableTag } * @syscap SystemCapability.Communication.NFC.Tag * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ export type NdefFormatableTag = _NdefFormatableTag; @@ -1806,7 +1892,8 @@ declare namespace tag { * @typedef { _BarcodeTag } * @syscap SystemCapability.Communication.NFC.Tag * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ export type BarcodeTag = _BarcodeTag; @@ -1822,7 +1909,8 @@ declare namespace tag { * @typedef { _NdefMessage } * @syscap SystemCapability.Communication.NFC.Tag * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ export type NdefMessage = _NdefMessage; @@ -1838,7 +1926,8 @@ declare namespace tag { * @typedef { _TagSession } * @syscap SystemCapability.Communication.NFC.Tag * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ export type TagSession = _TagSession; } diff --git a/api/tag/nfctech.d.ts b/api/tag/nfctech.d.ts index c8d7eff1e6f51c75375009172faeff5679fe41d4..760ad5294d7d953e6e6d3af0058243d8965874bf 100644 --- a/api/tag/nfctech.d.ts +++ b/api/tag/nfctech.d.ts @@ -39,7 +39,8 @@ import { AsyncCallback, Callback } from '../@ohos.base'; * @typedef NfcATag * @syscap SystemCapability.Communication.NFC.Tag * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ export interface NfcATag extends TagSession { /** @@ -52,12 +53,13 @@ export interface NfcATag extends TagSession { /** * Obtains the SAK of an NFC-A tag. * - * @returns { number } Returns the SAK of the NFC-A tag. + * @returns { int } Returns the SAK of the NFC-A tag. * @syscap SystemCapability.Communication.NFC.Tag * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ - getSak(): number; + getSak(): int; /** * Obtains the ATQA of an NFC-A tag. @@ -69,12 +71,13 @@ export interface NfcATag extends TagSession { /** * Obtains the ATQA of an NFC-A tag. * - * @returns { number[] } Returns the ATQA of the NFC-A tag. + * @returns { int[] } Returns the ATQA of the NFC-A tag. * @syscap SystemCapability.Communication.NFC.Tag * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ - getAtqa(): number[]; + getAtqa(): int[]; } /** @@ -94,7 +97,8 @@ export interface NfcATag extends TagSession { * @typedef NfcBTag * @syscap SystemCapability.Communication.NFC.Tag * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ export interface NfcBTag extends TagSession { /** @@ -107,12 +111,13 @@ export interface NfcBTag extends TagSession { /** * Obtains the application data of a tag. * - * @returns { number[] } Returns the application data of the tag. + * @returns { int[] } Returns the application data of the tag. * @syscap SystemCapability.Communication.NFC.Tag * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ - getRespAppData(): number[]; + getRespAppData(): int[]; /** * Obtains the protocol information of a tag. @@ -124,12 +129,13 @@ export interface NfcBTag extends TagSession { /** * Obtains the protocol information of a tag. * - * @returns { number[] } Returns the protocol information of the tag. + * @returns { int[] } Returns the protocol information of the tag. * @syscap SystemCapability.Communication.NFC.Tag * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ - getRespProtocol(): number[]; + getRespProtocol(): int[]; } /** @@ -149,7 +155,8 @@ export interface NfcBTag extends TagSession { * @typedef NfcFTag * @syscap SystemCapability.Communication.NFC.Tag * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ export interface NfcFTag extends TagSession { /** @@ -162,12 +169,13 @@ export interface NfcFTag extends TagSession { /** * Obtains the system code from this {@code NfcFTag} instance. * - * @returns { number[] } Returns the system code. + * @returns { int[] } Returns the system code. * @syscap SystemCapability.Communication.NFC.Tag * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ - getSystemCode(): number[]; + getSystemCode(): int[]; /** * Obtains the PMm (consisting of the IC code and manufacturer parameters) from this {@code NfcFTag} instance. @@ -179,12 +187,13 @@ export interface NfcFTag extends TagSession { /** * Obtains the PMm (consisting of the IC code and manufacturer parameters) from this {@code NfcFTag} instance. * - * @returns { number[] } Returns the PMm. + * @returns { int[] } Returns the PMm. * @syscap SystemCapability.Communication.NFC.Tag * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ - getPmm(): number[]; + getPmm(): int[]; } /** @@ -204,7 +213,8 @@ export interface NfcFTag extends TagSession { * @typedef NfcVTag * @syscap SystemCapability.Communication.NFC.Tag * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ export interface NfcVTag extends TagSession { /** @@ -217,12 +227,13 @@ export interface NfcVTag extends TagSession { /** * Obtains the response flags from this {@code NfcVTag} instance. * - * @returns { number } Returns the response flags. + * @returns { int } Returns the response flags. * @syscap SystemCapability.Communication.NFC.Tag * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ - getResponseFlags(): number; + getResponseFlags(): int; /** * Obtains the response flags from this {@code NfcVTag} instance. @@ -234,12 +245,13 @@ export interface NfcVTag extends TagSession { /** * Obtains the response flags from this {@code NfcVTag} instance. * - * @returns { number } Returns the response flags. + * @returns { int } Returns the response flags. * @syscap SystemCapability.Communication.NFC.Tag * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ - getDsfId(): number; + getDsfId(): int; } /** @@ -255,7 +267,8 @@ export interface NfcVTag extends TagSession { * @typedef IsoDepTag * @syscap SystemCapability.Communication.NFC.Tag * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ export interface IsoDepTag extends TagSession { /** @@ -270,12 +283,13 @@ export interface IsoDepTag extends TagSession { * Gets IsoDep Historical bytes of the tag, which is based on NfcA RF technology. * It could be null if not based on NfcA. * - * @returns { number[] } Returns the Historical bytes, the length could be 0. + * @returns { int[] } Returns the Historical bytes, the length could be 0. * @syscap SystemCapability.Communication.NFC.Tag * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ - getHistoricalBytes(): number[]; + getHistoricalBytes(): int[]; /** * Gets IsoDep HiLayer Response bytes of the tag, which is based on NfcB RF technology. @@ -289,12 +303,13 @@ export interface IsoDepTag extends TagSession { * Gets IsoDep HiLayer Response bytes of the tag, which is based on NfcB RF technology. * It could be null if not based on NfcB. * - * @returns { number[] } Returns HiLayer Response bytes, the length could be 0. + * @returns { int[] } Returns HiLayer Response bytes, the length could be 0. * @syscap SystemCapability.Communication.NFC.Tag * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ - getHiLayerResponse(): number[]; + getHiLayerResponse(): int[]; /** * Checks if extended apdu length supported or not. @@ -324,7 +339,8 @@ export interface IsoDepTag extends TagSession { * @throws { BusinessError } 3100204 - The tag I/O operation failed. * @syscap SystemCapability.Communication.NFC.Tag * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ isExtendedApduSupported(): Promise; @@ -356,7 +372,8 @@ export interface IsoDepTag extends TagSession { * @throws { BusinessError } 3100204 - The Tag I/O operation failed. * @syscap SystemCapability.Communication.NFC.Tag * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ isExtendedApduSupported(callback: AsyncCallback): void; } @@ -374,7 +391,8 @@ export interface IsoDepTag extends TagSession { * @typedef NdefMessage * @syscap SystemCapability.Communication.NFC.Tag * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ export interface NdefMessage { /** @@ -390,7 +408,8 @@ export interface NdefMessage { * @returns { tag.NdefRecord[] } Records the list of NDEF records. * @syscap SystemCapability.Communication.NFC.Tag * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ getNdefRecords(): tag.NdefRecord[]; } @@ -408,7 +427,8 @@ export interface NdefMessage { * @typedef NdefTag * @syscap SystemCapability.Communication.NFC.Tag * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ export interface NdefTag extends TagSession { /** @@ -424,7 +444,8 @@ export interface NdefTag extends TagSession { * @returns { tag.NfcForumType } The type of NDEF tag. * @syscap SystemCapability.Communication.NFC.Tag * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ getNdefTagType(): tag.NfcForumType; @@ -441,7 +462,8 @@ export interface NdefTag extends TagSession { * @returns { NdefMessage } The instance of NdefMessage. * @syscap SystemCapability.Communication.NFC.Tag * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ getNdefMessage(): NdefMessage; @@ -458,7 +480,8 @@ export interface NdefTag extends TagSession { * @returns { boolean } Returns true if the tag is writable, otherwise returns false. * @syscap SystemCapability.Communication.NFC.Tag * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ isNdefWritable(): boolean; @@ -490,7 +513,8 @@ export interface NdefTag extends TagSession { * @throws { BusinessError } 3100204 - The tag I/O operation failed. * @syscap SystemCapability.Communication.NFC.Tag * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ readNdef(): Promise; @@ -522,7 +546,8 @@ export interface NdefTag extends TagSession { * @throws { BusinessError } 3100204 - The Tag I/O operation failed. * @syscap SystemCapability.Communication.NFC.Tag * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ readNdef(callback: AsyncCallback): void; @@ -556,7 +581,8 @@ export interface NdefTag extends TagSession { * @throws { BusinessError } 3100204 - The tag I/O operation failed. * @syscap SystemCapability.Communication.NFC.Tag * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ writeNdef(msg: NdefMessage): Promise; @@ -590,7 +616,8 @@ export interface NdefTag extends TagSession { * @throws { BusinessError } 3100204 - The Tag I/O operation failed. * @syscap SystemCapability.Communication.NFC.Tag * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ writeNdef(msg: NdefMessage, callback: AsyncCallback): void; @@ -613,7 +640,8 @@ export interface NdefTag extends TagSession { * @throws { BusinessError } 3100201 - The tag running state is abnormal in the service. * @syscap SystemCapability.Communication.NFC.Tag * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ canSetReadOnly(): boolean; @@ -645,7 +673,8 @@ export interface NdefTag extends TagSession { * @throws { BusinessError } 3100204 - The tag I/O operation failed. * @syscap SystemCapability.Communication.NFC.Tag * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ setReadOnly(): Promise; @@ -677,7 +706,8 @@ export interface NdefTag extends TagSession { * @throws { BusinessError } 3100204 - The Tag I/O operation failed. * @syscap SystemCapability.Communication.NFC.Tag * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ setReadOnly(callback: AsyncCallback): void; @@ -704,7 +734,8 @@ export interface NdefTag extends TagSession { *
3. Parameter verification failed. * @syscap SystemCapability.Communication.NFC.Tag * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ getNdefTagTypeString(type: tag.NfcForumType): string; } @@ -722,7 +753,8 @@ export interface NdefTag extends TagSession { * @typedef MifareClassicTag * @syscap SystemCapability.Communication.NFC.Tag * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ export interface MifareClassicTag extends TagSession { /** @@ -746,8 +778,8 @@ export interface MifareClassicTag extends TagSession { * Authenticates a sector with the key. Only successful authentication sector can be operated. * * @permission ohos.permission.NFC_TAG - * @param { number } sectorIndex - Index of sector to authenticate. - * @param { number[] } key - The key(6-bytes) to authenticate. + * @param { int } sectorIndex - Index of sector to authenticate. + * @param { int[] } key - The key(6-bytes) to authenticate. * @param { boolean } isKeyA - KeyA flag. true means KeyA, otherwise KeyB. * @returns { Promise } The void * @throws { BusinessError } 201 - Permission denied. @@ -759,9 +791,10 @@ export interface MifareClassicTag extends TagSession { * @throws { BusinessError } 3100204 - The tag I/O operation failed. * @syscap SystemCapability.Communication.NFC.Tag * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ - authenticateSector(sectorIndex: number, key: number[], isKeyA: boolean): Promise; + authenticateSector(sectorIndex: int, key: int[], isKeyA: boolean): Promise; /** * Authenticates a sector with the key.Only successful authentication sector can be operated. @@ -784,8 +817,8 @@ export interface MifareClassicTag extends TagSession { * Authenticates a sector with the key. Only successful authentication sector can be operated. * * @permission ohos.permission.NFC_TAG - * @param { number } sectorIndex - Index of sector to authenticate. - * @param { number[] } key - The key(6-bytes) to authenticate. + * @param { int } sectorIndex - Index of sector to authenticate. + * @param { int[] } key - The key(6-bytes) to authenticate. * @param { boolean } isKeyA - KeyA flag. true means KeyA, otherwise KeyB. * @param { AsyncCallback } callback The callback. * @throws { BusinessError } 201 - Permission denied. @@ -797,9 +830,10 @@ export interface MifareClassicTag extends TagSession { * @throws { BusinessError } 3100204 - The Tag I/O operation failed. * @syscap SystemCapability.Communication.NFC.Tag * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ - authenticateSector(sectorIndex: number, key: number[], isKeyA: boolean, callback: AsyncCallback): void; + authenticateSector(sectorIndex: int, key: int[], isKeyA: boolean, callback: AsyncCallback): void; /** * Reads a block, one block size is 16 bytes. @@ -820,8 +854,8 @@ export interface MifareClassicTag extends TagSession { * Reads a block, one block size is 16 bytes. * * @permission ohos.permission.NFC_TAG - * @param { number } blockIndex - The index of block to read. - * @returns { Promise } Returns the block data. + * @param { int } blockIndex - The index of block to read. + * @returns { Promise } Returns the block data. * @throws { BusinessError } 201 - Permission denied. * @throws { BusinessError } 401 - The parameter check failed. Possible causes: *
1. Mandatory parameters are left unspecified. @@ -831,9 +865,10 @@ export interface MifareClassicTag extends TagSession { * @throws { BusinessError } 3100204 - The tag I/O operation failed. * @syscap SystemCapability.Communication.NFC.Tag * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ - readSingleBlock(blockIndex: number): Promise; + readSingleBlock(blockIndex: int): Promise; /** * Reads a block, one block size is 16 bytes. @@ -854,8 +889,8 @@ export interface MifareClassicTag extends TagSession { * Reads a block, one block size is 16 bytes. * * @permission ohos.permission.NFC_TAG - * @param { number } blockIndex - The index of block to read. - * @param { AsyncCallback } callback The callback. + * @param { int } blockIndex - The index of block to read. + * @param { AsyncCallback } callback The callback. * @throws { BusinessError } 201 - Permission denied. * @throws { BusinessError } 401 - The parameter check failed. Possible causes: *
1. Mandatory parameters are left unspecified. @@ -865,9 +900,10 @@ export interface MifareClassicTag extends TagSession { * @throws { BusinessError } 3100204 - The Tag I/O operation failed. * @syscap SystemCapability.Communication.NFC.Tag * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ - readSingleBlock(blockIndex: number, callback: AsyncCallback): void; + readSingleBlock(blockIndex: int, callback: AsyncCallback): void; /** * Writes a block, one block size is 16 bytes. @@ -889,8 +925,8 @@ export interface MifareClassicTag extends TagSession { * Writes a block, one block size is 16 bytes. * * @permission ohos.permission.NFC_TAG - * @param { number } blockIndex - The index of block to write. - * @param { number[] } data - The block data to write. + * @param { int } blockIndex - The index of block to write. + * @param { int[] } data - The block data to write. * @returns { Promise } The void * @throws { BusinessError } 201 - Permission denied. * @throws { BusinessError } 401 - The parameter check failed. Possible causes: @@ -901,9 +937,10 @@ export interface MifareClassicTag extends TagSession { * @throws { BusinessError } 3100204 - The tag I/O operation failed. * @syscap SystemCapability.Communication.NFC.Tag * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ - writeSingleBlock(blockIndex: number, data: number[]): Promise; + writeSingleBlock(blockIndex: int, data: int[]): Promise; /** * Writes a block, one block size is 16 bytes. @@ -925,8 +962,8 @@ export interface MifareClassicTag extends TagSession { * Writes a block, one block size is 16 bytes. * * @permission ohos.permission.NFC_TAG - * @param { number } blockIndex - The index of block to write. - * @param { number[] } data - The block data to write. + * @param { int } blockIndex - The index of block to write. + * @param { int[] } data - The block data to write. * @param { AsyncCallback } callback The callback. * @throws { BusinessError } 201 - Permission denied. * @throws { BusinessError } 401 - The parameter check failed. Possible causes: @@ -937,9 +974,10 @@ export interface MifareClassicTag extends TagSession { * @throws { BusinessError } 3100204 - The Tag I/O operation failed. * @syscap SystemCapability.Communication.NFC.Tag * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ - writeSingleBlock(blockIndex: number, data: number[], callback: AsyncCallback): void; + writeSingleBlock(blockIndex: int, data: int[], callback: AsyncCallback): void; /** * Increments the contents of a block, and stores the result in the internal transfer buffer. @@ -961,8 +999,8 @@ export interface MifareClassicTag extends TagSession { * Increments the contents of a block, and stores the result in the internal transfer buffer. * * @permission ohos.permission.NFC_TAG - * @param { number } blockIndex - The index of block to increment. - * @param { number } value - The value to increment, none-negative. + * @param { int } blockIndex - The index of block to increment. + * @param { int } value - The value to increment, none-negative. * @returns { Promise } The void * @throws { BusinessError } 201 - Permission denied. * @throws { BusinessError } 401 - The parameter check failed. Possible causes: @@ -973,9 +1011,10 @@ export interface MifareClassicTag extends TagSession { * @throws { BusinessError } 3100204 - The tag I/O operation failed. * @syscap SystemCapability.Communication.NFC.Tag * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ - incrementBlock(blockIndex: number, value: number): Promise; + incrementBlock(blockIndex: int, value: int): Promise; /** * Increments the contents of a block, and stores the result in the internal transfer buffer. @@ -997,8 +1036,8 @@ export interface MifareClassicTag extends TagSession { * Increments the contents of a block, and stores the result in the internal transfer buffer. * * @permission ohos.permission.NFC_TAG - * @param { number } blockIndex - The index of block to increment. - * @param { number } value - The value to increment, none-negative. + * @param { int } blockIndex - The index of block to increment. + * @param { int } value - The value to increment, none-negative. * @param { AsyncCallback } callback The callback. * @throws { BusinessError } 201 - Permission denied. * @throws { BusinessError } 401 - The parameter check failed. Possible causes: @@ -1009,9 +1048,10 @@ export interface MifareClassicTag extends TagSession { * @throws { BusinessError } 3100204 - The Tag I/O operation failed. * @syscap SystemCapability.Communication.NFC.Tag * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ - incrementBlock(blockIndex: number, value: number, callback: AsyncCallback): void; + incrementBlock(blockIndex: int, value: int, callback: AsyncCallback): void; /** * Decreases the contents of a block, and stores the result in the internal transfer buffer. @@ -1033,8 +1073,8 @@ export interface MifareClassicTag extends TagSession { * Decreases the contents of a block, and stores the result in the internal transfer buffer. * * @permission ohos.permission.NFC_TAG - * @param { number } blockIndex - The index of block to decrease. - * @param { number } value - The value to decrease, none-negative. + * @param { int } blockIndex - The index of block to decrease. + * @param { int } value - The value to decrease, none-negative. * @returns { Promise } The void * @throws { BusinessError } 201 - Permission denied. * @throws { BusinessError } 401 - The parameter check failed. Possible causes: @@ -1045,9 +1085,10 @@ export interface MifareClassicTag extends TagSession { * @throws { BusinessError } 3100204 - The tag I/O operation failed. * @syscap SystemCapability.Communication.NFC.Tag * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ - decrementBlock(blockIndex: number, value: number): Promise; + decrementBlock(blockIndex: int, value: int): Promise; /** * Decreases the contents of a block, and stores the result in the internal transfer buffer. @@ -1069,8 +1110,8 @@ export interface MifareClassicTag extends TagSession { * Decreases the contents of a block, and stores the result in the internal transfer buffer. * * @permission ohos.permission.NFC_TAG - * @param { number } blockIndex - The index of block to decrease. - * @param { number } value - The value to decrease, none-negative. + * @param { int } blockIndex - The index of block to decrease. + * @param { int } value - The value to decrease, none-negative. * @param { AsyncCallback } callback The callback. * @throws { BusinessError } 201 - Permission denied. * @throws { BusinessError } 401 - The parameter check failed. Possible causes: @@ -1081,9 +1122,10 @@ export interface MifareClassicTag extends TagSession { * @throws { BusinessError } 3100204 - The Tag I/O operation failed. * @syscap SystemCapability.Communication.NFC.Tag * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ - decrementBlock(blockIndex: number, value: number, callback: AsyncCallback): void; + decrementBlock(blockIndex: int, value: int, callback: AsyncCallback): void; /** * Writes the contents of the internal transfer buffer to a value block. @@ -1104,7 +1146,7 @@ export interface MifareClassicTag extends TagSession { * Writes the contents of the internal transfer buffer to a value block. * * @permission ohos.permission.NFC_TAG - * @param { number } blockIndex - The index of value block to be written. + * @param { int } blockIndex - The index of value block to be written. * @returns { Promise } The void * @throws { BusinessError } 201 - Permission denied. * @throws { BusinessError } 401 - The parameter check failed. Possible causes: @@ -1115,9 +1157,10 @@ export interface MifareClassicTag extends TagSession { * @throws { BusinessError } 3100204 - The tag I/O operation failed. * @syscap SystemCapability.Communication.NFC.Tag * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ - transferToBlock(blockIndex: number): Promise; + transferToBlock(blockIndex: int): Promise; /** * Writes the contents of the internal transfer buffer to a value block. @@ -1138,7 +1181,7 @@ export interface MifareClassicTag extends TagSession { * Writes the contents of the internal transfer buffer to a value block. * * @permission ohos.permission.NFC_TAG - * @param { number } blockIndex - The index of value block to be written. + * @param { int } blockIndex - The index of value block to be written. * @param { AsyncCallback } callback The callback. * @throws { BusinessError } 201 - Permission denied. * @throws { BusinessError } 401 - The parameter check failed. Possible causes: @@ -1149,9 +1192,10 @@ export interface MifareClassicTag extends TagSession { * @throws { BusinessError } 3100204 - The Tag I/O operation failed. * @syscap SystemCapability.Communication.NFC.Tag * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ - transferToBlock(blockIndex: number, callback: AsyncCallback): void; + transferToBlock(blockIndex: int, callback: AsyncCallback): void; /** * Moves the contents of a block into the internal transfer buffer. @@ -1172,7 +1216,7 @@ export interface MifareClassicTag extends TagSession { * Moves the contents of a block into the internal transfer buffer. * * @permission ohos.permission.NFC_TAG - * @param { number } blockIndex - The index of value block to be moved from. + * @param { int } blockIndex - The index of value block to be moved from. * @returns { Promise } The void * @throws { BusinessError } 201 - Permission denied. * @throws { BusinessError } 401 - The parameter check failed. Possible causes: @@ -1183,9 +1227,10 @@ export interface MifareClassicTag extends TagSession { * @throws { BusinessError } 3100204 - The tag I/O operation failed. * @syscap SystemCapability.Communication.NFC.Tag * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ - restoreFromBlock(blockIndex: number): Promise; + restoreFromBlock(blockIndex: int): Promise; /** * Moves the contents of a block into the internal transfer buffer. @@ -1206,7 +1251,7 @@ export interface MifareClassicTag extends TagSession { * Moves the contents of a block into the internal transfer buffer. * * @permission ohos.permission.NFC_TAG - * @param { number } blockIndex - The index of value block to be moved from. + * @param { int } blockIndex - The index of value block to be moved from. * @param { AsyncCallback } callback The callback. * @throws { BusinessError } 201 - Permission denied. * @throws { BusinessError } 401 - The parameter check failed. Possible causes: @@ -1217,9 +1262,10 @@ export interface MifareClassicTag extends TagSession { * @throws { BusinessError } 3100204 - The Tag I/O operation failed. * @syscap SystemCapability.Communication.NFC.Tag * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ - restoreFromBlock(blockIndex: number, callback: AsyncCallback): void; + restoreFromBlock(blockIndex: int, callback: AsyncCallback): void; /** * Gets the number of sectors in MifareClassic tag. @@ -1231,12 +1277,13 @@ export interface MifareClassicTag extends TagSession { /** * Gets the number of sectors in MifareClassic tag. * - * @returns { number } Returns the number of sectors. + * @returns { int } Returns the number of sectors. * @syscap SystemCapability.Communication.NFC.Tag * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ - getSectorCount(): number; + getSectorCount(): int; /** * Gets the number of blocks in the sector. @@ -1253,17 +1300,18 @@ export interface MifareClassicTag extends TagSession { /** * Gets the number of blocks in the sector. * - * @param { number } sectorIndex - The index of sector. - * @returns { number } Returns the number of blocks. + * @param { int } sectorIndex - The index of sector. + * @returns { int } Returns the number of blocks. * @throws { BusinessError } 401 - The parameter check failed. Possible causes: *
1. Mandatory parameters are left unspecified. *
2. Incorrect parameters types. *
3. Parameter verification failed. * @syscap SystemCapability.Communication.NFC.Tag * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ - getBlockCountInSector(sectorIndex: number): number; + getBlockCountInSector(sectorIndex: int): int; /** * Gets the type of the MifareClassic tag. @@ -1278,7 +1326,8 @@ export interface MifareClassicTag extends TagSession { * @returns { tag.MifareClassicType } Returns type of MifareClassic tag. * @syscap SystemCapability.Communication.NFC.Tag * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ getType(): tag.MifareClassicType; @@ -1292,12 +1341,13 @@ export interface MifareClassicTag extends TagSession { /** * Gets size of the tag in bytes. * - * @returns { number } Returns the size of the tag. + * @returns { int } Returns the size of the tag. * @syscap SystemCapability.Communication.NFC.Tag * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ - getTagSize(): number; + getTagSize(): int; /** * Checks if the tag is emulated or not. @@ -1312,7 +1362,8 @@ export interface MifareClassicTag extends TagSession { * @returns { boolean } Returns true if tag is emulated, otherwise false. * @syscap SystemCapability.Communication.NFC.Tag * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ isEmulatedTag(): boolean; @@ -1331,17 +1382,18 @@ export interface MifareClassicTag extends TagSession { /** * Gets the first block of the specific sector. * - * @param { number } sectorIndex - The index of sector. - * @returns { number } Returns index of first block in the sector. + * @param { int } sectorIndex - The index of sector. + * @returns { int } Returns index of first block in the sector. * @throws { BusinessError } 401 - The parameter check failed. Possible causes: *
1. Mandatory parameters are left unspecified. *
2. Incorrect parameters types. *
3. Parameter verification failed. * @syscap SystemCapability.Communication.NFC.Tag * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ - getBlockIndex(sectorIndex: number): number; + getBlockIndex(sectorIndex: int): int; /** * Gets the sector index, that the sector contains the specific block. @@ -1358,17 +1410,18 @@ export interface MifareClassicTag extends TagSession { /** * Gets the sector index, that the sector contains the specific block. * - * @param { number } blockIndex - The index of block. - * @returns { number } Returns the sector index. + * @param { int } blockIndex - The index of block. + * @returns { int } Returns the sector index. * @throws { BusinessError } 401 - The parameter check failed. Possible causes: *
1. Mandatory parameters are left unspecified. *
2. Incorrect parameters types. *
3. Parameter verification failed. * @syscap SystemCapability.Communication.NFC.Tag * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ - getSectorIndex(blockIndex: number): number; + getSectorIndex(blockIndex: int): int; } /** @@ -1384,7 +1437,8 @@ export interface MifareClassicTag extends TagSession { * @typedef MifareUltralightTag * @syscap SystemCapability.Communication.NFC.Tag * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ export interface MifareUltralightTag extends TagSession { /** @@ -1406,8 +1460,8 @@ export interface MifareUltralightTag extends TagSession { * Reads 4 pages, total is 16 bytes. Page size is 4 bytes. * * @permission ohos.permission.NFC_TAG - * @param { number } pageIndex - The index of page to read. - * @returns { Promise } Returns 4 pages data. + * @param { int } pageIndex - The index of page to read. + * @returns { Promise } Returns 4 pages data. * @throws { BusinessError } 201 - Permission denied. * @throws { BusinessError } 401 - The parameter check failed. Possible causes: *
1. Mandatory parameters are left unspecified. @@ -1417,9 +1471,10 @@ export interface MifareUltralightTag extends TagSession { * @throws { BusinessError } 3100204 - The tag I/O operation failed. * @syscap SystemCapability.Communication.NFC.Tag * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ - readMultiplePages(pageIndex: number): Promise; + readMultiplePages(pageIndex: int): Promise; /** * Reads 4 pages, total is 16 bytes. Page size is 4 bytes. @@ -1440,8 +1495,8 @@ export interface MifareUltralightTag extends TagSession { * Reads 4 pages, total is 16 bytes. Page size is 4 bytes. * * @permission ohos.permission.NFC_TAG - * @param { number } pageIndex - The index of page to read. - * @param { AsyncCallback } callback The callback. + * @param { int } pageIndex - The index of page to read. + * @param { AsyncCallback } callback The callback. * @throws { BusinessError } 201 - Permission denied. * @throws { BusinessError } 401 - The parameter check failed. Possible causes: *
1. Mandatory parameters are left unspecified. @@ -1451,9 +1506,10 @@ export interface MifareUltralightTag extends TagSession { * @throws { BusinessError } 3100204 - The Tag I/O operation failed. * @syscap SystemCapability.Communication.NFC.Tag * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ - readMultiplePages(pageIndex: number, callback: AsyncCallback): void; + readMultiplePages(pageIndex: int, callback: AsyncCallback): void; /** * Writes a page, total 4 bytes. @@ -1475,8 +1531,8 @@ export interface MifareUltralightTag extends TagSession { * Writes a page, total 4 bytes. * * @permission ohos.permission.NFC_TAG - * @param { number } pageIndex - The index of page to write. - * @param { number[] } data - The page data to write. + * @param { int } pageIndex - The index of page to write. + * @param { int[] } data - The page data to write. * @returns { Promise } The void * @throws { BusinessError } 201 - Permission denied. * @throws { BusinessError } 401 - The parameter check failed. Possible causes: @@ -1487,9 +1543,10 @@ export interface MifareUltralightTag extends TagSession { * @throws { BusinessError } 3100204 - The tag I/O operation failed. * @syscap SystemCapability.Communication.NFC.Tag * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ - writeSinglePage(pageIndex: number, data: number[]): Promise; + writeSinglePage(pageIndex: int, data: int[]): Promise; /** * Writes a page, total 4 bytes. @@ -1511,8 +1568,8 @@ export interface MifareUltralightTag extends TagSession { * Writes a page, total 4 bytes. * * @permission ohos.permission.NFC_TAG - * @param { number } pageIndex - The index of page to write. - * @param { number[] } data - The page data to write. + * @param { int } pageIndex - The index of page to write. + * @param { int[] } data - The page data to write. * @param { AsyncCallback } callback The callback. * @throws { BusinessError } 201 - Permission denied. * @throws { BusinessError } 401 - The parameter check failed. Possible causes: @@ -1523,9 +1580,10 @@ export interface MifareUltralightTag extends TagSession { * @throws { BusinessError } 3100204 - The Tag I/O operation failed. * @syscap SystemCapability.Communication.NFC.Tag * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ - writeSinglePage(pageIndex: number, data: number[], callback: AsyncCallback): void; + writeSinglePage(pageIndex: int, data: int[], callback: AsyncCallback): void; /** * Gets the type of the MifareUltralight tag. @@ -1540,7 +1598,8 @@ export interface MifareUltralightTag extends TagSession { * @returns { tag.MifareUltralightType } Returns the type of MifareUltralight tag. * @syscap SystemCapability.Communication.NFC.Tag * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ getType(): tag.MifareUltralightType; } @@ -1558,7 +1617,8 @@ export interface MifareUltralightTag extends TagSession { * @typedef NdefFormatableTag * @syscap SystemCapability.Communication.NFC.Tag * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ export interface NdefFormatableTag extends TagSession { /** @@ -1591,7 +1651,8 @@ export interface NdefFormatableTag extends TagSession { * @throws { BusinessError } 3100204 - The tag I/O operation failed. * @syscap SystemCapability.Communication.NFC.Tag * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ format(message: NdefMessage): Promise; @@ -1625,7 +1686,8 @@ export interface NdefFormatableTag extends TagSession { * @throws { BusinessError } 3100204 - The Tag I/O operation failed. * @syscap SystemCapability.Communication.NFC.Tag * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ format(message: NdefMessage, callback: AsyncCallback): void; @@ -1659,7 +1721,8 @@ export interface NdefFormatableTag extends TagSession { * @throws { BusinessError } 3100204 - The tag I/O operation failed. * @syscap SystemCapability.Communication.NFC.Tag * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ formatReadOnly(message: NdefMessage): Promise; @@ -1693,7 +1756,8 @@ export interface NdefFormatableTag extends TagSession { * @throws { BusinessError } 3100204 - The Tag I/O operation failed. * @syscap SystemCapability.Communication.NFC.Tag * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ formatReadOnly(message: NdefMessage, callback: AsyncCallback): void; } @@ -1705,7 +1769,8 @@ export interface NdefFormatableTag extends TagSession { * @typedef BarcodeTag * @syscap SystemCapability.Communication.NFC.Tag * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ export interface BarcodeTag extends TagSession { /** @@ -1718,7 +1783,8 @@ export interface BarcodeTag extends TagSession { * @throws { BusinessError } 3100204 - The tag I/O operation failed. * @syscap SystemCapability.Communication.NFC.Tag * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ getBarcode(): Promise; } \ No newline at end of file diff --git a/api/tag/tagSession.d.ts b/api/tag/tagSession.d.ts index f7f4785f2d9dfb58526c2dbc17aa937424c0cffd..74d37145d7cdcbdb66d2301608886d8769033527 100644 --- a/api/tag/tagSession.d.ts +++ b/api/tag/tagSession.d.ts @@ -38,7 +38,8 @@ import { AsyncCallback } from '../@ohos.base'; * @typedef TagSession * @syscap SystemCapability.Communication.NFC.Tag * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ export interface TagSession { /** @@ -85,7 +86,8 @@ export interface TagSession { * @throws { BusinessError } 3100201 - The tag running state is abnormal in the service. * @syscap SystemCapability.Communication.NFC.Tag * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ connect(): void; @@ -119,7 +121,8 @@ export interface TagSession { * @throws { BusinessError } 3100201 - The tag running state is abnormal in the service. * @syscap SystemCapability.Communication.NFC.Tag * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ resetConnection(): void; @@ -150,7 +153,8 @@ export interface TagSession { * @throws { BusinessError } 801 - Capability not supported. * @syscap SystemCapability.Communication.NFC.Tag * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ isConnected(): boolean; @@ -187,7 +191,7 @@ export interface TagSession { * Sets the timeout duration (ms) for sending data to a tag. * * @permission ohos.permission.NFC_TAG - * @param { number } timeout Indicates the timeout duration to be set. + * @param { int } timeout Indicates the timeout duration to be set. * @throws { BusinessError } 201 - Permission denied. * @throws { BusinessError } 401 - The parameter check failed. Possible causes: *
1. Mandatory parameters are left unspecified. @@ -197,9 +201,10 @@ export interface TagSession { * @throws { BusinessError } 3100201 - The tag running state is abnormal in the service. * @syscap SystemCapability.Communication.NFC.Tag * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ - setTimeout(timeout: number): void; + setTimeout(timeout: int): void; /** * Queries the timeout duration (ms) for sending data to a tag. @@ -228,15 +233,16 @@ export interface TagSession { * Obtains the timeout duration (ms) for sending data to a tag. * * @permission ohos.permission.NFC_TAG - * @returns { number } Returns the timeout duration. + * @returns { int } Returns the timeout duration. * @throws { BusinessError } 201 - Permission denied. * @throws { BusinessError } 801 - Capability not supported. * @throws { BusinessError } 3100201 - The tag running state is abnormal in the service. * @syscap SystemCapability.Communication.NFC.Tag * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ - getTimeout(): number; + getTimeout(): int; /** * Writes data to a tag. @@ -287,8 +293,8 @@ export interface TagSession { * Writes data to a tag. * * @permission ohos.permission.NFC_TAG - * @param { number[] } data Indicates the data to be written to the tag. - * @returns { Promise } Returns bytes received in response. Or bytes with a length of 0 if the + * @param { int[] } data Indicates the data to be written to the tag. + * @returns { Promise } Returns bytes received in response. Or bytes with a length of 0 if the * data fails to be written to the tag. * @throws { BusinessError } 201 - Permission denied. * @throws { BusinessError } 401 - The parameter check failed. Possible causes: @@ -300,9 +306,10 @@ export interface TagSession { * @throws { BusinessError } 3100204 - The tag I/O operation failed. * @syscap SystemCapability.Communication.NFC.Tag * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ - transmit(data: number[]): Promise; + transmit(data: int[]): Promise; /** * Writes data to a tag. @@ -324,8 +331,8 @@ export interface TagSession { * Writes data to a tag. * * @permission ohos.permission.NFC_TAG - * @param { number[] } data Indicates the data to be written to the tag. - * @param { AsyncCallback } callback The callback. + * @param { int[] } data Indicates the data to be written to the tag. + * @param { AsyncCallback } callback The callback. * @throws { BusinessError } 201 - Permission denied. * @throws { BusinessError } 401 - The parameter check failed. Possible causes: *
1. Mandatory parameters are left unspecified. @@ -336,9 +343,10 @@ export interface TagSession { * @throws { BusinessError } 3100204 - The tag I/O operation failed. * @syscap SystemCapability.Communication.NFC.Tag * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ - transmit(data: number[], callback: AsyncCallback): void; + transmit(data: int[], callback: AsyncCallback): void; /** * Queries the maximum length of data that can be sent to a tag. @@ -367,13 +375,14 @@ export interface TagSession { * Obtains the maximum length of data that can be sent to a tag. * * @permission ohos.permission.NFC_TAG - * @returns { number } Returns the maximum length of the data to be sent to the tag. + * @returns { int } Returns the maximum length of the data to be sent to the tag. * @throws { BusinessError } 201 - Permission denied. * @throws { BusinessError } 801 - Capability not supported. * @throws { BusinessError } 3100201 - The tag running state is abnormal in the service. * @syscap SystemCapability.Communication.NFC.Tag * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ - getMaxTransmitSize(): number; + getMaxTransmitSize(): int; }