Signed-off-by: wujie <wujie150@h-partners.com>

bugfix: 401 error code availability

Signed-off-by: wujie <wujie150@h-partners.com>
This commit is contained in:
wujie 2024-05-17 11:56:03 +08:00
parent 45a0e3e32a
commit d2dfd7c8d9
6 changed files with 552 additions and 138 deletions

View File

@ -159,7 +159,10 @@ declare namespace connectedTag {
* @param { number[] } data Indicates the NDEF data to send, which is a byte array.
* @returns { Promise<void> } The void.
* @throws { BusinessError } 201 - Permission denied.
* @throws { BusinessError } 401 - The parameter check failed.
* @throws { BusinessError } 401 - The parameter check failed. Possible causes:
* <br> 1. Mandatory parameters are left unspecified.
* <br> 2. Incorrect parameters types.
* <br> 3. Parameter verification failed.
* @throws { BusinessError } 801 - Capability not supported.
* @throws { BusinessError } 3200101 - Connected NFC tag running state is abnormal in service.
* @syscap SystemCapability.Communication.ConnectedTag
@ -174,7 +177,10 @@ declare namespace connectedTag {
* @param { number[] } data Indicates the NDEF data to send, which is a byte array.
* @param { AsyncCallback<void> } callback
* @throws { BusinessError } 201 - Permission denied.
* @throws { BusinessError } 401 - The parameter check failed.
* @throws { BusinessError } 401 - The parameter check failed. Possible causes:
* <br> 1. Mandatory parameters are left unspecified.
* <br> 2. Incorrect parameters types.
* <br> 3. Parameter verification failed.
* @throws { BusinessError } 801 - Capability not supported.
* @throws { BusinessError } 3200101 - Connected NFC tag running state is abnormal in service.
* @syscap SystemCapability.Communication.ConnectedTag

View File

@ -167,7 +167,10 @@ declare namespace cardEmulation {
* @param { CardType } type - The type to query, payment or other.
* @returns { boolean } Returns true if the service is default, otherwise false.
* @throws { BusinessError } 201 - Permission denied.
* @throws { BusinessError } 401 - The parameter check failed.
* @throws { BusinessError } 401 - The parameter check failed. Possible causes:
* <br> 1. Mandatory parameters are left unspecified.
* <br> 2. Incorrect parameters types.
* <br> 3. Parameter verification failed.
* @throws { BusinessError } 801 - Capability not supported.
* @syscap SystemCapability.Communication.NFC.CardEmulation
* @since 9
@ -180,7 +183,10 @@ declare namespace cardEmulation {
* @param { CardType } type - The type to query, payment or other.
* @returns { boolean } Returns true if the service is default, otherwise false.
* @throws { BusinessError } 201 - Permission denied.
* @throws { BusinessError } 401 - The parameter check failed.
* @throws { BusinessError } 401 - The parameter check failed. Possible causes:
* <br> 1. Mandatory parameters are left unspecified.
* <br> 2. Incorrect parameters types.
* <br> 3. Parameter verification failed.
* @throws { BusinessError } 801 - Capability not supported.
* @syscap SystemCapability.Communication.NFC.CardEmulation
* @atomicservice
@ -240,7 +246,10 @@ declare namespace cardEmulation {
* @param { ElementName } elementName - The element name of the service ability
* @param { string[] } aidList - The aid list to be registered by this service, allowed to be empty.
* @throws { BusinessError } 201 - Permission denied.
* @throws { BusinessError } 401 - The parameter check failed.
* @throws { BusinessError } 401 - The parameter check failed. Possible causes:
* <br> 1. Mandatory parameters are left unspecified.
* <br> 2. Incorrect parameters types.
* <br> 3. Parameter verification failed.
* @throws { BusinessError } 801 - Capability not supported.
* @throws { BusinessError } 3100301 - Card emulation running state is abnormal in service.
* @syscap SystemCapability.Communication.NFC.CardEmulation
@ -253,7 +262,10 @@ declare namespace cardEmulation {
* @param { ElementName } elementName - The element name of the service ability
* @param { string[] } aidList - The aid list to be registered by this service, allowed to be empty.
* @throws { BusinessError } 201 - Permission denied.
* @throws { BusinessError } 401 - The parameter check failed.
* @throws { BusinessError } 401 - The parameter check failed. Possible causes:
* <br> 1. Mandatory parameters are left unspecified.
* <br> 2. Incorrect parameters types.
* <br> 3. Parameter verification failed.
* @throws { BusinessError } 801 - Capability not supported.
* @throws { BusinessError } 3100301 - Card emulation running state is abnormal in service.
* @syscap SystemCapability.Communication.NFC.CardEmulation
@ -280,7 +292,10 @@ declare namespace cardEmulation {
* @permission ohos.permission.NFC_CARD_EMULATION
* @param { ElementName } elementName - The element name of the service ability
* @throws { BusinessError } 201 - Permission denied.
* @throws { BusinessError } 401 - The parameter check failed.
* @throws { BusinessError } 401 - The parameter check failed. Possible causes:
* <br> 1. Mandatory parameters are left unspecified.
* <br> 2. Incorrect parameters types.
* <br> 3. Parameter verification failed.
* @throws { BusinessError } 801 - Capability not supported.
* @throws { BusinessError } 3100301 - Card emulation running state is abnormal in service.
* @syscap SystemCapability.Communication.NFC.CardEmulation
@ -292,7 +307,10 @@ declare namespace cardEmulation {
* @permission ohos.permission.NFC_CARD_EMULATION
* @param { ElementName } elementName - The element name of the service ability
* @throws { BusinessError } 201 - Permission denied.
* @throws { BusinessError } 401 - The parameter check failed.
* @throws { BusinessError } 401 - The parameter check failed. Possible causes:
* <br> 1. Mandatory parameters are left unspecified.
* <br> 2. Incorrect parameters types.
* <br> 3. Parameter verification failed.
* @throws { BusinessError } 801 - Capability not supported.
* @throws { BusinessError } 3100301 - Card emulation running state is abnormal in service.
* @syscap SystemCapability.Communication.NFC.CardEmulation
@ -342,7 +360,10 @@ declare namespace cardEmulation {
* @param { number[] } response Indicates the response to send, which is a byte array.
* @returns { Promise<void> } The void
* @throws { BusinessError } 201 - Permission denied.
* @throws { BusinessError } 401 - The parameter check failed.
* @throws { BusinessError } 401 - The parameter check failed. Possible causes:
* <br> 1. Mandatory parameters are left unspecified.
* <br> 2. Incorrect parameters types.
* <br> 3. Parameter verification failed.
* @throws { BusinessError } 801 - Capability not supported.
* @throws { BusinessError } 3100301 - Card emulation running state is abnormal in service.
* @syscap SystemCapability.Communication.NFC.CardEmulation
@ -355,7 +376,10 @@ declare namespace cardEmulation {
* @param { number[] } response Indicates the response to send, which is a byte array.
* @returns { Promise<void> } The void
* @throws { BusinessError } 201 - Permission denied.
* @throws { BusinessError } 401 - The parameter check failed.
* @throws { BusinessError } 401 - The parameter check failed. Possible causes:
* <br> 1. Mandatory parameters are left unspecified.
* <br> 2. Incorrect parameters types.
* <br> 3. Parameter verification failed.
* @throws { BusinessError } 801 - Capability not supported.
* @throws { BusinessError } 3100301 - Card emulation running state is abnormal in service.
* @syscap SystemCapability.Communication.NFC.CardEmulation
@ -371,7 +395,10 @@ declare namespace cardEmulation {
* @param { number[] } response Indicates the response to send, which is a byte array.
* @param { AsyncCallback<void> } callback The callback
* @throws { BusinessError } 201 - Permission denied.
* @throws { BusinessError } 401 - The parameter check failed.
* @throws { BusinessError } 401 - The parameter check failed. Possible causes:
* <br> 1. Mandatory parameters are left unspecified.
* <br> 2. Incorrect parameters types.
* <br> 3. Parameter verification failed.
* @throws { BusinessError } 801 - Capability not supported.
* @throws { BusinessError } 3100301 - Card emulation running state is abnormal in service.
* @syscap SystemCapability.Communication.NFC.CardEmulation
@ -384,7 +411,10 @@ declare namespace cardEmulation {
* @param { number[] } response Indicates the response to send, which is a byte array.
* @param { AsyncCallback<void> } callback The callback
* @throws { BusinessError } 201 - Permission denied.
* @throws { BusinessError } 401 - The parameter check failed.
* @throws { BusinessError } 401 - The parameter check failed. Possible causes:
* <br> 1. Mandatory parameters are left unspecified.
* <br> 2. Incorrect parameters types.
* <br> 3. Parameter verification failed.
* @throws { BusinessError } 801 - Capability not supported.
* @throws { BusinessError } 3100301 - Card emulation running state is abnormal in service.
* @syscap SystemCapability.Communication.NFC.CardEmulation

205
api/@ohos.nfc.tag.d.ts vendored
View File

@ -688,7 +688,10 @@ declare namespace tag {
*
* @param { TagInfo } tagInfo - Indicates the dispatched tag information.
* @returns { NfcATag } {@link NfcATag} object.
* @throws { BusinessError } 401 - The parameter check failed.
* @throws { BusinessError } 401 - The parameter check failed. Possible causes:
* <br> 1. Mandatory parameters are left unspecified.
* <br> 2. Incorrect parameters types.
* <br> 3. Parameter verification failed.
* @throws { BusinessError } 801 - Capability not supported.
* @throws { BusinessError } 3100201 - Tag running state is abnormal in service.
* @syscap SystemCapability.Communication.NFC.Tag
@ -701,7 +704,10 @@ declare namespace tag {
*
* @param { TagInfo } tagInfo - Indicates the dispatched tag information.
* @returns { NfcATag } {@link NfcATag} object.
* @throws { BusinessError } 401 - The parameter check failed.
* @throws { BusinessError } 401 - The parameter check failed. Possible causes:
* <br> 1. Mandatory parameters are left unspecified.
* <br> 2. Incorrect parameters types.
* <br> 3. Parameter verification failed.
* @throws { BusinessError } 801 - Capability not supported.
* @throws { BusinessError } 3100201 - Tag running state is abnormal in service.
* @syscap SystemCapability.Communication.NFC.Tag
@ -731,7 +737,10 @@ declare namespace tag {
*
* @param { TagInfo } tagInfo - Indicates the dispatched tag information.
* @returns { NfcBTag } The {@link NfcBTag} object.
* @throws { BusinessError } 401 - The parameter check failed.
* @throws { BusinessError } 401 - The parameter check failed. Possible causes:
* <br> 1. Mandatory parameters are left unspecified.
* <br> 2. Incorrect parameters types.
* <br> 3. Parameter verification failed.
* @throws { BusinessError } 801 - Capability not supported.
* @throws { BusinessError } 3100201 - Tag running state is abnormal in service.
* @syscap SystemCapability.Communication.NFC.Tag
@ -744,7 +753,10 @@ declare namespace tag {
*
* @param { TagInfo } tagInfo - Indicates the dispatched tag information.
* @returns { NfcBTag } The {@link NfcBTag} object.
* @throws { BusinessError } 401 - The parameter check failed.
* @throws { BusinessError } 401 - The parameter check failed. Possible causes:
* <br> 1. Mandatory parameters are left unspecified.
* <br> 2. Incorrect parameters types.
* <br> 3. Parameter verification failed.
* @throws { BusinessError } 801 - Capability not supported.
* @throws { BusinessError } 3100201 - Tag running state is abnormal in service.
* @syscap SystemCapability.Communication.NFC.Tag
@ -774,7 +786,10 @@ declare namespace tag {
*
* @param { TagInfo } tagInfo - Indicates the dispatched tag information.
* @returns { NfcFTag } The {@link NfcFTag} object.
* @throws { BusinessError } 401 - The parameter check failed.
* @throws { BusinessError } 401 - The parameter check failed. Possible causes:
* <br> 1. Mandatory parameters are left unspecified.
* <br> 2. Incorrect parameters types.
* <br> 3. Parameter verification failed.
* @throws { BusinessError } 801 - Capability not supported.
* @throws { BusinessError } 3100201 - Tag running state is abnormal in service.
* @syscap SystemCapability.Communication.NFC.Tag
@ -787,7 +802,10 @@ declare namespace tag {
*
* @param { TagInfo } tagInfo - Indicates the dispatched tag information.
* @returns { NfcFTag } The {@link NfcFTag} object.
* @throws { BusinessError } 401 - The parameter check failed.
* @throws { BusinessError } 401 - The parameter check failed. Possible causes:
* <br> 1. Mandatory parameters are left unspecified.
* <br> 2. Incorrect parameters types.
* <br> 3. Parameter verification failed.
* @throws { BusinessError } 801 - Capability not supported.
* @throws { BusinessError } 3100201 - Tag running state is abnormal in service.
* @syscap SystemCapability.Communication.NFC.Tag
@ -817,7 +835,10 @@ declare namespace tag {
*
* @param { TagInfo } tagInfo - Indicates the dispatched tag information.
* @returns { NfcVTag } The {@link NfcVTag} object.
* @throws { BusinessError } 401 - The parameter check failed.
* @throws { BusinessError } 401 - The parameter check failed. Possible causes:
* <br> 1. Mandatory parameters are left unspecified.
* <br> 2. Incorrect parameters types.
* <br> 3. Parameter verification failed.
* @throws { BusinessError } 801 - Capability not supported.
* @throws { BusinessError } 3100201 - Tag running state is abnormal in service.
* @syscap SystemCapability.Communication.NFC.Tag
@ -830,7 +851,10 @@ declare namespace tag {
*
* @param { TagInfo } tagInfo - Indicates the dispatched tag information.
* @returns { NfcVTag } The {@link NfcVTag} object.
* @throws { BusinessError } 401 - The parameter check failed.
* @throws { BusinessError } 401 - The parameter check failed. Possible causes:
* <br> 1. Mandatory parameters are left unspecified.
* <br> 2. Incorrect parameters types.
* <br> 3. Parameter verification failed.
* @throws { BusinessError } 801 - Capability not supported.
* @throws { BusinessError } 3100201 - Tag running state is abnormal in service.
* @syscap SystemCapability.Communication.NFC.Tag
@ -846,7 +870,10 @@ declare namespace tag {
*
* @param { TagInfo } tagInfo - Indicates the dispatched tag information.
* @returns { IsoDepTag } The {@link IsoDepTag} object.
* @throws { BusinessError } 401 - The parameter check failed.
* @throws { BusinessError } 401 - The parameter check failed. Possible causes:
* <br> 1. Mandatory parameters are left unspecified.
* <br> 2. Incorrect parameters types.
* <br> 3. Parameter verification failed.
* @throws { BusinessError } 801 - Capability not supported.
* @throws { BusinessError } 3100201 - Tag running state is abnormal in service.
* @syscap SystemCapability.Communication.NFC.Tag
@ -859,7 +886,10 @@ declare namespace tag {
*
* @param { TagInfo } tagInfo - Indicates the dispatched tag information.
* @returns { IsoDepTag } The {@link IsoDepTag} object.
* @throws { BusinessError } 401 - The parameter check failed.
* @throws { BusinessError } 401 - The parameter check failed. Possible causes:
* <br> 1. Mandatory parameters are left unspecified.
* <br> 2. Incorrect parameters types.
* <br> 3. Parameter verification failed.
* @throws { BusinessError } 801 - Capability not supported.
* @throws { BusinessError } 3100201 - Tag running state is abnormal in service.
* @syscap SystemCapability.Communication.NFC.Tag
@ -875,7 +905,10 @@ declare namespace tag {
*
* @param { TagInfo } tagInfo - Indicates the dispatched tag information.
* @returns { NdefTag } The {@link NdefTag} object.
* @throws { BusinessError } 401 - The parameter check failed.
* @throws { BusinessError } 401 - The parameter check failed. Possible causes:
* <br> 1. Mandatory parameters are left unspecified.
* <br> 2. Incorrect parameters types.
* <br> 3. Parameter verification failed.
* @throws { BusinessError } 801 - Capability not supported.
* @throws { BusinessError } 3100201 - Tag running state is abnormal in service.
* @syscap SystemCapability.Communication.NFC.Tag
@ -888,7 +921,10 @@ declare namespace tag {
*
* @param { TagInfo } tagInfo - Indicates the dispatched tag information.
* @returns { NdefTag } The {@link NdefTag} object.
* @throws { BusinessError } 401 - The parameter check failed.
* @throws { BusinessError } 401 - The parameter check failed. Possible causes:
* <br> 1. Mandatory parameters are left unspecified.
* <br> 2. Incorrect parameters types.
* <br> 3. Parameter verification failed.
* @throws { BusinessError } 801 - Capability not supported.
* @throws { BusinessError } 3100201 - Tag running state is abnormal in service.
* @syscap SystemCapability.Communication.NFC.Tag
@ -904,7 +940,10 @@ declare namespace tag {
*
* @param { TagInfo } tagInfo - Indicates the dispatched tag information.
* @returns { MifareClassicTag } The {@link MifareClassicTag} object.
* @throws { BusinessError } 401 - The parameter check failed.
* @throws { BusinessError } 401 - The parameter check failed. Possible causes:
* <br> 1. Mandatory parameters are left unspecified.
* <br> 2. Incorrect parameters types.
* <br> 3. Parameter verification failed.
* @throws { BusinessError } 801 - Capability not supported.
* @throws { BusinessError } 3100201 - Tag running state is abnormal in service.
* @syscap SystemCapability.Communication.NFC.Tag
@ -917,7 +956,10 @@ declare namespace tag {
*
* @param { TagInfo } tagInfo - Indicates the dispatched tag information.
* @returns { MifareClassicTag } The {@link MifareClassicTag} object.
* @throws { BusinessError } 401 - The parameter check failed.
* @throws { BusinessError } 401 - The parameter check failed. Possible causes:
* <br> 1. Mandatory parameters are left unspecified.
* <br> 2. Incorrect parameters types.
* <br> 3. Parameter verification failed.
* @throws { BusinessError } 801 - Capability not supported.
* @throws { BusinessError } 3100201 - Tag running state is abnormal in service.
* @syscap SystemCapability.Communication.NFC.Tag
@ -933,7 +975,10 @@ declare namespace tag {
*
* @param { TagInfo } tagInfo - Indicates the dispatched tag information.
* @returns { MifareUltralightTag } The {@link MifareUltralightTag} object.
* @throws { BusinessError } 401 - The parameter check failed.
* @throws { BusinessError } 401 - The parameter check failed. Possible causes:
* <br> 1. Mandatory parameters are left unspecified.
* <br> 2. Incorrect parameters types.
* <br> 3. Parameter verification failed.
* @throws { BusinessError } 801 - Capability not supported.
* @throws { BusinessError } 3100201 - Tag running state is abnormal in service.
* @syscap SystemCapability.Communication.NFC.Tag
@ -946,7 +991,10 @@ declare namespace tag {
*
* @param { TagInfo } tagInfo - Indicates the dispatched tag information.
* @returns { MifareUltralightTag } The {@link MifareUltralightTag} object.
* @throws { BusinessError } 401 - The parameter check failed.
* @throws { BusinessError } 401 - The parameter check failed. Possible causes:
* <br> 1. Mandatory parameters are left unspecified.
* <br> 2. Incorrect parameters types.
* <br> 3. Parameter verification failed.
* @throws { BusinessError } 801 - Capability not supported.
* @throws { BusinessError } 3100201 - Tag running state is abnormal in service.
* @syscap SystemCapability.Communication.NFC.Tag
@ -962,7 +1010,10 @@ declare namespace tag {
*
* @param { TagInfo } tagInfo - Indicates the dispatched tag information.
* @returns { NdefFormatableTag } The {@link NdefFormatableTag} object.
* @throws { BusinessError } 401 - The parameter check failed.
* @throws { BusinessError } 401 - The parameter check failed. Possible causes:
* <br> 1. Mandatory parameters are left unspecified.
* <br> 2. Incorrect parameters types.
* <br> 3. Parameter verification failed.
* @throws { BusinessError } 801 - Capability not supported.
* @throws { BusinessError } 3100201 - Tag running state is abnormal in service.
* @syscap SystemCapability.Communication.NFC.Tag
@ -975,7 +1026,10 @@ declare namespace tag {
*
* @param { TagInfo } tagInfo - Indicates the dispatched tag information.
* @returns { NdefFormatableTag } The {@link NdefFormatableTag} object.
* @throws { BusinessError } 401 - The parameter check failed.
* @throws { BusinessError } 401 - The parameter check failed. Possible causes:
* <br> 1. Mandatory parameters are left unspecified.
* <br> 2. Incorrect parameters types.
* <br> 3. Parameter verification failed.
* @throws { BusinessError } 801 - Capability not supported.
* @throws { BusinessError } 3100201 - Tag running state is abnormal in service.
* @syscap SystemCapability.Communication.NFC.Tag
@ -989,7 +1043,10 @@ declare namespace tag {
*
* @param { Want } want - The want object that contains the values of TagInfo.
* @returns { TagInfo } The {@link TagInfo} object.
* @throws { BusinessError } 401 - The parameter check failed.
* @throws { BusinessError } 401 - The parameter check failed. Possible causes:
* <br> 1. Mandatory parameters are left unspecified.
* <br> 2. Incorrect parameters types.
* <br> 3. Parameter verification failed.
* @throws { BusinessError } 801 - Capability not supported.
* @syscap SystemCapability.Communication.NFC.Tag
* @since 9
@ -999,7 +1056,10 @@ declare namespace tag {
*
* @param { Want } want - The want object that contains the values of TagInfo.
* @returns { TagInfo } The {@link TagInfo} object.
* @throws { BusinessError } 401 - The parameter check failed.
* @throws { BusinessError } 401 - The parameter check failed. Possible causes:
* <br> 1. Mandatory parameters are left unspecified.
* <br> 2. Incorrect parameters types.
* <br> 3. Parameter verification failed.
* @throws { BusinessError } 801 - Capability not supported.
* @syscap SystemCapability.Communication.NFC.Tag
* @atomicservice
@ -1015,7 +1075,10 @@ declare namespace tag {
* @param { number[] } discTech - The technologies list to set for discovering. From {@link NFC_A} to {@link MIFARE_ULTRALIGHT}.
* @param { AsyncCallback<TagInfo> } callback - The callback to dispatched the TagInfo object for application.
* @throws { BusinessError } 201 - Permission denied.
* @throws { BusinessError } 401 - The parameter check failed.
* @throws { BusinessError } 401 - The parameter check failed. Possible causes:
* <br> 1. Mandatory parameters are left unspecified.
* <br> 2. Incorrect parameters types.
* <br> 3. Parameter verification failed.
* @throws { BusinessError } 801 - Capability not supported.
* @syscap SystemCapability.Communication.NFC.Tag
* @since 10
@ -1028,7 +1091,10 @@ declare namespace tag {
* @param { number[] } discTech - The technologies list to set for discovering. From {@link NFC_A} to {@link MIFARE_ULTRALIGHT}.
* @param { AsyncCallback<TagInfo> } callback - The callback to dispatched the TagInfo object for application.
* @throws { BusinessError } 201 - Permission denied.
* @throws { BusinessError } 401 - The parameter check failed.
* @throws { BusinessError } 401 - The parameter check failed. Possible causes:
* <br> 1. Mandatory parameters are left unspecified.
* <br> 2. Incorrect parameters types.
* <br> 3. Parameter verification failed.
* @throws { BusinessError } 801 - Capability not supported.
* @throws { BusinessError } 3100202 - The element state is invalid.
* @syscap SystemCapability.Communication.NFC.Tag
@ -1047,7 +1113,10 @@ declare namespace tag {
* @permission ohos.permission.NFC_TAG
* @param { ElementName } elementName - The element name of application, must include the bundleName and abilityName.
* @throws { BusinessError } 201 - Permission denied.
* @throws { BusinessError } 401 - The parameter check failed.
* @throws { BusinessError } 401 - The parameter check failed. Possible causes:
* <br> 1. Mandatory parameters are left unspecified.
* <br> 2. Incorrect parameters types.
* <br> 3. Parameter verification failed.
* @throws { BusinessError } 801 - Capability not supported.
* @syscap SystemCapability.Communication.NFC.Tag
* @since 10
@ -1058,7 +1127,10 @@ declare namespace tag {
* @permission ohos.permission.NFC_TAG
* @param { ElementName } elementName - The element name of application, must include the bundleName and abilityName.
* @throws { BusinessError } 201 - Permission denied.
* @throws { BusinessError } 401 - The parameter check failed.
* @throws { BusinessError } 401 - The parameter check failed. Possible causes:
* <br> 1. Mandatory parameters are left unspecified.
* <br> 2. Incorrect parameters types.
* <br> 3. Parameter verification failed.
* @throws { BusinessError } 801 - Capability not supported.
* @syscap SystemCapability.Communication.NFC.Tag
* @atomicservice
@ -1075,7 +1147,10 @@ declare namespace tag {
* @param { number[] } discTech - The technologies list to set for discovering. From {@link NFC_A} to {@link MIFARE_ULTRALIGHT}.
* @param { AsyncCallback<TagInfo> } callback - The callback to dispatched the TagInfo object for application.
* @throws { BusinessError } 201 - Permission denied.
* @throws { BusinessError } 401 - The parameter check failed.
* @throws { BusinessError } 401 - The parameter check failed. Possible causes:
* <br> 1. Mandatory parameters are left unspecified.
* <br> 2. Incorrect parameters types.
* <br> 3. Parameter verification failed.
* @throws { BusinessError } 801 - Capability not supported.
* @throws { BusinessError } 3100202 - The element state is invalid.
* @syscap SystemCapability.Communication.NFC.Tag
@ -1090,7 +1165,10 @@ declare namespace tag {
* @param { number[] } discTech - The technologies list to set for discovering. From {@link NFC_A} to {@link MIFARE_ULTRALIGHT}.
* @param { AsyncCallback<TagInfo> } callback - The callback to dispatched the TagInfo object for application.
* @throws { BusinessError } 201 - Permission denied.
* @throws { BusinessError } 401 - The parameter check failed.
* @throws { BusinessError } 401 - The parameter check failed. Possible causes:
* <br> 1. Mandatory parameters are left unspecified.
* <br> 2. Incorrect parameters types.
* <br> 3. Parameter verification failed.
* @throws { BusinessError } 801 - Capability not supported.
* @throws { BusinessError } 3100202 - The element state is invalid.
* @syscap SystemCapability.Communication.NFC.Tag
@ -1107,7 +1185,10 @@ declare namespace tag {
* @param { ElementName } elementName - The element name of application, must include the bundleName and abilityName.
* @param { AsyncCallback<TagInfo> } [callback] - The callback to dispatched the TagInfo object for application.
* @throws { BusinessError } 201 - Permission denied.
* @throws { BusinessError } 401 - The parameter check failed.
* @throws { BusinessError } 401 - The parameter check failed. Possible causes:
* <br> 1. Mandatory parameters are left unspecified.
* <br> 2. Incorrect parameters types.
* <br> 3. Parameter verification failed.
* @throws { BusinessError } 801 - Capability not supported.
* @throws { BusinessError } 3100203 - The off() can be called only when the on() has been called.
* @syscap SystemCapability.Communication.NFC.Tag
@ -1121,7 +1202,10 @@ declare namespace tag {
* @param { ElementName } elementName - The element name of application, must include the bundleName and abilityName.
* @param { AsyncCallback<TagInfo> } [callback] - The callback to dispatched the TagInfo object for application.
* @throws { BusinessError } 201 - Permission denied.
* @throws { BusinessError } 401 - The parameter check failed.
* @throws { BusinessError } 401 - The parameter check failed. Possible causes:
* <br> 1. Mandatory parameters are left unspecified.
* <br> 2. Incorrect parameters types.
* <br> 3. Parameter verification failed.
* @throws { BusinessError } 801 - Capability not supported.
* @throws { BusinessError } 3100203 - The off() can be called only when the on() has been called.
* @syscap SystemCapability.Communication.NFC.Tag
@ -1326,7 +1410,10 @@ declare namespace tag {
*
* @param { string } uri - Uri data for new NDEF record.
* @returns { NdefRecord } The instance of NdefRecord.
* @throws { BusinessError } 401 - The parameter check failed.
* @throws { BusinessError } 401 - The parameter check failed. Possible causes:
* <br> 1. Mandatory parameters are left unspecified.
* <br> 2. Incorrect parameters types.
* <br> 3. Parameter verification failed.
* @syscap SystemCapability.Communication.NFC.Tag
* @since 9
*/
@ -1335,7 +1422,10 @@ declare namespace tag {
*
* @param { string } uri - Uri data for new NDEF record.
* @returns { NdefRecord } The instance of NdefRecord.
* @throws { BusinessError } 401 - The parameter check failed.
* @throws { BusinessError } 401 - The parameter check failed. Possible causes:
* <br> 1. Mandatory parameters are left unspecified.
* <br> 2. Incorrect parameters types.
* <br> 3. Parameter verification failed.
* @syscap SystemCapability.Communication.NFC.Tag
* @atomicservice
* @since 12
@ -1348,7 +1438,10 @@ declare namespace tag {
* @param { string } text - Text data for new an NDEF record.
* @param { string } locale - Language code for the NDEF record. if locale is null, use default locale.
* @returns { NdefRecord } The instance of NdefRecord.
* @throws { BusinessError } 401 - The parameter check failed.
* @throws { BusinessError } 401 - The parameter check failed. Possible causes:
* <br> 1. Mandatory parameters are left unspecified.
* <br> 2. Incorrect parameters types.
* <br> 3. Parameter verification failed.
* @syscap SystemCapability.Communication.NFC.Tag
* @since 9
*/
@ -1358,7 +1451,10 @@ declare namespace tag {
* @param { string } text - Text data for new an NDEF record.
* @param { string } locale - Language code for the NDEF record. if locale is null, use default locale.
* @returns { NdefRecord } The instance of NdefRecord.
* @throws { BusinessError } 401 - The parameter check failed.
* @throws { BusinessError } 401 - The parameter check failed. Possible causes:
* <br> 1. Mandatory parameters are left unspecified.
* <br> 2. Incorrect parameters types.
* <br> 3. Parameter verification failed.
* @syscap SystemCapability.Communication.NFC.Tag
* @atomicservice
* @since 12
@ -1371,7 +1467,10 @@ declare namespace tag {
* @param { string } mimeType type of mime data for new an NDEF record.
* @param { number[] } mimeData mime data for new an NDEF record.
* @returns { NdefRecord } The instance of NdefRecord.
* @throws { BusinessError } 401 - The parameter check failed.
* @throws { BusinessError } 401 - The parameter check failed. Possible causes:
* <br> 1. Mandatory parameters are left unspecified.
* <br> 2. Incorrect parameters types.
* <br> 3. Parameter verification failed.
* @syscap SystemCapability.Communication.NFC.Tag
* @since 9
*/
@ -1381,7 +1480,10 @@ declare namespace tag {
* @param { string } mimeType type of mime data for new an NDEF record.
* @param { number[] } mimeData mime data for new an NDEF record.
* @returns { NdefRecord } The instance of NdefRecord.
* @throws { BusinessError } 401 - The parameter check failed.
* @throws { BusinessError } 401 - The parameter check failed. Possible causes:
* <br> 1. Mandatory parameters are left unspecified.
* <br> 2. Incorrect parameters types.
* <br> 3. Parameter verification failed.
* @syscap SystemCapability.Communication.NFC.Tag
* @atomicservice
* @since 12
@ -1395,7 +1497,10 @@ declare namespace tag {
* @param { string } type - Domain specific type of data for the external data.
* @param { number[] } externalData - Data payload of an NDEF record.
* @returns { NdefRecord } The instance of NdefRecord.
* @throws { BusinessError } 401 - The parameter check failed.
* @throws { BusinessError } 401 - The parameter check failed. Possible causes:
* <br> 1. Mandatory parameters are left unspecified.
* <br> 2. Incorrect parameters types.
* <br> 3. Parameter verification failed.
* @syscap SystemCapability.Communication.NFC.Tag
* @since 9
*/
@ -1406,7 +1511,10 @@ declare namespace tag {
* @param { string } type - Domain specific type of data for the external data.
* @param { number[] } externalData - Data payload of an NDEF record.
* @returns { NdefRecord } The instance of NdefRecord.
* @throws { BusinessError } 401 - The parameter check failed.
* @throws { BusinessError } 401 - The parameter check failed. Possible causes:
* <br> 1. Mandatory parameters are left unspecified.
* <br> 2. Incorrect parameters types.
* <br> 3. Parameter verification failed.
* @syscap SystemCapability.Communication.NFC.Tag
* @atomicservice
* @since 12
@ -1417,7 +1525,10 @@ declare namespace tag {
*
* @param { number[] } data - The raw bytes to parse NDEF message.
* @returns { NdefMessage } The instance of NdefMessage.
* @throws { BusinessError } 401 - The parameter check failed.
* @throws { BusinessError } 401 - The parameter check failed. Possible causes:
* <br> 1. Mandatory parameters are left unspecified.
* <br> 2. Incorrect parameters types.
* <br> 3. Parameter verification failed.
* @syscap SystemCapability.Communication.NFC.Tag
* @since 9
*/
@ -1426,7 +1537,10 @@ declare namespace tag {
*
* @param { number[] } data - The raw bytes to parse NDEF message.
* @returns { NdefMessage } The instance of NdefMessage.
* @throws { BusinessError } 401 - The parameter check failed.
* @throws { BusinessError } 401 - The parameter check failed. Possible causes:
* <br> 1. Mandatory parameters are left unspecified.
* <br> 2. Incorrect parameters types.
* <br> 3. Parameter verification failed.
* @syscap SystemCapability.Communication.NFC.Tag
* @atomicservice
* @since 12
@ -1438,7 +1552,10 @@ declare namespace tag {
*
* @param { NdefRecord[] } ndefRecords - The NDEF records to parse NDEF message.
* @returns { NdefMessage } The instance of NdefMessage.
* @throws { BusinessError } 401 - The parameter check failed.
* @throws { BusinessError } 401 - The parameter check failed. Possible causes:
* <br> 1. Mandatory parameters are left unspecified.
* <br> 2. Incorrect parameters types.
* <br> 3. Parameter verification failed.
* @syscap SystemCapability.Communication.NFC.Tag
* @since 9
*/
@ -1447,7 +1564,10 @@ declare namespace tag {
*
* @param { NdefRecord[] } ndefRecords - The NDEF records to parse NDEF message.
* @returns { NdefMessage } The instance of NdefMessage.
* @throws { BusinessError } 401 - The parameter check failed.
* @throws { BusinessError } 401 - The parameter check failed. Possible causes:
* <br> 1. Mandatory parameters are left unspecified.
* <br> 2. Incorrect parameters types.
* <br> 3. Parameter verification failed.
* @syscap SystemCapability.Communication.NFC.Tag
* @atomicservice
* @since 12
@ -1468,7 +1588,10 @@ declare namespace tag {
*
* @param { NdefMessage } ndefMessage - An NDEF message to parse.
* @returns { number[] } Returns the raw bytes of an NDEF message.
* @throws { BusinessError } 401 - The parameter check failed.
* @throws { BusinessError } 401 - The parameter check failed. Possible causes:
* <br> 1. Mandatory parameters are left unspecified.
* <br> 2. Incorrect parameters types.
* <br> 3. Parameter verification failed.
* @syscap SystemCapability.Communication.NFC.Tag
* @atomicservice
* @since 12

View File

@ -37,7 +37,10 @@ declare namespace omapi {
* @param { 'serviceState' } type nfc serviceState
* @param { Callback<ServiceState> } callback - The callback to return the service.
* @returns { SEService } The new SEService instance.
* @throws { BusinessError } 401 - The parameter check failed.
* @throws { BusinessError } 401 - The parameter check failed. Possible causes:
* <br> 1. Mandatory parameters are left unspecified.
* <br> 2. Incorrect parameters types.
* <br> 3. Parameter verification failed.
* @throws { BusinessError } 801 - Capability not supported.
* @syscap SystemCapability.Communication.SecureElement
* @since 10
@ -232,7 +235,10 @@ declare namespace omapi {
* @param { number[] } aid - The AID of the applet to be selected on this channel, as a byte array,
* or Null if no applet is to be selected.
* @returns { Promise<Channel> } An instance of channel if available. Null if the SE is unable to provide.
* @throws { BusinessError } 401 - The parameter check failed.
* @throws { BusinessError } 401 - The parameter check failed. Possible causes:
* <br> 1. Mandatory parameters are left unspecified.
* <br> 2. Incorrect parameters types.
* <br> 3. Parameter verification failed.
* @throws { BusinessError } 801 - Capability not supported.
* @throws { BusinessError } 3300101 - IllegalStateError, an attempt is made to use an SE session that has been closed.
* @throws { BusinessError } 3300102 - NoSuchElementError, the AID on the SE is not available or cannot be selected.
@ -250,7 +256,10 @@ declare namespace omapi {
* @param { number[] } aid - The AID of the applet to be selected on this channel, as a byte array,
* or Null if no applet is to be selected.
* @param { AsyncCallback<Channel> } callback - The callback to return the Channel object. Null if the SE is unable to provide.
* @throws { BusinessError } 401 - The parameter check failed.
* @throws { BusinessError } 401 - The parameter check failed. Possible causes:
* <br> 1. Mandatory parameters are left unspecified.
* <br> 2. Incorrect parameters types.
* <br> 3. Parameter verification failed.
* @throws { BusinessError } 801 - Capability not supported.
* @throws { BusinessError } 3300101 - IllegalStateError, an attempt is made to use an SE session that has been closed.
* @throws { BusinessError } 3300102 - NoSuchElementError, the AID on the SE is not available or cannot be selected.
@ -275,7 +284,10 @@ declare namespace omapi {
* or Null if no applet is to be selected.
* @param { number } p2 - The P2 parameter of the SELECT APDU executed on this channel.
* @returns { Promise<Channel> } An instance of channel if available. Null if the SE is unable to provide.
* @throws { BusinessError } 401 - The parameter check failed.
* @throws { BusinessError } 401 - The parameter check failed. Possible causes:
* <br> 1. Mandatory parameters are left unspecified.
* <br> 2. Incorrect parameters types.
* <br> 3. Parameter verification failed.
* @throws { BusinessError } 801 - Capability not supported.
* @throws { BusinessError } 3300101 - IllegalStateError, an attempt is made to use an SE session that has been closed.
* @throws { BusinessError } 3300102 - NoSuchElementError, the AID on the SE is not available or cannot be selected.
@ -300,7 +312,10 @@ declare namespace omapi {
* or Null if no applet is to be selected.
* @param { number } p2 - The P2 parameter of the SELECT APDU executed on this channel.
* @param { AsyncCallback<Channel> } callback - The callback to return the Channel object. Null if the SE is unable to provide.
* @throws { BusinessError } 401 - The parameter check failed.
* @throws { BusinessError } 401 - The parameter check failed. Possible causes:
* <br> 1. Mandatory parameters are left unspecified.
* <br> 2. Incorrect parameters types.
* <br> 3. Parameter verification failed.
* @throws { BusinessError } 801 - Capability not supported.
* @throws { BusinessError } 3300101 - IllegalStateError, an attempt is made to use an SE session that has been closed.
* @throws { BusinessError } 3300102 - NoSuchElementError, the AID on the SE is not available or cannot be selected.
@ -318,7 +333,10 @@ declare namespace omapi {
* @param { number[] } aid - The AID of the applet to be selected on this channel, as a byte array.
* @returns { Promise<Channel> } An instance of channel if available. Null if the SE is unable to provide.
* A new logical channel or is unable to retrieve Access Control rules due to the lack of an available logical channel.
* @throws { BusinessError } 401 - The parameter check failed.
* @throws { BusinessError } 401 - The parameter check failed. Possible causes:
* <br> 1. Mandatory parameters are left unspecified.
* <br> 2. Incorrect parameters types.
* <br> 3. Parameter verification failed.
* @throws { BusinessError } 801 - Capability not supported.
* @throws { BusinessError } 3300101 - IllegalStateError, an attempt is made to use an SE session that has been closed.
* @throws { BusinessError } 3300102 - NoSuchElementError, the AID on the SE is not available or cannot be selected or
@ -337,7 +355,10 @@ declare namespace omapi {
* @param { number[] } aid - The AID of the applet to be selected on this channel, as a byte array.
* @param { AsyncCallback<Channel> } callback - The callback to return the Channel object. Null if the SE is unable to provide.
* A new logical channel or is unable to retrieve Access Control rules due to the lack of an available logical channel.
* @throws { BusinessError } 401 - The parameter check failed.
* @throws { BusinessError } 401 - The parameter check failed. Possible causes:
* <br> 1. Mandatory parameters are left unspecified.
* <br> 2. Incorrect parameters types.
* <br> 3. Parameter verification failed.
* @throws { BusinessError } 801 - Capability not supported.
* @throws { BusinessError } 3300101 - IllegalStateError, an attempt is made to use an SE session that has been closed.
* @throws { BusinessError } 3300102 - NoSuchElementError, the AID on the SE is not available or cannot be selected or
@ -363,7 +384,10 @@ declare namespace omapi {
* @param { number } p2 - The P2 parameter of the SELECT APDU executed on this channel.
* @returns { Promise<Channel> } An instance of channel if available. Null if the SE is unable to provide.
* A new logical channel or is unable to retrieve Access Control rules due to the lack of an available logical channel.
* @throws { BusinessError } 401 - The parameter check failed.
* @throws { BusinessError } 401 - The parameter check failed. Possible causes:
* <br> 1. Mandatory parameters are left unspecified.
* <br> 2. Incorrect parameters types.
* <br> 3. Parameter verification failed.
* @throws { BusinessError } 801 - Capability not supported.
* @throws { BusinessError } 3300101 - IllegalStateError, an attempt is made to use an SE session that has been closed.
* @throws { BusinessError } 3300102 - NoSuchElementError, the AID on the SE is not available or cannot be selected or
@ -388,7 +412,10 @@ declare namespace omapi {
* @param { number[] } aid - The AID of the applet to be selected on this channel, as a byte array.
* @param { number } p2 - The P2 parameter of the SELECT APDU executed on this channel.
* @param { AsyncCallback<Channel> } callback - The callback to return the instance of channel. Null if the SE is unable to provide.
* @throws { BusinessError } 401 - The parameter check failed.
* @throws { BusinessError } 401 - The parameter check failed. Possible causes:
* <br> 1. Mandatory parameters are left unspecified.
* <br> 2. Incorrect parameters types.
* <br> 3. Parameter verification failed.
* @throws { BusinessError } 801 - Capability not supported.
* @throws { BusinessError } 3300101 - IllegalStateError, an attempt is made to use an SE session that has been closed.
* @throws { BusinessError } 3300102 - NoSuchElementError, the AID on the SE is not available or cannot be selected or
@ -465,7 +492,10 @@ declare namespace omapi {
*
* @param { number[] } command - The APDU command to be transmitted, as a byte array.
* @returns { Promise<number[]> } The response received, as a byte array.
* @throws { BusinessError } 401 - The parameter check failed.
* @throws { BusinessError } 401 - The parameter check failed. Possible causes:
* <br> 1. Mandatory parameters are left unspecified.
* <br> 2. Incorrect parameters types.
* <br> 3. Parameter verification failed.
* @throws { BusinessError } 801 - Capability not supported.
* @throws { BusinessError } 3300101 - IllegalStateError, an attempt is made to use an SE session or channel that has been closed.
* @throws { BusinessError } 3300103 - SecurityError, the command is filtered by the security policy.
@ -480,7 +510,10 @@ declare namespace omapi {
*
* @param { number[] } command - The APDU command to be transmitted, as a byte array.
* @param { AsyncCallback<number[]> } callback - The callback to return the response received, as a byte array.
* @throws { BusinessError } 401 - The parameter check failed.
* @throws { BusinessError } 401 - The parameter check failed. Possible causes:
* <br> 1. Mandatory parameters are left unspecified.
* <br> 2. Incorrect parameters types.
* <br> 3. Parameter verification failed.
* @throws { BusinessError } 801 - Capability not supported.
* @throws { BusinessError } 3300101 - IllegalStateError, an attempt is made to use an SE session or channel that has been closed.
* @throws { BusinessError } 3300103 - SecurityError, the command is filtered by the security policy.

340
api/tag/nfctech.d.ts vendored
View File

@ -302,7 +302,10 @@ export interface IsoDepTag extends TagSession {
* @permission ohos.permission.NFC_TAG
* @returns { Promise<boolean> } Returns true if extended apdu length supported, otherwise false.
* @throws { BusinessError } 201 - Permission denied.
* @throws { BusinessError } 401 - The parameter check failed.
* @throws { BusinessError } 401 - The parameter check failed. Possible causes:
* <br> 1. Mandatory parameters are left unspecified.
* <br> 2. Incorrect parameters types.
* <br> 3. Parameter verification failed.
* @throws { BusinessError } 3100201 - Tag running state is abnormal in service.
* @syscap SystemCapability.Communication.NFC.Tag
* @since 9
@ -313,7 +316,10 @@ export interface IsoDepTag extends TagSession {
* @permission ohos.permission.NFC_TAG
* @returns { Promise<boolean> } Returns true if extended apdu length supported, otherwise false.
* @throws { BusinessError } 201 - Permission denied.
* @throws { BusinessError } 401 - The parameter check failed.
* @throws { BusinessError } 401 - The parameter check failed. Possible causes:
* <br> 1. Mandatory parameters are left unspecified.
* <br> 2. Incorrect parameters types.
* <br> 3. Parameter verification failed.
* @throws { BusinessError } 3100201 - Tag running state is abnormal in service.
* @throws { BusinessError } 3100204 - Tag I/O operation failed.
* @syscap SystemCapability.Communication.NFC.Tag
@ -328,7 +334,10 @@ export interface IsoDepTag extends TagSession {
* @permission ohos.permission.NFC_TAG
* @param { AsyncCallback<boolean> } callback The callback.
* @throws { BusinessError } 201 - Permission denied.
* @throws { BusinessError } 401 - The parameter check failed.
* @throws { BusinessError } 401 - The parameter check failed. Possible causes:
* <br> 1. Mandatory parameters are left unspecified.
* <br> 2. Incorrect parameters types.
* <br> 3. Parameter verification failed.
* @throws { BusinessError } 3100201 - Tag running state is abnormal in service.
* @syscap SystemCapability.Communication.NFC.Tag
* @since 9
@ -339,7 +348,10 @@ export interface IsoDepTag extends TagSession {
* @permission ohos.permission.NFC_TAG
* @param { AsyncCallback<boolean> } callback The callback.
* @throws { BusinessError } 201 - Permission denied.
* @throws { BusinessError } 401 - The parameter check failed.
* @throws { BusinessError } 401 - The parameter check failed. Possible causes:
* <br> 1. Mandatory parameters are left unspecified.
* <br> 2. Incorrect parameters types.
* <br> 3. Parameter verification failed.
* @throws { BusinessError } 3100201 - Tag running state is abnormal in service.
* @throws { BusinessError } 3100204 - Tag I/O operation failed.
* @syscap SystemCapability.Communication.NFC.Tag
@ -456,7 +468,10 @@ export interface NdefTag extends TagSession {
* @permission ohos.permission.NFC_TAG
* @returns { Promise<NdefMessage> } The NDEF message in tag.
* @throws { BusinessError } 201 - Permission denied.
* @throws { BusinessError } 401 - The parameter check failed.
* @throws { BusinessError } 401 - The parameter check failed. Possible causes:
* <br> 1. Mandatory parameters are left unspecified.
* <br> 2. Incorrect parameters types.
* <br> 3. Parameter verification failed.
* @throws { BusinessError } 3100201 - Tag running state is abnormal in service.
* @syscap SystemCapability.Communication.NFC.Tag
* @since 9
@ -467,7 +482,10 @@ export interface NdefTag extends TagSession {
* @permission ohos.permission.NFC_TAG
* @returns { Promise<NdefMessage> } The NDEF message in tag.
* @throws { BusinessError } 201 - Permission denied.
* @throws { BusinessError } 401 - The parameter check failed.
* @throws { BusinessError } 401 - The parameter check failed. Possible causes:
* <br> 1. Mandatory parameters are left unspecified.
* <br> 2. Incorrect parameters types.
* <br> 3. Parameter verification failed.
* @throws { BusinessError } 3100201 - Tag running state is abnormal in service.
* @throws { BusinessError } 3100204 - Tag I/O operation failed.
* @syscap SystemCapability.Communication.NFC.Tag
@ -482,7 +500,10 @@ export interface NdefTag extends TagSession {
* @permission ohos.permission.NFC_TAG
* @param { AsyncCallback<NdefMessage> } callback The callback.
* @throws { BusinessError } 201 - Permission denied.
* @throws { BusinessError } 401 - The parameter check failed.
* @throws { BusinessError } 401 - The parameter check failed. Possible causes:
* <br> 1. Mandatory parameters are left unspecified.
* <br> 2. Incorrect parameters types.
* <br> 3. Parameter verification failed.
* @throws { BusinessError } 3100201 - Tag running state is abnormal in service.
* @syscap SystemCapability.Communication.NFC.Tag
* @since 9
@ -493,7 +514,10 @@ export interface NdefTag extends TagSession {
* @permission ohos.permission.NFC_TAG
* @param { AsyncCallback<NdefMessage> } callback The callback.
* @throws { BusinessError } 201 - Permission denied.
* @throws { BusinessError } 401 - The parameter check failed.
* @throws { BusinessError } 401 - The parameter check failed. Possible causes:
* <br> 1. Mandatory parameters are left unspecified.
* <br> 2. Incorrect parameters types.
* <br> 3. Parameter verification failed.
* @throws { BusinessError } 3100201 - Tag running state is abnormal in service.
* @throws { BusinessError } 3100204 - Tag I/O operation failed.
* @syscap SystemCapability.Communication.NFC.Tag
@ -509,7 +533,10 @@ export interface NdefTag extends TagSession {
* @param { NdefMessage } msg - The NDEF message to be written.
* @returns { Promise<void> } The void
* @throws { BusinessError } 201 - Permission denied.
* @throws { BusinessError } 401 - The parameter check failed.
* @throws { BusinessError } 401 - The parameter check failed. Possible causes:
* <br> 1. Mandatory parameters are left unspecified.
* <br> 2. Incorrect parameters types.
* <br> 3. Parameter verification failed.
* @throws { BusinessError } 3100201 - Tag running state is abnormal in service.
* @syscap SystemCapability.Communication.NFC.Tag
* @since 9
@ -521,7 +548,10 @@ export interface NdefTag extends TagSession {
* @param { NdefMessage } msg - The NDEF message to be written.
* @returns { Promise<void> } The void
* @throws { BusinessError } 201 - Permission denied.
* @throws { BusinessError } 401 - The parameter check failed.
* @throws { BusinessError } 401 - The parameter check failed. Possible causes:
* <br> 1. Mandatory parameters are left unspecified.
* <br> 2. Incorrect parameters types.
* <br> 3. Parameter verification failed.
* @throws { BusinessError } 3100201 - Tag running state is abnormal in service.
* @throws { BusinessError } 3100204 - Tag I/O operation failed.
* @syscap SystemCapability.Communication.NFC.Tag
@ -537,7 +567,10 @@ export interface NdefTag extends TagSession {
* @param { NdefMessage } msg - The NDEF message to be written.
* @param { AsyncCallback<void> } callback The callback.
* @throws { BusinessError } 201 - Permission denied.
* @throws { BusinessError } 401 - The parameter check failed.
* @throws { BusinessError } 401 - The parameter check failed. Possible causes:
* <br> 1. Mandatory parameters are left unspecified.
* <br> 2. Incorrect parameters types.
* <br> 3. Parameter verification failed.
* @throws { BusinessError } 3100201 - Tag running state is abnormal in service.
* @syscap SystemCapability.Communication.NFC.Tag
* @since 9
@ -549,7 +582,10 @@ export interface NdefTag extends TagSession {
* @param { NdefMessage } msg - The NDEF message to be written.
* @param { AsyncCallback<void> } callback The callback.
* @throws { BusinessError } 201 - Permission denied.
* @throws { BusinessError } 401 - The parameter check failed.
* @throws { BusinessError } 401 - The parameter check failed. Possible causes:
* <br> 1. Mandatory parameters are left unspecified.
* <br> 2. Incorrect parameters types.
* <br> 3. Parameter verification failed.
* @throws { BusinessError } 3100201 - Tag running state is abnormal in service.
* @throws { BusinessError } 3100204 - Tag I/O operation failed.
* @syscap SystemCapability.Communication.NFC.Tag
@ -587,7 +623,10 @@ export interface NdefTag extends TagSession {
* @permission ohos.permission.NFC_TAG
* @returns { Promise<void> } The void
* @throws { BusinessError } 201 - Permission denied.
* @throws { BusinessError } 401 - The parameter check failed.
* @throws { BusinessError } 401 - The parameter check failed. Possible causes:
* <br> 1. Mandatory parameters are left unspecified.
* <br> 2. Incorrect parameters types.
* <br> 3. Parameter verification failed.
* @throws { BusinessError } 3100201 - Tag running state is abnormal in service.
* @syscap SystemCapability.Communication.NFC.Tag
* @since 9
@ -598,7 +637,10 @@ export interface NdefTag extends TagSession {
* @permission ohos.permission.NFC_TAG
* @returns { Promise<void> } The void
* @throws { BusinessError } 201 - Permission denied.
* @throws { BusinessError } 401 - The parameter check failed.
* @throws { BusinessError } 401 - The parameter check failed. Possible causes:
* <br> 1. Mandatory parameters are left unspecified.
* <br> 2. Incorrect parameters types.
* <br> 3. Parameter verification failed.
* @throws { BusinessError } 3100201 - Tag running state is abnormal in service.
* @throws { BusinessError } 3100204 - Tag I/O operation failed.
* @syscap SystemCapability.Communication.NFC.Tag
@ -613,7 +655,10 @@ export interface NdefTag extends TagSession {
* @permission ohos.permission.NFC_TAG
* @param { AsyncCallback<void> } callback The callback.
* @throws { BusinessError } 201 - Permission denied.
* @throws { BusinessError } 401 - The parameter check failed.
* @throws { BusinessError } 401 - The parameter check failed. Possible causes:
* <br> 1. Mandatory parameters are left unspecified.
* <br> 2. Incorrect parameters types.
* <br> 3. Parameter verification failed.
* @throws { BusinessError } 3100201 - Tag running state is abnormal in service.
* @syscap SystemCapability.Communication.NFC.Tag
* @since 9
@ -624,7 +669,10 @@ export interface NdefTag extends TagSession {
* @permission ohos.permission.NFC_TAG
* @param { AsyncCallback<void> } callback The callback.
* @throws { BusinessError } 201 - Permission denied.
* @throws { BusinessError } 401 - The parameter check failed.
* @throws { BusinessError } 401 - The parameter check failed. Possible causes:
* <br> 1. Mandatory parameters are left unspecified.
* <br> 2. Incorrect parameters types.
* <br> 3. Parameter verification failed.
* @throws { BusinessError } 3100201 - Tag running state is abnormal in service.
* @throws { BusinessError } 3100204 - Tag I/O operation failed.
* @syscap SystemCapability.Communication.NFC.Tag
@ -638,7 +686,10 @@ export interface NdefTag extends TagSession {
*
* @param { tag.NfcForumType } type - NFC forum type of NDEF tag.
* @returns { string } The NFC forum string type.
* @throws { BusinessError } 401 - The parameter check failed.
* @throws { BusinessError } 401 - The parameter check failed. Possible causes:
* <br> 1. Mandatory parameters are left unspecified.
* <br> 2. Incorrect parameters types.
* <br> 3. Parameter verification failed.
* @syscap SystemCapability.Communication.NFC.Tag
* @since 9
*/
@ -647,7 +698,10 @@ export interface NdefTag extends TagSession {
*
* @param { tag.NfcForumType } type - NFC forum type of NDEF tag.
* @returns { string } The NFC forum string type.
* @throws { BusinessError } 401 - The parameter check failed.
* @throws { BusinessError } 401 - The parameter check failed. Possible causes:
* <br> 1. Mandatory parameters are left unspecified.
* <br> 2. Incorrect parameters types.
* <br> 3. Parameter verification failed.
* @syscap SystemCapability.Communication.NFC.Tag
* @atomicservice
* @since 12
@ -680,7 +734,10 @@ export interface MifareClassicTag extends TagSession {
* @param { boolean } isKeyA - KeyA flag. true means KeyA, otherwise KeyB.
* @returns { Promise<void> } The void
* @throws { BusinessError } 201 - Permission denied.
* @throws { BusinessError } 401 - The parameter check failed.
* @throws { BusinessError } 401 - The parameter check failed. Possible causes:
* <br> 1. Mandatory parameters are left unspecified.
* <br> 2. Incorrect parameters types.
* <br> 3. Parameter verification failed.
* @throws { BusinessError } 3100201 - Tag running state is abnormal in service.
* @syscap SystemCapability.Communication.NFC.Tag
* @since 9
@ -694,7 +751,10 @@ export interface MifareClassicTag extends TagSession {
* @param { boolean } isKeyA - KeyA flag. true means KeyA, otherwise KeyB.
* @returns { Promise<void> } The void
* @throws { BusinessError } 201 - Permission denied.
* @throws { BusinessError } 401 - The parameter check failed.
* @throws { BusinessError } 401 - The parameter check failed. Possible causes:
* <br> 1. Mandatory parameters are left unspecified.
* <br> 2. Incorrect parameters types.
* <br> 3. Parameter verification failed.
* @throws { BusinessError } 3100201 - Tag running state is abnormal in service.
* @throws { BusinessError } 3100204 - Tag I/O operation failed.
* @syscap SystemCapability.Communication.NFC.Tag
@ -712,7 +772,10 @@ export interface MifareClassicTag extends TagSession {
* @param { boolean } isKeyA - KeyA flag. true means KeyA, otherwise KeyB.
* @param { AsyncCallback<void> } callback The callback.
* @throws { BusinessError } 201 - Permission denied.
* @throws { BusinessError } 401 - The parameter check failed.
* @throws { BusinessError } 401 - The parameter check failed. Possible causes:
* <br> 1. Mandatory parameters are left unspecified.
* <br> 2. Incorrect parameters types.
* <br> 3. Parameter verification failed.
* @throws { BusinessError } 3100201 - Tag running state is abnormal in service.
* @syscap SystemCapability.Communication.NFC.Tag
* @since 9
@ -726,7 +789,10 @@ export interface MifareClassicTag extends TagSession {
* @param { boolean } isKeyA - KeyA flag. true means KeyA, otherwise KeyB.
* @param { AsyncCallback<void> } callback The callback.
* @throws { BusinessError } 201 - Permission denied.
* @throws { BusinessError } 401 - The parameter check failed.
* @throws { BusinessError } 401 - The parameter check failed. Possible causes:
* <br> 1. Mandatory parameters are left unspecified.
* <br> 2. Incorrect parameters types.
* <br> 3. Parameter verification failed.
* @throws { BusinessError } 3100201 - Tag running state is abnormal in service.
* @throws { BusinessError } 3100204 - Tag I/O operation failed.
* @syscap SystemCapability.Communication.NFC.Tag
@ -742,7 +808,10 @@ export interface MifareClassicTag extends TagSession {
* @param { number } blockIndex - The index of block to read.
* @returns { Promise<number[]> } Returns the block data.
* @throws { BusinessError } 201 - Permission denied.
* @throws { BusinessError } 401 - The parameter check failed.
* @throws { BusinessError } 401 - The parameter check failed. Possible causes:
* <br> 1. Mandatory parameters are left unspecified.
* <br> 2. Incorrect parameters types.
* <br> 3. Parameter verification failed.
* @throws { BusinessError } 3100201 - Tag running state is abnormal in service.
* @syscap SystemCapability.Communication.NFC.Tag
* @since 9
@ -754,7 +823,10 @@ export interface MifareClassicTag extends TagSession {
* @param { number } blockIndex - The index of block to read.
* @returns { Promise<number[]> } Returns the block data.
* @throws { BusinessError } 201 - Permission denied.
* @throws { BusinessError } 401 - The parameter check failed.
* @throws { BusinessError } 401 - The parameter check failed. Possible causes:
* <br> 1. Mandatory parameters are left unspecified.
* <br> 2. Incorrect parameters types.
* <br> 3. Parameter verification failed.
* @throws { BusinessError } 3100201 - Tag running state is abnormal in service.
* @throws { BusinessError } 3100204 - Tag I/O operation failed.
* @syscap SystemCapability.Communication.NFC.Tag
@ -770,7 +842,10 @@ export interface MifareClassicTag extends TagSession {
* @param { number } blockIndex - The index of block to read.
* @param { AsyncCallback<number[]> } callback The callback.
* @throws { BusinessError } 201 - Permission denied.
* @throws { BusinessError } 401 - The parameter check failed.
* @throws { BusinessError } 401 - The parameter check failed. Possible causes:
* <br> 1. Mandatory parameters are left unspecified.
* <br> 2. Incorrect parameters types.
* <br> 3. Parameter verification failed.
* @throws { BusinessError } 3100201 - Tag running state is abnormal in service.
* @syscap SystemCapability.Communication.NFC.Tag
* @since 9
@ -782,7 +857,10 @@ export interface MifareClassicTag extends TagSession {
* @param { number } blockIndex - The index of block to read.
* @param { AsyncCallback<number[]> } callback The callback.
* @throws { BusinessError } 201 - Permission denied.
* @throws { BusinessError } 401 - The parameter check failed.
* @throws { BusinessError } 401 - The parameter check failed. Possible causes:
* <br> 1. Mandatory parameters are left unspecified.
* <br> 2. Incorrect parameters types.
* <br> 3. Parameter verification failed.
* @throws { BusinessError } 3100201 - Tag running state is abnormal in service.
* @throws { BusinessError } 3100204 - Tag I/O operation failed.
* @syscap SystemCapability.Communication.NFC.Tag
@ -799,7 +877,10 @@ export interface MifareClassicTag extends TagSession {
* @param { number[] } data - The block data to write.
* @returns { Promise<void> } The void
* @throws { BusinessError } 201 - Permission denied.
* @throws { BusinessError } 401 - The parameter check failed.
* @throws { BusinessError } 401 - The parameter check failed. Possible causes:
* <br> 1. Mandatory parameters are left unspecified.
* <br> 2. Incorrect parameters types.
* <br> 3. Parameter verification failed.
* @throws { BusinessError } 3100201 - Tag running state is abnormal in service.
* @syscap SystemCapability.Communication.NFC.Tag
* @since 9
@ -812,7 +893,10 @@ export interface MifareClassicTag extends TagSession {
* @param { number[] } data - The block data to write.
* @returns { Promise<void> } The void
* @throws { BusinessError } 201 - Permission denied.
* @throws { BusinessError } 401 - The parameter check failed.
* @throws { BusinessError } 401 - The parameter check failed. Possible causes:
* <br> 1. Mandatory parameters are left unspecified.
* <br> 2. Incorrect parameters types.
* <br> 3. Parameter verification failed.
* @throws { BusinessError } 3100201 - Tag running state is abnormal in service.
* @throws { BusinessError } 3100204 - Tag I/O operation failed.
* @syscap SystemCapability.Communication.NFC.Tag
@ -829,7 +913,10 @@ export interface MifareClassicTag extends TagSession {
* @param { number[] } data - The block data to write.
* @param { AsyncCallback<void> } callback The callback.
* @throws { BusinessError } 201 - Permission denied.
* @throws { BusinessError } 401 - The parameter check failed.
* @throws { BusinessError } 401 - The parameter check failed. Possible causes:
* <br> 1. Mandatory parameters are left unspecified.
* <br> 2. Incorrect parameters types.
* <br> 3. Parameter verification failed.
* @throws { BusinessError } 3100201 - Tag running state is abnormal in service.
* @syscap SystemCapability.Communication.NFC.Tag
* @since 9
@ -842,7 +929,10 @@ export interface MifareClassicTag extends TagSession {
* @param { number[] } data - The block data to write.
* @param { AsyncCallback<void> } callback The callback.
* @throws { BusinessError } 201 - Permission denied.
* @throws { BusinessError } 401 - The parameter check failed.
* @throws { BusinessError } 401 - The parameter check failed. Possible causes:
* <br> 1. Mandatory parameters are left unspecified.
* <br> 2. Incorrect parameters types.
* <br> 3. Parameter verification failed.
* @throws { BusinessError } 3100201 - Tag running state is abnormal in service.
* @throws { BusinessError } 3100204 - Tag I/O operation failed.
* @syscap SystemCapability.Communication.NFC.Tag
@ -859,7 +949,10 @@ export interface MifareClassicTag extends TagSession {
* @param { number } value - The value to increment, none-negative.
* @returns { Promise<void> } The void
* @throws { BusinessError } 201 - Permission denied.
* @throws { BusinessError } 401 - The parameter check failed.
* @throws { BusinessError } 401 - The parameter check failed. Possible causes:
* <br> 1. Mandatory parameters are left unspecified.
* <br> 2. Incorrect parameters types.
* <br> 3. Parameter verification failed.
* @throws { BusinessError } 3100201 - Tag running state is abnormal in service.
* @syscap SystemCapability.Communication.NFC.Tag
* @since 9
@ -872,7 +965,10 @@ export interface MifareClassicTag extends TagSession {
* @param { number } value - The value to increment, none-negative.
* @returns { Promise<void> } The void
* @throws { BusinessError } 201 - Permission denied.
* @throws { BusinessError } 401 - The parameter check failed.
* @throws { BusinessError } 401 - The parameter check failed. Possible causes:
* <br> 1. Mandatory parameters are left unspecified.
* <br> 2. Incorrect parameters types.
* <br> 3. Parameter verification failed.
* @throws { BusinessError } 3100201 - Tag running state is abnormal in service.
* @throws { BusinessError } 3100204 - Tag I/O operation failed.
* @syscap SystemCapability.Communication.NFC.Tag
@ -889,7 +985,10 @@ export interface MifareClassicTag extends TagSession {
* @param { number } value - The value to increment, none-negative.
* @param { AsyncCallback<void> } callback The callback.
* @throws { BusinessError } 201 - Permission denied.
* @throws { BusinessError } 401 - The parameter check failed.
* @throws { BusinessError } 401 - The parameter check failed. Possible causes:
* <br> 1. Mandatory parameters are left unspecified.
* <br> 2. Incorrect parameters types.
* <br> 3. Parameter verification failed.
* @throws { BusinessError } 3100201 - Tag running state is abnormal in service.
* @syscap SystemCapability.Communication.NFC.Tag
* @since 9
@ -902,7 +1001,10 @@ export interface MifareClassicTag extends TagSession {
* @param { number } value - The value to increment, none-negative.
* @param { AsyncCallback<void> } callback The callback.
* @throws { BusinessError } 201 - Permission denied.
* @throws { BusinessError } 401 - The parameter check failed.
* @throws { BusinessError } 401 - The parameter check failed. Possible causes:
* <br> 1. Mandatory parameters are left unspecified.
* <br> 2. Incorrect parameters types.
* <br> 3. Parameter verification failed.
* @throws { BusinessError } 3100201 - Tag running state is abnormal in service.
* @throws { BusinessError } 3100204 - Tag I/O operation failed.
* @syscap SystemCapability.Communication.NFC.Tag
@ -919,7 +1021,10 @@ export interface MifareClassicTag extends TagSession {
* @param { number } value - The value to decrease, none-negative.
* @returns { Promise<void> } The void
* @throws { BusinessError } 201 - Permission denied.
* @throws { BusinessError } 401 - The parameter check failed.
* @throws { BusinessError } 401 - The parameter check failed. Possible causes:
* <br> 1. Mandatory parameters are left unspecified.
* <br> 2. Incorrect parameters types.
* <br> 3. Parameter verification failed.
* @throws { BusinessError } 3100201 - Tag running state is abnormal in service.
* @syscap SystemCapability.Communication.NFC.Tag
* @since 9
@ -932,7 +1037,10 @@ export interface MifareClassicTag extends TagSession {
* @param { number } value - The value to decrease, none-negative.
* @returns { Promise<void> } The void
* @throws { BusinessError } 201 - Permission denied.
* @throws { BusinessError } 401 - The parameter check failed.
* @throws { BusinessError } 401 - The parameter check failed. Possible causes:
* <br> 1. Mandatory parameters are left unspecified.
* <br> 2. Incorrect parameters types.
* <br> 3. Parameter verification failed.
* @throws { BusinessError } 3100201 - Tag running state is abnormal in service.
* @throws { BusinessError } 3100204 - Tag I/O operation failed.
* @syscap SystemCapability.Communication.NFC.Tag
@ -949,7 +1057,10 @@ export interface MifareClassicTag extends TagSession {
* @param { number } value - The value to decrease, none-negative.
* @param { AsyncCallback<void> } callback The callback.
* @throws { BusinessError } 201 - Permission denied.
* @throws { BusinessError } 401 - The parameter check failed.
* @throws { BusinessError } 401 - The parameter check failed. Possible causes:
* <br> 1. Mandatory parameters are left unspecified.
* <br> 2. Incorrect parameters types.
* <br> 3. Parameter verification failed.
* @throws { BusinessError } 3100201 - Tag running state is abnormal in service.
* @syscap SystemCapability.Communication.NFC.Tag
* @since 9
@ -962,7 +1073,10 @@ export interface MifareClassicTag extends TagSession {
* @param { number } value - The value to decrease, none-negative.
* @param { AsyncCallback<void> } callback The callback.
* @throws { BusinessError } 201 - Permission denied.
* @throws { BusinessError } 401 - The parameter check failed.
* @throws { BusinessError } 401 - The parameter check failed. Possible causes:
* <br> 1. Mandatory parameters are left unspecified.
* <br> 2. Incorrect parameters types.
* <br> 3. Parameter verification failed.
* @throws { BusinessError } 3100201 - Tag running state is abnormal in service.
* @throws { BusinessError } 3100204 - Tag I/O operation failed.
* @syscap SystemCapability.Communication.NFC.Tag
@ -978,7 +1092,10 @@ export interface MifareClassicTag extends TagSession {
* @param { number } blockIndex - The index of value block to be written.
* @returns { Promise<void> } The void
* @throws { BusinessError } 201 - Permission denied.
* @throws { BusinessError } 401 - The parameter check failed.
* @throws { BusinessError } 401 - The parameter check failed. Possible causes:
* <br> 1. Mandatory parameters are left unspecified.
* <br> 2. Incorrect parameters types.
* <br> 3. Parameter verification failed.
* @throws { BusinessError } 3100201 - Tag running state is abnormal in service.
* @syscap SystemCapability.Communication.NFC.Tag
* @since 9
@ -990,7 +1107,10 @@ export interface MifareClassicTag extends TagSession {
* @param { number } blockIndex - The index of value block to be written.
* @returns { Promise<void> } The void
* @throws { BusinessError } 201 - Permission denied.
* @throws { BusinessError } 401 - The parameter check failed.
* @throws { BusinessError } 401 - The parameter check failed. Possible causes:
* <br> 1. Mandatory parameters are left unspecified.
* <br> 2. Incorrect parameters types.
* <br> 3. Parameter verification failed.
* @throws { BusinessError } 3100201 - Tag running state is abnormal in service.
* @throws { BusinessError } 3100204 - Tag I/O operation failed.
* @syscap SystemCapability.Communication.NFC.Tag
@ -1006,7 +1126,10 @@ export interface MifareClassicTag extends TagSession {
* @param { number } blockIndex - The index of value block to be written.
* @param { AsyncCallback<void> } callback The callback.
* @throws { BusinessError } 201 - Permission denied.
* @throws { BusinessError } 401 - The parameter check failed.
* @throws { BusinessError } 401 - The parameter check failed. Possible causes:
* <br> 1. Mandatory parameters are left unspecified.
* <br> 2. Incorrect parameters types.
* <br> 3. Parameter verification failed.
* @throws { BusinessError } 3100201 - Tag running state is abnormal in service.
* @syscap SystemCapability.Communication.NFC.Tag
* @since 9
@ -1018,7 +1141,10 @@ export interface MifareClassicTag extends TagSession {
* @param { number } blockIndex - The index of value block to be written.
* @param { AsyncCallback<void> } callback The callback.
* @throws { BusinessError } 201 - Permission denied.
* @throws { BusinessError } 401 - The parameter check failed.
* @throws { BusinessError } 401 - The parameter check failed. Possible causes:
* <br> 1. Mandatory parameters are left unspecified.
* <br> 2. Incorrect parameters types.
* <br> 3. Parameter verification failed.
* @throws { BusinessError } 3100201 - Tag running state is abnormal in service.
* @throws { BusinessError } 3100204 - Tag I/O operation failed.
* @syscap SystemCapability.Communication.NFC.Tag
@ -1034,7 +1160,10 @@ export interface MifareClassicTag extends TagSession {
* @param { number } blockIndex - The index of value block to be moved from.
* @returns { Promise<void> } The void
* @throws { BusinessError } 201 - Permission denied.
* @throws { BusinessError } 401 - The parameter check failed.
* @throws { BusinessError } 401 - The parameter check failed. Possible causes:
* <br> 1. Mandatory parameters are left unspecified.
* <br> 2. Incorrect parameters types.
* <br> 3. Parameter verification failed.
* @throws { BusinessError } 3100201 - Tag running state is abnormal in service.
* @syscap SystemCapability.Communication.NFC.Tag
* @since 9
@ -1046,7 +1175,10 @@ export interface MifareClassicTag extends TagSession {
* @param { number } blockIndex - The index of value block to be moved from.
* @returns { Promise<void> } The void
* @throws { BusinessError } 201 - Permission denied.
* @throws { BusinessError } 401 - The parameter check failed.
* @throws { BusinessError } 401 - The parameter check failed. Possible causes:
* <br> 1. Mandatory parameters are left unspecified.
* <br> 2. Incorrect parameters types.
* <br> 3. Parameter verification failed.
* @throws { BusinessError } 3100201 - Tag running state is abnormal in service.
* @throws { BusinessError } 3100204 - Tag I/O operation failed.
* @syscap SystemCapability.Communication.NFC.Tag
@ -1062,7 +1194,10 @@ export interface MifareClassicTag extends TagSession {
* @param { number } blockIndex - The index of value block to be moved from.
* @param { AsyncCallback<void> } callback The callback.
* @throws { BusinessError } 201 - Permission denied.
* @throws { BusinessError } 401 - The parameter check failed.
* @throws { BusinessError } 401 - The parameter check failed. Possible causes:
* <br> 1. Mandatory parameters are left unspecified.
* <br> 2. Incorrect parameters types.
* <br> 3. Parameter verification failed.
* @throws { BusinessError } 3100201 - Tag running state is abnormal in service.
* @syscap SystemCapability.Communication.NFC.Tag
* @since 9
@ -1074,7 +1209,10 @@ export interface MifareClassicTag extends TagSession {
* @param { number } blockIndex - The index of value block to be moved from.
* @param { AsyncCallback<void> } callback The callback.
* @throws { BusinessError } 201 - Permission denied.
* @throws { BusinessError } 401 - The parameter check failed.
* @throws { BusinessError } 401 - The parameter check failed. Possible causes:
* <br> 1. Mandatory parameters are left unspecified.
* <br> 2. Incorrect parameters types.
* <br> 3. Parameter verification failed.
* @throws { BusinessError } 3100201 - Tag running state is abnormal in service.
* @throws { BusinessError } 3100204 - Tag I/O operation failed.
* @syscap SystemCapability.Communication.NFC.Tag
@ -1105,7 +1243,10 @@ export interface MifareClassicTag extends TagSession {
*
* @param { number } sectorIndex - The index of sector.
* @returns { number } Returns the number of blocks.
* @throws { BusinessError } 401 - The parameter check failed.
* @throws { BusinessError } 401 - The parameter check failed. Possible causes:
* <br> 1. Mandatory parameters are left unspecified.
* <br> 2. Incorrect parameters types.
* <br> 3. Parameter verification failed.
* @syscap SystemCapability.Communication.NFC.Tag
* @since 9
*/
@ -1114,7 +1255,10 @@ export interface MifareClassicTag extends TagSession {
*
* @param { number } sectorIndex - The index of sector.
* @returns { number } Returns the number of blocks.
* @throws { BusinessError } 401 - The parameter check failed.
* @throws { BusinessError } 401 - The parameter check failed. Possible causes:
* <br> 1. Mandatory parameters are left unspecified.
* <br> 2. Incorrect parameters types.
* <br> 3. Parameter verification failed.
* @syscap SystemCapability.Communication.NFC.Tag
* @atomicservice
* @since 12
@ -1177,7 +1321,10 @@ export interface MifareClassicTag extends TagSession {
*
* @param { number } sectorIndex - The index of sector.
* @returns { number } Returns index of first block in the sector.
* @throws { BusinessError } 401 - The parameter check failed.
* @throws { BusinessError } 401 - The parameter check failed. Possible causes:
* <br> 1. Mandatory parameters are left unspecified.
* <br> 2. Incorrect parameters types.
* <br> 3. Parameter verification failed.
* @syscap SystemCapability.Communication.NFC.Tag
* @since 9
*/
@ -1186,7 +1333,10 @@ export interface MifareClassicTag extends TagSession {
*
* @param { number } sectorIndex - The index of sector.
* @returns { number } Returns index of first block in the sector.
* @throws { BusinessError } 401 - The parameter check failed.
* @throws { BusinessError } 401 - The parameter check failed. Possible causes:
* <br> 1. Mandatory parameters are left unspecified.
* <br> 2. Incorrect parameters types.
* <br> 3. Parameter verification failed.
* @syscap SystemCapability.Communication.NFC.Tag
* @atomicservice
* @since 12
@ -1198,7 +1348,10 @@ export interface MifareClassicTag extends TagSession {
*
* @param { number } blockIndex - The index of block.
* @returns { number } Returns the sector index.
* @throws { BusinessError } 401 - The parameter check failed.
* @throws { BusinessError } 401 - The parameter check failed. Possible causes:
* <br> 1. Mandatory parameters are left unspecified.
* <br> 2. Incorrect parameters types.
* <br> 3. Parameter verification failed.
* @syscap SystemCapability.Communication.NFC.Tag
* @since 9
*/
@ -1207,7 +1360,10 @@ export interface MifareClassicTag extends TagSession {
*
* @param { number } blockIndex - The index of block.
* @returns { number } Returns the sector index.
* @throws { BusinessError } 401 - The parameter check failed.
* @throws { BusinessError } 401 - The parameter check failed. Possible causes:
* <br> 1. Mandatory parameters are left unspecified.
* <br> 2. Incorrect parameters types.
* <br> 3. Parameter verification failed.
* @syscap SystemCapability.Communication.NFC.Tag
* @atomicservice
* @since 12
@ -1238,7 +1394,10 @@ export interface MifareUltralightTag extends TagSession {
* @param { number } pageIndex - The index of page to read.
* @returns { Promise<number[]> } Returns 4 pages data.
* @throws { BusinessError } 201 - Permission denied.
* @throws { BusinessError } 401 - The parameter check failed.
* @throws { BusinessError } 401 - The parameter check failed. Possible causes:
* <br> 1. Mandatory parameters are left unspecified.
* <br> 2. Incorrect parameters types.
* <br> 3. Parameter verification failed.
* @throws { BusinessError } 3100201 - Tag running state is abnormal in service.
* @syscap SystemCapability.Communication.NFC.Tag
* @since 9
@ -1250,7 +1409,10 @@ export interface MifareUltralightTag extends TagSession {
* @param { number } pageIndex - The index of page to read.
* @returns { Promise<number[]> } Returns 4 pages data.
* @throws { BusinessError } 201 - Permission denied.
* @throws { BusinessError } 401 - The parameter check failed.
* @throws { BusinessError } 401 - The parameter check failed. Possible causes:
* <br> 1. Mandatory parameters are left unspecified.
* <br> 2. Incorrect parameters types.
* <br> 3. Parameter verification failed.
* @throws { BusinessError } 3100201 - Tag running state is abnormal in service.
* @throws { BusinessError } 3100204 - Tag I/O operation failed.
* @syscap SystemCapability.Communication.NFC.Tag
@ -1266,7 +1428,10 @@ export interface MifareUltralightTag extends TagSession {
* @param { number } pageIndex - The index of page to read.
* @param { AsyncCallback<number[]> } callback The callback.
* @throws { BusinessError } 201 - Permission denied.
* @throws { BusinessError } 401 - The parameter check failed.
* @throws { BusinessError } 401 - The parameter check failed. Possible causes:
* <br> 1. Mandatory parameters are left unspecified.
* <br> 2. Incorrect parameters types.
* <br> 3. Parameter verification failed.
* @throws { BusinessError } 3100201 - Tag running state is abnormal in service.
* @syscap SystemCapability.Communication.NFC.Tag
* @since 9
@ -1278,7 +1443,10 @@ export interface MifareUltralightTag extends TagSession {
* @param { number } pageIndex - The index of page to read.
* @param { AsyncCallback<number[]> } callback The callback.
* @throws { BusinessError } 201 - Permission denied.
* @throws { BusinessError } 401 - The parameter check failed.
* @throws { BusinessError } 401 - The parameter check failed. Possible causes:
* <br> 1. Mandatory parameters are left unspecified.
* <br> 2. Incorrect parameters types.
* <br> 3. Parameter verification failed.
* @throws { BusinessError } 3100201 - Tag running state is abnormal in service.
* @throws { BusinessError } 3100204 - Tag I/O operation failed.
* @syscap SystemCapability.Communication.NFC.Tag
@ -1295,7 +1463,10 @@ export interface MifareUltralightTag extends TagSession {
* @param { number[] } data - The page data to write.
* @returns { Promise<void> } The void
* @throws { BusinessError } 201 - Permission denied.
* @throws { BusinessError } 401 - The parameter check failed.
* @throws { BusinessError } 401 - The parameter check failed. Possible causes:
* <br> 1. Mandatory parameters are left unspecified.
* <br> 2. Incorrect parameters types.
* <br> 3. Parameter verification failed.
* @throws { BusinessError } 3100201 - Tag running state is abnormal in service.
* @syscap SystemCapability.Communication.NFC.Tag
* @since 9
@ -1308,7 +1479,10 @@ export interface MifareUltralightTag extends TagSession {
* @param { number[] } data - The page data to write.
* @returns { Promise<void> } The void
* @throws { BusinessError } 201 - Permission denied.
* @throws { BusinessError } 401 - The parameter check failed.
* @throws { BusinessError } 401 - The parameter check failed. Possible causes:
* <br> 1. Mandatory parameters are left unspecified.
* <br> 2. Incorrect parameters types.
* <br> 3. Parameter verification failed.
* @throws { BusinessError } 3100201 - Tag running state is abnormal in service.
* @throws { BusinessError } 3100204 - Tag I/O operation failed.
* @syscap SystemCapability.Communication.NFC.Tag
@ -1325,7 +1499,10 @@ export interface MifareUltralightTag extends TagSession {
* @param { number[] } data - The page data to write.
* @param { AsyncCallback<void> } callback The callback.
* @throws { BusinessError } 201 - Permission denied.
* @throws { BusinessError } 401 - The parameter check failed.
* @throws { BusinessError } 401 - The parameter check failed. Possible causes:
* <br> 1. Mandatory parameters are left unspecified.
* <br> 2. Incorrect parameters types.
* <br> 3. Parameter verification failed.
* @throws { BusinessError } 3100201 - Tag running state is abnormal in service.
* @syscap SystemCapability.Communication.NFC.Tag
* @since 9
@ -1338,7 +1515,10 @@ export interface MifareUltralightTag extends TagSession {
* @param { number[] } data - The page data to write.
* @param { AsyncCallback<void> } callback The callback.
* @throws { BusinessError } 201 - Permission denied.
* @throws { BusinessError } 401 - The parameter check failed.
* @throws { BusinessError } 401 - The parameter check failed. Possible causes:
* <br> 1. Mandatory parameters are left unspecified.
* <br> 2. Incorrect parameters types.
* <br> 3. Parameter verification failed.
* @throws { BusinessError } 3100201 - Tag running state is abnormal in service.
* @throws { BusinessError } 3100204 - Tag I/O operation failed.
* @syscap SystemCapability.Communication.NFC.Tag
@ -1388,7 +1568,10 @@ export interface NdefFormatableTag extends TagSession {
* @param { NdefMessage } message - NDEF message to write while format. It can be null, then only format the tag.
* @returns { Promise<void> } The void
* @throws { BusinessError } 201 - Permission denied.
* @throws { BusinessError } 401 - The parameter check failed.
* @throws { BusinessError } 401 - The parameter check failed. Possible causes:
* <br> 1. Mandatory parameters are left unspecified.
* <br> 2. Incorrect parameters types.
* <br> 3. Parameter verification failed.
* @throws { BusinessError } 3100201 - Tag running state is abnormal in service.
* @syscap SystemCapability.Communication.NFC.Tag
* @since 9
@ -1400,7 +1583,10 @@ export interface NdefFormatableTag extends TagSession {
* @param { NdefMessage } message - NDEF message to write while format. It can be null, then only format the tag.
* @returns { Promise<void> } The void
* @throws { BusinessError } 201 - Permission denied.
* @throws { BusinessError } 401 - The parameter check failed.
* @throws { BusinessError } 401 - The parameter check failed. Possible causes:
* <br> 1. Mandatory parameters are left unspecified.
* <br> 2. Incorrect parameters types.
* <br> 3. Parameter verification failed.
* @throws { BusinessError } 3100201 - Tag running state is abnormal in service.
* @throws { BusinessError } 3100204 - Tag I/O operation failed.
* @syscap SystemCapability.Communication.NFC.Tag
@ -1416,7 +1602,10 @@ export interface NdefFormatableTag extends TagSession {
* @param { NdefMessage } message - NDEF message to write while format. It can be null, then only format the tag.
* @param { AsyncCallback<void> } callback The callback.
* @throws { BusinessError } 201 - Permission denied.
* @throws { BusinessError } 401 - The parameter check failed.
* @throws { BusinessError } 401 - The parameter check failed. Possible causes:
* <br> 1. Mandatory parameters are left unspecified.
* <br> 2. Incorrect parameters types.
* <br> 3. Parameter verification failed.
* @throws { BusinessError } 3100201 - Tag running state is abnormal in service.
* @syscap SystemCapability.Communication.NFC.Tag
* @since 9
@ -1428,7 +1617,10 @@ export interface NdefFormatableTag extends TagSession {
* @param { NdefMessage } message - NDEF message to write while format. It can be null, then only format the tag.
* @param { AsyncCallback<void> } callback The callback.
* @throws { BusinessError } 201 - Permission denied.
* @throws { BusinessError } 401 - The parameter check failed.
* @throws { BusinessError } 401 - The parameter check failed. Possible causes:
* <br> 1. Mandatory parameters are left unspecified.
* <br> 2. Incorrect parameters types.
* <br> 3. Parameter verification failed.
* @throws { BusinessError } 3100201 - Tag running state is abnormal in service.
* @throws { BusinessError } 3100204 - Tag I/O operation failed.
* @syscap SystemCapability.Communication.NFC.Tag
@ -1444,7 +1636,10 @@ export interface NdefFormatableTag extends TagSession {
* @param { NdefMessage } message - NDEF message to write while format. It can be null, then only format the tag.
* @returns { Promise<void> } The void
* @throws { BusinessError } 201 - Permission denied.
* @throws { BusinessError } 401 - The parameter check failed.
* @throws { BusinessError } 401 - The parameter check failed. Possible causes:
* <br> 1. Mandatory parameters are left unspecified.
* <br> 2. Incorrect parameters types.
* <br> 3. Parameter verification failed.
* @throws { BusinessError } 3100201 - Tag running state is abnormal in service.
* @syscap SystemCapability.Communication.NFC.Tag
* @since 9
@ -1456,7 +1651,10 @@ export interface NdefFormatableTag extends TagSession {
* @param { NdefMessage } message - NDEF message to write while format. It can be null, then only format the tag.
* @returns { Promise<void> } The void
* @throws { BusinessError } 201 - Permission denied.
* @throws { BusinessError } 401 - The parameter check failed.
* @throws { BusinessError } 401 - The parameter check failed. Possible causes:
* <br> 1. Mandatory parameters are left unspecified.
* <br> 2. Incorrect parameters types.
* <br> 3. Parameter verification failed.
* @throws { BusinessError } 3100201 - Tag running state is abnormal in service.
* @throws { BusinessError } 3100204 - Tag I/O operation failed.
* @syscap SystemCapability.Communication.NFC.Tag
@ -1472,7 +1670,10 @@ export interface NdefFormatableTag extends TagSession {
* @param { NdefMessage } message - NDEF message to write while format. It can be null, then only format the tag.
* @param { AsyncCallback<void> } callback The callback.
* @throws { BusinessError } 201 - Permission denied.
* @throws { BusinessError } 401 - The parameter check failed.
* @throws { BusinessError } 401 - The parameter check failed. Possible causes:
* <br> 1. Mandatory parameters are left unspecified.
* <br> 2. Incorrect parameters types.
* <br> 3. Parameter verification failed.
* @throws { BusinessError } 3100201 - Tag running state is abnormal in service.
* @syscap SystemCapability.Communication.NFC.Tag
* @since 9
@ -1484,7 +1685,10 @@ export interface NdefFormatableTag extends TagSession {
* @param { NdefMessage } message - NDEF message to write while format. It can be null, then only format the tag.
* @param { AsyncCallback<void> } callback The callback.
* @throws { BusinessError } 201 - Permission denied.
* @throws { BusinessError } 401 - The parameter check failed.
* @throws { BusinessError } 401 - The parameter check failed. Possible causes:
* <br> 1. Mandatory parameters are left unspecified.
* <br> 2. Incorrect parameters types.
* <br> 3. Parameter verification failed.
* @throws { BusinessError } 3100201 - Tag running state is abnormal in service.
* @throws { BusinessError } 3100204 - Tag I/O operation failed.
* @syscap SystemCapability.Communication.NFC.Tag

View File

@ -174,7 +174,10 @@ export interface TagSession {
* @permission ohos.permission.NFC_TAG
* @param { number } timeout Indicates the timeout duration to be set.
* @throws { BusinessError } 201 - Permission denied.
* @throws { BusinessError } 401 - The parameter check failed.
* @throws { BusinessError } 401 - The parameter check failed. Possible causes:
* <br> 1. Mandatory parameters are left unspecified.
* <br> 2. Incorrect parameters types.
* <br> 3. Parameter verification failed.
* @throws { BusinessError } 801 - Capability not supported.
* @throws { BusinessError } 3100201 - Tag running state is abnormal in service.
* @syscap SystemCapability.Communication.NFC.Tag
@ -186,7 +189,10 @@ export interface TagSession {
* @permission ohos.permission.NFC_TAG
* @param { number } timeout Indicates the timeout duration to be set.
* @throws { BusinessError } 201 - Permission denied.
* @throws { BusinessError } 401 - The parameter check failed.
* @throws { BusinessError } 401 - The parameter check failed. Possible causes:
* <br> 1. Mandatory parameters are left unspecified.
* <br> 2. Incorrect parameters types.
* <br> 3. Parameter verification failed.
* @throws { BusinessError } 801 - Capability not supported.
* @throws { BusinessError } 3100201 - Tag running state is abnormal in service.
* @syscap SystemCapability.Communication.NFC.Tag
@ -268,7 +274,10 @@ export interface TagSession {
* @returns { Promise<number[]> } 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.
* @throws { BusinessError } 401 - The parameter check failed. Possible causes:
* <br> 1. Mandatory parameters are left unspecified.
* <br> 2. Incorrect parameters types.
* <br> 3. Parameter verification failed.
* @throws { BusinessError } 801 - Capability not supported.
* @throws { BusinessError } 3100201 - Tag running state is abnormal in service.
* @syscap SystemCapability.Communication.NFC.Tag
@ -282,7 +291,10 @@ export interface TagSession {
* @returns { Promise<number[]> } 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.
* @throws { BusinessError } 401 - The parameter check failed. Possible causes:
* <br> 1. Mandatory parameters are left unspecified.
* <br> 2. Incorrect parameters types.
* <br> 3. Parameter verification failed.
* @throws { BusinessError } 801 - Capability not supported.
* @throws { BusinessError } 3100201 - Tag running state is abnormal in service.
* @throws { BusinessError } 3100204 - Tag I/O operation failed.
@ -299,7 +311,10 @@ export interface TagSession {
* @param { number[] } data Indicates the data to be written to the tag.
* @param { AsyncCallback<number[]> } callback The callback.
* @throws { BusinessError } 201 - Permission denied.
* @throws { BusinessError } 401 - The parameter check failed.
* @throws { BusinessError } 401 - The parameter check failed. Possible causes:
* <br> 1. Mandatory parameters are left unspecified.
* <br> 2. Incorrect parameters types.
* <br> 3. Parameter verification failed.
* @throws { BusinessError } 801 - Capability not supported.
* @throws { BusinessError } 3100201 - Tag running state is abnormal in service.
* @syscap SystemCapability.Communication.NFC.Tag
@ -312,7 +327,10 @@ export interface TagSession {
* @param { number[] } data Indicates the data to be written to the tag.
* @param { AsyncCallback<number[]> } callback The callback.
* @throws { BusinessError } 201 - Permission denied.
* @throws { BusinessError } 401 - The parameter check failed.
* @throws { BusinessError } 401 - The parameter check failed. Possible causes:
* <br> 1. Mandatory parameters are left unspecified.
* <br> 2. Incorrect parameters types.
* <br> 3. Parameter verification failed.
* @throws { BusinessError } 801 - Capability not supported.
* @throws { BusinessError } 3100201 - Tag running state is abnormal in service.
* @throws { BusinessError } 3100204 - Tag I/O operation failed.