!7785 禁用WiFi策略

Merge pull request !7785 from henvo/master
This commit is contained in:
openharmony_ci 2023-12-13 10:10:47 +00:00 committed by Gitee
commit 2cf9fe2c7d
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F

View File

@ -846,6 +846,44 @@ declare namespace wifiManager {
* @since 10
*/
function setWifiProfile(admin: Want, profile: WifiProfile): Promise<void>;
/**
* Sets the Wi-Fi disabled.
* This function can be called by a super administrator.
*
* @permission ohos.permission.ENTERPRISE_MANAGE_WIFI
* @param { Want } admin - admin indicates the administrator ability information.
* @param { boolean } disabled - true if set the Wi-Fi disabled, otherwise false.
* @throws { BusinessError } 9200001 - the application is not an administrator of the device.
* @throws { BusinessError } 9200002 - the administrator application does not have permission to manage the device.
* @throws { BusinessError } 201 - the application does not have permission to call this function.
* @throws { BusinessError } 202 - not system application.
* @throws { BusinessError } 401 - invalid input parameter.
* @syscap SystemCapability.Customization.EnterpriseDeviceManager
* @systemapi
* @stagemodelonly
* @since 11
*/
function setWifiDisabled(admin: Want, disabled: boolean): void;
/**
* Gets state of whether the Wi-Fi is disabled.
* This function can be called by a super administrator.
*
* @permission ohos.permission.ENTERPRISE_MANAGE_WIFI
* @param { Want } admin - admin indicates the administrator ability information.
* @returns { boolean } true if the Wi-Fi is disabled, otherwise false.
* @throws { BusinessError } 9200001 - the application is not an administrator of the device.
* @throws { BusinessError } 9200002 - the administrator application does not have permission to manage the device.
* @throws { BusinessError } 201 - the application does not have permission to call this function.
* @throws { BusinessError } 202 - not system application.
* @throws { BusinessError } 401 - invalid input parameter.
* @syscap SystemCapability.Customization.EnterpriseDeviceManager
* @systemapi
* @stagemodelonly
* @since 11
*/
function isWifiDisabled(admin: Want): boolean;
}
export default wifiManager;