@@ -8,8 +8,6 @@ The **DataStorage** module provides applications with data processing capability
...
@@ -8,8 +8,6 @@ The **DataStorage** module provides applications with data processing capability
> - The initial APIs of this module are supported since API version 6. Newly added APIs will be marked with a superscript to indicate their earliest API version.
> - The initial APIs of this module are supported since API version 6. Newly added APIs will be marked with a superscript to indicate their earliest API version.
>
>
> - The APIs of this module are no longer maintained since API version 9. You are advised to use [@ohos.data.preferences](js-apis-data-preferences.md).
> - The APIs of this module are no longer maintained since API version 9. You are advised to use [@ohos.data.preferences](js-apis-data-preferences.md).
>
> - The APIs of this module can be used only in the FA model.
## Modules to Import
## Modules to Import
...
@@ -188,7 +186,7 @@ Deletes the singleton **Storage** instance of a file from the memory, and delete
...
@@ -188,7 +186,7 @@ Deletes the singleton **Storage** instance of a file from the memory, and delete
This **wifiext** module provides WLAN extension interfaces for non-universal products.
This **wifiext** module provides WLAN extension interfaces for non-universal products.
> **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.
> - 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 APIs described in this document are used only for non-universal products, such as routers.
## Modules to Import
## Modules to Import
...
@@ -14,9 +14,9 @@ The APIs described in this document are used only for non-universal products, su
...
@@ -14,9 +14,9 @@ The APIs described in this document are used only for non-universal products, su
@@ -90,16 +99,23 @@ Obtains the supported power models. This API uses an asynchronous callback to re
...
@@ -90,16 +99,23 @@ Obtains the supported power models. This API uses an asynchronous callback to re
**Parameters**
**Parameters**
| Name| Type| Mandatory| Description|
| Name| Type| Mandatory| Description|
| -------- | -------- | -------- | -------- |
| -------- | -------- | -------- | -------- |
| callback | AsyncCallback<Array<[PowerModel](#powermodel)>> | 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.|
| callback | AsyncCallback<Array<[PowerMode](#powermode)>> | 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<PowerModel>
getPowerMode(): Promise<PowerMode>
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.
@@ -124,16 +147,23 @@ Obtains the power model. This API uses an asynchronous callback to return the re
...
@@ -124,16 +147,23 @@ Obtains the power model. This API uses an asynchronous callback to return the re
**Parameters**
**Parameters**
| Name| Type| Mandatory| Description|
| Name| Type| Mandatory| Description|
| -------- | -------- | -------- | -------- |
| -------- | -------- | -------- | -------- |
| callback | AsyncCallback<[PowerModel](#powermodel)> | 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.|
| callback | AsyncCallback<[PowerMode](#powermode)> | 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).