diff --git a/en/application-dev/reference/apis/js-apis-application-StartOptions.md b/en/application-dev/reference/apis/js-apis-application-StartOptions.md index af8d864c3b6ecd19449e318f608d25cacba0ccdf..b2a29f392acdac4b4e9bdfbdd1b31c7809671ce5 100644 --- a/en/application-dev/reference/apis/js-apis-application-StartOptions.md +++ b/en/application-dev/reference/apis/js-apis-application-StartOptions.md @@ -1,6 +1,6 @@ # StartOptions -> ![icon-note.gif](public_sys-resources/icon-note.gif) **NOTE**
+> **NOTE**
> The initial APIs of this module are supported since API version 9. Newly added APIs will be marked with a superscript to indicate their earliest API version. @@ -18,8 +18,8 @@ import StartOptions from '@ohos.application.StartOptions'; **System capability**: SystemCapability.Ability.AbilityRuntime.AbilityCore -| Name| Readable| Writable| Type| Mandatory| Description| +| Name | Readable | Writable | Type | Mandatory | Description | | -------- | -------- | -------- | -------- | -------- | -------- | -| [windowMode](js-apis-window.md#windowmode) | Yes| No| number | No| Window mode.| -| displayId | Yes| No| number | No| Display ID.| +| [windowMode](js-apis-window.md#windowmode) | Yes| No | number | No | Window mode. | +| displayId | Yes| No | number | No | Display ID. | diff --git a/en/application-dev/reference/apis/js-apis-application-Want.md b/en/application-dev/reference/apis/js-apis-application-Want.md index 5eb470dbe514f6993ed16d3e98c018d32742b8d7..19509a5e771ce744b16a8f231faf6f75bccb772b 100644 --- a/en/application-dev/reference/apis/js-apis-application-Want.md +++ b/en/application-dev/reference/apis/js-apis-application-Want.md @@ -1,6 +1,6 @@ # Want -> ![icon-note.gif](public_sys-resources/icon-note.gif) **NOTE**
+> **NOTE**
> The initial APIs of this module are supported since API version 8. Newly added APIs will be marked with a superscript to indicate their earliest API version. **Want** is the basic communication component of the system. @@ -17,14 +17,14 @@ import Want from '@ohos.application.Want'; **System capability**: SystemCapability.Ability.AbilityBase -| Name | Readable/Writable| Type | Mandatory| Description | -| ----------- | -------- | -------------------- | ---- | ------------------------------------------------------------ | -| deviceId | Read only | string | No | ID of the device running the ability. | -| bundleName | Read only | string | No | Bundle name of the ability. If both **bundleName** and **abilityName** are specified in a **Want** object, the **Want** object can directly match the specified ability.| -| abilityName | Read only | string | No | Name of the ability. If both **package** and **AbilityName** are specified in this field in a **Want** object, the **Want** object can directly match the specified ability.| -| uri | Read only | string | No | URI information to match. If **uri** is specified in a **Want** object, the **Want** object will match the specified URI information, including **scheme**, **schemeSpecificPart**, **authority**, and **path**.| -| type | Read only | string | No | MIME type, for example, **text/plain** or **image/***. | -| flags | Read only | number | No | How the **Want** object will be handled. By default, numbers are passed in. For details, see [flags](js-apis-featureAbility.md#flags).| -| action | Read only | string | No | Action option. | -| parameters | Read only | {[key: string]: any} | No | List of parameters in the **Want** object. | -| entities | Read only | Array\ | No | List of entities. | | + | Name | Readable/Writable | Type | Mandatory | Description | + | ----------- | -------- | -------------------- | ---- | ------------------------------------------------------------ | + | deviceId | Read only | string | No | ID of the device running the ability. | + | bundleName | Read only | string | No | Bundle name of the ability. If both **bundleName** and **abilityName** are specified in a **Want** object, the **Want** object can directly match the specified ability. | + | abilityName | Read only | string | No | Name of the ability. If both **package** and **AbilityName** are specified in this field in a **Want** object, the **Want** object can directly match the specified ability. | + | uri | Read only | string | No | URI information to match. If **uri** is specified in a **Want** object, the **Want** object will match the specified URI information, including **scheme**, **schemeSpecificPart**, **authority**, and **path**. | + | type | Read only | string | No | MIME type, for example, **text/plain** or **image/***. | + | flags | Read only | number | No | How the **Want** object will be handled. By default, numbers are passed in. For details, see [flags](js-apis-featureAbility.md#flags). | + | action | Read only | string | No | Action option. | + | parameters | Read only | {[key: string]: any} | No | List of parameters in the **Want** object. | + | entities | Read only | Array\ | No | List of entities. | diff --git a/en/application-dev/reference/apis/js-apis-application-ability.md b/en/application-dev/reference/apis/js-apis-application-ability.md index 5fce08ac4bc72bb2e7b430c4aa450f7478d80907..bca94a28134524a76e3e2f77f9b832ab620a86af 100644 --- a/en/application-dev/reference/apis/js-apis-application-ability.md +++ b/en/application-dev/reference/apis/js-apis-application-ability.md @@ -1,6 +1,6 @@ # Ability -> ![icon-note.gif](public_sys-resources/icon-note.gif) **NOTE**
+> **NOTE**
> The initial APIs of this module are supported since API version 9. Newly added APIs will be marked with a superscript to indicate their earliest API version. @@ -18,11 +18,11 @@ import Ability from '@ohos.application.Ability'; **System capability**: SystemCapability.Ability.AbilityRuntime.AbilityCore -| Name| Type| Readable| Writable| Description| -| -------- | -------- | -------- | -------- | -------- | -| context | [AbilityContext](js-apis-ability-context.md) | Yes| No| Context of an ability.| -| launchWant | [Want](js-apis-application-Want.md) | Yes| No| Parameters for starting the ability.| -| lastRequestWant | [Want](js-apis-application-Want.md) | Yes| No| Parameters used when the ability was started last time.| + | Name | Type | Readable | Writable | Description | + | -------- | -------- | -------- | -------- | -------- | + | context | [AbilityContext](js-apis-ability-context.md) | Yes | No | Context of an ability. | + | launchWant | [Want](js-apis-application-Want.md) | Yes | No | Parameters for starting the ability. | + | lastRequestWant | [Want](js-apis-application-Want.md) | Yes | No | Parameters used when the ability was started last time. | ## Ability.onCreate @@ -35,10 +35,10 @@ Called to initialize the service logic when an ability is created. **Parameters** - | Name| Type| Mandatory| Description| - | -------- | -------- | -------- | -------- | - | want | [Want](js-apis-application-Want.md) | Yes| Information related to this ability, including the ability name and bundle name.| - | param | AbilityConstant.LaunchParam | Yes| Parameters for starting the ability, and the reason for the last abnormal exit.| + | Name | Type | Mandatory | Description | + | -------- | -------- | -------- | -------- | + | want | [Want](js-apis-application-Want.md) | Yes | Information related to this ability, including the ability name and bundle name. | + | param | AbilityConstant.LaunchParam | Yes | Parameters for starting the ability, and the reason for the last abnormal exit. | **Example** @@ -61,9 +61,9 @@ Called when a **WindowStage** is created for this ability. **Parameters** - | Name| Type| Mandatory| Description| - | -------- | -------- | -------- | -------- | - | windowStage | window.WindowStage | Yes| **WindowStage** information.| + | Name | Type | Mandatory | Description | + | -------- | -------- | -------- | -------- | + | windowStage | window.WindowStage | Yes | **WindowStage** information. | **Example** @@ -105,9 +105,9 @@ Called when the **WindowStage** is restored during the migration of this ability **Parameters** - | Name| Type| Mandatory| Description| - | -------- | -------- | -------- | -------- | - | windowStage | window.WindowStage | Yes| **WindowStage** information.| + | Name | Type | Mandatory | Description | + | -------- | -------- | -------- | -------- | + | windowStage | window.WindowStage | Yes | **WindowStage** information. | **Example** @@ -187,15 +187,15 @@ Called to save data during the ability migration preparation process. **Parameters** - | Name| Type| Mandatory| Description| - | -------- | -------- | -------- | -------- | - | wantParam | {[key: string]: any} | Yes| **want** parameter.| + | Name | Type | Mandatory | Description | + | -------- | -------- | -------- | -------- | + | wantParam | {[key: string]: any} | Yes | **want** parameter. | **Return value** - | Type| Description| - | -------- | -------- | - | AbilityConstant.OnContinueResult | Continuation result.| + | Type | Description | + | -------- | -------- | + | AbilityConstant.OnContinueResult | Continuation result. | **Example** @@ -220,9 +220,9 @@ Called when the ability startup mode is set to singleton. **Parameters** - | Name| Type| Mandatory| Description| - | -------- | -------- | -------- | -------- | - | want | [Want](js-apis-application-Want.md) | Yes| Want parameters, such as the ability name and bundle name.| + | Name | Type | Mandatory | Description | + | -------- | -------- | -------- | -------- | + | want | [Want](js-apis-application-Want.md) | Yes | Want parameters, such as the ability name and bundle name. | **Example** @@ -245,9 +245,9 @@ Called when the configuration of the environment where the ability is running is **Parameters** - | Name| Type| Mandatory| Description| - | -------- | -------- | -------- | -------- | - | config | [Configuration](js-apis-configuration.md) | Yes| New configuration.| + | Name | Type | Mandatory | Description | + | -------- | -------- | -------- | -------- | + | config | [Configuration](js-apis-configuration.md) | Yes | New configuration. | **Example** @@ -275,16 +275,16 @@ Sends sequenceable data to the target ability. **Parameters** - | Name| Type| Mandatory| Description| - | -------- | -------- | -------- | -------- | - | method | string | Yes| Notification message string negotiated between the two abilities. The message is used to instruct the callee to register a function to receive the sequenceable data.| - | data | rpc.Sequenceable | Yes| Sequenceable data. You need to customize the data.| + | Name | Type | Mandatory | Description | + | -------- | -------- | -------- | -------- | + | method | string | Yes | Notification message string negotiated between the two abilities. The message is used to instruct the callee to register a function to receive the sequenceable data. | + | data | rpc.Sequenceable | Yes | Sequenceable data. You need to customize the data. | **Return value** - | Type| Description| - | -------- | -------- | - | Promise<void> | Promise used to return a response.| + | Type | Description | + | -------- | -------- | + | Promise<void> | Promise used to return a response. | **Example** @@ -345,16 +345,16 @@ Sends sequenceable data to the target ability and obtains the sequenceable data **Parameters** - | Name| Type| Mandatory| Description| - | -------- | -------- | -------- | -------- | - | method | string | Yes| Notification message string negotiated between the two abilities. The message is used to instruct the callee to register a function to receive the sequenceable data.| - | data | rpc.Sequenceable | Yes| Sequenceable data. You need to customize the data.| + | Name | Type | Mandatory | Description | + | -------- | -------- | -------- | -------- | + | method | string | Yes | Notification message string negotiated between the two abilities. The message is used to instruct the callee to register a function to receive the sequenceable data. | + | data | rpc.Sequenceable | Yes | Sequenceable data. You need to customize the data. | **Return value** - | Type| Description| - | -------- | -------- | - | Promise<rpc.MessageParcel> | Promise used to return the sequenceable data from the target ability.| + | Type | Description | + | -------- | -------- | + | Promise<rpc.MessageParcel> | Promise used to return the sequenceable data from the target ability. | **Example** @@ -451,9 +451,9 @@ Registers a callback that is invoked when the Stub on the target ability is disc **Parameters** - | Name| Type| Mandatory| Description| - | -------- | -------- | -------- | -------- | - | callback | OnReleaseCallBack | Yes| Callback used for the **onRelease** API.| + | Name | Type | Mandatory | Description | + | -------- | -------- | -------- | -------- | + | callback | OnReleaseCallBack | Yes | Callback used for the **onRelease** API. | **Example** @@ -499,10 +499,10 @@ Registers a caller notification callback, which is invoked when the target abili **Parameters** - | Name| Type| Mandatory| Description| - | -------- | -------- | -------- | -------- | - | method | string | Yes| Notification message string negotiated between the two abilities.| - | callback | CaleeCallBack | Yes| JS notification synchronization callback of the **rpc.MessageParcel** type. The callback must return at least one empty **rpc.Sequenceable** object. Otherwise, the function execution fails.| + | Name | Type | Mandatory | Description | + | -------- | -------- | -------- | -------- | + | method | string | Yes | Notification message string negotiated between the two abilities. | + | callback | CaleeCallBack | Yes | JS notification synchronization callback of the **rpc.MessageParcel** type. The callback must return at least one empty **rpc.Sequenceable** object. Otherwise, the function execution fails. | **Example** @@ -552,9 +552,9 @@ Unregisters a caller notification callback, which is invoked when the target abi **Parameters** - | Name| Type| Mandatory| Description| - | -------- | -------- | -------- | -------- | - | method | string | Yes| Registered notification message string.| + | Name | Type | Mandatory | Description | + | -------- | -------- | -------- | -------- | + | method | string | Yes | Registered notification message string. | **Example** @@ -575,9 +575,9 @@ Unregisters a caller notification callback, which is invoked when the target abi **System capability**: SystemCapability.Ability.AbilityRuntime.AbilityCore -| Name| Type| Readable| Writable| Description| -| -------- | -------- | -------- | -------- | -------- | -| (msg: string) | function | Yes| No| Prototype of the listener function interface registered by the caller.| + | Name | Type | Readable | Writable | Description | + | -------- | -------- | -------- | -------- | -------- | + | (msg: string) | function | Yes | No | Prototype of the listener function interface registered by the caller. | ## CaleeCallBack @@ -586,6 +586,6 @@ Unregisters a caller notification callback, which is invoked when the target abi **System capability**: SystemCapability.Ability.AbilityRuntime.AbilityCore -| Name| Type| Readable| Writable| Description| -| -------- | -------- | -------- | -------- | -------- | -| (indata: rpc.MessageParcel) | rpc.Sequenceable | Yes| No| Prototype of the message listener function interface registered by the callee.| + | Name | Type | Readable | Writable | Description | + | -------- | -------- | -------- | -------- | -------- | + | (indata: rpc.MessageParcel) | rpc.Sequenceable | Yes | No | Prototype of the message listener function interface registered by the callee. | diff --git a/en/application-dev/reference/apis/js-apis-application-abilityConstant.md b/en/application-dev/reference/apis/js-apis-application-abilityConstant.md index 226288e3cc52b09e3e110bc7b834bc134e23e6ba..1db280b4b8c111250cd1cb4230c5e665184cb0df 100644 --- a/en/application-dev/reference/apis/js-apis-application-abilityConstant.md +++ b/en/application-dev/reference/apis/js-apis-application-abilityConstant.md @@ -1,6 +1,6 @@ # AbilityConstant -> ![icon-note.gif](public_sys-resources/icon-note.gif) **NOTE** +> **NOTE**
> The initial APIs of this module are supported since API version 9. Newly added APIs will be marked with a superscript to indicate their earliest API version. @@ -19,10 +19,10 @@ import AbilityConstant from '@ohos.application.AbilityConstant'; **System capability**: SystemCapability.Ability.AbilityRuntime.Core -| Name| Type| Readable| Writable| Description| -| -------- | -------- | -------- | -------- | -------- | -| launchReason | LaunchReason| Yes| Yes| Ability launch reason.| -| lastExitReason | LastExitReason | Yes| Yes| Reason for the last exit.| + | Name | Type | Readable | Writable | Description | + | -------- | -------- | -------- | -------- | -------- | + | launchReason | LaunchReason | Yes | Yes | Ability launch reason. | + | lastExitReason | LastExitReason | Yes | Yes | Reason for the last exit. | ## AbilityConstant.LaunchReason @@ -30,12 +30,12 @@ Enumerates ability launch reasons. **System capability**: SystemCapability.Ability.AbilityRuntime.Core -| Name | Value | Description | -| ----------------------------- | ---- | ------------------------------------------------------------ | -| UNKNOWN | 0 | Unknown reason.| -| START_ABILITY | 1 | Ability startup.| -| CALL | 2 | Call.| -| CONTINUATION | 3 | Ability continuation.| + | Name | Value | Description | + | ----------------------------- | ---- | ------------------------------------------------------------ | + | UNKNOWN | 0 | Unknown reason. | + | START_ABILITY | 1 | Ability startup. | + | CALL | 2 | Call. | + | CONTINUATION | 3 | Ability continuation. | ## AbilityConstant.LastExitReason @@ -44,11 +44,11 @@ Enumerates reasons for the last exit. **System capability**: SystemCapability.Ability.AbilityRuntime.Core -| Name | Value | Description | -| ----------------------------- | ---- | ------------------------------------------------------------ | -| UNKNOWN | 0 | Unknown reason.| -| ABILITY_NOT_RESPONDING | 1 | The ability does not respond.| -| NORMAL | 2 | Normal status.| + | Name | Value | Description | + | ----------------------------- | ---- | ------------------------------------------------------------ | + | UNKNOWN | 0 | Unknown reason. | + | ABILITY_NOT_RESPONDING | 1 | The ability does not respond. | + | NORMAL | 2 | Normal status. | ## AbilityConstant.OnContinueResult @@ -57,8 +57,8 @@ Enumerates ability continuation results. **System capability**: SystemCapability.Ability.AbilityRuntime.Core -| Name | Value | Description | -| ----------------------------- | ---- | ------------------------------------------------------------ | -| AGREE | 0 | Continuation agreed.| -| REJECT | 1 | Continuation denied.| -| MISMATCH | 2 | Mismatch.| + | Name | Value | Description | + | ----------------------------- | ---- | ------------------------------------------------------------ | + | AGREE | 0 | Continuation agreed. | + | REJECT | 1 | Continuation denied. | + | MISMATCH | 2 | Mismatch. | diff --git a/en/application-dev/reference/apis/js-apis-application-abilitystage.md b/en/application-dev/reference/apis/js-apis-application-abilitystage.md index 516698bbbc1ddf7b4a3d70a89ef372ad67b48e78..8e501a482e04e33a18a8040d0183257b7c3e90c4 100644 --- a/en/application-dev/reference/apis/js-apis-application-abilitystage.md +++ b/en/application-dev/reference/apis/js-apis-application-abilitystage.md @@ -1,6 +1,6 @@ # AbilityStage -> ![icon-note.gif](public_sys-resources/icon-note.gif) **NOTE**
+> **NOTE**
> The initial APIs of this module are supported since API 9. Newly added APIs will be marked with a superscript to indicate their earliest API version. @@ -45,15 +45,15 @@ Called when a specified ability is started. **Parameters** - | Name| Type| Mandatory| Description| - | -------- | -------- | -------- | -------- | - | want | [Want](js-apis-application-Want.md) | Yes| Information about the ability to start, such as the ability name and bundle name.| + | Name | Type | Mandatory | Description | + | -------- | -------- | -------- | -------- | + | want | [Want](js-apis-application-Want.md) | Yes | Information about the ability to start, such as the ability name and bundle name. | **Return value** - | Type| Description| - | -------- | -------- | - | string | Returns an ability ID. If this ability has been started, no new instance is created and the ability is placed at the top of the stack. Otherwise, a new instance is created and started.| + | Type | Description | + | -------- | -------- | + | string | Returns an ability ID. If this ability has been started, no new instance is created and the ability is placed at the top of the stack. Otherwise, a new instance is created and started. | **Example** @@ -77,9 +77,9 @@ Called when the global configuration is updated. **Parameters** - | Name| Type| Mandatory| Description| - | -------- | -------- | -------- | -------- | - | config | [Configuration](js-apis-configuration.md) | Yes| Callback invoked when the global configuration is updated. The global configuration indicates the configuration of the environment where the application is running and includes the language and color mode.| + | Name | Type | Mandatory | Description | + | -------- | -------- | -------- | -------- | + | config | [Configuration](js-apis-configuration.md) | Yes | Callback invoked when the global configuration is updated. The global configuration indicates the configuration of the environment where the application is running and includes the language and color mode. | **Example** @@ -96,6 +96,6 @@ Describes the configuration information about the context. **System capability**: SystemCapability.Ability.AbilityRuntime.Core -| Name | Type | Description | -| ----------- | --------------------------- | ------------------------------------------------------------ | -| context | [AbilityStageContext](js-apis-featureAbility.md) | Called when initialization is performed during ability startup.| + | Name | Type | Description | + | ----------- | --------------------------- | ------------------------------------------------------------ | + | context | [AbilityStageContext](js-apis-featureAbility.md) | Called when initialization is performed during ability startup. | diff --git a/en/application-dev/reference/apis/js-apis-application-context.md b/en/application-dev/reference/apis/js-apis-application-context.md index 4b58792502051c4046f3000d006a1228c1336704..1955bc22b4ae2cb4ec80c1c7e51e7aa616f47a26 100644 --- a/en/application-dev/reference/apis/js-apis-application-context.md +++ b/en/application-dev/reference/apis/js-apis-application-context.md @@ -1,6 +1,6 @@ # Context -> ![icon-note.gif](public_sys-resources/icon-note.gif) **NOTE** +> **NOTE**
> The initial APIs of this module are supported since API version 9. Newly added APIs will be marked with a superscript to indicate their earliest API version. @@ -17,18 +17,18 @@ You must extend **AbilityContext** to implement this module. **System capability**: SystemCapability.Ability.AbilityRuntime.Core - | Name| Type| Readable| Writable| Description| -| -------- | -------- | -------- | -------- | -------- | -| resourceManager | ResourceManager | Yes| No| **ResourceManager** object.| -| applicationInfo | ApplicationInfo | Yes| No| Information about the application.| -| cacheDir | string | Yes| No| Cache directory of the application on the internal storage.| -| tempDir | string | Yes| No| Temporary file directory of the application.| -| filesDir | string | Yes| No| File directory of the application on the internal storage.| -| databaseDir | string | Yes| No| Storage directory of local data.| -| storageDir | string | Yes| No| Storage directory of lightweight data.| -| bundleCodeDir | string | Yes| No| Application installation path.| -| distributedFilesDir | string | Yes| No| Storage directory of distributed application data files.| -| eventHub | [EventHub](js-apis-eventhub.md) | Yes| No| Event hub information.| + | Name | Type | Readable | Writable | Description | + | -------- | -------- | -------- | -------- | -------- | + | resourceManager | ResourceManager | Yes | No | **ResourceManager** object. | + | applicationInfo | ApplicationInfo | Yes | No | Information about the application. | + | cacheDir | string | Yes | No | Cache directory of the application on the internal storage. | + | tempDir | string | Yes | No | Temporary file directory of the application. | + | filesDir | string | Yes | No | File directory of the application on the internal storage. | + | databaseDir | string | Yes | No | Storage directory of local data. | + | storageDir | string | Yes | No | Storage directory of lightweight data. | + | bundleCodeDir | string | Yes | No | Application installation path. | + | distributedFilesDir | string | Yes | No | Storage directory of distributed application data files. | + | eventHub | [EventHub](js-apis-eventhub.md) | Yes | No | Event hub information. | ## Context.createBundleContext @@ -41,15 +41,15 @@ Creates an application context. **Parameters** - | Name| Type| Mandatory| Description| - | -------- | -------- | -------- | -------- | - | bundleName | string | Yes| Application bundle name.| + | Name | Type | Mandatory | Description | + | -------- | -------- | -------- | -------- | + | bundleName | string | Yes | Application bundle name. | **Return value** - | Type| Description| - | -------- | -------- | - | Context | Context of the application created.| + | Type | Description | + | -------- | -------- | + | Context | Context of the application created. | **Example** @@ -69,9 +69,9 @@ Obtains the context of this application. **Return value** - | Type| Description| - | -------- | -------- | - | Context | Context obtained.| + | Type | Description | + | -------- | -------- | + | Context | Context obtained. | **Example** diff --git a/en/application-dev/reference/apis/js-apis-application-staticSubscriberExtensionAbility.md b/en/application-dev/reference/apis/js-apis-application-staticSubscriberExtensionAbility.md index 3f3a515587165c72d8fd46b495f6c68b1d9cae69..0a0a18ae37b50456db8c5e9d81ebceaaf675f18f 100644 --- a/en/application-dev/reference/apis/js-apis-application-staticSubscriberExtensionAbility.md +++ b/en/application-dev/reference/apis/js-apis-application-staticSubscriberExtensionAbility.md @@ -1,7 +1,7 @@ # StaticSubscriberExtensionAbility -> ![icon-note.gif](public_sys-resources/icon-note.gif) **NOTE** +> **NOTE**
> The initial APIs of this module are supported since API version 9. Newly added APIs will be marked with a superscript to indicate their earliest API version. ## Modules to Import @@ -20,9 +20,9 @@ Callback of the common event of a static subscriber. **Parameters** - | Name| Type| Mandatory| Description| + | Name | Type | Mandatory | Description | | -------- | -------- | -------- | -------- | - | event | CommonEventData | Yes| Callback of the common event of a static subscriber.| + | event | CommonEventData | Yes | Callback of the common event of a static subscriber. | **Example** diff --git a/en/application-dev/reference/apis/js-apis-uripermissionmanager.md b/en/application-dev/reference/apis/js-apis-uripermissionmanager.md index 1a0c320f80c90faa313d9e53681024b6a289195d..506611ba4807edf47d583bd57bd8a4d656496010 100644 --- a/en/application-dev/reference/apis/js-apis-uripermissionmanager.md +++ b/en/application-dev/reference/apis/js-apis-uripermissionmanager.md @@ -1,6 +1,6 @@ # uriPermissionManager -> ![icon-note.gif](public_sys-resources/icon-note.gif) **NOTE** +> **NOTE**
> The initial APIs of this module are supported since API version 9. Newly added APIs will be marked with a superscript to indicate their earliest API version. @@ -27,12 +27,12 @@ SystemCapability.Ability.AbilityRuntime.Core **Parameters** - | Name| Type| Mandatory| Description| - | -------- | -------- | -------- | -------- | - | uri | string | Yes| URI of a file, for example, **fileshare:///com.samples.filesharetest.FileShare/person/10**.| - | flag | wantConstant.Flags | Yes| Read or write permission on the file specified by the URI.| - | accessTokenId | number | Yes| Unique ID of an application, which is obtained through the **BundleManager** API.| - | callback | AsyncCallback<number> | Yes| Callback used to return the check result. The value **0** means that the application has the specified permission, and **-1** means the opposite.| + | Name | Type | Mandatory | Description | + | -------- | -------- | -------- | -------- | + | uri | string | Yes | URI of a file, for example, **fileshare:///com.samples.filesharetest.FileShare/person/10**. | + | flag | wantConstant.Flags | Yes | Read or write permission on the file specified by the URI. | + | accessTokenId | number | Yes | Unique ID of an application, which is obtained through the **BundleManager** API. | + | callback | AsyncCallback<number> | Yes | Callback used to return the check result. The value **0** means that the application has the specified permission, and **-1** means the opposite. | **Example** @@ -56,17 +56,17 @@ SystemCapability.Ability.AbilityRuntime.Core **Parameters** - | Name| Type| Mandatory| Description| - | -------- | -------- | -------- | -------- | - | uri | string | Yes| URI of a file, for example, **fileshare:///com.samples.filesharetest.FileShare/person/10**.| - | flag | wantConstant.Flags | Yes| Read or write permission on the file specified by the URI.| - | accessTokenId | number | Yes| Unique ID of an application, which is obtained through the **BundleManager** API.| + | Name | Type | Mandatory | Description | + | -------- | -------- | -------- | -------- | + | uri | string | Yes | URI of a file, for example, **fileshare:///com.samples.filesharetest.FileShare/person/10**. | + | flag | wantConstant.Flags | Yes | Read or write permission on the file specified by the URI. | + | accessTokenId | number | Yes | Unique ID of an application, which is obtained through the **BundleManager** API. | **Return value** - | Type| Description| - | -------- | -------- | - | Promise<number> | Promise used to return the check result. The value **0** means that the application has the specified permission, and **-1** means the opposite.| + | Type | Description | + | -------- | -------- | + | Promise<number> | Promise used to return the check result. The value **0** means that the application has the specified permission, and **-1** means the opposite. | **Example** @@ -78,4 +78,4 @@ SystemCapability.Ability.AbilityRuntime.Core }).catch((error) => { console.log('Verification failed.'); }) - ``` + ``` \ No newline at end of file diff --git a/en/application-dev/reference/apis/js-apis-url.md b/en/application-dev/reference/apis/js-apis-url.md index 7456aacbe14208913790450fad458993accaf120..9f105f845950f1f206c326dcd94c4adf8b83c12c 100755 --- a/en/application-dev/reference/apis/js-apis-url.md +++ b/en/application-dev/reference/apis/js-apis-url.md @@ -1,6 +1,6 @@ # URL String Parsing -> ![icon-note.gif](public_sys-resources/icon-note.gif) **NOTE**
+> **NOTE**
> The initial APIs of this module are supported since API version 7. Newly added APIs will be marked with a superscript to indicate their earliest API version. @@ -48,10 +48,10 @@ Appends a key-value pair into the query string. **Parameters** -| Name| Type| Mandatory| Description| -| -------- | -------- | -------- | -------- | -| name | string | Yes| Key of the key-value pair to append.| -| value | string | Yes| Value of the key-value pair to append.| + | Name | Type | Mandatory | Description | + | -------- | -------- | -------- | -------- | + | name | string | Yes | Key of the key-value pair to append. | + | value | string | Yes | Value of the key-value pair to append. | **Example** @@ -72,9 +72,9 @@ Deletes key-value pairs of the specified key. **Parameters** -| Name| Type| Mandatory| Description| -| -------- | -------- | -------- | -------- | -| name | string | Yes| Key of the key-value pairs to delete.| + | Name | Type | Mandatory | Description | + | -------- | -------- | -------- | -------- | + | name | string | Yes | Key of the key-value pairs to delete. | **Example** @@ -95,15 +95,15 @@ Obtains all the key-value pairs based on the specified key. **Parameters** -| Name| Type| Mandatory| Description| -| -------- | -------- | -------- | -------- | -| name | string | Yes| Key specified to obtain all key-value pairs.| + | Name | Type | Mandatory | Description | + | -------- | -------- | -------- | -------- | + | name | string | Yes | Key specified to obtain all key-value pairs. | **Return value** -| Type| Description| -| -------- | -------- | -| string[] | All key-value pairs matching the specified key.| + | Type | Description | + | -------- | -------- | + | string[] | All key-value pairs matching the specified key. | **Example** @@ -125,9 +125,9 @@ Obtains an ES6 iterator. Each item of the iterator is a JavaScript array, and th **Return value** -| Type| Description| -| -------- | -------- | -| IterableIterator<[string, string]> | ES6 iterator.| + | Type | Description | + | -------- | -------- | + | IterableIterator<[string, string]> | ES6 iterator. | **Example** @@ -149,18 +149,18 @@ Traverses the key-value pairs in the **URLSearchParams** instance by using a cal **Parameters** -| Name| Type| Mandatory| Description| -| -------- | -------- | -------- | -------- | -| callbackfn | function | Yes| Callback invoked to traverse the key-value pairs in the **URLSearchParams** instance.| -| thisArg | Object | No| Value to use when the callback is invoked.| + | Name | Type | Mandatory | Description | + | -------- | -------- | -------- | -------- | + | callbackfn | function | Yes | Callback invoked to traverse the key-value pairs in the **URLSearchParams** instance. | + | thisArg | Object | No | Value to use when the callback is invoked. | **Table 1** callbackfn parameter description -| Name| Type| Mandatory| Description| -| -------- | -------- | -------- | -------- | -| value | string | Yes| Value that is currently traversed.| -| key | string | Yes| Key that is currently traversed.| -| searchParams | Object | Yes| Instance that invokes the **forEach** method.| + | Name | Type | Mandatory | Description | + | -------- | -------- | -------- | -------- | + | value | string | Yes | Value that is currently traversed. | + | key | string | Yes | Key that is currently traversed. | + | searchParams | Object | Yes | Instance that invokes the **forEach** method. | **Example** @@ -182,16 +182,16 @@ Obtains the value of the first key-value pair based on the specified key. **Parameters** -| Name| Type| Mandatory| Description| -| -------- | -------- | -------- | -------- | -| name | string | Yes| Key specified to obtain the value.| + | Name | Type | Mandatory | Description | + | -------- | -------- | -------- | -------- | + | name | string | Yes | Key specified to obtain the value. | **Return value** -| Type| Description| -| -------- | -------- | -| string | Returns the value of the first key-value pair if obtained.| -| null | Returns null if no value is obtained.| + | Type | Description | + | -------- | -------- | + | string | Returns the value of the first key-value pair if obtained. | + | null | Returns null if no value is obtained. | **Example** @@ -213,15 +213,15 @@ Checks whether a key has a value. **Parameters** -| Name| Type| Mandatory| Description| -| -------- | -------- | -------- | -------- | -| name | string | Yes| Key specified to search for its value.| + | Name | Type | Mandatory | Description | + | -------- | -------- | -------- | -------- | + | name | string | Yes | Key specified to search for its value. | **Return value** -| Type| Description| -| -------- | -------- | -| boolean | Returns **true** if the value exists; returns **false** otherwise.| + | Type | Description | + | -------- | -------- | + | boolean | Returns **true** if the value exists; returns **false** otherwise. | **Example** @@ -242,10 +242,10 @@ Sets the value for a key. If key-value pairs matching the specified key exist, t **Parameters** -| Name| Type| Mandatory| Description| -| -------- | -------- | -------- | -------- | -| name | string | Yes| Key of the value to set.| -| value | string | Yes| Value to set.| + | Name | Type | Mandatory | Description | + | -------- | -------- | -------- | -------- | + | name | string | Yes | Key of the value to set. | + | value | string | Yes | Value to set. | **Example** @@ -283,9 +283,9 @@ Obtains an ES6 iterator that contains the keys of all the key-value pairs. **Return value** -| Type| Description| -| -------- | -------- | -| IterableIterator<string> | ES6 iterator that contains the keys of all the key-value pairs.| + | Type | Description | + | -------- | -------- | + | IterableIterator<string> | ES6 iterator that contains the keys of all the key-value pairs. | **Example** @@ -307,9 +307,9 @@ Obtains an ES6 iterator that contains the values of all the key-value pairs. **Return value** -| Type| Description| -| -------- | -------- | -| IterableIterator<string> | ES6 iterator that contains the values of all the key-value pairs.| + | Type | Description | + | -------- | -------- | + | IterableIterator<string> | ES6 iterator that contains the values of all the key-value pairs. | **Example** @@ -331,9 +331,9 @@ Obtains an ES6 iterator. Each item of the iterator is a JavaScript array, and th **Return value** -| Type| Description| -| -------- | -------- | -| IterableIterator<[string, string]> | ES6 iterator.| + | Type | Description | + | -------- | -------- | + | IterableIterator<[string, string]> | ES6 iterator. | **Example** @@ -355,9 +355,9 @@ Obtains search parameters that are serialized as a string and, if necessary, per **Return value** -| Type| Description| -| -------- | -------- | -| string | String of serialized search parameters, which is percent-encoded if necessary.| + | Type | Description | + | -------- | -------- | + | string | String of serialized search parameters, which is percent-encoded if necessary. | **Example** @@ -401,10 +401,10 @@ Creates a URL. **Parameters** -| Name| Type| Mandatory| Description| -| -------- | -------- | -------- | -------- | -| url | string | Yes| Input object.| -| base | string \| URL | No| Input parameter, which can be any of the following:
- **string**: string
- **URL**: string or object| + | Name | Type | Mandatory | Description | + | -------- | -------- | -------- | -------- | + | url | string | Yes | Input object. | + | base | string \ | URL | No | Input parameter, which can be any of the following:
- **string**: string
- **URL**: string or object | **Example** @@ -434,9 +434,9 @@ Converts the parsed URL into a string. **Return value** -| Type| Description| -| -------- | -------- | -| string | Website address in a serialized string.| + | Type | Description | + | -------- | -------- | + | string | Website address in a serialized string. | **Example** @@ -456,12 +456,12 @@ Converts the parsed URL into a JSON string. **Return value** -| Type| Description| -| -------- | -------- | -| string | Website address in a serialized string.| + | Type | Description | + | -------- | -------- | + | string | Website address in a serialized string. | **Example** ```js const url = new URL('http://username:password@host:8080/directory/file?query=pppppp#qwer=da'); url.toJSON() -``` +``` \ No newline at end of file diff --git a/en/application-dev/reference/apis/js-apis-usb.md b/en/application-dev/reference/apis/js-apis-usb.md index 5a1bd85196e27394a0dcb8225df846e6aa52b541..06aee1c2fe533edae1e869152beefc1b8afb1984 100644 --- a/en/application-dev/reference/apis/js-apis-usb.md +++ b/en/application-dev/reference/apis/js-apis-usb.md @@ -20,7 +20,7 @@ Obtains the USB device list. - **Return value** | Type| Description| | -------- | -------- | - | Array<Readonly<[USBDevice](#usbdevice)>> | Device information list.| + | Array<Readonly<[USBDevice](#usbdevice)>> | Device information list. | - **Example** ```js @@ -92,12 +92,12 @@ Before you do this, call [usb.getDevices](#usbgetdevices) to obtain the USB devi - **Parameters** | Name| Type| Mandatory| Description| | -------- | -------- | -------- | -------- | - | device | [USBDevice](#usbdevice) | Yes| USB device information.| + | device | [USBDevice](#usbdevice) | Yes| USB device information. | - **Return value** | Type| Description| | -------- | -------- | - | Readonly<[USBDevicePipe](#usbdevicepipe)> | USB device pipe for data transfer.| + | Readonly<[USBDevicePipe](#usbdevicepipe)> | USB device pipe for data transfer. | - **Example** ```js @@ -117,12 +117,12 @@ Checks whether the application has the permission to access the device. - **Parameters** | Name| Type| Mandatory| Description| | -------- | -------- | -------- | -------- | - | deviceName | string | Yes| Device name.| + | deviceName | string | Yes| Device name. | - **Return value** | Type| Description| | -------- | -------- | - | boolean | Returns **true** if the application has the permission to access the device; returns **false** otherwise.| + | boolean | Returns **true** if the application has the permission to access the device; returns **false** otherwise. | - **Example** ```js @@ -143,12 +143,12 @@ Requests the temporary permission for the application to access the USB device. - **Parameters** | Name| Type| Mandatory| Description| | -------- | -------- | -------- | -------- | - | deviceName | string | Yes| Device name.| + | deviceName | string | Yes| Device name. | - **Return value** | Type| Description| | -------- | -------- | - | Promise<boolean> | Returns **true** if the temporary device access permissions are granted; returns **false** otherwise.| + | Promise<boolean> | Returns **true** if the temporary device access permissions are granted; returns **false** otherwise. | - **Example** ```js @@ -172,14 +172,14 @@ Before you do this, call [usb.getDevices](#usbgetdevices) to obtain the USB devi - **Parameters** | Name| Type| Mandatory| Description| | -------- | -------- | -------- | -------- | - | pipe | [USBDevicePipe](#usbdevicepipe) | Yes| Device pipe, which is used to determine the bus number and device address.| - | iface | [USBInterface](#usbinterface) | Yes| USB interface, which is used to determine the index of the interface to claim.| - | force | boolean | No| Whether to forcibly claim the USB interface. The default value is **false**, indicating not to forcibly claim the USB interface.| + | pipe | [USBDevicePipe](#usbdevicepipe) | Yes| Device pipe, which is used to determine the bus number and device address. | + | iface | [USBInterface](#usbinterface) | Yes| USB interface, which is used to determine the index of the interface to claim. | + | force | boolean | No| Whether to forcibly claim the USB interface. The default value is **false**, indicating not to forcibly claim the USB interface. | - **Return value** | Type| Description| | -------- | -------- | - | number | Returns **0** if the USB interface is successfully claimed; returns an error code otherwise.| + | number | Returns **0** if the USB interface is successfully claimed; returns an error code otherwise. | - **Example** ```js @@ -201,13 +201,13 @@ Before you do this, ensure that you have claimed the interface by calling [usb.c - **Parameters** | Name| Type| Mandatory| Description| | -------- | -------- | -------- | -------- | - | pipe | [USBDevicePipe](#usbdevicepipe) | Yes| Device pipe, which is used to determine the bus number and device address.| - | iface | [USBInterface](#usbinterface) | Yes| USB interface, which is used to determine the index of the interface to release.| + | pipe | [USBDevicePipe](#usbdevicepipe) | Yes| Device pipe, which is used to determine the bus number and device address. | + | iface | [USBInterface](#usbinterface) | Yes| USB interface, which is used to determine the index of the interface to release. | - **Return value** | Type| Description| | -------- | -------- | - | number | Returns **0** if the USB interface is successfully released; returns an error code otherwise.| + | number | Returns **0** if the USB interface is successfully released; returns an error code otherwise. | - **Example** ```js @@ -229,13 +229,13 @@ Before you do this, call [usb.getDevices](#usbgetdevices) to obtain the USB devi - **Parameters** | Name| Type| Mandatory| Description| | -------- | -------- | -------- | -------- | - | pipe | [USBDevicePipe](#usbdevicepipe) | Yes| Device pipe, which is used to determine the bus number and device address.| - | config | [USBConfig](#usbconfig) | Yes| USB configuration to set.| + | pipe | [USBDevicePipe](#usbdevicepipe) | Yes| Device pipe, which is used to determine the bus number and device address. | + | config | [USBConfig](#usbconfig) | Yes| USB configuration to set. | - **Return value** | Type| Description| | -------- | -------- | - | number | Returns **0** if the USB configuration is successfully set; returns an error code otherwise.| + | number | Returns **0** if the USB configuration is successfully set; returns an error code otherwise. | - **Example** ```js @@ -257,13 +257,13 @@ Before you do this, call [usb.getDevices](#usbgetdevices) to obtain the USB devi - **Parameters** | Name| Type| Mandatory| Description| | -------- | -------- | -------- | -------- | - | pipe | [USBDevicePipe](#usbdevicepipe) | Yes| Device pipe, which is used to determine the bus number and device address.| - | iface | [USBInterface](#usbinterface) | Yes| USB interface to set.| + | pipe | [USBDevicePipe](#usbdevicepipe) | Yes| Device pipe, which is used to determine the bus number and device address. | + | iface | [USBInterface](#usbinterface) | Yes| USB interface to set. | - **Return value** | Type| Description| | -------- | -------- | - | number | Returns **0** if the USB interface is successfully set; returns an error code otherwise.| + | number | Returns **0** if the USB interface is successfully set; returns an error code otherwise. | - **Example** ```js @@ -285,12 +285,12 @@ Before you do this, call [usb.getDevices](#usbgetdevices) to obtain the USB devi - **Parameters** | Name| Type| Mandatory| Description| | -------- | -------- | -------- | -------- | - | pipe | [USBDevicePipe](#usbdevicepipe) | Yes| Device pipe, which is used to determine the bus number and device address.| + | pipe | [USBDevicePipe](#usbdevicepipe) | Yes| Device pipe, which is used to determine the bus number and device address. | - **Return value** | Type| Description| | -------- | -------- | - | Uint8Array | Raw descriptor data.| + | Uint8Array | Raw descriptor data. | - **Example** ```js @@ -311,12 +311,12 @@ Before you do this, call [usb.getDevices](#usbgetdevices) to obtain the USB devi - **Parameters** | Name| Type| Mandatory| Description| | -------- | -------- | -------- | -------- | - | pipe | [USBDevicePipe](#usbdevicepipe) | Yes| Device pipe, which is used to determine the bus number and device address.| + | pipe | [USBDevicePipe](#usbdevicepipe) | Yes| Device pipe, which is used to determine the bus number and device address. | - **Return value** | Type| Description| | -------- | -------- | - | number | File descriptor of the USB device.| + | number | File descriptor of the USB device. | - **Example** ```js @@ -337,14 +337,14 @@ Before you do this, call [usb.getDevices](#usbgetdevices) to obtain the USB devi - **Parameters** | Name| Type| Mandatory| Description| | -------- | -------- | -------- | -------- | - | pipe | [USBDevicePipe](#usbdevicepipe) | Yes| USB device pipe, which is used to determine the USB device.| - | contrlparam | [USBControlParams](#usbcontrolparams) | Yes| Control transfer parameters.| - | timeout | number | No| Timeout duration. The default value is **0**, indicating no timeout.| + | pipe | [USBDevicePipe](#usbdevicepipe) | Yes| USB device pipe, which is used to determine the USB device. | + | contrlparam | [USBControlParams](#usbcontrolparams) | Yes| Control transfer parameters. | + | timeout | number | No| Timeout duration. The default value is **0**, indicating no timeout. | - **Return value** | Type| Description| | -------- | -------- | - | Promise<number> | Returns the size of the transmitted or received data block if the control transfer is successful; returns **-1** if an exception occurs.| + | Promise<number> | Returns the size of the transmitted or received data block if the control transfer is successful; returns **-1** if an exception occurs. | - **Example** ```js @@ -367,15 +367,15 @@ Before you do this, call [usb.getDevices](#usbgetdevices) to obtain the USB devi - **Parameters** | Name| Type| Mandatory| Description| | -------- | -------- | -------- | -------- | - | pipe | [USBDevicePipe](#usbdevicepipe) | Yes| USB device pipe, which is used to determine the USB device.| - | endpoint | [USBEndpoint](#usbendpoint) | Yes| USB endpoint, which is used to determine the USB port for data transfer.| - | buffer | Uint8Array | Yes| Buffer for writing or reading data.| - | timeout | number | No| Timeout duration. The default value is **0**, indicating no timeout.| + | pipe | [USBDevicePipe](#usbdevicepipe) | Yes| USB device pipe, which is used to determine the USB device. | + | endpoint | [USBEndpoint](#usbendpoint) | Yes| USB endpoint, which is used to determine the USB port for data transfer. | + | buffer | Uint8Array | Yes| Buffer for writing or reading data. | + | timeout | number | No| Timeout duration. The default value is **0**, indicating no timeout. | - **Return value** | Type| Description| | -------- | -------- | - | Promise<number> | Returns the size of the transmitted or received data block if the control transfer is successful; returns **-1** if an exception occurs.| + | Promise<number> | Returns the size of the transmitted or received data block if the control transfer is successful; returns **-1** if an exception occurs. | - **Example** ```js @@ -401,12 +401,12 @@ Before you do this, call [usb.getDevices](#usbgetdevices) to obtain the USB devi - **Parameters** | Name| Type| Mandatory| Description| | -------- | -------- | -------- | -------- | - | pipe | [USBDevicePipe](#usbdevicepipe) | Yes| USB device pipe.| + | pipe | [USBDevicePipe](#usbdevicepipe) | Yes| USB device pipe. | - **Return value** | Type| Description| | -------- | -------- | - | number | Returns **0** if the USB device pipe is closed successfully; returns an error code otherwise.| + | number | Returns **0** if the USB device pipe is closed successfully; returns an error code otherwise. | - **Example** ```js @@ -423,14 +423,14 @@ Represents the USB endpoint from which data is sent or received. You can obtain | Name| Type| Description| | -------- | -------- | -------- | -| address | number | Endpoint address.| -| attributes | number | Endpoint attributes.| -| interval | number | Endpoint interval.| -| maxPacketSize | number | Maximum size of data packets on the endpoint.| -| direction | [USBRequestDirection](#usbrequestdirection) | Endpoint direction.| -| number | number | Endpoint number.| -| type | number | Endpoint type.| -| interfaceId | number | Unique ID of the interface to which the endpoint belongs.| +| address | number | Endpoint address. | +| attributes | number | Endpoint attributes. | +| interval | number | Endpoint interval. | +| maxPacketSize | number | Maximum size of data packets on the endpoint. | +| direction | [USBRequestDirection](#usbrequestdirection) | Endpoint direction. | +| number | number | Endpoint number. | +| type | number | Endpoint type. | +| interfaceId | number | Unique ID of the interface to which the endpoint belongs. | ## USBInterface @@ -441,13 +441,13 @@ Represents a USB interface. One [USBConfig](#usbconfig) can contain multiple **U | Name| Type| Description| | -------- | -------- | -------- | -| id | number | Unique ID of the USB interface.| -| protocol | number | Interface protocol.| -| clazz | number | Device type.| -| subClass | number | Device subclass.| -| alternateSetting | number | Settings for alternating between descriptors of the same USB interface.| -| name | string | Interface name.| -| endpoints | Array<[USBEndpoint](#usbendpoint)> | Endpoints that belong to the USB interface.| +| id | number | Unique ID of the USB interface. | +| protocol | number | Interface protocol. | +| clazz | number | Device type. | +| subClass | number | Device subclass. | +| alternateSetting | number | Settings for alternating between descriptors of the same USB interface. | +| name | string | Interface name. | +| endpoints | Array<[USBEndpoint](#usbendpoint)> | Endpoints that belong to the USB interface. | ## USBConfig @@ -458,13 +458,13 @@ Represents the USB configuration. One [USBDevice](#usbdevice) can contain multip | Name| Type| Description| | -------- | -------- | -------- | -| id | number | Unique ID of the USB configuration.| -| attributes | number | Configuration attributes.| -| maxPower | number | Maximum power consumption, in mA.| -| name | string | Configuration name, which can be left empty.| -| isRemoteWakeup | boolean | Support for remote wakeup.| -| isSelfPowered | boolean | Support for independent power supplies.| -| interfaces | Array <[USBInterface](#usbinterface)> | Supported interface attributes.| +| id | number | Unique ID of the USB configuration. | +| attributes | number | Configuration attributes. | +| maxPower | number | Maximum power consumption, in mA. | +| name | string | Configuration name, which can be left empty. | +| isRemoteWakeup | boolean | Support for remote wakeup. | +| isSelfPowered | boolean | Support for independent power supplies. | +| interfaces | Array <[USBInterface](#usbinterface)> | Supported interface attributes. | ## USBDevice @@ -475,19 +475,19 @@ Represents USB device information. | Name| Type| Description| | -------- | -------- | -------- | -| busNum | number | Bus address.| -| devAddress | number | Device address.| -| serial | string | Device SN.| -| name | string | Device name.| -| manufacturerName | string | Device manufacturer.| -| productName | string | Product information.| -| version | string | Version.| -| vendorId | number | Vendor ID.| -| productId | number | Product ID.| -| clazz | number | Device class.| -| subClass | number | Device subclass.| -| protocol | number | Device protocol code.| -| configs | Array<[USBConfig](#usbconfig)> | Device configuration descriptor information.| +| busNum | number | Bus address. | +| devAddress | number | Device address. | +| serial | string | Device SN. | +| name | string | Device name. | +| manufacturerName | string | Device manufacturer. | +| productName | string | Product information. | +| version | string | Version. | +| vendorId | number | Vendor ID. | +| productId | number | Product ID. | +| clazz | number | Device class. | +| subClass | number | Device subclass. | +| protocol | number | Device protocol code. | +| configs | Array<[USBConfig](#usbconfig)> | Device configuration descriptor information. | ## USBDevicePipe @@ -498,8 +498,8 @@ Represents a USB device pipe, which is used to determine a USB device. | Name| Type| Description| | -------- | -------- | -------- | -| busNum | number | Bus address.| -| devAddress | number | Device address.| +| busNum | number | Bus address. | +| devAddress | number | Device address. | ## USBControlParams @@ -510,12 +510,12 @@ Represents control transfer parameters. | Name| Type| Description| | -------- | -------- | -------- | -| request | number | Request type.| -| target | [USBRequestTargetType](#usbrequesttargettype) | Represents the request target type.| -| reqType | [USBControlRequestType](#usbcontrolrequesttype) | Request control type.| +| request | number | Request type. | +| target | [USBRequestTargetType](#usbrequesttargettype) | Type of the request target. | +| reqType | [USBControlRequestType](#usbcontrolrequesttype) | Request control type. | | value | number | Request parameters| -| index | number | Index of the request parameter value.| -| data | Uint8Array | Buffer for writing or reading data.| +| index | number | Index of the request parameter value. | +| data | Uint8Array | Buffer for writing or reading data. | ## USBRequestTargetType @@ -526,8 +526,8 @@ Represents the request target type. | Name| Default Value | Description| | -------- | -------- | -------- | -| USB_REQUEST_TARGET_DEVICE | 0 | Device.| -| USB_REQUEST_TARGET_INTERFACE | 1 | Interface.| +| USB_REQUEST_TARGET_DEVICE | 0 | Device. | +| USB_REQUEST_TARGET_INTERFACE | 1 | Interface. | | USB_REQUEST_TARGET_ENDPOINT | 2 | Endpoint| | USB_REQUEST_TARGET_OTHER | 3 | Others| @@ -541,7 +541,7 @@ Enumerates control request types. | Name| Default Value | Description| | -------- | -------- | -------- | | USB_REQUEST_TYPE_STANDARD | 0 | Standard| -| USB_REQUEST_TYPE_CLASS | 1 | Class.| +| USB_REQUEST_TYPE_CLASS | 1 | Class. | | USB_REQUEST_TYPE_VENDOR | 2 | Vendor| @@ -553,5 +553,5 @@ Enumerates request directions. | Name| Default Value | Description| | -------- | -------- | -------- | -| USB_REQUEST_DIR_TO_DEVICE | 0 | Request for writing data from the host to the device.| -| USB_REQUEST_DIR_FROM_DEVICE | 0x80 | Request for reading data from the device to the host.| +| USB_REQUEST_DIR_TO_DEVICE | 0 | Request for writing data from the host to the device. | +| USB_REQUEST_DIR_FROM_DEVICE | 0x80 | Request for reading data from the device to the host. |