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