提交 708d65c3 编写于 作者: Z zhanghaifeng

Description: fix comments

Signed-off-by: Nzhanghaifeng <zhanghaifeng11@huawei.com>
上级 79eeef60
...@@ -49,9 +49,9 @@ setIfaceConfig(iface: string, ic: InterfaceConfiguration, callback: AsyncCallbac ...@@ -49,9 +49,9 @@ setIfaceConfig(iface: string, ic: InterfaceConfiguration, callback: AsyncCallbac
```js ```js
ethernet.setIfaceConfig("eth0", { ethernet.setIfaceConfig("eth0", {
mode: 0, mode: 0,
ipAddr: "192.168.1.123", ipAddr: "192.168.xx.xxx",
route: "192.168.1.1", route: "192.168.xx.xxx",
gateway: "192.168.1.1", gateway: "192.168.xx.xxx",
netMask: "255.255.255.0", netMask: "255.255.255.0",
dnsServers: "1.1.1.1", dnsServers: "1.1.1.1",
domain: "2.2.2.2" domain: "2.2.2.2"
...@@ -107,9 +107,9 @@ setIfaceConfig(iface: string, ic: InterfaceConfiguration): Promise\<void> ...@@ -107,9 +107,9 @@ setIfaceConfig(iface: string, ic: InterfaceConfiguration): Promise\<void>
```js ```js
ethernet.setIfaceConfig("eth0", { ethernet.setIfaceConfig("eth0", {
mode: 0, mode: 0,
ipAddr: "192.168.1.123", ipAddr: "192.168.xx.xxx",
route: "192.168.1.1", route: "192.168.xx.xxx",
gateway: "192.168.1.1", gateway: "192.168.xx.xxx",
netMask: "255.255.255.0", netMask: "255.255.255.0",
dnsServers: "1.1.1.1", dnsServers: "1.1.1.1",
domain: "2.2.2.2" domain: "2.2.2.2"
......
...@@ -194,7 +194,8 @@ startSharing(type: SharingIfaceType, callback: AsyncCallback\<void>): void ...@@ -194,7 +194,8 @@ startSharing(type: SharingIfaceType, callback: AsyncCallback\<void>): void
```js ```js
import SharingIfaceType from '@ohos.net.sharing' import SharingIfaceType from '@ohos.net.sharing'
sharing.startSharing(0, (error) => { let SHARING_WIFI=0;
sharing.startSharing(SHARING_WIFI, (error) => {
console.log(JSON.stringify(error)); console.log(JSON.stringify(error));
}); });
``` ```
...@@ -242,7 +243,8 @@ startSharing(type: SharingIfaceType): Promise\<void> ...@@ -242,7 +243,8 @@ startSharing(type: SharingIfaceType): Promise\<void>
```js ```js
import SharingIfaceType from '@ohos.net.sharing' import SharingIfaceType from '@ohos.net.sharing'
sharing.startSharing(0).then(() => { let SHARING_WIFI=0;
sharing.startSharing(SHARING_WIFI).then(() => {
console.log("start wifi sharing successful"); console.log("start wifi sharing successful");
}).catch(error => { }).catch(error => {
console.log("start wifi sharing failed"); console.log("start wifi sharing failed");
...@@ -285,7 +287,8 @@ stopSharing(type: SharingIfaceType, callback: AsyncCallback\<void>): void ...@@ -285,7 +287,8 @@ stopSharing(type: SharingIfaceType, callback: AsyncCallback\<void>): void
```js ```js
import SharingIfaceType from '@ohos.net.sharing' import SharingIfaceType from '@ohos.net.sharing'
sharing.stopSharing(0, (error) => { let SHARING_WIFI=0;
sharing.stopSharing(SHARING_WIFI, (error) => {
console.log(JSON.stringify(error)); console.log(JSON.stringify(error));
}); });
``` ```
...@@ -331,7 +334,8 @@ stopSharing(type: SharingIfaceType): Promise\<void> ...@@ -331,7 +334,8 @@ stopSharing(type: SharingIfaceType): Promise\<void>
```js ```js
import SharingIfaceType from '@ohos.net.sharing' import SharingIfaceType from '@ohos.net.sharing'
sharing.stopSharing(0).then(() => { let SHARING_WIFI=0;
sharing.stopSharing(SHARING_WIFI).then(() => {
console.log("stop wifi sharing successful"); console.log("stop wifi sharing successful");
}).catch(error => { }).catch(error => {
console.log("stop wifi sharing failed"); console.log("stop wifi sharing failed");
...@@ -584,7 +588,8 @@ getSharingIfaces(state: SharingIfaceState, callback: AsyncCallback\<Array\<strin ...@@ -584,7 +588,8 @@ getSharingIfaces(state: SharingIfaceState, callback: AsyncCallback\<Array\<strin
```js ```js
import SharingIfaceState from '@ohos.net.sharing' import SharingIfaceState from '@ohos.net.sharing'
sharing.getSharingIfaces(2, (error, data) => { let SHARING_BLUETOOTH=2;
sharing.getSharingIfaces(SHARING_BLUETOOTH, (error, data) => {
console.log(JSON.stringify(error)); console.log(JSON.stringify(error));
console.log(JSON.stringify(data)); console.log(JSON.stringify(data));
}); });
...@@ -628,7 +633,8 @@ getSharingIfaces(state: SharingIfaceState): Promise\<Array\<string>> ...@@ -628,7 +633,8 @@ getSharingIfaces(state: SharingIfaceState): Promise\<Array\<string>>
```js ```js
import SharingIfaceState from '@ohos.net.sharing' import SharingIfaceState from '@ohos.net.sharing'
sharing.getSharingIfaces(2).then(data => { let SHARING_BLUETOOTH=2;
sharing.getSharingIfaces(SHARING_BLUETOOTH).then(data => {
console.log(JSON.stringify(data)); console.log(JSON.stringify(data));
}).catch(error => { }).catch(error => {
console.log(JSON.stringify(error)); console.log(JSON.stringify(error));
...@@ -668,7 +674,8 @@ getSharingState(type: SharingIfaceType, callback: AsyncCallback\<SharingIfaceSta ...@@ -668,7 +674,8 @@ getSharingState(type: SharingIfaceType, callback: AsyncCallback\<SharingIfaceSta
```js ```js
import SharingIfaceType from '@ohos.net.sharing' import SharingIfaceType from '@ohos.net.sharing'
sharing.getSharingState(0, (error, data) => { let SHARING_WIFI=0;
sharing.getSharingState(SHARING_WIFI, (error, data) => {
console.log(JSON.stringify(error)); console.log(JSON.stringify(error));
console.log(JSON.stringify(data)); console.log(JSON.stringify(data));
}); });
...@@ -712,7 +719,8 @@ getSharingState(type: SharingIfaceType): Promise\<SharingIfaceState> ...@@ -712,7 +719,8 @@ getSharingState(type: SharingIfaceType): Promise\<SharingIfaceState>
```js ```js
import SharingIfaceType from '@ohos.net.sharing' import SharingIfaceType from '@ohos.net.sharing'
sharing.getSharingState(0).then(data => { let SHARING_WIFI=0;
sharing.getSharingState(SHARING_WIFI).then(data => {
console.log(JSON.stringify(data)); console.log(JSON.stringify(data));
}).catch(error => { }).catch(error => {
console.log(JSON.stringify(error)); console.log(JSON.stringify(error));
...@@ -752,7 +760,8 @@ getSharableRegexes(type: SharingIfaceType, callback: AsyncCallback\<Array\<strin ...@@ -752,7 +760,8 @@ getSharableRegexes(type: SharingIfaceType, callback: AsyncCallback\<Array\<strin
```js ```js
import SharingIfaceType from '@ohos.net.sharing' import SharingIfaceType from '@ohos.net.sharing'
sharing.getSharableRegexes(0, (error, data) => { let SHARING_WIFI=0;
sharing.getSharableRegexes(SHARING_WIFI, (error, data) => {
console.log(JSON.stringify(error)); console.log(JSON.stringify(error));
console.log(JSON.stringify(data)); console.log(JSON.stringify(data));
}); });
...@@ -796,7 +805,8 @@ getSharableRegexes(type: SharingIfaceType): Promise\<Array\<string>> ...@@ -796,7 +805,8 @@ getSharableRegexes(type: SharingIfaceType): Promise\<Array\<string>>
```js ```js
import SharingIfaceType from '@ohos.net.sharing' import SharingIfaceType from '@ohos.net.sharing'
sharing.getSharableRegexes(0).then(data => { let SHARING_WIFI=0;
sharing.getSharableRegexes(SHARING_WIFI).then(data => {
console.log(JSON.stringify(data)); console.log(JSON.stringify(data));
}).catch(error => { }).catch(error => {
console.log(JSON.stringify(error)); console.log(JSON.stringify(error));
......
...@@ -1813,7 +1813,7 @@ let options = { ...@@ -1813,7 +1813,7 @@ let options = {
key: "xxxx", key: "xxxx",
cert: "xxxx", cert: "xxxx",
ca: ["xxxx"], ca: ["xxxx"],
passwd: "xxxx", password: "xxxx",
protocols: [socket.Protocol.TLSv12], protocols: [socket.Protocol.TLSv12],
useRemoteCipherPrefer: true, useRemoteCipherPrefer: true,
signatureAlgorithms: "rsa_pss_rsae_sha256:ECDSA+SHA256", signatureAlgorithms: "rsa_pss_rsae_sha256:ECDSA+SHA256",
...@@ -1913,7 +1913,7 @@ let options = { ...@@ -1913,7 +1913,7 @@ let options = {
key: "xxxx", key: "xxxx",
cert: "xxxx", cert: "xxxx",
ca: ["xxxx"], ca: ["xxxx"],
passwd: "xxxx", password: "xxxx",
protocols: [socket.Protocol.TLSv12], protocols: [socket.Protocol.TLSv12],
useRemoteCipherPrefer: true, useRemoteCipherPrefer: true,
signatureAlgorithms: "rsa_pss_rsae_sha256:ECDSA+SHA256", signatureAlgorithms: "rsa_pss_rsae_sha256:ECDSA+SHA256",
...@@ -2515,7 +2515,7 @@ TLS安全相关操作,其中ca证书为必选参数,其他参数为可选参 ...@@ -2515,7 +2515,7 @@ TLS安全相关操作,其中ca证书为必选参数,其他参数为可选参
| ca | string \| Array\<string> | 是 | 服务端的ca证书,用于认证校验服务端的数字证书。| | ca | string \| Array\<string> | 是 | 服务端的ca证书,用于认证校验服务端的数字证书。|
| cert | string | 否 | 本地客户端的数字证书。 | | cert | string | 否 | 本地客户端的数字证书。 |
| key | string | 否 | 本地数字证书的私钥。 | | key | string | 否 | 本地数字证书的私钥。 |
| passwd | string | 否 | 读取私钥的密码。 | | password | string | 否 | 读取私钥的密码。 |
| protocols | [Protocol](#protocol9) \|Array\<[Protocol](#protocol9)> | 否 | TLS的协议版本。 | | protocols | [Protocol](#protocol9) \|Array\<[Protocol](#protocol9)> | 否 | TLS的协议版本。 |
| useRemoteCipherPrefer | boolean | 否 | 优先使用对等方的密码套件。 | | useRemoteCipherPrefer | boolean | 否 | 优先使用对等方的密码套件。 |
| signatureAlgorithms | string | 否 | 通信过程中的签名算法。 | | signatureAlgorithms | string | 否 | 通信过程中的签名算法。 |
...@@ -2540,4 +2540,4 @@ TLS通信的协议版本。 ...@@ -2540,4 +2540,4 @@ TLS通信的协议版本。
| 类型 | 说明 | | 类型 | 说明 |
| --------------------------------------------------------------------- | --------------------- | | --------------------------------------------------------------------- | --------------------- |
|[cryptoFramework.EncodingBlob](js-apis-cryptoFramework.md#datablob) | 存储证书的数据和编码格式 | |[cryptoFramework.EncodingBlob](js-apis-cryptoFramework.md#datablob) | 存储证书的数据和编码格式 |
\ No newline at end of file
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册