1/* 2 * Copyright (c) 2022 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 * @syscap SystemCapability.BundleManager.BundleFramework 18 * @since 3 19 * @deprecated since 9 20 */ 21export interface CheckPackageHasInstalledResponse { 22 /** 23 * Whether the application exists, or whether the native application has been installed. 24 * @syscap SystemCapability.BundleManager.BundleFramework 25 * @since 3 26 */ 27 result: boolean; 28} 29 30/** 31 * @syscap SystemCapability.BundleManager.BundleFramework 32 * @since 3 33 * @deprecated since 9 34 */ 35export interface CheckPackageHasInstalledOptions { 36 /** 37 * Application bundle name. 38 * @syscap SystemCapability.BundleManager.BundleFramework 39 * @since 3 40 */ 41 bundleName: string; 42 43 /** 44 * Called when native applications are installed. 45 * @syscap SystemCapability.BundleManager.BundleFramework 46 * @since 3 47 */ 48 success?: (data: CheckPackageHasInstalledResponse) => void; 49 50 /** 51 * Called when native applications fail to be installed. 52 * @syscap SystemCapability.BundleManager.BundleFramework 53 * @since 3 54 */ 55 fail?: (data: any, code: number) => void; 56 57 /** 58 * Called when the execution is completed. 59 * @syscap SystemCapability.BundleManager.BundleFramework 60 * @since 3 61 */ 62 complete?: () => void; 63} 64 65/** 66 * @syscap SystemCapability.BundleManager.BundleFramework 67 * @since 3 68 * @deprecated since 9 69 */ 70export default class Package { 71 /** 72 * Checks whether an application exists, or whether a native application has been installed. 73 * @param options Options 74 * @syscap SystemCapability.BundleManager.BundleFramework 75 * @deprecated since 9 76 */ 77 static hasInstalled(options: CheckPackageHasInstalledOptions): void; 78}