1/* 2 * Copyright (c) 2022-2024 Huawei Device Co., Ltd. 3 * Licensed under the Apache License, Version 2.0 (the "License"); 4 * you may not use this file except in compliance with the License. 5 * You may obtain a copy of the License at 6 * 7 * http://www.apache.org/licenses/LICENSE-2.0 8 * 9 * Unless required by applicable law or agreed to in writing, software 10 * distributed under the License is distributed on an "AS IS" BASIS, 11 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 * See the License for the specific language governing permissions and 13 * limitations under the License. 14 */ 15 16/** 17 * @file 18 * @kit MDMKit 19 */ 20 21import type systemManager from './@ohos.enterprise.systemManager'; 22 23/** 24 * Class of the enterprise admin extension ability. 25 * 26 * @syscap SystemCapability.Customization.EnterpriseDeviceManager 27 * @stagemodelonly 28 * @since 12 29 */ 30export default class EnterpriseAdminExtensionAbility { 31 /** 32 * Called back when an application is enabled. 33 * 34 * @syscap SystemCapability.Customization.EnterpriseDeviceManager 35 * @stagemodelonly 36 * @since 12 37 */ 38 onAdminEnabled(): void; 39 40 /** 41 * Called back when an application is disabled. 42 * 43 * @syscap SystemCapability.Customization.EnterpriseDeviceManager 44 * @stagemodelonly 45 * @since 12 46 */ 47 onAdminDisabled(): void; 48 49 /** 50 * Called back when a bundle is installed. 51 * 52 * @param { string } bundleName - bundleName indicates the name of the bundle installed. 53 * @syscap SystemCapability.Customization.EnterpriseDeviceManager 54 * @stagemodelonly 55 * @since 12 56 */ 57 onBundleAdded(bundleName: string): void; 58 59 /** 60 * Called back when a bundle is uninstalled. 61 * 62 * @param { string } bundleName - bundleName indicates the name of the bundle uninstalled. 63 * @syscap SystemCapability.Customization.EnterpriseDeviceManager 64 * @stagemodelonly 65 * @since 12 66 */ 67 onBundleRemoved(bundleName: string): void; 68 69 /** 70 * Called back when an app is started. 71 * 72 * @param { string } bundleName - bundleName indicates the name of the app started. 73 * @syscap SystemCapability.Customization.EnterpriseDeviceManager 74 * @stagemodelonly 75 * @since 12 76 */ 77 onAppStart(bundleName: string): void; 78 79 /** 80 * Called back when an app is stopped. 81 * 82 * @param { string } bundleName - bundleName indicates the name of the app stopped. 83 * @syscap SystemCapability.Customization.EnterpriseDeviceManager 84 * @stagemodelonly 85 * @since 12 86 */ 87 onAppStop(bundleName: string): void; 88 89 /** 90 * Called back when a system version need to update. 91 * 92 * @param { systemManager.SystemUpdateInfo } systemUpdateInfo - the information of the system version. 93 * @syscap SystemCapability.Customization.EnterpriseDeviceManager 94 * @stagemodelonly 95 * @since 12 96 */ 97 onSystemUpdate(systemUpdateInfo: systemManager.SystemUpdateInfo): void; 98 99 /** 100 * Called back when the enterprise admin extension is started. 101 * 102 * @syscap SystemCapability.Customization.EnterpriseDeviceManager 103 * @stagemodelonly 104 * @since 12 105 */ 106 onStart(): void; 107} 108