You need to sign in or sign up before continuing.
未验证 提交 12556e96 编写于 作者: O openharmony_ci 提交者: Gitee

!19369 翻译已完成18497+18541+18520+18474+18594+18617+18657+18692++18879+19074+19186+18887+18990

Merge pull request !19369 from shawn_he/18658-d
...@@ -70,6 +70,8 @@ httpRequest.request( ...@@ -70,6 +70,8 @@ httpRequest.request(
// data.header carries the HTTP response header. Parse the content based on service requirements. // data.header carries the HTTP response header. Parse the content based on service requirements.
console.info('header:' + JSON.stringify(data.header)); console.info('header:' + JSON.stringify(data.header));
console.info('cookies:' + JSON.stringify(data.cookies)); // 8+ console.info('cookies:' + JSON.stringify(data.cookies)); // 8+
// Call the destroy() method to release resources after the HttpRequest is complete.
httpRequest.destroy();
} else { } else {
console.info('error:' + JSON.stringify(err)); console.info('error:' + JSON.stringify(err));
// Unsubscribe from HTTP Response Header events. // Unsubscribe from HTTP Response Header events.
......
...@@ -21,7 +21,7 @@ Due to the asynchronous I/O feature of JS, the hiTraceMeter module provides only ...@@ -21,7 +21,7 @@ Due to the asynchronous I/O feature of JS, the hiTraceMeter module provides only
## Available APIs ## Available APIs
The performance tracing APIs are provided by the **hiTraceMeter** module. For details, see [API Reference]( ../reference/apis/js-apis-hitracemeter.md). The performance tracing APIs are provided by the **hiTraceMeter** module. For details, see [API Reference](../reference/apis/js-apis-hitracemeter.md).
**APIs for performance tracing** **APIs for performance tracing**
......
...@@ -349,7 +349,7 @@ According to grammars in certain languages, the singular or plural form of a nou ...@@ -349,7 +349,7 @@ According to grammars in certain languages, the singular or plural form of a nou
let relativeTimeFormat = new Intl.RelativeTimeFormat(); let relativeTimeFormat = new Intl.RelativeTimeFormat();
``` ```
Alternatively, use your own locale and formatting parameters to create a **RelativeTimeFormat** object. Formatting parameters are optional. For a full list of formatting parameters, see [RelativeTimeFormatInputOptions](../reference/apis/js-apis-intl.md#relativetimeformatinputoptions9). Alternatively, use your own locale and formatting parameters to create a **RelativeTimeFormat** object. Formatting parameters are optional. For a full list of formatting parameters, see [ RelativeTimeFormatInputOptions](../reference/apis/js-apis-intl.md#relativetimeformatinputoptions9).
```js ```js
let relativeTimeFormat = new Intl.RelativeTimeFormat("zh-CN", {numeric: "always", style: "long"}); let relativeTimeFormat = new Intl.RelativeTimeFormat("zh-CN", {numeric: "always", style: "long"});
...@@ -385,3 +385,9 @@ According to grammars in certain languages, the singular or plural form of a nou ...@@ -385,3 +385,9 @@ According to grammars in certain languages, the singular or plural form of a nou
let relativeTimeFormat = new Intl.RelativeTimeFormat("zh-CN", {numeric: "always", style: "long"}); let relativeTimeFormat = new Intl.RelativeTimeFormat("zh-CN", {numeric: "always", style: "long"});
let options = relativeTimeFormat.resolvedOptions(); // options = {"locale": "zh-CN", "style": "long", "numeric": "always", "numberingSystem": "latn"} let options = relativeTimeFormat.resolvedOptions(); // options = {"locale": "zh-CN", "style": "long", "numeric": "always", "numberingSystem": "latn"}
``` ```
## Samples
The following sample is provided to help you better understand how to develop internationalization capabilities:
- [`International`: Internationalization (ArkTS) (API9) (Full SDK)] (https://gitee.com/openharmony/applications_app_samples/tree/OpenHarmony-3.2-Release/code/SystemFeature/Internationalnation/International)
...@@ -301,7 +301,7 @@ ...@@ -301,7 +301,7 @@
- [@ohos.systemTimer (System Timer)](js-apis-system-timer.md) - [@ohos.systemTimer (System Timer)](js-apis-system-timer.md)
- [@ohos.wallpaper (Wallpaper)](js-apis-wallpaper.md) - [@ohos.wallpaper (Wallpaper)](js-apis-wallpaper.md)
- [@ohos.web.webview (Webview)](js-apis-webview.md) - [@ohos.web.webview (Webview)](js-apis-webview.md)
- [console (Log)](js-apis-logs.md) - [Console](js-apis-logs.md)
- [Timer](js-apis-timer.md) - [Timer](js-apis-timer.md)
- application - application
- [AccessibilityExtensionContext (Accessibility Extension Context)](js-apis-inner-application-accessibilityExtensionContext.md) - [AccessibilityExtensionContext (Accessibility Extension Context)](js-apis-inner-application-accessibilityExtensionContext.md)
......
...@@ -35,7 +35,7 @@ Initiates a call. This API uses an asynchronous callback to return the result. ...@@ -35,7 +35,7 @@ Initiates a call. This API uses an asynchronous callback to return the result.
**Error codes** **Error codes**
For details about the following error codes, see [Telephony Error Codes](../../reference/errorcodes/errorcode-telephony.md). For details about the error codes, see [Telephony Error Codes](../../reference/errorcodes/errorcode-telephony.md).
| ID| Error Message | | ID| Error Message |
| -------- | -------------------------------------------- | | -------- | -------------------------------------------- |
...@@ -76,7 +76,7 @@ Initiates a call. You can set call options as needed. This API uses an asynchron ...@@ -76,7 +76,7 @@ Initiates a call. You can set call options as needed. This API uses an asynchron
**Error codes** **Error codes**
For details about the following error codes, see [Telephony Error Codes](../../reference/errorcodes/errorcode-telephony.md). For details about the error codes, see [Telephony Error Codes](../../reference/errorcodes/errorcode-telephony.md).
| ID| Error Message | | ID| Error Message |
| -------- | -------------------------------------------- | | -------- | -------------------------------------------- |
...@@ -117,7 +117,7 @@ Initiates a call. You can set call options as needed. This API uses a promise to ...@@ -117,7 +117,7 @@ Initiates a call. You can set call options as needed. This API uses a promise to
| Name | Type | Mandatory| Description | | Name | Type | Mandatory| Description |
| ----------- | ----------------------------------- | ---- | -------------------------------------- | | ----------- | ----------------------------------- | ---- | -------------------------------------- |
| phoneNumber | string | Yes | Phone number. | | phoneNumber | string | Yes | Phone number. |
| options | [DialCallOptions](#dialcalloptions9)| No | Call options, which carry other configuration information of the call.| | options | [DialCallOptions](#dialcalloptions9)| No | Call options, which carry other configuration information of the call.<br>If this parameter is not set, the following configuration is used by default. For details, see [DialCallOptions](#dialcalloptions9).<br>- **accountId**: 0 (card slot 1)<br>- **videoState**: voice call<br>- **dialScene**: common call<br>- **dialType**: carrier call |
**Return value** **Return value**
...@@ -127,7 +127,7 @@ Initiates a call. You can set call options as needed. This API uses a promise to ...@@ -127,7 +127,7 @@ Initiates a call. You can set call options as needed. This API uses a promise to
**Error codes** **Error codes**
For details about the following error codes, see [Telephony Error Codes](../../reference/errorcodes/errorcode-telephony.md). For details about the error codes, see [Telephony Error Codes](../../reference/errorcodes/errorcode-telephony.md).
| ID| Error Message | | ID| Error Message |
| -------- | -------------------------------------------- | | -------- | -------------------------------------------- |
...@@ -274,7 +274,7 @@ Launches the call screen and displays the dialed number. This API uses an asynch ...@@ -274,7 +274,7 @@ Launches the call screen and displays the dialed number. This API uses an asynch
**Error codes** **Error codes**
For details about the following error codes, see [Telephony Error Codes](../../reference/errorcodes/errorcode-telephony.md). For details about the error codes, see [Telephony Error Codes](../../reference/errorcodes/errorcode-telephony.md).
| ID| Error Message | | ID| Error Message |
| -------- | -------------------------------------------- | | -------- | -------------------------------------------- |
...@@ -315,7 +315,7 @@ Launches the call screen and displays the dialed number. This API uses a promise ...@@ -315,7 +315,7 @@ Launches the call screen and displays the dialed number. This API uses a promise
**Error codes** **Error codes**
For details about the following error codes, see [Telephony Error Codes](../../reference/errorcodes/errorcode-telephony.md). For details about the error codes, see [Telephony Error Codes](../../reference/errorcodes/errorcode-telephony.md).
| ID| Error Message | | ID| Error Message |
| -------- | -------------------------------------------- | | -------- | -------------------------------------------- |
...@@ -469,7 +469,7 @@ Checks whether the called number is an emergency number. This API uses an asynch ...@@ -469,7 +469,7 @@ Checks whether the called number is an emergency number. This API uses an asynch
**Error codes** **Error codes**
For details about the following error codes, see [Telephony Error Codes](../../reference/errorcodes/errorcode-telephony.md). For details about the error codes, see [Telephony Error Codes](../../reference/errorcodes/errorcode-telephony.md).
| ID| Error Message | | ID| Error Message |
| -------- | -------------------------------------------- | | -------- | -------------------------------------------- |
...@@ -506,7 +506,7 @@ Checks whether the called number is an emergency number based on the phone numbe ...@@ -506,7 +506,7 @@ Checks whether the called number is an emergency number based on the phone numbe
**Error codes** **Error codes**
For details about the following error codes, see [Telephony Error Codes](../../reference/errorcodes/errorcode-telephony.md). For details about the error codes, see [Telephony Error Codes](../../reference/errorcodes/errorcode-telephony.md).
| ID| Error Message | | ID| Error Message |
| -------- | -------------------------------------------- | | -------- | -------------------------------------------- |
...@@ -548,7 +548,7 @@ Checks whether the called number is an emergency number based on the phone numbe ...@@ -548,7 +548,7 @@ Checks whether the called number is an emergency number based on the phone numbe
**Error codes** **Error codes**
For details about the following error codes, see [Telephony Error Codes](../../reference/errorcodes/errorcode-telephony.md). For details about the error codes, see [Telephony Error Codes](../../reference/errorcodes/errorcode-telephony.md).
| ID| Error Message | | ID| Error Message |
| -------- | -------------------------------------------- | | -------- | -------------------------------------------- |
...@@ -588,7 +588,7 @@ A formatted phone number is a standard numeric string, for example, 555 0100. ...@@ -588,7 +588,7 @@ A formatted phone number is a standard numeric string, for example, 555 0100.
**Error codes** **Error codes**
For details about the following error codes, see [Telephony Error Codes](../../reference/errorcodes/errorcode-telephony.md). For details about the error codes, see [Telephony Error Codes](../../reference/errorcodes/errorcode-telephony.md).
| ID| Error Message | | ID| Error Message |
| -------- | -------------------------------------------- | | -------- | -------------------------------------------- |
...@@ -626,7 +626,7 @@ A formatted phone number is a standard numeric string, for example, 555 0100. ...@@ -626,7 +626,7 @@ A formatted phone number is a standard numeric string, for example, 555 0100.
**Error codes** **Error codes**
For details about the following error codes, see [Telephony Error Codes](../../reference/errorcodes/errorcode-telephony.md). For details about the error codes, see [Telephony Error Codes](../../reference/errorcodes/errorcode-telephony.md).
| ID| Error Message | | ID| Error Message |
| -------- | -------------------------------------------- | | -------- | -------------------------------------------- |
...@@ -672,7 +672,7 @@ A formatted phone number is a standard numeric string, for example, 555 0100. ...@@ -672,7 +672,7 @@ A formatted phone number is a standard numeric string, for example, 555 0100.
**Error codes** **Error codes**
For details about the following error codes, see [Telephony Error Codes](../../reference/errorcodes/errorcode-telephony.md). For details about the error codes, see [Telephony Error Codes](../../reference/errorcodes/errorcode-telephony.md).
| ID| Error Message | | ID| Error Message |
| -------- | -------------------------------------------- | | -------- | -------------------------------------------- |
...@@ -715,7 +715,7 @@ The phone number must match the specified country code. For example, for a China ...@@ -715,7 +715,7 @@ The phone number must match the specified country code. For example, for a China
**Error codes** **Error codes**
For details about the following error codes, see [Telephony Error Codes](../../reference/errorcodes/errorcode-telephony.md). For details about the error codes, see [Telephony Error Codes](../../reference/errorcodes/errorcode-telephony.md).
| ID| Error Message | | ID| Error Message |
| -------- | -------------------------------------------- | | -------- | -------------------------------------------- |
...@@ -761,7 +761,7 @@ All country codes are supported. ...@@ -761,7 +761,7 @@ All country codes are supported.
**Error codes** **Error codes**
For details about the following error codes, see [Telephony Error Codes](../../reference/errorcodes/errorcode-telephony.md). For details about the error codes, see [Telephony Error Codes](../../reference/errorcodes/errorcode-telephony.md).
| ID| Error Message | | ID| Error Message |
| -------- | -------------------------------------------- | | -------- | -------------------------------------------- |
...@@ -802,7 +802,7 @@ Mutes the ringtone while it is playing. It does not work if the ringtone has bee ...@@ -802,7 +802,7 @@ Mutes the ringtone while it is playing. It does not work if the ringtone has bee
**Error codes** **Error codes**
For details about the following error codes, see [Telephony Error Codes](../../reference/errorcodes/errorcode-telephony.md). For details about the error codes, see [Telephony Error Codes](../../reference/errorcodes/errorcode-telephony.md).
| ID| Error Message | | ID| Error Message |
| -------- | -------------------------------------------- | | -------- | -------------------------------------------- |
...@@ -842,7 +842,7 @@ Mutes the ringtone while it is playing. It does not work if the ringtone has bee ...@@ -842,7 +842,7 @@ Mutes the ringtone while it is playing. It does not work if the ringtone has bee
**Error codes** **Error codes**
For details about the following error codes, see [Telephony Error Codes](../../reference/errorcodes/errorcode-telephony.md). For details about the error codes, see [Telephony Error Codes](../../reference/errorcodes/errorcode-telephony.md).
| ID| Error Message | | ID| Error Message |
| -------- | -------------------------------------------- | | -------- | -------------------------------------------- |
...@@ -883,7 +883,7 @@ Answers a call. This API uses an asynchronous callback to return the result. ...@@ -883,7 +883,7 @@ Answers a call. This API uses an asynchronous callback to return the result.
**Error codes** **Error codes**
For details about the following error codes, see [Telephony Error Codes](../../reference/errorcodes/errorcode-telephony.md). For details about the error codes, see [Telephony Error Codes](../../reference/errorcodes/errorcode-telephony.md).
| ID| Error Message | | ID| Error Message |
| -------- | -------------------------------------------- | | -------- | -------------------------------------------- |
...@@ -919,7 +919,7 @@ Answers a call. This API uses a promise to return the result. ...@@ -919,7 +919,7 @@ Answers a call. This API uses a promise to return the result.
| Name| Type | Mandatory| Description | | Name| Type | Mandatory| Description |
| ------ | ------ | ---- | ------------------------------------------------------------ | | ------ | ------ | ---- | ------------------------------------------------------------ |
| callId | number | No | Call ID. You can obtain the value by subscribing to **callDetailsChange** events. This parameter is optional from API version 9.| | callId | number | No | Call ID. You can obtain the value by subscribing to **callDetailsChange** events. This parameter is optional from API version 9.<br>If this parameter is not set, the latest ringing call will be connected.|
**Return value** **Return value**
...@@ -929,7 +929,7 @@ Answers a call. This API uses a promise to return the result. ...@@ -929,7 +929,7 @@ Answers a call. This API uses a promise to return the result.
**Error codes** **Error codes**
For details about the following error codes, see [Telephony Error Codes](../../reference/errorcodes/errorcode-telephony.md). For details about the error codes, see [Telephony Error Codes](../../reference/errorcodes/errorcode-telephony.md).
| ID| Error Message | | ID| Error Message |
| -------- | -------------------------------------------- | | -------- | -------------------------------------------- |
...@@ -971,7 +971,7 @@ Answers a call. This API uses an asynchronous callback to return the result. ...@@ -971,7 +971,7 @@ Answers a call. This API uses an asynchronous callback to return the result.
**Error codes** **Error codes**
For details about the following error codes, see [Telephony Error Codes](../../reference/errorcodes/errorcode-telephony.md). For details about the error codes, see [Telephony Error Codes](../../reference/errorcodes/errorcode-telephony.md).
| ID| Error Message | | ID| Error Message |
| -------- | -------------------------------------------- | | -------- | -------------------------------------------- |
...@@ -1012,7 +1012,7 @@ Ends a call. This API uses an asynchronous callback to return the result. ...@@ -1012,7 +1012,7 @@ Ends a call. This API uses an asynchronous callback to return the result.
**Error codes** **Error codes**
For details about the following error codes, see [Telephony Error Codes](../../reference/errorcodes/errorcode-telephony.md). For details about the error codes, see [Telephony Error Codes](../../reference/errorcodes/errorcode-telephony.md).
| ID| Error Message | | ID| Error Message |
| -------- | -------------------------------------------- | | -------- | -------------------------------------------- |
...@@ -1048,7 +1048,7 @@ Ends a call. This API uses a promise to return the result. ...@@ -1048,7 +1048,7 @@ Ends a call. This API uses a promise to return the result.
| Name| Type | Mandatory| Description | | Name| Type | Mandatory| Description |
| ------ | ------ | ---- | ------------------------------------------------------------ | | ------ | ------ | ---- | ------------------------------------------------------------ |
| callId | number | No | Call ID. You can obtain the value by subscribing to **callDetailsChange** events. This parameter is optional from API version 9.| | callId | number | No | Call ID. You can obtain the value by subscribing to **callDetailsChange** events. This parameter is optional from API version 9.<br>If this parameter is not set, the latest ongoing, dialed, or connected call will be ended.|
**Return value** **Return value**
...@@ -1058,7 +1058,7 @@ Ends a call. This API uses a promise to return the result. ...@@ -1058,7 +1058,7 @@ Ends a call. This API uses a promise to return the result.
**Error codes** **Error codes**
For details about the following error codes, see [Telephony Error Codes](../../reference/errorcodes/errorcode-telephony.md). For details about the error codes, see [Telephony Error Codes](../../reference/errorcodes/errorcode-telephony.md).
| ID| Error Message | | ID| Error Message |
| -------- | -------------------------------------------- | | -------- | -------------------------------------------- |
...@@ -1100,7 +1100,7 @@ Ends a call. This API uses an asynchronous callback to return the result. ...@@ -1100,7 +1100,7 @@ Ends a call. This API uses an asynchronous callback to return the result.
**Error codes** **Error codes**
For details about the following error codes, see [Telephony Error Codes](../../reference/errorcodes/errorcode-telephony.md). For details about the error codes, see [Telephony Error Codes](../../reference/errorcodes/errorcode-telephony.md).
| ID| Error Message | | ID| Error Message |
| -------- | -------------------------------------------- | | -------- | -------------------------------------------- |
...@@ -1142,7 +1142,7 @@ Rejects a call. This API uses an asynchronous callback to return the result. ...@@ -1142,7 +1142,7 @@ Rejects a call. This API uses an asynchronous callback to return the result.
**Error codes** **Error codes**
For details about the following error codes, see [Telephony Error Codes](../../reference/errorcodes/errorcode-telephony.md). For details about the error codes, see [Telephony Error Codes](../../reference/errorcodes/errorcode-telephony.md).
| ID| Error Message | | ID| Error Message |
| -------- | -------------------------------------------- | | -------- | -------------------------------------------- |
...@@ -1185,7 +1185,7 @@ Rejects a call. This API uses an asynchronous callback to return the result. ...@@ -1185,7 +1185,7 @@ Rejects a call. This API uses an asynchronous callback to return the result.
**Error codes** **Error codes**
For details about the following error codes, see [Telephony Error Codes](../../reference/errorcodes/errorcode-telephony.md). For details about the error codes, see [Telephony Error Codes](../../reference/errorcodes/errorcode-telephony.md).
| ID| Error Message | | ID| Error Message |
| -------- | -------------------------------------------- | | -------- | -------------------------------------------- |
...@@ -1224,8 +1224,8 @@ Rejects a call. This API uses a promise to return the result. ...@@ -1224,8 +1224,8 @@ Rejects a call. This API uses a promise to return the result.
| Name | Type | Mandatory| Description | | Name | Type | Mandatory| Description |
| ------- | ---------------------------------------------- | ---- | ------------------------------------------------------------ | | ------- | ---------------------------------------------- | ---- | ------------------------------------------------------------ |
| callId | number | No | Call ID. You can obtain the value by subscribing to **callDetailsChange** events. This parameter is optional from API version 9.| | callId | number | No | Call ID. You can obtain the value by subscribing to **callDetailsChange** events. This parameter is optional from API version 9.<br>If this parameter is not set, the latest ringing call will be rejected.|
| options | [RejectMessageOptions](#rejectmessageoptions7) | No | Options for the call rejection message. | | options | [RejectMessageOptions](#rejectmessageoptions7) | No | Options for the call rejection message. If this parameter is not set, no call rejection message will be sent.|
**Return value** **Return value**
...@@ -1235,7 +1235,7 @@ Rejects a call. This API uses a promise to return the result. ...@@ -1235,7 +1235,7 @@ Rejects a call. This API uses a promise to return the result.
**Error codes** **Error codes**
For details about the following error codes, see [Telephony Error Codes](../../reference/errorcodes/errorcode-telephony.md). For details about the error codes, see [Telephony Error Codes](../../reference/errorcodes/errorcode-telephony.md).
| ID| Error Message | | ID| Error Message |
| -------- | -------------------------------------------- | | -------- | -------------------------------------------- |
...@@ -1280,7 +1280,7 @@ Rejects a call. This API uses an asynchronous callback to return the result. ...@@ -1280,7 +1280,7 @@ Rejects a call. This API uses an asynchronous callback to return the result.
**Error codes** **Error codes**
For details about the following error codes, see [Telephony Error Codes](../../reference/errorcodes/errorcode-telephony.md). For details about the error codes, see [Telephony Error Codes](../../reference/errorcodes/errorcode-telephony.md).
| ID| Error Message | | ID| Error Message |
| -------- | -------------------------------------------- | | -------- | -------------------------------------------- |
...@@ -1321,7 +1321,7 @@ Rejects a call. This API uses an asynchronous callback to return the result. ...@@ -1321,7 +1321,7 @@ Rejects a call. This API uses an asynchronous callback to return the result.
**Error codes** **Error codes**
For details about the following error codes, see [Telephony Error Codes](../../reference/errorcodes/errorcode-telephony.md). For details about the error codes, see [Telephony Error Codes](../../reference/errorcodes/errorcode-telephony.md).
| ID| Error Message | | ID| Error Message |
| -------- | -------------------------------------------- | | -------- | -------------------------------------------- |
...@@ -1365,7 +1365,7 @@ Holds a call based on the specified call ID. This API uses an asynchronous callb ...@@ -1365,7 +1365,7 @@ Holds a call based on the specified call ID. This API uses an asynchronous callb
**Error codes** **Error codes**
For details about the following error codes, see [Telephony Error Codes](../../reference/errorcodes/errorcode-telephony.md). For details about the error codes, see [Telephony Error Codes](../../reference/errorcodes/errorcode-telephony.md).
| ID| Error Message | | ID| Error Message |
| -------- | -------------------------------------------- | | -------- | -------------------------------------------- |
...@@ -1411,7 +1411,7 @@ Holds a call based on the specified call ID. This API uses a promise to return t ...@@ -1411,7 +1411,7 @@ Holds a call based on the specified call ID. This API uses a promise to return t
**Error codes** **Error codes**
For details about the following error codes, see [Telephony Error Codes](../../reference/errorcodes/errorcode-telephony.md). For details about the error codes, see [Telephony Error Codes](../../reference/errorcodes/errorcode-telephony.md).
| ID| Error Message | | ID| Error Message |
| -------- | -------------------------------------------- | | -------- | -------------------------------------------- |
...@@ -1453,7 +1453,7 @@ Unholds a call based on the specified call ID. This API uses an asynchronous cal ...@@ -1453,7 +1453,7 @@ Unholds a call based on the specified call ID. This API uses an asynchronous cal
**Error codes** **Error codes**
For details about the following error codes, see [Telephony Error Codes](../../reference/errorcodes/errorcode-telephony.md). For details about the error codes, see [Telephony Error Codes](../../reference/errorcodes/errorcode-telephony.md).
| ID| Error Message | | ID| Error Message |
| -------- | -------------------------------------------- | | -------- | -------------------------------------------- |
...@@ -1499,7 +1499,7 @@ Unholds a call based on the specified call ID. This API uses a promise to return ...@@ -1499,7 +1499,7 @@ Unholds a call based on the specified call ID. This API uses a promise to return
**Error codes** **Error codes**
For details about the following error codes, see [Telephony Error Codes](../../reference/errorcodes/errorcode-telephony.md). For details about the error codes, see [Telephony Error Codes](../../reference/errorcodes/errorcode-telephony.md).
| ID| Error Message | | ID| Error Message |
| -------- | -------------------------------------------- | | -------- | -------------------------------------------- |
...@@ -1541,7 +1541,7 @@ Switches a call. This API uses an asynchronous callback to return the result. ...@@ -1541,7 +1541,7 @@ Switches a call. This API uses an asynchronous callback to return the result.
**Error codes** **Error codes**
For details about the following error codes, see [Telephony Error Codes](../../reference/errorcodes/errorcode-telephony.md). For details about the error codes, see [Telephony Error Codes](../../reference/errorcodes/errorcode-telephony.md).
| ID| Error Message | | ID| Error Message |
| -------- | -------------------------------------------- | | -------- | -------------------------------------------- |
...@@ -1587,7 +1587,7 @@ Switches a call. This API uses a promise to return the result. ...@@ -1587,7 +1587,7 @@ Switches a call. This API uses a promise to return the result.
**Error codes** **Error codes**
For details about the following error codes, see [Telephony Error Codes](../../reference/errorcodes/errorcode-telephony.md). For details about the error codes, see [Telephony Error Codes](../../reference/errorcodes/errorcode-telephony.md).
| ID| Error Message | | ID| Error Message |
| -------- | -------------------------------------------- | | -------- | -------------------------------------------- |
...@@ -1627,7 +1627,7 @@ Combines two calls into a conference call. This API uses an asynchronous callbac ...@@ -1627,7 +1627,7 @@ Combines two calls into a conference call. This API uses an asynchronous callbac
**Error codes** **Error codes**
For details about the following error codes, see [Telephony Error Codes](../../reference/errorcodes/errorcode-telephony.md). For details about the error codes, see [Telephony Error Codes](../../reference/errorcodes/errorcode-telephony.md).
| ID| Error Message | | ID| Error Message |
| -------- | -------------------------------------------- | | -------- | -------------------------------------------- |
...@@ -1670,7 +1670,7 @@ Combines two calls into a conference call. This API uses a promise to return the ...@@ -1670,7 +1670,7 @@ Combines two calls into a conference call. This API uses a promise to return the
**Error codes** **Error codes**
For details about the following error codes, see [Telephony Error Codes](../../reference/errorcodes/errorcode-telephony.md). For details about the error codes, see [Telephony Error Codes](../../reference/errorcodes/errorcode-telephony.md).
| ID| Error Message | | ID| Error Message |
| -------- | -------------------------------------------- | | -------- | -------------------------------------------- |
...@@ -1709,7 +1709,7 @@ Obtains the main call ID. This API uses an asynchronous callback to return the r ...@@ -1709,7 +1709,7 @@ Obtains the main call ID. This API uses an asynchronous callback to return the r
**Error codes** **Error codes**
For details about the following error codes, see [Telephony Error Codes](../../reference/errorcodes/errorcode-telephony.md). For details about the error codes, see [Telephony Error Codes](../../reference/errorcodes/errorcode-telephony.md).
| ID| Error Message | | ID| Error Message |
| -------- | -------------------------------------------- | | -------- | -------------------------------------------- |
...@@ -1753,7 +1753,7 @@ Obtains the main call ID. This API uses a promise to return the result. ...@@ -1753,7 +1753,7 @@ Obtains the main call ID. This API uses a promise to return the result.
**Error codes** **Error codes**
For details about the following error codes, see [Telephony Error Codes](../../reference/errorcodes/errorcode-telephony.md). For details about the error codes, see [Telephony Error Codes](../../reference/errorcodes/errorcode-telephony.md).
| ID| Error Message | | ID| Error Message |
| -------- | -------------------------------------------- | | -------- | -------------------------------------------- |
...@@ -1793,7 +1793,7 @@ Obtains the list of subcall IDs. This API uses an asynchronous callback to retur ...@@ -1793,7 +1793,7 @@ Obtains the list of subcall IDs. This API uses an asynchronous callback to retur
**Error codes** **Error codes**
For details about the following error codes, see [Telephony Error Codes](../../reference/errorcodes/errorcode-telephony.md). For details about the error codes, see [Telephony Error Codes](../../reference/errorcodes/errorcode-telephony.md).
| ID| Error Message | | ID| Error Message |
| -------- | -------------------------------------------- | | -------- | -------------------------------------------- |
...@@ -1836,7 +1836,7 @@ Obtains the list of subcall IDs. This API uses a promise to return the result. ...@@ -1836,7 +1836,7 @@ Obtains the list of subcall IDs. This API uses a promise to return the result.
**Error codes** **Error codes**
For details about the following error codes, see [Telephony Error Codes](../../reference/errorcodes/errorcode-telephony.md). For details about the error codes, see [Telephony Error Codes](../../reference/errorcodes/errorcode-telephony.md).
| ID| Error Message | | ID| Error Message |
| -------- | -------------------------------------------- | | -------- | -------------------------------------------- |
...@@ -1876,7 +1876,7 @@ Obtains the list of call IDs in a conference. This API uses an asynchronous call ...@@ -1876,7 +1876,7 @@ Obtains the list of call IDs in a conference. This API uses an asynchronous call
**Error codes** **Error codes**
For details about the following error codes, see [Telephony Error Codes](../../reference/errorcodes/errorcode-telephony.md). For details about the error codes, see [Telephony Error Codes](../../reference/errorcodes/errorcode-telephony.md).
| ID| Error Message | | ID| Error Message |
| -------- | -------------------------------------------- | | -------- | -------------------------------------------- |
...@@ -1919,7 +1919,7 @@ Obtains the list of call IDs in a conference. This API uses a promise to return ...@@ -1919,7 +1919,7 @@ Obtains the list of call IDs in a conference. This API uses a promise to return
**Error codes** **Error codes**
For details about the following error codes, see [Telephony Error Codes](../../reference/errorcodes/errorcode-telephony.md). For details about the error codes, see [Telephony Error Codes](../../reference/errorcodes/errorcode-telephony.md).
| ID| Error Message | | ID| Error Message |
| -------- | -------------------------------------------- | | -------- | -------------------------------------------- |
...@@ -1961,7 +1961,7 @@ Obtains the call waiting status. This API uses an asynchronous callback to retur ...@@ -1961,7 +1961,7 @@ Obtains the call waiting status. This API uses an asynchronous callback to retur
**Error codes** **Error codes**
For details about the following error codes, see [Telephony Error Codes](../../reference/errorcodes/errorcode-telephony.md). For details about the error codes, see [Telephony Error Codes](../../reference/errorcodes/errorcode-telephony.md).
| ID| Error Message | | ID| Error Message |
| -------- | -------------------------------------------- | | -------- | -------------------------------------------- |
...@@ -2007,7 +2007,7 @@ Obtains the call waiting status. This API uses a promise to return the result. ...@@ -2007,7 +2007,7 @@ Obtains the call waiting status. This API uses a promise to return the result.
**Error codes** **Error codes**
For details about the following error codes, see [Telephony Error Codes](../../reference/errorcodes/errorcode-telephony.md). For details about the error codes, see [Telephony Error Codes](../../reference/errorcodes/errorcode-telephony.md).
| ID| Error Message | | ID| Error Message |
| -------- | -------------------------------------------- | | -------- | -------------------------------------------- |
...@@ -2033,7 +2033,7 @@ promise.then(data => { ...@@ -2033,7 +2033,7 @@ promise.then(data => {
setCallWaiting\(slotId: number, activate: boolean, callback: AsyncCallback<void\>\): void setCallWaiting\(slotId: number, activate: boolean, callback: AsyncCallback<void\>\): void
Sets the call waiting switch. This API uses an asynchronous callback to return the result. Specifies whether to enable the call waiting service. This API uses an asynchronous callback to return the result.
**System API**: This is a system API. **System API**: This is a system API.
...@@ -2051,7 +2051,7 @@ Sets the call waiting switch. This API uses an asynchronous callback to return t ...@@ -2051,7 +2051,7 @@ Sets the call waiting switch. This API uses an asynchronous callback to return t
**Error codes** **Error codes**
For details about the following error codes, see [Telephony Error Codes](../../reference/errorcodes/errorcode-telephony.md). For details about the error codes, see [Telephony Error Codes](../../reference/errorcodes/errorcode-telephony.md).
| ID| Error Message | | ID| Error Message |
| -------- | -------------------------------------------- | | -------- | -------------------------------------------- |
...@@ -2075,7 +2075,7 @@ call.setCallWaiting(0, true, (err) => { ...@@ -2075,7 +2075,7 @@ call.setCallWaiting(0, true, (err) => {
setCallWaiting\(slotId: number, activate: boolean\): Promise<void\> setCallWaiting\(slotId: number, activate: boolean\): Promise<void\>
Sets the call waiting switch. This API uses a promise to return the result. Specifies whether to enable the call waiting service. This API uses a promise to return the result.
**System API**: This is a system API. **System API**: This is a system API.
...@@ -2098,7 +2098,7 @@ Sets the call waiting switch. This API uses a promise to return the result. ...@@ -2098,7 +2098,7 @@ Sets the call waiting switch. This API uses a promise to return the result.
**Error codes** **Error codes**
For details about the following error codes, see [Telephony Error Codes](../../reference/errorcodes/errorcode-telephony.md). For details about the error codes, see [Telephony Error Codes](../../reference/errorcodes/errorcode-telephony.md).
| ID| Error Message | | ID| Error Message |
| -------- | -------------------------------------------- | | -------- | -------------------------------------------- |
...@@ -2139,7 +2139,7 @@ Enables DTMF. This API uses an asynchronous callback to return the result. ...@@ -2139,7 +2139,7 @@ Enables DTMF. This API uses an asynchronous callback to return the result.
**Error codes** **Error codes**
For details about the following error codes, see [Telephony Error Codes](../../reference/errorcodes/errorcode-telephony.md). For details about the error codes, see [Telephony Error Codes](../../reference/errorcodes/errorcode-telephony.md).
| ID| Error Message | | ID| Error Message |
| -------- | -------------------------------------------- | | -------- | -------------------------------------------- |
...@@ -2183,7 +2183,7 @@ Enables DTMF. This API uses a promise to return the result. ...@@ -2183,7 +2183,7 @@ Enables DTMF. This API uses a promise to return the result.
**Error codes** **Error codes**
For details about the following error codes, see [Telephony Error Codes](../../reference/errorcodes/errorcode-telephony.md). For details about the error codes, see [Telephony Error Codes](../../reference/errorcodes/errorcode-telephony.md).
| ID| Error Message | | ID| Error Message |
| -------- | -------------------------------------------- | | -------- | -------------------------------------------- |
...@@ -2222,7 +2222,7 @@ Stops DTMF. This API uses an asynchronous callback to return the result. ...@@ -2222,7 +2222,7 @@ Stops DTMF. This API uses an asynchronous callback to return the result.
**Error codes** **Error codes**
For details about the following error codes, see [Telephony Error Codes](../../reference/errorcodes/errorcode-telephony.md). For details about the error codes, see [Telephony Error Codes](../../reference/errorcodes/errorcode-telephony.md).
| ID| Error Message | | ID| Error Message |
| -------- | -------------------------------------------- | | -------- | -------------------------------------------- |
...@@ -2265,7 +2265,7 @@ Stops DTMF. This API uses a promise to return the result. ...@@ -2265,7 +2265,7 @@ Stops DTMF. This API uses a promise to return the result.
**Error codes** **Error codes**
For details about the following error codes, see [Telephony Error Codes](../../reference/errorcodes/errorcode-telephony.md). For details about the error codes, see [Telephony Error Codes](../../reference/errorcodes/errorcode-telephony.md).
| ID| Error Message | | ID| Error Message |
| -------- | -------------------------------------------- | | -------- | -------------------------------------------- |
...@@ -2305,7 +2305,7 @@ Checks whether a call is an emergency call. This API uses an asynchronous callba ...@@ -2305,7 +2305,7 @@ Checks whether a call is an emergency call. This API uses an asynchronous callba
**Error codes** **Error codes**
For details about the following error codes, see [Telephony Error Codes](../../reference/errorcodes/errorcode-telephony.md). For details about the error codes, see [Telephony Error Codes](../../reference/errorcodes/errorcode-telephony.md).
| ID| Error Message | | ID| Error Message |
| -------- | -------------------------------------------- | | -------- | -------------------------------------------- |
...@@ -2345,7 +2345,7 @@ Checks whether a call is an emergency call. This API uses a promise to return th ...@@ -2345,7 +2345,7 @@ Checks whether a call is an emergency call. This API uses a promise to return th
**Error codes** **Error codes**
For details about the following error codes, see [Telephony Error Codes](../../reference/errorcodes/errorcode-telephony.md). For details about the error codes, see [Telephony Error Codes](../../reference/errorcodes/errorcode-telephony.md).
| ID| Error Message | | ID| Error Message |
| -------- | -------------------------------------------- | | -------- | -------------------------------------------- |
...@@ -2388,7 +2388,7 @@ Subscribes to **callDetailsChange** events. This API uses an asynchronous callba ...@@ -2388,7 +2388,7 @@ Subscribes to **callDetailsChange** events. This API uses an asynchronous callba
**Error codes** **Error codes**
For details about the following error codes, see [Telephony Error Codes](../../reference/errorcodes/errorcode-telephony.md). For details about the error codes, see [Telephony Error Codes](../../reference/errorcodes/errorcode-telephony.md).
| ID| Error Message | | ID| Error Message |
| -------- | -------------------------------------------- | | -------- | -------------------------------------------- |
...@@ -2428,7 +2428,7 @@ Subscribes to **callEventChange** events. This API uses an asynchronous callback ...@@ -2428,7 +2428,7 @@ Subscribes to **callEventChange** events. This API uses an asynchronous callback
**Error codes** **Error codes**
For details about the following error codes, see [Telephony Error Codes](../../reference/errorcodes/errorcode-telephony.md). For details about the error codes, see [Telephony Error Codes](../../reference/errorcodes/errorcode-telephony.md).
| ID| Error Message | | ID| Error Message |
| -------- | -------------------------------------------- | | -------- | -------------------------------------------- |
...@@ -2468,7 +2468,7 @@ Subscribes to **callDisconnectedCause** events. This API uses an asynchronous ca ...@@ -2468,7 +2468,7 @@ Subscribes to **callDisconnectedCause** events. This API uses an asynchronous ca
**Error codes** **Error codes**
For details about the following error codes, see [Telephony Error Codes](../../reference/errorcodes/errorcode-telephony.md). For details about the error codes, see [Telephony Error Codes](../../reference/errorcodes/errorcode-telephony.md).
| ID| Error Message | | ID| Error Message |
| -------- | -------------------------------------------- | | -------- | -------------------------------------------- |
...@@ -2508,7 +2508,7 @@ Subscribes to **mmiCodeResult** events. This API uses an asynchronous callback t ...@@ -2508,7 +2508,7 @@ Subscribes to **mmiCodeResult** events. This API uses an asynchronous callback t
**Error codes** **Error codes**
For details about the following error codes, see [Telephony Error Codes](../../reference/errorcodes/errorcode-telephony.md). For details about the error codes, see [Telephony Error Codes](../../reference/errorcodes/errorcode-telephony.md).
| ID| Error Message | | ID| Error Message |
| -------- | -------------------------------------------- | | -------- | -------------------------------------------- |
...@@ -2544,11 +2544,11 @@ Unsubscribes from **callDetailsChange** events. This API uses an asynchronous ca ...@@ -2544,11 +2544,11 @@ Unsubscribes from **callDetailsChange** events. This API uses an asynchronous ca
| Name | Type | Mandatory| Description | | Name | Type | Mandatory| Description |
| -------- | -------------------------------------------------------- | ---- | ---------------------------------- | | -------- | -------------------------------------------------------- | ---- | ---------------------------------- |
| type | string | Yes | Call details change. This field has a fixed value of **callDetailsChange**.| | type | string | Yes | Call details change. This field has a fixed value of **callDetailsChange**.|
| callback | Callback<[CallAttributeOptions](#callattributeoptions7)> | No | Callback used to return the result. | | callback | Callback<[CallAttributeOptions](#callattributeoptions7)> | No | Callback used to return the result. If this parameter is not set, no subscription cancellation result will be received.|
**Error codes** **Error codes**
For details about the following error codes, see [Telephony Error Codes](../../reference/errorcodes/errorcode-telephony.md). For details about the error codes, see [Telephony Error Codes](../../reference/errorcodes/errorcode-telephony.md).
| ID| Error Message | | ID| Error Message |
| -------- | -------------------------------------------- | | -------- | -------------------------------------------- |
...@@ -2584,11 +2584,11 @@ Unsubscribes from **callEventChange** events. This API uses an asynchronous call ...@@ -2584,11 +2584,11 @@ Unsubscribes from **callEventChange** events. This API uses an asynchronous call
| Name | Type | Mandatory| Description | | Name | Type | Mandatory| Description |
| -------- | ------------------------------------------------ | ---- | ---------------------------------- | | -------- | ------------------------------------------------ | ---- | ---------------------------------- |
| type | string | Yes | Call event change. This field has a fixed value of **callEventChange**.| | type | string | Yes | Call event change. This field has a fixed value of **callEventChange**.|
| callback | Callback<[CallEventOptions](#calleventoptions8)> | No | Callback used to return the result. | | callback | Callback<[CallEventOptions](#calleventoptions8)> | No | Callback used to return the result. If this parameter is not set, no subscription cancellation result will be received.|
**Error codes** **Error codes**
For details about the following error codes, see [Telephony Error Codes](../../reference/errorcodes/errorcode-telephony.md). For details about the error codes, see [Telephony Error Codes](../../reference/errorcodes/errorcode-telephony.md).
| ID| Error Message | | ID| Error Message |
| -------- | -------------------------------------------- | | -------- | -------------------------------------------- |
...@@ -2624,11 +2624,11 @@ Unsubscribes from **callDisconnectedCause** events. This API uses an asynchronou ...@@ -2624,11 +2624,11 @@ Unsubscribes from **callDisconnectedCause** events. This API uses an asynchronou
| Name | Type | Mandatory| Description | | Name | Type | Mandatory| Description |
| -------- | ---------------------------------------------------------- | ---- | ------------------- | | -------- | ---------------------------------------------------------- | ---- | ------------------- |
| type | string | Yes | Call disconnection cause. This field has a fixed value of **callDisconnectedCause**.| | type | string | Yes | Call disconnection cause. This field has a fixed value of **callDisconnectedCause**.|
| callback | Callback<[DisconnectedDetails](#disconnecteddetails9)> | No | Callback used to return the result. | | callback | Callback<[DisconnectedDetails](#disconnecteddetails9)> | No | Callback used to return the result. If this parameter is not set, no subscription cancellation result will be received.|
**Error codes** **Error codes**
For details about the following error codes, see [Telephony Error Codes](../../reference/errorcodes/errorcode-telephony.md). For details about the error codes, see [Telephony Error Codes](../../reference/errorcodes/errorcode-telephony.md).
| ID| Error Message | | ID| Error Message |
| -------- | -------------------------------------------- | | -------- | -------------------------------------------- |
...@@ -2664,11 +2664,11 @@ Unsubscribes from **mmiCodeResult** events. This API uses an asynchronous callba ...@@ -2664,11 +2664,11 @@ Unsubscribes from **mmiCodeResult** events. This API uses an asynchronous callba
| Name | Type | Mandatory| Description | | Name | Type | Mandatory| Description |
| -------- | ------------------------------------------------ | ---- | ----------- | | -------- | ------------------------------------------------ | ---- | ----------- |
| type | string | Yes | MMI code result. This field has a fixed value of **mmiCodeResult**.| | type | string | Yes | MMI code result. This field has a fixed value of **mmiCodeResult**.|
| callback | Callback<[MmiCodeResults](#mmicoderesults9)> | No | Callback used to return the result. | | callback | Callback<[MmiCodeResults](#mmicoderesults9)> | No | Callback used to return the result. If this parameter is not set, no subscription cancellation result will be received.|
**Error codes** **Error codes**
For details about the following error codes, see [Telephony Error Codes](../../reference/errorcodes/errorcode-telephony.md). For details about the error codes, see [Telephony Error Codes](../../reference/errorcodes/errorcode-telephony.md).
| ID| Error Message | | ID| Error Message |
| -------- | -------------------------------------------- | | -------- | -------------------------------------------- |
...@@ -2705,7 +2705,7 @@ Checks whether a new call is allowed. This API uses an asynchronous callback to ...@@ -2705,7 +2705,7 @@ Checks whether a new call is allowed. This API uses an asynchronous callback to
**Error codes** **Error codes**
For details about the following error codes, see [Telephony Error Codes](../../reference/errorcodes/errorcode-telephony.md). For details about the error codes, see [Telephony Error Codes](../../reference/errorcodes/errorcode-telephony.md).
| ID| Error Message | | ID| Error Message |
| -------- | -------------------------------------------- | | -------- | -------------------------------------------- |
...@@ -2742,7 +2742,7 @@ Checks whether a new call is allowed. This API uses a promise to return the resu ...@@ -2742,7 +2742,7 @@ Checks whether a new call is allowed. This API uses a promise to return the resu
**Error codes** **Error codes**
For details about the following error codes, see [Telephony Error Codes](../../reference/errorcodes/errorcode-telephony.md). For details about the error codes, see [Telephony Error Codes](../../reference/errorcodes/errorcode-telephony.md).
| ID| Error Message | | ID| Error Message |
| -------- | -------------------------------------------- | | -------- | -------------------------------------------- |
...@@ -2782,7 +2782,7 @@ Separates calls from a conference call. This API uses an asynchronous callback t ...@@ -2782,7 +2782,7 @@ Separates calls from a conference call. This API uses an asynchronous callback t
**Error codes** **Error codes**
For details about the following error codes, see [Telephony Error Codes](../../reference/errorcodes/errorcode-telephony.md). For details about the error codes, see [Telephony Error Codes](../../reference/errorcodes/errorcode-telephony.md).
| ID| Error Message | | ID| Error Message |
| -------- | -------------------------------------------- | | -------- | -------------------------------------------- |
...@@ -2825,7 +2825,7 @@ Separates calls from a conference call. This API uses a promise to return the re ...@@ -2825,7 +2825,7 @@ Separates calls from a conference call. This API uses a promise to return the re
**Error codes** **Error codes**
For details about the following error codes, see [Telephony Error Codes](../../reference/errorcodes/errorcode-telephony.md). For details about the error codes, see [Telephony Error Codes](../../reference/errorcodes/errorcode-telephony.md).
| ID| Error Message | | ID| Error Message |
| -------- | -------------------------------------------- | | -------- | -------------------------------------------- |
...@@ -2867,7 +2867,7 @@ Obtains the call restriction status. This API uses an asynchronous callback to r ...@@ -2867,7 +2867,7 @@ Obtains the call restriction status. This API uses an asynchronous callback to r
**Error codes** **Error codes**
For details about the following error codes, see [Telephony Error Codes](../../reference/errorcodes/errorcode-telephony.md). For details about the error codes, see [Telephony Error Codes](../../reference/errorcodes/errorcode-telephony.md).
| ID| Error Message | | ID| Error Message |
| -------- | -------------------------------------------- | | -------- | -------------------------------------------- |
...@@ -2914,7 +2914,7 @@ Obtains the call restriction status. This API uses a promise to return the resul ...@@ -2914,7 +2914,7 @@ Obtains the call restriction status. This API uses a promise to return the resul
**Error codes** **Error codes**
For details about the following error codes, see [Telephony Error Codes](../../reference/errorcodes/errorcode-telephony.md). For details about the error codes, see [Telephony Error Codes](../../reference/errorcodes/errorcode-telephony.md).
| ID| Error Message | | ID| Error Message |
| -------- | -------------------------------------------- | | -------- | -------------------------------------------- |
...@@ -2958,7 +2958,7 @@ Sets the call restriction status. This API uses an asynchronous callback to retu ...@@ -2958,7 +2958,7 @@ Sets the call restriction status. This API uses an asynchronous callback to retu
**Error codes** **Error codes**
For details about the following error codes, see [Telephony Error Codes](../../reference/errorcodes/errorcode-telephony.md). For details about the error codes, see [Telephony Error Codes](../../reference/errorcodes/errorcode-telephony.md).
| ID| Error Message | | ID| Error Message |
| -------- | -------------------------------------------- | | -------- | -------------------------------------------- |
...@@ -3010,7 +3010,7 @@ Sets the call restriction status. This API uses a promise to return the result. ...@@ -3010,7 +3010,7 @@ Sets the call restriction status. This API uses a promise to return the result.
**Error codes** **Error codes**
For details about the following error codes, see [Telephony Error Codes](../../reference/errorcodes/errorcode-telephony.md). For details about the error codes, see [Telephony Error Codes](../../reference/errorcodes/errorcode-telephony.md).
| ID| Error Message | | ID| Error Message |
| -------- | -------------------------------------------- | | -------- | -------------------------------------------- |
...@@ -3058,7 +3058,7 @@ Obtains call transfer information. This API uses an asynchronous callback to ret ...@@ -3058,7 +3058,7 @@ Obtains call transfer information. This API uses an asynchronous callback to ret
**Error codes** **Error codes**
For details about the following error codes, see [Telephony Error Codes](../../reference/errorcodes/errorcode-telephony.md). For details about the error codes, see [Telephony Error Codes](../../reference/errorcodes/errorcode-telephony.md).
| ID| Error Message | | ID| Error Message |
| -------- | -------------------------------------------- | | -------- | -------------------------------------------- |
...@@ -3105,7 +3105,7 @@ Obtains call transfer information. This API uses a promise to return the result. ...@@ -3105,7 +3105,7 @@ Obtains call transfer information. This API uses a promise to return the result.
**Error codes** **Error codes**
For details about the following error codes, see [Telephony Error Codes](../../reference/errorcodes/errorcode-telephony.md). For details about the error codes, see [Telephony Error Codes](../../reference/errorcodes/errorcode-telephony.md).
| ID| Error Message | | ID| Error Message |
| -------- | -------------------------------------------- | | -------- | -------------------------------------------- |
...@@ -3149,7 +3149,7 @@ Sets call transfer information. This API uses an asynchronous callback to return ...@@ -3149,7 +3149,7 @@ Sets call transfer information. This API uses an asynchronous callback to return
**Error codes** **Error codes**
For details about the following error codes, see [Telephony Error Codes](../../reference/errorcodes/errorcode-telephony.md). For details about the error codes, see [Telephony Error Codes](../../reference/errorcodes/errorcode-telephony.md).
| ID| Error Message | | ID| Error Message |
| -------- | -------------------------------------------- | | -------- | -------------------------------------------- |
...@@ -3201,7 +3201,7 @@ Sets call transfer information. This API uses a promise to return the result. ...@@ -3201,7 +3201,7 @@ Sets call transfer information. This API uses a promise to return the result.
**Error codes** **Error codes**
For details about the following error codes, see [Telephony Error Codes](../../reference/errorcodes/errorcode-telephony.md). For details about the error codes, see [Telephony Error Codes](../../reference/errorcodes/errorcode-telephony.md).
| ID| Error Message | | ID| Error Message |
| -------- | -------------------------------------------- | | -------- | -------------------------------------------- |
...@@ -3247,7 +3247,7 @@ Checks whether the ringtone is playing. This API uses an asynchronous callback t ...@@ -3247,7 +3247,7 @@ Checks whether the ringtone is playing. This API uses an asynchronous callback t
**Error codes** **Error codes**
For details about the following error codes, see [Telephony Error Codes](../../reference/errorcodes/errorcode-telephony.md). For details about the error codes, see [Telephony Error Codes](../../reference/errorcodes/errorcode-telephony.md).
| ID| Error Message | | ID| Error Message |
| -------- | -------------------------------------------- | | -------- | -------------------------------------------- |
...@@ -3287,7 +3287,7 @@ Checks whether the ringtone is playing. This API uses a promise to return the re ...@@ -3287,7 +3287,7 @@ Checks whether the ringtone is playing. This API uses a promise to return the re
**Error codes** **Error codes**
For details about the following error codes, see [Telephony Error Codes](../../reference/errorcodes/errorcode-telephony.md). For details about the error codes, see [Telephony Error Codes](../../reference/errorcodes/errorcode-telephony.md).
| ID| Error Message | | ID| Error Message |
| -------- | -------------------------------------------- | | -------- | -------------------------------------------- |
...@@ -3327,7 +3327,7 @@ Sets call muting. This API uses an asynchronous callback to return the result. ...@@ -3327,7 +3327,7 @@ Sets call muting. This API uses an asynchronous callback to return the result.
**Error codes** **Error codes**
For details about the following error codes, see [Telephony Error Codes](../../reference/errorcodes/errorcode-telephony.md). For details about the error codes, see [Telephony Error Codes](../../reference/errorcodes/errorcode-telephony.md).
| ID| Error Message | | ID| Error Message |
| -------- | -------------------------------------------- | | -------- | -------------------------------------------- |
...@@ -3364,7 +3364,7 @@ Sets call muting. This API uses a promise to return the result. ...@@ -3364,7 +3364,7 @@ Sets call muting. This API uses a promise to return the result.
**Error codes** **Error codes**
For details about the following error codes, see [Telephony Error Codes](../../reference/errorcodes/errorcode-telephony.md). For details about the error codes, see [Telephony Error Codes](../../reference/errorcodes/errorcode-telephony.md).
| ID| Error Message | | ID| Error Message |
| -------- | -------------------------------------------- | | -------- | -------------------------------------------- |
...@@ -3402,7 +3402,7 @@ Cancels call muting. This API uses an asynchronous callback to return the result ...@@ -3402,7 +3402,7 @@ Cancels call muting. This API uses an asynchronous callback to return the result
**Error codes** **Error codes**
For details about the following error codes, see [Telephony Error Codes](../../reference/errorcodes/errorcode-telephony.md). For details about the error codes, see [Telephony Error Codes](../../reference/errorcodes/errorcode-telephony.md).
| ID| Error Message | | ID| Error Message |
| -------- | -------------------------------------------- | | -------- | -------------------------------------------- |
...@@ -3439,7 +3439,7 @@ Cancels call muting. This API uses a promise to return the result. ...@@ -3439,7 +3439,7 @@ Cancels call muting. This API uses a promise to return the result.
**Error codes** **Error codes**
For details about the following error codes, see [Telephony Error Codes](../../reference/errorcodes/errorcode-telephony.md). For details about the error codes, see [Telephony Error Codes](../../reference/errorcodes/errorcode-telephony.md).
| ID| Error Message | | ID| Error Message |
| -------- | -------------------------------------------- | | -------- | -------------------------------------------- |
...@@ -3478,7 +3478,7 @@ Sets the audio device for a call. This API uses an asynchronous callback to retu ...@@ -3478,7 +3478,7 @@ Sets the audio device for a call. This API uses an asynchronous callback to retu
**Error codes** **Error codes**
For details about the following error codes, see [Telephony Error Codes](../../reference/errorcodes/errorcode-telephony.md). For details about the error codes, see [Telephony Error Codes](../../reference/errorcodes/errorcode-telephony.md).
| ID| Error Message | | ID| Error Message |
| -------- | -------------------------------------------- | | -------- | -------------------------------------------- |
...@@ -3501,7 +3501,7 @@ call.setAudioDevice(1, (err) => { ...@@ -3501,7 +3501,7 @@ call.setAudioDevice(1, (err) => {
setAudioDevice\(device: AudioDevice, options: AudioDeviceOptions, callback: AsyncCallback<void\>\): void setAudioDevice\(device: AudioDevice, options: AudioDeviceOptions, callback: AsyncCallback<void\>\): void
Sets the audio device for a call based on the specified options. This API uses an asynchronous callback to return the result. Sets the audio device for a call. This API uses an asynchronous callback to return the result.
**System API**: This is a system API. **System API**: This is a system API.
...@@ -3517,7 +3517,7 @@ Sets the audio device for a call based on the specified options. This API uses a ...@@ -3517,7 +3517,7 @@ Sets the audio device for a call based on the specified options. This API uses a
**Error codes** **Error codes**
For details about the following error codes, see [Telephony Error Codes](../../reference/errorcodes/errorcode-telephony.md). For details about the error codes, see [Telephony Error Codes](../../reference/errorcodes/errorcode-telephony.md).
| ID| Error Message | | ID| Error Message |
| -------- | -------------------------------------------- | | -------- | -------------------------------------------- |
...@@ -3564,7 +3564,7 @@ Sets the audio device for a call based on the specified options. This API uses a ...@@ -3564,7 +3564,7 @@ Sets the audio device for a call based on the specified options. This API uses a
**Error codes** **Error codes**
For details about the following error codes, see [Telephony Error Codes](../../reference/errorcodes/errorcode-telephony.md). For details about the error codes, see [Telephony Error Codes](../../reference/errorcodes/errorcode-telephony.md).
| ID| Error Message | | ID| Error Message |
| -------- | -------------------------------------------- | | -------- | -------------------------------------------- |
...@@ -3607,7 +3607,7 @@ Joins a conference call. This API uses an asynchronous callback to return the re ...@@ -3607,7 +3607,7 @@ Joins a conference call. This API uses an asynchronous callback to return the re
**Error codes** **Error codes**
For details about the following error codes, see [Telephony Error Codes](../../reference/errorcodes/errorcode-telephony.md). For details about the error codes, see [Telephony Error Codes](../../reference/errorcodes/errorcode-telephony.md).
| ID| Error Message | | ID| Error Message |
| -------- | -------------------------------------------- | | -------- | -------------------------------------------- |
...@@ -3653,7 +3653,7 @@ Joins a conference call. This API uses a promise to return the result. ...@@ -3653,7 +3653,7 @@ Joins a conference call. This API uses a promise to return the result.
**Error codes** **Error codes**
For details about the following error codes, see [Telephony Error Codes](../../reference/errorcodes/errorcode-telephony.md). For details about the error codes, see [Telephony Error Codes](../../reference/errorcodes/errorcode-telephony.md).
| ID| Error Message | | ID| Error Message |
| -------- | -------------------------------------------- | | -------- | -------------------------------------------- |
...@@ -3696,7 +3696,7 @@ Updates the IMS call mode. This API uses an asynchronous callback to return the ...@@ -3696,7 +3696,7 @@ Updates the IMS call mode. This API uses an asynchronous callback to return the
**Error codes** **Error codes**
For details about the following error codes, see [Telephony Error Codes](../../reference/errorcodes/errorcode-telephony.md). For details about the error codes, see [Telephony Error Codes](../../reference/errorcodes/errorcode-telephony.md).
| ID| Error Message | | ID| Error Message |
| -------- | -------------------------------------------- | | -------- | -------------------------------------------- |
...@@ -3739,7 +3739,7 @@ Updates the IMS call mode. This API uses a promise to return the result. ...@@ -3739,7 +3739,7 @@ Updates the IMS call mode. This API uses a promise to return the result.
**Error codes** **Error codes**
For details about the following error codes, see [Telephony Error Codes](../../reference/errorcodes/errorcode-telephony.md). For details about the error codes, see [Telephony Error Codes](../../reference/errorcodes/errorcode-telephony.md).
| ID| Error Message | | ID| Error Message |
| -------- | -------------------------------------------- | | -------- | -------------------------------------------- |
...@@ -3763,7 +3763,7 @@ call.updateImsCallMode(1, 1).then(() => { ...@@ -3763,7 +3763,7 @@ call.updateImsCallMode(1, 1).then(() => {
enableImsSwitch(slotId: number, callback: AsyncCallback<void\>): void enableImsSwitch(slotId: number, callback: AsyncCallback<void\>): void
Enables the IMS switch. This API uses an asynchronous callback to return the result. Enables the IMS service. This API uses an asynchronous callback to return the result.
**System API**: This is a system API. **System API**: This is a system API.
...@@ -3780,7 +3780,7 @@ Enables the IMS switch. This API uses an asynchronous callback to return the res ...@@ -3780,7 +3780,7 @@ Enables the IMS switch. This API uses an asynchronous callback to return the res
**Error codes** **Error codes**
For details about the following error codes, see [Telephony Error Codes](../../reference/errorcodes/errorcode-telephony.md). For details about the error codes, see [Telephony Error Codes](../../reference/errorcodes/errorcode-telephony.md).
| ID| Error Message | | ID| Error Message |
| -------- | -------------------------------------------- | | -------- | -------------------------------------------- |
...@@ -3803,7 +3803,7 @@ call.enableImsSwitch(0, (err) => { ...@@ -3803,7 +3803,7 @@ call.enableImsSwitch(0, (err) => {
enableImsSwitch(slotId: number): Promise<void\> enableImsSwitch(slotId: number): Promise<void\>
Enables the IMS switch. This API uses a promise to return the result. Enables the IMS service. This API uses a promise to return the result.
**System API**: This is a system API. **System API**: This is a system API.
...@@ -3825,7 +3825,7 @@ Enables the IMS switch. This API uses a promise to return the result. ...@@ -3825,7 +3825,7 @@ Enables the IMS switch. This API uses a promise to return the result.
**Error codes** **Error codes**
For details about the following error codes, see [Telephony Error Codes](../../reference/errorcodes/errorcode-telephony.md). For details about the error codes, see [Telephony Error Codes](../../reference/errorcodes/errorcode-telephony.md).
| ID| Error Message | | ID| Error Message |
| -------- | -------------------------------------------- | | -------- | -------------------------------------------- |
...@@ -3850,7 +3850,7 @@ call.enableImsSwitch(0).then(() => { ...@@ -3850,7 +3850,7 @@ call.enableImsSwitch(0).then(() => {
disableImsSwitch(slotId: number, callback: AsyncCallback<void\>): void disableImsSwitch(slotId: number, callback: AsyncCallback<void\>): void
Disables the IMS switch. This API uses an asynchronous callback to return the result. Disables the IMS service. This API uses an asynchronous callback to return the result.
**System API**: This is a system API. **System API**: This is a system API.
...@@ -3867,7 +3867,7 @@ Disables the IMS switch. This API uses an asynchronous callback to return the re ...@@ -3867,7 +3867,7 @@ Disables the IMS switch. This API uses an asynchronous callback to return the re
**Error codes** **Error codes**
For details about the following error codes, see [Telephony Error Codes](../../reference/errorcodes/errorcode-telephony.md). For details about the error codes, see [Telephony Error Codes](../../reference/errorcodes/errorcode-telephony.md).
| ID| Error Message | | ID| Error Message |
| -------- | -------------------------------------------- | | -------- | -------------------------------------------- |
...@@ -3890,7 +3890,7 @@ call.disableImsSwitch(0, (err) => { ...@@ -3890,7 +3890,7 @@ call.disableImsSwitch(0, (err) => {
disableImsSwitch(slotId: number): Promise<void\> disableImsSwitch(slotId: number): Promise<void\>
Disables the IMS switch. This API uses a promise to return the result. Disables the IMS service. This API uses a promise to return the result.
**System API**: This is a system API. **System API**: This is a system API.
...@@ -3912,7 +3912,7 @@ Disables the IMS switch. This API uses a promise to return the result. ...@@ -3912,7 +3912,7 @@ Disables the IMS switch. This API uses a promise to return the result.
**Error codes** **Error codes**
For details about the following error codes, see [Telephony Error Codes](../../reference/errorcodes/errorcode-telephony.md). For details about the error codes, see [Telephony Error Codes](../../reference/errorcodes/errorcode-telephony.md).
| ID| Error Message | | ID| Error Message |
| -------- | -------------------------------------------- | | -------- | -------------------------------------------- |
...@@ -3937,7 +3937,7 @@ call.disableImsSwitch(0).then(() => { ...@@ -3937,7 +3937,7 @@ call.disableImsSwitch(0).then(() => {
isImsSwitchEnabled(slotId: number, callback: AsyncCallback<boolean\>): void isImsSwitchEnabled(slotId: number, callback: AsyncCallback<boolean\>): void
Checks whether the IMS switch is enabled. This API uses an asynchronous callback to return the result. Checks whether the IMS service is enabled. This API uses an asynchronous callback to return the result.
**System API**: This is a system API. **System API**: This is a system API.
...@@ -3952,7 +3952,7 @@ Checks whether the IMS switch is enabled. This API uses an asynchronous callback ...@@ -3952,7 +3952,7 @@ Checks whether the IMS switch is enabled. This API uses an asynchronous callback
**Error codes** **Error codes**
For details about the following error codes, see [Telephony Error Codes](../../reference/errorcodes/errorcode-telephony.md). For details about the error codes, see [Telephony Error Codes](../../reference/errorcodes/errorcode-telephony.md).
| ID| Error Message | | ID| Error Message |
| -------- | -------------------------------------------- | | -------- | -------------------------------------------- |
...@@ -3974,7 +3974,7 @@ call.isImsSwitchEnabled(0, (err, data) => { ...@@ -3974,7 +3974,7 @@ call.isImsSwitchEnabled(0, (err, data) => {
isImsSwitchEnabled(slotId: number): Promise<boolean\> isImsSwitchEnabled(slotId: number): Promise<boolean\>
Checks whether the IMS switch is enabled. This API uses a promise to return the result. Checks whether the IMS service is enabled. This API uses a promise to return the result.
**System API**: This is a system API. **System API**: This is a system API.
...@@ -3994,7 +3994,7 @@ Checks whether the IMS switch is enabled. This API uses a promise to return the ...@@ -3994,7 +3994,7 @@ Checks whether the IMS switch is enabled. This API uses a promise to return the
**Error codes** **Error codes**
For details about the following error codes, see [Telephony Error Codes](../../reference/errorcodes/errorcode-telephony.md). For details about the error codes, see [Telephony Error Codes](../../reference/errorcodes/errorcode-telephony.md).
| ID| Error Message | | ID| Error Message |
| -------- | -------------------------------------------- | | -------- | -------------------------------------------- |
...@@ -4031,7 +4031,7 @@ Provides an option for determining whether a call is a video call. ...@@ -4031,7 +4031,7 @@ Provides an option for determining whether a call is a video call.
## DialCallOptions<sup>9+</sup> ## DialCallOptions<sup>9+</sup>
Defines options for initiating a call. Provides an option for determining whether a call is a video call.
**System capability**: SystemCapability.Telephony.CallManager **System capability**: SystemCapability.Telephony.CallManager
...@@ -4408,7 +4408,7 @@ Enumerates call transfer states. ...@@ -4408,7 +4408,7 @@ Enumerates call transfer states.
## DisconnectedDetails<sup>9+</sup> ## DisconnectedDetails<sup>9+</sup>
Defines the cause of a call disconnection. Defines the call disconnection cause.
**System API**: This is a system API. **System API**: This is a system API.
...@@ -4416,12 +4416,12 @@ Defines the cause of a call disconnection. ...@@ -4416,12 +4416,12 @@ Defines the cause of a call disconnection.
| Name | Type | Mandatory| Description | | Name | Type | Mandatory| Description |
| ------- | ------------------------------------------ | ---- | --------------- | | ------- | ------------------------------------------ | ---- | --------------- |
| reason | [DisconnectedReason](#disconnectedreason8) | Yes | Cause of the call disconnection. | | reason | [DisconnectedReason](#disconnectedreason8) | Yes | Call disconnection cause. |
| message | string | Yes | Message indicating the call disconnection.| | message | string | Yes | Call ending message.|
## DisconnectedReason<sup>8+</sup> ## DisconnectedReason<sup>8+</sup>
Enumerates causes of call disconnection. Enumerates call disconnection causes.
**System API**: This is a system API. **System API**: This is a system API.
...@@ -4464,7 +4464,7 @@ Enumerates causes of call disconnection. ...@@ -4464,7 +4464,7 @@ Enumerates causes of call disconnection.
| BEARER_SERVICE_NOT_IMPLEMENTED<sup>9+</sup> | 65 | Bearer service not implemented. | | BEARER_SERVICE_NOT_IMPLEMENTED<sup>9+</sup> | 65 | Bearer service not implemented. |
| ACM_EQUALTO_OR_GREATER_THAN_THE_MAXIMUM_VALUE<sup>9+</sup> | 68 | ACM greater than or equal to the maximum value. | | ACM_EQUALTO_OR_GREATER_THAN_THE_MAXIMUM_VALUE<sup>9+</sup> | 68 | ACM greater than or equal to the maximum value. |
| REQUESTED_FACILITY_NOT_IMPLEMENTED<sup>9+</sup> | 69 | Requested facility not implemented. | | REQUESTED_FACILITY_NOT_IMPLEMENTED<sup>9+</sup> | 69 | Requested facility not implemented. |
| ONLY_RESTRICTED_DIGITAL_INFO_BEARER_CAPABILITY_IS_AVAILABLE<sup>9+</sup> | 70 | Only restricted digital information capability available. | | ONLY_RESTRICTED_DIGITAL_INFO_BEARER_CAPABILITY_IS_AVAILABLE<sup>9+</sup> | 70 | Only restricted digital information bearer capability available. |
| SERVICE_OR_OPTION_NOT_IMPLEMENTED_UNSPECIFIED<sup>9+</sup> | 79 | Service or option not implemented, unspecified. | | SERVICE_OR_OPTION_NOT_IMPLEMENTED_UNSPECIFIED<sup>9+</sup> | 79 | Service or option not implemented, unspecified. |
| INVALID_TRANSACTION_IDENTIFIER_VALUE<sup>9+</sup> | 81 | Invalid transaction identifier value. | | INVALID_TRANSACTION_IDENTIFIER_VALUE<sup>9+</sup> | 81 | Invalid transaction identifier value. |
| USER_NOT_MEMBER_OF_CUG<sup>9+</sup> | 87 | User not member of CUG. | | USER_NOT_MEMBER_OF_CUG<sup>9+</sup> | 87 | User not member of CUG. |
......
...@@ -53,11 +53,13 @@ httpRequest.request( ...@@ -53,11 +53,13 @@ httpRequest.request(
// data.header carries the HTTP response header. Parse the content based on service requirements. // data.header carries the HTTP response header. Parse the content based on service requirements.
console.info('header:' + JSON.stringify(data.header)); console.info('header:' + JSON.stringify(data.header));
console.info('cookies:' + JSON.stringify(data.cookies)); // 8+ console.info('cookies:' + JSON.stringify(data.cookies)); // 8+
// Call the destroy() method to release resources after the HttpRequest is complete.
httpRequest.destroy();
} else { } else {
console.info('error:' + JSON.stringify(err)); console.info('error:' + JSON.stringify(err));
// Unsubscribe from HTTP Response Header events. // Unsubscribe from HTTP Response Header events.
httpRequest.off('headersReceive'); httpRequest.off('headersReceive');
// Call the destroy() method to release resources after HttpRequest is complete. // Call the destroy() method to release resources after the HttpRequest is complete.
httpRequest.destroy(); httpRequest.destroy();
} }
} }
...@@ -73,6 +75,9 @@ createHttp(): HttpRequest ...@@ -73,6 +75,9 @@ createHttp(): HttpRequest
Creates an HTTP request. You can use this API to initiate or destroy an HTTP request, or enable or disable listening for HTTP Response Header events. An **HttpRequest** object corresponds to an HTTP request. To initiate multiple HTTP requests, you must create an **HttpRequest** object for each HTTP request. Creates an HTTP request. You can use this API to initiate or destroy an HTTP request, or enable or disable listening for HTTP Response Header events. An **HttpRequest** object corresponds to an HTTP request. To initiate multiple HTTP requests, you must create an **HttpRequest** object for each HTTP request.
> **NOTE**
> Call the **destroy()** method to release resources after the HttpRequest is complete.
**System capability**: SystemCapability.Communication.NetStack **System capability**: SystemCapability.Communication.NetStack
**Return value** **Return value**
...@@ -115,7 +120,7 @@ Initiates an HTTP request to a given URL. This API uses an asynchronous callback ...@@ -115,7 +120,7 @@ Initiates an HTTP request to a given URL. This API uses an asynchronous callback
**Error codes** **Error codes**
| Code | Error Message | | ID | Error Message |
|---------|-------------------------------------------------------| |---------|-------------------------------------------------------|
| 401 | Parameter error. | | 401 | Parameter error. |
| 201 | Permission denied. | | 201 | Permission denied. |
...@@ -167,7 +172,7 @@ Initiates an HTTP request containing specified options to a given URL. This API ...@@ -167,7 +172,7 @@ Initiates an HTTP request containing specified options to a given URL. This API
**Error codes** **Error codes**
| Code | Error Message | | ID | Error Message |
|---------|-------------------------------------------------------| |---------|-------------------------------------------------------|
| 401 | Parameter error. | | 401 | Parameter error. |
| 201 | Permission denied. | | 201 | Permission denied. |
...@@ -258,7 +263,7 @@ Initiates an HTTP request containing specified options to a given URL. This API ...@@ -258,7 +263,7 @@ Initiates an HTTP request containing specified options to a given URL. This API
**Error codes** **Error codes**
| Code | Error Message | | ID | Error Message |
|---------|-------------------------------------------------------| |---------|-------------------------------------------------------|
| 401 | Parameter error. | | 401 | Parameter error. |
| 201 | Permission denied. | | 201 | Permission denied. |
...@@ -465,7 +470,7 @@ Specifies the type and value range of the optional parameters in the HTTP reques ...@@ -465,7 +470,7 @@ Specifies the type and value range of the optional parameters in the HTTP reques
| Name | Type | Mandatory| Description | | Name | Type | Mandatory| Description |
| -------------- | --------------------------------------------- | ---- | ------------------------------------------------------------ | | -------------- | --------------------------------------------- | ---- | ------------------------------------------------------------ |
| method | [RequestMethod](#requestmethod) | No | Request method. The default value is **GET**. | | method | [RequestMethod](#requestmethod) | No | Request method. The default value is **GET**. |
| extraData | string<sup>6+</sup> \| Object<sup>6+</sup> \| ArrayBuffer<sup>8+</sup> | No | Additional data for sending a request. This parameter is not used by default.<br>- If the HTTP request uses a POST or PUT method, this parameter serves as the content of the HTTP request and is encoded in UTF-8 format. If **'Content-Type'** is **'application/x-www-form-urlencoded'**, the data in the request body must be encoded in the format of **key1=value1&key2=value2&key3=value3** after URL transcoding.<sup>6+</sup><br>- If the HTTP request uses the GET, OPTIONS, DELETE, TRACE, or CONNECT method, this parameter serves as a supplement to HTTP request parameters. Parameters of the string type need to be encoded before being passed to the HTTP request. Parameters of the object type do not need to be precoded and will be directly concatenated to the URL. Parameters of the ArrayBuffer type will not be concatenated to the URL.<sup>6+</sup> | | extraData | string<sup>6+</sup> \| Object<sup>6+</sup> \| ArrayBuffer<sup>8+</sup> | No | Additional data for sending a request. This parameter is not used by default.<br>- If the HTTP request uses a POST or PUT method, this parameter serves as the content of the HTTP request and is encoded in UTF-8 format. If **'Content-Type'** is **'application/x-www-form-urlencoded'**, the data in the request body must be encoded in the format of **key1=value1&key2=value2&key3=value3** after URL transcoding.<br>- If the HTTP request uses the GET, OPTIONS, DELETE, TRACE, or CONNECT method, this parameter serves as a supplement to HTTP request parameters. Parameters of the string type need to be encoded before being passed to the HTTP request. Parameters of the object type do not need to be precoded and will be directly concatenated to the URL. Parameters of the ArrayBuffer type will not be concatenated to the URL.|
| expectDataType<sup>9+</sup> | [HttpDataType](#httpdatatype9) | No | Type of the returned data. This parameter is not used by default. If this parameter is set, the system returns the specified type of data preferentially.| | expectDataType<sup>9+</sup> | [HttpDataType](#httpdatatype9) | No | Type of the returned data. This parameter is not used by default. If this parameter is set, the system returns the specified type of data preferentially.|
| usingCache<sup>9+</sup> | boolean | No | Whether to use the cache. The default value is **true**. | | usingCache<sup>9+</sup> | boolean | No | Whether to use the cache. The default value is **true**. |
| priority<sup>9+</sup> | number | No | Priority. The value range is [1,1000]. The default value is **1**. | | priority<sup>9+</sup> | number | No | Priority. The value range is [1,1000]. The default value is **1**. |
......
# console (Log) # Console
> **NOTE**<br> The **console** module provides a simple debugging console, which is similar to the JavaScript console provided by the browser.
> The APIs of this module are no longer maintained since API version 7. You are advised to use ['@ohos.hilog](js-apis-hilog.md)' instead.
> **NOTE**
>
> The initial APIs of this module are supported since API version 3. Newly added APIs will be marked with a superscript to indicate their earliest API version.
## console.debug ## console.debug
debug(message: string): void debug(message: string, ...arguments: any[]): void
Prints debugging information in formatted output mode.
**System capability**: SystemCapability.ArkUI.ArkUI.Full
Prints debug logs. **Parameters**
- Parameters | Name | Type | Mandatory | Description |
| Name | Type | Mandatory | Description | | ------- | ------ | ---- | ----------- |
| ------- | ------ | ---- | ----------- | | message | string | Yes | Text to be printed.|
| message | string | Yes | Text to print.| | arguments | any[] | No | Arguments in the message or other information to be printed.|
**Example**
```js
const number = 5;
console.debug('count: %d', number); // Print the debugging information with arguments in the message replaced.
// count: 5
console.debug('count:', number); // Print the message and other information.
// count: 5
console.debug('count:'); // Print the message only.
// count:
```
## console.log ## console.log
log(message: string): void log(message: string, ...arguments: any[]): void
Prints debug logs. Prints log information in formatted output mode.
- Parameters **System capability**: SystemCapability.ArkUI.ArkUI.Full
| Name | Type | Mandatory | Description |
| ------- | ------ | ---- | ----------- |
| message | string | Yes | Text to print.|
**Parameters**
| Name | Type | Mandatory | Description |
| ------- | ------ | ---- | ----------- |
| message | string | Yes | Text to be printed.|
| arguments | any[] | No |Arguments in the message or other information to be printed.|
**Example**
```js
const number = 5;
console.log('count: %d', number); // Print the log information with arguments in the message replaced.
// count: 5
console.log('count:', number); // Print the message and other information.
// count: 5
console.log('count:'); // Print the message only.
// count:
```
## console.info ## console.info
info(message: string): void info(message: string, ...arguments: any[]): void
Prints log information in formatted output mode. This API is the alias of **console.log ()**.
Prints info-level logs. **System capability**: SystemCapability.ArkUI.ArkUI.Full
- Parameters **Parameters**
| Name | Type | Mandatory | Description |
| ------- | ------ | ---- | ----------- |
| message | string | Yes | Text to print.|
| Name | Type | Mandatory | Description |
| ------- | ------ | ---- | ----------- |
| message | string | Yes | Text to be printed.|
| arguments | any[] | No | Arguments in the message or other information to be printed.|
**Example**
```js
const number = 5;
console.info('count: %d', number); // Print the log information with arguments in the message replaced.
// count: 5
console.info('count:', number); // Print the message and other information.
// count: 5
console.info('count:'); // Print the message only.
// count:
```
## console.warn ## console.warn
warn(message: string): void warn(message: string, ...arguments: any[]): void
Prints warning information in formatted output mode.
**System capability**: SystemCapability.ArkUI.ArkUI.Full
Prints warn-level logs. **Parameters**
- Parameters | Name | Type | Mandatory | Description |
| Name | Type | Mandatory | Description | | ------- | ------ | ---- | ----------- |
| ------- | ------ | ---- | ----------- | | message | string | Yes | Warning information to be printed.|
| message | string | Yes | Text to print.| | arguments | any[] | No | Arguments in the message or other information to be printed.|
**Example**
```js
const str = "name should be string";
console.warn('warn: %d', str); // Print the warning information with arguments in the message replaced.
// warn: name should be string
console.warn('warn:', str); // Print the message and other information.
// warn: name should be string
console.warn('warn:'); // Print the message only.
// warn:
```
## console.error ## console.error
error(message: string): void error(message: string, ...arguments: any[]): void
Prints error-level logs. Prints error information in formatted output mode.
- Parameters **System capability**: SystemCapability.ArkUI.ArkUI.Full
| Name | Type | Mandatory | Description |
| ------- | ------ | ---- | ----------- |
| message | string | Yes | Text to print.|
**Parameters**
## Example | Name | Type | Mandatory | Description |
| ------- | ------ | ---- | ----------- |
| message | string | Yes | Error information to be printed.|
| arguments | any[] | No | Arguments in the message or other information to be printed.|
```
export default {
clickConsole(){
var versionCode = 1;
console.info('Hello World. The current version code is ' + versionCode);
console.log(`versionCode: ${versionCode}`);
/ / The following is supported since API version 6: console.log('versionCode:%d.', versionCode);
}
}
```
Switch to the HiLog window at the bottom of HUAWEI DevEco Studio. Specifically, select the current device and process, set the log level to Info, and enter Hello World in the search box. Logs that meet the search criteria are displayed, as shown in the following figure. **Example**
![en-us_image_0000001200913929](figures/en-us_image_0000001200913929.png) ```js
const str = "value is not defined";
console.error('error: %d', str); // Print the error information with arguments in the message replaced.
// error: value is not defined
console.error('error:', str); // Print the message and other information.
// error: value is not defined
console.error('error:'); // Print the message only.
// error:
```
...@@ -53,8 +53,7 @@ ethernet.setIfaceConfig("eth0", { ...@@ -53,8 +53,7 @@ ethernet.setIfaceConfig("eth0", {
route: "192.168.xx.xxx", route: "192.168.xx.xxx",
gateway: "192.168.xx.xxx", gateway: "192.168.xx.xxx",
netMask: "255.255.255.0", netMask: "255.255.255.0",
dnsServers: "1.1.1.1", dnsServers: "1.1.1.1"
domain: "2.2.2.2"
}, (error) => { }, (error) => {
if (error) { if (error) {
console.log("setIfaceConfig callback error = " + JSON.stringify(error)); console.log("setIfaceConfig callback error = " + JSON.stringify(error));
...@@ -111,8 +110,7 @@ ethernet.setIfaceConfig("eth0", { ...@@ -111,8 +110,7 @@ ethernet.setIfaceConfig("eth0", {
route: "192.168.xx.xxx", route: "192.168.xx.xxx",
gateway: "192.168.xx.xxx", gateway: "192.168.xx.xxx",
netMask: "255.255.255.0", netMask: "255.255.255.0",
dnsServers: "1.1.1.1", dnsServers: "1.1.1.1"
domain: "2.2.2.2"
}).then(() => { }).then(() => {
console.log("setIfaceConfig promise ok "); console.log("setIfaceConfig promise ok ");
}).catch(error => { }).catch(error => {
...@@ -163,7 +161,6 @@ ethernet.getIfaceConfig("eth0", (error, value) => { ...@@ -163,7 +161,6 @@ ethernet.getIfaceConfig("eth0", (error, value) => {
console.log("getIfaceConfig callback gateway = " + JSON.stringify(value.gateway)); console.log("getIfaceConfig callback gateway = " + JSON.stringify(value.gateway));
console.log("getIfaceConfig callback netMask = " + JSON.stringify(value.netMask)); console.log("getIfaceConfig callback netMask = " + JSON.stringify(value.netMask));
console.log("getIfaceConfig callback dnsServers = " + JSON.stringify(value.dnsServers)); console.log("getIfaceConfig callback dnsServers = " + JSON.stringify(value.dnsServers));
console.log("getIfaceConfig callback domain = " + JSON.stringify(value.domain));
} }
}); });
``` ```
...@@ -213,7 +210,6 @@ ethernet.getIfaceConfig("eth0").then((data) => { ...@@ -213,7 +210,6 @@ ethernet.getIfaceConfig("eth0").then((data) => {
console.log("getIfaceConfig promise gateway = " + JSON.stringify(data.gateway)); console.log("getIfaceConfig promise gateway = " + JSON.stringify(data.gateway));
console.log("getIfaceConfig promise netMask = " + JSON.stringify(data.netMask)); console.log("getIfaceConfig promise netMask = " + JSON.stringify(data.netMask));
console.log("getIfaceConfig promise dnsServers = " + JSON.stringify(data.dnsServers)); console.log("getIfaceConfig promise dnsServers = " + JSON.stringify(data.dnsServers));
console.log("getIfaceConfig promise domain = " + JSON.stringify(data.domain));
}).catch(error => { }).catch(error => {
console.log("getIfaceConfig promise error = " + JSON.stringify(error)); console.log("getIfaceConfig promise error = " + JSON.stringify(error));
}); });
...@@ -386,74 +382,6 @@ ethernet.getAllActiveIfaces().then((data) => { ...@@ -386,74 +382,6 @@ ethernet.getAllActiveIfaces().then((data) => {
}); });
``` ```
## ethernet.on('interfaceStateChange')<sup>10+</sup>
on(type: 'interfaceStateChange', callback: Callback\<{ iface: string, active: boolean }\>): void
Registers an observer for NIC hot swap events. This API uses an asynchronous callback to return the result.
**System API**: This is a system API.
**Required permission**: ohos.permission.GET_NETWORK_INFO
**System capability**: SystemCapability.Communication.NetManager.Ethernet
**Parameters**
| Name | Type | Mandatory| Description |
| -------- | --------------------------------------- | ---- | ---------- |
| type | string | Yes | Event type. The value is **interfaceStateChange**.|
| callback | AsyncCallback\<{ iface: string, active: boolean }\> | Yes | Callback used to return the result.<br>**iface**: NIC name.<br>**active**: whether the NIC is active. The value **true** indicates that the NIC is active, and the value **false** indicates the opposite.|
**Error codes**
| ID| Error Message |
| ------- | -------------------------------------------- |
| 201 | Permission denied. |
| 202 | Applicable only to system applications. |
| 401 | Parameter error. |
**Example**
```js
ethernet.on('interfaceStateChange', (data) => {
console.log('on interfaceSharingStateChange: ' + JSON.stringify(data));
});
```
## ethernet.off('interfaceStateChange')<sup>10+</sup>
off(type: 'interfaceStateChange', callback?: Callback\<{ iface: string, active: boolean }\>): void
Unregisters the observer for NIC hot swap events. This API uses an asynchronous callback to return the result.
**System API**: This is a system API.
**Required permission**: ohos.permission.GET_NETWORK_INFO
**System capability**: SystemCapability.Communication.NetManager.Ethernet
**Parameters**
| Name | Type | Mandatory| Description |
| -------- | --------------------------------------- | ---- | ---------- |
| type | string | Yes | Event type. The value is **interfaceStateChange**.|
| callback | AsyncCallback\<{ iface: string, active: boolean }> | No | Callback used to return the result.<br>**iface**: NIC name.<br>**active**: whether the NIC is active. The value **true** indicates that the NIC is active, and the value **false** indicates the opposite.|
**Error codes**
| ID| Error Message |
| ------- | -------------------------------------------- |
| 201 | Permission denied. |
| 202 | Applicable only to system applications. |
| 401 | Parameter error. |
**Example**
```js
ethernet.off('interfaceStateChange');
```
## InterfaceConfiguration ## InterfaceConfiguration
Defines the network configuration for the Ethernet connection. Defines the network configuration for the Ethernet connection.
......
...@@ -32,7 +32,7 @@ Obtains the RAT used in the CS and PS domains for the SIM card in the specified ...@@ -32,7 +32,7 @@ Obtains the RAT used in the CS and PS domains for the SIM card in the specified
**Error codes** **Error codes**
For details about the following error codes, see [Telephony Error Codes](../../reference/errorcodes/errorcode-telephony.md). For details about the error codes, see [Telephony Error Codes](../../reference/errorcodes/errorcode-telephony.md).
| ID| Error Message | | ID| Error Message |
| -------- | -------------------------------------------- | | -------- | -------------------------------------------- |
...@@ -77,7 +77,7 @@ Obtains the RAT used in the CS and PS domains for the SIM card in the specified ...@@ -77,7 +77,7 @@ Obtains the RAT used in the CS and PS domains for the SIM card in the specified
**Error codes** **Error codes**
For details about the following error codes, see [Telephony Error Codes](../../reference/errorcodes/errorcode-telephony.md). For details about the error codes, see [Telephony Error Codes](../../reference/errorcodes/errorcode-telephony.md).
| ID| Error Message | | ID| Error Message |
| -------- | -------------------------------------------- | | -------- | -------------------------------------------- |
...@@ -119,7 +119,7 @@ Obtains the network status. This API uses an asynchronous callback to return the ...@@ -119,7 +119,7 @@ Obtains the network status. This API uses an asynchronous callback to return the
**Error codes** **Error codes**
For details about the following error codes, see [Telephony Error Codes](../../reference/errorcodes/errorcode-telephony.md). For details about the error codes, see [Telephony Error Codes](../../reference/errorcodes/errorcode-telephony.md).
| ID| Error Message | | ID| Error Message |
| -------- | -------------------------------------------- | | -------- | -------------------------------------------- |
...@@ -158,7 +158,7 @@ Obtains the network status. This API uses an asynchronous callback to return the ...@@ -158,7 +158,7 @@ Obtains the network status. This API uses an asynchronous callback to return the
**Error codes** **Error codes**
For details about the following error codes, see [Telephony Error Codes](../../reference/errorcodes/errorcode-telephony.md). For details about the error codes, see [Telephony Error Codes](../../reference/errorcodes/errorcode-telephony.md).
| ID| Error Message | | ID| Error Message |
| -------- | -------------------------------------------- | | -------- | -------------------------------------------- |
...@@ -203,7 +203,7 @@ Obtains the network status. This API uses a promise to return the result. ...@@ -203,7 +203,7 @@ Obtains the network status. This API uses a promise to return the result.
**Error codes** **Error codes**
For details about the following error codes, see [Telephony Error Codes](../../reference/errorcodes/errorcode-telephony.md). For details about the error codes, see [Telephony Error Codes](../../reference/errorcodes/errorcode-telephony.md).
| ID| Error Message | | ID| Error Message |
| -------- | -------------------------------------------- | | -------- | -------------------------------------------- |
...@@ -244,7 +244,7 @@ Obtains the network selection mode of the SIM card in the specified slot. This A ...@@ -244,7 +244,7 @@ Obtains the network selection mode of the SIM card in the specified slot. This A
**Error codes** **Error codes**
For details about the following error codes, see [Telephony Error Codes](../../reference/errorcodes/errorcode-telephony.md). For details about the error codes, see [Telephony Error Codes](../../reference/errorcodes/errorcode-telephony.md).
| ID| Error Message | | ID| Error Message |
| -------- | -------------------------------------------- | | -------- | -------------------------------------------- |
...@@ -286,7 +286,7 @@ Obtains the network selection mode of the SIM card in the specified slot. This A ...@@ -286,7 +286,7 @@ Obtains the network selection mode of the SIM card in the specified slot. This A
**Error codes** **Error codes**
For details about the following error codes, see [Telephony Error Codes](../../reference/errorcodes/errorcode-telephony.md). For details about the error codes, see [Telephony Error Codes](../../reference/errorcodes/errorcode-telephony.md).
| ID| Error Message | | ID| Error Message |
| -------- | -------------------------------------------- | | -------- | -------------------------------------------- |
...@@ -326,7 +326,7 @@ Obtains the ISO country code of the network with which the SIM card in the speci ...@@ -326,7 +326,7 @@ Obtains the ISO country code of the network with which the SIM card in the speci
**Error codes** **Error codes**
For details about the following error codes, see [Telephony Error Codes](../../reference/errorcodes/errorcode-telephony.md). For details about the error codes, see [Telephony Error Codes](../../reference/errorcodes/errorcode-telephony.md).
| ID| Error Message | | ID| Error Message |
| -------- | -------------------------------------------- | | -------- | -------------------------------------------- |
...@@ -368,7 +368,7 @@ Obtains the ISO country code of the network with which the SIM card in the speci ...@@ -368,7 +368,7 @@ Obtains the ISO country code of the network with which the SIM card in the speci
**Error codes** **Error codes**
For details about the following error codes, see [Telephony Error Codes](../../reference/errorcodes/errorcode-telephony.md). For details about the error codes, see [Telephony Error Codes](../../reference/errorcodes/errorcode-telephony.md).
| ID| Error Message | | ID| Error Message |
| -------- | -------------------------------------------- | | -------- | -------------------------------------------- |
...@@ -403,11 +403,11 @@ Obtains the ID of the slot in which the primary card is located. This API uses a ...@@ -403,11 +403,11 @@ Obtains the ID of the slot in which the primary card is located. This API uses a
| Name | Type | Mandatory| Description | | Name | Type | Mandatory| Description |
| -------- | ------------------------------------------------------------ | ---- | ------------------------------------------------------------ | | -------- | ------------------------------------------------------------ | ---- | ------------------------------------------------------------ |
| callback | AsyncCallback\<number\> | Yes | Callback invoked to return the result.| | callback | AsyncCallback\<number\> | Yes | Callback used to return the result.|
**Error codes** **Error codes**
For details about the following error codes, see [Telephony Error Codes](../../reference/errorcodes/errorcode-telephony.md). For details about the error codes, see [Telephony Error Codes](../../reference/errorcodes/errorcode-telephony.md).
| ID| Error Message | | ID| Error Message |
| -------- | -------------------------------------------- | | -------- | -------------------------------------------- |
...@@ -441,7 +441,7 @@ Obtains the ID of the slot in which the primary card is located. This API uses a ...@@ -441,7 +441,7 @@ Obtains the ID of the slot in which the primary card is located. This API uses a
**Error codes** **Error codes**
For details about the following error codes, see [Telephony Error Codes](../../reference/errorcodes/errorcode-telephony.md). For details about the error codes, see [Telephony Error Codes](../../reference/errorcodes/errorcode-telephony.md).
| ID| Error Message | | ID| Error Message |
| -------- | -------------------------------------------- | | -------- | -------------------------------------------- |
...@@ -479,7 +479,7 @@ Obtains a list of signal strengths of the network with which the SIM card in the ...@@ -479,7 +479,7 @@ Obtains a list of signal strengths of the network with which the SIM card in the
**Error codes** **Error codes**
For details about the following error codes, see [Telephony Error Codes](../../reference/errorcodes/errorcode-telephony.md). For details about the error codes, see [Telephony Error Codes](../../reference/errorcodes/errorcode-telephony.md).
| ID| Error Message | | ID| Error Message |
| -------- | -------------------------------------------- | | -------- | -------------------------------------------- |
...@@ -521,7 +521,7 @@ Obtains a list of signal strengths of the network with which the SIM card in the ...@@ -521,7 +521,7 @@ Obtains a list of signal strengths of the network with which the SIM card in the
**Error codes** **Error codes**
For details about the following error codes, see [Telephony Error Codes](../../reference/errorcodes/errorcode-telephony.md). For details about the error codes, see [Telephony Error Codes](../../reference/errorcodes/errorcode-telephony.md).
| ID| Error Message | | ID| Error Message |
| -------- | -------------------------------------------- | | -------- | -------------------------------------------- |
...@@ -670,7 +670,7 @@ Checks whether the radio service is enabled on the primary SIM card. This API us ...@@ -670,7 +670,7 @@ Checks whether the radio service is enabled on the primary SIM card. This API us
**Error codes** **Error codes**
For details about the following error codes, see [Telephony Error Codes](../../reference/errorcodes/errorcode-telephony.md). For details about the error codes, see [Telephony Error Codes](../../reference/errorcodes/errorcode-telephony.md).
| ID| Error Message | | ID| Error Message |
| -------- | -------------------------------------------- | | -------- | -------------------------------------------- |
...@@ -709,7 +709,7 @@ Checks whether the radio service is enabled on the SIM card in the specified slo ...@@ -709,7 +709,7 @@ Checks whether the radio service is enabled on the SIM card in the specified slo
**Error codes** **Error codes**
For details about the following error codes, see [Telephony Error Codes](../../reference/errorcodes/errorcode-telephony.md). For details about the error codes, see [Telephony Error Codes](../../reference/errorcodes/errorcode-telephony.md).
| ID| Error Message | | ID| Error Message |
| -------- | -------------------------------------------- | | -------- | -------------------------------------------- |
...@@ -754,7 +754,7 @@ Checks whether the radio service is enabled on the SIM card in the specified slo ...@@ -754,7 +754,7 @@ Checks whether the radio service is enabled on the SIM card in the specified slo
**Error codes** **Error codes**
For details about the following error codes, see [Telephony Error Codes](../../reference/errorcodes/errorcode-telephony.md). For details about the error codes, see [Telephony Error Codes](../../reference/errorcodes/errorcode-telephony.md).
| ID| Error Message | | ID| Error Message |
| -------- | -------------------------------------------- | | -------- | -------------------------------------------- |
...@@ -795,7 +795,7 @@ Obtains the carrier name for the SIM card in the specified slot. This API uses a ...@@ -795,7 +795,7 @@ Obtains the carrier name for the SIM card in the specified slot. This API uses a
**Error codes** **Error codes**
For details about the following error codes, see [Telephony Error Codes](../../reference/errorcodes/errorcode-telephony.md). For details about the error codes, see [Telephony Error Codes](../../reference/errorcodes/errorcode-telephony.md).
| ID| Error Message | | ID| Error Message |
| -------- | -------------------------------------------- | | -------- | -------------------------------------------- |
...@@ -837,7 +837,7 @@ Obtains the carrier name for the SIM card in the specified slot. This API uses a ...@@ -837,7 +837,7 @@ Obtains the carrier name for the SIM card in the specified slot. This API uses a
**Error codes** **Error codes**
For details about the following error codes, see [Telephony Error Codes](../../reference/errorcodes/errorcode-telephony.md). For details about the error codes, see [Telephony Error Codes](../../reference/errorcodes/errorcode-telephony.md).
| ID| Error Message | | ID| Error Message |
| -------- | -------------------------------------------- | | -------- | -------------------------------------------- |
...@@ -880,7 +880,7 @@ Sets the ID of the slot in which the primary card is located. This API uses an a ...@@ -880,7 +880,7 @@ Sets the ID of the slot in which the primary card is located. This API uses an a
**Error codes** **Error codes**
For details about the following error codes, see [Telephony Error Codes](../../reference/errorcodes/errorcode-telephony.md). For details about the error codes, see [Telephony Error Codes](../../reference/errorcodes/errorcode-telephony.md).
| ID| Error Message | | ID| Error Message |
| -------- | -------------------------------------------- | | -------- | -------------------------------------------- |
...@@ -928,7 +928,7 @@ Sets the ID of the slot in which the primary card is located. This API uses a pr ...@@ -928,7 +928,7 @@ Sets the ID of the slot in which the primary card is located. This API uses a pr
**Error codes** **Error codes**
For details about the following error codes, see [Telephony Error Codes](../../reference/errorcodes/errorcode-telephony.md). For details about the error codes, see [Telephony Error Codes](../../reference/errorcodes/errorcode-telephony.md).
| ID| Error Message | | ID| Error Message |
| -------- | -------------------------------------------- | | -------- | -------------------------------------------- |
...@@ -972,7 +972,7 @@ Obtains the IMEI of the SIM card in a card slot. This API uses an asynchronous c ...@@ -972,7 +972,7 @@ Obtains the IMEI of the SIM card in a card slot. This API uses an asynchronous c
**Error codes** **Error codes**
For details about the following error codes, see [Telephony Error Codes](../../reference/errorcodes/errorcode-telephony.md). For details about the error codes, see [Telephony Error Codes](../../reference/errorcodes/errorcode-telephony.md).
| ID| Error Message | | ID| Error Message |
| -------- | -------------------------------------------- | | -------- | -------------------------------------------- |
...@@ -996,7 +996,7 @@ radio.getIMEI((err, data) => { ...@@ -996,7 +996,7 @@ radio.getIMEI((err, data) => {
getIMEI(slotId: number, callback: AsyncCallback<string\>): void getIMEI(slotId: number, callback: AsyncCallback<string\>): void
Obtains the IMEI of the SIM card in the specified card slot. This API uses an asynchronous callback to return the result. Obtains the IMEI of the SIM card in a card slot. This API uses an asynchronous callback to return the result.
**System API**: This is a system API. **System API**: This is a system API.
...@@ -1013,7 +1013,7 @@ Obtains the IMEI of the SIM card in the specified card slot. This API uses an as ...@@ -1013,7 +1013,7 @@ Obtains the IMEI of the SIM card in the specified card slot. This API uses an as
**Error codes** **Error codes**
For details about the following error codes, see [Telephony Error Codes](../../reference/errorcodes/errorcode-telephony.md). For details about the error codes, see [Telephony Error Codes](../../reference/errorcodes/errorcode-telephony.md).
| ID| Error Message | | ID| Error Message |
| -------- | -------------------------------------------- | | -------- | -------------------------------------------- |
...@@ -1060,7 +1060,7 @@ Obtains the IMEI of the SIM card in the specified card slot. This API uses a pro ...@@ -1060,7 +1060,7 @@ Obtains the IMEI of the SIM card in the specified card slot. This API uses a pro
**Error codes** **Error codes**
For details about the following error codes, see [Telephony Error Codes](../../reference/errorcodes/errorcode-telephony.md). For details about the error codes, see [Telephony Error Codes](../../reference/errorcodes/errorcode-telephony.md).
| ID| Error Message | | ID| Error Message |
| -------- | -------------------------------------------- | | -------- | -------------------------------------------- |
...@@ -1103,7 +1103,7 @@ Obtains the MEID of the SIM card in a card slot. This API uses an asynchronous c ...@@ -1103,7 +1103,7 @@ Obtains the MEID of the SIM card in a card slot. This API uses an asynchronous c
**Error codes** **Error codes**
For details about the following error codes, see [Telephony Error Codes](../../reference/errorcodes/errorcode-telephony.md). For details about the error codes, see [Telephony Error Codes](../../reference/errorcodes/errorcode-telephony.md).
| ID| Error Message | | ID| Error Message |
| -------- | -------------------------------------------- | | -------- | -------------------------------------------- |
...@@ -1127,7 +1127,7 @@ radio.getMEID((err, data) => { ...@@ -1127,7 +1127,7 @@ radio.getMEID((err, data) => {
getMEID(slotId: number, callback: AsyncCallback<string\>): void getMEID(slotId: number, callback: AsyncCallback<string\>): void
Obtains the MEID of the SIM card in the specified card slot. This API uses an asynchronous callback to return the result. Obtains the MEID of the SIM card in a card slot. This API uses an asynchronous callback to return the result.
**System API**: This is a system API. **System API**: This is a system API.
...@@ -1144,7 +1144,7 @@ Obtains the MEID of the SIM card in the specified card slot. This API uses an as ...@@ -1144,7 +1144,7 @@ Obtains the MEID of the SIM card in the specified card slot. This API uses an as
**Error codes** **Error codes**
For details about the following error codes, see [Telephony Error Codes](../../reference/errorcodes/errorcode-telephony.md). For details about the error codes, see [Telephony Error Codes](../../reference/errorcodes/errorcode-telephony.md).
| ID| Error Message | | ID| Error Message |
| -------- | -------------------------------------------- | | -------- | -------------------------------------------- |
...@@ -1191,7 +1191,7 @@ Obtains the MEID of the SIM card in the specified card slot. This API uses a pro ...@@ -1191,7 +1191,7 @@ Obtains the MEID of the SIM card in the specified card slot. This API uses a pro
**Error codes** **Error codes**
For details about the following error codes, see [Telephony Error Codes](../../reference/errorcodes/errorcode-telephony.md). For details about the error codes, see [Telephony Error Codes](../../reference/errorcodes/errorcode-telephony.md).
| ID| Error Message | | ID| Error Message |
| -------- | -------------------------------------------- | | -------- | -------------------------------------------- |
...@@ -1234,7 +1234,7 @@ Obtains the unique device ID of the SIM card in a card slot. This API uses an as ...@@ -1234,7 +1234,7 @@ Obtains the unique device ID of the SIM card in a card slot. This API uses an as
**Error codes** **Error codes**
For details about the following error codes, see [Telephony Error Codes](../../reference/errorcodes/errorcode-telephony.md). For details about the error codes, see [Telephony Error Codes](../../reference/errorcodes/errorcode-telephony.md).
| ID| Error Message | | ID| Error Message |
| -------- | -------------------------------------------- | | -------- | -------------------------------------------- |
...@@ -1258,7 +1258,7 @@ radio.getUniqueDeviceId((err, data) => { ...@@ -1258,7 +1258,7 @@ radio.getUniqueDeviceId((err, data) => {
getUniqueDeviceId(slotId: number, callback: AsyncCallback<string\>): void getUniqueDeviceId(slotId: number, callback: AsyncCallback<string\>): void
Obtains the unique device ID of the SIM card in the specified card slot. This API uses an asynchronous callback to return the result. Obtains the unique device ID of the SIM card in a card slot. This API uses an asynchronous callback to return the result.
**System API**: This is a system API. **System API**: This is a system API.
...@@ -1275,7 +1275,7 @@ Obtains the unique device ID of the SIM card in the specified card slot. This AP ...@@ -1275,7 +1275,7 @@ Obtains the unique device ID of the SIM card in the specified card slot. This AP
**Error codes** **Error codes**
For details about the following error codes, see [Telephony Error Codes](../../reference/errorcodes/errorcode-telephony.md). For details about the error codes, see [Telephony Error Codes](../../reference/errorcodes/errorcode-telephony.md).
| ID| Error Message | | ID| Error Message |
| -------- | -------------------------------------------- | | -------- | -------------------------------------------- |
...@@ -1322,7 +1322,7 @@ Obtains the unique device ID of the SIM card in the specified card slot. This AP ...@@ -1322,7 +1322,7 @@ Obtains the unique device ID of the SIM card in the specified card slot. This AP
**Error codes** **Error codes**
For details about the following error codes, see [Telephony Error Codes](../../reference/errorcodes/errorcode-telephony.md). For details about the error codes, see [Telephony Error Codes](../../reference/errorcodes/errorcode-telephony.md).
| ID| Error Message | | ID| Error Message |
| -------- | -------------------------------------------- | | -------- | -------------------------------------------- |
...@@ -1365,7 +1365,7 @@ Sends a cell location update request. This API uses an asynchronous callback to ...@@ -1365,7 +1365,7 @@ Sends a cell location update request. This API uses an asynchronous callback to
**Error codes** **Error codes**
For details about the following error codes, see [Telephony Error Codes](../../reference/errorcodes/errorcode-telephony.md). For details about the error codes, see [Telephony Error Codes](../../reference/errorcodes/errorcode-telephony.md).
| ID| Error Message | | ID| Error Message |
| -------- | -------------------------------------------- | | -------- | -------------------------------------------- |
...@@ -1388,7 +1388,7 @@ radio.sendUpdateCellLocationRequest((err) => { ...@@ -1388,7 +1388,7 @@ radio.sendUpdateCellLocationRequest((err) => {
sendUpdateCellLocationRequest\(slotId: number, callback: AsyncCallback<void\>\): void sendUpdateCellLocationRequest\(slotId: number, callback: AsyncCallback<void\>\): void
Sends a cell location update request for the SIM card in the specified slot. This API uses an asynchronous callback to return the result. Sends a cell location update request. This API uses an asynchronous callback to return the result.
**System API**: This is a system API. **System API**: This is a system API.
...@@ -1405,7 +1405,7 @@ Sends a cell location update request for the SIM card in the specified slot. Thi ...@@ -1405,7 +1405,7 @@ Sends a cell location update request for the SIM card in the specified slot. Thi
**Error codes** **Error codes**
For details about the following error codes, see [Telephony Error Codes](../../reference/errorcodes/errorcode-telephony.md). For details about the error codes, see [Telephony Error Codes](../../reference/errorcodes/errorcode-telephony.md).
| ID| Error Message | | ID| Error Message |
| -------- | -------------------------------------------- | | -------- | -------------------------------------------- |
...@@ -1451,7 +1451,7 @@ Sends a cell location update request for the SIM card in the specified slot. Thi ...@@ -1451,7 +1451,7 @@ Sends a cell location update request for the SIM card in the specified slot. Thi
**Error codes** **Error codes**
For details about the following error codes, see [Telephony Error Codes](../../reference/errorcodes/errorcode-telephony.md). For details about the error codes, see [Telephony Error Codes](../../reference/errorcodes/errorcode-telephony.md).
| ID| Error Message | | ID| Error Message |
| -------- | -------------------------------------------- | | -------- | -------------------------------------------- |
...@@ -1493,7 +1493,7 @@ Obtains cell information. This API uses an asynchronous callback to return the r ...@@ -1493,7 +1493,7 @@ Obtains cell information. This API uses an asynchronous callback to return the r
**Error codes** **Error codes**
For details about the following error codes, see [Telephony Error Codes](../../reference/errorcodes/errorcode-telephony.md). For details about the error codes, see [Telephony Error Codes](../../reference/errorcodes/errorcode-telephony.md).
| ID| Error Message | | ID| Error Message |
| -------- | -------------------------------------------- | | -------- | -------------------------------------------- |
...@@ -1517,7 +1517,7 @@ radio.getCellInformation((err, data) => { ...@@ -1517,7 +1517,7 @@ radio.getCellInformation((err, data) => {
getCellInformation(slotId: number, callback: AsyncCallback<Array<CellInformation\>\>): void getCellInformation(slotId: number, callback: AsyncCallback<Array<CellInformation\>\>): void
Obtains cell information for the SIM card in the specified slot. This API uses an asynchronous callback to return the result. Obtains cell information. This API uses an asynchronous callback to return the result.
**System API**: This is a system API. **System API**: This is a system API.
...@@ -1534,7 +1534,7 @@ Obtains cell information for the SIM card in the specified slot. This API uses a ...@@ -1534,7 +1534,7 @@ Obtains cell information for the SIM card in the specified slot. This API uses a
**Error codes** **Error codes**
For details about the following error codes, see [Telephony Error Codes](../../reference/errorcodes/errorcode-telephony.md). For details about the error codes, see [Telephony Error Codes](../../reference/errorcodes/errorcode-telephony.md).
| ID| Error Message | | ID| Error Message |
| -------- | -------------------------------------------- | | -------- | -------------------------------------------- |
...@@ -1581,7 +1581,7 @@ Obtains cell information for the SIM card in the specified slot. This API uses a ...@@ -1581,7 +1581,7 @@ Obtains cell information for the SIM card in the specified slot. This API uses a
**Error codes** **Error codes**
For details about the following error codes, see [Telephony Error Codes](../../reference/errorcodes/errorcode-telephony.md). For details about the error codes, see [Telephony Error Codes](../../reference/errorcodes/errorcode-telephony.md).
| ID| Error Message | | ID| Error Message |
| -------- | -------------------------------------------- | | -------- | -------------------------------------------- |
...@@ -1625,7 +1625,7 @@ Sets the network selection mode. This API uses an asynchronous callback to retur ...@@ -1625,7 +1625,7 @@ Sets the network selection mode. This API uses an asynchronous callback to retur
**Error codes** **Error codes**
For details about the following error codes, see [Telephony Error Codes](../../reference/errorcodes/errorcode-telephony.md). For details about the error codes, see [Telephony Error Codes](../../reference/errorcodes/errorcode-telephony.md).
| ID| Error Message | | ID| Error Message |
| -------- | -------------------------------------------- | | -------- | -------------------------------------------- |
...@@ -1682,7 +1682,7 @@ Sets the network selection mode. This API uses a promise to return the result. ...@@ -1682,7 +1682,7 @@ Sets the network selection mode. This API uses a promise to return the result.
**Error codes** **Error codes**
For details about the following error codes, see [Telephony Error Codes](../../reference/errorcodes/errorcode-telephony.md). For details about the error codes, see [Telephony Error Codes](../../reference/errorcodes/errorcode-telephony.md).
| ID| Error Message | | ID| Error Message |
| -------- | -------------------------------------------- | | -------- | -------------------------------------------- |
...@@ -1737,7 +1737,7 @@ Obtains network search information for the SIM card in the specified slot. This ...@@ -1737,7 +1737,7 @@ Obtains network search information for the SIM card in the specified slot. This
**Error codes** **Error codes**
For details about the following error codes, see [Telephony Error Codes](../../reference/errorcodes/errorcode-telephony.md). For details about the error codes, see [Telephony Error Codes](../../reference/errorcodes/errorcode-telephony.md).
| ID| Error Message | | ID| Error Message |
| -------- | -------------------------------------------- | | -------- | -------------------------------------------- |
...@@ -1782,7 +1782,7 @@ Obtains network search information for the SIM card in the specified slot. This ...@@ -1782,7 +1782,7 @@ Obtains network search information for the SIM card in the specified slot. This
**Error codes** **Error codes**
For details about the following error codes, see [Telephony Error Codes](../../reference/errorcodes/errorcode-telephony.md). For details about the error codes, see [Telephony Error Codes](../../reference/errorcodes/errorcode-telephony.md).
| ID| Error Message | | ID| Error Message |
| -------- | -------------------------------------------- | | -------- | -------------------------------------------- |
...@@ -1822,7 +1822,7 @@ Obtains the NR option mode. This API uses an asynchronous callback to return the ...@@ -1822,7 +1822,7 @@ Obtains the NR option mode. This API uses an asynchronous callback to return the
**Error codes** **Error codes**
For details about the following error codes, see [Telephony Error Codes](../../reference/errorcodes/errorcode-telephony.md). For details about the error codes, see [Telephony Error Codes](../../reference/errorcodes/errorcode-telephony.md).
| ID| Error Message | | ID| Error Message |
| -------- | -------------------------------------------- | | -------- | -------------------------------------------- |
...@@ -1845,7 +1845,7 @@ radio.getNrOptionMode((err, data) => { ...@@ -1845,7 +1845,7 @@ radio.getNrOptionMode((err, data) => {
getNrOptionMode(slotId: number, callback: AsyncCallback<NrOptionMode\>): void getNrOptionMode(slotId: number, callback: AsyncCallback<NrOptionMode\>): void
Obtains the NR option mode for the SIM card in the specified slot. This API uses an asynchronous callback to return the result. Obtains the NR option mode. This API uses an asynchronous callback to return the result.
**System API**: This is a system API. **System API**: This is a system API.
...@@ -1860,7 +1860,7 @@ Obtains the NR option mode for the SIM card in the specified slot. This API uses ...@@ -1860,7 +1860,7 @@ Obtains the NR option mode for the SIM card in the specified slot. This API uses
**Error codes** **Error codes**
For details about the following error codes, see [Telephony Error Codes](../../reference/errorcodes/errorcode-telephony.md). For details about the error codes, see [Telephony Error Codes](../../reference/errorcodes/errorcode-telephony.md).
| ID| Error Message | | ID| Error Message |
| -------- | -------------------------------------------- | | -------- | -------------------------------------------- |
...@@ -1904,7 +1904,7 @@ Obtains the NR option mode for the SIM card in the specified slot. This API uses ...@@ -1904,7 +1904,7 @@ Obtains the NR option mode for the SIM card in the specified slot. This API uses
**Error codes** **Error codes**
For details about the following error codes, see [Telephony Error Codes](../../reference/errorcodes/errorcode-telephony.md). For details about the error codes, see [Telephony Error Codes](../../reference/errorcodes/errorcode-telephony.md).
| ID| Error Message | | ID| Error Message |
| -------- | -------------------------------------------- | | -------- | -------------------------------------------- |
...@@ -1946,7 +1946,7 @@ Turns on the radio function. This API uses an asynchronous callback to return th ...@@ -1946,7 +1946,7 @@ Turns on the radio function. This API uses an asynchronous callback to return th
**Error codes** **Error codes**
For details about the following error codes, see [Telephony Error Codes](../../reference/errorcodes/errorcode-telephony.md). For details about the error codes, see [Telephony Error Codes](../../reference/errorcodes/errorcode-telephony.md).
| ID| Error Message | | ID| Error Message |
| -------- | -------------------------------------------- | | -------- | -------------------------------------------- |
...@@ -1970,7 +1970,7 @@ radio.turnOnRadio((err) => { ...@@ -1970,7 +1970,7 @@ radio.turnOnRadio((err) => {
turnOnRadio(slotId: number, callback: AsyncCallback<void\>): void turnOnRadio(slotId: number, callback: AsyncCallback<void\>): void
Turns on the radio function for the SIM card in the specified slot. This API uses an asynchronous callback to return the result. Turns on the radio function. This API uses an asynchronous callback to return the result.
**System API**: This is a system API. **System API**: This is a system API.
...@@ -1987,7 +1987,7 @@ Turns on the radio function for the SIM card in the specified slot. This API use ...@@ -1987,7 +1987,7 @@ Turns on the radio function for the SIM card in the specified slot. This API use
**Error codes** **Error codes**
For details about the following error codes, see [Telephony Error Codes](../../reference/errorcodes/errorcode-telephony.md). For details about the error codes, see [Telephony Error Codes](../../reference/errorcodes/errorcode-telephony.md).
| ID| Error Message | | ID| Error Message |
| -------- | -------------------------------------------- | | -------- | -------------------------------------------- |
...@@ -2034,7 +2034,7 @@ Turns on the radio function for the SIM card in the specified slot. This API use ...@@ -2034,7 +2034,7 @@ Turns on the radio function for the SIM card in the specified slot. This API use
**Error codes** **Error codes**
For details about the following error codes, see [Telephony Error Codes](../../reference/errorcodes/errorcode-telephony.md). For details about the error codes, see [Telephony Error Codes](../../reference/errorcodes/errorcode-telephony.md).
| ID| Error Message | | ID| Error Message |
| -------- | -------------------------------------------- | | -------- | -------------------------------------------- |
...@@ -2076,7 +2076,7 @@ Turns off the radio function. This API uses an asynchronous callback to return t ...@@ -2076,7 +2076,7 @@ Turns off the radio function. This API uses an asynchronous callback to return t
**Error codes** **Error codes**
For details about the following error codes, see [Telephony Error Codes](../../reference/errorcodes/errorcode-telephony.md). For details about the error codes, see [Telephony Error Codes](../../reference/errorcodes/errorcode-telephony.md).
| ID| Error Message | | ID| Error Message |
| -------- | -------------------------------------------- | | -------- | -------------------------------------------- |
...@@ -2100,7 +2100,7 @@ radio.turnOffRadio((err) => { ...@@ -2100,7 +2100,7 @@ radio.turnOffRadio((err) => {
turnOffRadio(slotId: number, callback: AsyncCallback<void\>): void turnOffRadio(slotId: number, callback: AsyncCallback<void\>): void
Turns off the radio function for the SIM card in the specified slot. This API uses an asynchronous callback to return the result. Turns off the radio function. This API uses an asynchronous callback to return the result.
**System API**: This is a system API. **System API**: This is a system API.
...@@ -2117,7 +2117,7 @@ Turns off the radio function for the SIM card in the specified slot. This API us ...@@ -2117,7 +2117,7 @@ Turns off the radio function for the SIM card in the specified slot. This API us
**Error codes** **Error codes**
For details about the following error codes, see [Telephony Error Codes](../../reference/errorcodes/errorcode-telephony.md). For details about the error codes, see [Telephony Error Codes](../../reference/errorcodes/errorcode-telephony.md).
| ID| Error Message | | ID| Error Message |
| -------- | -------------------------------------------- | | -------- | -------------------------------------------- |
...@@ -2164,7 +2164,7 @@ Turns off the radio function for the SIM card in the specified slot. This API us ...@@ -2164,7 +2164,7 @@ Turns off the radio function for the SIM card in the specified slot. This API us
**Error codes** **Error codes**
For details about the following error codes, see [Telephony Error Codes](../../reference/errorcodes/errorcode-telephony.md). For details about the error codes, see [Telephony Error Codes](../../reference/errorcodes/errorcode-telephony.md).
| ID| Error Message | | ID| Error Message |
| -------- | -------------------------------------------- | | -------- | -------------------------------------------- |
...@@ -2208,7 +2208,7 @@ Sets the preferred network for the SIM card in the specified slot. This API uses ...@@ -2208,7 +2208,7 @@ Sets the preferred network for the SIM card in the specified slot. This API uses
**Error codes** **Error codes**
For details about the following error codes, see [Telephony Error Codes](../../reference/errorcodes/errorcode-telephony.md). For details about the error codes, see [Telephony Error Codes](../../reference/errorcodes/errorcode-telephony.md).
| ID| Error Message | | ID| Error Message |
| -------- | -------------------------------------------- | | -------- | -------------------------------------------- |
...@@ -2255,7 +2255,7 @@ Sets the preferred network for the SIM card in the specified slot. This API uses ...@@ -2255,7 +2255,7 @@ Sets the preferred network for the SIM card in the specified slot. This API uses
**Error codes** **Error codes**
For details about the following error codes, see [Telephony Error Codes](../../reference/errorcodes/errorcode-telephony.md). For details about the error codes, see [Telephony Error Codes](../../reference/errorcodes/errorcode-telephony.md).
| ID| Error Message | | ID| Error Message |
| -------- | -------------------------------------------- | | -------- | -------------------------------------------- |
...@@ -2298,7 +2298,7 @@ Obtains the preferred network for the SIM card in the specified slot. This API u ...@@ -2298,7 +2298,7 @@ Obtains the preferred network for the SIM card in the specified slot. This API u
**Error codes** **Error codes**
For details about the following error codes, see [Telephony Error Codes](../../reference/errorcodes/errorcode-telephony.md). For details about the error codes, see [Telephony Error Codes](../../reference/errorcodes/errorcode-telephony.md).
| ID| Error Message | | ID| Error Message |
| -------- | -------------------------------------------- | | -------- | -------------------------------------------- |
...@@ -2343,7 +2343,7 @@ Obtains the preferred network for the SIM card in the specified slot. This API u ...@@ -2343,7 +2343,7 @@ Obtains the preferred network for the SIM card in the specified slot. This API u
**Error codes** **Error codes**
For details about the following error codes, see [Telephony Error Codes](../../reference/errorcodes/errorcode-telephony.md). For details about the error codes, see [Telephony Error Codes](../../reference/errorcodes/errorcode-telephony.md).
| ID| Error Message | | ID| Error Message |
| -------- | -------------------------------------------- | | -------- | -------------------------------------------- |
...@@ -2387,7 +2387,7 @@ Obtains the IMS registration status of the specified IMS service type for the SI ...@@ -2387,7 +2387,7 @@ Obtains the IMS registration status of the specified IMS service type for the SI
**Error codes** **Error codes**
For details about the following error codes, see [Telephony Error Codes](../../reference/errorcodes/errorcode-telephony.md). For details about the error codes, see [Telephony Error Codes](../../reference/errorcodes/errorcode-telephony.md).
| ID| Error Message | | ID| Error Message |
| -------- | -------------------------------------------- | | -------- | -------------------------------------------- |
...@@ -2433,7 +2433,7 @@ Obtains the IMS registration status of the specified IMS service type for the SI ...@@ -2433,7 +2433,7 @@ Obtains the IMS registration status of the specified IMS service type for the SI
**Error codes** **Error codes**
For details about the following error codes, see [Telephony Error Codes](../../reference/errorcodes/errorcode-telephony.md). For details about the error codes, see [Telephony Error Codes](../../reference/errorcodes/errorcode-telephony.md).
| ID| Error Message | | ID| Error Message |
| -------- | -------------------------------------------- | | -------- | -------------------------------------------- |
...@@ -2478,7 +2478,7 @@ Enables listening for **imsRegStateChange** events. This API uses an asynchronou ...@@ -2478,7 +2478,7 @@ Enables listening for **imsRegStateChange** events. This API uses an asynchronou
**Error codes** **Error codes**
For details about the following error codes, see [Telephony Error Codes](../../reference/errorcodes/errorcode-telephony.md). For details about the error codes, see [Telephony Error Codes](../../reference/errorcodes/errorcode-telephony.md).
| ID| Error Message | | ID| Error Message |
| -------- | -------------------------------------------- | | -------- | -------------------------------------------- |
...@@ -2516,11 +2516,11 @@ Disables listening for **imsRegStateChange** events. This API uses an asynchrono ...@@ -2516,11 +2516,11 @@ Disables listening for **imsRegStateChange** events. This API uses an asynchrono
| type | string | Yes | IMS registration status changes. | | type | string | Yes | IMS registration status changes. |
| slotId | number | Yes | Card slot ID.<br>- **0**: card slot 1<br>- **1**: card slot 2| | slotId | number | Yes | Card slot ID.<br>- **0**: card slot 1<br>- **1**: card slot 2|
| imsType | [ImsServiceType](#imsservicetype9) | Yes | IMS service type. | | imsType | [ImsServiceType](#imsservicetype9) | Yes | IMS service type. |
| callback | Callback<[ImsRegInfo](#imsreginfo9)> | No | Callback used to return the result. | | callback | Callback<[ImsRegInfo](#imsreginfo9)> | No | Callback used to return the result. If this parameter is not set, the API unsubscribes from all callbacks.|
**Error codes** **Error codes**
For details about the following error codes, see [Telephony Error Codes](../../reference/errorcodes/errorcode-telephony.md). For details about the error codes, see [Telephony Error Codes](../../reference/errorcodes/errorcode-telephony.md).
| ID| Error Message | | ID| Error Message |
| -------- | -------------------------------------------- | | -------- | -------------------------------------------- |
......
...@@ -6821,8 +6821,8 @@ For details about the error codes, see [RPC Error Codes](../errorcodes/errorcode ...@@ -6821,8 +6821,8 @@ For details about the error codes, see [RPC Error Codes](../errorcodes/errorcode
} }
let deathRecipient = new MyDeathRecipient(); let deathRecipient = new MyDeathRecipient();
try { try {
proxy.registerDeathRecippient(deathRecipient, 0); proxy.registerDeathRecipient(deathRecipient, 0);
proxy.unregisterDeathRecippient(deathRecipient, 0); proxy.unregisterDeathRecipient(deathRecipient, 0);
} catch(error) { } catch(error) {
console.info("proxy register deathRecipient fail, errorCode " + error.code); console.info("proxy register deathRecipient fail, errorCode " + error.code);
console.info("proxy register deathRecipient fail, errorMessage " + error.message); console.info("proxy register deathRecipient fail, errorMessage " + error.message);
...@@ -6893,7 +6893,7 @@ Removes the callback used to receive death notifications of the remote object. ...@@ -6893,7 +6893,7 @@ Removes the callback used to receive death notifications of the remote object.
} }
} }
let deathRecipient = new MyDeathRecipient(); let deathRecipient = new MyDeathRecipient();
proxy.addDeathRecippient(deathRecipient, 0); proxy.addDeathRecipient(deathRecipient, 0);
proxy.removeDeathRecipient(deathRecipient, 0); proxy.removeDeathRecipient(deathRecipient, 0);
``` ```
......
...@@ -32,11 +32,11 @@ Creates a **UDPSocket** object. ...@@ -32,11 +32,11 @@ Creates a **UDPSocket** object.
let udp = socket.constructUDPSocketInstance(); let udp = socket.constructUDPSocketInstance();
``` ```
## UDPSocket ## UDPSocket<sup>7+</sup>
Defines a **UDPSocket** connection. Before invoking UDPSocket APIs, you need to call [socket.constructUDPSocketInstance](#socketconstructudpsocketinstance) to create a **UDPSocket** object. Defines a **UDPSocket** connection. Before invoking UDPSocket APIs, you need to call [socket.constructUDPSocketInstance](#socketconstructudpsocketinstance) to create a **UDPSocket** object.
### bind ### bind<sup>7+</sup>
bind(address: NetAddress, callback: AsyncCallback\<void\>): void bind(address: NetAddress, callback: AsyncCallback\<void\>): void
...@@ -76,7 +76,7 @@ udp.bind({address: '192.168.xx.xxx', port: xxxx, family: 1}, err => { ...@@ -76,7 +76,7 @@ udp.bind({address: '192.168.xx.xxx', port: xxxx, family: 1}, err => {
}) })
``` ```
### bind ### bind<sup>7+</sup>
bind(address: NetAddress): Promise\<void\> bind(address: NetAddress): Promise\<void\>
...@@ -120,7 +120,7 @@ promise.then(() => { ...@@ -120,7 +120,7 @@ promise.then(() => {
}); });
``` ```
### send ### send<sup>7+</sup>
send(options: UDPSendOptions, callback: AsyncCallback\<void\>): void send(options: UDPSendOptions, callback: AsyncCallback\<void\>): void
...@@ -166,7 +166,7 @@ udp.send({ ...@@ -166,7 +166,7 @@ udp.send({
}) })
``` ```
### send ### send<sup>7+</sup>
send(options: UDPSendOptions): Promise\<void\> send(options: UDPSendOptions): Promise\<void\>
...@@ -216,7 +216,7 @@ promise.then(() => { ...@@ -216,7 +216,7 @@ promise.then(() => {
}); });
``` ```
### close ### close<sup>7+</sup>
close(callback: AsyncCallback\<void\>): void close(callback: AsyncCallback\<void\>): void
...@@ -245,7 +245,7 @@ udp.close(err => { ...@@ -245,7 +245,7 @@ udp.close(err => {
}) })
``` ```
### close ### close<sup>7+</sup>
close(): Promise\<void\> close(): Promise\<void\>
...@@ -273,7 +273,7 @@ promise.then(() => { ...@@ -273,7 +273,7 @@ promise.then(() => {
}); });
``` ```
### getState ### getState<sup>7+</sup>
getState(callback: AsyncCallback\<SocketStateBase\>): void getState(callback: AsyncCallback\<SocketStateBase\>): void
...@@ -318,7 +318,7 @@ udp.bind({address: '192.168.xx.xxx', port: xxxx, family: 1}, err => { ...@@ -318,7 +318,7 @@ udp.bind({address: '192.168.xx.xxx', port: xxxx, family: 1}, err => {
}) })
``` ```
### getState ### getState<sup>7+</sup>
getState(): Promise\<SocketStateBase\> getState(): Promise\<SocketStateBase\>
...@@ -357,7 +357,7 @@ promise.then(err => { ...@@ -357,7 +357,7 @@ promise.then(err => {
}); });
``` ```
### setExtraOptions ### setExtraOptions<sup>7+</sup>
setExtraOptions(options: UDPExtraOptions, callback: AsyncCallback\<void\>): void setExtraOptions(options: UDPExtraOptions, callback: AsyncCallback\<void\>): void
...@@ -410,7 +410,7 @@ udp.bind({address: '192.168.xx.xxx', port: xxxx, family: 1}, err => { ...@@ -410,7 +410,7 @@ udp.bind({address: '192.168.xx.xxx', port: xxxx, family: 1}, err => {
}) })
``` ```
### setExtraOptions ### setExtraOptions<sup>7+</sup>
setExtraOptions(options: UDPExtraOptions): Promise\<void\> setExtraOptions(options: UDPExtraOptions): Promise\<void\>
...@@ -466,7 +466,7 @@ promise.then(() => { ...@@ -466,7 +466,7 @@ promise.then(() => {
}); });
``` ```
### on('message') ### on('message')<sup>7+</sup>
on(type: 'message', callback: Callback\<{message: ArrayBuffer, remoteInfo: SocketRemoteInfo}\>): void on(type: 'message', callback: Callback\<{message: ArrayBuffer, remoteInfo: SocketRemoteInfo}\>): void
...@@ -490,7 +490,7 @@ udp.on('message', value => { ...@@ -490,7 +490,7 @@ udp.on('message', value => {
}); });
``` ```
### off('message') ### off('message')<sup>7+</sup>
off(type: 'message', callback?: Callback\<{message: ArrayBuffer, remoteInfo: SocketRemoteInfo}\>): void off(type: 'message', callback?: Callback\<{message: ArrayBuffer, remoteInfo: SocketRemoteInfo}\>): void
...@@ -521,7 +521,7 @@ udp.off('message', callback); ...@@ -521,7 +521,7 @@ udp.off('message', callback);
udp.off('message'); udp.off('message');
``` ```
### on('listening' | 'close') ### on('listening' | 'close')<sup>7+</sup>
on(type: 'listening' | 'close', callback: Callback\<void\>): void on(type: 'listening' | 'close', callback: Callback\<void\>): void
...@@ -548,7 +548,7 @@ udp.on('close', () => { ...@@ -548,7 +548,7 @@ udp.on('close', () => {
}); });
``` ```
### off('listening' | 'close') ### off('listening' | 'close')<sup>7+</sup>
off(type: 'listening' | 'close', callback?: Callback\<void\>): void off(type: 'listening' | 'close', callback?: Callback\<void\>): void
...@@ -586,7 +586,7 @@ udp.off('close', callback2); ...@@ -586,7 +586,7 @@ udp.off('close', callback2);
udp.off('close'); udp.off('close');
``` ```
### on('error') ### on('error')<sup>7+</sup>
on(type: 'error', callback: ErrorCallback): void on(type: 'error', callback: ErrorCallback): void
...@@ -610,7 +610,7 @@ udp.on('error', err => { ...@@ -610,7 +610,7 @@ udp.on('error', err => {
}); });
``` ```
### off('error') ### off('error')<sup>7+</sup>
off(type: 'error', callback?: ErrorCallback): void off(type: 'error', callback?: ErrorCallback): void
...@@ -641,7 +641,7 @@ udp.off('error', callback); ...@@ -641,7 +641,7 @@ udp.off('error', callback);
udp.off('error'); udp.off('error');
``` ```
## NetAddress ## NetAddress<sup>7+</sup>
Defines the destination address. Defines the destination address.
...@@ -653,7 +653,7 @@ Defines the destination address. ...@@ -653,7 +653,7 @@ Defines the destination address.
| port | number | No | Port number. The value ranges from **0** to **65535**. If this parameter is not specified, the system randomly allocates a port. | | port | number | No | Port number. The value ranges from **0** to **65535**. If this parameter is not specified, the system randomly allocates a port. |
| family | number | No | Network protocol type.<br>- **1**: IPv4<br>- **2**: IPv6<br>The default value is **1**.| | family | number | No | Network protocol type.<br>- **1**: IPv4<br>- **2**: IPv6<br>The default value is **1**.|
## UDPSendOptions ## UDPSendOptions<sup>7+</sup>
Defines the parameters for sending data over the UDPSocket connection. Defines the parameters for sending data over the UDPSocket connection.
...@@ -664,7 +664,7 @@ Defines the parameters for sending data over the UDPSocket connection. ...@@ -664,7 +664,7 @@ Defines the parameters for sending data over the UDPSocket connection.
| data | string \| ArrayBuffer<sup>7+</sup> | Yes | Data to send. | | data | string \| ArrayBuffer<sup>7+</sup> | Yes | Data to send. |
| address | [NetAddress](#netaddress) | Yes | Destination address.| | address | [NetAddress](#netaddress) | Yes | Destination address.|
## UDPExtraOptions ## UDPExtraOptions<sup>7+</sup>
Defines other properties of the UDPSocket connection. Defines other properties of the UDPSocket connection.
...@@ -673,12 +673,12 @@ Defines other properties of the UDPSocket connection. ...@@ -673,12 +673,12 @@ Defines other properties of the UDPSocket connection.
| Name | Type | Mandatory| Description | | Name | Type | Mandatory| Description |
| ----------------- | ------- | ---- | -------------------------------- | | ----------------- | ------- | ---- | -------------------------------- |
| broadcast | boolean | No | Whether to send broadcast messages. The default value is **false**. | | broadcast | boolean | No | Whether to send broadcast messages. The default value is **false**. |
| receiveBufferSize | number | No | Size of the receive buffer, in bytes. | | receiveBufferSize | number | No | Size of the receive buffer, in bytes. The default value is **0**. |
| sendBufferSize | number | No | Size of the send buffer, in bytes. | | sendBufferSize | number | No | Size of the send buffer, in bytes. The default value is **0**. |
| reuseAddress | boolean | No | Whether to reuse addresses. The default value is **false**. | | reuseAddress | boolean | No | Whether to reuse addresses. The default value is **false**. |
| socketTimeout | number | No | Timeout duration of the UDPSocket connection, in ms.| | socketTimeout | number | No | Timeout duration of the UDPSocket connection, in ms. The default value is **0**.|
## SocketStateBase ## SocketStateBase<sup>7+</sup>
Defines the status of the socket connection. Defines the status of the socket connection.
...@@ -690,7 +690,7 @@ Defines the status of the socket connection. ...@@ -690,7 +690,7 @@ Defines the status of the socket connection.
| isClose | boolean | Yes | Whether the connection is in the closed state.| | isClose | boolean | Yes | Whether the connection is in the closed state.|
| isConnected | boolean | Yes | Whether the connection is in the connected state.| | isConnected | boolean | Yes | Whether the connection is in the connected state.|
## SocketRemoteInfo ## SocketRemoteInfo<sup>7+</sup>
Defines information about the socket connection. Defines information about the socket connection.
...@@ -709,7 +709,7 @@ The UDP error code mapping is in the format of 2301000 + Linux kernel error code ...@@ -709,7 +709,7 @@ The UDP error code mapping is in the format of 2301000 + Linux kernel error code
For details about error codes, see [Socket Error Codes](../errorcodes/errorcode-net-socket.md). For details about error codes, see [Socket Error Codes](../errorcodes/errorcode-net-socket.md).
## socket.constructTCPSocketInstance ## socket.constructTCPSocketInstance<sup>7+</sup>
constructTCPSocketInstance(): TCPSocket constructTCPSocketInstance(): TCPSocket
...@@ -729,11 +729,11 @@ Creates a **TCPSocket** object. ...@@ -729,11 +729,11 @@ Creates a **TCPSocket** object.
let tcp = socket.constructTCPSocketInstance(); let tcp = socket.constructTCPSocketInstance();
``` ```
## TCPSocket ## TCPSocket<sup>7+</sup>
Defines a TCPSocket connection. Before invoking TCPSocket APIs, you need to call [socket.constructTCPSocketInstance](#socketconstructtcpsocketinstance) to create a **TCPSocket** object. Defines a TCPSocket connection. Before invoking TCPSocket APIs, you need to call [socket.constructTCPSocketInstance](#socketconstructtcpsocketinstance) to create a **TCPSocket** object.
### bind ### bind<sup>7+</sup>
bind(address: NetAddress, callback: AsyncCallback\<void\>): void bind(address: NetAddress, callback: AsyncCallback\<void\>): void
...@@ -773,7 +773,7 @@ tcp.bind({address: '192.168.xx.xxx', port: xxxx, family: 1}, err => { ...@@ -773,7 +773,7 @@ tcp.bind({address: '192.168.xx.xxx', port: xxxx, family: 1}, err => {
}) })
``` ```
### bind ### bind<sup>7+</sup>
bind(address: NetAddress): Promise\<void\> bind(address: NetAddress): Promise\<void\>
...@@ -817,7 +817,7 @@ promise.then(() => { ...@@ -817,7 +817,7 @@ promise.then(() => {
}); });
``` ```
### connect ### connect<sup>7+</sup>
connect(options: TCPConnectOptions, callback: AsyncCallback\<void\>): void connect(options: TCPConnectOptions, callback: AsyncCallback\<void\>): void
...@@ -857,7 +857,7 @@ tcp.connect({address: {address: '192.168.xx.xxx', port: xxxx, family: 1}, timeou ...@@ -857,7 +857,7 @@ tcp.connect({address: {address: '192.168.xx.xxx', port: xxxx, family: 1}, timeou
}) })
``` ```
### connect ### connect<sup>7+</sup>
connect(options: TCPConnectOptions): Promise\<void\> connect(options: TCPConnectOptions): Promise\<void\>
...@@ -898,7 +898,7 @@ promise.then(() => { ...@@ -898,7 +898,7 @@ promise.then(() => {
}); });
``` ```
### send ### send<sup>7+</sup>
send(options: TCPSendOptions, callback: AsyncCallback\<void\>): void send(options: TCPSendOptions, callback: AsyncCallback\<void\>): void
...@@ -944,7 +944,7 @@ tcp.connect({address: {address: '192.168.xx.xxx', port: xxxx, family: 1}, timeou ...@@ -944,7 +944,7 @@ tcp.connect({address: {address: '192.168.xx.xxx', port: xxxx, family: 1}, timeou
}) })
``` ```
### send ### send<sup>7+</sup>
send(options: TCPSendOptions): Promise\<void\> send(options: TCPSendOptions): Promise\<void\>
...@@ -996,7 +996,7 @@ promise1.then(() => { ...@@ -996,7 +996,7 @@ promise1.then(() => {
}); });
``` ```
### close ### close<sup>7+</sup>
close(callback: AsyncCallback\<void\>): void close(callback: AsyncCallback\<void\>): void
...@@ -1031,7 +1031,7 @@ tcp.close(err => { ...@@ -1031,7 +1031,7 @@ tcp.close(err => {
}) })
``` ```
### close ### close<sup>7+</sup>
close(): Promise\<void\> close(): Promise\<void\>
...@@ -1065,7 +1065,7 @@ promise.then(() => { ...@@ -1065,7 +1065,7 @@ promise.then(() => {
}); });
``` ```
### getRemoteAddress ### getRemoteAddress<sup>7+</sup>
getRemoteAddress(callback: AsyncCallback\<NetAddress\>): void getRemoteAddress(callback: AsyncCallback\<NetAddress\>): void
...@@ -1106,7 +1106,7 @@ tcp.connect({address: {address: '192.168.xx.xxx', port: xxxx, family: 1}, timeou ...@@ -1106,7 +1106,7 @@ tcp.connect({address: {address: '192.168.xx.xxx', port: xxxx, family: 1}, timeou
}); });
``` ```
### getRemoteAddress ### getRemoteAddress<sup>7+</sup>
getRemoteAddress(): Promise\<NetAddress\> getRemoteAddress(): Promise\<NetAddress\>
...@@ -1149,7 +1149,7 @@ promise1.then(() => { ...@@ -1149,7 +1149,7 @@ promise1.then(() => {
}); });
``` ```
### getState ### getState<sup>7+</sup>
getState(callback: AsyncCallback\<SocketStateBase\>): void getState(callback: AsyncCallback\<SocketStateBase\>): void
...@@ -1190,7 +1190,7 @@ let promise = tcp.connect({address: {address: '192.168.xx.xxx', port: xxxx, fami ...@@ -1190,7 +1190,7 @@ let promise = tcp.connect({address: {address: '192.168.xx.xxx', port: xxxx, fami
}); });
``` ```
### getState ### getState<sup>7+</sup>
getState(): Promise\<SocketStateBase\> getState(): Promise\<SocketStateBase\>
...@@ -1233,7 +1233,7 @@ promise.then(() => { ...@@ -1233,7 +1233,7 @@ promise.then(() => {
}); });
``` ```
### setExtraOptions ### setExtraOptions<sup>7+</sup>
setExtraOptions(options: TCPExtraOptions, callback: AsyncCallback\<void\>): void setExtraOptions(options: TCPExtraOptions, callback: AsyncCallback\<void\>): void
...@@ -1285,7 +1285,7 @@ let promise = tcp.connect({address: {address: '192.168.xx.xxx', port: xxxx, fami ...@@ -1285,7 +1285,7 @@ let promise = tcp.connect({address: {address: '192.168.xx.xxx', port: xxxx, fami
}); });
``` ```
### setExtraOptions ### setExtraOptions<sup>7+</sup>
setExtraOptions(options: TCPExtraOptions): Promise\<void\> setExtraOptions(options: TCPExtraOptions): Promise\<void\>
...@@ -1344,7 +1344,7 @@ promise.then(() => { ...@@ -1344,7 +1344,7 @@ promise.then(() => {
}); });
``` ```
### on('message') ### on('message')<sup>7+</sup>
on(type: 'message', callback: Callback<{message: ArrayBuffer, remoteInfo: SocketRemoteInfo}\>): void on(type: 'message', callback: Callback<{message: ArrayBuffer, remoteInfo: SocketRemoteInfo}\>): void
...@@ -1368,7 +1368,7 @@ tcp.on('message', value => { ...@@ -1368,7 +1368,7 @@ tcp.on('message', value => {
}); });
``` ```
### off('message') ### off('message')<sup>7+</sup>
off(type: 'message', callback?: Callback<{message: ArrayBuffer, remoteInfo: SocketRemoteInfo}\>): void off(type: 'message', callback?: Callback<{message: ArrayBuffer, remoteInfo: SocketRemoteInfo}\>): void
...@@ -1399,7 +1399,7 @@ tcp.off('message', callback); ...@@ -1399,7 +1399,7 @@ tcp.off('message', callback);
tcp.off('message'); tcp.off('message');
``` ```
### on('connect' | 'close') ### on('connect' | 'close')<sup>7+</sup>
on(type: 'connect' | 'close', callback: Callback\<void\>): void on(type: 'connect' | 'close', callback: Callback\<void\>): void
...@@ -1426,7 +1426,7 @@ tcp.on('close', data => { ...@@ -1426,7 +1426,7 @@ tcp.on('close', data => {
}); });
``` ```
### off('connect' | 'close') ### off('connect' | 'close')<sup>7+</sup>
off(type: 'connect' | 'close', callback?: Callback\<void\>): void off(type: 'connect' | 'close', callback?: Callback\<void\>): void
...@@ -1464,7 +1464,7 @@ tcp.off('close', callback2); ...@@ -1464,7 +1464,7 @@ tcp.off('close', callback2);
tcp.off('close'); tcp.off('close');
``` ```
### on('error') ### on('error')<sup>7+</sup>
on(type: 'error', callback: ErrorCallback): void on(type: 'error', callback: ErrorCallback): void
...@@ -1488,7 +1488,7 @@ tcp.on('error', err => { ...@@ -1488,7 +1488,7 @@ tcp.on('error', err => {
}); });
``` ```
### off('error') ### off('error')<sup>7+</sup>
off(type: 'error', callback?: ErrorCallback): void off(type: 'error', callback?: ErrorCallback): void
...@@ -1519,7 +1519,7 @@ tcp.off('error', callback); ...@@ -1519,7 +1519,7 @@ tcp.off('error', callback);
tcp.off('error'); tcp.off('error');
``` ```
## TCPConnectOptions ## TCPConnectOptions<sup>7+</sup>
Defines TCPSocket connection parameters. Defines TCPSocket connection parameters.
...@@ -1530,7 +1530,7 @@ Defines TCPSocket connection parameters. ...@@ -1530,7 +1530,7 @@ Defines TCPSocket connection parameters.
| address | [NetAddress](#netaddress) | Yes | Bound IP address and port number. | | address | [NetAddress](#netaddress) | Yes | Bound IP address and port number. |
| timeout | number | No | Timeout duration of the TCPSocket connection, in ms.| | timeout | number | No | Timeout duration of the TCPSocket connection, in ms.|
## TCPSendOptions ## TCPSendOptions<sup>7+</sup>
Defines the parameters for sending data over the TCPSocket connection. Defines the parameters for sending data over the TCPSocket connection.
...@@ -1541,7 +1541,7 @@ Defines the parameters for sending data over the TCPSocket connection. ...@@ -1541,7 +1541,7 @@ Defines the parameters for sending data over the TCPSocket connection.
| data | string\| ArrayBuffer<sup>7+</sup> | Yes | Data to send. | | data | string\| ArrayBuffer<sup>7+</sup> | Yes | Data to send. |
| encoding | string | No | Character encoding format. The options are as follows: **UTF-8**, **UTF-16BE**, **UTF-16LE**, **UTF-16**, **US-AECII**, and **ISO-8859-1**. The default value is **UTF-8**.| | encoding | string | No | Character encoding format. The options are as follows: **UTF-8**, **UTF-16BE**, **UTF-16LE**, **UTF-16**, **US-AECII**, and **ISO-8859-1**. The default value is **UTF-8**.|
## TCPExtraOptions ## TCPExtraOptions<sup>7+</sup>
Defines other properties of the TCPSocket connection. Defines other properties of the TCPSocket connection.
...@@ -1553,10 +1553,10 @@ Defines other properties of the TCPSocket connection. ...@@ -1553,10 +1553,10 @@ Defines other properties of the TCPSocket connection.
| OOBInline | boolean | No | Whether to enable OOBInline. The default value is **false**. | | OOBInline | boolean | No | Whether to enable OOBInline. The default value is **false**. |
| TCPNoDelay | boolean | No | Whether to enable no-delay on the TCPSocket connection. The default value is **false**. | | TCPNoDelay | boolean | No | Whether to enable no-delay on the TCPSocket connection. The default value is **false**. |
| socketLinger | Object | Yes | Socket linger.<br>- **on**: whether to enable socket linger. The value true means to enable socket linger and false means the opposite.<br>- **linger**: linger time, in ms. The value ranges from **0** to **65535**.<br>Specify this parameter only when **on** is set to **true**.| | socketLinger | Object | Yes | Socket linger.<br>- **on**: whether to enable socket linger. The value true means to enable socket linger and false means the opposite.<br>- **linger**: linger time, in ms. The value ranges from **0** to **65535**.<br>Specify this parameter only when **on** is set to **true**.|
| receiveBufferSize | number | No | Size of the receive buffer, in bytes. | | receiveBufferSize | number | No | Size of the receive buffer, in bytes. The default value is **0**. |
| sendBufferSize | number | No | Size of the send buffer, in bytes. | | sendBufferSize | number | No | Size of the send buffer, in bytes. The default value is **0**. |
| reuseAddress | boolean | No | Whether to reuse addresses. The default value is **false**. | | reuseAddress | boolean | No | Whether to reuse addresses. The default value is **false**. |
| socketTimeout | number | No | Timeout duration of the UDPSocket connection, in ms. | | socketTimeout | number | No | Timeout duration of the TCPSocket connection, in ms. The default value is **0**. |
## Description of TCP Error Codes ## Description of TCP Error Codes
...@@ -1853,7 +1853,7 @@ promise.then(() => { ...@@ -1853,7 +1853,7 @@ promise.then(() => {
}); });
``` ```
### on('message') ### on('message')<sup>9+</sup>
on(type: 'message', callback: Callback<{message: ArrayBuffer, remoteInfo: SocketRemoteInfo}>): void; on(type: 'message', callback: Callback<{message: ArrayBuffer, remoteInfo: SocketRemoteInfo}>): void;
...@@ -1884,7 +1884,7 @@ tls.on('message', value => { ...@@ -1884,7 +1884,7 @@ tls.on('message', value => {
}); });
``` ```
### off('message') ### off('message')<sup>9+</sup>
off(type: 'message', callback?: Callback\<{message: ArrayBuffer, remoteInfo: SocketRemoteInfo}\>): void off(type: 'message', callback?: Callback\<{message: ArrayBuffer, remoteInfo: SocketRemoteInfo}\>): void
...@@ -1920,7 +1920,7 @@ tls.on('message', callback); ...@@ -1920,7 +1920,7 @@ tls.on('message', callback);
// You can pass the callback of the on method to cancel listening for a certain type of callback. If you do not pass the callback, you will cancel listening for all callbacks. // You can pass the callback of the on method to cancel listening for a certain type of callback. If you do not pass the callback, you will cancel listening for all callbacks.
tls.off('message', callback); tls.off('message', callback);
``` ```
### on('connect' | 'close') ### on('connect' | 'close')<sup>9+</sup>
on(type: 'connect' | 'close', callback: Callback\<void\>): void on(type: 'connect' | 'close', callback: Callback\<void\>): void
...@@ -1947,7 +1947,7 @@ tls.on('close', () => { ...@@ -1947,7 +1947,7 @@ tls.on('close', () => {
}); });
``` ```
### off('connect' | 'close') ### off('connect' | 'close')<sup>9+</sup>
off(type: 'connect' | 'close', callback?: Callback\<void\>): void off(type: 'connect' | 'close', callback?: Callback\<void\>): void
...@@ -1984,7 +1984,7 @@ tls.on('close', callback2); ...@@ -1984,7 +1984,7 @@ tls.on('close', callback2);
tls.off('close', callback2); tls.off('close', callback2);
``` ```
### on('error') ### on('error')<sup>9+</sup>
on(type: 'error', callback: ErrorCallback): void on(type: 'error', callback: ErrorCallback): void
...@@ -2008,7 +2008,7 @@ tls.on('error', err => { ...@@ -2008,7 +2008,7 @@ tls.on('error', err => {
}); });
``` ```
### off('error') ### off('error')<sup>9+</sup>
off(type: 'error', callback?: ErrorCallback): void off(type: 'error', callback?: ErrorCallback): void
...@@ -2783,7 +2783,7 @@ Defines TLS connection options. ...@@ -2783,7 +2783,7 @@ Defines TLS connection options.
| -------------- | ------------------------------------- | --- |-------------- | | -------------- | ------------------------------------- | --- |-------------- |
| address | [NetAddress](#netaddress) | Yes | Gateway address. | | address | [NetAddress](#netaddress) | Yes | Gateway address. |
| secureOptions | [TLSSecureOptions](#tlssecureoptions9) | Yes| TLS security options.| | secureOptions | [TLSSecureOptions](#tlssecureoptions9) | Yes| TLS security options.|
| ALPNProtocols | Array\<string\> | No| Application Layer Protocol Negotiation (ALPN) protocols. | | ALPNProtocols | Array\<string\> | No| ALPN protocol. The value range is ["spdy/1", "http/1.1"]. The default value is **[]**. |
## TLSSecureOptions<sup>9+</sup> ## TLSSecureOptions<sup>9+</sup>
...@@ -2797,10 +2797,10 @@ Defines TLS security options. The CA certificate is mandatory, and other paramet ...@@ -2797,10 +2797,10 @@ Defines TLS security options. The CA certificate is mandatory, and other paramet
| cert | string | No| Digital certificate of the local client. | | cert | string | No| Digital certificate of the local client. |
| key | string | No| Private key of the local digital certificate. | | key | string | No| Private key of the local digital certificate. |
| password | string | No| Password for reading the private key. | | password | string | No| Password for reading the private key. |
| protocols | [Protocol](#protocol9) \|Array\<[Protocol](#protocol9)\> | No| TLS protocol version. | | protocols | [Protocol](#protocol9) \|Array\<[Protocol](#protocol9)\> | No| TLS protocol version. The default value is **TLSv1.2**. |
| useRemoteCipherPrefer | boolean | No| Whether to use the remote cipher suite preferentially. | | useRemoteCipherPrefer | boolean | No| Whether to use the remote cipher suite preferentially. |
| signatureAlgorithms | string | No| Signing algorithm used during communication. | | signatureAlgorithms | string | No| Signing algorithm used during communication. The default value is **""**. |
| cipherSuite | string | No| Cipher suite used during communication. | | cipherSuite | string | No| Cipher suite used during communication. The default value is **""**. |
## Protocol<sup>9+</sup> ## Protocol<sup>9+</sup>
......
...@@ -27,7 +27,7 @@ Obtains the current charging state and battery level. ...@@ -27,7 +27,7 @@ Obtains the current charging state and battery level.
| Name| Type| Mandatory| Description| | Name| Type| Mandatory| Description|
| -------- | -------- | -------- | -------- | | -------- | -------- | -------- | -------- |
| options | [GetStatusOptions](#getstatusoptions) | No| Object that contains the API calling result.| | options | [GetStatusOptions](#getstatusoptions) | No| Object that contains the API calling result. This parameter is optional and is left blank by default.|
**Example** **Example**
...@@ -44,15 +44,15 @@ battery.getStatus({ ...@@ -44,15 +44,15 @@ battery.getStatus({
## GetStatusOptions ## GetStatusOptions
Obtains the object that contains the API calling result. Object that contains the API calling result.
**System capability**: SystemCapability.PowerManager.BatteryManager.Core **System capability**: SystemCapability.PowerManager.BatteryManager.Core
| Name | Type | Mandatory| Description | | Name | Type | Mandatory| Description |
| -------- | --------------------------------------------------- | ---- | ------------------------------------------------------------ | | -------- | --------------------------------------------------- | ---- | ------------------------------------------------------------ |
| success | (data: [BatteryResponse](#batteryresponse)) => void | No | Called when API call is successful. **data** is a return value of the [BatteryResponse](#batteryresponse) type.| | success | (data: [BatteryResponse](#batteryresponse)) => void | No | Called when an API call is successful. **data** is a return value of the [BatteryResponse](#batteryresponse) type.|
| fail | (data: string, code: number) => void | No | Called when API call has failed. **data** indicates the error information, and **code** indicates the error code. | | fail | (data: string, code: number) => void | No | Called when an API call has failed. **data** indicates the error information, and **code** indicates the error code. |
| complete | () => void | No | Called when API call is complete. | | complete | () => void | No | Called when an API call is complete. |
## BatteryResponse ## BatteryResponse
...@@ -60,7 +60,7 @@ Defines a response that returns the charging status and remaining power of the d ...@@ -60,7 +60,7 @@ Defines a response that returns the charging status and remaining power of the d
**System capability**: SystemCapability.PowerManager.BatteryManager.Core **System capability**: SystemCapability.PowerManager.BatteryManager.Core
| Name| Type| Readable | Writable | Description| | Name| Type| Readable| Writable| Description|
| -------- | -------- | -------- | -------- | -------- | | -------- | -------- | -------- | -------- | -------- |
| charging | boolean | Yes | No | Whether the battery is being charged.| | charging | boolean | Yes| No| Whether the battery is being charged.|
| level | number | Yes | No | Current battery level, which ranges from **0.00** to **1.00**.| | level | number | Yes| No| Current battery level, which ranges from **0.00** to **1.00**.|
...@@ -28,7 +28,7 @@ Obtains the current screen brightness. ...@@ -28,7 +28,7 @@ Obtains the current screen brightness.
| Name| Type| Mandatory| Description| | Name| Type| Mandatory| Description|
| -------- | -------- | -------- | -------- | | -------- | -------- | -------- | -------- |
| options | [GetBrightnessOptions](#getbrightnessoptions) | No | Options for obtaining the screen brightness.| | options | [GetBrightnessOptions](#getbrightnessoptions) | No | Options for obtaining the screen brightness. This parameter is optional and is left blank by default.|
**Example** **Example**
...@@ -56,7 +56,7 @@ Sets the screen brightness. ...@@ -56,7 +56,7 @@ Sets the screen brightness.
| Name| Type| Mandatory| Description| | Name| Type| Mandatory| Description|
| -------- | -------- | -------- | -------- | | -------- | -------- | -------- | -------- |
| options | [SetBrightnessOptions](#setbrightnessoptions) | No | Options for setting the screen brightness.| | options | [SetBrightnessOptions](#setbrightnessoptions) | No | Options for setting the screen brightness. This parameter is optional and is left blank by default.|
**Example** **Example**
...@@ -85,7 +85,7 @@ Obtains the screen brightness adjustment mode. ...@@ -85,7 +85,7 @@ Obtains the screen brightness adjustment mode.
| Name| Type| Mandatory| Description| | Name| Type| Mandatory| Description|
| -------- | -------- | -------- | -------- | | -------- | -------- | -------- | -------- |
| options | [GetBrightnessModeOptions](#getbrightnessmodeoptions) | No| Options for obtaining the screen brightness mode.| | options | [GetBrightnessModeOptions](#getbrightnessmodeoptions) | No| Options for obtaining the screen brightness mode. This parameter is optional and is left blank by default.|
**Example** **Example**
...@@ -112,7 +112,7 @@ Sets the screen brightness adjustment mode. ...@@ -112,7 +112,7 @@ Sets the screen brightness adjustment mode.
**Parameters** **Parameters**
| Name| Type| Mandatory| Description| | Name| Type| Mandatory| Description|
| -------- | -------- | -------- | -------- | | -------- | -------- | -------- | -------- |
| options | [SetBrightnessModeOptions](#setbrightnessmodeoptions) | No | Options for setting the screen brightness mode.| | options | [SetBrightnessModeOptions](#setbrightnessmodeoptions) | No | Options for setting the screen brightness mode. This parameter is optional and is left blank by default.|
**Example** **Example**
...@@ -143,7 +143,7 @@ Sets whether to always keep the screen on. Call this API in **onShow()**. ...@@ -143,7 +143,7 @@ Sets whether to always keep the screen on. Call this API in **onShow()**.
| Name| Type| Mandatory| Description| | Name| Type| Mandatory| Description|
| -------- | -------- | -------- | -------- | | -------- | -------- | -------- | -------- |
| options | [SetKeepScreenOnOptions](#setkeepscreenonoptions) | No| Options for setting the screen to be steady on.| | options | [SetKeepScreenOnOptions](#setkeepscreenonoptions) | No| Options for setting the screen to be steady on. This parameter is optional and is left blank by default.|
**Example** **Example**
...@@ -166,9 +166,9 @@ Defines the options for obtaining the screen brightness. ...@@ -166,9 +166,9 @@ Defines the options for obtaining the screen brightness.
| Name | Type | Mandatory| Description | | Name | Type | Mandatory| Description |
| -------- | --------------------------------------------------------- | ---- | ------------------------------------------------------------ | | -------- | --------------------------------------------------------- | ---- | ------------------------------------------------------------ |
| success | (data: [BrightnessResponse](#brightnessresponse)) => void | No | Called when API call is successful. **data** is a return value of the [BrightnessResponse](#brightnessresponse) type.| | success | (data: [BrightnessResponse](#brightnessresponse)) => void | No | Called when an API call is successful. **data** is a return value of the [BrightnessResponse](#brightnessresponse) type.|
| fail | (data: string, code: number) => void | No | Called when API call has failed. **data** indicates the error information, and **code** indicates the error code. | | fail | (data: string, code: number) => void | No | Called when an API call has failed. **data** indicates the error information, and **code** indicates the error code. |
| complete | () => void | No | Called when the API call is complete. | | complete | () => void | No | Called when an API call is complete. |
## SetBrightnessOptions ## SetBrightnessOptions
...@@ -178,10 +178,10 @@ Defines the options for setting the screen brightness. ...@@ -178,10 +178,10 @@ Defines the options for setting the screen brightness.
| Name | Type | Mandatory| Description | | Name | Type | Mandatory| Description |
| -------- | ------------------------------------ | ---- | ------------------------------------------------------------ | | -------- | ------------------------------------ | ---- | ------------------------------------------------------------ |
| value | number | Yes | Screen brightness. The value is an integer ranging from **1** to **255**.<br>-&nbsp;If the value is less than or equal to **0**, value **1** will be used.<br>-&nbsp;If the value is greater than **255**, value **255** will be used.<br>-&nbsp;If the value contains decimals, the integral part of the value will be used. For example, if value **8.1** is set, value **8** will be used.| | value | number | Yes | Screen brightness. The value is an integer ranging from **1** to **255**.<br>- If the value is less than or equal to **0**, value **1** will be used.<br>- If the value is greater than **255**, value **255** will be used.<br>- If the value contains decimals, the integral part of the value will be used. For example, if value **8.1** is set, value **8** will be used.|
| success | () => void | No | Callback upon a successful API call. | | success | () => void | No | Called when an API call is successful. |
| fail | (data: string, code: number) => void | No | Called when API call has failed. **data** indicates the error information, and **code** indicates the error code. | | fail | (data: string, code: number) => void | No | Called when an API call has failed. **data** indicates the error information, and **code** indicates the error code. |
| complete | () => void | No | Called when the API call is complete. | | complete | () => void | No | Called when an API call is complete. |
## BrightnessResponse ## BrightnessResponse
...@@ -201,9 +201,9 @@ Defines the options for obtaining the screen brightness mode. ...@@ -201,9 +201,9 @@ Defines the options for obtaining the screen brightness mode.
| Name | Type | Mandatory| Description | | Name | Type | Mandatory| Description |
| -------- | ------------------------------------------------------------ | ---- | ------------------------------------------------------------ | | -------- | ------------------------------------------------------------ | ---- | ------------------------------------------------------------ |
| success | (data: [BrightnessModeResponse](#brightnessmoderesponse)) => void | No | Called when API call is successful. **data** is a return value of the [BrightnessModeResponse](#brightnessmoderesponse) type.| | success | (data: [BrightnessModeResponse](#brightnessmoderesponse)) => void | No | Called when an API call is successful. **data** is a return value of the [BrightnessModeResponse](#brightnessmoderesponse) type.|
| fail | (data: string, code: number) => void | No | Called when API call has failed. **data** indicates the error information, and **code** indicates the error code. | | fail | (data: string, code: number) => void | No | Called when an API call has failed. **data** indicates the error information, and **code** indicates the error code. |
| complete | () => void | No | Called when the API call is complete. | | complete | () => void | No | Called when an API call is complete. |
## SetBrightnessModeOptions ## SetBrightnessModeOptions
...@@ -214,9 +214,9 @@ Defines the options for setting the screen brightness mode. ...@@ -214,9 +214,9 @@ Defines the options for setting the screen brightness mode.
| Name | Type | Mandatory| Description | | Name | Type | Mandatory| Description |
| -------- | ------------------------------------ | ---- | ------------------------------------------------------ | | -------- | ------------------------------------ | ---- | ------------------------------------------------------ |
| mode | number | Yes | The value **0** indicates the manual adjustment mode, and the value **1** indicates the automatic adjustment mode.| | mode | number | Yes | The value **0** indicates the manual adjustment mode, and the value **1** indicates the automatic adjustment mode.|
| success | () => void | No | Callback upon a successful API call. | | success | () => void | No | Called when an API call is successful. |
| fail | (data: string, code: number) => void | No | Called when API call has failed. **data** indicates the error information, and **code** indicates the error code.| | fail | (data: string, code: number) => void | No | Called when an API call has failed. **data** indicates the error information, and **code** indicates the error code.|
| complete | () => void | No | Called when the API call is complete. | | complete | () => void | No | Called when an API call is complete. |
## BrightnessModeResponse ## BrightnessModeResponse
...@@ -237,6 +237,6 @@ Defines the options for setting the screen to be steady on. ...@@ -237,6 +237,6 @@ Defines the options for setting the screen to be steady on.
| Name | Type | Mandatory| Description | | Name | Type | Mandatory| Description |
| ------------ | ------------------------------------ | ---- | ------------------------------------------------------ | | ------------ | ------------------------------------ | ---- | ------------------------------------------------------ |
| keepScreenOn | boolean | Yes | The value **true** means to keep the screen steady on, and the value **false** indicates the opposite. | | keepScreenOn | boolean | Yes | The value **true** means to keep the screen steady on, and the value **false** indicates the opposite. |
| success | () => void | No | Callback upon a successful API call. | | success | () => void | No | Called when an API call is successful. |
| fail | (data: string, code: number) => void | No | Called when API call has failed. **data** indicates the error information, and **code** indicates the error code.| | fail | (data: string, code: number) => void | No | Called when an API call has failed. **data** indicates the error information, and **code** indicates the error code.|
| complete | () => void | No | Called when the API call is complete. | | complete | () => void | No | Called when an API call is complete. |
...@@ -1211,7 +1211,7 @@ ...@@ -1211,7 +1211,7 @@
- [@ohos.systemTimer (System Timer)](reference/apis/js-apis-system-timer.md) - [@ohos.systemTimer (System Timer)](reference/apis/js-apis-system-timer.md)
- [@ohos.wallpaper (Wallpaper)](reference/apis/js-apis-wallpaper.md) - [@ohos.wallpaper (Wallpaper)](reference/apis/js-apis-wallpaper.md)
- [@ohos.web.webview (Webview)](reference/apis/js-apis-webview.md) - [@ohos.web.webview (Webview)](reference/apis/js-apis-webview.md)
- [console (Log)](reference/apis/js-apis-logs.md) - [Console](reference/apis/js-apis-logs.md)
- [Timer](reference/apis/js-apis-timer.md) - [Timer](reference/apis/js-apis-timer.md)
- application - application
- [AccessibilityExtensionContext](reference/apis/js-apis-inner-application-accessibilityExtensionContext.md) - [AccessibilityExtensionContext](reference/apis/js-apis-inner-application-accessibilityExtensionContext.md)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册