Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Docs
提交
c673267e
D
Docs
项目概览
OpenHarmony
/
Docs
大约 2 年 前同步成功
通知
161
Star
293
Fork
28
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
D
Docs
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
c673267e
编写于
11月 28, 2022
作者:
X
xiaosi
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
update js-api-wifi.md&js-api-wifiext.md
Signed-off-by:
N
xiaosi
<
xiaosi2@huawei.com
>
上级
b4a280a2
变更
4
展开全部
隐藏空白更改
内联
并排
Showing
4 changed file
with
2517 addition
and
375 deletion
+2517
-375
zh-cn/application-dev/reference/apis/js-apis-wifi.md
zh-cn/application-dev/reference/apis/js-apis-wifi.md
+95
-372
zh-cn/application-dev/reference/apis/js-apis-wifiManager.md
zh-cn/application-dev/reference/apis/js-apis-wifiManager.md
+2269
-0
zh-cn/application-dev/reference/apis/js-apis-wifiManagerExt.md
.../application-dev/reference/apis/js-apis-wifiManagerExt.md
+150
-0
zh-cn/application-dev/reference/apis/js-apis-wifiext.md
zh-cn/application-dev/reference/apis/js-apis-wifiext.md
+3
-3
未找到文件。
zh-cn/application-dev/reference/apis/js-apis-wifi.md
浏览文件 @
c673267e
此差异已折叠。
点击以展开。
zh-cn/application-dev/reference/apis/js-apis-wifiManager.md
0 → 100644
浏览文件 @
c673267e
此差异已折叠。
点击以展开。
zh-cn/application-dev/reference/apis/js-apis-wifiManagerExt.md
0 → 100644
浏览文件 @
c673267e
# WLAN扩展接口
该模块主要提供WLAN扩展接口,供非通用类型产品使用。
>  **说明:**
> 本模块首批接口从API version 8开始支持。后续版本的新增接口,采用上角标单独标记接口的起始版本。
该文档中的接口只供非通用类型产品使用,如路由器等,对于常规类型产品,不应该使用这些接口。
## 导入模块
```
js
import
wifiext
from
'
@ohos.wifiext
'
;
```
## wifiext.enableHotspot
enableHotspot(): boolean;
使能WLAN热点。
**需要权限:**
ohos.permission.MANAGE_WIFI_HOTSPOT_EXT
**系统能力:**
SystemCapability.Communication.WiFi.AP.Extension
**返回值:**
|
**类型**
|
**说明**
|
| -------- | -------- |
| boolean | 操作结果, true: 成功, false: 失败。 |
## wifiext.disableHotspot
disableHotspot(): boolean;
去使能WLAN热点。
**需要权限:**
ohos.permission.MANAGE_WIFI_HOTSPOT_EXT
**系统能力:**
SystemCapability.Communication.WiFi.AP.Extension
**返回值:**
|
**类型**
|
**说明**
|
| -------- | -------- |
| boolean | 操作结果, true: 成功, false: 失败。 |
## wifiext.getSupportedPowerModel
getSupportedPowerModel(): Promise
<
Array
<
PowerModel
>>
获取支持的功率模式,使用Promise异步回调。
**需要权限:**
ohos.permission.GET_WIFI_INFO
**系统能力:**
SystemCapability.Communication.WiFi.AP.Extension
**返回值:**
| 类型 | 说明 |
| -------- | -------- |
| Promise
<
Array
<
[PowerModel](#powermodel)
>>
| Promise对象。表示功率模式。 |
## PowerModel
表示功率模式的枚举。
**系统能力:**
SystemCapability.Communication.WiFi.AP.Extension
| 名称 | 值 | 说明 |
| -------- | -------- | -------- |
| SLEEPING | 0 | 睡眠模式。 |
| GENERAL | 1 | 常规模式。 |
| THROUGH_WALL | 2 | 穿墙模式。 |
## wifiext.getSupportedPowerModel
getSupportedPowerModel(callback: AsyncCallback
<
Array
<
PowerModel
>>
): void
获取支持的功率模式,使用callback异步回调。
**需要权限:**
ohos.permission.GET_WIFI_INFO
**系统能力:**
SystemCapability.Communication.WiFi.AP.Extension
**参数:**
| 参数名 | 类型 | 必填 | 说明 |
| -------- | -------- | -------- | -------- |
| callback | AsyncCallback
<
Array
<
[PowerModel](#powermodel)
>>
| 是 | 回调函数。当操作成功时,err为0,data表示支持的功率模式。如果error为非0,表示处理出现错误。 |
## wifiext.getPowerModel
getPowerModel(): Promise
<
PowerModel
>
获取功率模式,使用Promise异步回调。
**需要权限:**
ohos.permission.GET_WIFI_INFO
**系统能力:**
SystemCapability.Communication.WiFi.AP.Extension
**返回值:**
| 类型 | 说明 |
| -------- | -------- |
| Promise
<
[PowerModel](#powermodel)
>
| Promise对象。表示功率模式。 |
## wifiext.getPowerModel
getPowerModel(callback: AsyncCallback
<
PowerModel
>
): void
获取功率模式,使用callback异步回调。
**需要权限:**
ohos.permission.GET_WIFI_INFO
**系统能力:**
SystemCapability.Communication.WiFi.AP.Extension
**参数:**
| 参数名 | 类型 | 必填 | 说明 |
| -------- | -------- | -------- | -------- |
| callback | AsyncCallback
<
[PowerModel](#powermodel)
>
| 是 | 回调函数。当操作成功时,err为0,data表示功率模式。如果error为非0,表示处理出现错误。 |
## wifiext.setPowerModel
setPowerModel(model: PowerModel) : boolean;
设置功率模式。
**需要权限:**
ohos.permission.MANAGE_WIFI_HOTSPOT_EXT
**系统能力:**
SystemCapability.Communication.WiFi.AP.Extension
**参数:**
| 参数名 | 类型 | 必填 | 说明 |
| -------- | -------- | -------- | -------- |
| model |
[
PowerModel
](
#powermodel
)
| 是 | 功率模式。 |
**返回值:**
|
**类型**
|
**说明**
|
| -------- | -------- |
| boolean | 操作结果, true: 成功, false: 失败。 |
zh-cn/application-dev/reference/apis/js-apis-wifiext.md
浏览文件 @
c673267e
...
...
@@ -69,7 +69,7 @@ getSupportedPowerModel(): Promise<Array<PowerModel>>
**系统能力:**
SystemCapability.Communication.WiFi.AP.Extension
| 名称 |
默认
值 | 说明 |
| 名称 | 值 | 说明 |
| -------- | -------- | -------- |
| SLEEPING | 0 | 睡眠模式。 |
| GENERAL | 1 | 常规模式。 |
...
...
@@ -90,7 +90,7 @@ getSupportedPowerModel(callback: AsyncCallback<Array<PowerModel>>):
| 参数名 | 类型 | 必填 | 说明 |
| -------- | -------- | -------- | -------- |
| callback | AsyncCallback
<
[PowerModel](#powermodel)
>
| 是 | 回调函数。当操作成功时,err为0,data表示支持的功率模式。如果error为非0,表示处理出现错误。 |
| callback | AsyncCallback
<
Array
<
[PowerModel](#powermodel)
>
>
| 是 | 回调函数。当操作成功时,err为0,data表示支持的功率模式。如果error为非0,表示处理出现错误。 |
## wifiext.getPowerModel
...
...
@@ -141,7 +141,7 @@ setPowerModel(model: PowerModel) : boolean;
| 参数名 | 类型 | 必填 | 说明 |
| -------- | -------- | -------- | -------- |
| model |
AsyncCallback
<
[PowerModel](#powermodel)
>
| 是 | 功率模式。 |
| model |
[
PowerModel
](
#powermodel
)
| 是 | 功率模式。 |
**返回值:**
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录