diff --git a/en/application-dev/connectivity/http-request.md b/en/application-dev/connectivity/http-request.md index 996720a573aefd71e5be9766cba90df423e730b7..39ed52f818f0d904099bf13a581b58a84d61adae 100644 --- a/en/application-dev/connectivity/http-request.md +++ b/en/application-dev/connectivity/http-request.md @@ -70,6 +70,8 @@ httpRequest.request( // data.header carries the HTTP response header. Parse the content based on service requirements. console.info('header:' + JSON.stringify(data.header)); console.info('cookies:' + JSON.stringify(data.cookies)); // 8+ + // Call the destroy() method to release resources after the HttpRequest is complete. + httpRequest.destroy(); } else { console.info('error:' + JSON.stringify(err)); // Unsubscribe from HTTP Response Header events. diff --git a/en/application-dev/dfx/hitracemeter-guidelines.md b/en/application-dev/dfx/hitracemeter-guidelines.md index 3adf91286aaf410d7862c60320878e57acb359e8..3244aa9356bbcd3748594061a3752fad8aa3d3f3 100644 --- a/en/application-dev/dfx/hitracemeter-guidelines.md +++ b/en/application-dev/dfx/hitracemeter-guidelines.md @@ -21,7 +21,7 @@ Due to the asynchronous I/O feature of JS, the hiTraceMeter module provides only ## 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** diff --git a/en/application-dev/internationalization/intl-guidelines.md b/en/application-dev/internationalization/intl-guidelines.md index 5731421555d083f90464a0257a21c119ebd8ee3a..36f1631dcf29928c4fdbaccb37bd05e4944e857b 100644 --- a/en/application-dev/internationalization/intl-guidelines.md +++ b/en/application-dev/internationalization/intl-guidelines.md @@ -111,7 +111,7 @@ The [i18n](../reference/apis/js-apis-i18n.md) module provides enhanced I18N capa let dateTimeFormat = new Intl.DateTimeFormat(); ``` - Alternatively, use your own locale and formatting parameters to create a **DateTimeFormat** object. Formatting parameters are optional. For a full list of formatting parameters, see [DateTimeOptions](../reference/apis/js-apis-intl.md#datetimeoptions9). + Alternatively, use your own locale and formatting parameters to create a **DateTimeFormat** object. Formatting parameters are optional. For a full list of formatting parameters, see [DateTimeOptions](../reference/apis/js-apis-intl.md#datetimeoptions6). ```js let options = {dateStyle: "full", timeStyle: "full"}; @@ -181,7 +181,7 @@ The [i18n](../reference/apis/js-apis-i18n.md) module provides enhanced I18N capa let numberFormat = new Intl.NumberFormat(); ``` - Alternatively, use your own locale and formatting parameters to create a **NumberFormat** object. Formatting parameters are optional. For a full list of formatting parameters, see [NumberOptions](../reference/apis/js-apis-intl.md#numberoptions9). + Alternatively, use your own locale and formatting parameters to create a **NumberFormat** object. Formatting parameters are optional. For a full list of formatting parameters, see [NumberOptions](../reference/apis/js-apis-intl.md#numberoptions6). ```js let options = {compactDisplay: "short", notation: "compact"}; @@ -240,7 +240,7 @@ Users in different regions have different requirements for string sorting. [Coll let collator = new Intl.Collator(); ``` - Alternatively, use your own locale and formatting parameters to create a **Collator** object. For a full list of parameters, see [CollatorOptions](../reference/apis/js-apis-intl.md#collatoroptions9). + Alternatively, use your own locale and formatting parameters to create a **Collator** object. For a full list of parameters, see [CollatorOptions](../reference/apis/js-apis-intl.md#collatoroptions8). The **sensitivity** parameter is used to specify the levels of differences that will be used for string comparison. The value **base** indicates that only characters are compared, but not the accent and capitalization. For example, 'a' != 'b', 'a' == '', 'a'=='A'. The value **accent** indicates that the accent is considered, but not the capitalization. For example, 'a' != 'b', 'a' == '', 'a'=='A'. The value **case** indicates that the capitalization is considered, but the accent. For example, 'a' != 'b', 'a' == '', 'a'=='A'. The value **variant** indicates that the accent and capitalization are considered. For example, 'a' != 'b', 'a' == '', 'a'=='A'. ```js @@ -301,7 +301,7 @@ According to grammars in certain languages, the singular or plural form of a nou let pluralRules = new Intl.PluralRules(); ``` - Alternatively, use your own locale and formatting parameters to create a **PluralRules** object. For a full list of parameters, see [PluralRulesOptions](../reference/apis/js-apis-intl.md#pluralrulesoptions9). + Alternatively, use your own locale and formatting parameters to create a **PluralRules** object. For a full list of parameters, see [PluralRulesOptions](../reference/apis/js-apis-intl.md#pluralrulesoptions8). ```js let pluralRules = new Intl.PluralRules("zh-CN", {localeMatcher: "best fit", type: "cardinal"}); @@ -349,7 +349,7 @@ According to grammars in certain languages, the singular or plural form of a nou 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#relativetimeformatinputoptions8). ```js let relativeTimeFormat = new Intl.RelativeTimeFormat("zh-CN", {numeric: "always", style: "long"}); @@ -384,4 +384,4 @@ According to grammars in certain languages, the singular or plural form of a nou ```js 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"} - ``` \ No newline at end of file + ``` diff --git a/en/application-dev/reference/apis/Readme-EN.md b/en/application-dev/reference/apis/Readme-EN.md index 08402ed7456c35fd4f1c47d74f0ddb381822a638..057c1f8b9b5d8b6a8033c52e4e83044c33a2c20c 100644 --- a/en/application-dev/reference/apis/Readme-EN.md +++ b/en/application-dev/reference/apis/Readme-EN.md @@ -301,7 +301,7 @@ - [@ohos.systemTimer (System Timer)](js-apis-system-timer.md) - [@ohos.wallpaper (Wallpaper)](js-apis-wallpaper.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) - application - [AccessibilityExtensionContext (Accessibility Extension Context)](js-apis-inner-application-accessibilityExtensionContext.md) diff --git a/en/application-dev/reference/apis/js-apis-call.md b/en/application-dev/reference/apis/js-apis-call.md index 3e25735a64c0d71c6bf07fa4f21eeee901afb2f6..5ebf816e58265d6ea40df37d32481fd4e992b036 100644 --- a/en/application-dev/reference/apis/js-apis-call.md +++ b/en/application-dev/reference/apis/js-apis-call.md @@ -35,7 +35,7 @@ Initiates a call. This API uses an asynchronous callback to return the result. **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 | | -------- | -------------------------------------------- | @@ -76,7 +76,7 @@ Initiates a call. You can set call options as needed. This API uses an asynchron **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 | | -------- | -------------------------------------------- | @@ -117,7 +117,7 @@ Initiates a call. You can set call options as needed. This API uses a promise to | Name | Type | Mandatory| Description | | ----------- | ----------------------------------- | ---- | -------------------------------------- | | 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.
If this parameter is not set, the following configuration is used by default. For details, see [DialCallOptions](#dialcalloptions9).
- **accountId**: 0 (card slot 1)
- **videoState**: voice call
- **dialScene**: common call
- **dialType**: carrier call | **Return value** @@ -127,7 +127,7 @@ Initiates a call. You can set call options as needed. This API uses a promise to **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 | | -------- | -------------------------------------------- | @@ -274,7 +274,7 @@ Launches the call screen and displays the dialed number. This API uses an asynch **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 | | -------- | -------------------------------------------- | @@ -315,7 +315,7 @@ Launches the call screen and displays the dialed number. This API uses a promise **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 | | -------- | -------------------------------------------- | @@ -469,7 +469,7 @@ Checks whether the called number is an emergency number. This API uses an asynch **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 | | -------- | -------------------------------------------- | @@ -506,7 +506,7 @@ Checks whether the called number is an emergency number based on the phone numbe **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 | | -------- | -------------------------------------------- | @@ -548,7 +548,7 @@ Checks whether the called number is an emergency number based on the phone numbe **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 | | -------- | -------------------------------------------- | @@ -588,7 +588,7 @@ A formatted phone number is a standard numeric string, for example, 555 0100. **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 | | -------- | -------------------------------------------- | @@ -626,7 +626,7 @@ A formatted phone number is a standard numeric string, for example, 555 0100. **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 | | -------- | -------------------------------------------- | @@ -672,7 +672,7 @@ A formatted phone number is a standard numeric string, for example, 555 0100. **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 | | -------- | -------------------------------------------- | @@ -715,7 +715,7 @@ The phone number must match the specified country code. For example, for a China **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 | | -------- | -------------------------------------------- | @@ -761,7 +761,7 @@ All country codes are supported. **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 | | -------- | -------------------------------------------- | @@ -802,7 +802,7 @@ Mutes the ringtone while it is playing. It does not work if the ringtone has bee **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 | | -------- | -------------------------------------------- | @@ -842,7 +842,7 @@ Mutes the ringtone while it is playing. It does not work if the ringtone has bee **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 | | -------- | -------------------------------------------- | @@ -883,7 +883,7 @@ Answers a call. This API uses an asynchronous callback to return the result. **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 | | -------- | -------------------------------------------- | @@ -919,7 +919,7 @@ Answers a call. This API uses a promise to return the result. | 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.
If this parameter is not set, the latest ringing call will be connected.| **Return value** @@ -929,7 +929,7 @@ Answers a call. This API uses a promise to return the result. **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 | | -------- | -------------------------------------------- | @@ -971,7 +971,7 @@ Answers a call. This API uses an asynchronous callback to return the result. **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 | | -------- | -------------------------------------------- | @@ -1012,7 +1012,7 @@ Ends a call. This API uses an asynchronous callback to return the result. **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 | | -------- | -------------------------------------------- | @@ -1048,7 +1048,7 @@ Ends a call. This API uses a promise to return the result. | 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.
If this parameter is not set, the latest ongoing, dialed, or connected call will be ended.| **Return value** @@ -1058,7 +1058,7 @@ Ends a call. This API uses a promise to return the result. **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 | | -------- | -------------------------------------------- | @@ -1100,7 +1100,7 @@ Ends a call. This API uses an asynchronous callback to return the result. **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 | | -------- | -------------------------------------------- | @@ -1142,7 +1142,7 @@ Rejects a call. This API uses an asynchronous callback to return the result. **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 | | -------- | -------------------------------------------- | @@ -1185,7 +1185,7 @@ Rejects a call. This API uses an asynchronous callback to return the result. **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 | | -------- | -------------------------------------------- | @@ -1224,8 +1224,8 @@ Rejects a call. This API uses a promise to return the result. | 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.| -| options | [RejectMessageOptions](#rejectmessageoptions7) | No | Options for the call rejection message. | +| callId | number | No | Call ID. You can obtain the value by subscribing to **callDetailsChange** events. This parameter is optional from API version 9.
If this parameter is not set, the latest ringing call will be rejected.| +| 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** @@ -1235,7 +1235,7 @@ Rejects a call. This API uses a promise to return the result. **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 | | -------- | -------------------------------------------- | @@ -1280,7 +1280,7 @@ Rejects a call. This API uses an asynchronous callback to return the result. **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 | | -------- | -------------------------------------------- | @@ -1321,7 +1321,7 @@ Rejects a call. This API uses an asynchronous callback to return the result. **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 | | -------- | -------------------------------------------- | @@ -1365,7 +1365,7 @@ Holds a call based on the specified call ID. This API uses an asynchronous callb **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 | | -------- | -------------------------------------------- | @@ -1411,7 +1411,7 @@ Holds a call based on the specified call ID. This API uses a promise to return t **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 | | -------- | -------------------------------------------- | @@ -1453,7 +1453,7 @@ Unholds a call based on the specified call ID. This API uses an asynchronous cal **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 | | -------- | -------------------------------------------- | @@ -1499,7 +1499,7 @@ Unholds a call based on the specified call ID. This API uses a promise to return **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 | | -------- | -------------------------------------------- | @@ -1541,7 +1541,7 @@ Switches a call. This API uses an asynchronous callback to return the result. **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 | | -------- | -------------------------------------------- | @@ -1587,7 +1587,7 @@ Switches a call. This API uses a promise to return the result. **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 | | -------- | -------------------------------------------- | @@ -1627,7 +1627,7 @@ Combines two calls into a conference call. This API uses an asynchronous callbac **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 | | -------- | -------------------------------------------- | @@ -1670,7 +1670,7 @@ Combines two calls into a conference call. This API uses a promise to return the **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 | | -------- | -------------------------------------------- | @@ -1709,7 +1709,7 @@ Obtains the main call ID. This API uses an asynchronous callback to return the r **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 | | -------- | -------------------------------------------- | @@ -1753,7 +1753,7 @@ Obtains the main call ID. This API uses a promise to return the result. **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 | | -------- | -------------------------------------------- | @@ -1793,7 +1793,7 @@ Obtains the list of subcall IDs. This API uses an asynchronous callback to retur **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 | | -------- | -------------------------------------------- | @@ -1836,7 +1836,7 @@ Obtains the list of subcall IDs. This API uses a promise to return the result. **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 | | -------- | -------------------------------------------- | @@ -1876,7 +1876,7 @@ Obtains the list of call IDs in a conference. This API uses an asynchronous call **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 | | -------- | -------------------------------------------- | @@ -1919,7 +1919,7 @@ Obtains the list of call IDs in a conference. This API uses a promise to return **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 | | -------- | -------------------------------------------- | @@ -1961,7 +1961,7 @@ Obtains the call waiting status. This API uses an asynchronous callback to retur **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 | | -------- | -------------------------------------------- | @@ -2007,7 +2007,7 @@ Obtains the call waiting status. This API uses a promise to return the result. **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 | | -------- | -------------------------------------------- | @@ -2033,7 +2033,7 @@ promise.then(data => { setCallWaiting\(slotId: number, activate: boolean, callback: AsyncCallback\): 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. @@ -2051,7 +2051,7 @@ Sets the call waiting switch. This API uses an asynchronous callback to return t **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 | | -------- | -------------------------------------------- | @@ -2075,7 +2075,7 @@ call.setCallWaiting(0, true, (err) => { setCallWaiting\(slotId: number, activate: boolean\): Promise -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. @@ -2098,7 +2098,7 @@ Sets the call waiting switch. This API uses a promise to return the result. **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 | | -------- | -------------------------------------------- | @@ -2139,7 +2139,7 @@ Enables DTMF. This API uses an asynchronous callback to return the result. **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 | | -------- | -------------------------------------------- | @@ -2183,7 +2183,7 @@ Enables DTMF. This API uses a promise to return the result. **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 | | -------- | -------------------------------------------- | @@ -2222,7 +2222,7 @@ Stops DTMF. This API uses an asynchronous callback to return the result. **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 | | -------- | -------------------------------------------- | @@ -2265,7 +2265,7 @@ Stops DTMF. This API uses a promise to return the result. **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 | | -------- | -------------------------------------------- | @@ -2305,7 +2305,7 @@ Checks whether a call is an emergency call. This API uses an asynchronous callba **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 | | -------- | -------------------------------------------- | @@ -2345,7 +2345,7 @@ Checks whether a call is an emergency call. This API uses a promise to return th **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 | | -------- | -------------------------------------------- | @@ -2388,7 +2388,7 @@ Subscribes to **callDetailsChange** events. This API uses an asynchronous callba **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 | | -------- | -------------------------------------------- | @@ -2428,7 +2428,7 @@ Subscribes to **callEventChange** events. This API uses an asynchronous callback **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 | | -------- | -------------------------------------------- | @@ -2468,7 +2468,7 @@ Subscribes to **callDisconnectedCause** events. This API uses an asynchronous ca **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 | | -------- | -------------------------------------------- | @@ -2508,7 +2508,7 @@ Subscribes to **mmiCodeResult** events. This API uses an asynchronous callback t **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 | | -------- | -------------------------------------------- | @@ -2544,11 +2544,11 @@ Unsubscribes from **callDetailsChange** events. This API uses an asynchronous ca | Name | Type | Mandatory| Description | | -------- | -------------------------------------------------------- | ---- | ---------------------------------- | | 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** -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 | | -------- | -------------------------------------------- | @@ -2584,11 +2584,11 @@ Unsubscribes from **callEventChange** events. This API uses an asynchronous call | Name | Type | Mandatory| Description | | -------- | ------------------------------------------------ | ---- | ---------------------------------- | | 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** -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 | | -------- | -------------------------------------------- | @@ -2624,11 +2624,11 @@ Unsubscribes from **callDisconnectedCause** events. This API uses an asynchronou | Name | Type | Mandatory| Description | | -------- | ---------------------------------------------------------- | ---- | ------------------- | | 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** -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 | | -------- | -------------------------------------------- | @@ -2664,11 +2664,11 @@ Unsubscribes from **mmiCodeResult** events. This API uses an asynchronous callba | Name | Type | Mandatory| Description | | -------- | ------------------------------------------------ | ---- | ----------- | | 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** -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 | | -------- | -------------------------------------------- | @@ -2705,7 +2705,7 @@ Checks whether a new call is allowed. This API uses an asynchronous callback to **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 | | -------- | -------------------------------------------- | @@ -2742,7 +2742,7 @@ Checks whether a new call is allowed. This API uses a promise to return the resu **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 | | -------- | -------------------------------------------- | @@ -2782,7 +2782,7 @@ Separates calls from a conference call. This API uses an asynchronous callback t **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 | | -------- | -------------------------------------------- | @@ -2825,7 +2825,7 @@ Separates calls from a conference call. This API uses a promise to return the re **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 | | -------- | -------------------------------------------- | @@ -2867,7 +2867,7 @@ Obtains the call restriction status. This API uses an asynchronous callback to r **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 | | -------- | -------------------------------------------- | @@ -2914,7 +2914,7 @@ Obtains the call restriction status. This API uses a promise to return the resul **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 | | -------- | -------------------------------------------- | @@ -2958,7 +2958,7 @@ Sets the call restriction status. This API uses an asynchronous callback to retu **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 | | -------- | -------------------------------------------- | @@ -3010,7 +3010,7 @@ Sets the call restriction status. This API uses a promise to return the result. **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 | | -------- | -------------------------------------------- | @@ -3058,7 +3058,7 @@ Obtains call transfer information. This API uses an asynchronous callback to ret **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 | | -------- | -------------------------------------------- | @@ -3105,7 +3105,7 @@ Obtains call transfer information. This API uses a promise to return the result. **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 | | -------- | -------------------------------------------- | @@ -3149,7 +3149,7 @@ Sets call transfer information. This API uses an asynchronous callback to return **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 | | -------- | -------------------------------------------- | @@ -3201,7 +3201,7 @@ Sets call transfer information. This API uses a promise to return the result. **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 | | -------- | -------------------------------------------- | @@ -3247,7 +3247,7 @@ Checks whether the ringtone is playing. This API uses an asynchronous callback t **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 | | -------- | -------------------------------------------- | @@ -3287,7 +3287,7 @@ Checks whether the ringtone is playing. This API uses a promise to return the re **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 | | -------- | -------------------------------------------- | @@ -3327,7 +3327,7 @@ Sets call muting. This API uses an asynchronous callback to return the result. **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 | | -------- | -------------------------------------------- | @@ -3364,7 +3364,7 @@ Sets call muting. This API uses a promise to return the result. **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 | | -------- | -------------------------------------------- | @@ -3402,7 +3402,7 @@ Cancels call muting. This API uses an asynchronous callback to return the result **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 | | -------- | -------------------------------------------- | @@ -3439,7 +3439,7 @@ Cancels call muting. This API uses a promise to return the result. **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 | | -------- | -------------------------------------------- | @@ -3478,7 +3478,7 @@ Sets the audio device for a call. This API uses an asynchronous callback to retu **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 | | -------- | -------------------------------------------- | @@ -3501,7 +3501,7 @@ call.setAudioDevice(1, (err) => { setAudioDevice\(device: AudioDevice, options: AudioDeviceOptions, callback: AsyncCallback\): 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. @@ -3517,7 +3517,7 @@ Sets the audio device for a call based on the specified options. This API uses a **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 | | -------- | -------------------------------------------- | @@ -3564,7 +3564,7 @@ Sets the audio device for a call based on the specified options. This API uses a **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 | | -------- | -------------------------------------------- | @@ -3607,7 +3607,7 @@ Joins a conference call. This API uses an asynchronous callback to return the re **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 | | -------- | -------------------------------------------- | @@ -3653,7 +3653,7 @@ Joins a conference call. This API uses a promise to return the result. **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 | | -------- | -------------------------------------------- | @@ -3696,7 +3696,7 @@ Updates the IMS call mode. This API uses an asynchronous callback to return the **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 | | -------- | -------------------------------------------- | @@ -3739,7 +3739,7 @@ Updates the IMS call mode. This API uses a promise to return the result. **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 | | -------- | -------------------------------------------- | @@ -3763,7 +3763,7 @@ call.updateImsCallMode(1, 1).then(() => { enableImsSwitch(slotId: number, callback: AsyncCallback): 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. @@ -3780,7 +3780,7 @@ Enables the IMS switch. This API uses an asynchronous callback to return the res **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 | | -------- | -------------------------------------------- | @@ -3803,7 +3803,7 @@ call.enableImsSwitch(0, (err) => { enableImsSwitch(slotId: number): Promise -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. @@ -3825,7 +3825,7 @@ Enables the IMS switch. This API uses a promise to return the result. **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 | | -------- | -------------------------------------------- | @@ -3850,7 +3850,7 @@ call.enableImsSwitch(0).then(() => { disableImsSwitch(slotId: number, callback: AsyncCallback): 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. @@ -3867,7 +3867,7 @@ Disables the IMS switch. This API uses an asynchronous callback to return the re **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 | | -------- | -------------------------------------------- | @@ -3890,7 +3890,7 @@ call.disableImsSwitch(0, (err) => { disableImsSwitch(slotId: number): Promise -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. @@ -3912,7 +3912,7 @@ Disables the IMS switch. This API uses a promise to return the result. **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 | | -------- | -------------------------------------------- | @@ -3937,7 +3937,7 @@ call.disableImsSwitch(0).then(() => { isImsSwitchEnabled(slotId: number, callback: AsyncCallback): 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. @@ -3952,7 +3952,7 @@ Checks whether the IMS switch is enabled. This API uses an asynchronous callback **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 | | -------- | -------------------------------------------- | @@ -3974,7 +3974,7 @@ call.isImsSwitchEnabled(0, (err, data) => { isImsSwitchEnabled(slotId: number): Promise -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. @@ -3994,7 +3994,7 @@ Checks whether the IMS switch is enabled. This API uses a promise to return the **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 | | -------- | -------------------------------------------- | @@ -4031,7 +4031,7 @@ Provides an option for determining whether a call is a video call. ## DialCallOptions9+ -Defines options for initiating a call. +Provides an option for determining whether a call is a video call. **System capability**: SystemCapability.Telephony.CallManager @@ -4408,7 +4408,7 @@ Enumerates call transfer states. ## DisconnectedDetails9+ -Defines the cause of a call disconnection. +Defines the call disconnection cause. **System API**: This is a system API. @@ -4416,12 +4416,12 @@ Defines the cause of a call disconnection. | Name | Type | Mandatory| Description | | ------- | ------------------------------------------ | ---- | --------------- | -| reason | [DisconnectedReason](#disconnectedreason8) | Yes | Cause of the call disconnection. | -| message | string | Yes | Message indicating the call disconnection.| +| reason | [DisconnectedReason](#disconnectedreason8) | Yes | Call disconnection cause. | +| message | string | Yes | Call ending message.| ## DisconnectedReason8+ -Enumerates causes of call disconnection. +Enumerates call disconnection causes. **System API**: This is a system API. @@ -4464,7 +4464,7 @@ Enumerates causes of call disconnection. | BEARER_SERVICE_NOT_IMPLEMENTED9+ | 65 | Bearer service not implemented. | | ACM_EQUALTO_OR_GREATER_THAN_THE_MAXIMUM_VALUE9+ | 68 | ACM greater than or equal to the maximum value. | | REQUESTED_FACILITY_NOT_IMPLEMENTED9+ | 69 | Requested facility not implemented. | -| ONLY_RESTRICTED_DIGITAL_INFO_BEARER_CAPABILITY_IS_AVAILABLE9+ | 70 | Only restricted digital information capability available. | +| ONLY_RESTRICTED_DIGITAL_INFO_BEARER_CAPABILITY_IS_AVAILABLE9+ | 70 | Only restricted digital information bearer capability available. | | SERVICE_OR_OPTION_NOT_IMPLEMENTED_UNSPECIFIED9+ | 79 | Service or option not implemented, unspecified. | | INVALID_TRANSACTION_IDENTIFIER_VALUE9+ | 81 | Invalid transaction identifier value. | | USER_NOT_MEMBER_OF_CUG9+ | 87 | User not member of CUG. | diff --git a/en/application-dev/reference/apis/js-apis-http.md b/en/application-dev/reference/apis/js-apis-http.md index 8b6e6495c919bba52e0d3ce05c0e1675b493fa8f..2b15b9bb2a98bea710f49e5aaa7a6ca2843d9427 100644 --- a/en/application-dev/reference/apis/js-apis-http.md +++ b/en/application-dev/reference/apis/js-apis-http.md @@ -53,11 +53,13 @@ httpRequest.request( // data.header carries the HTTP response header. Parse the content based on service requirements. console.info('header:' + JSON.stringify(data.header)); console.info('cookies:' + JSON.stringify(data.cookies)); // 8+ + // Call the destroy() method to release resources after the HttpRequest is complete. + httpRequest.destroy(); } else { console.info('error:' + JSON.stringify(err)); // Unsubscribe from HTTP Response Header events. 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(); } } @@ -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. +> **NOTE** +> Call the **destroy()** method to release resources after the HttpRequest is complete. + **System capability**: SystemCapability.Communication.NetStack **Return value** @@ -115,7 +120,7 @@ Initiates an HTTP request to a given URL. This API uses an asynchronous callback **Error codes** -| Code | Error Message | +| ID | Error Message | |---------|-------------------------------------------------------| | 401 | Parameter error. | | 201 | Permission denied. | @@ -167,7 +172,7 @@ Initiates an HTTP request containing specified options to a given URL. This API **Error codes** -| Code | Error Message | +| ID | Error Message | |---------|-------------------------------------------------------| | 401 | Parameter error. | | 201 | Permission denied. | @@ -258,7 +263,7 @@ Initiates an HTTP request containing specified options to a given URL. This API **Error codes** -| Code | Error Message | +| ID | Error Message | |---------|-------------------------------------------------------| | 401 | Parameter error. | | 201 | Permission denied. | @@ -465,7 +470,7 @@ Specifies the type and value range of the optional parameters in the HTTP reques | Name | Type | Mandatory| Description | | -------------- | --------------------------------------------- | ---- | ------------------------------------------------------------ | | method | [RequestMethod](#requestmethod) | No | Request method. The default value is **GET**. | -| extraData | string6+ \| Object6+ \| ArrayBuffer8+ | No | Additional data for sending a request. This parameter is not used by default.
- 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.6+
- 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.6+ | +| extraData | string6+ \| Object6+ \| ArrayBuffer8+ | No | Additional data for sending a request. This parameter is not used by default.
- 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.
- 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.| | expectDataType9+ | [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.| | usingCache9+ | boolean | No | Whether to use the cache. The default value is **true**. | | priority9+ | number | No | Priority. The value range is [1,1000]. The default value is **1**. | diff --git a/en/application-dev/reference/apis/js-apis-logs.md b/en/application-dev/reference/apis/js-apis-logs.md index 48cc7954e1b4315f0e12d9571395decf9592b90d..6a38125c091365f1ed48f1338ea27fb8935c492a 100644 --- a/en/application-dev/reference/apis/js-apis-logs.md +++ b/en/application-dev/reference/apis/js-apis-logs.md @@ -1,4 +1,4 @@ -# console (Log) +# Console > **NOTE**
> 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. diff --git a/en/application-dev/reference/apis/js-apis-net-ethernet.md b/en/application-dev/reference/apis/js-apis-net-ethernet.md index 0b7697b6d8dfcdb6a01bf7d3a44d0a64115c0855..b80bfcd7bc76eee01f3607fd79c066ae052dada1 100644 --- a/en/application-dev/reference/apis/js-apis-net-ethernet.md +++ b/en/application-dev/reference/apis/js-apis-net-ethernet.md @@ -53,8 +53,7 @@ ethernet.setIfaceConfig("eth0", { route: "192.168.xx.xxx", gateway: "192.168.xx.xxx", netMask: "255.255.255.0", - dnsServers: "1.1.1.1", - domain: "2.2.2.2" + dnsServers: "1.1.1.1" }, (error) => { if (error) { console.log("setIfaceConfig callback error = " + JSON.stringify(error)); @@ -111,8 +110,7 @@ ethernet.setIfaceConfig("eth0", { route: "192.168.xx.xxx", gateway: "192.168.xx.xxx", netMask: "255.255.255.0", - dnsServers: "1.1.1.1", - domain: "2.2.2.2" + dnsServers: "1.1.1.1" }).then(() => { console.log("setIfaceConfig promise ok "); }).catch(error => { @@ -163,7 +161,6 @@ ethernet.getIfaceConfig("eth0", (error, value) => { console.log("getIfaceConfig callback gateway = " + JSON.stringify(value.gateway)); console.log("getIfaceConfig callback netMask = " + JSON.stringify(value.netMask)); 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) => { console.log("getIfaceConfig promise gateway = " + JSON.stringify(data.gateway)); console.log("getIfaceConfig promise netMask = " + JSON.stringify(data.netMask)); console.log("getIfaceConfig promise dnsServers = " + JSON.stringify(data.dnsServers)); - console.log("getIfaceConfig promise domain = " + JSON.stringify(data.domain)); }).catch(error => { console.log("getIfaceConfig promise error = " + JSON.stringify(error)); }); @@ -386,74 +382,6 @@ ethernet.getAllActiveIfaces().then((data) => { }); ``` -## ethernet.on('interfaceStateChange')10+ - -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.
**iface**: NIC name.
**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')10+ - -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.
**iface**: NIC name.
**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 Defines the network configuration for the Ethernet connection. diff --git a/en/application-dev/reference/apis/js-apis-radio.md b/en/application-dev/reference/apis/js-apis-radio.md index 15c1fc484dd8987dd26c9229beeb200ba8a711e9..07ad0145ba522105dfab765316452a3bb518cb70 100644 --- a/en/application-dev/reference/apis/js-apis-radio.md +++ b/en/application-dev/reference/apis/js-apis-radio.md @@ -32,7 +32,7 @@ Obtains the RAT used in the CS and PS domains for the SIM card in the specified **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 | | -------- | -------------------------------------------- | @@ -77,7 +77,7 @@ Obtains the RAT used in the CS and PS domains for the SIM card in the specified **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 | | -------- | -------------------------------------------- | @@ -119,7 +119,7 @@ Obtains the network status. This API uses an asynchronous callback to return the **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 | | -------- | -------------------------------------------- | @@ -158,7 +158,7 @@ Obtains the network status. This API uses an asynchronous callback to return the **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 | | -------- | -------------------------------------------- | @@ -203,7 +203,7 @@ Obtains the network status. This API uses a promise to return the result. **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 | | -------- | -------------------------------------------- | @@ -244,7 +244,7 @@ Obtains the network selection mode of the SIM card in the specified slot. This A **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 | | -------- | -------------------------------------------- | @@ -286,7 +286,7 @@ Obtains the network selection mode of the SIM card in the specified slot. This A **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 | | -------- | -------------------------------------------- | @@ -326,7 +326,7 @@ Obtains the ISO country code of the network with which the SIM card in the speci **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 | | -------- | -------------------------------------------- | @@ -368,7 +368,7 @@ Obtains the ISO country code of the network with which the SIM card in the speci **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 | | -------- | -------------------------------------------- | @@ -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 | | -------- | ------------------------------------------------------------ | ---- | ------------------------------------------------------------ | -| callback | AsyncCallback\ | Yes | Callback invoked to return the result.| +| callback | AsyncCallback\ | Yes | Callback used to return the result.| **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 | | -------- | -------------------------------------------- | @@ -441,7 +441,7 @@ Obtains the ID of the slot in which the primary card is located. This API uses a **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 | | -------- | -------------------------------------------- | @@ -479,7 +479,7 @@ Obtains a list of signal strengths of the network with which the SIM card in the **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 | | -------- | -------------------------------------------- | @@ -521,7 +521,7 @@ Obtains a list of signal strengths of the network with which the SIM card in the **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 | | -------- | -------------------------------------------- | @@ -670,7 +670,7 @@ Checks whether the radio service is enabled on the primary SIM card. This API us **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 | | -------- | -------------------------------------------- | @@ -709,7 +709,7 @@ Checks whether the radio service is enabled on the SIM card in the specified slo **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 | | -------- | -------------------------------------------- | @@ -754,7 +754,7 @@ Checks whether the radio service is enabled on the SIM card in the specified slo **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 | | -------- | -------------------------------------------- | @@ -795,7 +795,7 @@ Obtains the carrier name for the SIM card in the specified slot. This API uses a **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 | | -------- | -------------------------------------------- | @@ -837,7 +837,7 @@ Obtains the carrier name for the SIM card in the specified slot. This API uses a **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 | | -------- | -------------------------------------------- | @@ -880,7 +880,7 @@ Sets the ID of the slot in which the primary card is located. This API uses an a **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 | | -------- | -------------------------------------------- | @@ -928,7 +928,7 @@ Sets the ID of the slot in which the primary card is located. This API uses a pr **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 | | -------- | -------------------------------------------- | @@ -972,7 +972,7 @@ Obtains the IMEI of the SIM card in a card slot. This API uses an asynchronous c **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 | | -------- | -------------------------------------------- | @@ -996,7 +996,7 @@ radio.getIMEI((err, data) => { getIMEI(slotId: number, callback: AsyncCallback): 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. @@ -1013,7 +1013,7 @@ Obtains the IMEI of the SIM card in the specified card slot. This API uses an as **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 | | -------- | -------------------------------------------- | @@ -1060,7 +1060,7 @@ Obtains the IMEI of the SIM card in the specified card slot. This API uses a pro **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 | | -------- | -------------------------------------------- | @@ -1103,7 +1103,7 @@ Obtains the MEID of the SIM card in a card slot. This API uses an asynchronous c **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 | | -------- | -------------------------------------------- | @@ -1127,7 +1127,7 @@ radio.getMEID((err, data) => { getMEID(slotId: number, callback: AsyncCallback): 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. @@ -1144,7 +1144,7 @@ Obtains the MEID of the SIM card in the specified card slot. This API uses an as **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 | | -------- | -------------------------------------------- | @@ -1191,7 +1191,7 @@ Obtains the MEID of the SIM card in the specified card slot. This API uses a pro **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 | | -------- | -------------------------------------------- | @@ -1234,7 +1234,7 @@ Obtains the unique device ID of the SIM card in a card slot. This API uses an as **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 | | -------- | -------------------------------------------- | @@ -1258,7 +1258,7 @@ radio.getUniqueDeviceId((err, data) => { getUniqueDeviceId(slotId: number, callback: AsyncCallback): 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. @@ -1275,7 +1275,7 @@ Obtains the unique device ID of the SIM card in the specified card slot. This AP **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 | | -------- | -------------------------------------------- | @@ -1322,7 +1322,7 @@ Obtains the unique device ID of the SIM card in the specified card slot. This AP **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 | | -------- | -------------------------------------------- | @@ -1365,7 +1365,7 @@ Sends a cell location update request. This API uses an asynchronous callback to **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 | | -------- | -------------------------------------------- | @@ -1388,7 +1388,7 @@ radio.sendUpdateCellLocationRequest((err) => { sendUpdateCellLocationRequest\(slotId: number, callback: AsyncCallback\): 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. @@ -1405,7 +1405,7 @@ Sends a cell location update request for the SIM card in the specified slot. Thi **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 | | -------- | -------------------------------------------- | @@ -1451,7 +1451,7 @@ Sends a cell location update request for the SIM card in the specified slot. Thi **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 | | -------- | -------------------------------------------- | @@ -1493,7 +1493,7 @@ Obtains cell information. This API uses an asynchronous callback to return the r **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 | | -------- | -------------------------------------------- | @@ -1517,7 +1517,7 @@ radio.getCellInformation((err, data) => { getCellInformation(slotId: number, callback: AsyncCallback\>): 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. @@ -1534,7 +1534,7 @@ Obtains cell information for the SIM card in the specified slot. This API uses a **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 | | -------- | -------------------------------------------- | @@ -1581,7 +1581,7 @@ Obtains cell information for the SIM card in the specified slot. This API uses a **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 | | -------- | -------------------------------------------- | @@ -1625,7 +1625,7 @@ Sets the network selection mode. This API uses an asynchronous callback to retur **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 | | -------- | -------------------------------------------- | @@ -1682,7 +1682,7 @@ Sets the network selection mode. This API uses a promise to return the result. **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 | | -------- | -------------------------------------------- | @@ -1737,7 +1737,7 @@ Obtains network search information for the SIM card in the specified slot. This **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 | | -------- | -------------------------------------------- | @@ -1782,7 +1782,7 @@ Obtains network search information for the SIM card in the specified slot. This **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 | | -------- | -------------------------------------------- | @@ -1822,7 +1822,7 @@ Obtains the NR option mode. This API uses an asynchronous callback to return the **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 | | -------- | -------------------------------------------- | @@ -1845,7 +1845,7 @@ radio.getNrOptionMode((err, data) => { getNrOptionMode(slotId: number, callback: AsyncCallback): 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. @@ -1860,7 +1860,7 @@ Obtains the NR option mode for the SIM card in the specified slot. This API uses **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 | | -------- | -------------------------------------------- | @@ -1904,7 +1904,7 @@ Obtains the NR option mode for the SIM card in the specified slot. This API uses **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 | | -------- | -------------------------------------------- | @@ -1946,7 +1946,7 @@ Turns on the radio function. This API uses an asynchronous callback to return th **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 | | -------- | -------------------------------------------- | @@ -1970,7 +1970,7 @@ radio.turnOnRadio((err) => { turnOnRadio(slotId: number, callback: AsyncCallback): 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. @@ -1987,7 +1987,7 @@ Turns on the radio function for the SIM card in the specified slot. This API use **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 | | -------- | -------------------------------------------- | @@ -2034,7 +2034,7 @@ Turns on the radio function for the SIM card in the specified slot. This API use **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 | | -------- | -------------------------------------------- | @@ -2076,7 +2076,7 @@ Turns off the radio function. This API uses an asynchronous callback to return t **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 | | -------- | -------------------------------------------- | @@ -2100,7 +2100,7 @@ radio.turnOffRadio((err) => { turnOffRadio(slotId: number, callback: AsyncCallback): 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. @@ -2117,7 +2117,7 @@ Turns off the radio function for the SIM card in the specified slot. This API us **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 | | -------- | -------------------------------------------- | @@ -2164,7 +2164,7 @@ Turns off the radio function for the SIM card in the specified slot. This API us **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 | | -------- | -------------------------------------------- | @@ -2208,7 +2208,7 @@ Sets the preferred network for the SIM card in the specified slot. This API uses **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 | | -------- | -------------------------------------------- | @@ -2255,7 +2255,7 @@ Sets the preferred network for the SIM card in the specified slot. This API uses **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 | | -------- | -------------------------------------------- | @@ -2298,7 +2298,7 @@ Obtains the preferred network for the SIM card in the specified slot. This API u **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 | | -------- | -------------------------------------------- | @@ -2343,7 +2343,7 @@ Obtains the preferred network for the SIM card in the specified slot. This API u **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 | | -------- | -------------------------------------------- | @@ -2387,7 +2387,7 @@ Obtains the IMS registration status of the specified IMS service type for the SI **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 | | -------- | -------------------------------------------- | @@ -2433,7 +2433,7 @@ Obtains the IMS registration status of the specified IMS service type for the SI **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 | | -------- | -------------------------------------------- | @@ -2478,7 +2478,7 @@ Enables listening for **imsRegStateChange** events. This API uses an asynchronou **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 | | -------- | -------------------------------------------- | @@ -2516,11 +2516,11 @@ Disables listening for **imsRegStateChange** events. This API uses an asynchrono | type | string | Yes | IMS registration status changes. | | slotId | number | Yes | Card slot ID.
- **0**: card slot 1
- **1**: card slot 2| | 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** -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 | | -------- | -------------------------------------------- | diff --git a/en/application-dev/reference/apis/js-apis-rpc.md b/en/application-dev/reference/apis/js-apis-rpc.md index c4688c804e2ea21de453a25cf2ad543193f9d2ed..0f234517e6b14318e65f2da5c966531fb78b90bd 100644 --- a/en/application-dev/reference/apis/js-apis-rpc.md +++ b/en/application-dev/reference/apis/js-apis-rpc.md @@ -6821,8 +6821,8 @@ For details about the error codes, see [RPC Error Codes](../errorcodes/errorcode } let deathRecipient = new MyDeathRecipient(); try { - proxy.registerDeathRecippient(deathRecipient, 0); - proxy.unregisterDeathRecippient(deathRecipient, 0); + proxy.registerDeathRecipient(deathRecipient, 0); + proxy.unregisterDeathRecipient(deathRecipient, 0); } catch(error) { console.info("proxy register deathRecipient fail, errorCode " + error.code); 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. } } let deathRecipient = new MyDeathRecipient(); - proxy.addDeathRecippient(deathRecipient, 0); + proxy.addDeathRecipient(deathRecipient, 0); proxy.removeDeathRecipient(deathRecipient, 0); ``` diff --git a/en/application-dev/reference/apis/js-apis-socket.md b/en/application-dev/reference/apis/js-apis-socket.md index c34bb01c8780edc3c579bd40468382baa8fb6310..454e9ffc48c13ccd071b25326043ad20f91e1aa2 100644 --- a/en/application-dev/reference/apis/js-apis-socket.md +++ b/en/application-dev/reference/apis/js-apis-socket.md @@ -32,11 +32,11 @@ Creates a **UDPSocket** object. let udp = socket.constructUDPSocketInstance(); ``` -## UDPSocket +## UDPSocket7+ Defines a **UDPSocket** connection. Before invoking UDPSocket APIs, you need to call [socket.constructUDPSocketInstance](#socketconstructudpsocketinstance) to create a **UDPSocket** object. -### bind +### bind7+ bind(address: NetAddress, callback: AsyncCallback\): void @@ -76,7 +76,7 @@ udp.bind({address: '192.168.xx.xxx', port: xxxx, family: 1}, err => { }) ``` -### bind +### bind7+ bind(address: NetAddress): Promise\ @@ -120,7 +120,7 @@ promise.then(() => { }); ``` -### send +### send7+ send(options: UDPSendOptions, callback: AsyncCallback\): void @@ -166,7 +166,7 @@ udp.send({ }) ``` -### send +### send7+ send(options: UDPSendOptions): Promise\ @@ -216,7 +216,7 @@ promise.then(() => { }); ``` -### close +### close7+ close(callback: AsyncCallback\): void @@ -245,7 +245,7 @@ udp.close(err => { }) ``` -### close +### close7+ close(): Promise\ @@ -273,7 +273,7 @@ promise.then(() => { }); ``` -### getState +### getState7+ getState(callback: AsyncCallback\): void @@ -318,7 +318,7 @@ udp.bind({address: '192.168.xx.xxx', port: xxxx, family: 1}, err => { }) ``` -### getState +### getState7+ getState(): Promise\ @@ -357,7 +357,7 @@ promise.then(err => { }); ``` -### setExtraOptions +### setExtraOptions7+ setExtraOptions(options: UDPExtraOptions, callback: AsyncCallback\): void @@ -410,7 +410,7 @@ udp.bind({address: '192.168.xx.xxx', port: xxxx, family: 1}, err => { }) ``` -### setExtraOptions +### setExtraOptions7+ setExtraOptions(options: UDPExtraOptions): Promise\ @@ -466,7 +466,7 @@ promise.then(() => { }); ``` -### on('message') +### on('message')7+ on(type: 'message', callback: Callback\<{message: ArrayBuffer, remoteInfo: SocketRemoteInfo}\>): void @@ -490,7 +490,7 @@ udp.on('message', value => { }); ``` -### off('message') +### off('message')7+ off(type: 'message', callback?: Callback\<{message: ArrayBuffer, remoteInfo: SocketRemoteInfo}\>): void @@ -521,7 +521,7 @@ udp.off('message', callback); udp.off('message'); ``` -### on('listening' | 'close') +### on('listening' | 'close')7+ on(type: 'listening' | 'close', callback: Callback\): void @@ -548,7 +548,7 @@ udp.on('close', () => { }); ``` -### off('listening' | 'close') +### off('listening' | 'close')7+ off(type: 'listening' | 'close', callback?: Callback\): void @@ -586,7 +586,7 @@ udp.off('close', callback2); udp.off('close'); ``` -### on('error') +### on('error')7+ on(type: 'error', callback: ErrorCallback): void @@ -610,7 +610,7 @@ udp.on('error', err => { }); ``` -### off('error') +### off('error')7+ off(type: 'error', callback?: ErrorCallback): void @@ -641,7 +641,7 @@ udp.off('error', callback); udp.off('error'); ``` -## NetAddress +## NetAddress7+ 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. | | family | number | No | Network protocol type.
- **1**: IPv4
- **2**: IPv6
The default value is **1**.| -## UDPSendOptions +## UDPSendOptions7+ 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 \| ArrayBuffer7+ | Yes | Data to send. | | address | [NetAddress](#netaddress) | Yes | Destination address.| -## UDPExtraOptions +## UDPExtraOptions7+ Defines other properties of the UDPSocket connection. @@ -673,12 +673,12 @@ Defines other properties of the UDPSocket connection. | Name | Type | Mandatory| Description | | ----------------- | ------- | ---- | -------------------------------- | | broadcast | boolean | No | Whether to send broadcast messages. The default value is **false**. | -| receiveBufferSize | number | No | Size of the receive buffer, in bytes. | -| sendBufferSize | number | No | Size of the send 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. The default value is **0**. | | 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 +## SocketStateBase7+ 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.| | isConnected | boolean | Yes | Whether the connection is in the connected state.| -## SocketRemoteInfo +## SocketRemoteInfo7+ 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 For details about error codes, see [Socket Error Codes](../errorcodes/errorcode-net-socket.md). -## socket.constructTCPSocketInstance +## socket.constructTCPSocketInstance7+ constructTCPSocketInstance(): TCPSocket @@ -729,11 +729,11 @@ Creates a **TCPSocket** object. let tcp = socket.constructTCPSocketInstance(); ``` -## TCPSocket +## TCPSocket7+ Defines a TCPSocket connection. Before invoking TCPSocket APIs, you need to call [socket.constructTCPSocketInstance](#socketconstructtcpsocketinstance) to create a **TCPSocket** object. -### bind +### bind7+ bind(address: NetAddress, callback: AsyncCallback\): void @@ -773,7 +773,7 @@ tcp.bind({address: '192.168.xx.xxx', port: xxxx, family: 1}, err => { }) ``` -### bind +### bind7+ bind(address: NetAddress): Promise\ @@ -817,7 +817,7 @@ promise.then(() => { }); ``` -### connect +### connect7+ connect(options: TCPConnectOptions, callback: AsyncCallback\): void @@ -857,7 +857,7 @@ tcp.connect({address: {address: '192.168.xx.xxx', port: xxxx, family: 1}, timeou }) ``` -### connect +### connect7+ connect(options: TCPConnectOptions): Promise\ @@ -898,7 +898,7 @@ promise.then(() => { }); ``` -### send +### send7+ send(options: TCPSendOptions, callback: AsyncCallback\): void @@ -944,7 +944,7 @@ tcp.connect({address: {address: '192.168.xx.xxx', port: xxxx, family: 1}, timeou }) ``` -### send +### send7+ send(options: TCPSendOptions): Promise\ @@ -996,7 +996,7 @@ promise1.then(() => { }); ``` -### close +### close7+ close(callback: AsyncCallback\): void @@ -1031,7 +1031,7 @@ tcp.close(err => { }) ``` -### close +### close7+ close(): Promise\ @@ -1065,7 +1065,7 @@ promise.then(() => { }); ``` -### getRemoteAddress +### getRemoteAddress7+ getRemoteAddress(callback: AsyncCallback\): void @@ -1106,7 +1106,7 @@ tcp.connect({address: {address: '192.168.xx.xxx', port: xxxx, family: 1}, timeou }); ``` -### getRemoteAddress +### getRemoteAddress7+ getRemoteAddress(): Promise\ @@ -1149,7 +1149,7 @@ promise1.then(() => { }); ``` -### getState +### getState7+ getState(callback: AsyncCallback\): void @@ -1190,7 +1190,7 @@ let promise = tcp.connect({address: {address: '192.168.xx.xxx', port: xxxx, fami }); ``` -### getState +### getState7+ getState(): Promise\ @@ -1233,7 +1233,7 @@ promise.then(() => { }); ``` -### setExtraOptions +### setExtraOptions7+ setExtraOptions(options: TCPExtraOptions, callback: AsyncCallback\): void @@ -1285,7 +1285,7 @@ let promise = tcp.connect({address: {address: '192.168.xx.xxx', port: xxxx, fami }); ``` -### setExtraOptions +### setExtraOptions7+ setExtraOptions(options: TCPExtraOptions): Promise\ @@ -1344,7 +1344,7 @@ promise.then(() => { }); ``` -### on('message') +### on('message')7+ on(type: 'message', callback: Callback<{message: ArrayBuffer, remoteInfo: SocketRemoteInfo}\>): void @@ -1368,7 +1368,7 @@ tcp.on('message', value => { }); ``` -### off('message') +### off('message')7+ off(type: 'message', callback?: Callback<{message: ArrayBuffer, remoteInfo: SocketRemoteInfo}\>): void @@ -1399,7 +1399,7 @@ tcp.off('message', callback); tcp.off('message'); ``` -### on('connect' | 'close') +### on('connect' | 'close')7+ on(type: 'connect' | 'close', callback: Callback\): void @@ -1426,7 +1426,7 @@ tcp.on('close', data => { }); ``` -### off('connect' | 'close') +### off('connect' | 'close')7+ off(type: 'connect' | 'close', callback?: Callback\): void @@ -1464,7 +1464,7 @@ tcp.off('close', callback2); tcp.off('close'); ``` -### on('error') +### on('error')7+ on(type: 'error', callback: ErrorCallback): void @@ -1488,7 +1488,7 @@ tcp.on('error', err => { }); ``` -### off('error') +### off('error')7+ off(type: 'error', callback?: ErrorCallback): void @@ -1519,7 +1519,7 @@ tcp.off('error', callback); tcp.off('error'); ``` -## TCPConnectOptions +## TCPConnectOptions7+ Defines TCPSocket connection parameters. @@ -1530,7 +1530,7 @@ Defines TCPSocket connection parameters. | address | [NetAddress](#netaddress) | Yes | Bound IP address and port number. | | timeout | number | No | Timeout duration of the TCPSocket connection, in ms.| -## TCPSendOptions +## TCPSendOptions7+ 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\| ArrayBuffer7+ | 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**.| -## TCPExtraOptions +## TCPExtraOptions7+ 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**. | | TCPNoDelay | boolean | No | Whether to enable no-delay on the TCPSocket connection. The default value is **false**. | | socketLinger | Object | Yes | Socket linger.
- **on**: whether to enable socket linger. The value true means to enable socket linger and false means the opposite.
- **linger**: linger time, in ms. The value ranges from **0** to **65535**.
Specify this parameter only when **on** is set to **true**.| -| receiveBufferSize | number | No | Size of the receive buffer, in bytes. | -| sendBufferSize | number | No | Size of the send 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. The default value is **0**. | | 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 @@ -1853,7 +1853,7 @@ promise.then(() => { }); ``` -### on('message') +### on('message')9+ on(type: 'message', callback: Callback<{message: ArrayBuffer, remoteInfo: SocketRemoteInfo}>): void; @@ -1884,7 +1884,7 @@ tls.on('message', value => { }); ``` -### off('message') +### off('message')9+ off(type: 'message', callback?: Callback\<{message: ArrayBuffer, remoteInfo: SocketRemoteInfo}\>): void @@ -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. tls.off('message', callback); ``` -### on('connect' | 'close') +### on('connect' | 'close')9+ on(type: 'connect' | 'close', callback: Callback\): void @@ -1947,7 +1947,7 @@ tls.on('close', () => { }); ``` -### off('connect' | 'close') +### off('connect' | 'close')9+ off(type: 'connect' | 'close', callback?: Callback\): void @@ -1984,7 +1984,7 @@ tls.on('close', callback2); tls.off('close', callback2); ``` -### on('error') +### on('error')9+ on(type: 'error', callback: ErrorCallback): void @@ -2008,7 +2008,7 @@ tls.on('error', err => { }); ``` -### off('error') +### off('error')9+ off(type: 'error', callback?: ErrorCallback): void @@ -2783,7 +2783,7 @@ Defines TLS connection options. | -------------- | ------------------------------------- | --- |-------------- | | address | [NetAddress](#netaddress) | Yes | Gateway address. | | secureOptions | [TLSSecureOptions](#tlssecureoptions9) | Yes| TLS security options.| -| ALPNProtocols | Array\ | No| Application Layer Protocol Negotiation (ALPN) protocols. | +| ALPNProtocols | Array\ | No| ALPN protocol. The value range is ["spdy/1", "http/1.1"]. The default value is **[]**. | ## TLSSecureOptions9+ @@ -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. | | key | string | No| Private key of the local digital certificate. | | 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. | -| signatureAlgorithms | string | No| Signing algorithm used during communication. | -| cipherSuite | string | No| Cipher suite used during communication. | +| signatureAlgorithms | string | No| Signing algorithm used during communication. The default value is **""**. | +| cipherSuite | string | No| Cipher suite used during communication. The default value is **""**. | ## Protocol9+ diff --git a/en/application-dev/reference/apis/js-apis-system-battery.md b/en/application-dev/reference/apis/js-apis-system-battery.md index 25af13c0c39825138fe490b36abd7ad00157f1d9..8eef0562cdedb91214d4eb9e688445eb6d8ff9b8 100644 --- a/en/application-dev/reference/apis/js-apis-system-battery.md +++ b/en/application-dev/reference/apis/js-apis-system-battery.md @@ -27,7 +27,7 @@ Obtains the current charging state and battery level. | 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** @@ -44,15 +44,15 @@ battery.getStatus({ ## GetStatusOptions -Obtains the object that contains the API calling result. +Object that contains the API calling result. **System capability**: SystemCapability.PowerManager.BatteryManager.Core | 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.| -| fail | (data: string, code: number) => void | No | Called when API call has failed. **data** indicates the error information, and **code** indicates the error code. | -| complete | () => void | No | Called when API call is complete. | +| 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 an API call has failed. **data** indicates the error information, and **code** indicates the error code. | +| complete | () => void | No | Called when an API call is complete. | ## BatteryResponse @@ -60,7 +60,7 @@ Defines a response that returns the charging status and remaining power of the d **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.| -| level | number | Yes | No | Current battery level, which ranges from **0.00** to **1.00**.| +| 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**.| diff --git a/en/application-dev/reference/apis/js-apis-system-brightness.md b/en/application-dev/reference/apis/js-apis-system-brightness.md index 8053c8f0c73d190d33e547ff9f0227df5c6db06a..01a1defec2d87411735e0ffcf30b08beb93faccf 100644 --- a/en/application-dev/reference/apis/js-apis-system-brightness.md +++ b/en/application-dev/reference/apis/js-apis-system-brightness.md @@ -28,7 +28,7 @@ Obtains the current screen brightness. | 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** @@ -56,7 +56,7 @@ Sets the screen brightness. | 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** @@ -85,7 +85,7 @@ Obtains the screen brightness adjustment mode. | 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** @@ -112,7 +112,7 @@ Sets the screen brightness adjustment mode. **Parameters** | 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** @@ -143,7 +143,7 @@ Sets whether to always keep the screen on. Call this API in **onShow()**. | 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** @@ -166,9 +166,9 @@ Defines the options for obtaining the screen brightness. | 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.| -| fail | (data: string, code: number) => void | No | Called when 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. | +| 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 an API call has failed. **data** indicates the error information, and **code** indicates the error code. | +| complete | () => void | No | Called when an API call is complete. | ## SetBrightnessOptions @@ -178,10 +178,10 @@ Defines the options for setting the screen brightness. | Name | Type | Mandatory| Description | | -------- | ------------------------------------ | ---- | ------------------------------------------------------------ | -| value | number | Yes | Screen brightness. The value is an integer ranging from **1** to **255**.
- If the value is less than or equal to **0**, value **1** will be used.
- If the value is greater than **255**, value **255** will be used.
- 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. | -| fail | (data: string, code: number) => void | No | Called when 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. | +| value | number | Yes | Screen brightness. The value is an integer ranging from **1** to **255**.
- If the value is less than or equal to **0**, value **1** will be used.
- If the value is greater than **255**, value **255** will be used.
- 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 | Called when an API call is successful. | +| 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 an API call is complete. | ## BrightnessResponse @@ -201,9 +201,9 @@ Defines the options for obtaining the screen brightness mode. | 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.| -| fail | (data: string, code: number) => void | No | Called when 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. | +| 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 an API call has failed. **data** indicates the error information, and **code** indicates the error code. | +| complete | () => void | No | Called when an API call is complete. | ## SetBrightnessModeOptions @@ -214,9 +214,9 @@ Defines the options for setting the screen brightness mode. | Name | Type | Mandatory| Description | | -------- | ------------------------------------ | ---- | ------------------------------------------------------ | | 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. | -| fail | (data: string, code: number) => void | No | Called when 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. | +| success | () => void | No | Called when an API call is successful. | +| 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 an API call is complete. | ## BrightnessModeResponse @@ -237,6 +237,6 @@ Defines the options for setting the screen to be steady on. | Name | Type | Mandatory| Description | | ------------ | ------------------------------------ | ---- | ------------------------------------------------------ | | 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. | -| fail | (data: string, code: number) => void | No | Called when 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. | +| success | () => void | No | Called when an API call is successful. | +| 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 an API call is complete. | diff --git a/en/application-dev/website.md b/en/application-dev/website.md index f1cde6dfbf47e5e4f681b37b18bb75b9868a598b..c6274ffeb0a2f423c5dee149ef1fbe27750c2888 100644 --- a/en/application-dev/website.md +++ b/en/application-dev/website.md @@ -1211,7 +1211,7 @@ - [@ohos.systemTimer (System Timer)](reference/apis/js-apis-system-timer.md) - [@ohos.wallpaper (Wallpaper)](reference/apis/js-apis-wallpaper.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) - application - [AccessibilityExtensionContext](reference/apis/js-apis-inner-application-accessibilityExtensionContext.md)