mirror of
https://gitee.com/openharmony/interface_sdk-js
synced 2024-10-07 14:13:45 +00:00
EnterpriseAdminExtensionAbility启动通知
Signed-off-by: fangyun <fangyun2@huawei.com>
This commit is contained in:
parent
cbfaac24cf
commit
5923e4f7ca
@ -85,4 +85,14 @@ export default class EnterpriseAdminExtensionAbility {
|
||||
* @since 10
|
||||
*/
|
||||
onAppStop(bundleName: string): void;
|
||||
|
||||
/**
|
||||
* Called back when the enterprise admin extension is started.
|
||||
*
|
||||
* @syscap SystemCapability.Customization.EnterpriseDeviceManager
|
||||
* @systemapi
|
||||
* @stagemodelonly
|
||||
* @since 11
|
||||
*/
|
||||
onStart(): void;
|
||||
}
|
||||
|
159
api/@ohos.enterprise.networkManager.d.ts
vendored
159
api/@ohos.enterprise.networkManager.d.ts
vendored
@ -391,105 +391,6 @@ declare namespace networkManager {
|
||||
protocol?: Protocol;
|
||||
}
|
||||
|
||||
/**
|
||||
* Firewall rule
|
||||
*
|
||||
* @typedef FirewallRule
|
||||
* @syscap SystemCapability.Customization.EnterpriseDeviceManager
|
||||
* @systemapi
|
||||
* @stagemodelonly
|
||||
* @since 11
|
||||
*/
|
||||
export interface FirewallRule {
|
||||
/**
|
||||
* Source IP
|
||||
*
|
||||
* @type { ?string }
|
||||
* @syscap SystemCapability.Customization.EnterpriseDeviceManager
|
||||
* @systemapi
|
||||
* @stagemodelonly
|
||||
* @since 11
|
||||
*/
|
||||
srcAddr?: string;
|
||||
|
||||
/**
|
||||
* Destination IP
|
||||
*
|
||||
* @type { ?string }
|
||||
* @syscap SystemCapability.Customization.EnterpriseDeviceManager
|
||||
* @systemapi
|
||||
* @stagemodelonly
|
||||
* @since 11
|
||||
*/
|
||||
destAddr?: string;
|
||||
|
||||
/**
|
||||
* Source IP
|
||||
*
|
||||
* @type { ?string }
|
||||
* @syscap SystemCapability.Customization.EnterpriseDeviceManager
|
||||
* @systemapi
|
||||
* @stagemodelonly
|
||||
* @since 11
|
||||
*/
|
||||
srcPort?: string;
|
||||
|
||||
/**
|
||||
* Destination IP
|
||||
*
|
||||
* @type { ?string }
|
||||
* @syscap SystemCapability.Customization.EnterpriseDeviceManager
|
||||
* @systemapi
|
||||
* @stagemodelonly
|
||||
* @since 11
|
||||
*/
|
||||
destPort?: string;
|
||||
|
||||
/**
|
||||
* Application uid
|
||||
*
|
||||
* @type { ?string }
|
||||
* @syscap SystemCapability.Customization.EnterpriseDeviceManager
|
||||
* @systemapi
|
||||
* @stagemodelonly
|
||||
* @since 11
|
||||
*/
|
||||
appUid?: string;
|
||||
|
||||
/**
|
||||
* Direction
|
||||
*
|
||||
* @type { ?Direction }
|
||||
* @syscap SystemCapability.Customization.EnterpriseDeviceManager
|
||||
* @systemapi
|
||||
* @stagemodelonly
|
||||
* @since 11
|
||||
*/
|
||||
direction?: Direction;
|
||||
|
||||
/**
|
||||
* Action
|
||||
*
|
||||
* @type { ?Action }
|
||||
* @syscap SystemCapability.Customization.EnterpriseDeviceManager
|
||||
* @systemapi
|
||||
* @stagemodelonly
|
||||
* @since 11
|
||||
*/
|
||||
action?: Action;
|
||||
|
||||
/**
|
||||
* Protocol
|
||||
*
|
||||
* @type { ?Protocol }
|
||||
* @syscap SystemCapability.Customization.EnterpriseDeviceManager
|
||||
* @systemapi
|
||||
* @stagemodelonly
|
||||
* @since 11
|
||||
*/
|
||||
protocol?: Protocol;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets all of the network interfaces of the device.
|
||||
* This function can be called by a super administrator.
|
||||
@ -885,66 +786,6 @@ declare namespace networkManager {
|
||||
* @since 10
|
||||
*/
|
||||
function listIptablesFilterRules(admin: Want): Promise<string>;
|
||||
|
||||
/**
|
||||
* Adds firewall rule by {@link Firewall}.
|
||||
* This function can be called by a super administrator.
|
||||
*
|
||||
* @permission ohos.permission.ENTERPRISE_MANAGE_NETWORK
|
||||
* @param { Want } admin - admin indicates the administrator ability information.
|
||||
* @param { FirewallRule } firewallRule - firewall rule that needs to be added.
|
||||
* @returns { void } nothing is returned if the call succeed.
|
||||
* @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 addFirewallRule(admin: Want, firewallRule: FirewallRule): void;
|
||||
|
||||
/**
|
||||
* Removes firewall rule by {@link Firewall}.
|
||||
* This function can be called by a super administrator.
|
||||
*
|
||||
* @permission ohos.permission.ENTERPRISE_MANAGE_NETWORK
|
||||
* @param { Want } admin - admin indicates the administrator ability information.
|
||||
* @param { FirewallRule } firewallRule - matching rule used to remove firewall rule.
|
||||
* if firewallRule or firewallRule#direction,firewallRule#action is empty, multiple firewall rule can be removed.
|
||||
* @returns { void } nothing is returned if the call succeed.
|
||||
* @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 removeFirewallRule(admin: Want, firewallRule?: FirewallRule): void;
|
||||
|
||||
/**
|
||||
* Gets all firewall rules, Contains the rules added by {@link addFirewallRule} and {@link addIptablesFilterRule}.
|
||||
* This function can be called by a super administrator.
|
||||
*
|
||||
* @permission ohos.permission.ENTERPRISE_MANAGE_NETWORK
|
||||
* @param { Want } admin - admin indicates the administrator ability information.
|
||||
* @returns { Array<FirewallRule> } an array of added firewall rules.
|
||||
* @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 getFirewallRules(admin: Want): Array<FirewallRule>;
|
||||
}
|
||||
|
||||
export default networkManager;
|
||||
|
Loading…
Reference in New Issue
Block a user