1/* 2 * Copyright (c) 2021 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 * Contains basic Ability information, which uniquely identifies an launcher StatusCallback. 18 * You can use this class to obtain values of the fields set in an callback function, 19 * such as the add, update, remove. 20 * @name Contains basic launcher status callback information, which uniquely identifies an LauncherStatusCallback 21 * @since 8 22 * @syscap SystemCapability.BundleManager.BundleFramework 23 * 24 * @permission ohos.permission.LISTEN_BUNDLE_CHANGE 25 * @systemapi Hide this for inner system use 26 */ 27export interface BundleStatusCallback { 28 /** 29 * @name Obtains add callback about an launcherStatusCallback. 30 * @since 8 31 * @syscap SystemCapability.BundleManager.BundleFramework 32 * @permission ohos.permission.LISTEN_BUNDLE_CHANGE 33 * 34 * @systemapi Hide this for inner system use 35 */ 36 add: (bundleName : string, userId: number) => void; 37 38 /** 39 * @name Obtains update callback about an launcherStatusCallback. 40 * @since 8 41 * @syscap SystemCapability.BundleManager.BundleFramework 42 * @permission ohos.permission.LISTEN_BUNDLE_CHANGE 43 * 44 * @systemapi Hide this for inner system use 45 */ 46 update: (bundleName : string, userId: number) => void; 47 48 /** 49 * @name Obtains remove callback about an launcherStatusCallback. 50 * @since 8 51 * @syscap SystemCapability.BundleManager.BundleFramework 52 * @permission ohos.permission.LISTEN_BUNDLE_CHANGE 53 * 54 * @systemapi Hide this for inner system use 55 */ 56 remove: (bundleName : string, userId: number) => void; 57}