diff --git a/en/application-dev/reference/apis/js-apis-enterprise-accountManager.md b/en/application-dev/reference/apis/js-apis-enterprise-accountManager.md index 6910779cd902d3368ad743ef1f6e4e179f2caf19..994fbe9f8f56a215515692808c776b470b653e5e 100644 --- a/en/application-dev/reference/apis/js-apis-enterprise-accountManager.md +++ b/en/application-dev/reference/apis/js-apis-enterprise-accountManager.md @@ -1,6 +1,6 @@ # @ohos.enterprise.accountManager (Account Management) -The **accountManager** module provides account management capabilities for enterprise devices. Only the enterprise device administrator applications can call the APIs provided by this module. +The **accountManager** module provides APIs for account management of enterprise devices. Only the device administrator applications can call the APIs provided by this module. > **NOTE** > @@ -16,7 +16,7 @@ import accountManager from '@ohos.enterprise.accountManager'; disallowAddLocalAccount(admin: Want, disallow: boolean, callback: AsyncCallback<void>): void -Disallows local accounts. This API uses an asynchronous callback to return the result. +Forbids a device administrator application to create local user accounts. This API uses an asynchronous callback to return the result. **Required permissions**: ohos.permission.ENTERPRISE_SET_ACCOUNT_POLICY @@ -28,15 +28,15 @@ Disallows local accounts. This API uses an asynchronous callback to return the r | Name | Type | Mandatory | Description | | -------- | ---------------------------------------- | ---- | ------------------------------- | -| admin | [Want](js-apis-app-ability-want.md) | Yes | Device administrator application. | -| disallow | boolean | Yes | Whether to disallow local accounts. The value **true** means disallow local accounts; the value **false** means the opposite. | +| admin | [Want](js-apis-app-ability-want.md) | Yes | Enterprise device administrator application. | +| disallow | boolean | Yes | Whether to forbid the creation of local user accounts. The value **true** means that local user accounts cannot be created; the value **false** means the opposite. | | callback | AsyncCallback<void> | Yes | Callback invoked to return the result. If the operation is successful, **err** is **null**. Otherwise, **err** is an error object. | **Error codes** For details about the error codes, see [Enterprise Device Management Error Codes](../errorcodes/errorcode-enterpriseDeviceManager.md). -| ID| Error Message | +| ID| Error Message | | ------- | ---------------------------------------------------------------------------- | | 9200001 | The application is not an administrator application of the device. | | 9200002 | The administrator application does not have permission to manage the device.| @@ -59,7 +59,7 @@ accountManager.disallowAddLocalAccount(admin, true, (error) => { disallowAddLocalAccount(admin: Want, disallow: boolean): Promise<void> -Disallows local accounts. This API uses a promise to return the result. +Forbids a device administrator application to create local user accounts. This API uses a promise to return the result. **Required permissions**: ohos.permission.ENTERPRISE_SET_ACCOUNT_POLICY @@ -71,23 +71,23 @@ Disallows local accounts. This API uses a promise to return the result. | Name | Type | Mandatory | Description | | ----- | ----------------------------------- | ---- | ------- | -| admin | [Want](js-apis-app-ability-want.md) | Yes | Device administrator application.| -| disallow | boolean | Yes | Whether to disallow local accounts. The value **true** means disallow local accounts; the value **false** means the opposite. | +| admin | [Want](js-apis-app-ability-want.md) | Yes | Enterprise device administrator application.| +| disallow | boolean | Yes | Whether to forbid the creation of local user accounts. The value **true** means that local user accounts cannot be created; the value **false** means the opposite. | **Return value** | Type | Description | | --------------------- | ------------------------- | -| Promise<void> | Promise that returns no value. | +| Promise<void> | Promise that returns no value. An error object will be thrown if the operation fails.| **Error codes** For details about the error codes, see [Enterprise Device Management Error Codes](../errorcodes/errorcode-enterpriseDeviceManager.md). -| ID| Error Message | +| ID| Error Message | | ------- | ---------------------------------------------------------------------------- | -| 9200001 | the application is not an administrator of the device. | -| 9200002 | the administrator application does not have permission to manage the device. | +| 9200001 | The application is not an administrator application of the device. | +| 9200002 | The administrator application does not have permission to manage the device.| **Example** diff --git a/en/application-dev/reference/apis/js-apis-enterprise-networkManager.md b/en/application-dev/reference/apis/js-apis-enterprise-networkManager.md index 8e527defb2e34a3269b08f19c6bbd049569cff2e..cf5ecc67a009f4a8f12722ddbb7db823beaa9785 100644 --- a/en/application-dev/reference/apis/js-apis-enterprise-networkManager.md +++ b/en/application-dev/reference/apis/js-apis-enterprise-networkManager.md @@ -1,6 +1,6 @@ # @ohos.enterprise.networkManager (Network Management) -The **networkManager** module provides network management capabilities for enterprise devices, including obtaining the device IP address and MAC address. Only the enterprise device administrator applications can call the APIs provided by this module. +The **networkManager** module provides APIs for network management of enterprise devices, including obtaining the device IP address and MAC address. Only the device administrator applications can call the APIs provided by this module. > **NOTE** > @@ -16,7 +16,7 @@ import networkManager from '@ohos.enterprise.networkManager'; getAllNetworkInterfaces(admin: Want, callback: AsyncCallback<Array<string>>): void -Obtains all active network interfaces. This API uses an asynchronous callback to return the result. +Obtains all active network interfaces through a device administrator application. This API uses an asynchronous callback to return the result. **Required permissions**: ohos.permission.GET_NETWORK_INFO @@ -28,14 +28,14 @@ Obtains all active network interfaces. This API uses an asynchronous callback to | Name | Type | Mandatory | Description | | -------- | ---------------------------------------- | ---- | ------------------------------- | -| admin | [Want](js-apis-app-ability-want.md) | Yes | Device administrator application. | -| callback | AsyncCallback<Array<string>> | Yes | Callback invoked to return the active network interfaces obtained. | +| admin | [Want](js-apis-app-ability-want.md) | Yes | Device administrator application that obtains the information. | +| callback | AsyncCallback<Array<string>> | Yes | Callback invoked to return the result. If the operation is successful, **err** is **null** and **data** is an array of network interfaces obtained. If the operation fails, **err** is an error object. | **Error codes** For details about the error codes, see [Enterprise Device Management Error Codes](../errorcodes/errorcode-enterpriseDeviceManager.md). -| ID| Error Message | +| ID| Error Message | | ------- | ---------------------------------------------------------------------------- | | 9200001 | The application is not an administrator application of the device. | | 9200002 | The administrator application does not have permission to manage the device.| @@ -60,7 +60,7 @@ networkManager.getAllNetworkInterfaces(admin, (error, result) => { getAllNetworkInterfaces(admin: Want): Promise<Array<string>> -Obtains all active network interfaces. This API uses a promise to return the result. +Obtains all active network interfaces through a device administrator application. This API uses a promise to return the result. **Required permissions**: ohos.permission.ENTERPRISE_GET_NETWORK_INFO @@ -72,19 +72,19 @@ Obtains all active network interfaces. This API uses a promise to return the res | Name | Type | Mandatory | Description | | ----- | ----------------------------------- | ---- | ------- | -| admin | [Want](js-apis-app-ability-want.md) | Yes | Device administrator application.| +| admin | [Want](js-apis-app-ability-want.md) | Yes | Device administrator application that obtains the information.| **Return value** | Type | Description | | --------------------- | ------------------------- | -| Promise<Array<string>> | Promise used to return the active network interfaces obtained. | +| Promise<Array<string>> | Promise used to return an array of network interfaces obtained. | **Error codes** For details about the error codes, see [Enterprise Device Management Error Codes](../errorcodes/errorcode-enterpriseDeviceManager.md). -| ID| Error Message | +| ID| Error Message | | ------- | ---------------------------------------------------------------------------- | | 9200001 | The application is not an administrator application of the device. | | 9200002 | The administrator application does not have permission to manage the device.| @@ -107,7 +107,7 @@ networkManager.getAllNetworkInterfaces(wantTemp).then((result) => { getIpAddress(admin: Want, networkInterface: string, callback: AsyncCallback<string>): void -Obtains the IP address of a device. This API uses an asynchronous callback to return the result. +Obtains the device IP address based on the given network interface through a device administrator application. This API uses an asynchronous callback to return the result. **Required permissions**: ohos.permission.GET_NETWORK_INFO @@ -119,15 +119,15 @@ Obtains the IP address of a device. This API uses an asynchronous callback to re | Name | Type | Mandatory | Description | | -------- | ---------------------------------------- | ---- | ------------------------------- | -| admin | [Want](js-apis-app-ability-want.md) | Yes | Device administrator application. | +| admin | [Want](js-apis-app-ability-want.md) | Yes | Device administrator application that obtains the information. | | networkInterface | string | Yes | Network interface. | -| callback | AsyncCallback<string> | Yes | Callback invoked to return the device IP address obtained. | +| callback | AsyncCallback<string> | Yes | Callback invoked to return the result. If the operation is successful, **err** is **null** and **data** is the IP address obtained. If the operation fails, **err** is an error object. | **Error codes** For details about the error codes, see [Enterprise Device Management Error Codes](../errorcodes/errorcode-enterpriseDeviceManager.md). -| ID| Error Message | +| ID| Error Message | | ------- | ---------------------------------------------------------------------------- | | 9200001 | The application is not an administrator application of the device. | | 9200002 | The administrator application does not have permission to manage the device.| @@ -152,7 +152,7 @@ networkManager.getIpAddress(wantTemp, "eth0", (error, result) => { getIpAddress(admin: Want, networkInterface: string): Promise<string> -Obtains the IP address of a device. This API uses a promise to return the result. +Obtains the device IP address based on the given network interface through a device administrator application. This API uses a promise to return the result. **Required permissions**: ohos.permission.ENTERPRISE_GET_NETWORK_INFO @@ -164,7 +164,7 @@ Obtains the IP address of a device. This API uses a promise to return the result | Name | Type | Mandatory | Description | | ----- | ----------------------------------- | ---- | ------- | -| admin | [Want](js-apis-app-ability-want.md) | Yes | Device administrator application.| +| admin | [Want](js-apis-app-ability-want.md) | Yes | Device administrator application that obtains the information.| | networkInterface | string | Yes | Network interface. | **Return value** @@ -177,7 +177,7 @@ Obtains the IP address of a device. This API uses a promise to return the result For details about the error codes, see [Enterprise Device Management Error Codes](../errorcodes/errorcode-enterpriseDeviceManager.md). -| ID| Error Message | +| ID| Error Message | | ------- | ---------------------------------------------------------------------------- | | 9200001 | The application is not an administrator application of the device. | | 9200002 | The administrator application does not have permission to manage the device.| @@ -200,7 +200,7 @@ networkManager.getIpAddress(wantTemp, "eth0").then((result) => { getMac(admin: Want, networkInterface: string, callback: AsyncCallback<string>): void -Obtains the MAC address of a device. This API uses an asynchronous callback to return the result. +Obtains the device MAC address based on the given network interface through a device administrator application. This API uses an asynchronous callback to return the result. **Required permissions**: ohos.permission.ENTERPRISE_GET_NETWORK_INFO @@ -212,15 +212,15 @@ Obtains the MAC address of a device. This API uses an asynchronous callback to r | Name | Type | Mandatory | Description | | -------- | ---------------------------------------- | ---- | ------------------------------- | -| admin | [Want](js-apis-app-ability-want.md) | Yes | Device administrator application. | +| admin | [Want](js-apis-app-ability-want.md) | Yes | Device administrator application that obtains the information. | | networkInterface | string | Yes | Network interface. | -| callback | AsyncCallback<string> | Yes | Callback invoked to return the device MAC address obtained. | +| callback | AsyncCallback<string> | Yes | Callback invoked to return the result. If the operation is successful, **err** is **null** and **data** is the MAC address obtained. If the operation fails, **err** is an error object. | **Error codes** For details about the error codes, see [Enterprise Device Management Error Codes](../errorcodes/errorcode-enterpriseDeviceManager.md). -| ID| Error Message | +| ID| Error Message | | ------- | ---------------------------------------------------------------------------- | | 9200001 | The application is not an administrator application of the device. | | 9200002 | The administrator application does not have permission to manage the device.| @@ -245,7 +245,7 @@ networkManager.getMac(wantTemp, "eth0", (error, result) => { getIpAddress(admin: Want, networkInterface: string): Promise<string> -Obtains the MAC address of a device. This API uses a promise to return the result. +Obtain the device MAC address based on the given network interface through a device administrator application. This API uses a promise to return the result. **Required permissions**: ohos.permission.ENTERPRISE_GET_NETWORK_INFO @@ -257,7 +257,7 @@ Obtains the MAC address of a device. This API uses a promise to return the resul | Name | Type | Mandatory | Description | | ----- | ----------------------------------- | ---- | ------- | -| admin | [Want](js-apis-app-ability-want.md) | Yes | Device administrator application.| +| admin | [Want](js-apis-app-ability-want.md) | Yes | Device administrator application that obtains the information.| | networkInterface | string | Yes | Network interface. | **Return value** @@ -270,7 +270,7 @@ Obtains the MAC address of a device. This API uses a promise to return the resul For details about the error codes, see [Enterprise Device Management Error Codes](../errorcodes/errorcode-enterpriseDeviceManager.md). -| ID| Error Message | +| ID| Error Message | | ------- | ---------------------------------------------------------------------------- | | 9200001 | The application is not an administrator application of the device. | | 9200002 | The administrator application does not have permission to manage the device.| diff --git a/en/application-dev/reference/apis/js-apis-enterprise-wifiManager.md b/en/application-dev/reference/apis/js-apis-enterprise-wifiManager.md index ae2fac2d6079953025a59cc2eea5b37841e3901c..2f701bc29d707d801def9950042c720cb6754c12 100644 --- a/en/application-dev/reference/apis/js-apis-enterprise-wifiManager.md +++ b/en/application-dev/reference/apis/js-apis-enterprise-wifiManager.md @@ -1,6 +1,6 @@ # @ohos.enterprise.wifiManager (Wi-Fi Management) -The **wifiManager** module provides Wi-Fi management capabilities for enterprise devices. Only the enterprise device administrator applications can call the APIs provided by this module. +The **wifiManager** module provides APIs for Wi-Fi management of enterprise devices. Only the device administrator applications can call the APIs provided by this module. > **NOTE** > @@ -16,7 +16,7 @@ import wifiManager from '@ohos.enterprise.wifiManager'; isWifiActive(admin: Want, callback: AsyncCallback<boolean>): void -Checks whether Wi-Fi is active. This API uses an asynchronous callback to return the result. +Checks whether Wi-Fi is active through a device administrator application. This API uses an asynchronous callback to return the result. **Required permissions**: ohos.permission.ENTERPRISE_SET_WIFI @@ -35,7 +35,7 @@ Checks whether Wi-Fi is active. This API uses an asynchronous callback to return For details about the error codes, see [Enterprise Device Management Error Codes](../errorcodes/errorcode-enterpriseDeviceManager.md). -| ID| Error Message | +| ID| Error Message | | ------- | ---------------------------------------------------------------------------- | | 9200001 | The application is not an administrator application of the device. | | 9200002 | The administrator application does not have permission to manage the device. | @@ -60,7 +60,7 @@ wifiManager.isWifiActive(wantTemp, (error, result) => { isWifiActive(admin: Want): Promise<boolean> -Checks whether Wi-Fi is active. This API uses a promise to return the result. +Checks whether Wi-Fi is active through a device administrator application. This API uses a promise to return the result. **Required permissions**: ohos.permission.ENTERPRISE_SET_WIFI @@ -84,7 +84,7 @@ Checks whether Wi-Fi is active. This API uses a promise to return the result. For details about the error codes, see [Enterprise Device Management Error Codes](../errorcodes/errorcode-enterpriseDeviceManager.md). -| ID| Error Message | +| ID| Error Message | | ------- | ---------------------------------------------------------------------------- | | 9200001 | The application is not an administrator application of the device. | | 9200002 | The administrator application does not have permission to manage the device. | @@ -127,7 +127,7 @@ Sets Wi-Fi to connect to the specified network. This API uses an asynchronous ca For details about the error codes, see [Enterprise Device Management Error Codes](../errorcodes/errorcode-enterpriseDeviceManager.md). -| ID| Error Message | +| ID| Error Message | | ------- | ---------------------------------------------------------------------------- | | 9200001 | The application is not an administrator application of the device. | | 9200002 | The administrator application does not have permission to manage the device. | @@ -176,13 +176,13 @@ Sets Wi-Fi to connect to the specified network. This API uses a promise to retur | Type | Description | | --------------------- | ------------------------- | -| Promise<void> | Promise that returns no value. If the operation fails, an error object is thrown.| +| Promise<void> | Promise that returns no value. If the operation fails, an error object will be thrown.| **Error codes** For details about the error codes, see [Enterprise Device Management Error Codes](../errorcodes/errorcode-enterpriseDeviceManager.md). -| ID| Error Message | +| ID| Error Message | | ------- | ---------------------------------------------------------------------------- | | 9200001 | The application is not an administrator application of the device. | | 9200002 | The administrator application does not have permission to manage the device. |