未验证 提交 6f3723de 编写于 作者: O openharmony_ci 提交者: Gitee

!16474 [翻译完成】#I6LM4C (16036+15761+15907+ 16105+15641+15575+15893+15936+15880)

Merge pull request !16474 from Annie_wang/PR15728
......@@ -504,8 +504,8 @@ For details about the error codes, see [Application Access Control Error Codes](
| ID| Error Message|
| -------- | -------- |
| 12100001 | The parameter is invalid. The tokenID in list is all invalid, or the permissionName in list is all invalid. |
| 12100004 | The API is not used together with "on()". |
| 12100001 | The parameter is invalid. The tokenIDs or permissionNames in the list are all invalid. |
| 12100004 | The interface is not used together with "on". |
| 12100007 | Service is abnormal. |
| 12100008 | Out of memory. |
......@@ -532,7 +532,9 @@ verifyAccessToken(tokenID: number, permissionName: Permissions): Promise<Gran
Verifies whether a permission is granted to an application. This API uses a promise to return the result.
> **NOTE**<br>You are advised to use [checkAccessToken](#checkaccesstoken9).
> **NOTE**
>
> You are advised to use [checkAccessToken](#checkaccesstoken9).
**System capability**: SystemCapability.Security.AccessToken
......@@ -619,7 +621,7 @@ Requests permissions from the user in a dialog box. This API uses a promise to
| Name| Type| Mandatory| Description|
| -------- | -------- | -------- | -------- |
| context | Context | Yes| Ability context of the application that requests the permissions. |
| permissionList | Array&lt;Permissions&gt; | Yes| Permissions requested. For details about the permissions, see the [Application Permission List](../../security/permission-list.md). |
| permissionList | Array&lt;Permissions&gt; | Yes| Permissions requested. For details about the permissions, see the [Application Permission List](../../security/permission-list.md).|
**Return value**
......@@ -659,7 +661,9 @@ verifyAccessToken(tokenID: number, permissionName: string): Promise&lt;GrantStat
Verifies whether a permission is granted to an application. This API uses a promise to return the result.
> NOTE<br>This API is deprecated since API version 9. You are advised to use [checkAccessToken](#checkaccesstoken9).
> **NOTE**
>
> This API is no longer maintained since API version 9. You are advised to use [checkAccessToken](#checkaccesstoken9).
**System capability**: SystemCapability.Security.AccessToken
......
......@@ -8,7 +8,7 @@ The **relationalStore** module provides the following functions:
- [RdbStore](#rdbstore): provides APIs for managing data in an RDB store.
- [Resultset](#resultset): provides APIs for accessing the result set obtained from the RDB store.
> **NOTE**<br/>
> **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.
......@@ -30,7 +30,7 @@ Obtains an RDB store. This API uses an asynchronous callback to return the resul
| Name | Type | Mandatory| Description |
| -------- | ---------------------------------------------- | ---- | ------------------------------------------------------------ |
| context | Context | Yes | Application context.<br>For details about the application context of the FA model, see [Context](js-apis-inner-app-context.md).<br>For details about the application context of the stage model, see [Context](js-apis-ability-context.md).|
| context | Context | Yes | Application context.<br>For details about the application context of the FA model, see [Context](js-apis-inner-app-context.md).<br>For details about the application context of the stage model, see [Context](js-apis-inner-application-uiAbilityContext.md).|
| config | [StoreConfig](#storeconfig) | Yes | Configuration of the RDB store. |
| callback | AsyncCallback&lt;[RdbStore](#rdbstore)&gt; | Yes | Callback invoked to return the RDB store obtained. |
......@@ -108,7 +108,7 @@ Obtains an RDB store. This API uses a promise to return the result. You can set
| Name | Type | Mandatory| Description |
| ------- | -------------------------------- | ---- | ------------------------------------------------------------ |
| context | Context | Yes | Application context.<br>For details about the application context of the FA model, see [Context](js-apis-inner-app-context.md).<br>For details about the application context of the stage model, see [Context](js-apis-ability-context.md).|
| context | Context | Yes | Application context.<br>For details about the application context of the FA model, see [Context](js-apis-inner-app-context.md).<br>For details about the application context of the stage model, see [Context](js-apis-inner-application-uiAbilityContext.md).|
| config | [StoreConfig](#storeconfig) | Yes | Configuration of the RDB store. |
**Return value**
......@@ -188,7 +188,7 @@ Deletes an RDB store. This API uses an asynchronous callback to return the resul
| Name | Type | Mandatory| Description |
| -------- | ------------------------- | ---- | ------------------------------------------------------------ |
| context | Context | Yes | Application context.<br>For details about the application context of the FA model, see [Context](js-apis-inner-app-context.md).<br>For details about the application context of the stage model, see [Context](js-apis-ability-context.md).|
| context | Context | Yes | Application context.<br>For details about the application context of the FA model, see [Context](js-apis-inner-app-context.md).<br>For details about the application context of the stage model, see [Context](js-apis-inner-application-uiAbilityContext.md).|
| name | string | Yes | Name of the RDB store to delete. |
| callback | AsyncCallback&lt;void&gt; | Yes | Callback invoked to return the result. |
......@@ -249,7 +249,7 @@ Deletes an RDB store. This API uses a promise to return the result.
| Name | Type | Mandatory| Description |
| ------- | ------- | ---- | ------------------------------------------------------------ |
| context | Context | Yes | Application context.<br>For details about the application context of the FA model, see [Context](js-apis-inner-app-context.md).<br>For details about the application context of the stage model, see [Context](js-apis-ability-context.md).|
| context | Context | Yes | Application context.<br>For details about the application context of the FA model, see [Context](js-apis-inner-app-context.md).<br>For details about the application context of the stage model, see [Context](js-apis-inner-application-uiAbilityContext.md).|
| name | string | Yes | Name of the RDB store to delete. |
**Return value**
......@@ -2612,9 +2612,9 @@ Synchronizes data between devices. This API uses a promise to return the result.
let predicates = new relationalStore.RdbPredicates('EMPLOYEE');
predicates.inDevices(['12345678abcde']);
let promise = store.sync(relationalStore.SyncMode.SYNC_MODE_PUSH, predicates);
promise.then((resultSet) =>{
promise.then((result) =>{
console.info(`Sync done.`);
for (let i = 0; i < resultSet.length; i++) {
for (let i = 0; i < result.length; i++) {
console.info(`device= ${result[i][0]}, status= ${result[i][1]}`);
}
}).catch((err) => {
......@@ -2693,10 +2693,12 @@ Provides APIs to access the result set obtained by querying the RDB store. A res
Obtain the **resultSet** object first.
```js
let resultSet = null;
let predicates = new relationalStore.RdbPredicates("EMPLOYEE");
predicates.equalTo("AGE", 18);
let promise = store.query(predicates, ["ID", "NAME", "AGE", "SALARY", "CODES"]);
promise.then((resultSet) => {
promise.then((result) => {
resultSet = result;
console.info(`resultSet columnNames: ${resultSet.columnNames}`);
console.info(`resultSet columnCount: ${resultSet.columnCount}`);
});
......@@ -2867,7 +2869,7 @@ For details about the error codes, see [RDB Error Codes](../errorcodes/errorcode
let predicates = new relationalStore.RdbPredicates("EMPLOYEE");
let promise = store.query(predicates, ["ID", "NAME", "AGE", "SALARY", "CODES"]);
promise.then((resultSet) => {
resultSet.(5);
resultSet.goToRow(5);
resultSet.close();
}).catch((err) => {
console.error(`query failed, err: ${err}`);
......
......@@ -86,8 +86,8 @@ For details about the error codes, see [Enterprise Device Management Error Codes
| ID| Error Message |
| ------- | ---------------------------------------------------------------------------- |
| 9200001 | The application is not an administrator application of the device. |
| 9200002 | The administrator application does not have permission to manage the device.|
| 9200001 | The application is not an administrator application of the device. |
| 9200002 | The administrator application does not have permission to manage the device. |
**Example**
......
......@@ -16,7 +16,7 @@ import systemcapability from '@ohos.systemCapability'
## systemcapability.querySystemCapabilities
querySystemCapabilities(callback: AsyncCallback<string>): void;
querySystemCapabilities(callback: AsyncCallback&lt;string&gt;): void;
Queries system capabilities. This API uses an asynchronous callback to return the result.
......@@ -51,7 +51,7 @@ querySystemCapabilities(): Promise&lt;string&gt;
Queries system capabilities. This API uses a promise to return the result.
**System capability**: SystemCapability.Startup.SystemInfo
**System capability**: SystemCapability.Developtools.Syscap
**Return value**
......@@ -76,4 +76,5 @@ try {
> **NOTE**
> - The system capabilities returned by the preceding APIs are in the form of an encoded numeric string.
>
> The system capabilities returned by the preceding APIs are in the form of an encoded numeric string.
......@@ -127,7 +127,7 @@ Obtains the scan result. This API uses a promise to return the result.
| **Type**| **Description**|
| -------- | -------- |
| Promise&lt;&nbsp;Array&lt;[WifiScanInfo](#wifiscaninfo)&gt;&nbsp;&gt; | Promise used to return the detected hotspots.|
| Promise&lt;&nbsp;Array&lt;[WifiScanInfo](#wifiscaninfo)&gt;&nbsp;&gt; | Promise used to return the hotspots detected.|
**Error codes**
......@@ -409,6 +409,8 @@ Represents EAP configuration information.
| caCertAliases | string | Yes| No| CA certificate alias.|
| caPath | string | Yes| No| CA certificate path.|
| clientCertAliases | string | Yes| No| Client certificate alias.|
| certEntry | Uint8Array | Yes| Yes| CA certificate content.|
| certPassword | string | Yes| Yes| CA certificate password.|
| altSubjectMatch | string | Yes| No| A string to match the alternate subject.|
| domainSuffixMatch | string | Yes| No| A string to match the domain suffix.|
| realm | string | Yes| No| Realm for the passpoint credential.|
......
......@@ -2,8 +2,9 @@
This **wifiext** module provides WLAN extension interfaces for non-universal products.
> **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.
The APIs described in this document are used only for non-universal products, such as routers.
>
> - 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.
> - The APIs described in this document are used only for non-universal products, such as routers.
## Modules to Import
......@@ -12,9 +13,9 @@ The APIs described in this document are used only for non-universal products, su
import wifiManagerExt from '@ohos.wifiManagerExt';
```
## wifiext.enableHotspot
## wifiext.enableHotspot<sup>9+</sup>
enableHotspot(): boolean;
enableHotspot(): void;
Enables the WLAN hotspot.
......@@ -27,12 +28,12 @@ Enables the WLAN hotspot.
For details about the error codes, see [Wi-Fi Error Codes](../errorcodes/errorcode-wifi.md).
| **Type**| **Description**|
| -------- | -------- |
| -------- | -------- |
| 2701000 | Operation failed.|
## wifiext.disableHotspot
## wifiext.disableHotspot<sup>9+</sup>
disableHotspot(): boolean;
disableHotspot(): void;
Disables the WLAN hotspot.
......@@ -45,14 +46,14 @@ Disables the WLAN hotspot.
For details about the error codes, see [Wi-Fi Error Codes](../errorcodes/errorcode-wifi.md).
| **Type**| **Description**|
| -------- | -------- |
| -------- | -------- |
| 2701000 | Operation failed.|
## wifiext.getSupportedPowerModel
## wifiext.getSupportedPowerMode<sup>9+</sup>
getSupportedPowerModel(): Promise&lt;Array&lt;PowerModel&gt;&gt;
getSupportedPowerMode(): Promise&lt;Array&lt;PowerMode&gt;&gt;
Obtains the supported power models. This API uses a promise to return the result.
Obtains the supported power modes. This API uses a promise to return the result.
**Required permissions**: ohos.permission.GET_WIFI_INFO
......@@ -60,21 +61,21 @@ Obtains the supported power models. This API uses a promise to return the result
**Return value**
| Type| Description|
| -------- | -------- |
| Promise&lt;Array&lt;[PowerModel](#powermodel)&gt;&gt; | Promise used to return the power models obtained.|
| Type| Description|
| -------- | -------- |
| Promise&lt;Array&lt;[PowerMode](#powermode)&gt;&gt; | Promise used to return the power modes obtained.|
**Error codes**
For details about the error codes, see [Wi-Fi Error Codes](../errorcodes/errorcode-wifi.md).
| **Type**| **Description**|
| -------- | -------- |
| -------- | -------- |
| 2701000 | Operation failed.|
## PowerModel
## PowerMode
Enumerates the power models.
Enumerates the power modes.
**System capability**: SystemCapability.Communication.WiFi.AP.Extension
......@@ -85,11 +86,11 @@ Enumerates the power models.
| THROUGH_WALL | 2 | Through_wall|
## wifiext.getSupportedPowerModel
## wifiext.getSupportedPowerMode<sup>9+</sup>
getSupportedPowerModel(callback: AsyncCallback&lt;Array&lt;PowerModel&gt;&gt;): void
getSupportedPowerMode(callback: AsyncCallback&lt;Array&lt;PowerMode&gt;&gt;): void
Obtains the supported power models. This API uses an asynchronous callback to return the result.
Obtains the supported power modes. This API uses an asynchronous callback to return the result.
**Required permissions**: ohos.permission.GET_WIFI_INFO
......@@ -97,23 +98,23 @@ Obtains the supported power models. This API uses an asynchronous callback to re
**Parameters**
| Name| Type| Mandatory| Description|
| -------- | -------- | -------- | -------- |
| callback | AsyncCallback&lt;Array&lt;[PowerModel](#powermodel)&gt;&gt; | Yes| Callback invoked to return the result. If the operation is successful, **err** is **0** and **data** is the power models obtained. If **err** is not **0**, an error has occurred.|
| Name| Type| Mandatory| Description|
| -------- | -------- | -------- | -------- |
| callback | AsyncCallback&lt;Array&lt;[PowerMode](#powermode)&gt;&gt; | Yes| Callback invoked to return the result. If the operation is successful, **err** is **0** and **data** is the power modes obtained. If **err** is not **0**, an error has occurred.|
**Error codes**
For details about the error codes, see [Wi-Fi Error Codes](../errorcodes/errorcode-wifi.md).
| **Type**| **Description**|
| -------- | -------- |
| -------- | -------- |
| 2701000 | Operation failed.|
## wifiext.getPowerModel
## wifiext.getPowerMode<sup>9+</sup>
getPowerModel(): Promise&lt;PowerModel&gt;
getPowerMode(): Promise&lt;PowerMode&gt;
Obtains the power model. This API uses a promise to return the result.
Obtains the power mode. This API uses a promise to return the result.
**Required permissions**: ohos.permission.GET_WIFI_INFO
......@@ -121,23 +122,23 @@ Obtains the power model. This API uses a promise to return the result.
**Return value**
| Type| Description|
| -------- | -------- |
| Promise&lt;[PowerModel](#powermodel)&gt; | Promise used to return the power models obtained.|
| Type| Description|
| -------- | -------- |
| Promise&lt;[PowerMode](#powermode)&gt; | Promise used to return the power modes obtained.|
**Error codes**
For details about the error codes, see [Wi-Fi Error Codes](../errorcodes/errorcode-wifi.md).
| **Type**| **Description**|
| -------- | -------- |
| -------- | -------- |
| 2701000 | Operation failed.|
## wifiext.getPowerModel
## wifiext.getPowerMode<sup>9+</sup>
getPowerModel(callback: AsyncCallback&lt;PowerModel&gt;): void
getPowerMode(callback: AsyncCallback&lt;PowerMode&gt;): void
Obtains the power model. This API uses an asynchronous callback to return the result.
Obtains the power mode. This API uses an asynchronous callback to return the result.
**Required permissions**: ohos.permission.GET_WIFI_INFO
......@@ -145,23 +146,23 @@ Obtains the power model. This API uses an asynchronous callback to return the re
**Parameters**
| Name| Type| Mandatory| Description|
| -------- | -------- | -------- | -------- |
| callback | AsyncCallback&lt;[PowerModel](#powermodel)&gt; | Yes| Callback invoked to return the result. If the operation is successful, **err** is **0** and **data** is the power model obtained. If **err** is not **0**, an error has occurred.|
| Name| Type| Mandatory| Description|
| -------- | -------- | -------- | -------- |
| callback | AsyncCallback&lt;[PowerMode](#powermode)&gt; | Yes| Callback invoked to return the result. If the operation is successful, **err** is **0** and **data** is the power mode obtained. If **err** is not **0**, an error has occurred.|
**Error codes**
For details about the error codes, see [Wi-Fi Error Codes](../errorcodes/errorcode-wifi.md).
| **Type**| **Description**|
| -------- | -------- |
| -------- | -------- |
| 2701000 | Operation failed.|
## wifiext.setPowerModel
## wifiext.setPowerMode<sup>9+</sup>
setPowerModel(model: PowerModel) : boolean;
setPowerMode(model: PowerMode) : boolean;
Sets the power model.
Sets the power mode.
**Required permissions**: ohos.permission.MANAGE_WIFI_HOTSPOT_EXT
......@@ -169,14 +170,14 @@ setPowerModel(model: PowerModel) : boolean;
**Parameters**
| Name| Type| Mandatory| Description|
| -------- | -------- | -------- | -------- |
| model | [PowerModel](#powermodel) | Yes| Power model to set.|
| Name| Type| Mandatory| Description|
| -------- | -------- | -------- | -------- |
| model | [PowerMode](#powermode) | Yes| Power mode to set.|
**Error codes**
For details about the error codes, see [Wi-Fi Error Codes](../errorcodes/errorcode-wifi.md).
| **Type**| **Description**|
| -------- | -------- |
| -------- | -------- |
| 2701000 | Operation failed.|
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册