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 * @name Provides methods for obtaining information about the ability that a shortcut will start, including the target 18 * bundle name, target module name and ability class name. 19 * @since 7 20 * @syscap SystemCapability.BundleManager.BundleFramework 21 * @systemapi Hide this for inner system use 22 * @deprecated since 9 23 * @useinstead ohos.bundle.launcherBundleManager.ShortcutWant 24 */ 25 export interface ShortcutWant{ 26 /** 27 * @since 7 28 * @syscap SystemCapability.BundleManager.BundleFramework 29 */ 30 readonly targetBundle: string; 31 /** 32 * @since 7 33 * @syscap SystemCapability.BundleManager.BundleFramework 34 */ 35 readonly targetClass: string; 36 } 37 38 /** 39 * @name Provides information about a shortcut, including the shortcut ID and label. 40 * @since 7 41 * @syscap SystemCapability.BundleManager.BundleFramework 42 * @deprecated since 9 43 * @useinstead ohos.bundle.launcherBundleManager.ShortcutInfo 44 */ 45 export interface ShortcutInfo { 46 /** 47 * @since 7 48 * @syscap SystemCapability.BundleManager.BundleFramework 49 * 50 */ 51 readonly id: string; 52 /** 53 * @since 7 54 * @syscap SystemCapability.BundleManager.BundleFramework 55 */ 56 readonly bundleName: string; 57 /** 58 * @since 7 59 * @syscap SystemCapability.BundleManager.BundleFramework 60 */ 61 readonly hostAbility: string; 62 /** 63 * @since 7 64 * @syscap SystemCapability.BundleManager.BundleFramework 65 */ 66 readonly icon: string; 67 /** 68 * @since 8 69 * @syscap SystemCapability.BundleManager.BundleFramework 70 */ 71 readonly iconId: number; 72 /** 73 * @since 7 74 * @syscap SystemCapability.BundleManager.BundleFramework 75 */ 76 readonly label: string; 77 /** 78 * @since 8 79 * @syscap SystemCapability.BundleManager.BundleFramework 80 */ 81 readonly labelId: number; 82 /** 83 * @since 7 84 * @syscap SystemCapability.BundleManager.BundleFramework 85 */ 86 readonly disableMessage: string; 87 /** 88 * @since 7 89 * @syscap SystemCapability.BundleManager.BundleFramework 90 */ 91 readonly wants: Array<ShortcutWant>; 92 /** 93 * @default false 94 * @since 7 95 * @syscap SystemCapability.BundleManager.BundleFramework 96 */ 97 readonly isStatic?: boolean 98 /** 99 * @default false 100 * @since 7 101 * @syscap SystemCapability.BundleManager.BundleFramework 102 */ 103 readonly isHomeShortcut?: boolean; 104 /** 105 * @default false 106 * @since 7 107 * @syscap SystemCapability.BundleManager.BundleFramework 108 */ 109 readonly isEnabled?: boolean; 110 }