• 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.Appexecfwk
21  * @permission NA
22  * @devices phone, tablet, tv, wearable, car
23  */
24export interface ShortcutWant{
25  /**
26    * @default Indicates the target bundle of the shortcut want
27    * @since 7
28    * @SysCap SystemCapability.Appexecfwk
29    */
30  readonly targetBundle: string;
31  /**
32    * @default Indicates the target class of the shortcut want
33    * @since 7
34    * @SysCap SystemCapability.Appexecfwk
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.Appexecfwk
43  * @permission NA
44  * @devices phone, tablet, tv, wearable, car
45  */
46export interface ShortcutInfo {
47  /**
48    * @default Indicates the ID of the application to which this shortcut belongs
49    * @since 7
50    * @SysCap SystemCapability.Appexecfwk
51    */
52  readonly id: string;
53  /**
54    * @default Indicates the name of the bundle containing the shortcut
55    * @since 7
56    * @SysCap SystemCapability.Appexecfwk
57    */
58  readonly bundleName: string;
59  /**
60    * @default Indicates the host ability of the shortcut
61    * @since 7
62    * @SysCap SystemCapability.Appexecfwk
63    */
64  readonly hostAbility: string;
65  /**
66    * @default Indicates the icon of the shortcut
67    * @since 7
68    * @SysCap SystemCapability.Appexecfwk
69    */
70  readonly icon: string;
71  /**
72    * @default Indicates the label of the shortcut
73    * @since 7
74    * @SysCap SystemCapability.Appexecfwk
75    */
76  readonly label: string;
77  /**
78    * @default Indicates the disableMessage of the shortcut
79    * @since 7
80    * @SysCap SystemCapability.Appexecfwk
81    */
82  readonly disableMessage: string;
83  /**
84    * @default Indicates the wants of the shortcut
85    * @since 7
86    * @SysCap SystemCapability.Appexecfwk
87    */
88  readonly wants: Array<ShortcutWant>;
89  /**
90    * @default Indicates whether the shortcut is static
91    * @since 7
92    * @SysCap SystemCapability.Appexecfwk
93    */
94  readonly isStatic?: boolean
95  /**
96    * @default Indicates whether the shortcut is homeshortcut
97    * @since 7
98    * @SysCap SystemCapability.Appexecfwk
99    */
100  readonly isHomeShortcut?: boolean;
101  /**
102    * @default Indicates whether the shortcut is enabled
103    * @since 7
104    * @SysCap SystemCapability.Appexecfwk
105    */
106  readonly isEnabled?: boolean;
107}