提交 1f62b512 编写于 作者: A Annie_wang

update docs

Signed-off-by: NAnnie_wang <annie.wangli@huawei.com>
上级 bf0e130a
# WLAN
This **wifiext** module provides WLAN extension interfaces for non-universal products.
> ![icon-note.gif](public_sys-resources/icon-note.gif) **NOTE**<br/>
> ![icon-note.gif](public_sys-resources/icon-note.gif) **NOTE**<br>
> 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.
......@@ -17,13 +18,11 @@ enableHotspot(): boolean;
Enables the WLAN hotspot.
- Required permissions:
ohos.permission.MANAGE_WIFI_HOTSPOT_EXT
**Required permissions**: ohos.permission.MANAGE_WIFI_HOTSPOT_EXT
- System capability:
SystemCapability.Communication.WiFi.AP.Extension
**System capability**: SystemCapability.Communication.WiFi.AP.Extension
- Return value
**Return value**
| **Type**| **Description**|
| -------- | -------- |
| boolean | Returns **true** if the operation is successful; returns **false** otherwise.|
......@@ -35,13 +34,11 @@ disableHotspot(): boolean;
Disables the WLAN hotspot.
- Required permissions:
ohos.permission.MANAGE_WIFI_HOTSPOT_EXT
**Required permissions**: ohos.permission.MANAGE_WIFI_HOTSPOT_EXT
- System capability:
SystemCapability.Communication.WiFi.AP.Extension
**System capability**: SystemCapability.Communication.WiFi.AP.Extension
- Return value
**Return value**
| **Type**| **Description**|
| -------- | -------- |
| boolean | Returns **true** if the operation is successful; returns **false** otherwise.|
......@@ -51,24 +48,24 @@ Disables the WLAN hotspot.
getSupportedPowerModel(): Promise&lt;Array&lt;PowerModel&gt;&gt;
Obtains the supported power models. The method uses a promise to return the result.
Obtains the supported power models. This API uses a promise to return the result.
- Required permissions:
ohos.permission.GET_WIFI_INFO
**Required permissions**: ohos.permission.GET_WIFI_INFO
- System capability:
SystemCapability.Communication.WiFi.AP.Extension
**System capability**: SystemCapability.Communication.WiFi.AP.Extension
- Return value
**Return value**
| Type| Description|
| -------- | -------- |
| Promise&lt;Array&lt;[PowerModel](#PowerModel)&gt;&gt; | Promise used to return the power models obtained.|
| Promise&lt;Array&lt;[PowerModel](#powermodel)&gt;&gt; | Promise used to return the power models obtained.|
## PowerModel
Enumerates of the power models.
**System capability**: SystemCapability.Communication.WiFi.AP.Extension
| Name| Default Value| Description|
| -------- | -------- | -------- |
| SLEEPING | 0 | Sleeping|
......@@ -80,54 +77,48 @@ Enumerates of the power models.
getSupportedPowerModel(callback: AsyncCallback&lt;Array&lt;PowerModel&gt;&gt;): void
Obtains the supported power models. The method uses an asynchronous callback to return the result.
Obtains the supported power models. This API uses an asynchronous callback to return the result.
- Required permissions:
ohos.permission.GET_WIFI_INFO
**Required permissions**: ohos.permission.GET_WIFI_INFO
- System capability:
SystemCapability.Communication.WiFi.AP.Extension
**System capability**: SystemCapability.Communication.WiFi.AP.Extension
- Parameters
**Parameters**
| Name| Type| Mandatory| Description|
| -------- | -------- | -------- | -------- |
| callback | AsyncCallback&lt;[PowerModel](#PowerModel)&gt; | Yes| Callback used to return the power models obtained.|
| 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 models obtained. If **err** is not **0**, an error has occurred.|
## wifiext.getPowerModel
getPowerModel(): Promise&lt;PowerModel&gt;
Obtains the power model. The method uses a promise to return the result.
Obtains the power model. This API uses a promise to return the result.
- Required permissions:
ohos.permission.GET_WIFI_INFO
**Required permissions**: ohos.permission.GET_WIFI_INFO
- System capability:
SystemCapability.Communication.WiFi.AP.Extension
**System capability**: SystemCapability.Communication.WiFi.AP.Extension
- Return value
**Return value**
| Type| Description|
| -------- | -------- |
| Promise&lt;[PowerModel](#PowerModel)&gt; | Promise used to return the power model obtained.|
| Promise&lt;[PowerModel](#powermodel)&gt; | Promise used to return the power model obtained.|
## wifiext.getPowerModel
getPowerModel(callback: AsyncCallback&lt;PowerModel&gt;): void
Obtains the power model. The method uses an asynchronous callback to return the result.
Obtains the power model. This API uses an asynchronous callback to return the result.
- Required permissions:
ohos.permission.GET_WIFI_INFO
**Required permissions**: ohos.permission.GET_WIFI_INFO
- System capability:
SystemCapability.Communication.WiFi.AP.Extension
**System capability**: SystemCapability.Communication.WiFi.AP.Extension
- Parameters
**Parameters**
| Name| Type| Mandatory| Description|
| -------- | -------- | -------- | -------- |
| callback | AsyncCallback&lt;[PowerModel](#PowerModel)&gt; | Yes| Callback invoked to return the power mode obtained.|
| 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 mode obtained. If **err** is not **0**, an error has occurred.|
## wifiext.setPowerModel
......@@ -136,18 +127,16 @@ setPowerModel(model: PowerModel) : boolean;
Sets the power model.
- Required permissions:
ohos.permission.MANAGE_WIFI_HOTSPOT_EXT
**Required permissions**: ohos.permission.MANAGE_WIFI_HOTSPOT_EXT
- System capability:
SystemCapability.Communication.WiFi.AP.Extension
**System capability**: SystemCapability.Communication.WiFi.AP.Extension
- Parameters
**Parameters**
| Name| Type| Mandatory| Description|
| -------- | -------- | -------- | -------- |
| model | AsyncCallback&lt;[PowerModel](#PowerModel)&gt; | Yes| Power model to set.|
| model | AsyncCallback&lt;[PowerModel](#powermodel)&gt; | Yes| Power model to set.|
- Return value
**Return value**
| **Type**| **Description**|
| -------- | -------- |
| boolean | Returns **true** if the operation is successful; returns **false** otherwise.|
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册