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