• 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 * @file
18 * @kit AbilityKit
19 */
20
21/**
22 * Provides information about a shortcut, including the shortcut ID and label.
23 *
24 * @typedef ShortcutInfo
25 * @syscap SystemCapability.BundleManager.BundleFramework.Launcher
26 * @systemapi
27 * @since 9
28 */
29/**
30 * Provides information about a shortcut, including the shortcut ID and label.
31 *
32 * @typedef ShortcutInfo
33 * @syscap SystemCapability.BundleManager.BundleFramework.Launcher
34 * @since 20
35 * @arkts 1.1&1.2
36 */
37export interface ShortcutInfo {
38  /**
39   * Indicates the ID of the application to which this shortcut belongs
40   *
41   * @type { string }
42   * @readonly
43   * @syscap SystemCapability.BundleManager.BundleFramework.Launcher
44   * @systemapi
45   * @since 9
46   */
47  /**
48   * Indicates the ID of the application to which this shortcut belongs
49   *
50   * @type { string }
51   * @syscap SystemCapability.BundleManager.BundleFramework.Launcher
52   * @systemapi
53   * @since 12
54   */
55  /**
56   * Indicates the ID of the application to which this shortcut belongs
57   *
58   * @type { string }
59   * @syscap SystemCapability.BundleManager.BundleFramework.Launcher
60   * @since 20
61   * @arkts 1.1&1.2
62   */
63  id: string;
64
65  /**
66   * Indicates the name of the bundle containing the shortcut
67   *
68   * @type { string }
69   * @readonly
70   * @syscap SystemCapability.BundleManager.BundleFramework.Launcher
71   * @systemapi
72   * @since 9
73   */
74  /**
75   * Indicates the name of the bundle containing the shortcut
76   *
77   * @type { string }
78   * @syscap SystemCapability.BundleManager.BundleFramework.Launcher
79   * @systemapi
80   * @since 12
81   */
82  /**
83   * Indicates the name of the bundle containing the shortcut
84   *
85   * @type { string }
86   * @syscap SystemCapability.BundleManager.BundleFramework.Launcher
87   * @since 20
88   * @arkts 1.1&1.2
89   */
90  bundleName: string;
91
92  /**
93   * Indicates the moduleName of the shortcut
94   *
95   * @type { string }
96   * @readonly
97   * @syscap SystemCapability.BundleManager.BundleFramework.Launcher
98   * @systemapi
99   * @since 9
100   */
101  /**
102   * Indicates the moduleName of the shortcut
103   *
104   * @type { ?string }
105   * @syscap SystemCapability.BundleManager.BundleFramework.Launcher
106   * @systemapi
107   * @since 12
108   */
109  /**
110   * Indicates the moduleName of the shortcut
111   *
112   * @type { ?string }
113   * @syscap SystemCapability.BundleManager.BundleFramework.Launcher
114   * @since 20
115   * @arkts 1.1&1.2
116   */
117  moduleName?: string;
118
119  /**
120   * Indicates the host ability of the shortcut
121   *
122   * @type { string }
123   * @readonly
124   * @syscap SystemCapability.BundleManager.BundleFramework.Launcher
125   * @systemapi
126   * @since 9
127   */
128  /**
129   * Indicates the host ability of the shortcut
130   *
131   * @type { ?string }
132   * @syscap SystemCapability.BundleManager.BundleFramework.Launcher
133   * @systemapi
134   * @since 12
135   */
136  /**
137   * Indicates the host ability of the shortcut
138   *
139   * @type { ?string }
140   * @syscap SystemCapability.BundleManager.BundleFramework.Launcher
141   * @since 20
142   * @arkts 1.1&1.2
143   */
144  hostAbility?: string;
145
146  /**
147   * Indicates the icon of the shortcut
148   *
149   * @type { string }
150   * @readonly
151   * @syscap SystemCapability.BundleManager.BundleFramework.Launcher
152   * @systemapi
153   * @since 9
154   */
155  /**
156   * Indicates the icon of the shortcut
157   *
158   * @type { ?string }
159   * @syscap SystemCapability.BundleManager.BundleFramework.Launcher
160   * @systemapi
161   * @since 12
162   */
163  /**
164   * Indicates the icon of the shortcut
165   *
166   * @type { ?string }
167   * @syscap SystemCapability.BundleManager.BundleFramework.Launcher
168   * @since 20
169   * @arkts 1.1&1.2
170   */
171  icon?: string;
172
173  /**
174   * Indicates the icon id of the shortcut
175   *
176   * @type { number }
177   * @readonly
178   * @syscap SystemCapability.BundleManager.BundleFramework.Launcher
179   * @systemapi
180   * @since 9
181   */
182  /**
183   * Indicates the icon id of the shortcut
184   *
185   * @type { ?number }
186   * @syscap SystemCapability.BundleManager.BundleFramework.Launcher
187   * @systemapi
188   * @since 12
189   */
190  /**
191   * Indicates the icon id of the shortcut
192   *
193   * @type { ?number }
194   * @syscap SystemCapability.BundleManager.BundleFramework.Launcher
195   * @since 20
196   * @arkts 1.1&1.2
197   */
198  iconId?: number;
199
200  /**
201   * Indicates the label of the shortcut
202   *
203   * @type { string }
204   * @readonly
205   * @syscap SystemCapability.BundleManager.BundleFramework.Launcher
206   * @systemapi
207   * @since 9
208   */
209  /**
210   * Indicates the label of the shortcut
211   *
212   * @type { ?string }
213   * @syscap SystemCapability.BundleManager.BundleFramework.Launcher
214   * @systemapi
215   * @since 12
216   */
217  /**
218   * Indicates the label of the shortcut
219   *
220   * @type { ?string }
221   * @syscap SystemCapability.BundleManager.BundleFramework.Launcher
222   * @since 20
223   * @arkts 1.1&1.2
224   */
225  label?: string;
226
227  /**
228   * Indicates the label id of the shortcut
229   *
230   * @type { number }
231   * @readonly
232   * @syscap SystemCapability.BundleManager.BundleFramework.Launcher
233   * @systemapi
234   * @since 9
235   */
236  /**
237   * Indicates the label id of the shortcut
238   *
239   * @type { ?number }
240   * @syscap SystemCapability.BundleManager.BundleFramework.Launcher
241   * @systemapi
242   * @since 12
243   */
244  /**
245   * Indicates the label id of the shortcut
246   *
247   * @type { ?number }
248   * @syscap SystemCapability.BundleManager.BundleFramework.Launcher
249   * @since 20
250   * @arkts 1.1&1.2
251   */
252  labelId?: number;
253
254  /**
255   * Indicates the wants of the shortcut
256   *
257   * @type { Array<ShortcutWant> }
258   * @readonly
259   * @syscap SystemCapability.BundleManager.BundleFramework.Launcher
260   * @systemapi
261   * @since 9
262   */
263  /**
264   * Indicates the wants of the shortcut
265   *
266   * @type { ?Array<ShortcutWant> }
267   * @syscap SystemCapability.BundleManager.BundleFramework.Launcher
268   * @systemapi
269   * @since 12
270   */
271  /**
272   * Indicates the wants of the shortcut
273   *
274   * @type { ?Array<ShortcutWant> }
275   * @syscap SystemCapability.BundleManager.BundleFramework.Launcher
276   * @since 20
277   * @arkts 1.1&1.2
278   */
279  wants?: Array<ShortcutWant>;
280
281  /**
282   * Indicates the index of application clone.
283   *
284   * @type { number }
285   * @syscap SystemCapability.BundleManager.BundleFramework.Launcher
286   * @systemapi
287   * @since 12
288   */
289  /**
290   * Indicates the index of application clone.
291   *
292   * @type { number }
293   * @syscap SystemCapability.BundleManager.BundleFramework.Launcher
294   * @since 20
295   * @arkts 1.1&1.2
296   */
297  appIndex: number;
298
299  /**
300   * Indicates the source type of shortcut.
301   *
302   * @type { number }
303   * @syscap SystemCapability.BundleManager.BundleFramework.Launcher
304   * @systemapi
305   * @since 12
306   */
307  /**
308   * Indicates the source type of shortcut.
309   *
310   * @type { number }
311   * @syscap SystemCapability.BundleManager.BundleFramework.Launcher
312   * @since 20
313   * @arkts 1.1&1.2
314   */
315  sourceType: number;
316
317  /**
318   * Display control for indicating shortcut.
319   *
320   * @type { ?boolean }
321   * @syscap SystemCapability.BundleManager.BundleFramework.Launcher
322   * @since 20
323   * @arkts 1.1&1.2
324   */
325  visible?: boolean;
326}
327
328/**
329 * Obtains information about the ability that a shortcut will start.
330 *
331 * @typedef ShortcutWant
332 * @syscap SystemCapability.BundleManager.BundleFramework.Launcher
333 * @systemapi
334 * @since 9
335 */
336/**
337 * Obtains information about the ability that a shortcut will start.
338 *
339 * @typedef ShortcutWant
340 * @syscap SystemCapability.BundleManager.BundleFramework.Launcher
341 * @since 20
342 * @arkts 1.1&1.2
343 */
344export interface ShortcutWant {
345  /**
346   * Indicates the target bundle of the shortcut want
347   *
348   * @type { string }
349   * @readonly
350   * @syscap SystemCapability.BundleManager.BundleFramework.Launcher
351   * @systemapi
352   * @since 9
353   */
354  /**
355   * Indicates the target bundle of the shortcut want
356   *
357   * @type { string }
358   * @syscap SystemCapability.BundleManager.BundleFramework.Launcher
359   * @systemapi
360   * @since 12
361   */
362  /**
363   * Indicates the target bundle of the shortcut want
364   *
365   * @type { string }
366   * @syscap SystemCapability.BundleManager.BundleFramework.Launcher
367   * @since 20
368   * @arkts 1.1&1.2
369   */
370  targetBundle: string;
371
372  /**
373   * Indicates the target module of the shortcut want
374   *
375   * @type { string }
376   * @readonly
377   * @syscap SystemCapability.BundleManager.BundleFramework.Launcher
378   * @systemapi
379   * @since 9
380   */
381  /**
382   * Indicates the target module of the shortcut want
383   *
384   * @type { ?string }
385   * @syscap SystemCapability.BundleManager.BundleFramework.Launcher
386   * @systemapi
387   * @since 12
388   */
389  /**
390   * Indicates the target module of the shortcut want
391   *
392   * @type { ?string }
393   * @syscap SystemCapability.BundleManager.BundleFramework.Launcher
394   * @since 20
395   * @arkts 1.1&1.2
396   */
397  targetModule?: string;
398
399  /**
400   * Indicates the target ability of the shortcut want
401   *
402   * @type { string }
403   * @readonly
404   * @syscap SystemCapability.BundleManager.BundleFramework.Launcher
405   * @systemapi
406   * @since 9
407   */
408  /**
409   * Indicates the target ability of the shortcut want
410   *
411   * @type { string }
412   * @syscap SystemCapability.BundleManager.BundleFramework.Launcher
413   * @systemapi
414   * @since 12
415   */
416  /**
417   * Indicates the target ability of the shortcut want
418   *
419   * @type { string }
420   * @syscap SystemCapability.BundleManager.BundleFramework.Launcher
421   * @since 20
422   * @arkts 1.1&1.2
423   */
424  targetAbility: string;
425
426  /**
427   * Indicates the parameters of the shortcut want
428   *
429   * @type { ?Array<ParameterItem> }
430   * @syscap SystemCapability.BundleManager.BundleFramework.Launcher
431   * @systemapi
432   * @since 12
433   */
434  /**
435   * Indicates the parameters of the shortcut want
436   *
437   * @type { ?Array<ParameterItem> }
438   * @syscap SystemCapability.BundleManager.BundleFramework.Launcher
439   * @since 20
440   * @arkts 1.1&1.2
441   */
442  parameters?: Array<ParameterItem>;
443}
444
445/**
446 * Obtains information about the ability that a shortcut will start.
447 *
448 * @typedef ParameterItem
449 * @syscap SystemCapability.BundleManager.BundleFramework.Launcher
450 * @systemapi
451 * @since 12
452 */
453/**
454 * Obtains information about the ability that a shortcut will start.
455 *
456 * @typedef ParameterItem
457 * @syscap SystemCapability.BundleManager.BundleFramework.Launcher
458 * @since 20
459 * @arkts 1.1&1.2
460 */
461export interface ParameterItem {
462  /**
463   * Indicates the key of the parameter item.
464   *
465   * @type { string }
466   * @syscap SystemCapability.BundleManager.BundleFramework.Launcher
467   * @systemapi
468   * @since 12
469   */
470  /**
471   * Indicates the key of the parameter item.
472   *
473   * @type { string }
474   * @syscap SystemCapability.BundleManager.BundleFramework.Launcher
475   * @since 20
476   * @arkts 1.1&1.2
477   */
478  key: string;
479
480  /**
481   * Indicates the value of the parameter item.
482   *
483   * @type { string }
484   * @syscap SystemCapability.BundleManager.BundleFramework.Launcher
485   * @systemapi
486   * @since 12
487   */
488  /**
489   * Indicates the value of the parameter item.
490   *
491   * @type { string }
492   * @syscap SystemCapability.BundleManager.BundleFramework.Launcher
493   * @since 20
494   * @arkts 1.1&1.2
495   */
496  value: string;
497}
498