已合并
支持设置本地HOTA域名 Co-authored-by:Agent #34136
支持设置本地HOTA域名 Co-authored-by:Agent #34136
已合并
keegan-cheng创建于 7月8日
1 个文件变更+45-0
@@ -1368,6 +1368,51 @@ declare namespace systemManager {
1368 * @since 26.0.01368 * @since 26.0.0
1369 */1369 */
1370 function isOtaUpdateNonceEnable(admin: Want): boolean;1370 function isOtaUpdateNonceEnable(admin: Want): boolean;
1371+ 
1372+ /**
1373+ * Set the local HOTA domain of the device.
1374+ *
1375+ * @permission ohos.permission.ENTERPRISE_MANAGE_SYSTEM
1376+ * @param { Want } admin - admin indicates the enterprise admin extension ability information.
1377+ * @param { string } domain - Indicates the local HOTA domain to set. The value must comply with
1378+ * domain name rules. The validation rules are as follows:
1379+ * 1. The length must not exceed 64 characters.
1380+ * 2. IP addresses and localhost are not supported.
1381+ * 3. The domain requires the full request root address, must start with the https://.
1382+ * 4. The domain must match the folllowing regular expression:
1383+ * ^(?:[a-zA-Z0-9](?:[a-zA-Z0-9.-]*[a-zA-Z0-9])?\\.)+[a-zA-Z]{2,}$
1384+ * 5. Passing an empty string means reverting the domain to its default value.
1385+ * @throws { BusinessError } 201 - Permission verification failed.
1386+ * The application does not have the permission required to call the API.
1387+ * @throws { BusinessError } 801 - Capability not supported.
1388+ * Failed to call the API due to limited device capabilities.
1389+ * @throws { BusinessError } 9200001 - The application is not an administrator application of the device.
1390+ * @throws { BusinessError } 9200002 - The administrator application does not have permission to manage the device.
1391+ * @throws { BusinessError } 9200012 - Parameter verification failed.
1392+ * @throws { BusinessError } 9200018 - This device is not an enterprise device.
1393+ * @syscap SystemCapability.Customization.EnterpriseDeviceManager
1394+ * @stagemodelonly
1395+ * @since 26.1.0
1396+ */
1397+ function setLocalHotaDomain(admin: Want, domain: string): void;
1398+ 
1399+ /**
1400+ * Get local HOTA domain for device.
1401+ *
1402+ * @permission ohos.permission.ENTERPRISE_MANAGE_SYSTEM
1403+ * @param { Want } admin - admin indicates the enterprise admin extension ability information.
1404+ * @returns { string } Returns the local HOTA domain.When the interface is not supported on the
1405+ * current device, return an empty string as the default value.
1406+ * @throws { BusinessError } 201 - Permission verification failed.
1407+ * The application does not have the permission required to call the API.
1408+ * @throws { BusinessError } 9200001 - The application is not an administrator application of the device.
1409+ * @throws { BusinessError } 9200002 - The administrator application does not have permission to manage the device.
1410+ * @throws { BusinessError } 9200018 - This device is not an enterprise device.
1411+ * @syscap SystemCapability.Customization.EnterpriseDeviceManager
1412+ * @stagemodelonly
1413+ * @since 26.1.0
1414+ */
1415+ function getLocalHotaDomain(admin: Want): string;
1371}1416}
1372 1417 
1373export default systemManager;1418export default systemManager;