• 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 information about a shortcut, including the shortcut ID and label.
18 * @typedef ShortcutInfo
19 * @syscap SystemCapability.BundleManager.BundleFramework.Launcher
20 * @systemapi
21 * @since 9
22 */
23 export interface ShortcutInfo {
24    /**
25     * Indicates the ID of the application to which this shortcut belongs
26     * @type {string}
27     * @syscap SystemCapability.BundleManager.BundleFramework.Launcher
28     * @since 9
29     */
30    readonly id: string;
31
32    /**
33     * Indicates the name of the bundle containing the shortcut
34     * @type {string}
35     * @syscap SystemCapability.BundleManager.BundleFramework.Launcher
36     * @since 9
37     */
38    readonly bundleName: string;
39
40    /**
41     * Indicates the moduleName of the shortcut
42     * @type {string}
43     * @syscap SystemCapability.BundleManager.BundleFramework.Launcher
44     * @since 9
45     */
46    readonly moduleName: string;
47
48    /**
49     * Indicates the host ability of the shortcut
50     * @type {string}
51     * @syscap SystemCapability.BundleManager.BundleFramework.Launcher
52     * @since 9
53     */
54    readonly hostAbility: string;
55
56    /**
57     * Indicates the icon of the shortcut
58     * @type {string}
59     * @syscap SystemCapability.BundleManager.BundleFramework.Launcher
60     * @since 9
61     */
62    readonly icon: string;
63
64    /**
65     * Indicates the icon id of the shortcut
66     * @type {number}
67     * @syscap SystemCapability.BundleManager.BundleFramework.Launcher
68     * @since 9
69     */
70    readonly iconId: number;
71
72    /**
73     * Indicates the label of the shortcut
74     * @type {string}
75     * @syscap SystemCapability.BundleManager.BundleFramework.Launcher
76     * @since 9
77     */
78    readonly label: string;
79
80    /**
81     * Indicates the label id of the shortcut
82     * @type {number}
83     * @syscap SystemCapability.BundleManager.BundleFramework.Launcher
84     * @since 9
85     */
86    readonly labelId: number;
87
88    /**
89     * Indicates the wants of the shortcut
90     * @type {Array<ShortcutWant>}
91     * @syscap SystemCapability.BundleManager.BundleFramework.Launcher
92     * @since 9
93     */
94    readonly wants: Array<ShortcutWant>;
95  }
96
97  /**
98   * Obtains information about the ability that a shortcut will start.
99   * @typedef ShortcutWant
100   * @syscap SystemCapability.BundleManager.BundleFramework.Launcher
101   * @systemapi
102   * @since 9
103   */
104  export interface ShortcutWant{
105    /**
106     * Indicates the target bundle of the shortcut want
107     * @type {string}
108     * @syscap SystemCapability.BundleManager.BundleFramework.Launcher
109     * @since 9
110     */
111    readonly targetBundle: string;
112
113    /**
114     * Indicates the target module of the shortcut want
115     * @type {string}
116     * @syscap SystemCapability.BundleManager.BundleFramework.Launcher
117     * @since 9
118     */
119    readonly targetModule: string;
120
121    /**
122     * Indicates the target ability of the shortcut want
123     * @type {string}
124     * @syscap SystemCapability.BundleManager.BundleFramework.Launcher
125     * @since 9
126     */
127    readonly targetAbility: string;
128  }