From 90059e26e2d0bbc4ecb0e04b2f99f04370d1d31b Mon Sep 17 00:00:00 2001 From: "yanxiaotao@huawei.com" Date: Tue, 14 Mar 2023 17:59:52 +0800 Subject: [PATCH] sync master to 3.2 release @2023-03-14. Signed-off-by: yanxiaotao@huawei.com --- .../reference/apis/js-apis-wifiManagerExt.md | 97 ++++++++++++------- 1 file changed, 64 insertions(+), 33 deletions(-) diff --git a/zh-cn/application-dev/reference/apis/js-apis-wifiManagerExt.md b/zh-cn/application-dev/reference/apis/js-apis-wifiManagerExt.md index c15dc590de..b29087a605 100644 --- a/zh-cn/application-dev/reference/apis/js-apis-wifiManagerExt.md +++ b/zh-cn/application-dev/reference/apis/js-apis-wifiManagerExt.md @@ -2,8 +2,7 @@ 该模块主要提供WLAN扩展接口,供非通用类型产品使用。 -> **说明:** -> +> **说明:** > 本模块首批接口从API version 8开始支持。后续版本的新增接口,采用上角标单独标记接口的起始版本。 该文档中的接口只供非通用类型产品使用,如路由器等,对于常规类型产品,不应该使用这些接口。 @@ -14,9 +13,9 @@ import wifiManagerExt from '@ohos.wifiManagerExt'; ``` -## wifiext.enableHotspot +## wifiext.enableHotspot9+ -enableHotspot(): boolean; +enableHotspot(): void; 使能WLAN热点。 @@ -24,16 +23,17 @@ enableHotspot(): boolean; **系统能力:** SystemCapability.Communication.WiFi.AP.Extension -**返回值:** +**错误码:** - | **类型** | **说明** | - | -------- | -------- | - | boolean | 操作结果, true: 成功, false: 失败。 | +以下错误码的详细介绍请参见[WIFI错误码](../errorcodes/errorcode-wifi.md)。 +| **类型** | **说明** | + | -------- | -------- | +| 2701000 | Operation failed.| -## wifiext.disableHotspot +## wifiext.disableHotspot9+ -disableHotspot(): boolean; +disableHotspot(): void; 去使能WLAN热点。 @@ -41,16 +41,17 @@ disableHotspot(): boolean; **系统能力:** SystemCapability.Communication.WiFi.AP.Extension -**返回值:** +**错误码:** - | **类型** | **说明** | - | -------- | -------- | - | boolean | 操作结果, true: 成功, false: 失败。 | +以下错误码的详细介绍请参见[WIFI错误码](../errorcodes/errorcode-wifi.md)。 +| **类型** | **说明** | + | -------- | -------- | +| 2701000 | Operation failed.| -## wifiext.getSupportedPowerModel +## wifiext.getSupportedPowerMode9+ -getSupportedPowerModel(): Promise<Array<PowerModel>> +getSupportedPowerMode(): Promise<Array<PowerMode>> 获取支持的功率模式,使用Promise异步回调。 @@ -62,10 +63,17 @@ getSupportedPowerModel(): Promise<Array<PowerModel>> | 类型 | 说明 | | -------- | -------- | - | Promise<Array<[PowerModel](#powermodel)>> | Promise对象。表示功率模式。 | + | Promise<Array<[PowerMode](#powermode)>> | Promise对象。表示功率模式。 | + +**错误码:** +以下错误码的详细介绍请参见[WIFI错误码](../errorcodes/errorcode-wifi.md)。 -## PowerModel +| **类型** | **说明** | + | -------- | -------- | +| 2701000 | Operation failed.| + +## PowerMode 表示功率模式的枚举。 @@ -78,9 +86,9 @@ getSupportedPowerModel(): Promise<Array<PowerModel>> | THROUGH_WALL | 2 | 穿墙模式。 | -## wifiext.getSupportedPowerModel +## wifiext.getSupportedPowerMode9+ -getSupportedPowerModel(callback: AsyncCallback<Array<PowerModel>>): void +getSupportedPowerMode(callback: AsyncCallback<Array<PowerMode>>): void 获取支持的功率模式,使用callback异步回调。 @@ -92,12 +100,19 @@ getSupportedPowerModel(callback: AsyncCallback<Array<PowerModel>>): | 参数名 | 类型 | 必填 | 说明 | | -------- | -------- | -------- | -------- | - | callback | AsyncCallback<Array<[PowerModel](#powermodel)>> | 是 | 回调函数。当操作成功时,err为0,data表示支持的功率模式。如果error为非0,表示处理出现错误。 | + | callback | AsyncCallback<Array<[PowerMode](#powermode)>> | 是 | 回调函数。当操作成功时,err为0,data表示支持的功率模式。如果error为非0,表示处理出现错误。 | + +**错误码:** +以下错误码的详细介绍请参见[WIFI错误码](../errorcodes/errorcode-wifi.md)。 -## wifiext.getPowerModel +| **类型** | **说明** | + | -------- | -------- | +| 2701000 | Operation failed.| + +## wifiext.getPowerMode9+ -getPowerModel(): Promise<PowerModel> +getPowerMode(): Promise<PowerMode> 获取功率模式,使用Promise异步回调。 @@ -109,12 +124,19 @@ getPowerModel(): Promise<PowerModel> | 类型 | 说明 | | -------- | -------- | - | Promise<[PowerModel](#powermodel)> | Promise对象。表示功率模式。 | + | Promise<[PowerMode](#powermode)> | Promise对象。表示功率模式。 | + +**错误码:** +以下错误码的详细介绍请参见[WIFI错误码](../errorcodes/errorcode-wifi.md)。 + +| **类型** | **说明** | + | -------- | -------- | +| 2701000 | Operation failed.| -## wifiext.getPowerModel +## wifiext.getPowerMode9+ -getPowerModel(callback: AsyncCallback<PowerModel>): void +getPowerMode(callback: AsyncCallback<PowerMode>): void 获取功率模式,使用callback异步回调。 @@ -126,12 +148,19 @@ getPowerModel(callback: AsyncCallback<PowerModel>): void | 参数名 | 类型 | 必填 | 说明 | | -------- | -------- | -------- | -------- | - | callback | AsyncCallback<[PowerModel](#powermodel)> | 是 | 回调函数。当操作成功时,err为0,data表示功率模式。如果error为非0,表示处理出现错误。 | + | callback | AsyncCallback<[PowerMode](#powermode)> | 是 | 回调函数。当操作成功时,err为0,data表示功率模式。如果error为非0,表示处理出现错误。 | +**错误码:** -## wifiext.setPowerModel +以下错误码的详细介绍请参见[WIFI错误码](../errorcodes/errorcode-wifi.md)。 -setPowerModel(model: PowerModel) : boolean; +| **类型** | **说明** | + | -------- | -------- | +| 2701000 | Operation failed.| + +## wifiext.setPowerMode9+ + +setPowerMode(model: PowerMode) : boolean; 设置功率模式。 @@ -143,10 +172,12 @@ setPowerModel(model: PowerModel) : boolean; | 参数名 | 类型 | 必填 | 说明 | | -------- | -------- | -------- | -------- | - | model | [PowerModel](#powermodel) | 是 | 功率模式。 | + | model | [PowerMode](#powermode) | 是 | 功率模式。 | -**返回值:** +**错误码:** + +以下错误码的详细介绍请参见[WIFI错误码](../errorcodes/errorcode-wifi.md)。 - | **类型** | **说明** | +| **类型** | **说明** | | -------- | -------- | - | boolean | 操作结果, true: 成功, false: 失败。 | +| 2701000 | Operation failed.| -- GitLab