更改返回值

Signed-off-by: up200504098 <huangfangfang10@h-partners.com>
This commit is contained in:
up200504098 2024-08-05 10:18:45 +08:00
parent c23bdf30be
commit cd240c588c

View File

@ -34,6 +34,7 @@ declare namespace netFirewall {
* @permission ohos.permission.MANAGE_NET_FIREWALL
* @param { number } userId - Indicates the user ID. It cannot be the ID of a user that does not exist.
* @param { NetFirewallPolicy } policy - The firewall policy to be set.
* @returns { Promise<void> } Returns void.
* @throws { BusinessError } 201 - Permission denied.
* @throws { BusinessError } 202 - Non-system applications use system APIs.
* @throws { BusinessError } 401 - Parameter error.
@ -52,7 +53,7 @@ declare namespace netFirewall {
*
* @permission ohos.permission.GET_NET_FIREWALL
* @param { number } userId - Indicates the user ID. It cannot be the ID of a user that does not exist.
* @returns { NetFirewallPolicy } Current user firewall policy.
* @returns { Promise<NetFirewallPolicy> } Current user firewall policy.
* @throws { BusinessError } 201 - Permission denied.
* @throws { BusinessError } 202 - Non-system applications use system APIs.
* @throws { BusinessError } 401 - Parameter error.
@ -71,7 +72,7 @@ declare namespace netFirewall {
*
* @permission ohos.permission.MANAGE_NET_FIREWALL
* @param { NetFirewallRule } rule - Firewall rule.
* @returns { number } ruleId - Indicates the rule ID, generated by the system.
* @returns { Promise<number> } ruleId - Indicates the rule ID, generated by the system.
* @throws { BusinessError } 201 - Permission denied.
* @throws { BusinessError } 202 - Non-system applications use system APIs.
* @throws { BusinessError } 401 - Parameter error.
@ -96,6 +97,7 @@ declare namespace netFirewall {
*
* @permission ohos.permission.MANAGE_NET_FIREWALL
* @param { NetFirewallRule } rule - Firewall rule.
* @returns { Promise<void> } Returns void.
* @throws { BusinessError } 201 - Permission denied.
* @throws { BusinessError } 202 - Non-system applications use system APIs.
* @throws { BusinessError } 401 - Parameter error.
@ -121,6 +123,7 @@ declare namespace netFirewall {
* @permission ohos.permission.MANAGE_NET_FIREWALL
* @param { number } userId - Indicates the user ID. It cannot be the ID of a user that does not exist.
* @param { number } ruleId - Rule ID.
* @returns { Promise<void> } Returns void.
* @throws { BusinessError } 201 - Permission denied.
* @throws { BusinessError } 202 - Non-system applications use system APIs.
* @throws { BusinessError } 401 - Parameter error.
@ -141,7 +144,7 @@ declare namespace netFirewall {
* @permission ohos.permission.GET_NET_FIREWALL
* @param { number } userId - Indicates the user ID. It cannot be the ID of a user that does not exist.
* @param { RequestParam } requestParam - Paging query input parameters.
* @returns { FirewallRulePage } Paginated firewall rule list.
* @returns { Promise<FirewallRulePage> } Paginated firewall rule list.
* @throws { BusinessError } 201 - Permission denied.
* @throws { BusinessError } 202 - Non-system applications use system APIs.
* @throws { BusinessError } 401 - Parameter error.
@ -161,7 +164,7 @@ declare namespace netFirewall {
* @permission ohos.permission.GET_NET_FIREWALL
* @param { number } userId - Indicates the user ID. It cannot be the ID of a user that does not exist.
* @param { number } ruleId - Rule ID.
* @returns { NetFirewallRule } Firewall Rule.
* @returns { Promise<NetFirewallRule> } Firewall Rule.
* @throws { BusinessError } 201 - Permission denied.
* @throws { BusinessError } 202 - Non-system applications use system APIs.
* @throws { BusinessError } 401 - Parameter error.
@ -182,7 +185,7 @@ declare namespace netFirewall {
* @permission ohos.permission.GET_NET_FIREWALL
* @param { number } userId - Indicates the user ID. It cannot be the ID of a user that does not exist.
* @param { RequestParam } requestParam - Paging query input parameters.
* @returns { InterceptedRecordPage } Block Record List.
* @returns { Promise<InterceptedRecordPage> } Block Record List.
* @throws { BusinessError } 201 - Permission denied.
* @throws { BusinessError } 202 - Non-system applications use system APIs.
* @throws { BusinessError } 401 - Parameter error.