已合并
支持设置本地HOTA域名 Co-authored-by:Agent #34136
keegan-cheng创建于 7月8日
支持设置本地HOTA域名 Co-authored-by:Agent #34136
已合并
共 1 个文件变更+45-0
| @@ -1368,6 +1368,51 @@ declare namespace systemManager { | |||
| 1368 | * 26.0.0 | 1368 | * 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 | + * ohos.permission.ENTERPRISE_MANAGE_SYSTEM | ||
| 1376 | + * { Want } admin - admin indicates the enterprise admin extension ability information. | ||
| 1377 | + * { 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 | + * { BusinessError } 201 - Permission verification failed. | ||
| 1386 | + * The application does not have the permission required to call the API. | ||
| 1387 | + * { BusinessError } 801 - Capability not supported. | ||
| 1388 | + * Failed to call the API due to limited device capabilities. | ||
| 1389 | + * { BusinessError } 9200001 - The application is not an administrator application of the device. | ||
| 1390 | + * { BusinessError } 9200002 - The administrator application does not have permission to manage the device. | ||
| 1391 | + * { BusinessError } 9200012 - Parameter verification failed. | ||
| 1392 | + * { BusinessError } 9200018 - This device is not an enterprise device. | ||
| 1393 | + * SystemCapability.Customization.EnterpriseDeviceManager | ||
| 1394 | + * | ||
| 1395 | + * 26.1.0 | ||
| 1396 | + */ | ||
| 1397 | + function setLocalHotaDomain(admin: Want, domain: string): void; | ||
| 1398 | + | ||
| 1399 | + /** | ||
| 1400 | + * Get local HOTA domain for device. | ||
| 1401 | + * | ||
| 1402 | + * ohos.permission.ENTERPRISE_MANAGE_SYSTEM | ||
| 1403 | + * { Want } admin - admin indicates the enterprise admin extension ability information. | ||
| 1404 | + * { 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 | + * { BusinessError } 201 - Permission verification failed. | ||
| 1407 | + * The application does not have the permission required to call the API. | ||
| 1408 | + * { BusinessError } 9200001 - The application is not an administrator application of the device. | ||
| 1409 | + * { BusinessError } 9200002 - The administrator application does not have permission to manage the device. | ||
| 1410 | + * { BusinessError } 9200018 - This device is not an enterprise device. | ||
| 1411 | + * SystemCapability.Customization.EnterpriseDeviceManager | ||
| 1412 | + * | ||
| 1413 | + * 26.1.0 | ||
| 1414 | + */ | ||
| 1415 | + function getLocalHotaDomain(admin: Want): string; | ||
| 1371 | } | 1416 | } |
| 1372 | 1417 | ||
| 1373 | export default systemManager; | 1418 | export default systemManager; |