提交 ced91078 编写于 作者: S shawn_he

update doc

Signed-off-by: Nshawn_he <shawn.he@huawei.com>
上级 90fedb69
......@@ -22,6 +22,7 @@ Adds a contact. This API uses an asynchronous callback to return the result.
**System capability**: SystemCapability.Applications.ContactsData
**Parameters**
| Name | Type | Mandatory| Description |
| -------- | --------------------------- | ---- | ------------------------------ |
| contact | [Contact](#contact) | Yes | Contact information. |
......@@ -54,11 +55,13 @@ Adds a contact. This API uses a promise to return the result.
**System capability**: SystemCapability.Applications.ContactsData
**Parameters**
| Name | Type | Mandatory| Description |
| ------- | ------------------- | ---- | ------------ |
| contact | [Contact](#contact) | Yes | Contact information.|
**Return Value**
| Type | Description |
| --------------------- | ------------------------------------------- |
| Promise&lt;number&gt; | Promise used to return the contact ID.|
......@@ -89,6 +92,7 @@ Deletes a contact based on the specified contact key. This API uses an asynchron
**System capability**: SystemCapability.Applications.ContactsData
**Parameters**
| Name | Type | Mandatory| Description |
| -------- | ------------------------- | ---- | ------------------------------------ |
| key | string | Yes | Contact key. Each contact corresponds to one key.|
......@@ -118,11 +122,13 @@ Deletes a contact based on the specified contact key. This API uses a promise to
**System capability**: SystemCapability.Applications.ContactsData
**Parameters**
| Name| Type | Mandatory| Description |
| ------ | ------ | ---- | -------------------------------------- |
| key | string | Yes | Contact key. Each contact corresponds to one key.|
**Return Value**
| Type | Description |
| ------------------- | --------------------------------------------- |
| Promise&lt;void&gt; | Promise used to return the result.|
......@@ -150,6 +156,7 @@ Updates a contact based on the specified contact information. This API uses an a
**System capability**: SystemCapability.Applications.ContactsData
**Parameters**
| Name | Type | Mandatory| Description |
| -------- | ------------------------- | ---- | ------------------------------------ |
| contact | [Contact](#contact) | Yes | Contact information. |
......@@ -182,6 +189,7 @@ Updates a contact based on the specified contact information and attributes. Thi
**System capability**: SystemCapability.Applications.ContactsData
**Parameters**
| Name | Type | Mandatory| Description |
| -------- | --------------------------------------- | ---- | ------------------------------------ |
| contact | [Contact](#contact) | Yes | Contact information. |
......@@ -217,12 +225,14 @@ Updates a contact based on the specified contact information and attributes. Thi
**System capability**: SystemCapability.Applications.ContactsData
**Parameters**
| Name | Type | Mandatory| Description |
| ------- | --------------------------------------- | ---- | ------------------ |
| contact | [Contact](#contact) | Yes | Contact information. |
| attrs | [ContactAttributes](#contactattributes) | No | List of contact attributes.|
**Return Value**
| Type | Description |
| ------------------- | ------------------------------------------------- |
| Promise&lt;void&gt; | Promise used to return the result.|
......@@ -255,6 +265,7 @@ Checks whether the ID of this contact is in the local address book. This API use
**System capability**: SystemCapability.Applications.ContactsData
**Parameters**
| Name | Type | Mandatory| Description |
| -------- | ---------------------------- | ---- | ------------------------------------------------------------ |
| id | number | Yes | Contact ID. Each contact corresponds to one ID. |
......@@ -284,11 +295,13 @@ Checks whether the ID of this contact is in the local address book. This API use
**System capability**: SystemCapability.Applications.ContactsData
**Parameters**
| Name| Type | Mandatory| Description |
| ------ | ------ | ---- | ------------------------------------------ |
| id | number | Yes | Contact ID. Each contact corresponds to one ID.|
**Return Value**
| Type | Description |
| ---------------------- | ------------------------------------------------------------ |
| Promise&lt;boolean&gt; | Promise used to return the result. The value **true** indicates that the contact ID is in the local address book, and the value **false** indicates the opposite.|
......@@ -316,6 +329,7 @@ Checks whether a contact is included in my card. This API uses an asynchronous c
**System capability**: SystemCapability.Applications.ContactsData
**Parameters**
| Name | Type | Mandatory| Description |
| -------- | ---------------------------- | ---- | ------------------------------------------------------------ |
| id | number | Yes | Contact ID. |
......@@ -345,11 +359,13 @@ Checks whether a contact is included in my card. This API uses a promise to retu
**System capability**: SystemCapability.Applications.ContactsData
**Parameters**
| Name| Type | Mandatory| Description |
| ------ | ------ | ---- | -------------------- |
| id | number | Yes | Contact ID.|
**Return Value**
| Type | Description |
| ---------------------- | ------------------------------------------------------------ |
| Promise&lt;boolean&gt; | Promise used to return the result. The value **true** indicates that the contact is included in my card, and the value **false** indicates the opposite.|
......@@ -377,6 +393,7 @@ Queries my card. This API uses an asynchronous callback to return the result.
**System capability**: SystemCapability.Applications.ContactsData
**Parameters**
| Name | Type | Mandatory| Description |
| -------- | ---------------------------------------- | ---- | ------------------------------ |
| callback | AsyncCallback&lt;[Contact](#contact)&gt; | Yes | Callback used to return the result.|
......@@ -405,6 +422,7 @@ Queries my card based on the specified contact attributes. This API uses an asyn
**System capability**: SystemCapability.Applications.ContactsData
**Parameters**
| Name | Type | Mandatory| Description |
| -------- | ---------------------------------------- | ---- | ------------------------------ |
| attrs | [ContactAttributes](#contactattributes) | Yes | List of contact attributes. |
......@@ -436,11 +454,13 @@ Queries my card based on the specified contact attributes. This API uses a promi
**System capability**: SystemCapability.Applications.ContactsData
**Parameters**
| Name| Type | Mandatory| Description |
| ------ | --------------------------------------- | ---- | ------------------ |
| attrs | [ContactAttributes](#contactattributes) | No | List of contact attributes.|
**Return Value**
| Type | Description |
| ---------------------------------- | ------------------------------------------- |
| Promise&lt;[Contact](#contact)&gt; | Promise used to return the result.|
......@@ -470,6 +490,7 @@ Selects a contact. This API uses an asynchronous callback to return the result.
**System capability**: SystemCapability.Applications.Contacts and SystemCapability.Applications.ContactsData
**Parameters**
| Name | Type | Mandatory| Description |
| -------- | ----------------------------------------------------- | ---- | ------------------------------------ |
| callback | AsyncCallback&lt;Array&lt;[Contact](#contact)&gt;&gt; | Yes | Callback used to return the result.|
......@@ -498,6 +519,7 @@ Selects a contact. This API uses a promise to return the result.
**System capability**: SystemCapability.Applications.Contacts and SystemCapability.Applications.ContactsData
**Return Value**
| Type | Description |
| ----------------------------------------------- | ------------------------------------------------- |
| Promise&lt;Array&lt;[Contact](#contact)&gt;&gt; | Promise used to return the result.|
......@@ -525,6 +547,7 @@ Queries a contact based on the specified key. This API uses an asynchronous call
**System capability**: SystemCapability.Applications.ContactsData
**Parameters**
| Name | Type | Mandatory| Description |
| -------- | ---------------------------------------- | ---- | -------------------------------------- |
| key | string | Yes | Contact key. Each contact corresponds to one key.|
......@@ -554,6 +577,7 @@ Queries contacts based on the specified key and application. This API uses an as
**System capability**: SystemCapability.Applications.ContactsData
**Parameters**
| Name | Type | Mandatory| Description |
| -------- | ---------------------------------------- | ---- | -------------------------------------- |
| key | string | Yes | Contact key. Each contact corresponds to one key.|
......@@ -588,6 +612,7 @@ Queries contacts based on the specified key and attributes. This API uses an asy
**System capability**: SystemCapability.Applications.ContactsData
**Parameters**
| Name | Type | Mandatory| Description |
| -------- | ---------------------------------------- | ---- | -------------------------------------- |
| key | string | Yes | Contact key. Each contact corresponds to one key.|
......@@ -620,6 +645,7 @@ Queries contacts based on the specified key, application, and attributes. This A
**System capability**: SystemCapability.Applications.ContactsData
**Parameters**
| Name | Type | Mandatory| Description |
| -------- | ---------------------------------------- | ---- | -------------------------------------- |
| key | string | Yes | Contact key. Each contact corresponds to one key.|
......@@ -658,6 +684,7 @@ Queries contacts based on the specified key, application, and attributes. This A
**System capability**: SystemCapability.Applications.ContactsData
**Parameters**
| Name| Type | Mandatory| Description |
| ------ | --------------------------------------- | ---- | -------------------------------------- |
| key | string | Yes | Contact key. Each contact corresponds to one key.|
......@@ -665,6 +692,7 @@ Queries contacts based on the specified key, application, and attributes. This A
| attrs | [ContactAttributes](#contactattributes) | No | List of contact attributes. |
**Return Value**
| Type | Description |
| ---------------------------------- | ----------------------------------------------- |
| Promise&lt;[Contact](#contact)&gt; | Promise used to return the result.|
......@@ -699,6 +727,7 @@ Queries all contacts. This API uses an asynchronous callback to return the resul
**System capability**: SystemCapability.Applications.ContactsData
**Parameters**
| Name | Type | Mandatory| Description |
| -------- | ----------------------------------------------------- | ---- | -------------------------------------- |
| callback | AsyncCallback&lt;Array&lt;[Contact](#contact)&gt;&gt; | Yes | Callback used to return the result.|
......@@ -727,6 +756,7 @@ Queries all contacts based on the specified application. This API uses an asynch
**System capability**: SystemCapability.Applications.ContactsData
**Parameters**
| Name | Type | Mandatory| Description |
| -------- | ----------------------------------------------------- | ---- | -------------------------------------- |
| holder | [Holder](#holder) | Yes | Application that creates the contacts. |
......@@ -760,6 +790,7 @@ Queries all contacts based on the specified attributes. This API uses an asynchr
**System capability**: SystemCapability.Applications.ContactsData
**Parameters**
| Name | Type | Mandatory| Description |
| -------- | ----------------------------------------------------- | ---- | -------------------------------------- |
| attrs | [ContactAttributes](#contactattributes) | Yes | List of contact attributes. |
......@@ -791,6 +822,7 @@ Queries all contacts based on the specified application and attributes. This API
**System capability**: SystemCapability.Applications.ContactsData
**Parameters**
| Name | Type | Mandatory| Description |
| -------- | ----------------------------------------------------- | ---- | -------------------------------------- |
| holder | [Holder](#holder) | Yes | Application that creates the contacts. |
......@@ -827,12 +859,14 @@ Queries all contacts based on the specified application and attributes. This API
**System capability**: SystemCapability.Applications.ContactsData
**Parameters**
| Name| Type | Mandatory| Description |
| ------ | --------------------------------------- | ---- | ---------------------- |
| holder | [Holder](#holder) | No | Application that creates the contacts.|
| attrs | [ContactAttributes](#contactattributes) | No | List of contact attributes. |
**Return Value**
| Type | Description |
| ----------------------------------------------- | --------------------------------------------------- |
| Promise&lt;Array&lt;[Contact](#contact)&gt;&gt; | Promise used to return the result.|
......@@ -866,6 +900,7 @@ Queries contacts based on the specified phone number. This API uses an asynchron
**System capability**: SystemCapability.Applications.ContactsData
**Parameters**
| Name | Type | Mandatory| Description |
| ----------- | ----------------------------------------------------- | ---- | -------------------------------------- |
| phoneNumber | string | Yes | Phone number of the contacts. |
......@@ -895,6 +930,7 @@ Queries contacts based on the specified phone number and application. This API u
**System capability**: SystemCapability.Applications.ContactsData
**Parameters**
| Name | Type | Mandatory| Description |
| ----------- | ----------------------------------------------------- | ---- | -------------------------------------- |
| phoneNumber | string | Yes | Phone number of the contacts. |
......@@ -929,6 +965,7 @@ Queries contacts based on the specified phone number and attributes. This API us
**System capability**: SystemCapability.Applications.ContactsData
**Parameters**
| Name | Type | Mandatory| Description |
| ----------- | ----------------------------------------------------- | ---- | -------------------------------------- |
| phoneNumber | string | Yes | Phone number of the contacts. |
......@@ -961,6 +998,7 @@ Queries contacts based on the specified phone number, application, and attribute
**System capability**: SystemCapability.Applications.ContactsData
**Parameters**
| Name | Type | Mandatory| Description |
| ----------- | ----------------------------------------------------- | ---- | -------------------------------------- |
| phoneNumber | string | Yes | Phone number of the contacts. |
......@@ -998,6 +1036,7 @@ Queries contacts based on the specified phone number, application, and attribute
**System capability**: SystemCapability.Applications.ContactsData
**Parameters**
| Name | Type | Mandatory| Description |
| ----------- | --------------------------------------- | ---- | ---------------------- |
| phoneNumber | string | Yes | Phone number of the contacts. |
......@@ -1005,6 +1044,7 @@ Queries contacts based on the specified phone number, application, and attribute
| attrs | [ContactAttributes](#contactattributes) | No | List of contact attributes. |
**Return Value**
| Type | Description |
| ----------------------------------------------- | --------------------------------------------------- |
| Promise&lt;Array&lt;[Contact](#contact)&gt;&gt; | Promise used to return the result.|
......@@ -1038,6 +1078,7 @@ Queries contacts based on the specified email address. This API uses an asynchro
**System capability**: SystemCapability.Applications.ContactsData
**Parameters**
| Name | Type | Mandatory| Description |
| -------- | ----------------------------------------------------- | ---- | -------------------------------------- |
| email | string | Yes | Email address of the contact. |
......@@ -1067,6 +1108,7 @@ Queries contacts based on the specified email address and application. This API
**System capability**: SystemCapability.Applications.ContactsData
**Parameters**
| Name | Type | Mandatory| Description |
| -------- | ----------------------------------------------------- | ---- | -------------------------------------- |
| email | string | Yes | Email address of the contact. |
......@@ -1101,6 +1143,7 @@ Queries contacts based on the specified email address and attributes. This API u
**System capability**: SystemCapability.Applications.ContactsData
**Parameters**
| Name | Type | Mandatory| Description |
| -------- | ----------------------------------------------------- | ---- | ------------------------------------ |
| email | string | Yes | Email address of the contact. |
......@@ -1133,6 +1176,7 @@ Queries contacts based on the specified email address, application, and attribut
**System capability**: SystemCapability.Applications.ContactsData
**Parameters**
| Name | Type | Mandatory| Description |
| -------- | ----------------------------------------------------- | ---- | ------------------------------------ |
| email | string | Yes | Email address of the contact. |
......@@ -1170,6 +1214,7 @@ Queries contacts based on the specified email address, application, and attribut
**System capability**: SystemCapability.Applications.ContactsData
**Parameters**
| Name| Type | Mandatory| Description |
| ------ | --------------------------------------- | ---- | ---------------------- |
| email | string | Yes | Email address of the contact. |
......@@ -1177,6 +1222,7 @@ Queries contacts based on the specified email address, application, and attribut
| attrs | [ContactAttributes](#contactattributes) | No | List of contact attributes. |
**Return Value**
| Type | Description |
| ----------------------------------------------- | --------------------------------------------------- |
| Promise&lt;Array&lt;[Contact](#contact)&gt;&gt; | Promise used to return the result.|
......@@ -1210,6 +1256,7 @@ Queries all groups of this contact. This API uses an asynchronous callback to re
**System capability**: SystemCapability.Applications.ContactsData
**Parameters**
| Name | Type | Mandatory| Description |
| -------- | ------------------------------------------------- | ---- | ------------------------------------ |
| callback | AsyncCallback&lt;Array&lt;[Group](#group)&gt;&gt; | Yes | Callback used to return the result.|
......@@ -1238,6 +1285,7 @@ Queries all groups of this contact based on the specified application. This API
**System capability**: SystemCapability.Applications.ContactsData
**Parameters**
| Name | Type | Mandatory| Description |
| -------- | ------------------------------------------------- | ---- | ------------------------------------ |
| holder | Holder | Yes | Application that creates the contacts. |
......@@ -1271,11 +1319,13 @@ Queries all groups of this contact based on the specified application. This API
**System capability**: SystemCapability.Applications.ContactsData
**Parameters**
| Name| Type | Mandatory| Description |
| ------ | ----------------- | ---- | ---------------------- |
| holder | [Holder](#holder) | No | Application that creates the contacts.|
**Return Value**
| Type | Description |
| ------------------------------------------- | ------------------------------------------------- |
| Promise&lt;Array&lt;[Group](#group)&gt;&gt; | Promise used to return the result.|
......@@ -1307,6 +1357,7 @@ Queries all applications that have created contacts. This API uses an asynchrono
**System capability**: SystemCapability.Applications.ContactsData
**Parameters**
| Name | Type | Mandatory| Description |
| -------- | --------------------------------------------------- | ---- | ---------------------------------------------------- |
| callback | AsyncCallback&lt;Array&lt;[Holder](#holder)&gt;&gt; | Yes | Callback used to return the result.|
......@@ -1335,6 +1386,7 @@ Queries all applications that have created contacts. This API uses a promise to
**System capability**: SystemCapability.Applications.ContactsData
**Return Value**
| Type | Description |
| --------------------------------------------- | ------------------------------------------------------------ |
| Promise&lt;Array&lt;[Holder](#holder)&gt;&gt; | Promise used to return the result.|
......@@ -1362,6 +1414,7 @@ Queries the key of a contact based on the specified contact ID. This API uses an
**System capability**: SystemCapability.Applications.ContactsData
**Parameters**
| Name | Type | Mandatory| Description |
| -------- | --------------------------- | ---- | --------------------------------------- |
| id | number | Yes | Contact ID. |
......@@ -1391,6 +1444,7 @@ Queries the key of a contact based on the specified contact ID and application.
**System capability**: SystemCapability.Applications.ContactsData
**Parameters**
| Name | Type | Mandatory| Description |
| -------- | --------------------------- | ---- | --------------------------------------- |
| id | number | Yes | Contact ID. |
......@@ -1425,12 +1479,14 @@ Queries the key of a contact based on the specified contact ID and application.
**System capability**: SystemCapability.Applications.ContactsData
**Parameters**
| Name| Type | Mandatory| Description |
| ------ | ----------------- | ---- | ---------------------- |
| id | number | Yes | Contact ID. |
| holder | [Holder](#holder) | No | Application that creates the contacts.|
**Return Value**
| Type | Description |
| --------------------- | ---------------------------------------------------- |
| Promise&lt;string&gt; | Promise used to return the result.|
......
......@@ -30,9 +30,10 @@ This API is defined but not implemented in OpenHarmony 3.1 Release.
**Example**
```js
let nativeHeapSize = hidebug.getNativeHeapSize();
```
```js
let nativeHeapSize = hidebug.getNativeHeapSize();
```
## hidebug.getNativeHeapAllocatedSize
......@@ -45,17 +46,18 @@ This API is defined but not implemented in OpenHarmony 3.1 Release.
**System capability**: SystemCapability.HiviewDFX.HiProfiler.HiDebug
**Return value**
| Type | Description |
| ------ | --------------------------------- |
| bigint | Size of the allocated native heap memory, in kB.|
**Example**
```js
let nativeHeapAllocatedSize = hidebug.getNativeHeapAllocatedSize();
```
```js
let nativeHeapAllocatedSize = hidebug.getNativeHeapAllocatedSize();
```
## hidebug.getNativeHeapFreeSize
......@@ -68,17 +70,18 @@ This API is defined but not implemented in OpenHarmony 3.1 Release.
**System capability**: SystemCapability.HiviewDFX.HiProfiler.HiDebug
**Return value**
| Type | Description |
| ------ | ------------------------------- |
| bigint | Size of the free native heap memory, in kB.|
**Example**
```js
let nativeHeapFreeSize = hidebug.getNativeHeapFreeSize();
```
```js
let nativeHeapFreeSize = hidebug.getNativeHeapFreeSize();
```
## hidebug.getPss
......@@ -89,17 +92,18 @@ Obtains the PSS of this process.
**System capability**: SystemCapability.HiviewDFX.HiProfiler.HiDebug
**Return value**
| Type | Description |
| ------ | ------------------------- |
| bigint | PSS of the process, in kB.|
**Example**
```js
let pss = hidebug.getPss();
```
```js
let pss = hidebug.getPss();
```
## hidebug.getSharedDirty
......@@ -110,17 +114,18 @@ Obtains the size of the shared dirty memory of this process.
**System capability**: SystemCapability.HiviewDFX.HiProfiler.HiDebug
**Return value**
| Type | Description |
| ------ | -------------------------- |
| bigint | Size of the shared dirty memory of the process, in kB.|
**Example**
```js
let sharedDirty = hidebug.getSharedDirty();
```
```js
let sharedDirty = hidebug.getSharedDirty();
```
## hidebug.getPrivateDirty<sup>9+<sup>
......@@ -130,8 +135,8 @@ Obtains the size of the private dirty memory of this process.
**System capability**: SystemCapability.HiviewDFX.HiProfiler.HiDebug
**Return value**
| Type | Description |
| ------ | -------------------------- |
| bigint | Size of the private dirty memory of the process, in kB.|
......@@ -152,17 +157,18 @@ For example, if the CPU usage is **50%**, **0.5** is returned.
**System capability**: SystemCapability.HiviewDFX.HiProfiler.HiDebug
**Return value**
| Type | Description |
| ------ | -------------------------- |
| number | CPU usage of the process.|
**Example**
```js
let cpuUsage = hidebug.getCpuUsage();
```
```js
let cpuUsage = hidebug.getCpuUsage();
```
## hidebug.startProfiling
......@@ -189,7 +195,6 @@ hidebug.stopProfiling();
```
## hidebug.stopProfiling
stopProfiling() : void
......@@ -245,6 +250,7 @@ This is a system API and cannot be called by third-party applications.
| serviceid | number | Yes | ID of the system service. |
**Return value**
| Type | Description |
| ------ | -------------------------- |
| string | Absolute path of the file that contains the service information to dump. |
......
......@@ -291,6 +291,7 @@ Enables the specified trace flag in the **HiTraceId** instance. This API works i
**System capability**: SystemCapability.HiviewDFX.HiTrace
**Parameters**
| Name | Type | Mandatory | Description |
| -------- | -------- | -------- | -------- |
| id | [HiTraceId](#hitraceid) | Yes | **HiTraceId** instance. |
......
......@@ -47,7 +47,7 @@ Obtains the default active data network. This API uses a promise to return the r
**System capability**: SystemCapability.Communication.NetManager.Core
**Return Value**
**Return value**
| Type | Description |
| --------------------------------- | ------------------------------------- |
......@@ -92,7 +92,7 @@ Checks whether the default data network is activated. This API uses a promise to
**System capability**: SystemCapability.Communication.NetManager.Core
**Return Value**
**Return value**
| Type | Description |
| ----------------- | ----------------------------------------------- |
......@@ -117,6 +117,7 @@ Obtains the list of all active data networks. This API uses an asynchronous call
**System capability**: SystemCapability.Communication.NetManager.Core
**Parameters**
| Name| Type| Mandatory| Description|
| -------- | -------- | -------- | -------- |
| callback | AsyncCallback&lt;Array&lt;[NetHandle](#nethandle)&gt;&gt; | Yes| Callback used to return the result.|
......@@ -141,7 +142,8 @@ Obtains the list of all active data networks. This API uses a promise to return
**System capability**: SystemCapability.Communication.NetManager.Core
**Return Value**
**Return value**
| Type| Description|
| -------- | -------- |
| Promise&lt;Array&lt;[NetHandle](#nethandle)&gt;&gt; | Promise used to return the result.|
......@@ -198,7 +200,7 @@ Obtains connection properties of the network corresponding to **netHandle**. Thi
| --------- | ----------------------- | ---- | ---------------- |
| netHandle | [NetHandle](#nethandle) | Yes | Handle of the data network.|
**Return Value**
**Return value**
| Type | Description |
| ------------------------------------------------------- | --------------------------------- |
......@@ -258,7 +260,7 @@ Obtains capability information of the network corresponding to **netHandle**. Th
| --------- | ----------------------- | ---- | ---------------- |
| netHandle | [NetHandle](#nethandle) | Yes | Handle of the data network.|
**Return Value**
**Return value**
| Type | Description |
| --------------------------------------------- | --------------------------------- |
......@@ -285,6 +287,7 @@ Reports connection of the data network. This API uses an asynchronous callback t
**System capability**: SystemCapability.Communication.NetManager.Core
**Parameters**
| Name| Type| Mandatory| Description|
| -------- | -------- | -------- | -------- |
| netHandle | [NetHandle](#nethandle) | Yes| Handle of the data network. For details, see [NetHandle](#nethandle).|
......@@ -312,11 +315,13 @@ Reports connection of the data network. This API uses a promise to return the re
**System capability**: SystemCapability.Communication.NetManager.Core
**Parameters**
| Name| Type| Mandatory| Description|
| -------- | -------- | -------- | -------- |
| netHandle | [NetHandle](#nethandle) | Yes| Handle of the data network. For details, see [NetHandle](#nethandle).|
**Return Value**
**Return value**
| Type| Description|
| -------- | -------- |
| Promise&lt;void&gt; | Promise used to return the result.|
......@@ -343,6 +348,7 @@ Reports disconnection of the data network. This API uses an asynchronous callbac
**System capability**: SystemCapability.Communication.NetManager.Core
**Parameters**
| Name| Type| Mandatory| Description|
| -------- | -------- | -------- | -------- |
| netHandle | [NetHandle](#nethandle) | Yes| Handle of the data network. For details, see [NetHandle](#nethandle).|
......@@ -370,11 +376,13 @@ Reports disconnection of the data network. This API uses a promise to return the
**System capability**: SystemCapability.Communication.NetManager.Core
**Parameters**
| Name| Type| Mandatory| Description|
| -------- | -------- | -------- | -------- |
| netHandle | [NetHandle](#nethandle) | Yes| Handle of the data network. For details, see [NetHandle](#nethandle).|
**Return Value**
**Return value**
| Type| Description|
| -------- | -------- |
| Promise&lt;void&gt; | Promise used to return the result.|
......@@ -432,7 +440,7 @@ Resolves the host name by using the default network to obtain all IP addresses.
| ------ | ------ | ---- | ------------------ |
| host | string | Yes | Host name to be resolved.|
**Return Value**
**Return value**
| Type | Description |
| ------------------------------------------- | ----------------------------- |
......@@ -561,7 +569,7 @@ Obtains the handle of the network specified by **netSpecifier**.
| netSpecifier | [NetSpecifier](#netspecifier) | No | Network specifier. If this parameter is not set, the default network is used. |
| timeout | number | No | Timeout interval for obtaining the network specified by **netSpecifier**. This parameter is valid only when **netSpecifier** is set.|
**Return Value**
**Return value**
| Type | Description |
| ------------------------------- | -------------------- |
......@@ -829,7 +837,7 @@ Resolves the host name by using the corresponding network to obtain all IP addre
| ------ | ------ | ---- | ------------------ |
| host | string | Yes | Host name to be resolved.|
**Return Value**
**Return value**
| Type | Description |
| ------------------------------------------- | ----------------------------- |
......@@ -891,7 +899,7 @@ Resolves the host name by using the corresponding network to obtain the first IP
| ------ | ------ | ---- | ------------------ |
| host | string | Yes | Host name to be resolved.|
**Return Value**
**Return value**
| Type | Description |
| ----------------------------------- | ------------------------------- |
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册